2023-11-21 17:19:59 +01:00
var w = { isSignal ( t ) { return ! 1 } , processReactiveAttribute ( t , e , n , r ) { return n } } ; function T ( t , e = ! 0 ) { return e ? Object . assign ( w , t ) : ( Object . setPrototypeOf ( t , w ) , t ) } function R ( t ) { return w . isPrototypeOf ( t ) && t !== w ? t : w } function x ( 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 C ( t , e ) { if ( ! t || ! ( t instanceof AbortSignal ) ) return ! 0 ; if ( ! t . aborted ) return t . addEventListener ( "abort" , e ) , function ( ) { t . removeEventListener ( "abort" , e ) } } var W = { setDeleteAttr : Y , ssr : "" } ; function Y ( t , e , n ) { if ( Reflect . set ( t , e , n ) , ! ! x ( n ) ) { if ( Reflect . deleteProperty ( t , e ) , t instanceof HTMLElement && t . getAttribute ( e ) === "undefined" ) return t . removeAttribute ( e ) ; if ( Reflect . get ( t , e ) === "undefined" ) return Reflect . set ( t , e , "" ) } } var E = [ { scope : document . body , host : t => t ? t ( document . body ) : document . body , custom _element : ! 1 , prevent : ! 0 } ] , g = { get current ( ) { return E [ E . length - 1 ] } , get host ( ) { return this . current . host } , preventDefault ( ) { let { current : t } = this ; return t . prevent = ! 0 , t } , get state ( ) { return [ ... E ] } , push ( t = { } ) { return E . push ( Object . assign ( { } , this . current , { prevent : ! 1 } , t ) ) } , pushRoot ( ) { return E . push ( E [ 0 ] ) } , pop ( ) { if ( E . length !== 1 ) return E . pop ( ) } } ; function B ( ... t ) { return this . appendOriginal ( ... t ) , this } function tt ( t ) { return t . append === B || ( t . appendOriginal = t . append , t . append = B ) , t } var L ; function y ( t , e , ... n ) { let r = R ( this ) , o = 0 , c , s ; switch ( ( Object ( e ) !== e || r . isSignal ( e ) ) && ( e = { textContent : e } ) , ! 0 ) { case typeof t == "function" : { o = 1 , g . push ( { scope : t , host : ( ... p ) => p . length ? ( o === 1 ? n . unshift ( ... p ) : p . forEach ( v => v ( s ) ) , void 0 ) : s } ) , c = t ( e || void 0 ) ; let a = c instanceof DocumentFragment ; if ( c . nodeName === "#comment" ) break ; let d = y . mark ( { type : "component" , name : t . name , host : a ? "this" : "parentElement" } ) ; c . prepend ( d ) , a && ( s = d ) ; break } case t === "#text" : c = N . call ( this , document . createTextNode ( "" ) , e ) ; break ; case ( t === "<>" || ! t ) : c = N . call ( this , document . createDocumentFragment ( ) , e ) ; break ; case ! ! L : c = N . call ( this , document . createElementNS ( L , t ) , e ) ; break ; case ! c : c = N . call ( this , document . createElement ( t ) , e ) } return tt ( c ) , s || ( s = c ) , n . forEach ( a => a ( s ) ) , o && g . pop ( ) , o = 2 , c } y . mark = function ( t , e = ! 1 ) { t = Object . entries ( t ) . map ( ( [ o , c ] ) => o + ` =" ${ c } " ` ) . join ( " " ) ; let n = e ? "" : "/" , r = document . createComment ( ` <dde:mark ${ t } ${ W . ssr } ${ n } > ` ) ; return e || ( r . end = document . createComment ( "</dde:mark>" ) ) , r } ; function _t ( t ) { let e = this ; return function ( ... r ) { L = t ; let o = y . call ( e , ... r ) ; return L = void 0 , o } } var { setDeleteAttr : H } = W , j = new WeakMap ; function N ( t , ... e ) { if ( ! e . length ) return t ; j . set ( t , Z ( t , this ) ) ; for ( let [ n , r ] of Object . entries ( Object . assign ( { } , ... e ) ) ) J . call ( this , t , n , r ) ; return j . delete ( t ) , t } function J ( t , e , n ) { let { setRemoveAttr : r , s : o } = Z ( t , this ) , c = this ; n = o . processReactiveAttribute ( t , e , n , ( a , d ) => J . call ( c , t , a , d ) ) ; let [ s ] = e ; if ( s === "=" ) return r ( e . slice ( 1 ) , n ) ; if ( s === "." ) return I ( 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 H ( t , e , n ) ; case "style" : if ( typeof n != "object" ) break ; case "dataset" : return $ ( o , n , I . bind ( null , t [ e ] ) ) ; case "ariaset" : return $ ( o , n , ( a , d ) => r ( "aria-" + a , d ) ) ; case "classList" : return et . call ( c , t , n ) } return nt ( t , e ) ? H ( t , e , n ) : r ( e , n ) } function Z ( t , e ) { if ( j . has ( t ) ) return j . get ( t ) ; let r = ( t instanceof SVGElement ? ot : rt ) . bind ( null , t , "Attribute" ) , o = R ( e ) ; return { setRemoveAttr : r , s : o } } function et ( t , e ) { let n = R ( this ) ; return $ ( n , e , ( r , o ) => t . classList . toggle ( r , o === - 1 ? void 0 : ! ! o ) ) , t } function Et ( t ) { return Array . from ( t . children ) . forEach ( e => e . remove ( ) ) , t } function nt ( t , e ) { if ( ! Reflect . has ( t , e ) ) return ! 1 ; let n = G ( t , e ) ; return ! x ( n . set ) } function G ( t , e ) { if ( t = Object . getPrototypeOf ( t ) , ! t ) return { } ; let n = Object . getOwnPropertyDescriptor ( t , e ) ; return n || G ( t , e ) } function $ ( t , e , n ) { if ( ! ( typeof e != "object" || e === null ) ) return Object . entries ( e ) . forEach ( function ( [ o , c ] ) { o && ( c = t . processReactiveAttribute ( e , o , c , n ) , n ( o , c ) ) } ) } function V ( t ) { return Array . isArray ( t ) ? t . filter ( Boolean ) . join ( " " ) : t } function rt ( t , e , n , r ) { return t [ ( x ( r ) ? "remove" : "set" ) + e ] ( n , V ( r ) ) } function ot ( t , e , n , r , o = null ) { return t [ ( x ( r ) ? "remove" : "set" ) + e + "NS" ] ( o , n , V ( r ) ) } function I ( t , e , n ) { if ( Reflect . set ( t , e , n ) , ! ! x ( n ) ) return Reflect . deleteProperty ( t
* Investigate ` __dde_attributes ` key of the element . * / b . c l e a r ( . . . O b j e c t . v a l u e s ( o [ A ] ) ) , r = n u l l } ) ( o ) , o } ) , n e w P r o x y ( n , { a p p l y ( o , c , s ) { i f ( ! s . l e n g t h ) r e t u r n o ( ) ; i f ( ! r ) r e t u r n ; l e t a = s [ 0 ] ; r e t u r n r i n s t a n c e o f H T M L E l e m e n t ? r . s e t A t t r i b u t e ( t , a ) : r . s e t A t t r i b u t e N S ( n u l l , t , a ) } } ) } ; b . c l e a r = f u n c t i o n ( . . . t ) { f o r ( l e t n o f t ) { R e f l e c t . d e l e t e P r o p e r t y ( n , " t o J S O N " ) ; l e t r = n [ l ] ; r . o n c l e a r . f o r E a c h ( o = > o . c a l l ( r ) ) , e ( n , r ) , R e f l e c t . d e l e t e P r o p e r t y ( n , l ) } f u n c t i o n e ( n , r ) { r . l i s t e n e r s . f o r E a c h ( o = > { i f ( r . l i s t e n e r s . d e l e t e ( o ) , ! h . h a s ( o ) ) r e t u r n ; l e t c = h . g e t ( o ) ; c . d e l e t e ( n ) , ! ( c . s i z e > 1 ) & & ( b . c l e a r ( . . . c ) , h . d e l e t e ( o ) ) } ) } } ; v a r k = " _ _ d d e _ r e a c t i v e " ; b . e l = f u n c t i o n ( t , e ) { l e t n = y . m a r k ( { t y p e : " r e a c t i v e " } , ! 1 ) , r = n . e n d , o = d o c u m e n t . c r e a t e D o c u m e n t F r a g m e n t ( ) ; o . a p p e n d ( n , r ) ; l e t { c u r r e n t : c } = g , s = a = > { i f ( ! n . p a r e n t N o d e | | ! r . p a r e n t N o d e ) r e t u r n O ( t , s ) ; g . p u s h ( c ) ; l e t d = e ( a ) ; g . p o p ( ) , A r r a y . i s A r r a y ( d ) | | ( d = [ d ] ) ; l e t p = n ; f o r ( ; ( p = n . n e x t S i b l i n g ) ! = = r ; ) p . r e m o v e ( ) ; n . a f t e r ( . . . d ) } ; r e t u r n U ( t , s ) , X ( t , s , n , e ) , s ( t ( ) ) , o } ; v a r Q = { i s S i g n a l : D , 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 ( ! D ( n ) ) r e t u r n n ; l e t o = c = > r ( e , c ) ; r e t u r n U ( n , o ) , X ( n , o , t , e ) , n ( ) } } ; f u n c t i o n X ( t , e , . . . n ) { l e t { c u r r e n t : r } = g ; r . p r e v e n t | | r . h o s t ( f u n c t i o n ( o ) { o [ k ] | | ( o [ k ] = [ ] , _ . d i s c o n n e c t e d ( ( ) = > o [ k ] . f o r E a c h ( ( [ [ c , s ] ] ) = > O ( c , s , c [ l ] ? . h o s t ( ) = = = o ) ) ) ( o ) ) , o [ k ] . p u s h ( [ [ t , e ] , . . . n ] ) } ) } f u n c t i o n K ( t , e ) { l e t n = ( . . . r ) = > r . l e n g t h ? d t ( n , . . . r ) : a t ( n ) ; r e t u r n u t ( n , t , e ) } v a r i 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 } } ) , F = 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 ( `
` ),r=e.slice(e.indexOf("@"),e.indexOf(".js:")+4);this.stack=n.find(o=>!o.includes(r))}};function ut(t,e,n){let r=[];q(n)!=="[object Object]"&&(n={});let{onclear:o}=b.symbols;n[o]&&(r.push(n[o]),Reflect.deleteProperty(n,o));let{host:c}=g;return Reflect.defineProperty(t,l,{value:{value:e,actions:n,onclear:r,host:c,listeners:new Set,defined:new F},enumerable:!1,writable:!1,configurable:!0}),t.toJSON=()=>t(),Object.setPrototypeOf(t[l],it),t}function ft(){return M[M.length-1]}function at(t){if(!t[l])return;let{value:e,listeners:n}=t[l],r=ft();return r&&n.add(r),h.has(r)&&h.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 U(t,e){if(t[l])return t[l].listeners.add(e)}function O(t,e,n){let r=t[l];if(!r)return;let o=r.listeners.delete(e);if(n&&!r.listeners.size){if(b.clear(t),!h.has(r))return o;let c=h.get(r);if(!h.has(c))return o;h.get(c).forEach(s=>O(s,c,!0))}return o}T(Q);export{b as S,N as assign,J as assignAttribute,tt as chainableAppend,et as classListDeclarative,y as createElement,_t as createElementNS,St as dispatchEvent,y as el,_t as elNS,Et as empty,D as isSignal,_ as on,T as registerReactivity,g as scope};