2024-02-03 14:36:17 +01:00
var N = { isObservable ( t ) { return ! 1 } , processReactiveAttribute ( t , e , n , r ) { return n } } ; function B ( t , e = ! 0 ) { return e ? Object . assign ( N , t ) : ( Object . setPrototypeOf ( t , N ) , t ) } function W ( t ) { return N . isPrototypeOf ( t ) && t !== N ? t : N } var T = ( ... t ) => Object . prototype . hasOwnProperty . call ( ... t ) ; function A ( t ) { return typeof t > "u" } function Q ( t ) { let e = typeof t ; return e !== "object" ? e : t === null ? "null" : Object . prototype . toString . call ( t ) } function q ( t , e ) { if ( ! t || ! ( t instanceof AbortSignal ) ) return ! 0 ; if ( ! t . aborted ) return t . addEventListener ( "abort" , e ) , function ( ) { t . removeEventListener ( "abort" , e ) } } function F ( t , e ) { let { observedAttributes : n = [ ] } = t . constructor ; return n . reduce ( function ( r , o ) { return r [ pt ( o ) ] = e ( t , o ) , r } , { } ) } function pt ( t ) { return t . replace ( /-./g , e => e [ 1 ] . toUpperCase ( ) ) } var d = { setDeleteAttr : lt , ssr : "" , D : globalThis . document , F : globalThis . DocumentFragment , H : globalThis . HTMLElement , S : globalThis . SVGElement , M : globalThis . MutationObserver } ; function lt ( t , e , n ) { if ( Reflect . set ( t , e , n ) , ! ! A ( n ) ) { if ( Reflect . deleteProperty ( t , e ) , t instanceof d . H && t . getAttribute ( e ) === "undefined" ) return t . removeAttribute ( e ) ; if ( Reflect . get ( t , e ) === "undefined" ) return Reflect . set ( t , e , "" ) } } var C = "__dde_lifecyclesToEvents" , O = "dde:connected" , S = "dde:disconnected" , P = "dde:attributeChanged" ; var w = [ { get scope ( ) { return d . D . body } , host : t => t ? t ( d . D . body ) : d . D . body , prevent : ! 0 } ] , m = { get current ( ) { return w [ w . length - 1 ] } , get host ( ) { return this . current . host } , preventDefault ( ) { let { current : t } = this ; return t . prevent = ! 0 , t } , get state ( ) { return [ ... w ] } , push ( t = { } ) { return w . push ( Object . assign ( { } , this . current , { prevent : ! 1 } , t ) ) } , pushRoot ( ) { return w . push ( w [ 0 ] ) } , pop ( ) { if ( w . length !== 1 ) return w . pop ( ) } } ; function X ( ... t ) { return this . appendOriginal ( ... t ) , this } function ht ( t ) { return t . append === X || ( t . appendOriginal = t . append , t . append = X ) , t } var $ ; function M ( t , e , ... n ) { let r = W ( this ) , o = 0 , c , s ; switch ( ( Object ( e ) !== e || r . isObservable ( e ) ) && ( e = { textContent : e } ) , ! 0 ) { case typeof t == "function" : { o = 1 , m . push ( { scope : t , host : ( ... g ) => g . length ? ( o === 1 ? n . unshift ( ... g ) : g . forEach ( p => p ( s ) ) , void 0 ) : s } ) , c = t ( e || void 0 ) ; let a = c instanceof d . F ; if ( c . nodeName === "#comment" ) break ; let h = M . mark ( { type : "component" , name : t . name , host : a ? "this" : "parentElement" } ) ; c . prepend ( h ) , a && ( s = h ) ; break } case t === "#text" : c = j . call ( this , d . D . createTextNode ( "" ) , e ) ; break ; case ( t === "<>" || ! t ) : c = j . call ( this , d . D . createDocumentFragment ( ) , e ) ; break ; case ! ! $ : c = j . call ( this , d . D . createElementNS ( $ , t ) , e ) ; break ; case ! c : c = j . call ( this , d . D . createElement ( t ) , e ) } return ht ( c ) , s || ( s = c ) , n . forEach ( a => a ( s ) ) , o && m . pop ( ) , o = 2 , c } function Wt ( t , e = t , n = void 0 ) { let r = Symbol . for ( "default" ) , o = Array . from ( e . querySelectorAll ( "slot" ) ) . reduce ( ( s , a ) => Reflect . set ( s , a . name || r , a ) && s , { } ) , c = T ( o , r ) ; if ( t . append = new Proxy ( t . append , { apply ( s , a , h ) { if ( ! h . length ) return t ; let g = d . D . createDocumentFragment ( ) ; for ( let p of h ) { if ( ! p || ! p . slot ) { c && g . appendChild ( p ) ; continue } let y = p . slot , _ = o [ y ] ; gt ( p , "remove" , "slot" ) , _ && ( bt ( _ , p , n ) , Reflect . deleteProperty ( o , y ) ) } return c && ( o [ r ] . replaceWith ( g ) , Reflect . deleteProperty ( o , r ) ) , t . append = s , t } } ) , t !== e ) { let s = Array . from ( t . childNodes ) ; s . forEach ( a => a . remove ( ) ) , t . append ( ... s ) } return e } function bt ( t , e , n ) { n && n ( t , e ) ; try { t . replaceWith ( j ( e , { className : [ e . className , t . className ] , dataset : { ... t . dataset } } ) ) } catch { t . replaceWith ( e ) } } M . mark = function ( t , e = ! 1 ) { t = Object . entries ( t ) . map ( ( [ o , c ] ) => o + ` =" ${ c } " ` ) . join ( " " ) ; let n = e ? "" : "/" , r = d . D . createComment ( ` <dde:mark ${ t } ${ d . ssr } ${ n } > ` ) ; return e && ( r . end = d . D . createComment ( "</dde:mark>" ) ) , r } ; function qt ( t ) { let e = this ; return function ( ... r ) { $ = t ; let o = M . call ( e , ... r ) ; return $ = void 0 , o } } var U = new WeakMap , { setDeleteAttr : Y } = d ; function j ( t , ... e ) { if ( ! e . length ) return t ; U . set ( t , nt ( t , this ) ) ; for ( let [ n , r ] of Object . entries ( Object . assign ( { } , ... e ) ) ) et . call ( this , t , n , r ) ; return U . delete ( t ) , t } function et ( t , e , n ) { let { setRemoveAttr : r , s : o } = nt ( t , this ) , c = this ; n = o . processReactiveAttribute ( t , e , n , ( a , h ) => et . call ( c , t , a , h ) ) ; let [ s ] = e ; if ( s === "=" ) return r ( e . slice ( 1 ) , n ) ; if ( s === "." ) return tt ( t , e . slice ( 1 ) , n ) ; if ( /(aria|data)([A-Z])/ . test ( e ) ) return e = e . replace ( /([a-z])([A-Z])/g , "$1-$2" ) . toLowerCase ( ) , r ( e , n ) ; switch ( e === "className" && ( e = "class" ) , e ) { case "xlink:href" : return r ( e , n , "http://www.w3.org/1999/xlink" ) ; case "textContent" : return Y ( t , e , n ) ; case "style" : if ( typeof n != " obje
* Investigate ` __dde_attributes ` key of the element . * / E . c l e a r ( . . . O b j e c t . v a l u e s ( t h i s [ G ] ) ) } ) ( t ) , n } ; v a r u t = { i s O b s e r v a b l e : z , p r o c e s s R e a c t i v e A t t r i b u t e ( t , e , n , r ) { i f ( ! z ( n ) ) r e t u r n n ; l e t o = c = > { i f ( ! t . i s C o n n e c t e d ) r e t u r n k ( n , o ) ; r ( e , c ) } ; r e t u r n K ( n , o ) , f t ( n , o , t , e ) , n ( ) } } ; f u n c t i o n f t ( t , e , . . . n ) { l e t { c u r r e n t : r } = m ; r . p r e v e n t | | r . h o s t ( f u n c t i o n ( o ) { o [ R ] | | ( o [ R ] = [ ] , x . d i s c o n n e c t e d ( ( ) = > o [ R ] . f o r E a c h ( ( [ [ c , s ] ] ) = > k ( c , s , c [ l ] & & c [ l ] . h o s t & & c [ l ] . h o s t ( ) = = = o ) ) ) ( o ) ) , o [ R ] . p u s h ( [ [ t , e ] , . . . n ] ) } ) } f u n c t i o n s t ( t , e , n ) { l e t r = t ? ( ) = > i t ( r ) : ( . . . o ) = > o . l e n g t h ? d t ( r , . . . o ) : i t ( r ) ; r e t u r n a t ( r , e , n , t ) } v a r D t = O b j e c t . a s s i g n ( O b j e c t . c r e a t e ( n u l l ) , { s t o p P r o p a g a t i o n ( ) { t h i s . s k i p = ! 0 } } ) , V = c l a s s e x t e n d s E r r o r { c o n s t r u c t o r ( ) { s u p e r ( ) ; l e t [ e , . . . n ] = t h i s . s t a c k . s p l i t ( `
2024-02-03 14:36:17 +01:00
` ),r=e.slice(e.indexOf("@"),e.indexOf(".js:")+4);this.stack=n.find(o=>!o.includes(r))}};function at(t,e,n,r=!1){let o=[];Q(n)!=="[object Object]"&&(n={});let{onclear:c}=E.symbols;n[c]&&(o.push(n[c]),delete n[c]);let{host:s}=m;return Reflect.defineProperty(t,l,{value:{value:e,actions:n,onclear:o,host:s,listeners:new Set,defined:new V().stack,readonly:r},enumerable:!1,writable:!1,configurable:!0}),t.toJSON=()=>t(),Object.setPrototypeOf(t[l],Dt),t}function Rt(){return H[H.length-1]}function it(t){if(!t[l])return;let{value:e,listeners:n}=t[l],r=Rt();return r&&n.add(r),v.has(r)&&v.get(r).add(t),e}function dt(t,e,n){if(!t[l])return;let r=t[l];if(!(!n&&r.value===e))return r.value=e,r.listeners.forEach(o=>o(e)),e}function K(t,e){if(t[l])return t[l].listeners.add(e)}function k(t,e,n){let r=t[l];if(!r)return;let o=r.listeners.delete(e);if(n&&!r.listeners.size){if(E.clear(t),!v.has(r))return o;let c=v.get(r);if(!v.has(c))return o;v.get(c).forEach(s=>k(s,c,!0))}return o}B(ut);export{E as O,j as assign,et as assignAttribute,ht as chainableAppend,vt as classListDeclarative,M as createElement,qt as createElementNS,Zt as customElementRender,wt as customElementWithDDE,Qt as dispatchEvent,M as el,qt as elNS,gt as elementAttribute,Ft as empty,z as isObservable,wt as lifecyclesToEvents,E as observable,yt as observedAttributes,x as on,B as registerReactivity,m as scope,Wt as simulateSlots};