flexium 0.10.6 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/canvas.js +1 -1
- package/dist/canvas.mjs +1 -1
- package/dist/{chunk-RLLO5M6F.js → chunk-5ICRQIS2.js} +3 -3
- package/dist/{chunk-RLLO5M6F.js.map → chunk-5ICRQIS2.js.map} +1 -1
- package/dist/{chunk-ERIXVRJ4.mjs → chunk-5K55ASOD.mjs} +3 -3
- package/dist/{chunk-ERIXVRJ4.mjs.map → chunk-5K55ASOD.mjs.map} +1 -1
- package/dist/{chunk-NF4RPLCK.js → chunk-AZEHBSBG.js} +3 -3
- package/dist/{chunk-NF4RPLCK.js.map → chunk-AZEHBSBG.js.map} +1 -1
- package/dist/chunk-BBNYMXE7.mjs +2 -0
- package/dist/chunk-BBNYMXE7.mjs.map +1 -0
- package/dist/{chunk-ANJNQW77.js → chunk-QPCIDSMM.js} +2 -2
- package/dist/{chunk-ANJNQW77.js.map → chunk-QPCIDSMM.js.map} +1 -1
- package/dist/{chunk-F23GIQDE.mjs → chunk-QZIX4FXS.mjs} +2 -2
- package/dist/{chunk-F23GIQDE.mjs.map → chunk-QZIX4FXS.mjs.map} +1 -1
- package/dist/chunk-XJHWMHKF.js +2 -0
- package/dist/chunk-XJHWMHKF.js.map +1 -0
- package/dist/{chunk-E5WYPGCV.mjs → chunk-Y6KKAHLS.mjs} +3 -3
- package/dist/{chunk-E5WYPGCV.mjs.map → chunk-Y6KKAHLS.mjs.map} +1 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/dom.js +1 -1
- package/dist/dom.mjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/interactive.js +1 -1
- package/dist/interactive.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/primitives/ui.js +1 -1
- package/dist/primitives/ui.mjs +1 -1
- package/dist/primitives.js +1 -1
- package/dist/primitives.mjs +1 -1
- package/dist/router.js +1 -1
- package/dist/router.mjs +1 -1
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/{state-SUVOJZYY.mjs → state-RYKSC35A.mjs} +2 -2
- package/dist/{state-SUVOJZYY.mjs.map → state-RYKSC35A.mjs.map} +1 -1
- package/dist/state-XUXPMCFJ.js +2 -0
- package/dist/{state-S3TSPDMB.js.map → state-XUXPMCFJ.js.map} +1 -1
- package/dist/test-exports.js +1 -1
- package/dist/test-exports.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-2L2QFYBL.mjs +0 -2
- package/dist/chunk-2L2QFYBL.mjs.map +0 -1
- package/dist/chunk-YEBBTVHG.js +0 -2
- package/dist/chunk-YEBBTVHG.js.map +0 -1
- package/dist/state-S3TSPDMB.js +0 -2
package/README.md
CHANGED
|
@@ -138,18 +138,18 @@ Use native JavaScript for control flow - no special components needed:
|
|
|
138
138
|
|
|
139
139
|
```tsx
|
|
140
140
|
// Conditional rendering
|
|
141
|
-
{isLoggedIn ? <Dashboard /> : <Login />}
|
|
141
|
+
{isLoggedIn() ? <Dashboard /> : <Login />}
|
|
142
142
|
|
|
143
143
|
// Short-circuit for simple conditions
|
|
144
|
-
{isAdmin && <AdminPanel />}
|
|
144
|
+
{isAdmin() && <AdminPanel />}
|
|
145
145
|
|
|
146
146
|
// List rendering with optimized reconciliation
|
|
147
147
|
{items.map(item => <Item key={item.id} data={item} />)}
|
|
148
148
|
|
|
149
149
|
// Pattern matching with ternary chains
|
|
150
|
-
{status === 'loading' ? <Loading /> :
|
|
151
|
-
status === 'error' ? <Error /> :
|
|
152
|
-
status === 'success' ? <Success /> :
|
|
150
|
+
{status() === 'loading' ? <Loading /> :
|
|
151
|
+
status() === 'error' ? <Error /> :
|
|
152
|
+
status() === 'success' ? <Success /> :
|
|
153
153
|
<Default />}
|
|
154
154
|
```
|
|
155
155
|
|
package/dist/canvas.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkQPCIDSMM_js=require('./chunk-QPCIDSMM.js');require('./chunk-XJHWMHKF.js'),require('./chunk-YPVRQKMW.js');var chunkWWEWRI6S_js=require('./chunk-WWEWRI6S.js'),chunkGYDP6MFV_js=require('./chunk-GYDP6MFV.js');Object.defineProperty(exports,"Canvas",{enumerable:true,get:function(){return chunkQPCIDSMM_js.d}});Object.defineProperty(exports,"DrawArc",{enumerable:true,get:function(){return chunkQPCIDSMM_js.g}});Object.defineProperty(exports,"DrawCircle",{enumerable:true,get:function(){return chunkQPCIDSMM_js.f}});Object.defineProperty(exports,"DrawLine",{enumerable:true,get:function(){return chunkQPCIDSMM_js.h}});Object.defineProperty(exports,"DrawPath",{enumerable:true,get:function(){return chunkQPCIDSMM_js.i}});Object.defineProperty(exports,"DrawRect",{enumerable:true,get:function(){return chunkQPCIDSMM_js.e}});Object.defineProperty(exports,"DrawText",{enumerable:true,get:function(){return chunkQPCIDSMM_js.j}});Object.defineProperty(exports,"renderCanvasChildren",{enumerable:true,get:function(){return chunkQPCIDSMM_js.c}});Object.defineProperty(exports,"unwrapSignal",{enumerable:true,get:function(){return chunkQPCIDSMM_js.b}});Object.defineProperty(exports,"effect",{enumerable:true,get:function(){return chunkWWEWRI6S_js.c}});Object.defineProperty(exports,"root",{enumerable:true,get:function(){return chunkGYDP6MFV_js.i}});//# sourceMappingURL=canvas.js.map
|
|
2
2
|
//# sourceMappingURL=canvas.js.map
|
package/dist/canvas.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{d as Canvas,g as DrawArc,f as DrawCircle,h as DrawLine,i as DrawPath,e as DrawRect,j as DrawText,c as renderCanvasChildren,b as unwrapSignal}from'./chunk-
|
|
1
|
+
export{d as Canvas,g as DrawArc,f as DrawCircle,h as DrawLine,i as DrawPath,e as DrawRect,j as DrawText,c as renderCanvasChildren,b as unwrapSignal}from'./chunk-QZIX4FXS.mjs';import'./chunk-BBNYMXE7.mjs';import'./chunk-FDMJHFN7.mjs';export{c as effect}from'./chunk-HB5VPQTB.mjs';export{i as root}from'./chunk-ECYYIQEX.mjs';//# sourceMappingURL=canvas.mjs.map
|
|
2
2
|
//# sourceMappingURL=canvas.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var chunkDZ7L3SHV_js=require('./chunk-DZ7L3SHV.js'),chunkYEBBTVHG_js=require('./chunk-YEBBTVHG.js'),chunkQ7IWDVJ4_js=require('./chunk-Q7IWDVJ4.js'),chunkWWEWRI6S_js=require('./chunk-WWEWRI6S.js'),chunkGYDP6MFV_js=require('./chunk-GYDP6MFV.js');var Se=new Set,ve=new Set(["focus","blur","mouseenter","mouseleave","load","unload","scroll"]),Q=new WeakMap;function Fe(e){let t=e.type.toLowerCase(),n=!ve.has(t),o=e.composedPath?.()||[],r=e.target;if(o.length===0&&r)for(;r;)o.push(r),r=r.parentNode;for(let i of o){let s=i;if(s===document||!s)break;let p=Q.get(s);if(p?.has(t)){let l=p.get(t);if(l){try{l(e);}catch(c){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.EVENT_HANDLER_FAILED,{eventType:t},c);}if(e.cancelBubble)return}}if(!n)break}}function Me(e){if(!(typeof document>"u")&&!Se.has(e)){let t=ve.has(e);document.addEventListener(e,Fe,{capture:t}),Se.add(e);}}var de={on(e,t,n){let o=t.toLowerCase(),r=Q.get(e);r||(r=new Map,Q.set(e,r)),r.set(o,n),Me(o);},off(e,t){let n=t.toLowerCase(),o=Q.get(e);o&&o.delete(n);}};var J={width:{cssProp:"width",transform:"px"},height:{cssProp:"height",transform:"px"},flexDirection:{cssProp:"flexDirection",transform:"none"},justifyContent:{cssProp:"justifyContent",transform:"none"},alignItems:{cssProp:"alignItems",transform:"none"},alignSelf:{cssProp:"alignSelf",transform:"none"},flexWrap:{cssProp:"flexWrap",transform:"none"},flex:{cssProp:"flex",transform:"string"},gap:{cssProp:"gap",transform:"px"},justify:{cssProp:"justifyContent",transform:"none"},align:{cssProp:"alignItems",transform:"none"},bg:{cssProp:"backgroundColor",transform:"none"},color:{cssProp:"color",transform:"none"},borderRadius:{cssProp:"borderRadius",transform:"px"},borderWidth:{cssProp:"borderWidth",transform:"px",sideEffect:(e,t)=>{t!==void 0&&e.borderStyle!=="solid"&&(e.borderStyle="solid");}},borderColor:{cssProp:"borderColor",transform:"none"},opacity:{cssProp:"opacity",transform:"string"},fontSize:{cssProp:"fontSize",transform:"px"},fontWeight:{cssProp:"fontWeight",transform:"string"},fontFamily:{cssProp:"fontFamily",transform:"none"},lineHeight:{cssProp:"lineHeight",transform:"string"},textAlign:{cssProp:"textAlign",transform:"none"},padding:{cssProp:"padding",transform:"px"},paddingTop:{cssProp:"paddingTop",transform:"px"},paddingRight:{cssProp:"paddingRight",transform:"px"},paddingBottom:{cssProp:"paddingBottom",transform:"px"},paddingLeft:{cssProp:"paddingLeft",transform:"px"},margin:{cssProp:"margin",transform:"px"},marginTop:{cssProp:"marginTop",transform:"px"},marginRight:{cssProp:"marginRight",transform:"px"},marginBottom:{cssProp:"marginBottom",transform:"px"},marginLeft:{cssProp:"marginLeft",transform:"px"}},Ee={Row:"div",Column:"div",Stack:"div",Text:"span",Button:"button",Input:"input",Container:"div"},ee={onPress:"click",onHover:"mouseenter",onChange:"input",onFocus:"focus",onBlur:"blur"},Te=new Set(["children","key","ref","className","style","width","height","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","gap","flex","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","align","justify","bg","color","borderRadius","borderWidth","borderColor","opacity","fontSize","fontWeight","fontFamily","lineHeight","textAlign"]),Ie="http://www.w3.org/2000/svg",Pe=new Set(["svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","tspan","defs","use","symbol","marker","linearGradient","radialGradient","stop","clipPath","pattern","mask","filter"]),De={viewBox:"viewBox",preserveAspectRatio:"preserveAspectRatio",strokeWidth:"stroke-width",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",stopColor:"stop-color",stopOpacity:"stop-opacity",clipPath:"clip-path",markerEnd:"marker-end",markerStart:"marker-start",markerMid:"marker-mid"};function He(e){return typeof e=="number"?`${e}px`:e}var Le=new Map;function ke(e){let t=Le.get(e);return t===void 0&&(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Le.set(e,t)),t}function Oe(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Ve(e,t){if(e!=null)switch(t){case "px":return He(e);case "string":return String(e);case "none":default:return e}}function Be(e,t,n){let o=e.style,r=t.style,i=n.style;if(r!==i){if(r&&typeof r=="object")for(let c in r)(!i||!(c in i))&&o.setProperty(ke(c),"");if(i&&typeof i=="object")for(let c in i){let f=i[c];(!r||r[c]!==f)&&o.setProperty(ke(c),f);}}let s=e.getAttribute("data-flexium-type");(n.flexDirection||n.justifyContent||n.alignItems||n.flexWrap||n.gap!==void 0||n.justify||n.align||s==="Row"||s==="Column"||s==="Stack")&&(o.display!=="flex"&&(o.display="flex"),s==="Row"&&o.flexDirection!=="row"&&(o.flexDirection="row"),s==="Column"&&o.flexDirection!=="column"&&(o.flexDirection="column"));let l=o;for(let c in t)if(c in J&&!(c in n)){let f=J[c],m=f.cssProp,a=l[m];a!==void 0&&a!==""&&(l[m]=""),f.sideEffect&&f.sideEffect(o,void 0);}for(let c in n)if(c in J){let f=t[c],m=n[c];if(f===m)continue;let a=J[c],d=Ve(m,a.transform),u=a.cssProp,N=l[u];d===void 0?N!==void 0&&N!==""&&(l[u]=""):N!==d&&(l[u]=d),a.sideEffect&&a.sideEffect(o,d);}}function _e(e){if(typeof e=="string")return e;if(Array.isArray(e)){let t="";for(let n=0;n<e.length;n++){let o=e[n];if(!o)continue;let r=typeof o=="string"?o:_e(o);r&&(t=t?`${t} ${r}`:r);}return t}if(typeof e=="object"&&e!==null){let t="";for(let n in e)e[n]&&(t=t?`${t} ${n}`:n);return t}return ""}var le=class{createNode(t,n){let o=Ee[t]??t,r;return Pe.has(o)?r=document.createElementNS(Ie,o):r=document.createElement(o),Ee[t]&&r.setAttribute("data-flexium-type",t),this.updateNode(r,{},n),r}updateNode(t,n,o){if(o.className!==n.className){let i=_e(o.className);t instanceof SVGElement?t.setAttribute("class",i):t.className=i;}Be(t,n,o);for(let i in n)if(!(i in o)){if(typeof i=="symbol")continue;if(i.startsWith("on")){let s=ee[i]||i.slice(2).toLowerCase();this.removeEventListener(t,s,n[i]);}else Te.has(i)||t.removeAttribute(i);}let r=Reflect.ownKeys(o);for(let i of r){if(typeof i=="symbol")continue;let s=i,p=o[s],l=n[s];if(p!==l){if(s.startsWith("on")){let c=ee[s]||s.slice(2).toLowerCase();l&&this.removeEventListener(t,c,l),p&&this.addEventListener(t,c,p);}else if(!Te.has(s))if(p==null||p===false)t.removeAttribute(s);else if(p===true)t.setAttribute(s,"");else {let c=De[s]||s;t.setAttribute(c,Oe(String(p)));}}}}appendChild(t,n){t.appendChild(n);}insertBefore(t,n,o){t.insertBefore(n,o);}nextSibling(t){return t.nextSibling}removeChild(t,n){t.removeChild(n);}createTextNode(t){return document.createTextNode(t)}updateTextNode(t,n){t.textContent=n;}addEventListener(t,n,o){let r=ee[n]||n;de.on(t,r,o);}removeEventListener(t,n,o){let r=ee[n]||n;de.off(t,r);}},x=new le;var ae=Symbol("flexium.list");function fe(e){return e!==null&&typeof e=="object"&&ae in e&&e[ae]===true}function $e(e,t){return typeof e=="number"?e:e.mode==="fixed"?e.itemHeight:e.estimatedItemHeight}function Ge(e,t,n,o,r){let i=o*n;if(o===0)return {startIndex:0,endIndex:-1,totalHeight:0};let s=Math.floor(e/n),p=Math.ceil(t/n),l=s+p;return {startIndex:Math.max(0,s-r),endIndex:Math.min(o-1,l+r),totalHeight:i}}function pe(e,t,n,o){return e.virtual?je(e,t,n,o):We(e,t,n,o)}function We(e,t,n,o){let{each:r,renderItem:i,getKey:s,class:p,style:l}=e,c=document.createElement("div");c.setAttribute("role","list"),p&&(c.className=p),l&&Object.entries(l).forEach(([d,u])=>{c.style[d]=typeof u=="number"?`${u}px`:u;}),t.appendChild(c);let f=new Map,m=(d,u)=>s?s(d,u):u,a=chunkWWEWRI6S_js.c(()=>{let d=r()||[],u=new Set;d.forEach((N,C)=>{let g=m(N,C);if(u.add(g),!f.has(g)){let[L,y]=chunkYEBBTVHG_js.k(C),h=i(N,()=>L()),b=n(h);if(b&&b instanceof HTMLElement){b.setAttribute("role","listitem"),c.appendChild(b),L.__setter=y;let j={item:N,key:g,node:b,indexSig:L,dispose:()=>{try{o(b);}catch{}}};f.set(g,j);}}});for(let[N,C]of f)u.has(N)||(C.dispose(),C.node.parentNode===c&&c.removeChild(C.node),f.delete(N));});return ()=>{a();for(let d of f.values())d.dispose();f.clear(),c.parentNode===t&&t.removeChild(c);}}function je(e,t,n,o){let{each:r,renderItem:i,height:s,width:p,itemSize:l,overscan:c,getKey:f,onScroll:m,onVisibleRangeChange:a}=e;if(!s||!l)return console.warn("List: height and itemSize are required when virtual is true"),()=>{};let d=document.createElement("div");d.style.height=typeof s=="number"?`${s}px`:s,d.style.width=p?typeof p=="number"?`${p}px`:p:"100%",d.style.overflow="auto",d.style.position="relative",d.setAttribute("role","list"),d.setAttribute("tabindex","0");let u=document.createElement("div");u.style.position="relative",u.style.width="100%";let[N,C]=chunkYEBBTVHG_js.k(0),g=new Map,L=-1,y=-1,h=()=>{C(d.scrollTop),m?.(d.scrollTop);};d.addEventListener("scroll",h,{passive:true});let b=(k,P)=>f?f(k,P):P,j=chunkWWEWRI6S_js.c(()=>{let k=r()||[],P=N(),B=d.clientHeight||parseFloat(String(s)),K=$e(l),{startIndex:z,endIndex:U,totalHeight:Re}=Ge(P,B,K,k.length,c);u.style.height=`${Re}px`,d.setAttribute("aria-rowcount",String(k.length)),(z!==L||U!==y)&&(a?.(z,U),L=z,y=U);let ge=new Set;for(let v=z;v<=U&&v<k.length;v++){let A=k[v],$=b(A,v);ge.add($);let D=g.get($),X=g.get($)?.state;if(X){let R=X.__setter;R&&R(A);}else {let[R,H]=chunkYEBBTVHG_js.k(A);X=R,X.__setter=H;}if(D){if(D.indexSig.peek()!==v){let Z=D.indexSig.__setter;if(Z)Z(v);else {let[E,he]=chunkYEBBTVHG_js.k(v);E.__setter=he,D.indexSig=E,he(v);}}let H=D.node;H.style.transform=`translateY(${v*K}px)`,H.setAttribute("aria-rowindex",String(v+1));}else {let[R,H]=chunkYEBBTVHG_js.k(v);R.__setter=H;let Z=i(A,()=>R()),E=n(Z);E&&E instanceof HTMLElement&&(E.style.position="absolute",E.style.top="0",E.style.left="0",E.style.right="0",E.style.transform=`translateY(${v*K}px)`,E.style.height=`${K}px`,E.style.boxSizing="border-box",E.setAttribute("role","listitem"),E.setAttribute("aria-rowindex",String(v+1)),u.appendChild(E),D={item:A,key:$,node:E,indexSig:R,dispose:()=>{try{o(E);}catch{}}},g.set($,D));}}for(let[v,A]of g)ge.has(v)||(A.dispose(),A.node.parentNode===u&&u.removeChild(A.node),g.delete(v));});return ()=>{j(),d.removeEventListener("scroll",h);for(let k of g.values())k.dispose();g.clear(),d.parentNode===t&&t.removeChild(d);}}var we=new WeakMap;function w(e){return we.get(e)}function I(e,t){we.set(e,t);}var G;(s=>{let e=[],t=[];function o(){if(e.length>0){let p=e.pop();return p.clear(),p}return new Map}s.getMap=o;function r(){if(t.length>0){let p=t.pop();return p.clear(),p}return new Set}s.getSet=r;function i(p,l){e.length<10&&e.push(p),t.length<10&&t.push(l);}s.release=i;})(G||(G={}));function te(e,t,n,o){let r=t&&t.length>0,i=n&&n.length>0;if(!r&&!i)return;if(!i){for(let a of t){let d=a&&w(a);d&&(T(d),x.removeChild(e,d));}return}if(!r){let a=document.createDocumentFragment();for(let d of n){let u=S(d,void 0);u&&(I(d,u),a.appendChild(u));}o?e.insertBefore(a,o):e.appendChild(a);return}let s=t.length,p=n.length,l=5;if(s<=l&&p<=l){let a=0,d=0,u=e.firstChild;for(;a<s||d<p;){if(d>=p){for(;a<s;){let y=t[a++],h=y&&w(y);h&&(T(h),x.removeChild(e,h));}break}if(a>=s){let y=document.createDocumentFragment();for(;d<p;){let h=n[d++],b=S(h,void 0);b&&(I(h,b),y.appendChild(b));}o?e.insertBefore(y,o):e.appendChild(y);break}let N=t[a],C=n[d],g=N.key??`__idx_${a}_${N.type}`,L=C.key??`__idx_${d}_${C.type}`;if(g===L&&N.type===C.type)ue(N,C),u=u?.nextSibling||null,a++,d++;else {let y=false;for(let h=a+1;h<s;h++){let b=t[h];if((b.key??`__idx_${h}_${b.type}`)===L&&b.type===C.type){for(let k=a;k<h;k++){let P=t[k],B=P&&w(P);B&&(T(B),x.removeChild(e,B));}ue(b,C),a=h+1,d++,y=true;break}}if(!y){let h=S(C,void 0);h&&(I(C,h),e.insertBefore(h,u)),d++;}}}return}let c=G.getMap(),f=G.getSet();for(let a=0;a<s;a++){let d=t[a],u=d.key??`__idx_${a}_${d.type}`;c.set(u,d);}let m=e.firstChild;for(let a=0;a<n.length;a++){let d=n[a],u=d.key??`__idx_${a}_${d.type}`;f.add(u);let N=c.get(u),C=m;if(!N||N.type!==d.type){let g=S(d,void 0);g&&(I(d,g),e.insertBefore(g,C));}else {ue(N,d);let g=w(d);g&&(m!==g?e.insertBefore(g,C):m=m?.nextSibling||null);}}for(let[a,d]of c){let u=w(d);!f.has(a)&&u&&(T(u),u.parentNode===e&&x.removeChild(e,u));}G.release(c,f);}function ue(e,t){let n=w(e);if(!n||(I(t,n),typeof t.type!="string"))return;x.updateNode(n,e.props,t.props);let o=e.children||[],r=t.children||[];if(!(o.length===0&&r.length===0)){if(r.length===1&&(typeof r[0]=="string"||typeof r[0]=="number")&&n.firstChild?.nodeType===Node.TEXT_NODE&&n.childNodes.length===1){let i=String(r[0]);String(o[0])!==i&&x.updateTextNode(n.firstChild,i);return}te(n,o,r,null);}}var W=new WeakMap,oe=new Set,me=false;function re(e){oe.add(e),me||(me=true,requestAnimationFrame(()=>{Ke();}));}function Ke(){if(me=false,oe.size===0)return;let e=Array.from(oe);oe.clear();for(let t=0;t<e.length;t++)e[t]();}function V(e,t){let n=W.get(e);n||(n=new Set,W.set(e,n)),n.add(t);}function S(e,t){if(e==null||typeof e=="boolean")return null;if(fe(e)){let n=t||document.createDocumentFragment(),o=pe(e,n,i=>S(i),T),r=document.createTextNode("");return V(r,o),t?n.firstChild:n}if(chunkYEBBTVHG_js.f(e)){let n=chunkYEBBTVHG_js.h(e);if(n){let o=document.createTextNode(""),r=t||document.createDocumentFragment();x.appendChild(r,o);let i=o,s=chunkWWEWRI6S_js.c(()=>{let p=n(),l=o.parentNode;if(l)if((typeof p=="string"||typeof p=="number")&&i&&i.nodeType===Node.TEXT_NODE&&i!==o){let c=i,f=String(p);re(()=>{x.updateTextNode(c,f);});}else {let c=S(p);if(c)if(i&&i!==o)if(i.parentNode===l)if(i.nodeType===Node.TEXT_NODE&&c.nodeType===Node.TEXT_NODE){let f=i,m=c.textContent||"";re(()=>{x.updateTextNode(f,m);});}else l.replaceChild(c,i),i=c;else l.insertBefore(c,o.nextSibling),i=c;else l.insertBefore(c,o.nextSibling),i=c;else {if(i&&i!==o&&i.parentNode===l)try{l.removeChild(i);}catch(f){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},f);}i=o;}}});return V(o,s),t?o:r}}if(chunkYEBBTVHG_js.g(e)||typeof e=="function"){let n=document.createTextNode(""),o=t||document.createDocumentFragment();x.appendChild(o,n);let r=[],i=null,s=[],p=chunkWWEWRI6S_js.c(()=>{let l=(chunkYEBBTVHG_js.g(e),e()),c=n.parentNode;if(c){if(Array.isArray(l)){let f=l.filter(m=>m!=null);if(s.length>0){let m=n.nextSibling;te(c,s,f,m);}else {for(let a of r)if(T(a),a.parentNode===c)try{c.removeChild(a);}catch(d){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},d);}r=[];let m=document.createDocumentFragment();for(let a of f){let d=S(a,m);d&&typeof a=="object"&&I(a,d);}r=Array.from(m.childNodes),c.insertBefore(m,n.nextSibling);}s=f,i=l;return}if(s.length>0){for(let f of s){let m=w(f);if(m&&m.parentNode===c){T(m);try{c.removeChild(m);}catch(a){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},a);}}}s=[];}if(l!==i){for(let f of r)if(T(f),f.parentNode===c)try{c.removeChild(f);}catch(m){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},m);}if(r=[],typeof l=="string"||typeof l=="number"){let f=x.createTextNode(String(l));c.insertBefore(f,n.nextSibling),r=[f];}else {let f=S(l);f&&(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(r=Array.from(f.childNodes),c.insertBefore(f,n.nextSibling)):(c.insertBefore(f,n.nextSibling),r=[f]));}i=l;}}});return V(n,p),t?n:o}if(Array.isArray(e)){let n=document.createDocumentFragment();for(let o of e)S(o,n);return t&&x.appendChild(t,n),n}if(typeof e=="string"||typeof e=="number"){let n=x.createTextNode(String(e));return t&&x.appendChild(t,n),n}if(chunkQ7IWDVJ4_js.c(e)){if(typeof e.type=="function"){let i=e.type,s=document.createTextNode(""),p=t||document.createDocumentFragment();x.appendChild(p,s);let l=[],c=[],f=chunkYEBBTVHG_js.c(),m=chunkWWEWRI6S_js.c(()=>{chunkYEBBTVHG_js.d(f),chunkGYDP6MFV_js.i(a=>{chunkWWEWRI6S_js.d(a);let d=i._contextId;d&&chunkDZ7L3SHV_js.c(d,e.props.value);let u;try{chunkYEBBTVHG_js.b(f);let y=e.children!==void 0?{...e.props,children:e.children}:e.props;u=i(y);}finally{chunkYEBBTVHG_js.b(null);}if(Array.isArray(u)&&u.every(y=>chunkQ7IWDVJ4_js.c(y)&&y.type!=="fragment")){let y=s.parentNode;if(y){let h=u;te(y,c,h,s.nextSibling),c=h,l=h.map(b=>w(b)).filter(b=>b!=null);return}}let g=s.parentNode;if(g){for(let y of l)if(T(y),y.parentNode===g)try{g.removeChild(y);}catch(h){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},h);}}l=[],c=[];let L=document.createDocumentFragment();S(u,L),g&&(l=Array.from(L.childNodes),g.insertBefore(L,s.nextSibling));});});return V(s,m),t?s:p}if(e.type==="fragment"){let i=document.createDocumentFragment();for(let s of e.children)S(s,i);return t&&x.appendChild(t,i),i}let n=x.createNode(e.type,e.props),o=ze(n,e.props);o.length>0&&W.set(n,new Set(o));for(let i of e.children)S(i,n);t&&x.appendChild(t,n);let r=e.props.ref;return r&&(typeof r=="function"?(r(n),V(n,()=>{r(null);})):typeof r=="object"&&"current"in r&&(r.current=n,V(n,()=>{r.current=null;}))),n}return null}var ne=Symbol("uninitialized");function ze(e,t){let n=[],o=[];for(let r in t){if(r.startsWith("on"))continue;let i=t[r];(chunkYEBBTVHG_js.g(i)||typeof i=="function")&&o.push([r,i]);}for(let[r,i]of o)if(chunkYEBBTVHG_js.f(i)){let s=ne,p=chunkWWEWRI6S_js.c(()=>{let l=i();if(l!==s){let c=s===ne?void 0:s;re(()=>{x.updateNode(e,{[r]:c},{[r]:l});}),s=l;}});n.push(p);}else {let s=ne,p=chunkWWEWRI6S_js.c(()=>{try{let l=i();if(l!==s){let c=s===ne?void 0:s;re(()=>{x.updateNode(e,{[r]:c},{[r]:l});}),s=l;}}catch(l){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"updateNode",prop:r},l);}});n.push(p);}return n}function T(e){let t=W.get(e);if(t&&(t.forEach(n=>n()),W.delete(e)),e.childNodes&&e.childNodes.length>0){let n=Array.from(e.childNodes);for(let o of n)T(o);}}function Ae(e){let t=null,n=null,o=null;return {render(r){let i=o===r;!i&&n&&(T(n),e.childNodes.length===1?e.removeChild(n):e.innerHTML="",n=null),t&&(t(),t=null),t=chunkWWEWRI6S_js.c(()=>{!i&&e.firstChild&&(e.childNodes.length===1?e.removeChild(e.firstChild):e.innerHTML=""),n=S(r,e),o=r;});},unmount(){t&&(t(),t=null),T(e),e.childNodes.length===1?e.removeChild(e.firstChild):e.innerHTML="",n=null,o=null;}}}function vt(e,t){return t.innerHTML="",S(e,t)}function Et(e){return Ae(e)}function _t(e){if(typeof document>"u")return null;let t=e.mount||document.body,n=document.createComment("portal"),o=null;return o=S(e.children,t),chunkWWEWRI6S_js.d(()=>{o&&(T(o),o.parentNode===t&&t.removeChild(o));}),n}
|
|
2
|
-
exports.a=le;exports.b=x;exports.c=ae;exports.d=fe;exports.e=S;exports.f=Ae;exports.g=vt;exports.h=Et;exports.i=_t;//# sourceMappingURL=chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
'use strict';var chunkDZ7L3SHV_js=require('./chunk-DZ7L3SHV.js'),chunkXJHWMHKF_js=require('./chunk-XJHWMHKF.js'),chunkQ7IWDVJ4_js=require('./chunk-Q7IWDVJ4.js'),chunkWWEWRI6S_js=require('./chunk-WWEWRI6S.js'),chunkGYDP6MFV_js=require('./chunk-GYDP6MFV.js');var Se=new Set,ve=new Set(["focus","blur","mouseenter","mouseleave","load","unload","scroll"]),Q=new WeakMap;function Fe(e){let t=e.type.toLowerCase(),n=!ve.has(t),o=e.composedPath?.()||[],r=e.target;if(o.length===0&&r)for(;r;)o.push(r),r=r.parentNode;for(let i of o){let s=i;if(s===document||!s)break;let p=Q.get(s);if(p?.has(t)){let l=p.get(t);if(l){try{l(e);}catch(c){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.EVENT_HANDLER_FAILED,{eventType:t},c);}if(e.cancelBubble)return}}if(!n)break}}function Me(e){if(!(typeof document>"u")&&!Se.has(e)){let t=ve.has(e);document.addEventListener(e,Fe,{capture:t}),Se.add(e);}}var de={on(e,t,n){let o=t.toLowerCase(),r=Q.get(e);r||(r=new Map,Q.set(e,r)),r.set(o,n),Me(o);},off(e,t){let n=t.toLowerCase(),o=Q.get(e);o&&o.delete(n);}};var J={width:{cssProp:"width",transform:"px"},height:{cssProp:"height",transform:"px"},flexDirection:{cssProp:"flexDirection",transform:"none"},justifyContent:{cssProp:"justifyContent",transform:"none"},alignItems:{cssProp:"alignItems",transform:"none"},alignSelf:{cssProp:"alignSelf",transform:"none"},flexWrap:{cssProp:"flexWrap",transform:"none"},flex:{cssProp:"flex",transform:"string"},gap:{cssProp:"gap",transform:"px"},justify:{cssProp:"justifyContent",transform:"none"},align:{cssProp:"alignItems",transform:"none"},bg:{cssProp:"backgroundColor",transform:"none"},color:{cssProp:"color",transform:"none"},borderRadius:{cssProp:"borderRadius",transform:"px"},borderWidth:{cssProp:"borderWidth",transform:"px",sideEffect:(e,t)=>{t!==void 0&&e.borderStyle!=="solid"&&(e.borderStyle="solid");}},borderColor:{cssProp:"borderColor",transform:"none"},opacity:{cssProp:"opacity",transform:"string"},fontSize:{cssProp:"fontSize",transform:"px"},fontWeight:{cssProp:"fontWeight",transform:"string"},fontFamily:{cssProp:"fontFamily",transform:"none"},lineHeight:{cssProp:"lineHeight",transform:"string"},textAlign:{cssProp:"textAlign",transform:"none"},padding:{cssProp:"padding",transform:"px"},paddingTop:{cssProp:"paddingTop",transform:"px"},paddingRight:{cssProp:"paddingRight",transform:"px"},paddingBottom:{cssProp:"paddingBottom",transform:"px"},paddingLeft:{cssProp:"paddingLeft",transform:"px"},margin:{cssProp:"margin",transform:"px"},marginTop:{cssProp:"marginTop",transform:"px"},marginRight:{cssProp:"marginRight",transform:"px"},marginBottom:{cssProp:"marginBottom",transform:"px"},marginLeft:{cssProp:"marginLeft",transform:"px"}},Ee={Row:"div",Column:"div",Stack:"div",Text:"span",Button:"button",Input:"input",Container:"div"},ee={onPress:"click",onHover:"mouseenter",onChange:"input",onFocus:"focus",onBlur:"blur"},Te=new Set(["children","key","ref","className","style","width","height","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","gap","flex","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","align","justify","bg","color","borderRadius","borderWidth","borderColor","opacity","fontSize","fontWeight","fontFamily","lineHeight","textAlign"]),Ie="http://www.w3.org/2000/svg",Pe=new Set(["svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","tspan","defs","use","symbol","marker","linearGradient","radialGradient","stop","clipPath","pattern","mask","filter"]),De={viewBox:"viewBox",preserveAspectRatio:"preserveAspectRatio",strokeWidth:"stroke-width",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",stopColor:"stop-color",stopOpacity:"stop-opacity",clipPath:"clip-path",markerEnd:"marker-end",markerStart:"marker-start",markerMid:"marker-mid"};function He(e){return typeof e=="number"?`${e}px`:e}var Le=new Map;function ke(e){let t=Le.get(e);return t===void 0&&(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Le.set(e,t)),t}function Oe(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Ve(e,t){if(e!=null)switch(t){case "px":return He(e);case "string":return String(e);case "none":default:return e}}function Be(e,t,n){let o=e.style,r=t.style,i=n.style;if(r!==i){if(r&&typeof r=="object")for(let c in r)(!i||!(c in i))&&o.setProperty(ke(c),"");if(i&&typeof i=="object")for(let c in i){let f=i[c];(!r||r[c]!==f)&&o.setProperty(ke(c),f);}}let s=e.getAttribute("data-flexium-type");(n.flexDirection||n.justifyContent||n.alignItems||n.flexWrap||n.gap!==void 0||n.justify||n.align||s==="Row"||s==="Column"||s==="Stack")&&(o.display!=="flex"&&(o.display="flex"),s==="Row"&&o.flexDirection!=="row"&&(o.flexDirection="row"),s==="Column"&&o.flexDirection!=="column"&&(o.flexDirection="column"));let l=o;for(let c in t)if(c in J&&!(c in n)){let f=J[c],m=f.cssProp,a=l[m];a!==void 0&&a!==""&&(l[m]=""),f.sideEffect&&f.sideEffect(o,void 0);}for(let c in n)if(c in J){let f=t[c],m=n[c];if(f===m)continue;let a=J[c],d=Ve(m,a.transform),u=a.cssProp,N=l[u];d===void 0?N!==void 0&&N!==""&&(l[u]=""):N!==d&&(l[u]=d),a.sideEffect&&a.sideEffect(o,d);}}function _e(e){if(typeof e=="string")return e;if(Array.isArray(e)){let t="";for(let n=0;n<e.length;n++){let o=e[n];if(!o)continue;let r=typeof o=="string"?o:_e(o);r&&(t=t?`${t} ${r}`:r);}return t}if(typeof e=="object"&&e!==null){let t="";for(let n in e)e[n]&&(t=t?`${t} ${n}`:n);return t}return ""}var le=class{createNode(t,n){let o=Ee[t]??t,r;return Pe.has(o)?r=document.createElementNS(Ie,o):r=document.createElement(o),Ee[t]&&r.setAttribute("data-flexium-type",t),this.updateNode(r,{},n),r}updateNode(t,n,o){if(o.className!==n.className){let i=_e(o.className);t instanceof SVGElement?t.setAttribute("class",i):t.className=i;}Be(t,n,o);for(let i in n)if(!(i in o)){if(typeof i=="symbol")continue;if(i.startsWith("on")){let s=ee[i]||i.slice(2).toLowerCase();this.removeEventListener(t,s,n[i]);}else Te.has(i)||t.removeAttribute(i);}let r=Reflect.ownKeys(o);for(let i of r){if(typeof i=="symbol")continue;let s=i,p=o[s],l=n[s];if(p!==l){if(s.startsWith("on")){let c=ee[s]||s.slice(2).toLowerCase();l&&this.removeEventListener(t,c,l),p&&this.addEventListener(t,c,p);}else if(!Te.has(s))if(p==null||p===false)t.removeAttribute(s);else if(p===true)t.setAttribute(s,"");else {let c=De[s]||s;t.setAttribute(c,Oe(String(p)));}}}}appendChild(t,n){t.appendChild(n);}insertBefore(t,n,o){t.insertBefore(n,o);}nextSibling(t){return t.nextSibling}removeChild(t,n){t.removeChild(n);}createTextNode(t){return document.createTextNode(t)}updateTextNode(t,n){t.textContent=n;}addEventListener(t,n,o){let r=ee[n]||n;de.on(t,r,o);}removeEventListener(t,n,o){let r=ee[n]||n;de.off(t,r);}},x=new le;var ae=Symbol("flexium.list");function fe(e){return e!==null&&typeof e=="object"&&ae in e&&e[ae]===true}function $e(e,t){return typeof e=="number"?e:e.mode==="fixed"?e.itemHeight:e.estimatedItemHeight}function Ge(e,t,n,o,r){let i=o*n;if(o===0)return {startIndex:0,endIndex:-1,totalHeight:0};let s=Math.floor(e/n),p=Math.ceil(t/n),l=s+p;return {startIndex:Math.max(0,s-r),endIndex:Math.min(o-1,l+r),totalHeight:i}}function pe(e,t,n,o){return e.virtual?je(e,t,n,o):We(e,t,n,o)}function We(e,t,n,o){let{each:r,renderItem:i,getKey:s,class:p,style:l}=e,c=document.createElement("div");c.setAttribute("role","list"),p&&(c.className=p),l&&Object.entries(l).forEach(([d,u])=>{c.style[d]=typeof u=="number"?`${u}px`:u;}),t.appendChild(c);let f=new Map,m=(d,u)=>s?s(d,u):u,a=chunkWWEWRI6S_js.c(()=>{let d=r()||[],u=new Set;d.forEach((N,C)=>{let g=m(N,C);if(u.add(g),!f.has(g)){let[L,y]=chunkXJHWMHKF_js.k(C),h=i(N,()=>L()),b=n(h);if(b&&b instanceof HTMLElement){b.setAttribute("role","listitem"),c.appendChild(b),L.__setter=y;let j={item:N,key:g,node:b,indexSig:L,dispose:()=>{try{o(b);}catch{}}};f.set(g,j);}}});for(let[N,C]of f)u.has(N)||(C.dispose(),C.node.parentNode===c&&c.removeChild(C.node),f.delete(N));});return ()=>{a();for(let d of f.values())d.dispose();f.clear(),c.parentNode===t&&t.removeChild(c);}}function je(e,t,n,o){let{each:r,renderItem:i,height:s,width:p,itemSize:l,overscan:c,getKey:f,onScroll:m,onVisibleRangeChange:a}=e;if(!s||!l)return console.warn("List: height and itemSize are required when virtual is true"),()=>{};let d=document.createElement("div");d.style.height=typeof s=="number"?`${s}px`:s,d.style.width=p?typeof p=="number"?`${p}px`:p:"100%",d.style.overflow="auto",d.style.position="relative",d.setAttribute("role","list"),d.setAttribute("tabindex","0");let u=document.createElement("div");u.style.position="relative",u.style.width="100%";let[N,C]=chunkXJHWMHKF_js.k(0),g=new Map,L=-1,y=-1,h=()=>{C(d.scrollTop),m?.(d.scrollTop);};d.addEventListener("scroll",h,{passive:true});let b=(k,P)=>f?f(k,P):P,j=chunkWWEWRI6S_js.c(()=>{let k=r()||[],P=N(),B=d.clientHeight||parseFloat(String(s)),K=$e(l),{startIndex:z,endIndex:U,totalHeight:Re}=Ge(P,B,K,k.length,c);u.style.height=`${Re}px`,d.setAttribute("aria-rowcount",String(k.length)),(z!==L||U!==y)&&(a?.(z,U),L=z,y=U);let ge=new Set;for(let v=z;v<=U&&v<k.length;v++){let A=k[v],$=b(A,v);ge.add($);let D=g.get($),X=g.get($)?.state;if(X){let R=X.__setter;R&&R(A);}else {let[R,H]=chunkXJHWMHKF_js.k(A);X=R,X.__setter=H;}if(D){if(D.indexSig.peek()!==v){let Z=D.indexSig.__setter;if(Z)Z(v);else {let[E,he]=chunkXJHWMHKF_js.k(v);E.__setter=he,D.indexSig=E,he(v);}}let H=D.node;H.style.transform=`translateY(${v*K}px)`,H.setAttribute("aria-rowindex",String(v+1));}else {let[R,H]=chunkXJHWMHKF_js.k(v);R.__setter=H;let Z=i(A,()=>R()),E=n(Z);E&&E instanceof HTMLElement&&(E.style.position="absolute",E.style.top="0",E.style.left="0",E.style.right="0",E.style.transform=`translateY(${v*K}px)`,E.style.height=`${K}px`,E.style.boxSizing="border-box",E.setAttribute("role","listitem"),E.setAttribute("aria-rowindex",String(v+1)),u.appendChild(E),D={item:A,key:$,node:E,indexSig:R,dispose:()=>{try{o(E);}catch{}}},g.set($,D));}}for(let[v,A]of g)ge.has(v)||(A.dispose(),A.node.parentNode===u&&u.removeChild(A.node),g.delete(v));});return ()=>{j(),d.removeEventListener("scroll",h);for(let k of g.values())k.dispose();g.clear(),d.parentNode===t&&t.removeChild(d);}}var we=new WeakMap;function w(e){return we.get(e)}function I(e,t){we.set(e,t);}var G;(s=>{let e=[],t=[];function o(){if(e.length>0){let p=e.pop();return p.clear(),p}return new Map}s.getMap=o;function r(){if(t.length>0){let p=t.pop();return p.clear(),p}return new Set}s.getSet=r;function i(p,l){e.length<10&&e.push(p),t.length<10&&t.push(l);}s.release=i;})(G||(G={}));function te(e,t,n,o){let r=t&&t.length>0,i=n&&n.length>0;if(!r&&!i)return;if(!i){for(let a of t){let d=a&&w(a);d&&(T(d),x.removeChild(e,d));}return}if(!r){let a=document.createDocumentFragment();for(let d of n){let u=S(d,void 0);u&&(I(d,u),a.appendChild(u));}o?e.insertBefore(a,o):e.appendChild(a);return}let s=t.length,p=n.length,l=5;if(s<=l&&p<=l){let a=0,d=0,u=e.firstChild;for(;a<s||d<p;){if(d>=p){for(;a<s;){let y=t[a++],h=y&&w(y);h&&(T(h),x.removeChild(e,h));}break}if(a>=s){let y=document.createDocumentFragment();for(;d<p;){let h=n[d++],b=S(h,void 0);b&&(I(h,b),y.appendChild(b));}o?e.insertBefore(y,o):e.appendChild(y);break}let N=t[a],C=n[d],g=N.key??`__idx_${a}_${N.type}`,L=C.key??`__idx_${d}_${C.type}`;if(g===L&&N.type===C.type)ue(N,C),u=u?.nextSibling||null,a++,d++;else {let y=false;for(let h=a+1;h<s;h++){let b=t[h];if((b.key??`__idx_${h}_${b.type}`)===L&&b.type===C.type){for(let k=a;k<h;k++){let P=t[k],B=P&&w(P);B&&(T(B),x.removeChild(e,B));}ue(b,C),a=h+1,d++,y=true;break}}if(!y){let h=S(C,void 0);h&&(I(C,h),e.insertBefore(h,u)),d++;}}}return}let c=G.getMap(),f=G.getSet();for(let a=0;a<s;a++){let d=t[a],u=d.key??`__idx_${a}_${d.type}`;c.set(u,d);}let m=e.firstChild;for(let a=0;a<n.length;a++){let d=n[a],u=d.key??`__idx_${a}_${d.type}`;f.add(u);let N=c.get(u),C=m;if(!N||N.type!==d.type){let g=S(d,void 0);g&&(I(d,g),e.insertBefore(g,C));}else {ue(N,d);let g=w(d);g&&(m!==g?e.insertBefore(g,C):m=m?.nextSibling||null);}}for(let[a,d]of c){let u=w(d);!f.has(a)&&u&&(T(u),u.parentNode===e&&x.removeChild(e,u));}G.release(c,f);}function ue(e,t){let n=w(e);if(!n||(I(t,n),typeof t.type!="string"))return;x.updateNode(n,e.props,t.props);let o=e.children||[],r=t.children||[];if(!(o.length===0&&r.length===0)){if(r.length===1&&(typeof r[0]=="string"||typeof r[0]=="number")&&n.firstChild?.nodeType===Node.TEXT_NODE&&n.childNodes.length===1){let i=String(r[0]);String(o[0])!==i&&x.updateTextNode(n.firstChild,i);return}te(n,o,r,null);}}var W=new WeakMap,oe=new Set,me=false;function re(e){oe.add(e),me||(me=true,requestAnimationFrame(()=>{Ke();}));}function Ke(){if(me=false,oe.size===0)return;let e=Array.from(oe);oe.clear();for(let t=0;t<e.length;t++)e[t]();}function V(e,t){let n=W.get(e);n||(n=new Set,W.set(e,n)),n.add(t);}function S(e,t){if(e==null||typeof e=="boolean")return null;if(fe(e)){let n=t||document.createDocumentFragment(),o=pe(e,n,i=>S(i),T),r=document.createTextNode("");return V(r,o),t?n.firstChild:n}if(chunkXJHWMHKF_js.f(e)){let n=chunkXJHWMHKF_js.h(e);if(n){let o=document.createTextNode(""),r=t||document.createDocumentFragment();x.appendChild(r,o);let i=o,s=chunkWWEWRI6S_js.c(()=>{let p=n(),l=o.parentNode;if(l)if((typeof p=="string"||typeof p=="number")&&i&&i.nodeType===Node.TEXT_NODE&&i!==o){let c=i,f=String(p);re(()=>{x.updateTextNode(c,f);});}else {let c=S(p);if(c)if(i&&i!==o)if(i.parentNode===l)if(i.nodeType===Node.TEXT_NODE&&c.nodeType===Node.TEXT_NODE){let f=i,m=c.textContent||"";re(()=>{x.updateTextNode(f,m);});}else l.replaceChild(c,i),i=c;else l.insertBefore(c,o.nextSibling),i=c;else l.insertBefore(c,o.nextSibling),i=c;else {if(i&&i!==o&&i.parentNode===l)try{l.removeChild(i);}catch(f){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},f);}i=o;}}});return V(o,s),t?o:r}}if(chunkXJHWMHKF_js.g(e)||typeof e=="function"){let n=document.createTextNode(""),o=t||document.createDocumentFragment();x.appendChild(o,n);let r=[],i=null,s=[],p=chunkWWEWRI6S_js.c(()=>{let l=(chunkXJHWMHKF_js.g(e),e()),c=n.parentNode;if(c){if(Array.isArray(l)){let f=l.filter(m=>m!=null);if(s.length>0){let m=n.nextSibling;te(c,s,f,m);}else {for(let a of r)if(T(a),a.parentNode===c)try{c.removeChild(a);}catch(d){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},d);}r=[];let m=document.createDocumentFragment();for(let a of f){let d=S(a,m);d&&typeof a=="object"&&I(a,d);}r=Array.from(m.childNodes),c.insertBefore(m,n.nextSibling);}s=f,i=l;return}if(s.length>0){for(let f of s){let m=w(f);if(m&&m.parentNode===c){T(m);try{c.removeChild(m);}catch(a){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},a);}}}s=[];}if(l!==i){for(let f of r)if(T(f),f.parentNode===c)try{c.removeChild(f);}catch(m){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},m);}if(r=[],typeof l=="string"||typeof l=="number"){let f=x.createTextNode(String(l));c.insertBefore(f,n.nextSibling),r=[f];}else {let f=S(l);f&&(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(r=Array.from(f.childNodes),c.insertBefore(f,n.nextSibling)):(c.insertBefore(f,n.nextSibling),r=[f]));}i=l;}}});return V(n,p),t?n:o}if(Array.isArray(e)){let n=document.createDocumentFragment();for(let o of e)S(o,n);return t&&x.appendChild(t,n),n}if(typeof e=="string"||typeof e=="number"){let n=x.createTextNode(String(e));return t&&x.appendChild(t,n),n}if(chunkQ7IWDVJ4_js.c(e)){if(typeof e.type=="function"){let i=e.type,s=document.createTextNode(""),p=t||document.createDocumentFragment();x.appendChild(p,s);let l=[],c=[],f=chunkXJHWMHKF_js.c(),m=chunkWWEWRI6S_js.c(()=>{chunkXJHWMHKF_js.d(f),chunkGYDP6MFV_js.i(a=>{chunkWWEWRI6S_js.d(a);let d=i._contextId;d&&chunkDZ7L3SHV_js.c(d,e.props.value);let u;try{chunkXJHWMHKF_js.b(f);let y=e.children!==void 0?{...e.props,children:e.children}:e.props;u=i(y);}finally{chunkXJHWMHKF_js.b(null);}if(Array.isArray(u)&&u.every(y=>chunkQ7IWDVJ4_js.c(y)&&y.type!=="fragment")){let y=s.parentNode;if(y){let h=u;te(y,c,h,s.nextSibling),c=h,l=h.map(b=>w(b)).filter(b=>b!=null);return}}let g=s.parentNode;if(g){for(let y of l)if(T(y),y.parentNode===g)try{g.removeChild(y);}catch(h){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"removeChild"},h);}}l=[],c=[];let L=document.createDocumentFragment();S(u,L),g&&(l=Array.from(L.childNodes),g.insertBefore(L,s.nextSibling));});});return V(s,m),t?s:p}if(e.type==="fragment"){let i=document.createDocumentFragment();for(let s of e.children)S(s,i);return t&&x.appendChild(t,i),i}let n=x.createNode(e.type,e.props),o=ze(n,e.props);o.length>0&&W.set(n,new Set(o));for(let i of e.children)S(i,n);t&&x.appendChild(t,n);let r=e.props.ref;return r&&(typeof r=="function"?(r(n),V(n,()=>{r(null);})):typeof r=="object"&&"current"in r&&(r.current=n,V(n,()=>{r.current=null;}))),n}return null}var ne=Symbol("uninitialized");function ze(e,t){let n=[],o=[];for(let r in t){if(r.startsWith("on"))continue;let i=t[r];(chunkXJHWMHKF_js.g(i)||typeof i=="function")&&o.push([r,i]);}for(let[r,i]of o)if(chunkXJHWMHKF_js.f(i)){let s=ne,p=chunkWWEWRI6S_js.c(()=>{let l=i();if(l!==s){let c=s===ne?void 0:s;re(()=>{x.updateNode(e,{[r]:c},{[r]:l});}),s=l;}});n.push(p);}else {let s=ne,p=chunkWWEWRI6S_js.c(()=>{try{let l=i();if(l!==s){let c=s===ne?void 0:s;re(()=>{x.updateNode(e,{[r]:c},{[r]:l});}),s=l;}}catch(l){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.DOM_CLEANUP_FAILED,{operation:"updateNode",prop:r},l);}});n.push(p);}return n}function T(e){let t=W.get(e);if(t&&(t.forEach(n=>n()),W.delete(e)),e.childNodes&&e.childNodes.length>0){let n=Array.from(e.childNodes);for(let o of n)T(o);}}function Ae(e){let t=null,n=null,o=null;return {render(r){let i=o===r;!i&&n&&(T(n),e.childNodes.length===1?e.removeChild(n):e.innerHTML="",n=null),t&&(t(),t=null),t=chunkWWEWRI6S_js.c(()=>{!i&&e.firstChild&&(e.childNodes.length===1?e.removeChild(e.firstChild):e.innerHTML=""),n=S(r,e),o=r;});},unmount(){t&&(t(),t=null),T(e),e.childNodes.length===1?e.removeChild(e.firstChild):e.innerHTML="",n=null,o=null;}}}function vt(e,t){return t.innerHTML="",S(e,t)}function Et(e){return Ae(e)}function _t(e){if(typeof document>"u")return null;let t=e.mount||document.body,n=document.createComment("portal"),o=null;return o=S(e.children,t),chunkWWEWRI6S_js.d(()=>{o&&(T(o),o.parentNode===t&&t.removeChild(o));}),n}
|
|
2
|
+
exports.a=le;exports.b=x;exports.c=ae;exports.d=fe;exports.e=S;exports.f=Ae;exports.g=vt;exports.h=Et;exports.i=_t;//# sourceMappingURL=chunk-5ICRQIS2.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-5ICRQIS2.js.map
|