@askrjs/askr 0.0.10 → 0.0.12

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.
Files changed (44) hide show
  1. package/dist/{chunk-LOSY3JCR.js → chunk-4YHYFQDP.js} +1 -1
  2. package/dist/{chunk-XKFPM4SY.js → chunk-76FYOA5Z.js} +1 -1
  3. package/dist/chunk-BP2CKUO6.js +1 -0
  4. package/dist/chunk-HGMOQ3I7.js +1 -0
  5. package/dist/chunk-HZKAD5DE.js +1 -0
  6. package/dist/chunk-P3C5XSNF.js +2 -0
  7. package/dist/chunk-XJFUFTFF.js +1 -0
  8. package/dist/{component-mtwBWhUr.d.ts → component-AJMg1Gmv.d.ts} +1 -1
  9. package/dist/for/index.d.ts +9 -7
  10. package/dist/for/index.js +1 -1
  11. package/dist/foundations/index.d.ts +668 -5
  12. package/dist/foundations/index.js +1 -1
  13. package/dist/fx/index.js +1 -1
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.js +1 -1
  16. package/dist/{jsx-CSWf4VFg.d.ts → jsx-CPjsGyEg.d.ts} +1 -1
  17. package/dist/jsx-dev-runtime.d.ts +3 -8
  18. package/dist/jsx-dev-runtime.js +1 -1
  19. package/dist/jsx-runtime.d.ts +3 -3
  20. package/dist/jsx-runtime.js +1 -1
  21. package/dist/logger-NGZDJLVS.js +1 -0
  22. package/dist/navigate-L6D2UGE2.js +1 -0
  23. package/dist/resources/index.d.ts +2 -2
  24. package/dist/resources/index.js +1 -1
  25. package/dist/{route-4QZ3RYN5.js → route-6SM7I3UO.js} +1 -1
  26. package/dist/router/index.js +1 -1
  27. package/dist/ssr/index.d.ts +1 -1
  28. package/dist/ssr/index.js +1 -1
  29. package/dist/{types-DxdosFWx.d.ts → types-BTT0Fc9S.d.ts} +1 -1
  30. package/package.json +1 -9
  31. package/dist/chunk-534P7OMI.js +0 -2
  32. package/dist/chunk-CI6AOGB5.js +0 -1
  33. package/dist/chunk-DPHQ4JD6.js +0 -1
  34. package/dist/chunk-FFSNBDHN.js +0 -1
  35. package/dist/chunk-JJDSOK6C.js +0 -1
  36. package/dist/chunk-OQMK7H2R.js +0 -1
  37. package/dist/chunk-Q7GRUZHR.js +0 -1
  38. package/dist/chunk-Y3Q3LOFT.js +0 -1
  39. package/dist/foundations/core.d.ts +0 -449
  40. package/dist/foundations/core.js +0 -1
  41. package/dist/foundations/structures.d.ts +0 -223
  42. package/dist/foundations/structures.js +0 -1
  43. package/dist/logger-MPMIVXAP.js +0 -1
  44. package/dist/navigate-6CC6IXXF.js +0 -1
@@ -1 +1 @@
1
- import {l,n,a,e,b}from'./chunk-534P7OMI.js';function C(l$1){let e=l();if(!e)throw new Error("state() can only be called during component render execution. Move state() calls to the top level of your component function.");let t=n(),s=e.stateValues;if(t<e.stateIndexCheck)throw new Error(`State index violation: state() call at index ${t}, but previously saw index ${e.stateIndexCheck}. This happens when state() is called conditionally (inside if/for/etc). Move all state() calls to the top level of your component function, before any conditionals.`);if(a(t>=e.stateIndexCheck,"[State] State indices must increase monotonically"),e.stateIndexCheck=t,e.firstRenderComplete){if(!e.expectedStateIndices.includes(t))throw new Error(`Hook order violation: state() called at index ${t}, but this index was not in the first render's sequence [${e.expectedStateIndices.join(", ")}]. This usually means state() is inside a conditional or loop. Move all state() calls to the top level of your component function.`)}else e.expectedStateIndices.push(t);if(s[t]){let n=s[t];if(n._owner!==e)throw new Error(`State ownership violation: state() called at index ${t} is owned by a different component instance. State ownership is positional and immutable.`);return n}let o=S(l$1,e);return s[t]=o,o}function S(l$1,e$1){let t=l$1,s=new Map;function o(){o._hasBeenRead=true;let n=l();return n&&n._currentRenderToken!==void 0&&(n._pendingReadStates||(n._pendingReadStates=new Set),n._pendingReadStates.add(o)),t}return o._readers=s,o._owner=e$1,o.set=n=>{if(l()!==null)throw new Error("[Askr] state.set() cannot be called during component render. State mutations during render break the actor model and cause infinite loops. Move state updates to event handlers or use conditional rendering instead.");let r;if(typeof n=="function"?r=n(t):r=n,Object.is(t,r))return;if(e()){t=r;return}t=r;let c=o._readers;if(c){for(let[a,m]of c)if(a.lastRenderToken===m&&!a.hasPendingUpdate){a.hasPendingUpdate=true;let p=a._pendingFlushTask;p?b.enqueue(p):b.enqueue(()=>{a.hasPendingUpdate=false,a.notifyUpdate?.();});}}let u=c?.get(e$1);if(u!==void 0&&e$1.lastRenderToken===u&&!e$1.hasPendingUpdate){e$1.hasPendingUpdate=true;let a=e$1._pendingFlushTask;a?b.enqueue(a):b.enqueue(()=>{e$1.hasPendingUpdate=false,e$1.notifyUpdate?.();});}},o}export{C as a};
1
+ import {l,n,a,e,b}from'./chunk-P3C5XSNF.js';function C(l$1){let e=l();if(!e)throw new Error("state() can only be called during component render execution. Move state() calls to the top level of your component function.");let t=n(),s=e.stateValues;if(t<e.stateIndexCheck)throw new Error(`State index violation: state() call at index ${t}, but previously saw index ${e.stateIndexCheck}. This happens when state() is called conditionally (inside if/for/etc). Move all state() calls to the top level of your component function, before any conditionals.`);if(a(t>=e.stateIndexCheck,"[State] State indices must increase monotonically"),e.stateIndexCheck=t,e.firstRenderComplete){if(!e.expectedStateIndices.includes(t))throw new Error(`Hook order violation: state() called at index ${t}, but this index was not in the first render's sequence [${e.expectedStateIndices.join(", ")}]. This usually means state() is inside a conditional or loop. Move all state() calls to the top level of your component function.`)}else e.expectedStateIndices.push(t);if(s[t]){let n=s[t];if(n._owner!==e)throw new Error(`State ownership violation: state() called at index ${t} is owned by a different component instance. State ownership is positional and immutable.`);return n}let o=S(l$1,e);return s[t]=o,o}function S(l$1,e$1){let t=l$1,s=new Map;function o(){o._hasBeenRead=true;let n=l();return n&&n._currentRenderToken!==void 0&&(n._pendingReadStates||(n._pendingReadStates=new Set),n._pendingReadStates.add(o)),t}return o._readers=s,o._owner=e$1,o.set=n=>{if(l()!==null)throw new Error("[Askr] state.set() cannot be called during component render. State mutations during render break the actor model and cause infinite loops. Move state updates to event handlers or use conditional rendering instead.");let r;if(typeof n=="function"?r=n(t):r=n,Object.is(t,r))return;if(e()){t=r;return}t=r;let c=o._readers;if(c){for(let[a,m]of c)if(a.lastRenderToken===m&&!a.hasPendingUpdate){a.hasPendingUpdate=true;let p=a._pendingFlushTask;p?b.enqueue(p):b.enqueue(()=>{a.hasPendingUpdate=false,a.notifyUpdate?.();});}}let u=c?.get(e$1);if(u!==void 0&&e$1.lastRenderToken===u&&!e$1.hasPendingUpdate){e$1.hasPendingUpdate=true;let a=e$1._pendingFlushTask;a?b.enqueue(a):b.enqueue(()=>{e$1.hasPendingUpdate=false,e$1.notifyUpdate?.();});}},o}export{C as a};
@@ -1,2 +1,2 @@
1
- import {a}from'./chunk-D2JSJKCW.js';import {j as j$1}from'./chunk-534P7OMI.js';import {c}from'./chunk-62D2TNHX.js';var q={};c(q,{_lockRouteRegistrationForTests:()=>T,_unlockRouteRegistrationForTests:()=>U,clearRoutes:()=>C,getLoadedNamespaces:()=>F,getNamespaceRoutes:()=>Q,getRoutes:()=>W,lockRouteRegistration:()=>L,registerRoute:()=>_,resolveRoute:()=>J,route:()=>S,setServerLocation:()=>O,unloadNamespace:()=>j});function h(e,r){let o=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e,i=r.endsWith("/")&&r!=="/"?r.slice(0,-1):r,t=o.split("/").filter(Boolean),n=i.split("/").filter(Boolean);if(n.length===1&&n[0]==="*")return {matched:true,params:{"*":t.length>1?o:t[0]}};if(t.length!==n.length)return {matched:false,params:{}};let s={};for(let a=0;a<n.length;a++){let c=n[a],u=t[a];if(c.startsWith("{")&&c.endsWith("}")){let f=c.slice(1,-1);s[f]=decodeURIComponent(u);}else if(c==="*")s["*"]=u;else if(c!==u)return {matched:false,params:{}}}return {matched:true,params:s}}var l=[],g=new Set,P=Symbol.for("__ASKR_HAS_ROUTES__");function b(e){try{let r=globalThis;r[P]=e;}catch{}}b(false);var p=new Map;function z(e){let r=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;return r==="/"?0:r.split("/").filter(Boolean).length}function v(e){let r=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;if(r==="/*")return 0;let o=r.split("/").filter(Boolean),i=0;for(let t of o)t.startsWith("{")&&t.endsWith("}")?i+=2:t==="*"?i+=1:i+=3;return i}var w=null;function O(e){w=e;}function M(e){try{let r=new URL(e,"http://localhost");return {pathname:r.pathname,search:r.search,hash:r.hash}}catch{return {pathname:"/",search:"",hash:""}}}function m(e){if(e&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let r of Object.keys(e)){let o=e[r];o&&typeof o=="object"&&m(o);}}return e}function N(e){let r=new URLSearchParams(e||""),o=new Map;for(let[t,n]of r.entries()){let s=o.get(t);s?s.push(n):o.set(t,[n]);}return m({get(t){let n=o.get(t);return n?n[0]:null},getAll(t){let n=o.get(t);return n?[...n]:[]},has(t){return o.has(t)},toJSON(){let t={};for(let[n,s]of o.entries())t[n]=s.length>1?[...s]:s[0];return t}})}function B(e){let r=W(),o=[];function i(t){let n=t.endsWith("/")&&t!=="/"?t.slice(0,-1):t;if(n==="/*")return 0;let s=n.split("/").filter(Boolean),a=0;for(let c of s)c.startsWith("{")&&c.endsWith("}")?a+=2:c==="*"?a+=1:a+=3;return a}for(let t of r){let n=h(e,t.path);n.matched&&o.push({pattern:t.path,params:n.params,name:t.name,namespace:t.namespace,specificity:i(t.path)});}return o.sort((t,n)=>n.specificity-t.specificity),o.map(t=>({path:t.pattern,params:m({...t.params}),name:t.name,namespace:t.namespace}))}var d=false;function L(){d=true;}function T(){d=true;}function U(){d=false;}function S(e,r,o){if(a()==="islands")throw new Error("Routes are not supported with islands. Use createSPA (client) or createSSR (server) instead.");if(typeof e>"u"){let a=j$1();if(!a)throw new Error("route() can only be called during component render execution. Call route() from inside your component function.");let c="/",u="",f="";if(typeof window<"u"&&window.location)c=window.location.pathname||"/",u=window.location.search||"",f=window.location.hash||"";else if(w){let R=M(w);c=R.pathname,u=R.search,f=R.hash;}let A=m({...a.props||{}}),D=N(u),E=B(c);return Object.freeze({path:c,params:A,query:D,hash:f||null,matches:Object.freeze(E)})}let i=j$1();if(i&&i.ssr)throw new Error("route() cannot be called during SSR rendering. Register routes at module load time instead.");if(d)throw new Error("Route registration is locked after app startup. Register routes at module load time before calling createSPA or createSSR.");if(typeof r!="function")throw new Error("route(path, handler) requires a function handler that returns a VNode (e.g. () => <Page />). Passing JSX elements or VNodes directly is not supported.");let t={path:e,handler:r,namespace:o};l.push(t),b(true);let n=z(e),s=p.get(n);s||(s=[],p.set(n,s)),s.push(t),o&&g.add(o);}function W(){return [...l]}function Q(e){return l.filter(r=>r.namespace===e)}function j(e){let r=l.length;for(let o=l.length-1;o>=0;o--)if(l[o].namespace===e){let i=l[o];l.splice(o,1);let t=z(i.path),n=p.get(t);if(n){let s=n.indexOf(i);s>=0&&n.splice(s,1);}}return g.delete(e),r-l.length}function C(){l.length=0,g.clear(),p.clear(),d=false,b(false);}function k(e){if(e!=null&&typeof e=="function")return (r,o)=>{try{return e(r,o)}catch{return e(r)}}}function _(e,r,...o){let i=!e.startsWith("/"),t={path:e,handler:r,children:o.filter(Boolean),_isDescriptor:true};if(!i){let n=k(r);if(r!=null&&!n)throw new Error("registerRoute(path, handler) requires a function handler. Passing JSX elements or VNodes directly is not supported.");n&&S(e,n);for(let s of t.children||[]){let c=`${e==="/"?"":e.replace(/\/$/,"")}/${s.path.replace(/^\//,"")}`.replace(/\/\//g,"/");if(s.handler){let u=k(s.handler);if(!u)throw new Error("registerRoute child handler must be a function. Passing JSX elements directly is not supported.");u&&S(c,u);}s.children&&s.children.length&&_(c,null,...s.children);}return t}return t}function F(){return Array.from(g)}function J(e){let r=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e,o=r==="/"?0:r.split("/").filter(Boolean).length,i=[],t=p.get(o);if(t)for(let n of t){let s=h(e,n.path);s.matched&&i.push({route:n,specificity:v(n.path),params:s.params});}for(let n of l){if(t?.includes(n))continue;let s=h(e,n.path);s.matched&&i.push({route:n,specificity:v(n.path),params:s.params});}if(i.sort((n,s)=>s.specificity-n.specificity),i.length>0){let n=i[0];return {handler:n.route.handler,params:n.params}}return null}
1
+ import {a}from'./chunk-D2JSJKCW.js';import {j as j$1}from'./chunk-P3C5XSNF.js';import {c}from'./chunk-62D2TNHX.js';var q={};c(q,{_lockRouteRegistrationForTests:()=>T,_unlockRouteRegistrationForTests:()=>U,clearRoutes:()=>C,getLoadedNamespaces:()=>F,getNamespaceRoutes:()=>Q,getRoutes:()=>W,lockRouteRegistration:()=>L,registerRoute:()=>_,resolveRoute:()=>J,route:()=>S,setServerLocation:()=>O,unloadNamespace:()=>j});function h(e,r){let o=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e,i=r.endsWith("/")&&r!=="/"?r.slice(0,-1):r,t=o.split("/").filter(Boolean),n=i.split("/").filter(Boolean);if(n.length===1&&n[0]==="*")return {matched:true,params:{"*":t.length>1?o:t[0]}};if(t.length!==n.length)return {matched:false,params:{}};let s={};for(let a=0;a<n.length;a++){let c=n[a],u=t[a];if(c.startsWith("{")&&c.endsWith("}")){let f=c.slice(1,-1);s[f]=decodeURIComponent(u);}else if(c==="*")s["*"]=u;else if(c!==u)return {matched:false,params:{}}}return {matched:true,params:s}}var l=[],g=new Set,P=Symbol.for("__ASKR_HAS_ROUTES__");function b(e){try{let r=globalThis;r[P]=e;}catch{}}b(false);var p=new Map;function z(e){let r=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;return r==="/"?0:r.split("/").filter(Boolean).length}function v(e){let r=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;if(r==="/*")return 0;let o=r.split("/").filter(Boolean),i=0;for(let t of o)t.startsWith("{")&&t.endsWith("}")?i+=2:t==="*"?i+=1:i+=3;return i}var w=null;function O(e){w=e;}function M(e){try{let r=new URL(e,"http://localhost");return {pathname:r.pathname,search:r.search,hash:r.hash}}catch{return {pathname:"/",search:"",hash:""}}}function m(e){if(e&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let r of Object.keys(e)){let o=e[r];o&&typeof o=="object"&&m(o);}}return e}function N(e){let r=new URLSearchParams(e||""),o=new Map;for(let[t,n]of r.entries()){let s=o.get(t);s?s.push(n):o.set(t,[n]);}return m({get(t){let n=o.get(t);return n?n[0]:null},getAll(t){let n=o.get(t);return n?[...n]:[]},has(t){return o.has(t)},toJSON(){let t={};for(let[n,s]of o.entries())t[n]=s.length>1?[...s]:s[0];return t}})}function B(e){let r=W(),o=[];function i(t){let n=t.endsWith("/")&&t!=="/"?t.slice(0,-1):t;if(n==="/*")return 0;let s=n.split("/").filter(Boolean),a=0;for(let c of s)c.startsWith("{")&&c.endsWith("}")?a+=2:c==="*"?a+=1:a+=3;return a}for(let t of r){let n=h(e,t.path);n.matched&&o.push({pattern:t.path,params:n.params,name:t.name,namespace:t.namespace,specificity:i(t.path)});}return o.sort((t,n)=>n.specificity-t.specificity),o.map(t=>({path:t.pattern,params:m({...t.params}),name:t.name,namespace:t.namespace}))}var d=false;function L(){d=true;}function T(){d=true;}function U(){d=false;}function S(e,r,o){if(a()==="islands")throw new Error("Routes are not supported with islands. Use createSPA (client) or createSSR (server) instead.");if(typeof e>"u"){let a=j$1();if(!a)throw new Error("route() can only be called during component render execution. Call route() from inside your component function.");let c="/",u="",f="";if(typeof window<"u"&&window.location)c=window.location.pathname||"/",u=window.location.search||"",f=window.location.hash||"";else if(w){let R=M(w);c=R.pathname,u=R.search,f=R.hash;}let A=m({...a.props||{}}),D=N(u),E=B(c);return Object.freeze({path:c,params:A,query:D,hash:f||null,matches:Object.freeze(E)})}let i=j$1();if(i&&i.ssr)throw new Error("route() cannot be called during SSR rendering. Register routes at module load time instead.");if(d)throw new Error("Route registration is locked after app startup. Register routes at module load time before calling createSPA or createSSR.");if(typeof r!="function")throw new Error("route(path, handler) requires a function handler that returns a VNode (e.g. () => <Page />). Passing JSX elements or VNodes directly is not supported.");let t={path:e,handler:r,namespace:o};l.push(t),b(true);let n=z(e),s=p.get(n);s||(s=[],p.set(n,s)),s.push(t),o&&g.add(o);}function W(){return [...l]}function Q(e){return l.filter(r=>r.namespace===e)}function j(e){let r=l.length;for(let o=l.length-1;o>=0;o--)if(l[o].namespace===e){let i=l[o];l.splice(o,1);let t=z(i.path),n=p.get(t);if(n){let s=n.indexOf(i);s>=0&&n.splice(s,1);}}return g.delete(e),r-l.length}function C(){l.length=0,g.clear(),p.clear(),d=false,b(false);}function k(e){if(e!=null&&typeof e=="function")return (r,o)=>{try{return e(r,o)}catch{return e(r)}}}function _(e,r,...o){let i=!e.startsWith("/"),t={path:e,handler:r,children:o.filter(Boolean),_isDescriptor:true};if(!i){let n=k(r);if(r!=null&&!n)throw new Error("registerRoute(path, handler) requires a function handler. Passing JSX elements or VNodes directly is not supported.");n&&S(e,n);for(let s of t.children||[]){let c=`${e==="/"?"":e.replace(/\/$/,"")}/${s.path.replace(/^\//,"")}`.replace(/\/\//g,"/");if(s.handler){let u=k(s.handler);if(!u)throw new Error("registerRoute child handler must be a function. Passing JSX elements directly is not supported.");u&&S(c,u);}s.children&&s.children.length&&_(c,null,...s.children);}return t}return t}function F(){return Array.from(g)}function J(e){let r=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e,o=r==="/"?0:r.split("/").filter(Boolean).length,i=[],t=p.get(o);if(t)for(let n of t){let s=h(e,n.path);s.matched&&i.push({route:n,specificity:v(n.path),params:s.params});}for(let n of l){if(t?.includes(n))continue;let s=h(e,n.path);s.matched&&i.push({route:n,specificity:v(n.path),params:s.params});}if(i.sort((n,s)=>s.specificity-n.specificity),i.length>0){let n=i[0];return {handler:n.route.handler,params:n.params}}return null}
2
2
  export{O as a,L as b,T as c,U as d,S as e,W as f,Q as g,j as h,C as i,_ as j,F as k,J as l,q as m};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-37RC6ZT3.js';function e(n,r,o){return {$$typeof:a,type:n,props:r??{},key:o??null}}function s(n,r,o){return e(n,r,o)}function m(n,r,o){return e(n,r,o)}export{e as a,s as b,m as c};
@@ -0,0 +1 @@
1
+ function o(n,u){let r=typeof console<"u"?console:void 0;if(!r)return;let e=r[n];if(typeof e=="function")try{e.apply(console,u);}catch{}}var c={debug:(...n)=>{},info:(...n)=>{},warn:(...n)=>{},error:(...n)=>{o("error",n);}};export{c as a};
@@ -0,0 +1 @@
1
+ function P(e){return typeof e=="object"&&e!==null&&"defaultPrevented"in e&&e.defaultPrevented===true}function u(e,n,r){if(!e&&!n)return m;if(!e)return n;if(!n)return e;let o=r?.checkDefaultPrevented!==false;return function(...a){e(...a),!(o&&P(a[0]))&&n(...a);}}function m(){}function g(e){return e.startsWith("on")}function l(e,n){let r=Object.keys(e);if(r.length===0)return n;let o={...n};for(let t of r){let a=e[t],i=n[t];if(g(t)&&typeof a=="function"&&typeof i=="function"){o[t]=u(i,a);continue}o[t]=a;}return o}function c(e){return e?{"aria-disabled":"true"}:{}}function D(e){return e===void 0?{}:{"aria-expanded":String(e)}}function I(e){return e===void 0?{}:{"aria-selected":String(e)}}function x(e,n){if(e){if(typeof e=="function"){e(n);return}try{e.current=n;}catch{}}}function k(...e){return n=>{for(let r of e)x(r,n);}}function y({disabled:e,onPress:n,isNativeButton:r=false}){let o={onClick:t=>{if(e){t.preventDefault?.(),t.stopPropagation?.();return}n?.(t);}};return r?(e&&(o.disabled=true,Object.assign(o,c(e))),o):(o.role="button",o.tabIndex=e?-1:0,o.onKeyDown=t=>{if(e){t.preventDefault?.(),t.stopPropagation?.();return}if(t.key==="Enter"){t.preventDefault?.(),n?.(t);return}t.key===" "&&t.preventDefault?.();},o.onKeyUp=t=>{if(e){t.preventDefault?.(),t.stopPropagation?.();return}t.key===" "&&(t.preventDefault?.(),n?.(t));},e&&Object.assign(o,c(e)),o)}function L({isNative:e,disabled:n,onPress:r,ref:o}){function t(i){if(n){i.preventDefault?.();return}r?.(i);}if(e)return {disabled:n||void 0,onClick:i=>t(i),ref:o};let a=y({disabled:n,isNativeButton:false,onPress:i=>t(i)});return {...a,"aria-disabled":n||void 0,tabIndex:n?-1:a.tabIndex??0,ref:o}}function S(e,n,r){let o=l(e,n);r&&(o=l(o,r));for(let s in o){if(!s.startsWith("on"))continue;let d=n?.[s],p=r?.[s],v=e?.[s];if(d||p||v){let f=b=>typeof b=="function"?b:void 0;o[s]=u(f(d),u(f(p),f(v)));}}let t=e?.ref,a=r?.ref,i=n?.ref;return o.ref=k(t,a,i),o}function N(e){return (n,r)=>{let o={...r,children:n};return e(o)}}export{u as a,l as b,c,D as d,I as e,x as f,k as g,y as h,L as i,S as j,N as k};
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-HGMOQ3I7.js';import {b as b$1}from'./chunk-37RC6ZT3.js';function se(e,n,t){if(!e){let r=t?`
2
+ `+JSON.stringify(t,null,2):"";throw new Error(`[Askr Invariant] ${n}${r}`)}}function Se(e,n){se(e,`[Scheduler Precondition] ${n}`);}function X(){try{let e=globalThis.__ASKR_FASTLANE;return typeof e?.isBulkCommitActive=="function"?!!e.isBulkCommitActive():!1}catch(e){return false}}var ae=class{constructor(){this.q=[];this.head=0;this.running=false;this.inHandler=false;this.depth=0;this.executionDepth=0;this.flushVersion=0;this.kickScheduled=false;this.allowSyncProgress=false;this.waiters=[];this.taskCount=0;}enqueue(n){Se(typeof n=="function","enqueue() requires a function"),!(X()&&!this.allowSyncProgress)&&(this.q.push(n),this.taskCount++,!this.running&&!this.kickScheduled&&!this.inHandler&&!X()&&(this.kickScheduled=true,queueMicrotask(()=>{if(this.kickScheduled=false,!this.running&&!X())try{this.flush();}catch(t){setTimeout(()=>{throw t});}})));}flush(){se(!this.running,"[Scheduler] flush() called while already running"),this.running=true,this.depth=0;let n=null;try{for(;this.head<this.q.length;){this.depth++;let t=this.q[this.head++];try{this.executionDepth++,t(),this.executionDepth--;}catch(r){this.executionDepth>0&&(this.executionDepth=0),n=r;break}this.taskCount>0&&this.taskCount--;}}finally{if(this.running=false,this.depth=0,this.executionDepth=0,this.head>=this.q.length)this.q.length=0,this.head=0;else if(this.head>0){let t=this.q.length-this.head;for(let r=0;r<t;r++)this.q[r]=this.q[this.head+r];this.q.length=t,this.head=0;}this.flushVersion++,this.resolveWaiters();}if(n)throw n}runWithSyncProgress(n){let t=this.allowSyncProgress;this.allowSyncProgress=true;let s=this.flushVersion;try{let a=n();return !this.running&&this.q.length-this.head>0&&this.flush(),a}finally{try{this.flushVersion===s&&(this.flushVersion++,this.resolveWaiters());}catch(a){}this.allowSyncProgress=t;}}waitForFlush(n,t=2e3){let r=typeof n=="number"?n:this.flushVersion+1;return this.flushVersion>=r?Promise.resolve():new Promise((o,i)=>{let s=setTimeout(()=>{let a=globalThis.__ASKR__||{},l={flushVersion:this.flushVersion,queueLen:this.q.length-this.head,running:this.running,inHandler:this.inHandler,bulk:X(),namespace:a};i(new Error(`waitForFlush timeout ${t}ms: ${JSON.stringify(l)}`));},t);this.waiters.push({target:r,resolve:o,reject:i,timer:s});})}getState(){return {queueLength:this.q.length-this.head,running:this.running,depth:this.depth,executionDepth:this.executionDepth,taskCount:this.taskCount,flushVersion:this.flushVersion,inHandler:this.inHandler,allowSyncProgress:this.allowSyncProgress}}setInHandler(n){this.inHandler=n;}isInHandler(){return this.inHandler}isExecuting(){return this.running||this.executionDepth>0}clearPendingSyncTasks(){let n=this.q.length-this.head;return n<=0?0:this.running?(this.q.length=this.head,this.taskCount=Math.max(0,this.taskCount-n),queueMicrotask(()=>{try{this.flushVersion++,this.resolveWaiters();}catch(t){}}),n):(this.q.length=0,this.head=0,this.taskCount=Math.max(0,this.taskCount-n),this.flushVersion++,this.resolveWaiters(),n)}resolveWaiters(){if(this.waiters.length===0)return;let n=[],t=[];for(let r of this.waiters)this.flushVersion>=r.target?(r.timer&&clearTimeout(r.timer),n.push(r.resolve)):t.push(r);this.waiters=t;for(let r of n)r();}},A=new ae;function be(){return A.isExecuting()}var Ae=Symbol("__tempoContextFrame__"),z=null;function K(e,n){let t=z;z=e;try{return n()}finally{z=t;}}function St(e,n){try{return n()}finally{}}function ke(){return z}function Te(){try{let e=globalThis;return e.__ASKR_DIAG||(e.__ASKR_DIAG={}),e.__ASKR_DIAG}catch(e){return {}}}function S(e,n){try{let t=Te();t[e]=n;try{let r=globalThis;try{let o=r.__ASKR__||(r.__ASKR__={});try{o[e]=n;}catch(i){}}catch(o){}}catch(r){}}catch(t){}}function k(e){try{let n=Te(),r=(typeof n[e]=="number"?n[e]:0)+1;n[e]=r;try{let o=globalThis,i=o.__ASKR__||(o.__ASKR__={});try{let s=typeof i[e]=="number"?i[e]:0;i[e]=s+1;}catch(s){}}catch(o){}}catch(n){}}function V(e){return !e.startsWith("on")||e.length<=2?null:e.slice(2).charAt(0).toLowerCase()+e.slice(3).toLowerCase()}function H(e){if(e==="wheel"||e==="scroll"||e.startsWith("touch"))return {passive:true}}function U(e,n=false){return t=>{A.setInHandler(true);try{e(t);}catch(r){a.error("[Askr] Event handler error:",r);}finally{if(A.setInHandler(false),n){let r=A.getState();(r.queueLength??0)>0&&!r.running&&queueMicrotask(()=>{try{A.isExecuting()||A.flush();}catch(o){queueMicrotask(()=>{throw o});}});}}}}function ue(e){return e==="children"||e==="key"||e==="ref"}function J(e){return !!(e==="children"||e==="key"||e.startsWith("on")&&e.length>2||e.startsWith("data-"))}function ce(e,n,t){try{if(n==="class"||n==="className")return e.className!==String(t);if(n==="value"||n==="checked")return e[n]!==t;let r=e.getAttribute(n);return t==null||t===!1?r!==null:String(t)!==r}catch{return true}}function Ce(e){for(let n of Object.keys(e))if(!J(n))return true;return false}function ve(e,n){for(let t of Object.keys(n))if(!J(t)&&ce(e,t,n[t]))return true;return false}function R(e){if(typeof e!="object"||e===null)return;let n=e,t=n.key??n.props?.key;if(t!==void 0)return typeof t=="symbol"?String(t):t}function we(e){let n=new Map;for(let t=e.firstElementChild;t;t=t.nextElementSibling){let r=t.getAttribute("data-key");if(r!==null){n.set(r,t);let o=Number(r);Number.isNaN(o)||n.set(o,t);}}return n}function Y(e){try{k("__DOM_REPLACE_COUNT"),S(`__LAST_DOM_REPLACE_STACK_${e}`,new Error().stack);}catch{}}function Q(e,n){try{S("__LAST_FASTPATH_STATS",e),S("__LAST_FASTPATH_COMMIT_COUNT",1),n&&k(n);}catch{}}function Z(e,n,t){(process.env.ASKR_FASTPATH_DEBUG==="1"||process.env.ASKR_FASTPATH_DEBUG==="true")&&(t!==void 0?a.warn(`[Askr][FASTPATH] ${e}`,n,t):n!==void 0?a.warn(`[Askr][FASTPATH] ${e}`,n):a.warn(`[Askr][FASTPATH] ${e}`));}function B(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}var y=new WeakMap;function ee(e){return y.get(e)}function xe(e){try{if(y.has(e))return;let n=we(e);if(n.size===0){n=new Map;let t=Array.from(e.children);for(let r of t){let o=(r.textContent||"").trim();if(o){n.set(o,r);let i=Number(o);Number.isNaN(i)||n.set(i,r);}}}n.size>0&&y.set(e,n);}catch{}}var Ne=new WeakSet;function nn(e){let n=[];for(let t of e){let r=R(t);r!==void 0&&n.push({key:r,vnode:t});}return n}function tn(e){let n=[];for(let t of e){if(t===-1)continue;let r=0,o=n.length;for(;r<o;){let i=r+o>>1;n[i]<t?r=i+1:o=i;}r===n.length?n.push(t):n[r]=t;}return n.length}function rn(e){for(let{vnode:n}of e){if(typeof n!="object"||n===null)continue;let t=n;if(t.props&&Ce(t.props))return true}return false}function on(e,n){for(let{key:t,vnode:r}of e){let o=n?.get(t);if(!o||typeof r!="object"||r===null)continue;let s=r.props||{};for(let a of Object.keys(s))if(!J(a)&&ce(o,a,s[a]))return true}return false}function P(e,n,t){let r=nn(n),o=r.length,i=r.map(E=>E.key),s=t?Array.from(t.keys()):[],a=0;for(let E=0;E<i.length;E++){let w=i[E];(E>=s.length||s[E]!==w||!t?.has(w))&&a++;}let f=o>=128&&s.length>0&&a>Math.max(64,Math.floor(o*.1)),c=false,d=0;if(o>=128){let E=Array.from(e.children),w=r.map(({key:L})=>{let Ee=t?.get(L);return Ee?.parentElement===e?E.indexOf(Ee):-1});d=tn(w),c=d<Math.floor(o*.5);}let h=rn(r),_=on(r,t);return {useFastPath:(f||c)&&!_&&!h,totalKeyed:o,moveCount:a,lisLen:d,hasPropChanges:_}}var de=false,O=null;function Re(){de=true,O=new WeakSet;try{let e=A.clearPendingSyncTasks?.()??0;}catch{}}function Fe(){de=false,O=null;}function q(){return de}function fe(e){if(O)try{O.add(e);}catch(n){}}function sn(e){return !!(O&&O.has(e))}function an(e){let n=e._pendingReadStates??new Set,t=e._lastReadStates??new Set,r=e._currentRenderToken;if(r!==void 0){for(let o of t)if(!n.has(o)){let i=o._readers;i&&i.delete(e);}e.lastRenderToken=r;for(let o of n){let i=o._readers;i||(i=new Map,o._readers=i),i.set(e,e.lastRenderToken??0);}e._lastReadStates=n,e._pendingReadStates=new Set,e._currentRenderToken=void 0;}}function ln(e){if(!e||typeof e!="object"||!("type"in e))return e;let n=e;if(typeof n.type=="symbol"&&(n.type===b$1||String(n.type)==="Symbol(askr.fragment)")){let t=n.children||n.props?.children;if(Array.isArray(t)&&t.length>0){for(let r of t)if(r&&typeof r=="object"&&"type"in r&&typeof r.type=="string")return r}}return e}function un(e,n){let t=ln(n);if(!t||typeof t!="object"||!("type"in t))return {useFastPath:false,reason:"not-vnode"};let r=t;if(r==null||typeof r.type!="string")return {useFastPath:false,reason:"not-intrinsic"};let o=e.target;if(!o)return {useFastPath:false,reason:"no-root"};let i=o.children[0];if(!i)return {useFastPath:false,reason:"no-first-child"};if(i.tagName.toLowerCase()!==String(r.type).toLowerCase())return {useFastPath:false,reason:"root-tag-mismatch"};let s=r.children||r.props?.children;if(!Array.isArray(s))return {useFastPath:false,reason:"no-children-array"};for(let u of s)if(typeof u=="object"&&u!==null&&"type"in u&&typeof u.type=="function")return {useFastPath:false,reason:"component-child-present"};if(e.mountOperations.length>0)return {useFastPath:false,reason:"pending-mounts"};try{xe(i);}catch{}let a=ee(i),l=P(i,s,a);return !l.useFastPath||l.totalKeyed<128?{...l,useFastPath:false,reason:"renderer-declined"}:{...l,useFastPath:true}}function cn(e,n){let t=globalThis.__ASKR_RENDERER?.evaluate;if(typeof t!="function")return a.warn("[Tempo][FASTPATH][DEV] renderer.evaluate not available; declining fast-lane"),false;Re();try{A.runWithSyncProgress(()=>{t(n,e.target);try{an(e);}catch{}});let o=A.clearPendingSyncTasks?.()??0;return !0}finally{Fe();}}function dn(e,n){if(!un(e,n).useFastPath)return false;try{return cn(e,n)}catch{return false}}typeof globalThis<"u"&&(globalThis.__ASKR_FASTLANE={isBulkCommitActive:q,enterBulkCommit:Re,exitBulkCommit:Fe,tryRuntimeFastLaneSync:dn,markFastPathApplied:fe,isFastPathApplied:sn});var Me=Symbol("__FOR_BOUNDARY__");function T(e){return typeof e=="object"&&e!==null&&"type"in e}function Pe(e,n,t){let r=e.__ASKR_INSTANCE;if(r){try{Ie(r);}catch(o){a.warn("[Askr] cleanupComponent failed:",o);}try{delete e.__ASKR_INSTANCE;}catch(o){}}}function De(e,n){try{let r=e.ownerDocument,o=r?.createTreeWalker;if(typeof o=="function"){let i=o.call(r,e,1),s=i.firstChild();for(;s;)n(s),s=i.nextNode();return}}catch{}let t=e.querySelectorAll("*");for(let r=0;r<t.length;r++)n(t[r]);}function v(e,n){if(!e||!(e instanceof Element))return;let t=false,r=null;try{Pe(e,r,t);}catch(o){a.warn("[Askr] cleanupInstanceIfPresent failed:",o);}try{De(e,o=>{try{Pe(o,r,t);}catch(i){t?r.push(i):a.warn("[Askr] cleanupInstanceIfPresent descendant cleanup failed:",i);}});}catch(o){a.warn("[Askr] cleanupInstanceIfPresent descendant query failed:",o);}}function me(e,n){v(e);}var b=new WeakMap;function Oe(e){let n=b.get(e);if(n){for(let[t,r]of n)r.options!==void 0?e.removeEventListener(t,r.handler,r.options):e.removeEventListener(t,r.handler);b.delete(e);}}function x(e){e&&(Oe(e),De(e,Oe));}var pe=globalThis,fn=(e,n)=>e!=null&&typeof e=="object"&&"id"in e?e.id:n;function Ut(e,n,t){let r=typeof e=="function"?null:e,o=$();return {sourceState:r,items:new Map,orderedKeys:[],byFn:t||fn,renderFn:n,parentInstance:o,mounted:false}}var Le=1;function mn(e,n,t,r){let o=t,i=Object.assign(()=>o,{set(d){let h=typeof d=="function"?d(o):d;h!==o&&(o=h);}}),s=()=>null,a=ne(`for-item-${e}`,s,{},null);r.parentInstance&&(a.ownerFrame=r.parentInstance.ownerFrame);let l=$();j(a);let u=Ve();a._currentRenderToken=Le++,a._pendingReadStates=new Set;let f=r.renderFn(n,()=>i());F(a),j(l);let c={key:e,item:n,indexSignal:i,componentInstance:a,vnode:f,_startStateIndex:u};return a._pendingFlushTask=()=>{let d=$();j(a),a.stateIndexCheck=-1;let h=a.stateValues;for(let m=0;m<h.length;m++){let E=h[m];E&&(E._hasBeenRead=false);}He(u),a._currentRenderToken=Le++,a._pendingReadStates=new Set;try{let m=r.renderFn(n,()=>i());c.vnode=m,F(a);}finally{j(d);}let _=r.parentInstance;_&&_._enqueueRun?.();},c}function pn(e,n){let{items:t,orderedKeys:r,byFn:o}=e,i=new Map;for(let u=0;u<n.length;u++){let f=n[u],c=o(f,u);i.set(c,{item:f,index:u});}let s=[],a=[],l=new Set(r);for(let[u,{item:f,index:c}]of i){l.delete(u),s.push(u);let d=t.get(u);if(d){let h=d.item!==f,_=d.indexSignal()!==c;if(h){d.item=f;let m=pe.__ASKR_CURRENT_INSTANCE__;pe.__ASKR_CURRENT_INSTANCE__=d.componentInstance,d.vnode=e.renderFn(f,()=>d.indexSignal()),pe.__ASKR_CURRENT_INSTANCE__=m;}_&&d.indexSignal.set(c),a.push(d.vnode);}else {let h=mn(u,f,c,e);t.set(u,h),a.push(h.vnode);}}for(let u of l){let f=t.get(u);if(f){let c=f.componentInstance;c.abortController.abort();for(let d of c.cleanupFns)try{d();}catch{}t.delete(u);}}return e.orderedKeys=s,a}function Ke(e,n){let t=n();if(!Array.isArray(t))throw new Error("For source must evaluate to an array");return pn(e,t)}var hn=typeof document<"u",Ue=0;function gn(){let e="__COMPONENT_INSTANCE_ID";try{k(e);let t=globalThis.__ASKR_DIAG,r=t?t[e]:void 0;if(typeof r=="number"&&Number.isFinite(r))return `comp-${r}`}catch{}return Ue++,`comp-${Ue}`}function yn(e,n,t){let r=U(t,true),o=H(n);o!==void 0?e.addEventListener(n,r,o):e.addEventListener(n,r),b.has(e)||b.set(e,new Map),b.get(e).set(n,{handler:r,original:t,options:o});}function _n(e,n,t){for(let r in n){let o=n[r];if(ue(r)||o==null||o===false)continue;if(r==="ref"){En(e,o);continue}let i=V(r);if(i){yn(e,i,o);continue}r==="class"||r==="className"?e.className=String(o):r==="value"||r==="checked"?Sn(e,r,o,t):e.setAttribute(r,String(o));}}function En(e,n){let t=n;if(t){if(typeof t=="function"){t(e);return}try{t.current=e;}catch{}}}function Sn(e,n,t,r){n==="value"?((W(r,"input")||W(r,"textarea")||W(r,"select"))&&(e.value=String(t)),e.setAttribute("value",String(t))):n==="checked"&&(W(r,"input")&&(e.checked=!!t),e.setAttribute("checked",String(!!t)));}function Be(e,n,t){let r=n.key??t?.key;r!==void 0&&e.setAttribute("data-key",String(r));}function p(e){if(!hn)return null;if(typeof e=="string")return document.createTextNode(e);if(typeof e=="number")return document.createTextNode(String(e));if(!e)return null;if(Array.isArray(e)){let n=document.createDocumentFragment();for(let t of e){let r=p(t);r&&n.appendChild(r);}return n}if(typeof e=="object"&&e!==null&&"type"in e){let n=e.type,t=e.props||{};if(typeof n=="string")return bn(e,n,t);if(typeof n=="function")return An(e,n,t);if(n===Me)return Tn(e,t);if(typeof n=="symbol"&&(n===b$1||String(n)==="Symbol(Fragment)"))return kn(e,t)}return null}function bn(e,n,t){let r=document.createElement(n);Be(r,e,t),_n(r,t,n);let o=t.children||e.children;if(o)if(Array.isArray(o)){for(let i of o){let s=p(i);s&&r.appendChild(s);}}else {let i=p(o);i&&r.appendChild(i);}return r}function An(e,n,t){let o=e[Ae]||ke(),i=n;if(i.constructor.name==="AsyncFunction")throw new Error("Async components are not supported. Use resource() for async work.");let a=e.__instance;a||(a=ne(gn(),i,t||{},null),e.__instance=a),o&&(a.ownerFrame=o);let l=K(o,()=>$e(a));if(l instanceof Promise)throw new Error("Async components are not supported. Components must return synchronously.");let u=K(o,()=>p(l));if(u instanceof Element)return ge(a,u),u;if(!u){let c=document.createComment("");return a._placeholder=c,a.mounted=true,a.notifyUpdate=a._enqueueRun,c}let f=document.createElement("div");return f.appendChild(u),ge(a,f),f}function kn(e,n){let t=document.createDocumentFragment(),r=n.children||e.children;if(r)if(Array.isArray(r))for(let o of r){let i=p(o);i&&t.appendChild(i);}else {let o=p(r);o&&t.appendChild(o);}return t}function Tn(e,n){let t=e._forState;if(!t)return document.createDocumentFragment();let r=n.source,o=Ke(t,r),i=[],s=false;for(let l=0;l<o.length;l++){let u=o[l],f=u.key,c=null;if(f!=null&&t.items.has(f)){let d=t.items.get(f);d._dom&&d.vnode===u&&(c=d._dom);}c||(c=p(u),s=true,f!=null&&t.items.has(f)&&(t.items.get(f)._dom=c??void 0)),i.push(c);}if(!s&&i.length!==t.orderedKeys.length&&(s=true),!s)return document.createDocumentFragment();let a=document.createDocumentFragment();for(let l of i)l&&a.appendChild(l);return a}function N(e,n,t=true){if(!T(n))return;let r=n.props||{};Be(e,n,r);let o=b.get(e),i=null;for(let s in r){let a=r[s];if(ue(s))continue;let l=V(s);if(a==null||a===false){if(s==="class"||s==="className")e.className="";else if(l&&o?.has(l)){let u=o.get(l);u.options!==void 0?e.removeEventListener(l,u.handler,u.options):e.removeEventListener(l,u.handler),o.delete(l);}else e.removeAttribute(s);continue}if(s==="class"||s==="className")e.className=String(a);else if(s==="value"||s==="checked")e[s]=a;else if(l){o&&o.size>0&&(i??=new Set).add(l);let u=o?.get(l);if(u&&u.original===a)continue;u&&(u.options!==void 0?e.removeEventListener(l,u.handler,u.options):e.removeEventListener(l,u.handler));let f=U(a,false),c=H(l);c!==void 0?e.addEventListener(l,f,c):e.addEventListener(l,f),b.has(e)||b.set(e,new Map),b.get(e).set(l,{handler:f,original:a,options:c});}else e.setAttribute(s,String(a));}if(o&&o.size>0)if(i===null){for(let[s,a]of o)a.options!==void 0?e.removeEventListener(s,a.handler,a.options):e.removeEventListener(s,a.handler);b.delete(e);}else {for(let[s,a]of o)i.has(s)||(a.options!==void 0?e.removeEventListener(s,a.handler,a.options):e.removeEventListener(s,a.handler),o.delete(s));o.size===0&&b.delete(e);}if(t){let s=n.children||r.children;Cn(e,s);}}function Cn(e,n){if(!n){e.textContent="";return}if(!Array.isArray(n)&&(typeof n=="string"||typeof n=="number")){e.childNodes.length===1&&e.firstChild?.nodeType===3?e.firstChild.data=String(n):e.textContent=String(n);return}if(Array.isArray(n)){ye(e,n);return}e.textContent="";let t=p(n);t&&e.appendChild(t);}function ye(e,n){let t=Array.from(e.children);if(n.length===1&&t.length===0&&e.childNodes.length===1){let o=n[0],i=e.firstChild;if((typeof o=="string"||typeof o=="number")&&i?.nodeType===3){i.data=String(o);return}}t.length===0&&e.childNodes.length>0&&(e.textContent="");let r=Math.max(t.length,n.length);for(let o=0;o<r;o++){let i=t[o],s=n[o];if(s===void 0&&i){v(i),i.remove();continue}if(!i&&s!==void 0){let a=p(s);a&&e.appendChild(a);continue}if(!(!i||s===void 0))if(typeof s=="string"||typeof s=="number")i.textContent=String(s);else if(T(s))if(typeof s.type=="string")if(G(i.tagName,s.type))N(i,s);else {let a=p(s);a&&(i instanceof Element&&x(i),v(i),e.replaceChild(a,i));}else {let a=p(s);a&&(i instanceof Element&&x(i),v(i),e.replaceChild(a,i));}else {let a=p(s);a&&(i instanceof Element&&x(i),v(i),e.replaceChild(a,i));}}}function te(e,n){let t=n.length,r=0,o=0,i=B(),s=process.env.ASKR_FASTPATH_DEBUG==="1"||process.env.ASKR_FASTPATH_DEBUG==="true";for(let u=0;u<t;u++){let{key:f,vnode:c}=n[u],d=e.children[u];if(d&&T(c)&&typeof c.type=="string"){let h=c.type;if(G(d.tagName,h)){let _=c.children||c.props?.children;s&&Z("positional idx",u,{chTag:d.tagName,vnodeType:h,chChildNodes:d.childNodes.length,childrenType:Array.isArray(_)?"array":typeof _}),vn(d,_,c),xn(d,f,()=>o++),r++;continue}else s&&Z("positional tag mismatch",u,{chTag:d.tagName,vnodeType:h});}else s&&Z("positional missing or invalid",u,{ch:!!d});Rn(e,u,c);}let a=B()-i;Fn(e,n);let l={n:t,reused:r,updatedKeys:o,t:a};return Q(l,"bulkKeyedPositionalHits"),l}function vn(e,n,t){typeof n=="string"||typeof n=="number"?D(e,String(n)):Array.isArray(n)&&n.length===1&&(typeof n[0]=="string"||typeof n[0]=="number")?D(e,String(n[0])):wn(e,t)||N(e,t);}function wn(e,n){let t=n.children||n.props?.children;if(!Array.isArray(t)||t.length!==2)return false;let r=t[0],o=t[1];if(!T(r)||!T(o)||typeof r.type!="string"||typeof o.type!="string")return false;let i=e.children[0],s=e.children[1];if(!i||!s||!G(i.tagName,r.type)||!G(s.tagName,o.type))return false;let a=r.children||r.props?.children,l=o.children||o.props?.children;if(typeof a=="string"||typeof a=="number")D(i,String(a));else if(Array.isArray(a)&&a.length===1&&(typeof a[0]=="string"||typeof a[0]=="number"))D(i,String(a[0]));else return false;if(typeof l=="string"||typeof l=="number")D(s,String(l));else if(Array.isArray(l)&&l.length===1&&(typeof l[0]=="string"||typeof l[0]=="number"))D(s,String(l[0]));else return false;return true}function D(e,n){e.childNodes.length===1&&e.firstChild?.nodeType===3?e.firstChild.data=n:e.textContent=n;}function xn(e,n,t){try{let r=String(n);if(e.getAttribute("data-key")===r)return;e.setAttribute("data-key",r),t();}catch{}}function Nn(e){switch(e){case "div":return "DIV";case "span":return "SPAN";case "p":return "P";case "a":return "A";case "button":return "BUTTON";case "input":return "INPUT";case "ul":return "UL";case "ol":return "OL";case "li":return "LI";default:return null}}function W(e,n){if(e===n)return true;let t=e.length;if(t!==n.length)return false;for(let r=0;r<t;r++){let o=e.charCodeAt(r),i=n.charCodeAt(r);if(o===i)continue;let s=o>=65&&o<=90?o+32:o,a=i>=65&&i<=90?i+32:i;if(s!==a)return false}return true}function G(e,n){let t=Nn(n);return t!==null&&e===t?true:W(e,n)}function Rn(e,n,t){let r=p(t);if(r){let o=e.children[n];o?(v(o),e.replaceChild(r,o)):e.appendChild(r);}}function Fn(e,n){try{let t=y.get(e),r=t?(t.clear(),t):new Map;for(let o=0;o<n.length;o++){let i=n[o].key,s=e.children[o];s&&r.set(i,s);}y.set(e,r);}catch{}}function qe(e,n){let t=B(),r=Array.from(e.childNodes),o=[],i=0,s=0;for(let f=0;f<n.length;f++){let c=Mn(n[f],r[f],o);c==="reused"?i++:c==="created"&&s++;}let a=B()-t,l=Dn(e,o);y.delete(e);let u={n:n.length,reused:i,created:s,tBuild:a,tCommit:l};return In(u),u}function Mn(e,n,t){return typeof e=="string"||typeof e=="number"?Pn(String(e),n,t):typeof e=="object"&&e!==null&&"type"in e?On(e,n,t):"skipped"}function Pn(e,n,t){return n&&n.nodeType===3?(n.data=e,t.push(n),"reused"):(t.push(document.createTextNode(e)),"created")}function On(e,n,t){let r=e;if(typeof r.type=="string"){let i=r.type;if(n&&n.nodeType===1&&G(n.tagName,i))return N(n,e),t.push(n),"reused"}let o=p(e);return o?(t.push(o),"created"):"skipped"}function Dn(e,n){let t=Date.now(),r=document.createDocumentFragment();for(let o=0;o<n.length;o++)r.appendChild(n[o]);try{for(let o=e.firstChild;o;){let i=o.nextSibling;o instanceof Element&&x(o),v(o),o=i;}}catch{}return Y("bulk-text-replace"),e.replaceChildren(r),Date.now()-t}function In(e){try{S("__LAST_BULK_TEXT_FASTPATH_STATS",e),S("__LAST_FASTPATH_STATS",e),S("__LAST_FASTPATH_COMMIT_COUNT",1),k("bulkTextFastpathHits");}catch{}}function je(e,n){let t=Number(process.env.ASKR_BULK_TEXT_THRESHOLD)||1024,r=.8,o=Array.isArray(n)?n.length:0;if(o<t)return he({phase:"bulk-unkeyed-eligible",reason:"too-small",total:o,threshold:t}),false;let i=Ln(n);if(i.componentFound!==void 0)return he({phase:"bulk-unkeyed-eligible",reason:"component-child",index:i.componentFound}),false;let s=i.simple/o,a=s>=r&&e.childNodes.length>=o;return he({phase:"bulk-unkeyed-eligible",total:o,simple:i.simple,fraction:s,requiredFraction:r,eligible:a}),a}function Ln(e){let n=0;for(let t=0;t<e.length;t++){let r=e[t];if(typeof r=="string"||typeof r=="number"){n++;continue}if(typeof r=="object"&&r!==null&&"type"in r){let o=r;if(typeof o.type=="function")return {simple:n,componentFound:t};typeof o.type=="string"&&Kn(o)&&n++;}}return {simple:n}}function Kn(e){let n=e.children||e.props?.children;return !!(!n||typeof n=="string"||typeof n=="number"||Array.isArray(n)&&n.length===1&&(typeof n[0]=="string"||typeof n[0]=="number"))}function he(e){if(process.env.ASKR_FASTPATH_DEBUG==="1")try{S("__BULK_DIAG",e);}catch{}}function We(e,n,t,r){if(typeof document>"u")return null;let o=n.length;if(o===0&&(!r||r.length===0))return null;be()||a.warn("[Askr][FASTPATH][DEV] Fast-path reconciliation invoked outside scheduler execution");let i,s;if(o<=20)try{let c=e.children;i=new Array(c.length);for(let d=0;d<c.length;d++)i[d]=c[d];}catch(c){i=void 0;}else {s=new Map;try{for(let c=e.firstElementChild;c;c=c.nextElementSibling){let d=c.getAttribute("data-key");if(d!==null){s.set(d,c);let h=Number(d);Number.isNaN(h)||s.set(h,c);}}}catch(c){s=void 0;}}let a$1=[],l=0,u=0,f=0;for(let c=0;c<n.length;c++){let{key:d,vnode:h}=n[c];l++;let _;if(o<=20&&i){let m=String(d);for(let E=0;E<i.length;E++){let w=i[E],L=w.getAttribute("data-key");if(L!==null&&(L===m||Number(L)===d)){_=w;break}}_||(_=t?.get(d));}else _=s?.get(d)??t?.get(d);if(_)a$1.push(_),f++;else {let m=p(h);m&&(a$1.push(m),u++);}}if(r&&r.length)for(let c of r){let d=p(c);d&&(a$1.push(d),u++);}try{let c=Date.now(),d=document.createDocumentFragment(),h=0;for(let m=0;m<a$1.length;m++)d.appendChild(a$1[m]),h++;try{for(let m=e.firstChild;m;){let E=m.nextSibling;m instanceof Element&&x(m),v(m),m=E;}}catch(m){}try{k("__DOM_REPLACE_COUNT"),S("__LAST_DOM_REPLACE_STACK_FASTPATH",new Error().stack);}catch(m){}e.replaceChildren(d);try{S("__LAST_FASTPATH_COMMIT_COUNT",1);}catch(m){}try{q()&&fe(e);}catch(m){}let _=new Map;for(let m=0;m<n.length;m++){let E=n[m].key,w=a$1[m];w instanceof Element&&_.set(E,w);}try{let m={n:o,moves:0,lisLen:0,t_lookup:0,t_fragment:Date.now()-c,t_commit:0,t_bookkeeping:0,fragmentAppendCount:h,mapLookups:l,createdNodes:u,reusedCount:f};typeof globalThis<"u"&&(S("__LAST_FASTPATH_STATS",m),S("__LAST_FASTPATH_REUSED",f>0),k("fastpathHistoryPush")),(process.env.ASKR_FASTPATH_DEBUG==="1"||process.env.ASKR_FASTPATH_DEBUG==="true")&&a.warn("[Askr][FASTPATH]",JSON.stringify({n:o,createdNodes:u,reusedCount:f}));}catch(m){}try{Ne.add(e);}catch(m){}return _}catch(c){return null}}function re(e,n){if(e===n)return true;if(e.length!==n.length)return false;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t),o=n.charCodeAt(t);if(r===o)continue;let i=r>=65&&r<=90?r+32:r,s=o>=65&&o<=90?o+32:o;if(i!==s)return false}return true}function oe(e,n,t){let{keyedVnodes:r,unkeyedVnodes:o}=Hn(n),i=t||Vn(e),s=Un(e,n,r,o,i);return s||Gn(e,n,r,i)}function Vn(e){let n=new Map;try{for(let t=e.firstElementChild;t;t=t.nextElementSibling){let r=t.getAttribute("data-key");if(r!==null){n.set(r,t);let o=Number(r);Number.isNaN(o)||n.set(o,t);}}}catch{}return n}function Hn(e){let n=[],t=[];for(let r=0;r<e.length;r++){let o=e[r],i=R(o);i!==void 0?n.push({key:i,vnode:o}):t.push(o);}return {keyedVnodes:n,unkeyedVnodes:t}}function Un(e,n,t,r,o){try{let i=Bn(e,n,t,r,o);if(i)return i;let s=qn(e,t);if(s)return s}catch{}return null}function Bn(e,n,t,r,o){if(P(e,n,o).useFastPath&&t.length>=128||q())try{let s=We(e,t,o,r);if(s)return y.set(e,s),s}catch{}return null}function qn(e,n){let t=n.length;if(t<10||jn(e,n)/t<.9||$n(e,n))return null;try{let o=te(e,n);return Q(o,"bulkKeyedPositionalHits"),Wn(e),y.get(e)}catch{return null}}function jn(e,n){let t=0;try{for(let r=0;r<n.length;r++){let o=n[r].vnode;if(!o||typeof o!="object"||typeof o.type!="string")continue;let i=e.children[r];i&&re(i.tagName,o.type)&&t++;}}catch{}return t}function $n(e,n){try{for(let t=0;t<n.length;t++){let r=n[t].vnode,o=e.children[t];if(!(!o||!r||typeof r!="object")&&ve(o,r.props||{}))return !0}}catch{return true}return false}function Wn(e){try{let n=new Map;for(let t=e.firstElementChild;t;t=t.nextElementSibling){let r=t.getAttribute("data-key");if(r!==null){n.set(r,t);let o=Number(r);Number.isNaN(o)||n.set(o,t);}}y.set(e,n);}catch{}}function Gn(e,n,t,r){let o=new Map,i=[],s=new WeakSet,a=Xn(e,r,s);for(let l=0;l<n.length;l++){let u=n[l],f=Jn(u,l,e,a,s,o);f&&i.push(f);}return typeof document>"u"||(tt(e,i),y.delete(e)),o}function Xn(e,n,t){return r=>{if(!n)return;let o=n.get(r);if(o&&!t.has(o))return t.add(o),o;let i=String(r),s=n.get(i);if(s&&!t.has(s))return t.add(s),s;let a=Number(i);if(!Number.isNaN(a)){let l=n.get(a);if(l&&!t.has(l))return t.add(l),l}return zn(e,r,i,t)}}function zn(e,n,t,r){try{for(let o=e.firstElementChild;o;o=o.nextElementSibling){if(r.has(o))continue;let i=o.getAttribute("data-key");if(i===t)return r.add(o),o;if(i!==null){let s=Number(i);if(!Number.isNaN(s)&&s===n)return r.add(o),o}}}catch{}}function Jn(e,n,t,r,o,i){let s=R(e);return s!==void 0?Yn(e,s,t,r,i):Qn(e,n,t,o)}function Yn(e,n,t,r,o){let i=r(n);if(i&&i.parentElement===t)try{let a=e;if(a&&typeof a=="object"&&typeof a.type=="string"&&re(i.tagName,a.type))return N(i,e),o.set(n,i),i}catch{}let s=p(e);return s?(s instanceof Element&&o.set(n,s),s):null}function Qn(e,n,t,r){try{let i=t.children[n];if(i&&(typeof e=="string"||typeof e=="number")&&i.nodeType===1)return i.textContent=String(e),r.add(i),i;if(Zn(i,e))return N(i,e),r.add(i),i;let s=et(t,r);if(s){let a=nt(s,e,r);if(a)return a}}catch{}return p(e)}function Zn(e,n){if(!e||typeof n!="object"||n===null||!("type"in n))return false;let t=n,r=e.getAttribute("data-key");return r==null&&typeof t.type=="string"&&re(e.tagName,t.type)}function et(e,n){for(let t=e.firstElementChild;t;t=t.nextElementSibling)if(!n.has(t)&&t.getAttribute("data-key")===null)return t}function nt(e,n,t){if(typeof n=="string"||typeof n=="number")return e.textContent=String(n),t.add(e),e;if(typeof n=="object"&&n!==null&&"type"in n){let r=n;if(typeof r.type=="string"&&re(e.tagName,r.type))return N(e,n),t.add(e),e}return null}function tt(e,n){let t=document.createDocumentFragment();for(let r=0;r<n.length;r++)t.appendChild(n[r]);try{for(let r=e.firstChild;r;){let o=r.nextSibling;r instanceof Element&&x(r),v(r),r=o;}}catch{}Y("reconcile"),e.replaceChildren(t);}var _e=new WeakMap;function Ge(e,n){if(e===n)return true;if(e.length!==n.length)return false;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t),o=n.charCodeAt(t);if(r===o)continue;let i=r>=65&&r<=90?r+32:r,s=o>=65&&o<=90?o+32:o;if(i!==s)return false}return true}function rt(e){if(Array.isArray(e)){if(e.length===1){let n=e[0];if(typeof n=="string"||typeof n=="number")return {isSimple:true,text:String(n)}}}else if(typeof e=="string"||typeof e=="number")return {isSimple:true,text:String(e)};return {isSimple:false}}function ot(e,n){return e.childNodes.length===1&&e.firstChild?.nodeType===3?(e.firstChild.data=n,true):false}function Xe(e){let n=new Map;for(let t=e.firstElementChild;t;t=t.nextElementSibling){let r=t.getAttribute("data-key");if(r!==null){n.set(r,t);let o=Number(r);Number.isNaN(o)||n.set(o,t);}}return n}function it(e){let n=y.get(e);return n||(n=Xe(e),n.size>0&&y.set(e,n)),n.size>0?n:void 0}function ze(e){for(let n=0;n<e.length;n++)if(R(e[n])!==void 0)return true;return false}function st(e,n,t){if(process.env.ASKR_FORCE_BULK_POSREUSE==="1"&&at(e,n))return;let r=oe(e,n,t);y.set(e,r);}function at(e,n){try{let t=[];for(let i of n)T(i)&&i.key!==void 0&&t.push({key:i.key,vnode:i});if(t.length===0||t.length!==n.length)return !1;(process.env.ASKR_FASTPATH_DEBUG==="1"||process.env.ASKR_FASTPATH_DEBUG==="true")&&a.warn("[Askr][FASTPATH] forced positional bulk keyed reuse (evaluate-level)");let r=te(e,t);if(process.env.ASKR_FASTPATH_DEBUG==="1")try{S("__LAST_FASTPATH_STATS",r),S("__LAST_FASTPATH_COMMIT_COUNT",1),k("bulkKeyedPositionalForced");}catch{}let o=Xe(e);return y.set(e,o),!0}catch(t){return (process.env.ASKR_FASTPATH_DEBUG==="1"||process.env.ASKR_FASTPATH_DEBUG==="true")&&a.warn("[Askr][FASTPATH] forced bulk path failed, falling back",t),false}}function lt(e,n){if(je(e,n)){qe(e,n);}else ye(e,n);y.delete(e);}function ut(e,n){if(!n){e.textContent="",y.delete(e);return}if(!Array.isArray(n)){e.textContent="";let t=p(n);t&&e.appendChild(t),y.delete(e);return}if(ze(n)){let t=it(e);try{st(e,n,t);}catch{let r=oe(e,n,t);y.set(e,r);}}else lt(e,n);}function Je(e,n){let t=n.children||n.props?.children,r=rt(t);r.isSimple&&ot(e,r.text)||ut(e,t),N(e,n,false);}function ct(e,n){let t=e.firstElementChild;for(let r=0;r<n.length;r++){let o=n[r],i=t?t.nextElementSibling:null;if(t&&T(o)&&typeof o.type=="string"&&Ge(t.tagName,o.type)){Je(t,o),t=i;continue}let s=p(o);s&&(t?e.replaceChild(s,t):e.appendChild(s)),t=i;}for(;t;){let r=t.nextElementSibling;e.removeChild(t),t=r;}}function dt(e,n){for(let[t,r]of Object.entries(n)){if(t==="children"||t==="key"||r==null||r===false)continue;if(t==="ref"){ft(e,r);continue}let o=V(t);if(o){let i=U(r,false),s=H(o);s!==void 0?e.addEventListener(o,i,s):e.addEventListener(o,i),b.has(e)||b.set(e,new Map),b.get(e).set(o,{handler:i,original:r,options:s});continue}t==="class"||t==="className"?e.className=String(r):t==="value"||t==="checked"?e[t]=r:e.setAttribute(t,String(r));}}function ft(e,n){let t=n;if(t){if(typeof t=="function"){t(e);return}try{t.current=e;}catch{}}}function mt(e,n){let t=n.children;if(!Array.isArray(t)||!ze(t))return false;let r=document.createElement(n.type);e.appendChild(r),dt(r,n.props||{});let o=oe(r,t,void 0);return y.set(r,o),true}function pt(e){return T(e)&&typeof e.type=="symbol"&&(e.type===b$1||String(e.type)==="Symbol(askr.fragment)")}function ht(e){let n=e.props?.children||e.children||[];return Array.isArray(n)?n:[n]}function I(e,n,t){if(n&&!(typeof document>"u"))if(t&&_e.has(t)){let r=_e.get(t),o=r.start.nextSibling;for(;o&&o!==r.end;){let s=o.nextSibling;o.remove(),o=s;}let i=p(e);i&&n.insertBefore(i,r.end);}else if(t){let r=document.createComment("component-start"),o=document.createComment("component-end");n.appendChild(r),n.appendChild(o),_e.set(t,{start:r,end:o});let i=p(e);i&&n.insertBefore(i,o);}else {let r=e;if(pt(r)){let i=ht(r);if(i.length===1&&T(i[0])&&typeof i[0].type=="string")r=i[0];else {ct(n,i);return}}let o=n.children[0];if(o&&T(r)&&typeof r.type=="string"&&Ge(o.tagName,r.type))Je(o,r);else {if(n.textContent="",T(r)&&typeof r.type=="string"&&mt(n,r))return;let i=p(r);i&&n.appendChild(i);}}}if(typeof globalThis<"u"){let e=globalThis;e.__ASKR_RENDERER={evaluate:I,isKeyedReorderFastPathEligible:P,getKeyMapForElement:ee};}function ne(e,n,t,r){let o={id:e,fn:n,props:t,target:r,mounted:false,abortController:new AbortController,stateValues:[],evaluationGeneration:0,notifyUpdate:null,_pendingFlushTask:void 0,_pendingRunTask:void 0,_enqueueRun:void 0,stateIndexCheck:-1,expectedStateIndices:[],firstRenderComplete:false,mountOperations:[],cleanupFns:[],hasPendingUpdate:false,ownerFrame:null,ssr:false,cleanupStrict:false,isRoot:false,_currentRenderToken:void 0,lastRenderToken:0,_pendingReadStates:new Set,_lastReadStates:new Set};return o._pendingRunTask=()=>{o.hasPendingUpdate=false,Ze(o);},o._enqueueRun=()=>{o.hasPendingUpdate||(o.hasPendingUpdate=true,A.enqueue(o._pendingRunTask));},o._pendingFlushTask=()=>{o.hasPendingUpdate=false,o._enqueueRun?.();},o}var C=null,ie=0;function Hr(){return C}function j(e){C=e;}function Ye(e){if(e.isRoot){for(let n of e.mountOperations){let t=n();t instanceof Promise?t.then(r=>{typeof r=="function"&&e.cleanupFns.push(r);}):typeof t=="function"&&e.cleanupFns.push(t);}e.mountOperations=[];}}function ge(e,n){e.target=n;try{n instanceof Element&&(n.__ASKR_INSTANCE=e);}catch(r){}e.notifyUpdate=e._enqueueRun;let t=!e.mounted;e.mounted=true,t&&e.mountOperations.length>0&&Ye(e);}var Qe=0;function Ze(e){e.notifyUpdate=e._enqueueRun,e._currentRenderToken=++Qe,e._pendingReadStates=new Set;let n=e.target?e.target.innerHTML:"",t=en(e);if(t instanceof Promise)throw new Error("Async components are not supported. Components must be synchronous.");{let r=globalThis.__ASKR_FASTLANE;try{if(r?.tryRuntimeFastLaneSync?.(e,t))return}catch{}A.enqueue(()=>{if(!e.target&&e._placeholder){if(t==null){F(e);return}let o=e._placeholder,i=o.parentNode;if(!i){a.warn("[Askr] placeholder no longer in DOM, cannot render component");return}let s=document.createElement("div"),a$1=C;C=e;try{I(t,s),i.replaceChild(s,o),e.target=s,e._placeholder=void 0,s.__ASKR_INSTANCE=e,F(e);}finally{C=a$1;}return}if(e.target){let o=[];try{let i=!e.mounted,s=C;C=e,o=Array.from(e.target.childNodes);try{I(t,e.target);}catch(a$1){try{let l=Array.from(e.target.childNodes);for(let u of l)try{me(u);}catch(f){a.warn("[Askr] error cleaning up failed commit children:",f);}}catch(l){}try{k("__DOM_REPLACE_COUNT"),S("__LAST_DOM_REPLACE_STACK_COMPONENT_RESTORE",new Error().stack);}catch(l){}throw e.target.replaceChildren(...o),a$1}finally{C=s;}F(e),e.mounted=!0,i&&e.mountOperations.length>0&&Ye(e);}catch(i){try{let s=Array.from(e.target.childNodes);for(let a$1 of s)try{me(a$1);}catch(l){a.warn("[Askr] error cleaning up partial children during rollback:",l);}}catch(s){}try{try{k("__DOM_REPLACE_COUNT"),S("__LAST_DOM_REPLACE_STACK_COMPONENT_ROLLBACK",new Error().stack);}catch(s){}e.target.replaceChildren(...o);}catch{e.target.innerHTML=n;}throw i}}});}}function $e(e){let n=e._currentRenderToken!==void 0,t=e._currentRenderToken,r=e._pendingReadStates;n||(e._currentRenderToken=++Qe,e._pendingReadStates=new Set);try{let o=en(e);return n||F(e),o}finally{e._currentRenderToken=t,e._pendingReadStates=r??new Set;}}function en(e){e.stateIndexCheck=-1;for(let n of e.stateValues)n&&(n._hasBeenRead=false);e._pendingReadStates=new Set,C=e,ie=0;try{let t={signal:e.abortController.signal},r={parent:e.ownerFrame,values:null},o=K(r,()=>e.fn(e.props,t)),i=Date.now()-0;i>5&&a.warn(`[askr] Slow render detected: ${i}ms. Consider optimizing component performance.`),e.firstRenderComplete||(e.firstRenderComplete=!0);for(let s=0;s<e.stateValues.length;s++){let a$1=e.stateValues[s];if(a$1&&!a$1._hasBeenRead)try{let l=e.fn?.name||"<anonymous>";a.warn(`[askr] Unused state variable detected in ${l} at index ${s}. State should be read during render or removed.`);}catch{a.warn("[askr] Unused state variable detected. State should be read during render or removed.");}}return o}finally{C=null;}}function gt(e){e.abortController=new AbortController,e.notifyUpdate=e._enqueueRun,A.enqueue(()=>Ze(e));}function $(){return C}function Br(){if(!C)throw new Error("getSignal() can only be called during component render execution. Ensure you are calling this from inside your component function.");return C.abortController.signal}function F(e){let n=e._pendingReadStates??new Set,t=e._lastReadStates??new Set,r=e._currentRenderToken;if(r!==void 0){for(let o of t)if(!n.has(o)){let i=o._readers;i&&i.delete(e);}e.lastRenderToken=r;for(let o of n){let i=o._readers;i||(i=new Map,o._readers=i),i.set(e,e.lastRenderToken??0);}e._lastReadStates=n,e._pendingReadStates=new Set,e._currentRenderToken=void 0;}}function qr(){return ie++}function Ve(){return ie}function He(e){ie=e;}function jr(e){gt(e);}function Ie(e){let n=[];for(let t of e.cleanupFns)try{t();}catch(r){e.cleanupStrict&&n.push(r);}if(e.cleanupFns=[],n.length>0)throw new AggregateError(n,`Cleanup failed for component ${e.id}`);if(e._lastReadStates){for(let t of e._lastReadStates){let r=t._readers;r&&r.delete(e);}e._lastReadStates=new Set;}e.abortController.abort(),e.notifyUpdate=null,e.mounted=false;}export{se as a,A as b,St as c,ke as d,q as e,Me as f,x as g,Ut as h,ne as i,Hr as j,j as k,$ as l,Br as m,qr as n,jr as o,Ie as p};
@@ -0,0 +1 @@
1
+ import {b,l}from'./chunk-76FYOA5Z.js';import {p,o}from'./chunk-P3C5XSNF.js';var e=null;function f(n,t){e=n,b();}function c(n){if(typeof window>"u")return;let t=l(n);t&&(window.history.pushState({path:n},"",n),e&&(p(e),e.fn=t.handler,e.props=t.params,e.stateValues=[],e.expectedStateIndices=[],e.firstRenderComplete=false,e.stateIndexCheck=-1,e.evaluationGeneration++,e.notifyUpdate=null,e.abortController=new AbortController,o(e)));}function s(n){let t=window.location.pathname;if(!e)return;let o$1=l(t);o$1&&(p(e),e.fn=o$1.handler,e.props=o$1.params,e.stateValues=[],e.expectedStateIndices=[],e.firstRenderComplete=false,e.stateIndexCheck=-1,e.evaluationGeneration++,e.notifyUpdate=null,e.abortController=new AbortController,o(e));}function u(){typeof window<"u"&&window.addEventListener("popstate",s);}function m(){typeof window<"u"&&window.removeEventListener("popstate",s);}export{f as a,c as b,u as c,m as d};
@@ -1,4 +1,4 @@
1
- import { P as Props, J as JSXElement } from './jsx-CSWf4VFg.js';
1
+ import { P as Props, J as JSXElement } from './jsx-CPjsGyEg.js';
2
2
 
3
3
  /**
4
4
  * State primitive for Askr components
@@ -1,5 +1,5 @@
1
- import { S as State, a as ComponentInstance } from '../component-mtwBWhUr.js';
2
- import { P as Props } from '../jsx-CSWf4VFg.js';
1
+ import { S as State, a as ComponentInstance } from '../component-AJMg1Gmv.js';
2
+ import { P as Props } from '../jsx-CPjsGyEg.js';
3
3
 
4
4
  /**
5
5
  * For primitive runtime
@@ -9,17 +9,19 @@ import { P as Props } from '../jsx-CSWf4VFg.js';
9
9
  */
10
10
 
11
11
  interface ForItemInstance<T> {
12
- key: string | number;
12
+ key: string | number | null;
13
13
  item: T;
14
14
  indexSignal: State<number>;
15
15
  componentInstance: ComponentInstance;
16
16
  vnode: VNode | undefined;
17
+ _startStateIndex: number;
18
+ _dom?: Node;
17
19
  }
18
20
  interface ForState<T> {
19
21
  sourceState: State<T[]> | null;
20
- items: Map<string | number, ForItemInstance<T>>;
21
- orderedKeys: Array<string | number>;
22
- byFn: (item: T, index: number) => string | number;
22
+ items: Map<string | number | null, ForItemInstance<T>>;
23
+ orderedKeys: Array<string | number | null>;
24
+ byFn: (item: T, index: number) => string | number | null;
23
25
  renderFn: (item: T, index: () => number) => VNode;
24
26
  parentInstance: ComponentInstance | null;
25
27
  mounted: boolean;
@@ -33,7 +35,7 @@ interface DOMElement {
33
35
  type: string | ((props: Props) => unknown) | symbol;
34
36
  props?: Props;
35
37
  children?: VNode[];
36
- key?: string | number;
38
+ key?: string | number | null;
37
39
  [Symbol.iterator]?: never;
38
40
  _forState?: ForState<unknown>;
39
41
  }
package/dist/for/index.js CHANGED
@@ -1 +1 @@
1
- import {a}from'../chunk-LOSY3JCR.js';import {g,h}from'../chunk-534P7OMI.js';import'../chunk-JJDSOK6C.js';import'../chunk-OQMK7H2R.js';import'../chunk-37RC6ZT3.js';import'../chunk-62D2TNHX.js';function m(t,n,p){return {type:()=>{let a$1=a(g(t,n,p?.by))();return {type:"for-boundary",children:h(a$1,t)}},props:{}}}export{m as For};
1
+ import {a}from'../chunk-4YHYFQDP.js';import {h,f}from'../chunk-P3C5XSNF.js';import'../chunk-HGMOQ3I7.js';import'../chunk-BP2CKUO6.js';import'../chunk-37RC6ZT3.js';import'../chunk-62D2TNHX.js';function m(t,n,a$1){let p=a(h(t,n,a$1?.by))();return {type:f,props:{source:t},_forState:p}}export{m as For};