@webjsdev/core 0.7.64 → 0.7.65

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.
@@ -1,10 +1,9 @@
1
- var Ul=Object.defineProperty;var T=(e,t)=>()=>(e&&(t=e(e=0)),t);var ai=(e,t)=>{for(var r in t)Ul(e,r,{get:t[r],enumerable:!0})};function ci(e,...t){return{_$webjs:"template",strings:e,values:t}}function K(e){return!!e&&typeof e=="object"&&e._$webjs==="template"}var F,Ht=T(()=>{F="wjm-"});function Or(e){return Object.prototype.hasOwnProperty.call(Vt,e)}function Fe(e,t){return t==null?null:t===!1?/^aria-/i.test(e)?"false":null:t===!0&&Wl.has(String(e).toLowerCase())?"":String(t)}var Vt,Wl,Wt=T(()=>{Vt=Object.freeze({"@":"event",".":"prop","?":"bool"});Wl=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"])});function Kn(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function U(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;")}var st=T(()=>{});function Kl(e){ui=e}function zn(e){if(typeof e!="function")return null;let t=e[ca];return typeof t=="string"&&t?t:null}async function Pr(e){let t=zn(e);if(t)return t;if(typeof e!="function"||!ui)return null;try{let r=await ui(e);return typeof r=="string"&&r?r:null}catch{return null}}function at(e,t,r){if(typeof e!="function")return!1;let n=String(t).toLowerCase(),o=String(r||"").toLowerCase();return n==="action"?o==="form":n==="formaction"?o==="button"||o==="input":!1}function Kt(e,t,r=!0){if(!e||e===B&&r)return;let n=e===B?'a second "name" attribute':`name="${e}"`;throw new Error(`[webjs] formaction=\${action} on <${t||"button"}> cannot be used when the element already carries a "name" attribute (found ${n}). The action identity is submitted as the button's own name/value pair, so there is no room for a second one. Move the action to the enclosing <form action=\${action}> or drop the submitter's "name".`)}function fi(e,t){let r=String(e||"").toLowerCase(),n=t==null?null:String(t).toLowerCase();if(zl(r,n)){if(r==="input"&&n==="image")throw new Error('[webjs] formaction=${action} is not supported on <input type="image"> because image submitters submit coordinate pairs (name.x/name.y) instead of name=value, so the action identity would never arrive. Use a <button> instead.');if(r==="input")throw new Error('[webjs] formaction=${action} is not supported on <input type="submit"> because the action identity has to occupy the submitter\'s "value", which on this control is also its visible label, so the button would render captioned with the action\'s id and could not be given a real one. Use <button formaction=${action}>Publish</button>, whose label is its children.');return}throw new Error(`[webjs] formaction=\${action} on <${r}>${n?` type="${n}"`:""} requires a submitter control, and formaction is inert on anything else. Use <button formaction=\${action}>.`)}function zl(e,t){let r=t==null?null:String(t).toLowerCase();return e==="button"?r==null||r===""||r==="submit":e==="input"?r==="submit"||r==="image":!1}function zt(e){throw new Error(`[webjs] formaction=\${action} on <${e||"button"}> cannot be used when the element already carries a "value" attribute. The action identity is submitted as the button's own name/value pair, so both halves are taken. Drop the "value", or dispatch on it from one form-level action instead.`)}function di(e){throw new Error(`[webjs] a bound formaction=\${action} on <${e||"button"}> cannot also carry a plain formaction attribute: the two name different targets and the renderers resolve them differently. Drop the static attribute.`)}function Gt(e){throw new Error(`[webjs] formaction=\${action} on <${e||"button"}> cannot be used with a "form" attribute, which re-points the submitter at a form other than the bound one it sits in. Keep the submitter inside its bound <form>.`)}function Yt(e,t){if(e)throw new Error(`[webjs] two formaction=\${action} holes were found on one <${t||"button"}>. Only one can win, and the two renderers pick differently, so bind exactly one action per submitter.`)}function pi(e,t){let n=(e||[]).filter(o=>Jt(o))[0];if(n)throw new Error(`[webjs] a <${t||"button"}> submitter binds .${n}=. That property is a reflected IDL attribute on a submitter, so a property binding is dropped at SSR and written to the attribute in the browser: the page would render on the server and throw on hydration. Write it as a plain attribute.`)}function Jt(e){let t=String(e).toLowerCase();return t==="name"||t==="value"||t==="formaction"||t==="formmethod"||t==="formenctype"}function Gl(e,t,r){let n=t==null?null:String(t),o=r==null?null:String(r);if(n!=null&&/^dialog$/i.test(n))throw new Error(`[webjs] formaction=\${action} on <${e}> cannot be combined with formmethod="dialog", which dismisses a <dialog> instead of submitting, so the bound action would never run. Drop one of the two.`);if(n!=null&&!/^post$/i.test(n))throw new Error(`[webjs] <${e} formmethod="${n}" formaction=\${action}> cannot work: a bound server action is submitted as a POST body, and a "${n}" submission sends none, so the action would never run. Drop the formmethod attribute (WebJs emits formmethod="post" on a bound submitter), or drop the binding.`);if(o!=null&&!la.has(o.toLowerCase()))throw new Error(`[webjs] <${e} formenctype="${o}" formaction=\${action}> cannot work: a form submission is parsed as multipart/form-data or application/x-www-form-urlencoded, and a "${o}" body is neither, so the bound action could never read it. Drop the formenctype attribute (WebJs emits multipart/form-data on a bound submitter).`)}function ae(e,t,r){if(Gn(e)&&tu(t))throw new Error(ru(t,r))}function Ir(e,t,r){eu(t,r)&&ae(e,t,r)}function Be(e,t){if(e)return e;let r=t==="button"||t==="input"?"formaction=":"action=";throw new Error(`[webjs] the function in ${r} on <${t||"form"}> is not a server action. Only a function imported from a 'use server' *.server.{js,ts} module can be bound to a form or a submitter, because the identity the browser submits has to resolve back to something the server can run. Move the handler into a server action and import it, or pass a url string.`)}function Yl(e,t){if(e!=null&&!/^post$/i.test(e))throw new Error(`[webjs] <form method="${e}" action=\${action}> cannot work: a bound server action is submitted as a POST body, and a "${e}" form sends no body. Drop the method attribute (WebJs emits method="post") or remove the bound action.`);if(t!=null&&!la.has(t.toLowerCase()))throw new Error(`[webjs] <form enctype="${t}" action=\${action}> cannot work: a form submission is parsed as multipart/form-data or application/x-www-form-urlencoded, and a "${t}" body is neither, so the submission would run under JS and do nothing without it. Drop the enctype attribute (WebJs emits multipart/form-data).`)}function mi(e,t){let r=Zt(e);qr({staticAction:r.has("action")});let n=ua(r.has("method")?r.get("method"):G,r.has("enctype")?r.get("enctype"):G),o=e.endsWith("/>")?"/>":">",i=e.slice(0,e.length-o.length),s="";return n.method!==null&&(s+=` method="${n.method}"`),n.enctype!==null&&(s+=` enctype="${n.enctype}"`),{tag:i+s+o,hidden:Jl(t)}}function qr(e){if(e.duplicateAction)throw new Error("[webjs] two action=${...} holes were found on one <form>. A form can carry only one action binding. Move one to a submit button's formaction=${action} or remove the duplicate.");if(e.staticAction)throw new Error('[webjs] a bound <form action=${action}> also carries a plain action="..." attribute. A bound form posts to the page\'s own url, so the two say different things: without JS the browser would post to the written url and with JS it would not. Drop the action attribute, or drop the binding.');let t=e.propAttrs&&e.propAttrs[0];if(t)throw new Error(`[webjs] a bound <form action=\${action}> also binds .${t}=. A property binding on a native element is dropped at SSR and applied in the browser, so the form would submit one way with JS and another way without it. Write it as a plain attribute.`)}function ua(e,t){let r=e!==G&&e!=null,n=t!==G&&t!=null;return Yl(r?e:null,n?t:null),{method:r?null:"post",enctype:n?null:"multipart/form-data"}}function hi(e,t,r){let n=t!==G&&t!=null,o=r!==G&&r!=null;return Gl(e,n?t:null,o?r:null),{formMethod:n?null:"post",formEnctype:o?null:"multipart/form-data"}}function gi(e,t,r){Xl(e,t,r);let n=Zt(e),o=hi(t,n.has("formmethod")?n.get("formmethod"):G,n.has("formenctype")?n.get("formenctype"):G),i=e.endsWith("/>")?"/>":">",s=e.slice(0,e.length-i.length),a="";return o.formMethod!==null&&(a+=` formmethod="${o.formMethod}"`),o.formEnctype!==null&&(a+=` formenctype="${o.formEnctype}"`),s+a+i}function Jl(e){return`<input type="hidden" name="${B}" value="${U(e)}">`}function fa(e,t,r,n,o){let i=typeof t=="function"?zn(t):null;if(!i){typeof t=="function"&&Be(null,e.localName),Ql(e,r,n,o.propAttrs);return}qr(o);let s=ua(r,n);e.removeAttribute("action"),jr(e,"method",r,s.method),jr(e,"enctype",n,s.enctype),Zl(e,i)}function jr(e,t,r,n){if(n!==null){e.setAttribute(t,n);return}r!==G&&e.getAttribute(t)!==r&&e.setAttribute(t,r)}function Zl(e,t){let r=e.firstElementChild,n=r&&r.localName==="input"&&r.getAttribute("name")===B?r:null;if(!n){for(let o of e.children)if(o.localName==="input"&&o.getAttribute("name")===B){n=o;break}}n||(n=e.ownerDocument.createElement("input"),n.setAttribute("type","hidden"),n.setAttribute("name",B),e.insertBefore(n,e.firstChild)),n.getAttribute("value")!==t&&n.setAttribute("value",t)}function Xl(e,t,r){let n=Zt(e),o=n.has("type")?n.get("type"):null;pi(r.propAttrs,t),Yt(!!r.duplicateAction,t),n.has("formaction")&&di(t),aa(e,"value")>1&&zt(t),aa(e,"name")>1&&Kt(n.get("name")||B,t,!1),fi(t,o),n.has("form")&&Gt(t)}function Ql(e,t,r,n){let o=e.firstElementChild;if(o&&o.localName==="input"&&o.getAttribute("name")===B)o.remove();else for(let s of e.children)if(s.localName==="input"&&s.getAttribute("name")===B){s.remove();break}let i=s=>(n||[]).some(a=>{let c=String(a).toLowerCase();return c===s||s==="enctype"&&c==="encoding"});t===G&&!i("method")&&e.removeAttribute("method"),r===G&&!i("enctype")&&e.removeAttribute("enctype")}function da(e,t,r,n){let o=i=>(n||[]).some(s=>String(s).toLowerCase()===i);t===G&&!o("formmethod")&&e.removeAttribute("formmethod"),r===G&&!o("formenctype")&&e.removeAttribute("formenctype")}function Zt(e){return new Map(pa(e))}function pa(e){let t=[],r=1;for(;r<e.length&&!/[\s/>]/.test(e[r]);)r++;for(;r<e.length;){for(;r<e.length&&/[\s/]/.test(e[r]);)r++;if(r>=e.length||e[r]===">")break;let n="";for(;r<e.length&&!/[\s/>=]/.test(e[r]);)n+=e[r++];for(;r<e.length&&/\s/.test(e[r]);)r++;if(e[r]!=="="){n&&t.push([n.toLowerCase(),""]);continue}for(r++;r<e.length&&/\s/.test(e[r]);)r++;let o="",i=e[r];if(i==='"'||i==="'"){for(r++;r<e.length&&e[r]!==i;)o+=e[r++];r++}else for(;r<e.length&&!/[\s>]/.test(e[r]);)o+=e[r++];n&&t.push([n.toLowerCase(),o])}return t}function aa(e,t){let r=String(t).toLowerCase();return pa(e).filter(([n])=>n===r).length}function eu(e,t){let r=String(e).toLowerCase();Or(r[0])&&(r=r.slice(1));let n=String(t||"").toLowerCase();return r==="action"?n==="form":r==="formaction"?n==="button"||n==="input":!1}function Gn(e,t){if(typeof e=="function")return!0;if(!Array.isArray(e))return!1;let r=t||new Set;return r.has(e)?!1:(r.add(e),e.some(n=>Gn(n,r)))}function tu(e){let t=String(e).toLowerCase();return Or(t[0])&&(t=t.slice(1)),t==="action"||t==="formaction"}function ru(e,t){return`[webjs] a function was interpolated into ${String(e).toLowerCase()}= on <${t||"form"}>. Stringifying a function into HTML would leak its source (a 'use server' action's body included) to every visitor, so this is refused. To run a server action from a form, write an unquoted action=\${action} on the <form> itself or a formaction=\${action} on a <button> inside a bound form. Anywhere else, pass a URL string.`}var B,ca,ui,la,G,Ce=T(()=>{Wt();st();B="__webjs_action",ca="$$webjsAction",ui=null;la=new Set(["multipart/form-data","application/x-www-form-urlencoded"]);G=Symbol("webjs.attr.absent")});function ha(e,t,r){return{[ma]:!0,items:[...e],keyFn:t,templateFn:r}}function ct(e){return!!e&&typeof e=="object"&&e[ma]===!0}var ma,Mr=T(()=>{ma=Symbol.for("webjs.repeat")});function bi(e){return{_$webjs:"unsafe-html",value:String(e??"")}}function Xt(e){return!!e&&typeof e=="object"&&e._$webjs==="unsafe-html"}function nu(e){return{_$webjs:"live",value:e}}function J(e){return!!e&&typeof e=="object"&&e._$webjs==="live"}function ou(e,t){return{_$webjs:"keyed",key:e,value:t}}function lt(e){return!!e&&typeof e=="object"&&e._$webjs==="keyed"}function iu(e,t){return{_$webjs:"guard",deps:e,fn:t}}function ut(e){return!!e&&typeof e=="object"&&e._$webjs==="guard"}function su(e){return{_$webjs:"template-content",template:e}}function Qt(e){return!!e&&typeof e=="object"&&e._$webjs==="template-content"}function au(e){return{_$webjs:"ref",target:e}}function ft(e){return!!e&&typeof e=="object"&&e._$webjs==="ref"}function cu(){return{value:void 0}}function lu(e){return{_$webjs:"cache",value:e}}function dt(e){return!!e&&typeof e=="object"&&e._$webjs==="cache"}function uu(...e){return{_$webjs:"until",args:e}}function pt(e){return!!e&&typeof e=="object"&&e._$webjs==="until"}function fu(e,t){return{_$webjs:"async-append",iterable:e,mapper:t}}function er(e){return!!e&&typeof e=="object"&&e._$webjs==="async-append"}function du(e,t){return{_$webjs:"async-replace",iterable:e,mapper:t}}function tr(e){return!!e&&typeof e=="object"&&e._$webjs==="async-replace"}function pu(e){return{_$webjs:"watch",signal:e}}function mt(e){return!!e&&typeof e=="object"&&e._$webjs==="watch"}var rr=T(()=>{Mr()});var R,L,z,Z,yi,He,ht,wi,ga,V,Si,we,O,Ue=T(()=>{R=Symbol("webjs.slot.state"),L="data-webjs-light",z="data-projection",Z="actual",yi="fallback",He=Symbol("webjs.slot.fallbackFrag"),ht=Symbol("webjs.slot.templateOwner"),wi="data-wj-slot-owner",ga=64,V=Symbol("webjs.slot.rendering"),Si=Symbol("webjs.slot.intercepted"),we=Symbol("webjs.slot.park"),O=new WeakSet});function X(e){let t=e,r=t[R];return r||(r={host:e,authored:[],assignedByName:new Map,lastSnapshot:new WeakMap},t[R]=r),r}function Dr(e){return!!e[R]}function _i(e){let t=X(e);for(;e.firstChild;){let r=e.firstChild;t.authored.push(r),O.add(r),e.removeChild(r)}Se(t)}function Se(e){let t=e.assignedByName;t.clear();for(let r of e.authored)mu(t,Ve(e,r),r)}function Ve(e,t){let r=Fr(e,t);if(r)return te(r.getAttribute("name"));if(e.adoptedKey){let n=e.adoptedKey.get(t);if(n!==void 0)return n}return ba(t)}function Ai(e){let t=X(e);t.adopted=!0;let r=new Set,n=e.querySelectorAll(`slot[${L}]`);for(let o of n){let i=o;if(!ee(e,i)||i.getAttribute(z)!==Z||nr(t,e,i))continue;let s=te(i.getAttribute("name"));if(!r.has(s)){r.add(s);let a=Array.from(i.childNodes);for(let c of a)t.authored.push(c),ba(c)!==s&&(t.adoptedKey||(t.adoptedKey=new WeakMap),t.adoptedKey.set(c,s));t.lastSnapshot.set(i,a.slice())}}for(let o of e.querySelectorAll("wj-slot-park"))if(ee(e,o)){for(let i of Array.from(o.childNodes))O.add(i),t.authored.push(i);o.remove()}Se(t)}function te(e){return e==null||e===""||e==="default"?null:e}function ba(e){return e.nodeType!==1?null:te(e.getAttribute("slot"))}function mu(e,t,r){let n=e.get(t);n||(n=[],e.set(t,n)),n.push(r)}var gt=T(()=>{yt();$r();bt();Ue()});function ya(){_e||!ce||(_e=Node.prototype.appendChild,xi=Node.prototype.insertBefore,We=Node.prototype.removeChild,Yn=Node.prototype.replaceChild,vi=Element.prototype.append,Ei=Element.prototype.prepend,Ti=Element.prototype.replaceChildren,Br=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),Jn=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"))}function wt(e,t){let r=e[V];e[V]=!0;try{return t()}finally{e[V]=r,r||Zn(e)}}function ki(e){if(!ce)return;let t=e,r=X(e);r.backstop||(r.backstop=new MutationObserver(n=>Hr(e,r,n)),r.backstop.observe(e,{childList:!0,subtree:!1}),r.flipSensor=new MutationObserver(n=>wa(e,n)),r.flipSensor.observe(e,{attributes:!0,attributeFilter:["slot","name"],subtree:!0}))}function Hr(e,t,r){let n=e,o=n[we],i=n[Symbol.for("webjs.instance")],s=!1,a=new Set;for(let c of r){for(let l of c.addedNodes)if(a.add(l),l!==o&&!(i&&Ri(i,l))){if(t.authored.indexOf(l)!==-1){s=!0;continue}O.add(l),t.authored.push(l),s=!0}for(let l of c.removedNodes){let u=t.authored.indexOf(l);if(u===-1||e.contains(l))continue;O.has(l)&&l.parentNode==null&&!a.has(l)||(t.authored.splice(u,1),s=!0)}}s&&oe(e)}function Zn(e){let t=e,r=t[R];if(!(r&&r.backstop))return;let n=r.backstop.takeRecords();(!(Symbol.for("webjs.instance")in t)||t[Symbol.for("webjs.instance")])&&Hr(e,r,n)}function wa(e,t){let r=e[R];if(!r)return;let n=!1;for(let o of t){if(o.type!=="attributes")continue;let i=o.target;o.attributeName==="name"?i.tagName==="SLOT"&&i.hasAttribute(L)&&ee(e,i)&&(n=!0):o.attributeName==="slot"&&(r.adoptedKey&&r.adoptedKey.delete(i),r.authored.indexOf(i)!==-1&&(n=!0))}n&&oe(e)}function Ni(e){let t=e[R];t&&(t.backstop&&(Hr(e,t,t.backstop.takeRecords()),t.backstop.disconnect(),t.backstop=void 0),t.flipSensor&&(wa(e,t.flipSensor.takeRecords()),t.flipSensor.disconnect(),t.flipSensor=void 0))}function Ci(e){if(!ce)return;let t=e,r=t[R];if(!r)return;let n=t[Symbol.for("webjs.instance")],o=Symbol.for("webjs.instance")in t,i=!o&&r.adopted===!0,s=!1;for(let a of Array.from(e.childNodes))if(a!==t[we]){if(r.authored.indexOf(a)!==-1){s=!0;continue}o&&(!n||Ri(n,a))||!o&&i||(O.add(a),r.authored.push(a),s=!0)}s&&oe(e)}var _e,xi,We,Yn,vi,Ei,Ti,Br,Jn,Xn=T(()=>{yt();$r();bt();Ur();gt();Ue();_e=null,xi=null,We=null,Yn=null,vi=null,Ei=null,Ti=null,Br=null,Jn=null});function Ri(e,t){if(!e||!e.startNode||!e.endNode)return!1;if(t===e.startNode||t===e.endNode)return!0;for(let r=e.startNode.nextSibling;r&&r!==e.endNode;r=r.nextSibling)if(r===t)return!0;return!1}function Sa(e){let t=e,r=t[we];return(!r||!r.isConnected)&&(r||(r=e.ownerDocument.createElement("wj-slot-park"),r.setAttribute("hidden",""),r.style.display="none",t[we]=r),wt(e,()=>_e.call(e,r))),r}function St(e){return e instanceof Node||!!(e&&typeof e=="object"&&e.ownerDocument&&e.ownerDocument.defaultView&&e instanceof e.ownerDocument.defaultView.Node)}function Li(e,t,r){if(r&&!St(t))return[e.ownerDocument.createTextNode(`${t}`)];if(!St(t))throw new TypeError("Failed to execute insertion on the host: parameter is not of type Node.");if(t&&t.nodeType===11){let n=Array.from(t.childNodes);Qn(e,n);for(let o of n)We.call(t,o);return n}return Qn(e,[t]),[t]}function Qn(e,t){or(e,t);for(let r of t){if(!St(r))throw new TypeError("Failed to execute insertion on the host: parameter is not of type Node.");let n=r.nodeType;if(n!==1&&n!==3&&n!==4&&n!==7&&n!==8&&n!==11)throw new DOMException("Failed to execute insertion on the host: the node type may not be inserted here.","HierarchyRequestError")}}function or(e,t){for(let r of t)if(r===e||r.nodeType===1&&r.contains(e))throw new DOMException("Failed to execute insertion on the host: the new child contains the parent.","HierarchyRequestError")}function Oi(e,t,r){let n=e.authored;for(let i of t){let s=n.indexOf(i);s!==-1&&n.splice(s,1)}let o=r==null?n.length:n.indexOf(r);o===-1&&(o=n.length),n.splice(o,0,...t)}function Ii(e,t){let r=e[R];return r?nr(r,e,t):!1}function nr(e,t,r){for(let n=r;n&&n!==t;n=n.parentNode)if(e.authored.indexOf(n)!==-1)return!0;return!1}function ji(e,t){if(O.has(t))return!0;let r=t.parentNode;if(r==null)return!1;if(r===e||r===e[we])return!0;let n=e[R];return r.nodeType===1&&r.tagName==="SLOT"&&r.hasAttribute(L)&&(n&&n.lastSnapshot.has(r)||e.contains(r)&&ee(e,r))}function Pi(e,t){let r=[];for(let i of t)St(i)?i.nodeType===11?r.push({frag:i}):r.push({node:i}):r.push({text:`${i}`});for(let i of r)i.frag?or(e,Array.from(i.frag.childNodes)):i.node&&Qn(e,[i.node]);let n=e.ownerDocument.createDocumentFragment();for(let i of r)if(i.text!==void 0)_e.call(n,e.ownerDocument.createTextNode(i.text));else if(i.frag){let s=Array.from(i.frag.childNodes);Qn(e,s);for(let a of s)_e.call(n,a)}else i.node&&(or(e,[i.node]),_e.call(n,i.node));let o=Array.from(n.childNodes);or(e,o);for(let i of o)We.call(n,i);return o}function Re(e,t,r){if(t.applying&&t.pendingRecordNodes)for(let n of r||[])t.pendingRecordNodes.add(n);else t.pendingRecordNodes=new Set(r||[]);if(t.adoptedKey&&r)for(let n of r)t.adoptedKey.delete(n);Se(t),oe(e)}function qi(e){if(!ce)return;let t=e;if(t[Si])return;ya(),t[Si]=!0;let r=X(e);t.appendChild=function(n){if(t[V])return _e.call(this,n);let o=Li(e,n,!1);for(let i of o)O.add(i);return Oi(r,o,null),Re(e,r,o),n},t.insertBefore=function(n,o){if(t[V])return xi.call(this,n,o);if(!St(n))throw new TypeError("Failed to execute insertBefore on the host: parameter 1 is not of type Node.");if(o!=null&&!St(o))throw new TypeError("Failed to execute insertBefore on the host: parameter 2 is not of type Node.");if(or(e,n.nodeType===11?Array.from(n.childNodes):[n]),o!=null&&(r.authored.indexOf(o)===-1||!ji(e,o)))throw new DOMException("insertBefore: reference node is not an assigned child of this host","NotFoundError");if(n===o)return n;let i=Li(e,n,!1);for(let s of i)O.add(s);return Oi(r,i,o||null),Re(e,r,i),n},t.removeChild=function(n){if(t[V])return We.call(this,n);let o=r.authored.indexOf(n);if(o===-1)return We.call(this,n);if(!ji(e,n))throw new DOMException("removeChild: the node is not an assigned child of this host","NotFoundError");return r.authored.splice(o,1),Re(e,r,[n]),n},t.replaceChild=function(n,o){if(t[V])return Yn.call(this,n,o);if(r.authored.indexOf(o)===-1)return Yn.call(this,n,o);if(!St(n))throw new TypeError("Failed to execute replaceChild on the host: parameter 1 is not of type Node.");if(or(e,n.nodeType===11?Array.from(n.childNodes):[n]),!ji(e,o))throw new DOMException("replaceChild: the node to be replaced is not an assigned child of this host","NotFoundError");if(n===o)return o;let s=Li(e,n,!1);for(let c of s)O.add(c);for(let c of s){if(c===o)continue;let l=r.authored.indexOf(c);l!==-1&&r.authored.splice(l,1)}let a=r.authored.indexOf(o);return r.authored.splice(a,1,...s),Re(e,r,[...s,o]),o},t.append=function(...n){if(t[V])return vi.apply(this,n);let o=Pi(e,n);for(let i of o)O.add(i);Oi(r,o,null),Re(e,r,o)},t.prepend=function(...n){if(t[V])return Ei.apply(this,n);let o=Pi(e,n);for(let i of o)O.add(i);for(let i of o){let s=r.authored.indexOf(i);s!==-1&&r.authored.splice(s,1)}r.authored.unshift(...o),Re(e,r,o)},t.replaceChildren=function(...n){if(t[V])return Ti.apply(this,n);let o=Pi(e,n);for(let s of o)O.add(s);let i=r.authored;r.authored=o.slice(),Re(e,r,[...i,...o])},Object.defineProperty(t,"innerHTML",{configurable:!0,get(){return Br.get.call(this)},set(n){if(t[V]){Br.set.call(this,n);return}let o=e.ownerDocument.createElement("div");Br.set.call(o,n===null?"":`${n}`);let i=Array.from(o.childNodes);for(let a of i)O.add(a);let s=r.authored;r.authored=i,Re(e,r,[...s,...i])}}),Object.defineProperty(t,"textContent",{configurable:!0,get(){return Jn.get.call(this)},set(n){if(t[V]){Jn.set.call(this,n);return}let o=n==null||n===""?[]:[e.ownerDocument.createTextNode(`${n}`)];for(let s of o)O.add(s);let i=r.authored;r.authored=o,Re(e,r,[...i,...o])}})}var _a,$r=T(()=>{yt();bt();Ur();Xn();gt();Ue();_a=new Set});function Ke(e,t,r){let n=X(e),o=te(t),i=Array.isArray(r)?r.filter(Boolean):r?[r]:[],s=n.authored.findIndex(c=>Ve(n,c)===o),a=n.authored.filter(c=>Ve(n,c)===o);n.authored=n.authored.filter(c=>Ve(n,c)!==o),(s===-1||s>n.authored.length)&&(s=n.authored.length);for(let c of i)c.nodeType===1&&!Fr(n,c)&&(o==null?c.removeAttribute("slot"):c.setAttribute("slot",o)),O.add(c);if(n.authored.splice(s,0,...i),n.applying&&n.pendingRecordNodes){for(let c of a)n.pendingRecordNodes.add(c);for(let c of i)n.pendingRecordNodes.add(c)}else n.pendingRecordNodes=new Set([...a,...i]);if(n.adoptedKey){for(let c of a)n.adoptedKey.delete(c);for(let c of i)n.adoptedKey.delete(c)}Se(n),oe(e)}function oe(e){if(!ce)return;let t=e[R];if(t){if(t.applying){t.reapply=!0;return}t.applying=!0;try{do{t.reapply=!1;let r=t.pendingRecordNodes||_a;t.pendingRecordNodes=void 0,hu(e,t,r),gu(e,t),Se(t);let n=[],o=new Set;for(let u of e.querySelectorAll(`slot[${L}]`))if(ee(e,u)&&!nr(t,e,u)){if(!u.hasAttribute(z)&&!(He in u)){o.add(te(u.getAttribute("name")));continue}n.push(u)}let i=new Map;for(let u of n){let f=te(u.getAttribute("name")),d=i.get(f);d||(d=[],i.set(f,d)),d.push(u)}let s=[];for(let[u,f]of i){let d=t.assignedByName.get(u)||[];for(let p=0;p<f.length;p++){let m=f[p],y=d.filter(S=>{let b=Fr(t,S);return b?b===m:p===0}),g=y.filter(S=>S===e||S.nodeType===1&&S.contains(e));if(g.length){for(let S of g)O.delete(S);y=y.filter(S=>g.indexOf(S)===-1)}y.length>0?Mi(t,m,y)&&s.push(m):Di(t,m)&&s.push(m)}}for(let u of s)$i(t,u);let a=new Set(i.keys());for(let u of o)a.add(u);let c=new Set;for(let u of t.authored)a.has(Ve(t,u))||c.add(u);let l=e[we];if(l)for(let u of Array.from(l.childNodes))c.has(u)||We.call(l,u);if(c.size){let u=Sa(e);for(let f of c)f.parentNode!==u&&(O.delete(f),wt(e,()=>_e.call(u,f)))}if(t.backstop){let u=t.backstop.takeRecords();u.length&&Hr(e,t,u)}}while(t.reapply)}finally{t.applying=!1}}}function hu(e,t,r){for(let n of e.querySelectorAll(`slot[${L}][${z}="${Z}"]`)){if(!ee(e,n)||nr(t,e,n))continue;let o=n,i=t.lastSnapshot.get(o);if(!i)continue;let s=Array.from(o.childNodes);if(eo(s,i))continue;let a=t.authored,c=te(o.getAttribute("name")),l=s.filter(m=>!r.has(m));for(let m of l)a.indexOf(m)===-1&&Ve(t,m)!==c&&(t.adoptedKey||(t.adoptedKey=new WeakMap),t.adoptedKey.set(m,c));for(let m of a){if(l.indexOf(m)!==-1||Ve(t,m)!==c)continue;let y=a.indexOf(m),g=0;for(let S=0;S<l.length;S++){let b=a.indexOf(l[S]);b!==-1&&b<y&&(g=S+1)}l.splice(g,0,m)}let u=new Set(l);for(let m of i)u.add(m);let f=-1,d=0;for(let m of a){if(u.has(m)){f===-1&&(f=d);continue}d+=1}let p=a.filter(m=>!u.has(m));(f===-1||f>p.length)&&(f=p.length),p.splice(f,0,...l),t.authored=p}}function gu(e,t){let r=e[we];t.authored=t.authored.filter(n=>{if(O.has(n))return!0;let o=n.parentNode;return o==null?!1:!!(o===e||o===r||o.nodeType===1&&o.tagName==="SLOT"&&o.hasAttribute(L)&&(t.lastSnapshot.has(o)||e.contains(o)&&ee(e,o)))})}var Ur=T(()=>{yt();$r();bt();Xn();gt();Ue()});function va(){return typeof HTMLElement<"u"&&typeof HTMLSlotElement<"u"}function Ea(){if(Aa||(ce=va(),!ce))return;Vr=HTMLSlotElement.prototype.assignedNodes,Fi=HTMLSlotElement.prototype.assignedElements,to=Object.getOwnPropertyDescriptor(Element.prototype,"assignedSlot"),HTMLSlotElement.prototype.assignedNodes=function(r){return this.hasAttribute(L)&&!Hi(this)?Ui(this,r):Vr?Vr.call(this,r):[]},HTMLSlotElement.prototype.assignedElements=function(r){return this.hasAttribute(L)&&!Hi(this)?Ui(this,r).filter(n=>n.nodeType===1):Fi?Fi.call(this,r):[]},Object.defineProperty(Element.prototype,"assignedSlot",{configurable:!0,enumerable:!0,get:function(){let r=to&&to.get?to.get.call(this):null;return r||xa(this)}});let e=Object.getOwnPropertyDescriptor(Text.prototype,"assignedSlot");Object.defineProperty(Text.prototype,"assignedSlot",{configurable:!0,enumerable:!0,get:function(){let r=e&&e.get?e.get.call(this):null;return r||xa(this)}}),Bi=HTMLSlotElement.prototype.assign,HTMLSlotElement.prototype.assign=function(...r){if(this.hasAttribute(L)&&!Hi(this)){let n=bu(this);if(n){let o=X(n);o.manualAssign||(o.manualAssign=new Map);let i=r.filter(Boolean);for(let[s,a]of o.manualAssign){if(s===this)continue;let c=a.filter(l=>{let u=l.deref();return u!==void 0&&i.indexOf(u)===-1});c.length!==a.length&&(c.length?o.manualAssign.set(s,c):o.manualAssign.delete(s))}if(i.length?o.manualAssign.set(this,i.map(s=>new WeakRef(s))):o.manualAssign.delete(this),o.applying&&o.pendingRecordNodes)for(let s of i)o.pendingRecordNodes.add(s);else o.pendingRecordNodes=new Set(i);Se(o),oe(n)}return}return Bi?Bi.apply(this,r):void 0},Aa=!0}function Fr(e,t){let r=e.manualAssign;if(!r||!r.size)return null;for(let[n,o]of r){let i=!1,s=o.filter(a=>{let c=a.deref();return c===void 0?!1:(c===t&&(i=!0),!0)});if(s.length!==o.length&&(s.length?r.set(n,s):r.delete(n)),i){let a=e.host;return a&&(n===a||a.contains(n))?n:null}}return null}function bu(e){for(let t=e.parentElement;t;t=t.parentElement)if(t[R])return ee(t,e)?t:null;return null}function Hi(e){let t=e;for(let r=0;r<128;r++){let n=t.parentNode;if(!n||n===t)return!1;if(n.nodeType===11&&n.host)return!0;t=n}return!1}function Ui(e,t){if(e.getAttribute(z)!==Z)return[];let r=Array.from(e.childNodes);return!t||!t.flatten?r:Vi(r,new Set,0)}function Vi(e,t,r){if(r>=ga)return e.slice();let n=[];for(let o of e)if(o.nodeType===1&&o.tagName==="SLOT"){let i=o;if(t.has(i))continue;if(t.add(i),i.hasAttribute(L)){let s=Ui(i,{flatten:!1});if(s.length>0)for(let a of Vi(s,t,r+1))n.push(a);else for(let a of Vi(Array.from(i.childNodes),t,r+1))n.push(a)}else if(Vr){let s=Vr.call(i,{flatten:!0});for(let a of s)n.push(a)}else n.push(o)}else n.push(o);return n}function xa(e){let t=e.parentElement;return t&&t.tagName==="SLOT"&&t.hasAttribute(L)&&t.getAttribute(z)===Z?t:null}var ce,Vr,Fi,to,Bi,Aa,bt=T(()=>{yt();Ur();gt();Ue();ce=va(),Vr=null,Fi=null,to=null,Bi=null,Aa=!1;Ea()});function Wi(e){if(!ce)return!1;for(let t of e.querySelectorAll(`slot[${L}][${z}]`))if(ee(e,t))return!0;return!1}function ee(e,t){let r=t[ht];if(r)return r===e;let n=typeof t.getAttribute=="function"?t.getAttribute(wi):null;if(n){let o=yu(t,n);if(o)return o===e}for(let o=t.parentElement;o&&o!==e;o=o.parentElement)if(o.tagName.includes("-"))return!1;return!0}function yu(e,t){let r=t.toLowerCase();for(let n=e.parentElement;n;n=n.parentElement)if(n.tagName.toLowerCase()===r)return n;return null}function Mi(e,t,r){for(let l of r)O.delete(l);let n=t.getAttribute(z)!==Z,o=e.lastSnapshot.get(t)||[],i=n||!eo(o,r);if(!n&&eo(Array.from(t.childNodes),r))return e.lastSnapshot.set(t,r.slice()),i;let s=t[He];if(n&&s)for(;t.firstChild;)s.appendChild(t.firstChild);let a=new Set(r);for(let l of Array.from(t.childNodes))a.has(l)||t.removeChild(l);let c=t.firstChild;for(let l of r){if(l===c){c=c.nextSibling;continue}t.insertBefore(l,c)}return t.setAttribute(z,Z),e.lastSnapshot.set(t,r.slice()),i}function Di(e,t){let r=t.getAttribute(z)===Z;if(t.setAttribute(z,yi),!r)return Ta(t),!1;for(e.lastSnapshot.delete(t);t.firstChild;)t.removeChild(t.firstChild);return Ta(t),!0}function Ta(e){let t=e[He];!t||t.childNodes.length===0||e.appendChild(t)}function Ki(e,t){if(!Dr(e))return;let r=X(e),n=te(t.getAttribute("name")),o=r.assignedByName.get(n);if(o)for(let i of o)i.parentNode===t&&(O.add(i),t.removeChild(i));r.lastSnapshot.delete(t)}function ka(e){e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1}))}function $i(e,t){e.pendingSlotChanges||(e.pendingSlotChanges=new Set),e.pendingSlotChanges.add(t),!e.slotChangeScheduled&&(e.slotChangeScheduled=!0,queueMicrotask(()=>{e.slotChangeScheduled=!1;let r=e.pendingSlotChanges||new Set;e.pendingSlotChanges=new Set;for(let n of r)ka(n)}))}function eo(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var yt=T(()=>{bt();gt();Ue()});var _t=T(()=>{yt();$r();bt();Ur();Xn();gt();Ue()});function Ja(e,t,r){sf.has(t)?Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}):e[t]=r}async function Qr(e){return JSON.stringify(await Za(e))}function Le(e){return Xa(JSON.parse(e))}async function Za(e){let t=af();return await cf(e,t),Tt(e,t)}function Xa(e){return Ye(e,df())}function af(){return{refCount:new Map,idOf:new Map,emitted:new Set,nextId:0,blobBytes:new Map,fdEntries:new Map}}async function cf(e,t){let r=[e];for(;r.length;){let n=r.pop();if(!mf(n))continue;let o=t.refCount.get(n)||0;if(t.refCount.set(n,o+1),!(o>0)){if(typeof Blob<"u"&&n instanceof Blob){let i=new Uint8Array(await n.arrayBuffer());t.blobBytes.set(n,i);continue}if(typeof FormData<"u"&&n instanceof FormData){let i=t.fdEntries.get(n)||[...n.entries()];t.fdEntries.set(n,i);for(let[,s]of i)typeof s!="string"&&r.push(s);continue}if(Array.isArray(n))for(let i=0;i<n.length;i++)r.push(n[i]);else if(n instanceof Map)for(let[i,s]of n)r.push(i),r.push(s);else if(n instanceof Set)for(let i of n)r.push(i);else if(hf(n))for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&r.push(n[i])}}for(let[n,o]of t.refCount)o>1&&t.idOf.set(n,t.nextId++)}function Tt(e,t){if(e===null)return null;if(e===void 0)return{[H]:"undef"};let r=typeof e;if(r==="string"||r==="boolean")return e;if(r==="number")return Number.isNaN(e)?{[H]:"NaN"}:e===1/0?{[H]:"Inf"}:e===-1/0?{[H]:"-Inf"}:Object.is(e,-0)?{[H]:"-0"}:e;if(r==="bigint")return{[H]:"BigInt",v:e.toString()};if(r==="symbol"){let i=Symbol.keyFor(e);if(i===void 0)throw new TypeError("Cannot serialize a local Symbol; only Symbol.for() registered symbols are supported.");return{[H]:"Sym",v:i}}if(r==="function")throw new TypeError("Cannot serialize a function.");let n=t.idOf.get(e);if(n!==void 0&&t.emitted.has(n))return{[H]:"Ref",v:n};n!==void 0&&t.emitted.add(n);let o;if(e instanceof Date)o={[H]:"Date",v:Number.isNaN(e.getTime())?null:e.toISOString()};else if(e instanceof Error)o={[H]:"Error",v:{name:e.name,message:e.message,stack:e.stack||null}};else if(typeof Blob<"u"&&e instanceof Blob){let i=t.blobBytes.get(e);typeof File<"u"&&e instanceof File?o={[H]:"File",v:Xr(i),n:e.name,t:e.type||"",m:e.lastModified}:o={[H]:"Blob",v:Xr(i),t:e.type||""}}else if(typeof FormData<"u"&&e instanceof FormData){let i=t.fdEntries.get(e)||[...e.entries()],s=[];for(let[a,c]of i)s.push([a,Tt(c,t)]);o={[H]:"FD",v:s}}else if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)o=lf(e);else if(e instanceof Map){let i=[];for(let[s,a]of e)i.push([Tt(s,t),Tt(a,t)]);o={[H]:"Map",v:i}}else if(e instanceof Set){let i=[];for(let s of e)i.push(Tt(s,t));o={[H]:"Set",v:i}}else if(Array.isArray(e))o=e.map(i=>Tt(i,t));else{o={};for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let s=gf(i)?"_"+i:i;Ja(o,s,Tt(e[i],t))}}if(n!==void 0){if(Array.isArray(o))return{[H]:"Arr",_id:n,v:o};o._id=n}return o}function lf(e){if(e instanceof ArrayBuffer)return{[H]:"buf",v:Xr(new Uint8Array(e))};if(e instanceof DataView)return{[H]:"dv",v:Xr(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))};let t=e.constructor.name,r=uf[t];if(!r)throw new TypeError(`Unsupported typed array: ${t}`);let n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return{[H]:r,v:Xr(n)}}function df(){return{refs:new Map}}function Ye(e,t){if(e===null||typeof e!="object")return e;if(Array.isArray(e)){let i=[];for(let s=0;s<e.length;s++)i.push(Ye(e[s],t));return i}let r=e[H];if(typeof r=="string")return pf(e,r,t);let n={},o=e._id;typeof o=="number"&&t.refs.set(o,n);for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i)||i==="_id")continue;let s=bf(i)?i.slice(1):i;Ja(n,s,Ye(e[i],t))}return n}function pf(e,t,r){let n=e._id,o=i=>(typeof n=="number"&&r.refs.set(n,i),i);switch(t){case"undef":return;case"NaN":return NaN;case"Inf":return 1/0;case"-Inf":return-1/0;case"-0":return-0;case"BigInt":return o(BigInt(e.v));case"Sym":return o(Symbol.for(e.v));case"Date":return o(e.v==null?new Date(NaN):new Date(e.v));case"Error":{let i=new Error(e.v.message);return i.name=e.v.name,e.v.stack&&(i.stack=e.v.stack),typeof n=="number"&&r.refs.set(n,i),i}case"Map":{let i=new Map;typeof n=="number"&&r.refs.set(n,i);for(let[s,a]of e.v)i.set(Ye(s,r),Ye(a,r));return i}case"Set":{let i=new Set;typeof n=="number"&&r.refs.set(n,i);for(let s of e.v)i.add(Ye(s,r));return i}case"Arr":{let i=[];typeof n=="number"&&r.refs.set(n,i);for(let s of e.v)i.push(Ye(s,r));return i}case"Ref":{let i=r.refs.get(e.v);if(i===void 0)throw new TypeError(`Dangling reference: id=${e.v}`);return i}case"Blob":{if(typeof Blob>"u")throw new TypeError("Blob is not available in this environment.");let i=Zr(e.v);return o(new Blob([i],{type:e.t||""}))}case"File":{if(typeof File>"u")throw new TypeError("File is not available in this environment.");let i=Zr(e.v);return o(new File([i],e.n,{type:e.t||"",lastModified:e.m}))}case"FD":{if(typeof FormData>"u")throw new TypeError("FormData is not available in this environment.");let i=new FormData;o(i);for(let[s,a]of e.v){let c=Ye(a,r);i.append(s,c)}return i}default:{if(t==="buf"){let s=Zr(e.v);return o(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength))}if(t==="dv"){let s=Zr(e.v);return o(new DataView(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)))}let i=ff[t];if(i){let s=Zr(e.v),a=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength);return o(new i(a))}throw new TypeError(`Unknown serialization tag: ${t}`)}}}function mf(e){return e!==null&&typeof e=="object"}function hf(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function gf(e){return/^_+\$wj$/.test(e)||/^_+id$/.test(e)}function bf(e){return/^__+\$wj$/.test(e)||/^__+id$/.test(e)}function Xr(e){if(Qa)return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64");let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Zr(e){if(Qa){let n=Buffer.from(e,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}var H,sf,uf,ff,Qa,kt=T(()=>{H="_$wj",sf=new Set(["__proto__","constructor","prototype"]);uf={Int8Array:"i8",Uint8Array:"u8",Uint8ClampedArray:"u8c",Int16Array:"i16",Uint16Array:"u16",Int32Array:"i32",Uint32Array:"u32",Float32Array:"f32",Float64Array:"f64",BigInt64Array:"bi64",BigUint64Array:"bu64"},ff={i8:Int8Array,u8:Uint8Array,u8c:Uint8ClampedArray,i16:Int16Array,u16:Uint16Array,i32:Int32Array,u32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:typeof BigInt64Array<"u"?BigInt64Array:null,bu64:typeof BigUint64Array<"u"?BigUint64Array:null};Qa=typeof Buffer<"u"&&typeof Buffer.from=="function"});function vf(e){return{_$webjsSuspense:!0,fallback:e.fallback,children:e.children}}function wo(e){return!!e&&typeof e=="object"&&e._$webjsSuspense===!0}var Zm,hs=T(()=>{Zm=Symbol.for("webjs.suspense")});function ac(e){return Ef.has(e.toLowerCase())}function gs(e,t){let r=t+4;if(e[r]===">")return r+1;if(e.startsWith("->",r))return r+2;for(;r<e.length;){if(e.startsWith("-->",r))return r+3;if(e.startsWith("--!>",r))return r+4;r+=1}return-1}function Tf(e,t){let r=/<!--|-->|<\/script(?=[\s/>])|<script(?=[\s/>])/gi;r.lastIndex=t;let n=!1,o=!1,i;for(;(i=r.exec(e))!==null;){let s=i[0];if(s==="<!--"){let a=i.index+4;for(;e[a]==="-";)a+=1;e[a]===">"?(n=!1,o=!1,r.lastIndex=a+1):n||(n=!0)}else if(s==="-->")n=!1,o=!1;else if(s[1]==="/")if(o)o=!1;else return i.index;else n&&(o=!0)}return-1}function fr(e){let t=[],r=e.length,n=0;for(;n<r;){let o=e.indexOf("<",n);if(o===-1)break;if(e.startsWith("<!--",o)){let p=gs(e,o),m=p===-1?r:p;t.push([o,m]),n=m;continue}if(e.startsWith("<!",o)||e.startsWith("<?",o)){let p=e.indexOf(">",o),m=p===-1?r:p+1;t.push([o,m]),n=m;continue}let i=/^<\/?([a-zA-Z][^\s/>]*)/.exec(e.slice(o,o+64));if(!i){if(e.startsWith("</",o)){let p=e.indexOf(">",o),m=p===-1?r:p+1;t.push([o,m]),n=m;continue}n=o+1;continue}let s=o+1,a="",c=!1,l=!1,u=!1;for(;s<r;){let p=e[s],m=p===" "||p===" "||p===`
2
- `||p==="\r"||p==="\f";if(a)p===a&&(a="");else if(p===">"){u=!l&&e[s-1]==="/",s+=1;break}else c?m||(p==='"'||p==="'"?a=p:l=!0,c=!1):l?m&&(l=!1):p==="="&&(c=!0);s+=1}s>o+1&&t.push([o+1,s]),n=s;let f=i[1].toLowerCase();if(!(e[o+1]==="/")&&!u&&Cf(f)){let p;if(f==="plaintext")p=r;else if(f==="script"){let m=Tf(e,s);p=m===-1?r:m}else{let m=new RegExp(`</${f}(?=[\\s/>])`,"i").exec(e.slice(s));p=m?s+m.index:r}p>s&&t.push([s,p]),n=p}}return t}function kf(e,t){for(let[r,n]of e){if(r>t)return!1;if(t<n)return!0}return!1}function rn(e){let t=0;return r=>{for(;t<e.length&&e[t][1]<=r;)t+=1;return t>=e.length?!1:r>=e[t][0]}}function Nt(e,t,r,n){let o=Ct(r),i=new RegExp(`<${o}(?:[\\s>/])`,"gi"),s=new RegExp(`</${o}\\s*>`,"gi"),a=n===void 0?fr(e):n,c=u=>{let f;for(;(f=u.exec(e))!==null;)if(a.length===0||!kf(a,f.index))return f;return null};i.lastIndex=t,s.lastIndex=t;let l=1;for(;l>0;){let u=c(i),f=c(s);if(!f)return-1;if(u&&u.index<f.index)l++,s.lastIndex=u.index+1;else{if(l--,l===0)return f.index;i.lastIndex=f.index+1}}return-1}function Ct(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function So(e){return e==="script"||e==="style"}function Nf(e){return e==="textarea"||e==="title"}function Cf(e){return So(e)||Nf(e)||e==="iframe"||e==="xmp"||e==="noembed"||e==="noframes"||e==="plaintext"}var Ef,_o=T(()=>{Ef=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"])});var cc,lc,uc=T(()=>{cc={AElig:198,AMP:38,Aacute:193,Abreve:258,Acirc:194,Acy:1040,Afr:120068,Agrave:192,Alpha:913,Amacr:256,And:10835,Aogon:260,Aopf:120120,ApplyFunction:8289,Aring:197,Ascr:119964,Assign:8788,Atilde:195,Auml:196,Backslash:8726,Barv:10983,Barwed:8966,Bcy:1041,Because:8757,Bernoullis:8492,Beta:914,Bfr:120069,Bopf:120121,Breve:728,Bscr:8492,Bumpeq:8782,CHcy:1063,COPY:169,Cacute:262,Cap:8914,CapitalDifferentialD:8517,Cayleys:8493,Ccaron:268,Ccedil:199,Ccirc:264,Cconint:8752,Cdot:266,Cedilla:184,CenterDot:183,Cfr:8493,Chi:935,CircleDot:8857,CircleMinus:8854,CirclePlus:8853,CircleTimes:8855,ClockwiseContourIntegral:8754,CloseCurlyDoubleQuote:8221,CloseCurlyQuote:8217,Colon:8759,Colone:10868,Congruent:8801,Conint:8751,ContourIntegral:8750,Copf:8450,Coproduct:8720,CounterClockwiseContourIntegral:8755,Cross:10799,Cscr:119966,Cup:8915,CupCap:8781,DD:8517,DDotrahd:10513,DJcy:1026,DScy:1029,DZcy:1039,Dagger:8225,Darr:8609,Dashv:10980,Dcaron:270,Dcy:1044,Del:8711,Delta:916,Dfr:120071,DiacriticalAcute:180,DiacriticalDot:729,DiacriticalDoubleAcute:733,DiacriticalGrave:96,DiacriticalTilde:732,Diamond:8900,DifferentialD:8518,Dopf:120123,Dot:168,DotDot:8412,DotEqual:8784,DoubleContourIntegral:8751,DoubleDot:168,DoubleDownArrow:8659,DoubleLeftArrow:8656,DoubleLeftRightArrow:8660,DoubleLeftTee:10980,DoubleLongLeftArrow:10232,DoubleLongLeftRightArrow:10234,DoubleLongRightArrow:10233,DoubleRightArrow:8658,DoubleRightTee:8872,DoubleUpArrow:8657,DoubleUpDownArrow:8661,DoubleVerticalBar:8741,DownArrow:8595,DownArrowBar:10515,DownArrowUpArrow:8693,DownBreve:785,DownLeftRightVector:10576,DownLeftTeeVector:10590,DownLeftVector:8637,DownLeftVectorBar:10582,DownRightTeeVector:10591,DownRightVector:8641,DownRightVectorBar:10583,DownTee:8868,DownTeeArrow:8615,Downarrow:8659,Dscr:119967,Dstrok:272,ENG:330,ETH:208,Eacute:201,Ecaron:282,Ecirc:202,Ecy:1069,Edot:278,Efr:120072,Egrave:200,Element:8712,Emacr:274,EmptySmallSquare:9723,EmptyVerySmallSquare:9643,Eogon:280,Eopf:120124,Epsilon:917,Equal:10869,EqualTilde:8770,Equilibrium:8652,Escr:8496,Esim:10867,Eta:919,Euml:203,Exists:8707,ExponentialE:8519,Fcy:1060,Ffr:120073,FilledSmallSquare:9724,FilledVerySmallSquare:9642,Fopf:120125,ForAll:8704,Fouriertrf:8497,Fscr:8497,GJcy:1027,GT:62,Gamma:915,Gammad:988,Gbreve:286,Gcedil:290,Gcirc:284,Gcy:1043,Gdot:288,Gfr:120074,Gg:8921,Gopf:120126,GreaterEqual:8805,GreaterEqualLess:8923,GreaterFullEqual:8807,GreaterGreater:10914,GreaterLess:8823,GreaterSlantEqual:10878,GreaterTilde:8819,Gscr:119970,Gt:8811,HARDcy:1066,Hacek:711,Hat:94,Hcirc:292,Hfr:8460,HilbertSpace:8459,Hopf:8461,HorizontalLine:9472,Hscr:8459,Hstrok:294,HumpDownHump:8782,HumpEqual:8783,IEcy:1045,IJlig:306,IOcy:1025,Iacute:205,Icirc:206,Icy:1048,Idot:304,Ifr:8465,Igrave:204,Im:8465,Imacr:298,ImaginaryI:8520,Implies:8658,Int:8748,Integral:8747,Intersection:8898,InvisibleComma:8291,InvisibleTimes:8290,Iogon:302,Iopf:120128,Iota:921,Iscr:8464,Itilde:296,Iukcy:1030,Iuml:207,Jcirc:308,Jcy:1049,Jfr:120077,Jopf:120129,Jscr:119973,Jsercy:1032,Jukcy:1028,KHcy:1061,KJcy:1036,Kappa:922,Kcedil:310,Kcy:1050,Kfr:120078,Kopf:120130,Kscr:119974,LJcy:1033,LT:60,Lacute:313,Lambda:923,Lang:10218,Laplacetrf:8466,Larr:8606,Lcaron:317,Lcedil:315,Lcy:1051,LeftAngleBracket:10216,LeftArrow:8592,LeftArrowBar:8676,LeftArrowRightArrow:8646,LeftCeiling:8968,LeftDoubleBracket:10214,LeftDownTeeVector:10593,LeftDownVector:8643,LeftDownVectorBar:10585,LeftFloor:8970,LeftRightArrow:8596,LeftRightVector:10574,LeftTee:8867,LeftTeeArrow:8612,LeftTeeVector:10586,LeftTriangle:8882,LeftTriangleBar:10703,LeftTriangleEqual:8884,LeftUpDownVector:10577,LeftUpTeeVector:10592,LeftUpVector:8639,LeftUpVectorBar:10584,LeftVector:8636,LeftVectorBar:10578,Leftarrow:8656,Leftrightarrow:8660,LessEqualGreater:8922,LessFullEqual:8806,LessGreater:8822,LessLess:10913,LessSlantEqual:10877,LessTilde:8818,Lfr:120079,Ll:8920,Lleftarrow:8666,Lmidot:319,LongLeftArrow:10229,LongLeftRightArrow:10231,LongRightArrow:10230,Longleftarrow:10232,Longleftrightarrow:10234,Longrightarrow:10233,Lopf:120131,LowerLeftArrow:8601,LowerRightArrow:8600,Lscr:8466,Lsh:8624,Lstrok:321,Lt:8810,Map:10501,Mcy:1052,MediumSpace:8287,Mellintrf:8499,Mfr:120080,MinusPlus:8723,Mopf:120132,Mscr:8499,Mu:924,NJcy:1034,Nacute:323,Ncaron:327,Ncedil:325,Ncy:1053,NegativeMediumSpace:8203,NegativeThickSpace:8203,NegativeThinSpace:8203,NegativeVeryThinSpace:8203,NestedGreaterGreater:8811,NestedLessLess:8810,NewLine:10,Nfr:120081,NoBreak:8288,NonBreakingSpace:160,Nopf:8469,Not:10988,NotCongruent:8802,NotCupCap:8813,NotDoubleVerticalBar:8742,NotElement:8713,NotEqual:8800,NotEqualTilde:[8770,824],NotExists:8708,NotGreater:8815,NotGreaterEqual:8817,NotGreaterFullEqual:[8807,824],NotGreaterGreater:[8811,824],NotGreaterLess:8825,NotGreaterSlantEqual:[10878,824],NotGreaterTilde:8821,NotHumpDownHump:[8782,824],NotHumpEqual:[8783,824],NotLeftTriangle:8938,NotLeftTriangleBar:[10703,824],NotLeftTriangleEqual:8940,NotLess:8814,NotLessEqual:8816,NotLessGreater:8824,NotLessLess:[8810,824],NotLessSlantEqual:[10877,824],NotLessTilde:8820,NotNestedGreaterGreater:[10914,824],NotNestedLessLess:[10913,824],NotPrecedes:8832,NotPrecedesEqual:[10927,824],NotPrecedesSlantEqual:8928,NotReverseElement:8716,NotRightTriangle:8939,NotRightTriangleBar:[10704,824],NotRightTriangleEqual:8941,NotSquareSubset:[8847,824],NotSquareSubsetEqual:8930,NotSquareSuperset:[8848,824],NotSquareSupersetEqual:8931,NotSubset:[8834,8402],NotSubsetEqual:8840,NotSucceeds:8833,NotSucceedsEqual:[10928,824],NotSucceedsSlantEqual:8929,NotSucceedsTilde:[8831,824],NotSuperset:[8835,8402],NotSupersetEqual:8841,NotTilde:8769,NotTildeEqual:8772,NotTildeFullEqual:8775,NotTildeTilde:8777,NotVerticalBar:8740,Nscr:119977,Ntilde:209,Nu:925,OElig:338,Oacute:211,Ocirc:212,Ocy:1054,Odblac:336,Ofr:120082,Ograve:210,Omacr:332,Omega:937,Omicron:927,Oopf:120134,OpenCurlyDoubleQuote:8220,OpenCurlyQuote:8216,Or:10836,Oscr:119978,Oslash:216,Otilde:213,Otimes:10807,Ouml:214,OverBar:8254,OverBrace:9182,OverBracket:9140,OverParenthesis:9180,PartialD:8706,Pcy:1055,Pfr:120083,Phi:934,Pi:928,PlusMinus:177,Poincareplane:8460,Popf:8473,Pr:10939,Precedes:8826,PrecedesEqual:10927,PrecedesSlantEqual:8828,PrecedesTilde:8830,Prime:8243,Product:8719,Proportion:8759,Proportional:8733,Pscr:119979,Psi:936,QUOT:34,Qfr:120084,Qopf:8474,Qscr:119980,RBarr:10512,REG:174,Racute:340,Rang:10219,Rarr:8608,Rarrtl:10518,Rcaron:344,Rcedil:342,Rcy:1056,Re:8476,ReverseElement:8715,ReverseEquilibrium:8651,ReverseUpEquilibrium:10607,Rfr:8476,Rho:929,RightAngleBracket:10217,RightArrow:8594,RightArrowBar:8677,RightArrowLeftArrow:8644,RightCeiling:8969,RightDoubleBracket:10215,RightDownTeeVector:10589,RightDownVector:8642,RightDownVectorBar:10581,RightFloor:8971,RightTee:8866,RightTeeArrow:8614,RightTeeVector:10587,RightTriangle:8883,RightTriangleBar:10704,RightTriangleEqual:8885,RightUpDownVector:10575,RightUpTeeVector:10588,RightUpVector:8638,RightUpVectorBar:10580,RightVector:8640,RightVectorBar:10579,Rightarrow:8658,Ropf:8477,RoundImplies:10608,Rrightarrow:8667,Rscr:8475,Rsh:8625,RuleDelayed:10740,SHCHcy:1065,SHcy:1064,SOFTcy:1068,Sacute:346,Sc:10940,Scaron:352,Scedil:350,Scirc:348,Scy:1057,Sfr:120086,ShortDownArrow:8595,ShortLeftArrow:8592,ShortRightArrow:8594,ShortUpArrow:8593,Sigma:931,SmallCircle:8728,Sopf:120138,Sqrt:8730,Square:9633,SquareIntersection:8851,SquareSubset:8847,SquareSubsetEqual:8849,SquareSuperset:8848,SquareSupersetEqual:8850,SquareUnion:8852,Sscr:119982,Star:8902,Sub:8912,Subset:8912,SubsetEqual:8838,Succeeds:8827,SucceedsEqual:10928,SucceedsSlantEqual:8829,SucceedsTilde:8831,SuchThat:8715,Sum:8721,Sup:8913,Superset:8835,SupersetEqual:8839,Supset:8913,THORN:222,TRADE:8482,TSHcy:1035,TScy:1062,Tab:9,Tau:932,Tcaron:356,Tcedil:354,Tcy:1058,Tfr:120087,Therefore:8756,Theta:920,ThickSpace:[8287,8202],ThinSpace:8201,Tilde:8764,TildeEqual:8771,TildeFullEqual:8773,TildeTilde:8776,Topf:120139,TripleDot:8411,Tscr:119983,Tstrok:358,Uacute:218,Uarr:8607,Uarrocir:10569,Ubrcy:1038,Ubreve:364,Ucirc:219,Ucy:1059,Udblac:368,Ufr:120088,Ugrave:217,Umacr:362,UnderBar:95,UnderBrace:9183,UnderBracket:9141,UnderParenthesis:9181,Union:8899,UnionPlus:8846,Uogon:370,Uopf:120140,UpArrow:8593,UpArrowBar:10514,UpArrowDownArrow:8645,UpDownArrow:8597,UpEquilibrium:10606,UpTee:8869,UpTeeArrow:8613,Uparrow:8657,Updownarrow:8661,UpperLeftArrow:8598,UpperRightArrow:8599,Upsi:978,Upsilon:933,Uring:366,Uscr:119984,Utilde:360,Uuml:220,VDash:8875,Vbar:10987,Vcy:1042,Vdash:8873,Vdashl:10982,Vee:8897,Verbar:8214,Vert:8214,VerticalBar:8739,VerticalLine:124,VerticalSeparator:10072,VerticalTilde:8768,VeryThinSpace:8202,Vfr:120089,Vopf:120141,Vscr:119985,Vvdash:8874,Wcirc:372,Wedge:8896,Wfr:120090,Wopf:120142,Wscr:119986,Xfr:120091,Xi:926,Xopf:120143,Xscr:119987,YAcy:1071,YIcy:1031,YUcy:1070,Yacute:221,Ycirc:374,Ycy:1067,Yfr:120092,Yopf:120144,Yscr:119988,Yuml:376,ZHcy:1046,Zacute:377,Zcaron:381,Zcy:1047,Zdot:379,ZeroWidthSpace:8203,Zeta:918,Zfr:8488,Zopf:8484,Zscr:119989,aacute:225,abreve:259,ac:8766,acE:[8766,819],acd:8767,acirc:226,acute:180,acy:1072,aelig:230,af:8289,afr:120094,agrave:224,alefsym:8501,aleph:8501,alpha:945,amacr:257,amalg:10815,amp:38,and:8743,andand:10837,andd:10844,andslope:10840,andv:10842,ang:8736,ange:10660,angle:8736,angmsd:8737,angmsdaa:10664,angmsdab:10665,angmsdac:10666,angmsdad:10667,angmsdae:10668,angmsdaf:10669,angmsdag:10670,angmsdah:10671,angrt:8735,angrtvb:8894,angrtvbd:10653,angsph:8738,angst:197,angzarr:9084,aogon:261,aopf:120146,ap:8776,apE:10864,apacir:10863,ape:8778,apid:8779,apos:39,approx:8776,approxeq:8778,aring:229,ascr:119990,ast:42,asymp:8776,asympeq:8781,atilde:227,auml:228,awconint:8755,awint:10769,bNot:10989,backcong:8780,backepsilon:1014,backprime:8245,backsim:8765,backsimeq:8909,barvee:8893,barwed:8965,barwedge:8965,bbrk:9141,bbrktbrk:9142,bcong:8780,bcy:1073,bdquo:8222,becaus:8757,because:8757,bemptyv:10672,bepsi:1014,bernou:8492,beta:946,beth:8502,between:8812,bfr:120095,bigcap:8898,bigcirc:9711,bigcup:8899,bigodot:10752,bigoplus:10753,bigotimes:10754,bigsqcup:10758,bigstar:9733,bigtriangledown:9661,bigtriangleup:9651,biguplus:10756,bigvee:8897,bigwedge:8896,bkarow:10509,blacklozenge:10731,blacksquare:9642,blacktriangle:9652,blacktriangledown:9662,blacktriangleleft:9666,blacktriangleright:9656,blank:9251,blk12:9618,blk14:9617,blk34:9619,block:9608,bne:[61,8421],bnequiv:[8801,8421],bnot:8976,bopf:120147,bot:8869,bottom:8869,bowtie:8904,boxDL:9559,boxDR:9556,boxDl:9558,boxDr:9555,boxH:9552,boxHD:9574,boxHU:9577,boxHd:9572,boxHu:9575,boxUL:9565,boxUR:9562,boxUl:9564,boxUr:9561,boxV:9553,boxVH:9580,boxVL:9571,boxVR:9568,boxVh:9579,boxVl:9570,boxVr:9567,boxbox:10697,boxdL:9557,boxdR:9554,boxdl:9488,boxdr:9484,boxh:9472,boxhD:9573,boxhU:9576,boxhd:9516,boxhu:9524,boxminus:8863,boxplus:8862,boxtimes:8864,boxuL:9563,boxuR:9560,boxul:9496,boxur:9492,boxv:9474,boxvH:9578,boxvL:9569,boxvR:9566,boxvh:9532,boxvl:9508,boxvr:9500,bprime:8245,breve:728,brvbar:166,bscr:119991,bsemi:8271,bsim:8765,bsime:8909,bsol:92,bsolb:10693,bsolhsub:10184,bull:8226,bullet:8226,bump:8782,bumpE:10926,bumpe:8783,bumpeq:8783,cacute:263,cap:8745,capand:10820,capbrcup:10825,capcap:10827,capcup:10823,capdot:10816,caps:[8745,65024],caret:8257,caron:711,ccaps:10829,ccaron:269,ccedil:231,ccirc:265,ccups:10828,ccupssm:10832,cdot:267,cedil:184,cemptyv:10674,cent:162,centerdot:183,cfr:120096,chcy:1095,check:10003,checkmark:10003,chi:967,cir:9675,cirE:10691,circ:710,circeq:8791,circlearrowleft:8634,circlearrowright:8635,circledR:174,circledS:9416,circledast:8859,circledcirc:8858,circleddash:8861,cire:8791,cirfnint:10768,cirmid:10991,cirscir:10690,clubs:9827,clubsuit:9827,colon:58,colone:8788,coloneq:8788,comma:44,commat:64,comp:8705,compfn:8728,complement:8705,complexes:8450,cong:8773,congdot:10861,conint:8750,copf:120148,coprod:8720,copy:169,copysr:8471,crarr:8629,cross:10007,cscr:119992,csub:10959,csube:10961,csup:10960,csupe:10962,ctdot:8943,cudarrl:10552,cudarrr:10549,cuepr:8926,cuesc:8927,cularr:8630,cularrp:10557,cup:8746,cupbrcap:10824,cupcap:10822,cupcup:10826,cupdot:8845,cupor:10821,cups:[8746,65024],curarr:8631,curarrm:10556,curlyeqprec:8926,curlyeqsucc:8927,curlyvee:8910,curlywedge:8911,curren:164,curvearrowleft:8630,curvearrowright:8631,cuvee:8910,cuwed:8911,cwconint:8754,cwint:8753,cylcty:9005,dArr:8659,dHar:10597,dagger:8224,daleth:8504,darr:8595,dash:8208,dashv:8867,dbkarow:10511,dblac:733,dcaron:271,dcy:1076,dd:8518,ddagger:8225,ddarr:8650,ddotseq:10871,deg:176,delta:948,demptyv:10673,dfisht:10623,dfr:120097,dharl:8643,dharr:8642,diam:8900,diamond:8900,diamondsuit:9830,diams:9830,die:168,digamma:989,disin:8946,div:247,divide:247,divideontimes:8903,divonx:8903,djcy:1106,dlcorn:8990,dlcrop:8973,dollar:36,dopf:120149,dot:729,doteq:8784,doteqdot:8785,dotminus:8760,dotplus:8724,dotsquare:8865,doublebarwedge:8966,downarrow:8595,downdownarrows:8650,downharpoonleft:8643,downharpoonright:8642,drbkarow:10512,drcorn:8991,drcrop:8972,dscr:119993,dscy:1109,dsol:10742,dstrok:273,dtdot:8945,dtri:9663,dtrif:9662,duarr:8693,duhar:10607,dwangle:10662,dzcy:1119,dzigrarr:10239,eDDot:10871,eDot:8785,eacute:233,easter:10862,ecaron:283,ecir:8790,ecirc:234,ecolon:8789,ecy:1101,edot:279,ee:8519,efDot:8786,efr:120098,eg:10906,egrave:232,egs:10902,egsdot:10904,el:10905,elinters:9191,ell:8467,els:10901,elsdot:10903,emacr:275,empty:8709,emptyset:8709,emptyv:8709,emsp:8195,emsp13:8196,emsp14:8197,eng:331,ensp:8194,eogon:281,eopf:120150,epar:8917,eparsl:10723,eplus:10865,epsi:949,epsilon:949,epsiv:1013,eqcirc:8790,eqcolon:8789,eqsim:8770,eqslantgtr:10902,eqslantless:10901,equals:61,equest:8799,equiv:8801,equivDD:10872,eqvparsl:10725,erDot:8787,erarr:10609,escr:8495,esdot:8784,esim:8770,eta:951,eth:240,euml:235,euro:8364,excl:33,exist:8707,expectation:8496,exponentiale:8519,fallingdotseq:8786,fcy:1092,female:9792,ffilig:64259,fflig:64256,ffllig:64260,ffr:120099,filig:64257,fjlig:[102,106],flat:9837,fllig:64258,fltns:9649,fnof:402,fopf:120151,forall:8704,fork:8916,forkv:10969,fpartint:10765,frac12:189,frac13:8531,frac14:188,frac15:8533,frac16:8537,frac18:8539,frac23:8532,frac25:8534,frac34:190,frac35:8535,frac38:8540,frac45:8536,frac56:8538,frac58:8541,frac78:8542,frasl:8260,frown:8994,fscr:119995,gE:8807,gEl:10892,gacute:501,gamma:947,gammad:989,gap:10886,gbreve:287,gcirc:285,gcy:1075,gdot:289,ge:8805,gel:8923,geq:8805,geqq:8807,geqslant:10878,ges:10878,gescc:10921,gesdot:10880,gesdoto:10882,gesdotol:10884,gesl:[8923,65024],gesles:10900,gfr:120100,gg:8811,ggg:8921,gimel:8503,gjcy:1107,gl:8823,glE:10898,gla:10917,glj:10916,gnE:8809,gnap:10890,gnapprox:10890,gne:10888,gneq:10888,gneqq:8809,gnsim:8935,gopf:120152,grave:96,gscr:8458,gsim:8819,gsime:10894,gsiml:10896,gt:62,gtcc:10919,gtcir:10874,gtdot:8919,gtlPar:10645,gtquest:10876,gtrapprox:10886,gtrarr:10616,gtrdot:8919,gtreqless:8923,gtreqqless:10892,gtrless:8823,gtrsim:8819,gvertneqq:[8809,65024],gvnE:[8809,65024],hArr:8660,hairsp:8202,half:189,hamilt:8459,hardcy:1098,harr:8596,harrcir:10568,harrw:8621,hbar:8463,hcirc:293,hearts:9829,heartsuit:9829,hellip:8230,hercon:8889,hfr:120101,hksearow:10533,hkswarow:10534,hoarr:8703,homtht:8763,hookleftarrow:8617,hookrightarrow:8618,hopf:120153,horbar:8213,hscr:119997,hslash:8463,hstrok:295,hybull:8259,hyphen:8208,iacute:237,ic:8291,icirc:238,icy:1080,iecy:1077,iexcl:161,iff:8660,ifr:120102,igrave:236,ii:8520,iiiint:10764,iiint:8749,iinfin:10716,iiota:8489,ijlig:307,imacr:299,image:8465,imagline:8464,imagpart:8465,imath:305,imof:8887,imped:437,in:8712,incare:8453,infin:8734,infintie:10717,inodot:305,int:8747,intcal:8890,integers:8484,intercal:8890,intlarhk:10775,intprod:10812,iocy:1105,iogon:303,iopf:120154,iota:953,iprod:10812,iquest:191,iscr:119998,isin:8712,isinE:8953,isindot:8949,isins:8948,isinsv:8947,isinv:8712,it:8290,itilde:297,iukcy:1110,iuml:239,jcirc:309,jcy:1081,jfr:120103,jmath:567,jopf:120155,jscr:119999,jsercy:1112,jukcy:1108,kappa:954,kappav:1008,kcedil:311,kcy:1082,kfr:120104,kgreen:312,khcy:1093,kjcy:1116,kopf:120156,kscr:12e4,lAarr:8666,lArr:8656,lAtail:10523,lBarr:10510,lE:8806,lEg:10891,lHar:10594,lacute:314,laemptyv:10676,lagran:8466,lambda:955,lang:10216,langd:10641,langle:10216,lap:10885,laquo:171,larr:8592,larrb:8676,larrbfs:10527,larrfs:10525,larrhk:8617,larrlp:8619,larrpl:10553,larrsim:10611,larrtl:8610,lat:10923,latail:10521,late:10925,lates:[10925,65024],lbarr:10508,lbbrk:10098,lbrace:123,lbrack:91,lbrke:10635,lbrksld:10639,lbrkslu:10637,lcaron:318,lcedil:316,lceil:8968,lcub:123,lcy:1083,ldca:10550,ldquo:8220,ldquor:8222,ldrdhar:10599,ldrushar:10571,ldsh:8626,le:8804,leftarrow:8592,leftarrowtail:8610,leftharpoondown:8637,leftharpoonup:8636,leftleftarrows:8647,leftrightarrow:8596,leftrightarrows:8646,leftrightharpoons:8651,leftrightsquigarrow:8621,leftthreetimes:8907,leg:8922,leq:8804,leqq:8806,leqslant:10877,les:10877,lescc:10920,lesdot:10879,lesdoto:10881,lesdotor:10883,lesg:[8922,65024],lesges:10899,lessapprox:10885,lessdot:8918,lesseqgtr:8922,lesseqqgtr:10891,lessgtr:8822,lesssim:8818,lfisht:10620,lfloor:8970,lfr:120105,lg:8822,lgE:10897,lhard:8637,lharu:8636,lharul:10602,lhblk:9604,ljcy:1113,ll:8810,llarr:8647,llcorner:8990,llhard:10603,lltri:9722,lmidot:320,lmoust:9136,lmoustache:9136,lnE:8808,lnap:10889,lnapprox:10889,lne:10887,lneq:10887,lneqq:8808,lnsim:8934,loang:10220,loarr:8701,lobrk:10214,longleftarrow:10229,longleftrightarrow:10231,longmapsto:10236,longrightarrow:10230,looparrowleft:8619,looparrowright:8620,lopar:10629,lopf:120157,loplus:10797,lotimes:10804,lowast:8727,lowbar:95,loz:9674,lozenge:9674,lozf:10731,lpar:40,lparlt:10643,lrarr:8646,lrcorner:8991,lrhar:8651,lrhard:10605,lrm:8206,lrtri:8895,lsaquo:8249,lscr:120001,lsh:8624,lsim:8818,lsime:10893,lsimg:10895,lsqb:91,lsquo:8216,lsquor:8218,lstrok:322,lt:60,ltcc:10918,ltcir:10873,ltdot:8918,lthree:8907,ltimes:8905,ltlarr:10614,ltquest:10875,ltrPar:10646,ltri:9667,ltrie:8884,ltrif:9666,lurdshar:10570,luruhar:10598,lvertneqq:[8808,65024],lvnE:[8808,65024],mDDot:8762,macr:175,male:9794,malt:10016,maltese:10016,map:8614,mapsto:8614,mapstodown:8615,mapstoleft:8612,mapstoup:8613,marker:9646,mcomma:10793,mcy:1084,mdash:8212,measuredangle:8737,mfr:120106,mho:8487,micro:181,mid:8739,midast:42,midcir:10992,middot:183,minus:8722,minusb:8863,minusd:8760,minusdu:10794,mlcp:10971,mldr:8230,mnplus:8723,models:8871,mopf:120158,mp:8723,mscr:120002,mstpos:8766,mu:956,multimap:8888,mumap:8888,nGg:[8921,824],nGt:[8811,8402],nGtv:[8811,824],nLeftarrow:8653,nLeftrightarrow:8654,nLl:[8920,824],nLt:[8810,8402],nLtv:[8810,824],nRightarrow:8655,nVDash:8879,nVdash:8878,nabla:8711,nacute:324,nang:[8736,8402],nap:8777,napE:[10864,824],napid:[8779,824],napos:329,napprox:8777,natur:9838,natural:9838,naturals:8469,nbsp:160,nbump:[8782,824],nbumpe:[8783,824],ncap:10819,ncaron:328,ncedil:326,ncong:8775,ncongdot:[10861,824],ncup:10818,ncy:1085,ndash:8211,ne:8800,neArr:8663,nearhk:10532,nearr:8599,nearrow:8599,nedot:[8784,824],nequiv:8802,nesear:10536,nesim:[8770,824],nexist:8708,nexists:8708,nfr:120107,ngE:[8807,824],nge:8817,ngeq:8817,ngeqq:[8807,824],ngeqslant:[10878,824],nges:[10878,824],ngsim:8821,ngt:8815,ngtr:8815,nhArr:8654,nharr:8622,nhpar:10994,ni:8715,nis:8956,nisd:8954,niv:8715,njcy:1114,nlArr:8653,nlE:[8806,824],nlarr:8602,nldr:8229,nle:8816,nleftarrow:8602,nleftrightarrow:8622,nleq:8816,nleqq:[8806,824],nleqslant:[10877,824],nles:[10877,824],nless:8814,nlsim:8820,nlt:8814,nltri:8938,nltrie:8940,nmid:8740,nopf:120159,not:172,notin:8713,notinE:[8953,824],notindot:[8949,824],notinva:8713,notinvb:8951,notinvc:8950,notni:8716,notniva:8716,notnivb:8958,notnivc:8957,npar:8742,nparallel:8742,nparsl:[11005,8421],npart:[8706,824],npolint:10772,npr:8832,nprcue:8928,npre:[10927,824],nprec:8832,npreceq:[10927,824],nrArr:8655,nrarr:8603,nrarrc:[10547,824],nrarrw:[8605,824],nrightarrow:8603,nrtri:8939,nrtrie:8941,nsc:8833,nsccue:8929,nsce:[10928,824],nscr:120003,nshortmid:8740,nshortparallel:8742,nsim:8769,nsime:8772,nsimeq:8772,nsmid:8740,nspar:8742,nsqsube:8930,nsqsupe:8931,nsub:8836,nsubE:[10949,824],nsube:8840,nsubset:[8834,8402],nsubseteq:8840,nsubseteqq:[10949,824],nsucc:8833,nsucceq:[10928,824],nsup:8837,nsupE:[10950,824],nsupe:8841,nsupset:[8835,8402],nsupseteq:8841,nsupseteqq:[10950,824],ntgl:8825,ntilde:241,ntlg:8824,ntriangleleft:8938,ntrianglelefteq:8940,ntriangleright:8939,ntrianglerighteq:8941,nu:957,num:35,numero:8470,numsp:8199,nvDash:8877,nvHarr:10500,nvap:[8781,8402],nvdash:8876,nvge:[8805,8402],nvgt:[62,8402],nvinfin:10718,nvlArr:10498,nvle:[8804,8402],nvlt:[60,8402],nvltrie:[8884,8402],nvrArr:10499,nvrtrie:[8885,8402],nvsim:[8764,8402],nwArr:8662,nwarhk:10531,nwarr:8598,nwarrow:8598,nwnear:10535,oS:9416,oacute:243,oast:8859,ocir:8858,ocirc:244,ocy:1086,odash:8861,odblac:337,odiv:10808,odot:8857,odsold:10684,oelig:339,ofcir:10687,ofr:120108,ogon:731,ograve:242,ogt:10689,ohbar:10677,ohm:937,oint:8750,olarr:8634,olcir:10686,olcross:10683,oline:8254,olt:10688,omacr:333,omega:969,omicron:959,omid:10678,ominus:8854,oopf:120160,opar:10679,operp:10681,oplus:8853,or:8744,orarr:8635,ord:10845,order:8500,orderof:8500,ordf:170,ordm:186,origof:8886,oror:10838,orslope:10839,orv:10843,oscr:8500,oslash:248,osol:8856,otilde:245,otimes:8855,otimesas:10806,ouml:246,ovbar:9021,par:8741,para:182,parallel:8741,parsim:10995,parsl:11005,part:8706,pcy:1087,percnt:37,period:46,permil:8240,perp:8869,pertenk:8241,pfr:120109,phi:966,phiv:981,phmmat:8499,phone:9742,pi:960,pitchfork:8916,piv:982,planck:8463,planckh:8462,plankv:8463,plus:43,plusacir:10787,plusb:8862,pluscir:10786,plusdo:8724,plusdu:10789,pluse:10866,plusmn:177,plussim:10790,plustwo:10791,pm:177,pointint:10773,popf:120161,pound:163,pr:8826,prE:10931,prap:10935,prcue:8828,pre:10927,prec:8826,precapprox:10935,preccurlyeq:8828,preceq:10927,precnapprox:10937,precneqq:10933,precnsim:8936,precsim:8830,prime:8242,primes:8473,prnE:10933,prnap:10937,prnsim:8936,prod:8719,profalar:9006,profline:8978,profsurf:8979,prop:8733,propto:8733,prsim:8830,prurel:8880,pscr:120005,psi:968,puncsp:8200,qfr:120110,qint:10764,qopf:120162,qprime:8279,qscr:120006,quaternions:8461,quatint:10774,quest:63,questeq:8799,quot:34,rAarr:8667,rArr:8658,rAtail:10524,rBarr:10511,rHar:10596,race:[8765,817],racute:341,radic:8730,raemptyv:10675,rang:10217,rangd:10642,range:10661,rangle:10217,raquo:187,rarr:8594,rarrap:10613,rarrb:8677,rarrbfs:10528,rarrc:10547,rarrfs:10526,rarrhk:8618,rarrlp:8620,rarrpl:10565,rarrsim:10612,rarrtl:8611,rarrw:8605,ratail:10522,ratio:8758,rationals:8474,rbarr:10509,rbbrk:10099,rbrace:125,rbrack:93,rbrke:10636,rbrksld:10638,rbrkslu:10640,rcaron:345,rcedil:343,rceil:8969,rcub:125,rcy:1088,rdca:10551,rdldhar:10601,rdquo:8221,rdquor:8221,rdsh:8627,real:8476,realine:8475,realpart:8476,reals:8477,rect:9645,reg:174,rfisht:10621,rfloor:8971,rfr:120111,rhard:8641,rharu:8640,rharul:10604,rho:961,rhov:1009,rightarrow:8594,rightarrowtail:8611,rightharpoondown:8641,rightharpoonup:8640,rightleftarrows:8644,rightleftharpoons:8652,rightrightarrows:8649,rightsquigarrow:8605,rightthreetimes:8908,ring:730,risingdotseq:8787,rlarr:8644,rlhar:8652,rlm:8207,rmoust:9137,rmoustache:9137,rnmid:10990,roang:10221,roarr:8702,robrk:10215,ropar:10630,ropf:120163,roplus:10798,rotimes:10805,rpar:41,rpargt:10644,rppolint:10770,rrarr:8649,rsaquo:8250,rscr:120007,rsh:8625,rsqb:93,rsquo:8217,rsquor:8217,rthree:8908,rtimes:8906,rtri:9657,rtrie:8885,rtrif:9656,rtriltri:10702,ruluhar:10600,rx:8478,sacute:347,sbquo:8218,sc:8827,scE:10932,scap:10936,scaron:353,sccue:8829,sce:10928,scedil:351,scirc:349,scnE:10934,scnap:10938,scnsim:8937,scpolint:10771,scsim:8831,scy:1089,sdot:8901,sdotb:8865,sdote:10854,seArr:8664,searhk:10533,searr:8600,searrow:8600,sect:167,semi:59,seswar:10537,setminus:8726,setmn:8726,sext:10038,sfr:120112,sfrown:8994,sharp:9839,shchcy:1097,shcy:1096,shortmid:8739,shortparallel:8741,shy:173,sigma:963,sigmaf:962,sigmav:962,sim:8764,simdot:10858,sime:8771,simeq:8771,simg:10910,simgE:10912,siml:10909,simlE:10911,simne:8774,simplus:10788,simrarr:10610,slarr:8592,smallsetminus:8726,smashp:10803,smeparsl:10724,smid:8739,smile:8995,smt:10922,smte:10924,smtes:[10924,65024],softcy:1100,sol:47,solb:10692,solbar:9023,sopf:120164,spades:9824,spadesuit:9824,spar:8741,sqcap:8851,sqcaps:[8851,65024],sqcup:8852,sqcups:[8852,65024],sqsub:8847,sqsube:8849,sqsubset:8847,sqsubseteq:8849,sqsup:8848,sqsupe:8850,sqsupset:8848,sqsupseteq:8850,squ:9633,square:9633,squarf:9642,squf:9642,srarr:8594,sscr:120008,ssetmn:8726,ssmile:8995,sstarf:8902,star:9734,starf:9733,straightepsilon:1013,straightphi:981,strns:175,sub:8834,subE:10949,subdot:10941,sube:8838,subedot:10947,submult:10945,subnE:10955,subne:8842,subplus:10943,subrarr:10617,subset:8834,subseteq:8838,subseteqq:10949,subsetneq:8842,subsetneqq:10955,subsim:10951,subsub:10965,subsup:10963,succ:8827,succapprox:10936,succcurlyeq:8829,succeq:10928,succnapprox:10938,succneqq:10934,succnsim:8937,succsim:8831,sum:8721,sung:9834,sup:8835,sup1:185,sup2:178,sup3:179,supE:10950,supdot:10942,supdsub:10968,supe:8839,supedot:10948,suphsol:10185,suphsub:10967,suplarr:10619,supmult:10946,supnE:10956,supne:8843,supplus:10944,supset:8835,supseteq:8839,supseteqq:10950,supsetneq:8843,supsetneqq:10956,supsim:10952,supsub:10964,supsup:10966,swArr:8665,swarhk:10534,swarr:8601,swarrow:8601,swnwar:10538,szlig:223,target:8982,tau:964,tbrk:9140,tcaron:357,tcedil:355,tcy:1090,tdot:8411,telrec:8981,tfr:120113,there4:8756,therefore:8756,theta:952,thetasym:977,thetav:977,thickapprox:8776,thicksim:8764,thinsp:8201,thkap:8776,thksim:8764,thorn:254,tilde:732,times:215,timesb:8864,timesbar:10801,timesd:10800,tint:8749,toea:10536,top:8868,topbot:9014,topcir:10993,topf:120165,topfork:10970,tosa:10537,tprime:8244,trade:8482,triangle:9653,triangledown:9663,triangleleft:9667,trianglelefteq:8884,triangleq:8796,triangleright:9657,trianglerighteq:8885,tridot:9708,trie:8796,triminus:10810,triplus:10809,trisb:10701,tritime:10811,trpezium:9186,tscr:120009,tscy:1094,tshcy:1115,tstrok:359,twixt:8812,twoheadleftarrow:8606,twoheadrightarrow:8608,uArr:8657,uHar:10595,uacute:250,uarr:8593,ubrcy:1118,ubreve:365,ucirc:251,ucy:1091,udarr:8645,udblac:369,udhar:10606,ufisht:10622,ufr:120114,ugrave:249,uharl:8639,uharr:8638,uhblk:9600,ulcorn:8988,ulcorner:8988,ulcrop:8975,ultri:9720,umacr:363,uml:168,uogon:371,uopf:120166,uparrow:8593,updownarrow:8597,upharpoonleft:8639,upharpoonright:8638,uplus:8846,upsi:965,upsih:978,upsilon:965,upuparrows:8648,urcorn:8989,urcorner:8989,urcrop:8974,uring:367,urtri:9721,uscr:120010,utdot:8944,utilde:361,utri:9653,utrif:9652,uuarr:8648,uuml:252,uwangle:10663,vArr:8661,vBar:10984,vBarv:10985,vDash:8872,vangrt:10652,varepsilon:1013,varkappa:1008,varnothing:8709,varphi:981,varpi:982,varpropto:8733,varr:8597,varrho:1009,varsigma:962,varsubsetneq:[8842,65024],varsubsetneqq:[10955,65024],varsupsetneq:[8843,65024],varsupsetneqq:[10956,65024],vartheta:977,vartriangleleft:8882,vartriangleright:8883,vcy:1074,vdash:8866,vee:8744,veebar:8891,veeeq:8794,vellip:8942,verbar:124,vert:124,vfr:120115,vltri:8882,vnsub:[8834,8402],vnsup:[8835,8402],vopf:120167,vprop:8733,vrtri:8883,vscr:120011,vsubnE:[10955,65024],vsubne:[8842,65024],vsupnE:[10956,65024],vsupne:[8843,65024],vzigzag:10650,wcirc:373,wedbar:10847,wedge:8743,wedgeq:8793,weierp:8472,wfr:120116,wopf:120168,wp:8472,wr:8768,wreath:8768,wscr:120012,xcap:8898,xcirc:9711,xcup:8899,xdtri:9661,xfr:120117,xhArr:10234,xharr:10231,xi:958,xlArr:10232,xlarr:10229,xmap:10236,xnis:8955,xodot:10752,xopf:120169,xoplus:10753,xotime:10754,xrArr:10233,xrarr:10230,xscr:120013,xsqcup:10758,xuplus:10756,xutri:9651,xvee:8897,xwedge:8896,yacute:253,yacy:1103,ycirc:375,ycy:1099,yen:165,yfr:120118,yicy:1111,yopf:120170,yscr:120014,yucy:1102,yuml:255,zacute:378,zcaron:382,zcy:1079,zdot:380,zeetrf:8488,zeta:950,zfr:120119,zhcy:1078,zigrarr:8669,zopf:120171,zscr:120015,zwj:8205,zwnj:8204},lc=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"]});function hc(e){return e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function gc(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function dr(e){return e.indexOf("&")===-1?e:e.replace(Rf,(t,r,n,o,i,s)=>r!==void 0?mc(parseInt(r,10)):n!==void 0?mc(parseInt(n,16)):Of(t,o,i===";",e[s+t.length]))}function Of(e,t,r,n){if(r){let o=dc.get(t);return o===void 0?e:pc(o)}return!Lf.has(t)||n==="="?e:pc(dc.get(t))}function pc(e){return typeof e=="number"?String.fromCodePoint(e):String.fromCodePoint(...e)}function mc(e){return e===0||e>1114111||e>=55296&&e<=57343?"\uFFFD":fc[e]!==void 0?String.fromCodePoint(fc[e]):String.fromCodePoint(e)}var fc,Rf,dc,Lf,Ao=T(()=>{uc();fc={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},Rf=/&(?:#(\d+);?|#[xX]([0-9a-fA-F]+);?|([a-zA-Z][a-zA-Z0-9]*)(;?))/g,dc=new Map(Object.entries(cc)),Lf=new Set(lc)});var Sc={};ai(Sc,{browserMemberHint:()=>bs,defaultSSRErrorTemplate:()=>nn,isProd:()=>bc,render:()=>P,renderTemplate:()=>yc,streamRender:()=>ne,streamTemplate:()=>wc});function bc(){return typeof process<"u"&&process.env&&!0}function bs(e){let t=e&&typeof e.message=="string"?e.message:"",r=/^(\w+) is not defined\b/.exec(t);return e instanceof ReferenceError&&r&&jf.has(r[1])?`\`${r[1]}\` is a browser-only global and is undefined during SSR.`:(r=/\.(\w+) is not a function\b/.exec(t),e instanceof TypeError&&r&&Pf.has(r[1])?`\`${r[1]}\` is an HTMLElement method that does not exist on the server-side component instance during SSR.`:null)}function nn(e,t,r){if(!(r===void 0?!bc():!!r))return"";let o=t&&t.message?t.message:String(t);return ci`<div data-webjs-error="${e}" style="border:1px solid #f5c2c7;background:#f8d7da;color:#842029;padding:8px 12px;border-radius:6px;font:13px/1.4 system-ui,sans-serif">
1
+ var ou=Object.defineProperty;var S=(e,t)=>()=>(e&&(t=e(e=0)),t);var na=(e,t)=>{for(var r in t)ou(e,r,{get:t[r],enumerable:!0})};function mr(e){return Object.prototype.hasOwnProperty.call(hr,e)}function Qe(e,t){return t==null?null:t===!1?/^aria-/i.test(e)?"false":null:t===!0&&iu.has(String(e).toLowerCase())?"":String(t)}var hr,iu,et=S(()=>{hr=Object.freeze({"@":"event",".":"prop","?":"bool"});iu=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"])});function Nt(e){let t=String(e);return au.test(t)?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):t}function D(e){let t=String(e);return cu.test(t)?t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;"):t}var au,cu,tt=S(()=>{au=/[&<>]/,cu=/[&"<]/});function lu(e){Qo=e}function In(e){if(typeof e!="function")return null;let t=e[sa];return typeof t=="string"&&t?t:null}async function es(e){let t=In(e);if(t)return t;if(typeof e!="function"||!Qo)return null;try{let r=await Qo(e);return typeof r=="string"&&r?r:null}catch{return null}}function Ct(e,t,r){if(typeof e!="function")return!1;let n=String(t).toLowerCase(),o=String(r||"").toLowerCase();return n==="action"?o==="form":n==="formaction"?o==="button"||o==="input":!1}function br(e,t,r=!0){if(!e||e===O&&r)return;let n=e===O?'a second "name" attribute':`name="${e}"`;throw new Error(`[webjs] formaction=\${action} on <${t||"button"}> cannot be used when the element already carries a "name" attribute (found ${n}). The action identity is submitted as the button's own name/value pair, so there is no room for a second one. Move the action to the enclosing <form action=\${action}> or drop the submitter's "name".`)}function ts(e,t){let r=String(e||"").toLowerCase(),n=t==null?null:String(t).toLowerCase();if(uu(r,n)){if(r==="input"&&n==="image")throw new Error('[webjs] formaction=${action} is not supported on <input type="image"> because image submitters submit coordinate pairs (name.x/name.y) instead of name=value, so the action identity would never arrive. Use a <button> instead.');if(r==="input")throw new Error('[webjs] formaction=${action} is not supported on <input type="submit"> because the action identity has to occupy the submitter\'s "value", which on this control is also its visible label, so the button would render captioned with the action\'s id and could not be given a real one. Use <button formaction=${action}>Publish</button>, whose label is its children.');return}throw new Error(`[webjs] formaction=\${action} on <${r}>${n?` type="${n}"`:""} requires a submitter control, and formaction is inert on anything else. Use <button formaction=\${action}>.`)}function uu(e,t){let r=t==null?null:String(t).toLowerCase();return e==="button"?r==null||r===""||r==="submit":e==="input"?r==="submit"||r==="image":!1}function yr(e){throw new Error(`[webjs] formaction=\${action} on <${e||"button"}> cannot be used when the element already carries a "value" attribute. The action identity is submitted as the button's own name/value pair, so both halves are taken. Drop the "value", or dispatch on it from one form-level action instead.`)}function rs(e){throw new Error(`[webjs] a bound formaction=\${action} on <${e||"button"}> cannot also carry a plain formaction attribute: the two name different targets and the renderers resolve them differently. Drop the static attribute.`)}function wr(e){throw new Error(`[webjs] formaction=\${action} on <${e||"button"}> cannot be used with a "form" attribute, which re-points the submitter at a form other than the bound one it sits in. Keep the submitter inside its bound <form>.`)}function Sr(e,t){if(e)throw new Error(`[webjs] two formaction=\${action} holes were found on one <${t||"button"}>. Only one can win, and the two renderers pick differently, so bind exactly one action per submitter.`)}function ns(e,t){let n=(e||[]).filter(o=>_r(o))[0];if(n)throw new Error(`[webjs] a <${t||"button"}> submitter binds .${n}=. That property is a reflected IDL attribute on a submitter, so a property binding is dropped at SSR and written to the attribute in the browser: the page would render on the server and throw on hydration. Write it as a plain attribute.`)}function _r(e){let t=String(e).toLowerCase();return t==="name"||t==="value"||t==="formaction"||t==="formmethod"||t==="formenctype"}function fu(e,t,r){let n=t==null?null:String(t),o=r==null?null:String(r);if(n!=null&&/^dialog$/i.test(n))throw new Error(`[webjs] formaction=\${action} on <${e}> cannot be combined with formmethod="dialog", which dismisses a <dialog> instead of submitting, so the bound action would never run. Drop one of the two.`);if(n!=null&&!/^post$/i.test(n))throw new Error(`[webjs] <${e} formmethod="${n}" formaction=\${action}> cannot work: a bound server action is submitted as a POST body, and a "${n}" submission sends none, so the action would never run. Drop the formmethod attribute (WebJs emits formmethod="post" on a bound submitter), or drop the binding.`);if(o!=null&&!ia.has(o.toLowerCase()))throw new Error(`[webjs] <${e} formenctype="${o}" formaction=\${action}> cannot work: a form submission is parsed as multipart/form-data or application/x-www-form-urlencoded, and a "${o}" body is neither, so the bound action could never read it. Drop the formenctype attribute (WebJs emits multipart/form-data on a bound submitter).`)}function Ae(e,t,r){if(Mn(e)&&yu(t))throw new Error(wu(t,r))}function qn(e,t,r){bu(t,r)&&Ae(e,t,r)}function Rt(e,t){if(e)return e;let r=t==="button"||t==="input"?"formaction=":"action=";throw new Error(`[webjs] the function in ${r} on <${t||"form"}> is not a server action. Only a function imported from a 'use server' *.server.{js,ts} module can be bound to a form or a submitter, because the identity the browser submits has to resolve back to something the server can run. Move the handler into a server action and import it, or pass a url string.`)}function du(e,t){if(e!=null&&!/^post$/i.test(e))throw new Error(`[webjs] <form method="${e}" action=\${action}> cannot work: a bound server action is submitted as a POST body, and a "${e}" form sends no body. Drop the method attribute (WebJs emits method="post") or remove the bound action.`);if(t!=null&&!ia.has(t.toLowerCase()))throw new Error(`[webjs] <form enctype="${t}" action=\${action}> cannot work: a form submission is parsed as multipart/form-data or application/x-www-form-urlencoded, and a "${t}" body is neither, so the submission would run under JS and do nothing without it. Drop the enctype attribute (WebJs emits multipart/form-data).`)}function aa(e,t){let r=Ar(e);Dn({staticAction:r.has("action")});let n=ca(r.has("method")?r.get("method"):q,r.has("enctype")?r.get("enctype"):q),o=e.endsWith("/>")?"/>":">",s=e.slice(0,e.length-o.length),i="";return n.method!==null&&(i+=` method="${n.method}"`),n.enctype!==null&&(i+=` enctype="${n.enctype}"`),{tag:s+i+o,hidden:pu(t)}}function Dn(e){if(e.duplicateAction)throw new Error("[webjs] two action=${...} holes were found on one <form>. A form can carry only one action binding. Move one to a submit button's formaction=${action} or remove the duplicate.");if(e.staticAction)throw new Error('[webjs] a bound <form action=${action}> also carries a plain action="..." attribute. A bound form posts to the page\'s own url, so the two say different things: without JS the browser would post to the written url and with JS it would not. Drop the action attribute, or drop the binding.');let t=e.propAttrs&&e.propAttrs[0];if(t)throw new Error(`[webjs] a bound <form action=\${action}> also binds .${t}=. A property binding on a native element is dropped at SSR and applied in the browser, so the form would submit one way with JS and another way without it. Write it as a plain attribute.`)}function ca(e,t){let r=e!==q&&e!=null,n=t!==q&&t!=null;return du(r?e:null,n?t:null),{method:r?null:"post",enctype:n?null:"multipart/form-data"}}function os(e,t,r){let n=t!==q&&t!=null,o=r!==q&&r!=null;return fu(e,n?t:null,o?r:null),{formMethod:n?null:"post",formEnctype:o?null:"multipart/form-data"}}function la(e,t,r){mu(e,t,r);let n=Ar(e),o=os(t,n.has("formmethod")?n.get("formmethod"):q,n.has("formenctype")?n.get("formenctype"):q),s=e.endsWith("/>")?"/>":">",i=e.slice(0,e.length-s.length),a="";return o.formMethod!==null&&(a+=` formmethod="${o.formMethod}"`),o.formEnctype!==null&&(a+=` formenctype="${o.formEnctype}"`),i+a+s}function pu(e){return`<input type="hidden" name="${O}" value="${D(e)}">`}function ua(e,t,r,n,o){let s=typeof t=="function"?In(t):null;if(!s){typeof t=="function"&&Rt(null,e.localName),gu(e,r,n,o.propAttrs);return}Dn(o);let i=ca(r,n);e.removeAttribute("action"),gr(e,"method",r,i.method),gr(e,"enctype",n,i.enctype),hu(e,s)}function gr(e,t,r,n){if(n!==null){e.setAttribute(t,n);return}r!==q&&e.getAttribute(t)!==r&&e.setAttribute(t,r)}function hu(e,t){let r=e.firstElementChild,n=r&&r.localName==="input"&&r.getAttribute("name")===O?r:null;if(!n){for(let o of e.children)if(o.localName==="input"&&o.getAttribute("name")===O){n=o;break}}n||(n=e.ownerDocument.createElement("input"),n.setAttribute("type","hidden"),n.setAttribute("name",O),e.insertBefore(n,e.firstChild)),n.getAttribute("value")!==t&&n.setAttribute("value",t)}function mu(e,t,r){let n=Ar(e),o=n.has("type")?n.get("type"):null;ns(r.propAttrs,t),Sr(!!r.duplicateAction,t),n.has("formaction")&&rs(t),oa(e,"value")>1&&yr(t),oa(e,"name")>1&&br(n.get("name")||O,t,!1),ts(t,o),n.has("form")&&wr(t)}function gu(e,t,r,n){let o=e.firstElementChild;if(o&&o.localName==="input"&&o.getAttribute("name")===O)o.remove();else for(let i of e.children)if(i.localName==="input"&&i.getAttribute("name")===O){i.remove();break}let s=i=>(n||[]).some(a=>{let c=String(a).toLowerCase();return c===i||i==="enctype"&&c==="encoding"});t===q&&!s("method")&&e.removeAttribute("method"),r===q&&!s("enctype")&&e.removeAttribute("enctype")}function fa(e,t,r,n){let o=s=>(n||[]).some(i=>String(i).toLowerCase()===s);t===q&&!o("formmethod")&&e.removeAttribute("formmethod"),r===q&&!o("formenctype")&&e.removeAttribute("formenctype")}function Ar(e){return new Map(da(e))}function da(e){let t=[],r=1;for(;r<e.length&&!/[\s/>]/.test(e[r]);)r++;for(;r<e.length;){for(;r<e.length&&/[\s/]/.test(e[r]);)r++;if(r>=e.length||e[r]===">")break;let n="";for(;r<e.length&&!/[\s/>=]/.test(e[r]);)n+=e[r++];for(;r<e.length&&/\s/.test(e[r]);)r++;if(e[r]!=="="){n&&t.push([n.toLowerCase(),""]);continue}for(r++;r<e.length&&/\s/.test(e[r]);)r++;let o="",s=e[r];if(s==='"'||s==="'"){for(r++;r<e.length&&e[r]!==s;)o+=e[r++];r++}else for(;r<e.length&&!/[\s>]/.test(e[r]);)o+=e[r++];n&&t.push([n.toLowerCase(),o])}return t}function oa(e,t){let r=String(t).toLowerCase();return da(e).filter(([n])=>n===r).length}function bu(e,t){let r=String(e).toLowerCase();mr(r[0])&&(r=r.slice(1));let n=String(t||"").toLowerCase();return r==="action"?n==="form":r==="formaction"?n==="button"||n==="input":!1}function Mn(e,t){if(typeof e=="function")return!0;if(!Array.isArray(e))return!1;let r=t||new Set;return r.has(e)?!1:(r.add(e),e.some(n=>Mn(n,r)))}function yu(e){let t=String(e).toLowerCase();return mr(t[0])&&(t=t.slice(1)),t==="action"||t==="formaction"}function wu(e,t){return`[webjs] a function was interpolated into ${String(e).toLowerCase()}= on <${t||"form"}>. Stringifying a function into HTML would leak its source (a 'use server' action's body included) to every visitor, so this is refused. To run a server action from a form, write an unquoted action=\${action} on the <form> itself or a formaction=\${action} on a <button> inside a bound form. Anywhere else, pass a URL string.`}var O,sa,Qo,ia,q,xe=S(()=>{et();tt();O="__webjs_action",sa="$$webjsAction",Qo=null;ia=new Set(["multipart/form-data","application/x-www-form-urlencoded"]);q=Symbol("webjs.attr.absent")});var A,x,P,B,is,je,rt,as,ma,j,cs,de,v,Pe=S(()=>{A=Symbol("webjs.slot.state"),x="data-webjs-light",P="data-projection",B="actual",is="fallback",je=Symbol("webjs.slot.fallbackFrag"),rt=Symbol("webjs.slot.templateOwner"),as="data-wj-slot-owner",ma=64,j=Symbol("webjs.slot.rendering"),cs=Symbol("webjs.slot.intercepted"),de=Symbol("webjs.slot.park"),v=new WeakSet});function H(e){let t=e,r=t[A];return r||(r={host:e,authored:[],assignedByName:new Map,lastSnapshot:new WeakMap},t[A]=r),r}function kr(e){return!!e[A]}function ls(e){let t=H(e);for(;e.firstChild;){let r=e.firstChild;t.authored.push(r),v.add(r),e.removeChild(r)}pe(t)}function pe(e){let t=e.assignedByName;t.clear();for(let r of e.authored)Lu(t,Ie(e,r),r)}function Ie(e,t){let r=Cr(e,t);if(r)return G(r.getAttribute("name"));if(e.adoptedKey){let n=e.adoptedKey.get(t);if(n!==void 0)return n}return ga(t)}function us(e){let t=H(e);t.adopted=!0;let r=new Set,n=e.querySelectorAll(`slot[${x}]`);for(let o of n){let s=o;if(!z(e,s)||s.getAttribute(P)!==B||Mt(t,e,s))continue;let i=G(s.getAttribute("name"));if(!r.has(i)){r.add(i);let a=Array.from(s.childNodes);for(let c of a)t.authored.push(c),ga(c)!==i&&(t.adoptedKey||(t.adoptedKey=new WeakMap),t.adoptedKey.set(c,i));t.lastSnapshot.set(s,a.slice())}}for(let o of e.querySelectorAll("wj-slot-park"))if(z(e,o)){for(let s of Array.from(o.childNodes))v.add(s),t.authored.push(s);o.remove()}pe(t)}function G(e){return e==null||e===""||e==="default"?null:e}function ga(e){return e.nodeType!==1?null:G(e.getAttribute("slot"))}function Lu(e,t,r){let n=e.get(t);n||(n=[],e.set(t,n)),n.push(r)}var nt=S(()=>{st();Nr();ot();Pe()});function ba(){he||!te||(he=Node.prototype.appendChild,fs=Node.prototype.insertBefore,qe=Node.prototype.removeChild,Fn=Node.prototype.replaceChild,ds=Element.prototype.append,ps=Element.prototype.prepend,hs=Element.prototype.replaceChildren,Rr=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),$n=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"))}function it(e,t){let r=e[j];e[j]=!0;try{return t()}finally{e[j]=r,r||Bn(e)}}function ms(e){if(!te)return;let t=e,r=H(e);r.backstop||(r.backstop=new MutationObserver(n=>Lr(e,r,n)),r.backstop.observe(e,{childList:!0,subtree:!1}),r.flipSensor=new MutationObserver(n=>ya(e,n)),r.flipSensor.observe(e,{attributes:!0,attributeFilter:["slot","name"],subtree:!0}))}function Lr(e,t,r){let n=e,o=n[de],s=n[Symbol.for("webjs.instance")],i=!1,a=new Set;for(let c of r){for(let l of c.addedNodes)if(a.add(l),l!==o&&!(s&&ys(s,l))){if(t.authored.indexOf(l)!==-1){i=!0;continue}v.add(l),t.authored.push(l),i=!0}for(let l of c.removedNodes){let u=t.authored.indexOf(l);if(u===-1||e.contains(l))continue;v.has(l)&&l.parentNode==null&&!a.has(l)||(t.authored.splice(u,1),i=!0)}}i&&Z(e)}function Bn(e){let t=e,r=t[A];if(!(r&&r.backstop))return;let n=r.backstop.takeRecords();(!(Symbol.for("webjs.instance")in t)||t[Symbol.for("webjs.instance")])&&Lr(e,r,n)}function ya(e,t){let r=e[A];if(!r)return;let n=!1;for(let o of t){if(o.type!=="attributes")continue;let s=o.target;o.attributeName==="name"?s.tagName==="SLOT"&&s.hasAttribute(x)&&z(e,s)&&(n=!0):o.attributeName==="slot"&&(r.adoptedKey&&r.adoptedKey.delete(s),r.authored.indexOf(s)!==-1&&(n=!0))}n&&Z(e)}function gs(e){let t=e[A];t&&(t.backstop&&(Lr(e,t,t.backstop.takeRecords()),t.backstop.disconnect(),t.backstop=void 0),t.flipSensor&&(ya(e,t.flipSensor.takeRecords()),t.flipSensor.disconnect(),t.flipSensor=void 0))}function bs(e){if(!te)return;let t=e,r=t[A];if(!r)return;let n=t[Symbol.for("webjs.instance")],o=Symbol.for("webjs.instance")in t,s=!o&&r.adopted===!0,i=!1;for(let a of Array.from(e.childNodes))if(a!==t[de]){if(r.authored.indexOf(a)!==-1){i=!0;continue}o&&(!n||ys(n,a))||!o&&s||(v.add(a),r.authored.push(a),i=!0)}i&&Z(e)}var he,fs,qe,Fn,ds,ps,hs,Rr,$n,Hn=S(()=>{st();Nr();ot();Or();nt();Pe();he=null,fs=null,qe=null,Fn=null,ds=null,ps=null,hs=null,Rr=null,$n=null});function ys(e,t){if(!e||!e.startNode||!e.endNode)return!1;if(t===e.startNode||t===e.endNode)return!0;for(let r=e.startNode.nextSibling;r&&r!==e.endNode;r=r.nextSibling)if(r===t)return!0;return!1}function wa(e){let t=e,r=t[de];return(!r||!r.isConnected)&&(r||(r=e.ownerDocument.createElement("wj-slot-park"),r.setAttribute("hidden",""),r.style.display="none",t[de]=r),it(e,()=>he.call(e,r))),r}function at(e){return e instanceof Node||!!(e&&typeof e=="object"&&e.ownerDocument&&e.ownerDocument.defaultView&&e instanceof e.ownerDocument.defaultView.Node)}function ws(e,t,r){if(r&&!at(t))return[e.ownerDocument.createTextNode(`${t}`)];if(!at(t))throw new TypeError("Failed to execute insertion on the host: parameter is not of type Node.");if(t&&t.nodeType===11){let n=Array.from(t.childNodes);Un(e,n);for(let o of n)qe.call(t,o);return n}return Un(e,[t]),[t]}function Un(e,t){Ft(e,t);for(let r of t){if(!at(r))throw new TypeError("Failed to execute insertion on the host: parameter is not of type Node.");let n=r.nodeType;if(n!==1&&n!==3&&n!==4&&n!==7&&n!==8&&n!==11)throw new DOMException("Failed to execute insertion on the host: the node type may not be inserted here.","HierarchyRequestError")}}function Ft(e,t){for(let r of t)if(r===e||r.nodeType===1&&r.contains(e))throw new DOMException("Failed to execute insertion on the host: the new child contains the parent.","HierarchyRequestError")}function Ss(e,t,r){let n=e.authored;for(let s of t){let i=n.indexOf(s);i!==-1&&n.splice(i,1)}let o=r==null?n.length:n.indexOf(r);o===-1&&(o=n.length),n.splice(o,0,...t)}function xs(e,t){let r=e[A];return r?Mt(r,e,t):!1}function Mt(e,t,r){for(let n=r;n&&n!==t;n=n.parentNode)if(e.authored.indexOf(n)!==-1)return!0;return!1}function _s(e,t){if(v.has(t))return!0;let r=t.parentNode;if(r==null)return!1;if(r===e||r===e[de])return!0;let n=e[A];return r.nodeType===1&&r.tagName==="SLOT"&&r.hasAttribute(x)&&(n&&n.lastSnapshot.has(r)||e.contains(r)&&z(e,r))}function As(e,t){let r=[];for(let s of t)at(s)?s.nodeType===11?r.push({frag:s}):r.push({node:s}):r.push({text:`${s}`});for(let s of r)s.frag?Ft(e,Array.from(s.frag.childNodes)):s.node&&Un(e,[s.node]);let n=e.ownerDocument.createDocumentFragment();for(let s of r)if(s.text!==void 0)he.call(n,e.ownerDocument.createTextNode(s.text));else if(s.frag){let i=Array.from(s.frag.childNodes);Un(e,i);for(let a of i)he.call(n,a)}else s.node&&(Ft(e,[s.node]),he.call(n,s.node));let o=Array.from(n.childNodes);Ft(e,o);for(let s of o)qe.call(n,s);return o}function ve(e,t,r){if(t.applying&&t.pendingRecordNodes)for(let n of r||[])t.pendingRecordNodes.add(n);else t.pendingRecordNodes=new Set(r||[]);if(t.adoptedKey&&r)for(let n of r)t.adoptedKey.delete(n);pe(t),Z(e)}function vs(e){if(!te)return;let t=e;if(t[cs])return;ba(),t[cs]=!0;let r=H(e);t.appendChild=function(n){if(t[j])return he.call(this,n);let o=ws(e,n,!1);for(let s of o)v.add(s);return Ss(r,o,null),ve(e,r,o),n},t.insertBefore=function(n,o){if(t[j])return fs.call(this,n,o);if(!at(n))throw new TypeError("Failed to execute insertBefore on the host: parameter 1 is not of type Node.");if(o!=null&&!at(o))throw new TypeError("Failed to execute insertBefore on the host: parameter 2 is not of type Node.");if(Ft(e,n.nodeType===11?Array.from(n.childNodes):[n]),o!=null&&(r.authored.indexOf(o)===-1||!_s(e,o)))throw new DOMException("insertBefore: reference node is not an assigned child of this host","NotFoundError");if(n===o)return n;let s=ws(e,n,!1);for(let i of s)v.add(i);return Ss(r,s,o||null),ve(e,r,s),n},t.removeChild=function(n){if(t[j])return qe.call(this,n);let o=r.authored.indexOf(n);if(o===-1)return qe.call(this,n);if(!_s(e,n))throw new DOMException("removeChild: the node is not an assigned child of this host","NotFoundError");return r.authored.splice(o,1),ve(e,r,[n]),n},t.replaceChild=function(n,o){if(t[j])return Fn.call(this,n,o);if(r.authored.indexOf(o)===-1)return Fn.call(this,n,o);if(!at(n))throw new TypeError("Failed to execute replaceChild on the host: parameter 1 is not of type Node.");if(Ft(e,n.nodeType===11?Array.from(n.childNodes):[n]),!_s(e,o))throw new DOMException("replaceChild: the node to be replaced is not an assigned child of this host","NotFoundError");if(n===o)return o;let i=ws(e,n,!1);for(let c of i)v.add(c);for(let c of i){if(c===o)continue;let l=r.authored.indexOf(c);l!==-1&&r.authored.splice(l,1)}let a=r.authored.indexOf(o);return r.authored.splice(a,1,...i),ve(e,r,[...i,o]),o},t.append=function(...n){if(t[j])return ds.apply(this,n);let o=As(e,n);for(let s of o)v.add(s);Ss(r,o,null),ve(e,r,o)},t.prepend=function(...n){if(t[j])return ps.apply(this,n);let o=As(e,n);for(let s of o)v.add(s);for(let s of o){let i=r.authored.indexOf(s);i!==-1&&r.authored.splice(i,1)}r.authored.unshift(...o),ve(e,r,o)},t.replaceChildren=function(...n){if(t[j])return hs.apply(this,n);let o=As(e,n);for(let i of o)v.add(i);let s=r.authored;r.authored=o.slice(),ve(e,r,[...s,...o])},Object.defineProperty(t,"innerHTML",{configurable:!0,get(){return Rr.get.call(this)},set(n){if(t[j]){Rr.set.call(this,n);return}let o=e.ownerDocument.createElement("div");Rr.set.call(o,n===null?"":`${n}`);let s=Array.from(o.childNodes);for(let a of s)v.add(a);let i=r.authored;r.authored=s,ve(e,r,[...i,...s])}}),Object.defineProperty(t,"textContent",{configurable:!0,get(){return $n.get.call(this)},set(n){if(t[j]){$n.set.call(this,n);return}let o=n==null||n===""?[]:[e.ownerDocument.createTextNode(`${n}`)];for(let i of o)v.add(i);let s=r.authored;r.authored=o,ve(e,r,[...s,...o])}})}var Sa,Nr=S(()=>{st();ot();Or();Hn();nt();Pe();Sa=new Set});function De(e,t,r){let n=H(e),o=G(t),s=Array.isArray(r)?r.filter(Boolean):r?[r]:[],i=n.authored.findIndex(c=>Ie(n,c)===o),a=n.authored.filter(c=>Ie(n,c)===o);n.authored=n.authored.filter(c=>Ie(n,c)!==o),(i===-1||i>n.authored.length)&&(i=n.authored.length);for(let c of s)c.nodeType===1&&!Cr(n,c)&&(o==null?c.removeAttribute("slot"):c.setAttribute("slot",o)),v.add(c);if(n.authored.splice(i,0,...s),n.applying&&n.pendingRecordNodes){for(let c of a)n.pendingRecordNodes.add(c);for(let c of s)n.pendingRecordNodes.add(c)}else n.pendingRecordNodes=new Set([...a,...s]);if(n.adoptedKey){for(let c of a)n.adoptedKey.delete(c);for(let c of s)n.adoptedKey.delete(c)}pe(n),Z(e)}function Z(e){if(!te)return;let t=e[A];if(t){if(t.applying){t.reapply=!0;return}t.applying=!0;try{do{t.reapply=!1;let r=t.pendingRecordNodes||Sa;t.pendingRecordNodes=void 0,Ou(e,t,r),ju(e,t),pe(t);let n=[],o=new Set;for(let u of e.querySelectorAll(`slot[${x}]`))if(z(e,u)&&!Mt(t,e,u)){if(!u.hasAttribute(P)&&!(je in u)){o.add(G(u.getAttribute("name")));continue}n.push(u)}let s=new Map;for(let u of n){let f=G(u.getAttribute("name")),p=s.get(f);p||(p=[],s.set(f,p)),p.push(u)}let i=[];for(let[u,f]of s){let p=t.assignedByName.get(u)||[];for(let b=0;b<f.length;b++){let h=f[b],y=p.filter(w=>{let m=Cr(t,w);return m?m===h:b===0}),g=y.filter(w=>w===e||w.nodeType===1&&w.contains(e));if(g.length){for(let w of g)v.delete(w);y=y.filter(w=>g.indexOf(w)===-1)}y.length>0?Es(t,h,y)&&i.push(h):Ts(t,h)&&i.push(h)}}for(let u of i)ks(t,u);let a=new Set(s.keys());for(let u of o)a.add(u);let c=new Set;for(let u of t.authored)a.has(Ie(t,u))||c.add(u);let l=e[de];if(l)for(let u of Array.from(l.childNodes))c.has(u)||qe.call(l,u);if(c.size){let u=wa(e);for(let f of c)f.parentNode!==u&&(v.delete(f),it(e,()=>he.call(u,f)))}if(t.backstop){let u=t.backstop.takeRecords();u.length&&Lr(e,t,u)}}while(t.reapply)}finally{t.applying=!1}}}function Ou(e,t,r){for(let n of e.querySelectorAll(`slot[${x}][${P}="${B}"]`)){if(!z(e,n)||Mt(t,e,n))continue;let o=n,s=t.lastSnapshot.get(o);if(!s)continue;let i=Array.from(o.childNodes);if(Vn(i,s))continue;let a=t.authored,c=G(o.getAttribute("name")),l=i.filter(h=>!r.has(h));for(let h of l)a.indexOf(h)===-1&&Ie(t,h)!==c&&(t.adoptedKey||(t.adoptedKey=new WeakMap),t.adoptedKey.set(h,c));for(let h of a){if(l.indexOf(h)!==-1||Ie(t,h)!==c)continue;let y=a.indexOf(h),g=0;for(let w=0;w<l.length;w++){let m=a.indexOf(l[w]);m!==-1&&m<y&&(g=w+1)}l.splice(g,0,h)}let u=new Set(l);for(let h of s)u.add(h);let f=-1,p=0;for(let h of a){if(u.has(h)){f===-1&&(f=p);continue}p+=1}let b=a.filter(h=>!u.has(h));(f===-1||f>b.length)&&(f=b.length),b.splice(f,0,...l),t.authored=b}}function ju(e,t){let r=e[de];t.authored=t.authored.filter(n=>{if(v.has(n))return!0;let o=n.parentNode;return o==null?!1:!!(o===e||o===r||o.nodeType===1&&o.tagName==="SLOT"&&o.hasAttribute(x)&&(t.lastSnapshot.has(o)||e.contains(o)&&z(e,o)))})}var Or=S(()=>{st();Nr();ot();Hn();nt();Pe()});function xa(){return typeof HTMLElement<"u"&&typeof HTMLSlotElement<"u"}function va(){if(_a||(te=xa(),!te))return;jr=HTMLSlotElement.prototype.assignedNodes,Ns=HTMLSlotElement.prototype.assignedElements,Wn=Object.getOwnPropertyDescriptor(Element.prototype,"assignedSlot"),HTMLSlotElement.prototype.assignedNodes=function(r){return this.hasAttribute(x)&&!Rs(this)?Ls(this,r):jr?jr.call(this,r):[]},HTMLSlotElement.prototype.assignedElements=function(r){return this.hasAttribute(x)&&!Rs(this)?Ls(this,r).filter(n=>n.nodeType===1):Ns?Ns.call(this,r):[]},Object.defineProperty(Element.prototype,"assignedSlot",{configurable:!0,enumerable:!0,get:function(){let r=Wn&&Wn.get?Wn.get.call(this):null;return r||Aa(this)}});let e=Object.getOwnPropertyDescriptor(Text.prototype,"assignedSlot");Object.defineProperty(Text.prototype,"assignedSlot",{configurable:!0,enumerable:!0,get:function(){let r=e&&e.get?e.get.call(this):null;return r||Aa(this)}}),Cs=HTMLSlotElement.prototype.assign,HTMLSlotElement.prototype.assign=function(...r){if(this.hasAttribute(x)&&!Rs(this)){let n=Pu(this);if(n){let o=H(n);o.manualAssign||(o.manualAssign=new Map);let s=r.filter(Boolean);for(let[i,a]of o.manualAssign){if(i===this)continue;let c=a.filter(l=>{let u=l.deref();return u!==void 0&&s.indexOf(u)===-1});c.length!==a.length&&(c.length?o.manualAssign.set(i,c):o.manualAssign.delete(i))}if(s.length?o.manualAssign.set(this,s.map(i=>new WeakRef(i))):o.manualAssign.delete(this),o.applying&&o.pendingRecordNodes)for(let i of s)o.pendingRecordNodes.add(i);else o.pendingRecordNodes=new Set(s);pe(o),Z(n)}return}return Cs?Cs.apply(this,r):void 0},_a=!0}function Cr(e,t){let r=e.manualAssign;if(!r||!r.size)return null;for(let[n,o]of r){let s=!1,i=o.filter(a=>{let c=a.deref();return c===void 0?!1:(c===t&&(s=!0),!0)});if(i.length!==o.length&&(i.length?r.set(n,i):r.delete(n)),s){let a=e.host;return a&&(n===a||a.contains(n))?n:null}}return null}function Pu(e){for(let t=e.parentElement;t;t=t.parentElement)if(t[A])return z(t,e)?t:null;return null}function Rs(e){let t=e;for(let r=0;r<128;r++){let n=t.parentNode;if(!n||n===t)return!1;if(n.nodeType===11&&n.host)return!0;t=n}return!1}function Ls(e,t){if(e.getAttribute(P)!==B)return[];let r=Array.from(e.childNodes);return!t||!t.flatten?r:Os(r,new Set,0)}function Os(e,t,r){if(r>=ma)return e.slice();let n=[];for(let o of e)if(o.nodeType===1&&o.tagName==="SLOT"){let s=o;if(t.has(s))continue;if(t.add(s),s.hasAttribute(x)){let i=Ls(s,{flatten:!1});if(i.length>0)for(let a of Os(i,t,r+1))n.push(a);else for(let a of Os(Array.from(s.childNodes),t,r+1))n.push(a)}else if(jr){let i=jr.call(s,{flatten:!0});for(let a of i)n.push(a)}else n.push(o)}else n.push(o);return n}function Aa(e){let t=e.parentElement;return t&&t.tagName==="SLOT"&&t.hasAttribute(x)&&t.getAttribute(P)===B?t:null}var te,jr,Ns,Wn,Cs,_a,ot=S(()=>{st();Or();nt();Pe();te=xa(),jr=null,Ns=null,Wn=null,Cs=null,_a=!1;va()});function js(e){if(!te)return!1;for(let t of e.querySelectorAll(`slot[${x}][${P}]`))if(z(e,t))return!0;return!1}function z(e,t){let r=t[rt];if(r)return r===e;let n=typeof t.getAttribute=="function"?t.getAttribute(as):null;if(n){let o=Iu(t,n);if(o)return o===e}for(let o=t.parentElement;o&&o!==e;o=o.parentElement)if(o.tagName.includes("-"))return!1;return!0}function Iu(e,t){let r=t.toLowerCase();for(let n=e.parentElement;n;n=n.parentElement)if(n.tagName.toLowerCase()===r)return n;return null}function Es(e,t,r){for(let l of r)v.delete(l);let n=t.getAttribute(P)!==B,o=e.lastSnapshot.get(t)||[],s=n||!Vn(o,r);if(!n&&Vn(Array.from(t.childNodes),r))return e.lastSnapshot.set(t,r.slice()),s;let i=t[je];if(n&&i)for(;t.firstChild;)i.appendChild(t.firstChild);let a=new Set(r);for(let l of Array.from(t.childNodes))a.has(l)||t.removeChild(l);let c=t.firstChild;for(let l of r){if(l===c){c=c.nextSibling;continue}t.insertBefore(l,c)}return t.setAttribute(P,B),e.lastSnapshot.set(t,r.slice()),s}function Ts(e,t){let r=t.getAttribute(P)===B;if(t.setAttribute(P,is),!r)return Ea(t),!1;for(e.lastSnapshot.delete(t);t.firstChild;)t.removeChild(t.firstChild);return Ea(t),!0}function Ea(e){let t=e[je];!t||t.childNodes.length===0||e.appendChild(t)}function Ps(e,t){if(!kr(e))return;let r=H(e),n=G(t.getAttribute("name")),o=r.assignedByName.get(n);if(o)for(let s of o)s.parentNode===t&&(v.add(s),t.removeChild(s));r.lastSnapshot.delete(t)}function Ta(e){e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1}))}function ks(e,t){e.pendingSlotChanges||(e.pendingSlotChanges=new Set),e.pendingSlotChanges.add(t),!e.slotChangeScheduled&&(e.slotChangeScheduled=!0,queueMicrotask(()=>{e.slotChangeScheduled=!1;let r=e.pendingSlotChanges||new Set;e.pendingSlotChanges=new Set;for(let n of r)Ta(n)}))}function Vn(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var st=S(()=>{ot();nt();Pe()});var ct=S(()=>{st();Nr();ot();Or();Hn();nt();Pe()});function ec(e,t,r){vf.has(t)?Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}):e[t]=r}async function Hr(e){return JSON.stringify(await tc(e))}function Ee(e){return rc(JSON.parse(e))}async function tc(e){let t=Ef();return await Tf(e,t),pt(e,t)}function rc(e){return $e(e,Rf())}function Ef(){return{refCount:new Map,idOf:new Map,emitted:new Set,nextId:0,blobBytes:new Map,fdEntries:new Map}}async function Tf(e,t){let r=[e];for(;r.length;){let n=r.pop();if(!Of(n))continue;let o=t.refCount.get(n)||0;if(t.refCount.set(n,o+1),!(o>0)){if(typeof Blob<"u"&&n instanceof Blob){let s=new Uint8Array(await n.arrayBuffer());t.blobBytes.set(n,s);continue}if(typeof FormData<"u"&&n instanceof FormData){let s=t.fdEntries.get(n)||[...n.entries()];t.fdEntries.set(n,s);for(let[,i]of s)typeof i!="string"&&r.push(i);continue}if(Array.isArray(n))for(let s=0;s<n.length;s++)r.push(n[s]);else if(n instanceof Map)for(let[s,i]of n)r.push(s),r.push(i);else if(n instanceof Set)for(let s of n)r.push(s);else if(jf(n))for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&r.push(n[s])}}for(let[n,o]of t.refCount)o>1&&t.idOf.set(n,t.nextId++)}function pt(e,t){if(e===null)return null;if(e===void 0)return{[L]:"undef"};let r=typeof e;if(r==="string"||r==="boolean")return e;if(r==="number")return Number.isNaN(e)?{[L]:"NaN"}:e===1/0?{[L]:"Inf"}:e===-1/0?{[L]:"-Inf"}:Object.is(e,-0)?{[L]:"-0"}:e;if(r==="bigint")return{[L]:"BigInt",v:e.toString()};if(r==="symbol"){let s=Symbol.keyFor(e);if(s===void 0)throw new TypeError("Cannot serialize a local Symbol; only Symbol.for() registered symbols are supported.");return{[L]:"Sym",v:s}}if(r==="function")throw new TypeError("Cannot serialize a function.");let n=t.idOf.get(e);if(n!==void 0&&t.emitted.has(n))return{[L]:"Ref",v:n};n!==void 0&&t.emitted.add(n);let o;if(e instanceof Date)o={[L]:"Date",v:Number.isNaN(e.getTime())?null:e.toISOString()};else if(e instanceof Error)o={[L]:"Error",v:{name:e.name,message:e.message,stack:e.stack||null}};else if(typeof Blob<"u"&&e instanceof Blob){let s=t.blobBytes.get(e);typeof File<"u"&&e instanceof File?o={[L]:"File",v:Br(s),n:e.name,t:e.type||"",m:e.lastModified}:o={[L]:"Blob",v:Br(s),t:e.type||""}}else if(typeof FormData<"u"&&e instanceof FormData){let s=t.fdEntries.get(e)||[...e.entries()],i=[];for(let[a,c]of s)i.push([a,pt(c,t)]);o={[L]:"FD",v:i}}else if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)o=kf(e);else if(e instanceof Map){let s=[];for(let[i,a]of e)s.push([pt(i,t),pt(a,t)]);o={[L]:"Map",v:s}}else if(e instanceof Set){let s=[];for(let i of e)s.push(pt(i,t));o={[L]:"Set",v:s}}else if(Array.isArray(e))o=e.map(s=>pt(s,t));else{o={};for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let i=Pf(s)?"_"+s:s;ec(o,i,pt(e[s],t))}}if(n!==void 0){if(Array.isArray(o))return{[L]:"Arr",_id:n,v:o};o._id=n}return o}function kf(e){if(e instanceof ArrayBuffer)return{[L]:"buf",v:Br(new Uint8Array(e))};if(e instanceof DataView)return{[L]:"dv",v:Br(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))};let t=e.constructor.name,r=Nf[t];if(!r)throw new TypeError(`Unsupported typed array: ${t}`);let n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return{[L]:r,v:Br(n)}}function Rf(){return{refs:new Map}}function $e(e,t){if(e===null||typeof e!="object")return e;if(Array.isArray(e)){let s=[];for(let i=0;i<e.length;i++)s.push($e(e[i],t));return s}let r=e[L];if(typeof r=="string")return Lf(e,r,t);let n={},o=e._id;typeof o=="number"&&t.refs.set(o,n);for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||s==="_id")continue;let i=If(s)?s.slice(1):s;ec(n,i,$e(e[s],t))}return n}function Lf(e,t,r){let n=e._id,o=s=>(typeof n=="number"&&r.refs.set(n,s),s);switch(t){case"undef":return;case"NaN":return NaN;case"Inf":return 1/0;case"-Inf":return-1/0;case"-0":return-0;case"BigInt":return o(BigInt(e.v));case"Sym":return o(Symbol.for(e.v));case"Date":return o(e.v==null?new Date(NaN):new Date(e.v));case"Error":{let s=new Error(e.v.message);return s.name=e.v.name,e.v.stack&&(s.stack=e.v.stack),typeof n=="number"&&r.refs.set(n,s),s}case"Map":{let s=new Map;typeof n=="number"&&r.refs.set(n,s);for(let[i,a]of e.v)s.set($e(i,r),$e(a,r));return s}case"Set":{let s=new Set;typeof n=="number"&&r.refs.set(n,s);for(let i of e.v)s.add($e(i,r));return s}case"Arr":{let s=[];typeof n=="number"&&r.refs.set(n,s);for(let i of e.v)s.push($e(i,r));return s}case"Ref":{let s=r.refs.get(e.v);if(s===void 0)throw new TypeError(`Dangling reference: id=${e.v}`);return s}case"Blob":{if(typeof Blob>"u")throw new TypeError("Blob is not available in this environment.");let s=$r(e.v);return o(new Blob([s],{type:e.t||""}))}case"File":{if(typeof File>"u")throw new TypeError("File is not available in this environment.");let s=$r(e.v);return o(new File([s],e.n,{type:e.t||"",lastModified:e.m}))}case"FD":{if(typeof FormData>"u")throw new TypeError("FormData is not available in this environment.");let s=new FormData;o(s);for(let[i,a]of e.v){let c=$e(a,r);s.append(i,c)}return s}default:{if(t==="buf"){let i=$r(e.v);return o(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength))}if(t==="dv"){let i=$r(e.v);return o(new DataView(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)))}let s=Cf[t];if(s){let i=$r(e.v),a=i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength);return o(new s(a))}throw new TypeError(`Unknown serialization tag: ${t}`)}}}function Of(e){return e!==null&&typeof e=="object"}function jf(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Pf(e){return/^_+\$wj$/.test(e)||/^_+id$/.test(e)}function If(e){return/^__+\$wj$/.test(e)||/^__+id$/.test(e)}function Br(e){if(nc)return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64");let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function $r(e){if(nc){let n=Buffer.from(e,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}var L,vf,Nf,Cf,nc,ht=S(()=>{L="_$wj",vf=new Set(["__proto__","constructor","prototype"]);Nf={Int8Array:"i8",Uint8Array:"u8",Uint8ClampedArray:"u8c",Int16Array:"i16",Uint16Array:"u16",Int32Array:"i32",Uint32Array:"u32",Float32Array:"f32",Float64Array:"f64",BigInt64Array:"bi64",BigUint64Array:"bu64"},Cf={i8:Int8Array,u8:Uint8Array,u8c:Uint8ClampedArray,i16:Int16Array,u16:Uint16Array,i32:Int32Array,u32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:typeof BigInt64Array<"u"?BigInt64Array:null,bu64:typeof BigUint64Array<"u"?BigUint64Array:null};nc=typeof Buffer<"u"&&typeof Buffer.from=="function"});var Jc={};na(Jc,{observeLazy:()=>Sd,observeViewportOnce:()=>xd});function Yc(e){let t=gi.get(e);return t||(t=import(e).finally(()=>gi.delete(e)),gi.set(e,t),t)}function Sd(e){for(let[t,r]of Object.entries(e))He.set(t.toLowerCase(),r);if(typeof IntersectionObserver>"u"){for(let t of He.values())Yc(t);He.clear();return}Yr||(Yr=new IntersectionObserver(_d,{rootMargin:"200px"})),Gc(),!mi&&typeof MutationObserver<"u"&&(mi=new MutationObserver(()=>Gc()),mi.observe(document.body,{childList:!0,subtree:!0}))}function Gc(){if(!(!Yr||!He.size))for(let e of He.keys()){if(customElements.get(e)){He.delete(e);continue}for(let t of document.querySelectorAll(e))Yr.observe(t)}}function _d(e){for(let t of e){if(!t.isIntersecting)continue;let r=t.target.tagName.toLowerCase(),n=He.get(r);n&&(Yc(n),He.delete(r),Yr?.unobserve(t.target))}}function Ad(e){for(let t of e){if(!t.isIntersecting)continue;let r=po.get(t.target);po.delete(t.target),Gr?.unobserve(t.target),r&&r()}}function xd(e,t){return typeof IntersectionObserver>"u"?(t(),()=>{}):(Gr||(Gr=new IntersectionObserver(Ad,{rootMargin:"200px"})),po.set(e,t),Gr.observe(e),()=>{po.delete(e),Gr?.unobserve(e)})}var He,Yr,mi,gi,Gr,po,Xc=S(()=>{He=new Map,Yr=null,mi=null,gi=new Map;Gr=null,po=new WeakMap});var bi,yi=S(()=>{bi=typeof HTMLElement<"u"?class extends HTMLElement{constructor(){super(),this._webjsLoadedSrc=null,this._webjsLazyTeardown=null}static get observedAttributes(){return["src"]}connectedCallback(){this._webjsScheduleLoad()}disconnectedCallback(){this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null)}attributeChangedCallback(t,r,n){t==="src"&&this.isConnected&&this._webjsScheduleLoad()}_webjsScheduleLoad(){let t=this.getAttribute("src");if(!t){this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null),this._webjsLoadedSrc=null;return}let r=t;try{r=new URL(t,location.href).href}catch{}if(r===this._webjsLoadedSrc)return;this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null),(this.getAttribute("loading")||"eager").toLowerCase()==="lazy"?(this._webjsLoadedSrc=r,Promise.resolve().then(()=>(Xc(),Jc)).then(({observeViewportOnce:o})=>{this._webjsLoadedSrc!==r||!this.isConnected||(this._webjsLazyTeardown=o(this,()=>{this._webjsLazyTeardown=null,this._webjsLoad(r)}))})):(this._webjsLoadedSrc=r,this._webjsLoad(r))}_webjsLoad(t){Promise.resolve().then(()=>(wi(),Zc)).then(({loadFrame:r})=>{this._webjsLoadedSrc!==t||!this.isConnected||r(this,t)})}}:null;typeof customElements<"u"&&bi&&!customElements.get("webjs-frame")&&customElements.define("webjs-frame",bi)});function Ed(e,t,r){switch(e){case"append":r&&t.append(r);break;case"prepend":r&&t.prepend(r);break;case"before":r&&t.before(r);break;case"after":r&&t.after(r);break;case"replace":r&&t.replaceWith(r);break;case"update":r&&t.replaceChildren(r);break;case"remove":t.remove();break;default:break}}function _i(e,t){let r=t||(typeof document<"u"?document:null);if(!r)return;let n=null;if(typeof e=="string"){let s=r.createElement("template");s.innerHTML=e,n=s.content}else if(e&&e.nodeType)n=e;else return;let o=n.querySelectorAll?Array.from(n.querySelectorAll("webjs-stream")):[];if(o.length)for(let s of o)r.body.append(s);else r.body.append(n)}var vd,Si,Jr=S(()=>{vd=new Set(["append","prepend","before","after","replace","update"]);Si=typeof HTMLElement<"u"?class extends HTMLElement{connectedCallback(){this._webjsApplied||(this._webjsApplied=!0,this._webjsApply())}_webjsApply(){let t=(this.getAttribute("action")||"").toLowerCase(),r=this.ownerDocument||document,n=[],o=this.getAttribute("target");if(o){let i=r.getElementById(o);i&&(n=[i])}else{let i=this.getAttribute("targets");if(i)try{n=Array.from(r.querySelectorAll(i))}catch{n=[]}}let s=vd.has(t)?this.querySelector("template"):null;try{for(let i of n){let a=s?s.content.cloneNode(!0):null;Ed(t,i,a)}}finally{this.remove()}}}:null;typeof customElements<"u"&&Si&&!customElements.get("webjs-stream")&&customElements.define("webjs-stream",Si)});var Qc,el=S(()=>{Qc=typeof HTMLElement<"u"?class extends HTMLElement{connectedCallback(){this.style.display||(this.style.display="contents")}}:null;typeof customElements<"u"&&Qc&&!customElements.get("webjs-suspense")&&customElements.define("webjs-suspense",Qc)});function ho(e,t){let r=typeof document<"u"?document:null,n=e||r;if(!n||typeof n.querySelectorAll!="function")return;if(t&&t.frame===!0){Ai(n,!0);return}nl();let o=n===r,s=!!r&&!o&&typeof r.contains=="function"&&r.contains(n),i=!!r&&!o&&!s;i&&(Ai(r,!0),Ue.clear(),vi.clear()),(o||i)&&(xi=!0);let a=M.ingested+M.replaced;Nd(Ai(n),a)}function Ai(e,t){let r=null;for(let n of e.querySelectorAll('script[type="application/json"]#__webjs-seeds, script[type="application/json"][data-webjs-seeds]')){let o=kd(n.getAttribute?.("data-webjs-dev"));o!==null&&(r=o),tl(t?null:n.textContent,n)}for(let n of e.querySelectorAll("[data-webjs-seed]"))tl(t?null:n.getAttribute("data-webjs-seed"),n,()=>n.removeAttribute("data-webjs-seed"));return r}function tl(e,t,r){if(e)try{let n=Ee(e);if(n&&typeof n=="object")for(let o in n){Ue.has(o)?M.replaced++:M.ingested++,Ue.set(o,n[o]);let s=o.indexOf("/",o.indexOf("/")+1);s>0&&vi.add(o.slice(0,s))}}catch{}r?r():t.remove?.()}function kd(e){return typeof e!="string"?null:e||"ok"}function Nd(e,t){if(e===null)return;let r=++Td;Yt={epoch:r,hits:M.hits,misses:M.misses,keyMisses:M.keyMisses,merged:t,marker:e};let n=()=>{!Yt||Yt.epoch!==r||nl()};try{typeof requestIdleCallback=="function"?requestIdleCallback(n,{timeout:1e3}):setTimeout(n,250)}catch{Yt=null}}function nl(){let e=Yt;if(Yt=null,!!e)try{Cd(e)}catch{}}function Cd(e){let t=M.hits-e.hits,r=M.misses-e.misses,n=M.ingested+M.replaced-e.merged,o=M.keyMisses-e.keyMisses;if(r===0)return;let s=e.marker==="streamed"?"This page streams (a Suspense or <webjs-suspense> boundary), and a streamed render emits no seeds, so every action call on it goes to the network.":e.marker==="drop"?"The page's seeds could not be serialized, so the whole block was dropped. Something an action returned is not serializer-safe; the server response reports collected above emitted.":o===0?null:"The key is the action file hash plus the function name plus the serialized arguments, so an argument the SSR render never used misses (a deliberate refetch after hydration misses too, and is expected). A miss on an action this page never seeded is NOT counted here, because a mutation or a client-only read could never have been seeded.";if(s===null)return;let a=e.marker==="streamed"||e.marker==="drop"?`${r} of ${t+r} action call(s) in the hydration window went to the network`:`${o} action call(s) in the hydration window asked for a key this page seeded under DIFFERENT arguments`;console.warn(`[webjs] SSR action seeding: ${a} (${n} seed(s) on this page, ${Ue.size} still unconsumed). ${s} See https://webjs.dev/docs/data-fetching for the seeding reference.`)}function Rd(e,t,r){xi||(xi=!0,ho());let n=`${e}/${t}/${r}`;if(Ue.has(n)){let o=Ue.get(n);return Ue.delete(n),M.hits++,o}return M.misses++,vi.has(`${e}/${t}`)&&M.keyMisses++,rl}function Ld(){return{...M,pending:Ue.size}}var Ue,rl,xi,M,vi,Yt,Td,mo=S(()=>{ht();Ue=new Map,rl=Symbol("webjs.seed.miss"),xi=!1,M={ingested:0,replaced:0,hits:0,misses:0,keyMisses:0},vi=new Set,Yt=null,Td=0});function Ei(e){if(!(!Array.isArray(e)||!e.length)){go+=1;for(let t of e)t&&ol.set(t,go)}}function jd(){return go}function Pd(e,t,r){if(!(!Array.isArray(t)||!t.length)&&(Jt.delete(e),Jt.set(e,{tags:t.slice(),since:typeof r=="number"?r:go}),Jt.size>Od)){let n=Jt.keys().next().value;n!==void 0&&Jt.delete(n)}}function Id(e){let t=Jt.get(e);if(!t)return!1;for(let r of t.tags)if((ol.get(r)||0)>t.since)return!0;return!1}function Ti(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}var go,ol,Jt,Od,bo=S(()=>{go=0,ol=new Map,Jt=new Map,Od=1e3});function sl(e){return Xt.test(e)}var ki,Ni,Xt,Xr,gt,Te,yo,il,U=S(()=>{ki="text/vnd.webjs-stream.html",Ni=["wheel","touchmove","keydown","pointerdown"],Xt=/\.(?:pdf|zip|tar|gz|7z|rar|dmg|exe|msi|deb|rpm|apk|ipa|xlsx?|docx?|pptx?|csv|odt|ods|odp|rtf|epub|mobi|xml|json|rss|atom|txt|md|wasm|mp3|mp4|mov|avi|webm|ogg|flac|wav|m4a|m4v|mkv|png|jpe?g|gif|webp|avif|bmp|ico|svg|tiff?|heic)$/i,Xr="_top",gt="webjs:nav-fallback",Te=new Set(["value","checked","selected","indeterminate","disabled","open","popover"]),yo="name=csp-nonce";il=250});function Ve(e,t,r="warn"){if(Ci.has(e)||(Ci.add(e),typeof console>"u"))return;let n=r==="error"?console.error:console.warn;n&&n.call(console,t)}function cl(e,t,r,n){if(typeof process<"u"&&process.env||!n.has(O))return;let o="";try{o=new URL(e.getAttribute("action")||location.href,location.href).pathname}catch{o=location.pathname}if(r!=="post"){Ve(`submit-nowhere:${o}:${r}`,`[webjs] this submission carries a bound server action's identity but submits as ${r.toUpperCase()}, which sends no body, so the identity rides the query string and the action never runs. A submitter's own formmethod overrides the form's, and WebJs honours it rather than refusing it, so check for a formmethod on the button that was pressed.`,"error");return}let s=t&&t.getAttribute("formenctype")||e.getAttribute("enctype")||"application/x-www-form-urlencoded";if(s.toLowerCase()==="text/plain"){Ve(`submit-nowhere:${o}:${s}`,`[webjs] this submission carries a bound server action's identity but declares enctype="${s}", which the server cannot parse. The router declines to send it so both paths behave the same way, and both are answered with a 405. Drop the enctype and let the binding supply it.`,"error");return}o&&o!==location.pathname&&Ve(`submit-elsewhere:${o}`,`[webjs] this submission carries a bound server action's identity but posts to "${o}" rather than this page, because the enclosing <form> declares its own action. A bound submitter emits no formaction, so the form's target wins, which is what native HTML does. The action runs only if "${o}" is a page route; against a route.ts or another origin the identity is ignored and nothing runs. Drop the form's action attribute to keep the submission on this page.`)}function Li(e,t){return!e&&!t&&typeof document<"u"&&document.readyState==="loading"}function wo(e,t,r,n){if(e!=="navigate"||!t||n&&n===r)return!1;try{return new URL(t).origin===new URL(r).origin}catch{return!1}}function ll(){if(typeof location>"u"||al)return;al=!0;let e=null;try{e=sessionStorage.getItem(gt),sessionStorage.removeItem(gt)}catch{}let t="";try{let r=performance.getEntriesByType("navigation")[0];t=r?r.type:""}catch{}wo(t,document.referrer,location.href,e)&&ce("pre-boot-navigation",location.href,!1)}function ce(e,t,r=!0){if(r)try{sessionStorage.setItem(gt,t)}catch{}if(typeof document<"u"&&typeof CustomEvent<"u")try{document.dispatchEvent(new CustomEvent("webjs:navigation-fallback",{detail:{cause:e,href:t,willReload:r}}))}catch{}typeof process<"u"&&process.env||Ve(`fallback:${e}`,r?`[webjs] client router fell back to a full page load (${e}) navigating to ${t}. This is correct (no DOM corruption), just not a soft nav.`:`[webjs] client router degraded a soft navigation (${e}) for ${t}, without a full page load.`)}function ul(e){typeof process<"u"&&process.env||Ve(`stream-drop:${e}`,`[webjs] dropped a streamed Suspense resolve for "${e}": no #${e} boundary in the DOM. Benign if this navigation was superseded or degraded. A stuck skeleton here means the shell swap did not place the boundary.`)}function fl(){if(typeof process<"u"&&process.env||Ri||typeof document>"u"||typeof getComputedStyle!="function")return;let e=document.documentElement;if(!e)return;Ri=!0;let t;try{t=getComputedStyle(e).scrollBehavior}catch{return}t==="smooth"&&Ve("scroll-behavior-smooth-html","[webjs] Detected `scroll-behavior: smooth` on <html>. The client router scrolls to the top instantly on navigation (like a native page load), so route transitions are not affected by it. It still applies to in-page #anchor links. Pairing it with a sticky `backdrop-filter` header can also flash on iOS during navigation.")}function Zr(e){if(typeof document>"u")return;let t=document.documentElement;if(!(!t||!t.hasAttribute("data-webjs-nav-progress")))try{e?t.setAttribute("data-navigating",""):t.removeAttribute("data-navigating")}catch{}}function dl(){Ci.clear(),Ri=!1}function pl(e,t){return Li(e,t)}var Ci,al,Ri,le=S(()=>{xe();U();Ci=new Set;al=!1;Ri=!1});function ue(e){let t=new Map,r=[],n=!1;function o(s){if(!n){if(s.nodeType===8){let i=s.data.trim();if(i.startsWith("wj:children:")){let a=i.slice(12),c=a.lastIndexOf(":");if(c<=0||c===a.length-1){n=!0;return}let l=a.slice(0,c),u=a.slice(c+1);if(t.has(l)||r.some(f=>f.segment===l)){n=!0;return}r.push({segment:l,routeKey:u,start:s});return}if(i.startsWith("/wj:children")){let a=i.slice(12).replace(/^:/,""),c=r.pop();if(!c||c.segment!==a){n=!0;return}if(c.start.parentNode!==s.parentNode){n=!0;return}{let l=c.start.parentNode.tagName;if(l==="TABLE"||l==="TBODY"||l==="THEAD"||l==="TFOOT"||l==="TR"){n=!0;return}}t.set(c.segment,{routeKey:c.routeKey,start:c.start,end:s});return}return}if(s.hasChildNodes&&s.hasChildNodes())for(let i=s.firstChild;i&&!n;i=i.nextSibling)o(i)}}return o(e),n||r.length>0?null:t}function Qr(e,t){let r=[...e.keys()].filter(i=>t.has(i)).sort((i,a)=>i.length-a.length);if(r.length===0)return null;for(let i of r)if(e.get(i).routeKey!==t.get(i).routeKey){let a=null;for(let c of r){if(c===i)break;i.startsWith(c==="/"?c:c+"/")&&(a=c)}return a?{mode:"replace",segment:a,live:e.get(a),incoming:t.get(a)}:null}let n=r[r.length-1],o=i=>{let a=null;for(let c of i.keys())(a===null||c.length>a.length)&&(a=c);return a};return{mode:o(e)===n&&o(t)===n?"morph":"replace",segment:n,live:e.get(n),incoming:t.get(n)}}function be(){let e=ue(document.body);return e?[...e.entries()].map(([t,r])=>`${t}:${r.routeKey}`).join(","):""}var We=S(()=>{});function hl(e){ye=e||(t=>{location.href=t})}function ml(){return k}function gl(){return++k}function So(){return++k}function Oi(e){Q=e}function bl(e){en=e}function yl(e){let t=en!==null&&en===e;return en=null,t}function _o(){en=null}var k,ye,Q,en,ke=S(()=>{k=0,ye=e=>{location.href=e};Q=!1;en=null});function bt(e){if(!/^\s*(?:<!doctype|<html)/i.test(e)&&typeof document<"u"&&document.implementation)try{let r=document.implementation.createHTMLDocument();if(typeof r.body.setHTMLUnsafe=="function")r.body.setHTMLUnsafe(e);else{let n=r.createElement("template");n.innerHTML=e,r.body.appendChild(n.content)}return r}catch{}return typeof Document<"u"&&typeof Document.parseHTMLUnsafe=="function"&&qd()?Document.parseHTMLUnsafe(e):Dd(e)}function qd(){if(Zt!==null)return Zt;try{Zt=Document.parseHTMLUnsafe("<!doctype html><body><!--c--><i></i>")?.body?.firstChild?.nodeType===8}catch{Zt=!1}return Zt}function ji(){Zt=null}function Dd(e){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(e,"text/html")}var Zt,tn=S(()=>{Zt=null});function Ao(e){for(let t of e.composedPath())if(t instanceof HTMLAnchorElement)return t;return null}function Pi(e){let t=e;for(;t;){if(t instanceof HTMLAnchorElement)return t;let r=t.nodeType===1?t:null;if(r){let o=r.closest&&r.closest("a");if(o instanceof HTMLAnchorElement)return o}let n=t.getRootNode?t.getRootNode():null;t=n&&n.host?n.host:null}return null}var xo=S(()=>{});function rn(e,t){return((t&&t.hasAttribute("formmethod")?t.getAttribute("formmethod")||"":e.getAttribute("method")||"")||"get").toLowerCase()}function nn(e,t){return t&&t.hasAttribute("formaction")?t.getAttribute("formaction")||"":e.getAttribute("action")||e.action||location.href}function Md(e){let t=String(e||"").toLowerCase();return t==="multipart/form-data"?"multipart/form-data":t==="text/plain"?"text/plain":"application/x-www-form-urlencoded"}function on(e,t){return Md(t&&t.hasAttribute("formenctype")?t.getAttribute("formenctype"):e.getAttribute("enctype"))}function sn(e,t){if(t==="multipart/form-data")return e;let r=new URLSearchParams;for(let[n,o]of e)r.append(n,typeof o=="string"?o:o.name);return r}function an(e,t){try{return new FormData(e,t||void 0)}catch{let r=new FormData(e);return t&&t.getAttribute("name")&&r.append(t.getAttribute("name"),t.getAttribute("value")||""),r}}var vo=S(()=>{});function wl(){if(typeof document>"u")return"";let e=document.querySelector('meta[name="csp-nonce"]');return e&&e.getAttribute("content")||""}function cn(e){let t=document.createElement("script");for(let n of e.attributes)n.name!=="nonce"&&t.setAttribute(n.name,n.value);let r=wl();return r&&t.setAttribute("nonce",r),t.textContent=e.textContent,t}function Ii(e){if(!e.hasAttribute("nonce"))return e.cloneNode(!0);let t=e.cloneNode(!0),r=wl();return r?t.setAttribute("nonce",r):t.removeAttribute("nonce"),t}function we(e){if(!e.hasAttribute("nonce"))return e.outerHTML;let t=e.cloneNode(!0);return t.removeAttribute("nonce"),t.outerHTML}function Eo(e){let t=e.getAttribute("name");if(t)return"name="+t;let r=e.getAttribute("property");if(r)return"property="+r;let n=e.getAttribute("http-equiv");return n?"http-equiv="+n:e.hasAttribute("charset")?"charset":null}function Fd(e){if(!e.querySelector("meta"))return;let t=o=>{let s=new Map;for(let i of o.querySelectorAll("meta")){let a=Eo(i);if(!a||a===yo)continue;let c=s.get(a);c?c.push(i):s.set(a,[i])}return s},r=t(e),n=t(document.head);for(let[o,s]of r){let i=n.get(o)||[],a=s.map(we).join(`
2
+ `),c=i.map(we).join(`
3
+ `);if(a!==c){if(s.length===1&&i.length===1){let l=i[0];for(let u of[...l.attributes])l.removeAttribute(u.name);for(let u of s[0].attributes)l.setAttribute(u.name,u.value);continue}for(let l of i)l.remove();for(let l of s)document.head.appendChild(Ii(l))}}for(let[o,s]of n)if(!r.has(o))for(let i of s)i.remove()}function Qt(e){let t=e.querySelector("title");t&&(document.title=t.textContent||"");let r=new Set;for(let n of document.head.children)r.add(we(n));for(let n of e.children)n.tagName==="SCRIPT"&&n.getAttribute("type")==="importmap"||n.tagName!=="BASE"&&n.tagName!=="TITLE"&&(n.tagName==="META"&&Eo(n)||r.has(we(n))||(n.tagName==="SCRIPT"?document.head.appendChild(cn(n)):document.head.appendChild(Ii(n))));Fd(e)}function $d(e){return e.tagName==="STYLE"?!0:e.tagName==="LINK"&&(e.getAttribute("rel")||"").toLowerCase().split(/\s+/).includes("stylesheet")}function ln(e){let t=document.head,r=e.querySelector("title");r&&(document.title=r.textContent||"");let n=new Set;for(let s of t.children)s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&n.add(we(s));let o=new Set;for(let s of e.children)s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&o.add(we(s));for(let s of[...t.children])s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&s.tagName!=="TITLE"&&($d(s)||s.tagName==="META"&&Eo(s)===yo||o.has(we(s))||s.remove());for(let s of e.children)s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&s.tagName!=="TITLE"&&(s.tagName==="META"&&Eo(s)===yo||n.has(we(s))||(s.tagName==="SCRIPT"?t.appendChild(cn(s)):t.appendChild(Ii(s))))}var un=S(()=>{U()});function No(e){let t=e;for(;t;){let r=t.closest("webjs-frame");if(r&&r.id)return r.id;let n=t.getRootNode();if(n&&n.host)t=n.host;else break}return null}function fe(e){if(!e)return null;let t=e.closest&&e.closest("[data-webjs-frame]"),r=t?t.dataset?t.dataset.webjsFrame:t.getAttribute("data-webjs-frame"):null;if(r!=null&&r!==""){if(r===Xr)return null;let n=typeof document<"u"?document.getElementById(r):null;return n&&n.tagName&&n.tagName.toLowerCase()==="webjs-frame"?r:(Ve(`webjs:frame-unresolved:${r}`,`[webjs] data-webjs-frame="${r}" did not match a live <webjs-frame id="${r}">; performing a normal navigation instead.`),null)}return No(e)}function qi(e){if(!e||typeof document>"u")return null;let t=null;try{t=document.querySelector(`webjs-frame#${CSS.escape(e)}`)}catch{t=document.getElementById(e)}return!t||!t.tagName||t.tagName.toLowerCase()!=="webjs-frame"?null:t}function fn(e,t){let r=qi(e);if(!r)return null;let n=To.has(r);return To.set(r,t),r.setAttribute("aria-busy","true"),n||r.dispatchEvent(new CustomEvent("webjs:frame-busy",{bubbles:!0,detail:{frameId:e,busy:!0}})),r}function dn(e,t){if(To.get(e)!==t)return;To.delete(e),e.setAttribute("aria-busy","false");let r=e.id||null;e.dispatchEvent(new CustomEvent("webjs:frame-busy",{bubbles:!0,detail:{frameId:r,busy:!1}}))}function pn(e,t,r){let n=ko.has(e);return ko.set(e,t),e.setAttribute("aria-busy","true"),n||e.dispatchEvent(new CustomEvent("webjs:submit-start",{bubbles:!0,detail:{form:e,url:r}})),e}function hn(e,t,r,n){if(ko.get(e)!==t)return;ko.delete(e),e.setAttribute("aria-busy","false");let o=new CustomEvent("webjs:submit-end",{bubbles:!0,detail:{form:e,url:r,ok:!!n}});e.isConnected?e.dispatchEvent(o):typeof document<"u"?document.dispatchEvent(o):e.dispatchEvent(o)}function Di(e){if(!e||!e.head)return"";let t=e.head.querySelectorAll('[data-webjs-track="reload"]');if(!t.length)return"";let r="";for(let n of t)r+=we(n);return r}var To,ko,Ke=S(()=>{U();le();un();To=new WeakMap;ko=new WeakMap});function Al(e,t){if(typeof document>"u"||!document.documentElement)return()=>{};re&&re();let r=document.documentElement,n=r.style.getPropertyValue("overflow-anchor");r.style.setProperty("overflow-anchor","none");let o=null,s=typeof t=="number",a=s&&typeof setTimeout=="function"?setTimeout(()=>{s=!1},il):null,c=typeof t=="number"&&typeof window<"u"?()=>{s&&(Math.abs(window.scrollY-t)<=1&&Math.abs(window.scrollX-(e||0))<=1||window.scrollTo({left:e||0,top:t,behavior:"instant"}))}:null,l=()=>{if(re===l){if(re=null,o&&(clearTimeout(o),o=null),a&&clearTimeout(a),s=!1,typeof window<"u"){for(let u of Ni)window.removeEventListener(u,l,{capture:!0});c&&window.removeEventListener("scroll",c)}n?r.style.setProperty("overflow-anchor",n):r.style.removeProperty("overflow-anchor")}};if(re=l,o=setTimeout(l,2e3),typeof window<"u"){for(let u of Ni)window.addEventListener(u,l,{capture:!0,passive:!0});c&&window.addEventListener("scroll",c,{passive:!0})}return l}function xl(e){if(typeof document>"u"||!document.documentElement)return()=>{};if(ne&&ne(),!(e>0))return()=>{};let t=document.documentElement,r=t.style.getPropertyValue("min-height");t.style.setProperty("min-height",e+"px");let n=null,o=()=>{ne===o&&(ne=null,n&&(clearTimeout(n),n=null),r?t.style.setProperty("min-height",r):t.style.removeProperty("min-height"))};return ne=o,n=setTimeout(o,2e3),o}function Ro(e){if(typeof requestAnimationFrame!="function"){setTimeout(e,0);return}requestAnimationFrame(()=>requestAnimationFrame(e))}function Lo(){Co+=1}function mn(e,t){let r=Sl(e)||Sl(t);return r?(r.getAttribute("data-preserve-scroll")||"").toLowerCase().trim()!=="false":!1}function Sl(e){return!e||typeof e.closest!="function"?null:e.closest("[data-preserve-scroll]")}var re,ne,Co,Oo=S(()=>{U();re=null;ne=null;Co=0});function Mi(e){if(!Q||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=Ao(e);if(!t||t.hasAttribute("download")||t.target&&t.target!=="_self")return;let r=t.href;if(!r)return;let n=new URL(r);if(n.origin!==location.origin)return;if(n.pathname===location.pathname&&n.search===location.search&&n.href.includes("#")){bl(n.href);return}if(t.hasAttribute("data-no-router")||Xt.test(n.pathname))return;e.preventDefault();let o=fe(t);gn(r,!1,o,{preserveScroll:mn(t)})}function er(e){vl(location.href)||gn(location.href,!0,null)}function tr(e){if(!Q||e.defaultPrevented)return;let t=e.target;if(!t||t.nodeType!==1||t.tagName!=="FORM"||t.hasAttribute("data-no-router"))return;let r=e.submitter??null;if(r&&r.hasAttribute("data-no-router"))return;let n=r&&r.hasAttribute("formtarget")?r.getAttribute("formtarget")||"":t.getAttribute("target")||"";if(n&&n!=="_self")return;let o=rn(t,r);if(o==="dialog")return;let s=on(t,r),i=o==="get"||o==="head",a=nn(t,r),c;try{c=new URL(a,location.href)}catch{return}if(c.origin!==location.origin||Xt.test(c.pathname))return;let l=an(t,r);if(cl(t,r,o,l),!i&&s==="text/plain")return;let u=sn(l,s);e.preventDefault();let f=fe(r||t),p=mn(r||t,t);El(c.href,o,u,f,t,{preserveScroll:p})}var jo=S(()=>{xo();U();ke();le();vo();Ke();Oo();bn()});function Fi(e){let t=Se(e);document.dispatchEvent(new CustomEvent("webjs:before-cache",{detail:{url:e}})),N.has(t)&&N.delete(t);let r={html:document.documentElement.outerHTML,scrollX:typeof window<"u"&&window.scrollX||0,scrollY:typeof window<"u"&&window.scrollY||0,scrollHeight:typeof document<"u"&&document.documentElement&&document.documentElement.scrollHeight||0};for(N.set(t,r);N.size>16;){let n=N.keys().next().value;N.delete(n)}}function Tl(e){let t=Se(e),r=N.get(t);return r==null?null:(N.delete(t),N.set(t,r),r)}function Se(e,t){let r=new URL(e,location.href),n=r.pathname+r.search;return t?`${t} ${n}`:n}var N,rr=S(()=>{U();N=new Map});function zd(e){let t=_e.get(e);return t==null?!1:An()-t>=$i?(_e.delete(e),!1):!0}function cr(){_e.clear()}function Gd(e){for(_e.has(e)&&_e.delete(e),_e.set(e,An());_e.size>Kd;)_e.delete(_e.keys().next().value)}function xn(){try{let e=typeof navigator<"u"?navigator.connection:null;if(e&&(e.saveData===!0||typeof e.effectiveType=="string"&&/2g$/.test(e.effectiveType))||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-data: reduce)").matches)return!0}catch{}return!1}function Po(){try{if(typeof matchMedia=="function")return matchMedia("(hover: hover) and (pointer: fine)").matches}catch{}return!0}function Yd(e){let t=e.getAttribute("rel");return t?t.toLowerCase().split(/\s+/).filter(Boolean):[]}function ir(e){if(!e||!(e instanceof HTMLAnchorElement)||e.hasAttribute("download")||e.hasAttribute("data-no-router")||e.target&&e.target!=="_self")return null;let t=e.href;if(!t)return null;let r;try{r=new URL(t)}catch{return null}return r.origin!==location.origin||r.pathname===location.pathname&&r.search===location.search&&r.href.includes("#")||Xt.test(r.pathname)?null:t}function Io(e){if(e.hasAttribute("data-no-prefetch"))return!0;let t=Yd(e);return t.includes("external")||t.includes("no-prefetch")}function ar(e){if(Io(e))return"none";switch((e.getAttribute("data-prefetch")||"").toLowerCase().trim()){case"false":case"none":return"none";case"true":case"render":return"render";case"auto":case"viewport":return"viewport";case"intent":return"intent";default:return Po()?"intent":"viewport"}}function Ge(e,t){if(!Q||typeof fetch!="function"||xn())return;let r=Se(e,t);if(typeof location<"u"&&r===Se(location.href,t)||Ne.has(r)||yn.has(r))return;let n=T.get(r);if(n&&An()-n.at<$i||zd(r))return;if(Ne.size>=kl){for(yn.add(r),or.push({href:e,frameId:t||null});or.length>Ud;){let i=or.shift();yn.delete(Se(i.href,i.frameId))}return}let o=be();if(!o&&typeof document<"u"&&document.readyState==="loading")return;Ne.add(r);let s={"x-webjs-router":"1","x-webjs-prefetch":"1"};o&&(s["x-webjs-have"]=o),t&&(s["x-webjs-frame"]=t),fetch(e,{method:"GET",headers:s,credentials:"same-origin",cache:"no-cache"}).then(async i=>{let a=i.headers.get("content-type")||"";if(!/^text\/html\b/i.test(a)||i.status>=400)return;let c=i.headers.get("x-webjs-build"),l=i.headers.get("x-webjs-src"),u=typeof document<"u"?document.querySelector('script[type="importmap"]'):null,f=u?u.getAttribute("data-webjs-build"):null,p=u?u.getAttribute("data-webjs-src"):null;if((c&&f&&c!==f||l&&p&&l!==p)&&(N.clear(),wt(r),cr()),(i.headers.get("x-webjs-frame")||null)!==(t||null)){Gd(r);return}let h=i.redirected&&i.url?i.url:e,y=await i.text();_n.has(r)||Xd(r,{html:y,build:c,src:l,finalUrl:h,frameId:t||null,at:An()})}).catch(()=>{}).finally(()=>{Ne.delete(r),_n.delete(r),Jd()})}function Jd(){for(;or.length&&Ne.size<kl;){let{href:e,frameId:t}=or.shift();yn.delete(Se(e,t)),Ge(e,t)}}function Xd(e,t){for(T.has(e)&&T.delete(e),T.set(e,t);T.size>Hd;){let r=T.keys().next().value;T.delete(r)}typeof document<"u"&&document.dispatchEvent(new CustomEvent("webjs:prefetch",{detail:{url:t.finalUrl,key:e,from:"prefetch"}}))}function qo(e){let t=/<!--wj:children:([^>]*?)-->/.exec(e||"");return t?t[1]:null}function vn(e,t,r){let n=Se(e,r),o=T.get(n);if(!o)return null;if(An()-o.at>=$i)return T.delete(n),null;if(o.frameId)return T.delete(n),qi(o.frameId)?o:null;let s=qo(o.html);return s&&!new Set(String(t??(be()||"")).split(",").filter(Boolean)).has(s)?(T.delete(n),null):(T.delete(n),o)}function An(){try{if(typeof performance<"u"&&typeof performance.now=="function")return performance.now()}catch{}return 0}function yt(e){if(!Q)return;let t=Pi(e.target);if(!t)return;let r=ar(t);if(r==="none"||r==="render")return;let n=ir(t);if(n){if(e.type==="touchstart"){Ge(n,fe(t));return}r==="intent"&&(wn===t&&sr||(En(),wn=t,sr=setTimeout(()=>{sr=null,wn=null,Ge(n,fe(t))},Vd)))}}function Bi(e){let t=Pi(e.target);t&&t===wn&&En()}function En(){sr&&(clearTimeout(sr),sr=null),wn=null}function Do(){for(let e of Sn)clearTimeout(e);Sn.clear(),nr=new WeakMap}function Mo(){if(typeof document>"u"||xn())return;let e=typeof IntersectionObserver<"u";e&&(ze?(ze.disconnect(),Do()):ze=new IntersectionObserver(t=>{for(let r of t){let n=r.target;if(r.isIntersecting){if(nr.has(n))continue;let o=setTimeout(()=>{Sn.delete(o),nr.delete(n),ze.unobserve(n);let s=ir(n);s&&ar(n)==="viewport"&&Ge(s,fe(n))},Wd);nr.set(n,o),Sn.add(o)}else{let o=nr.get(n);o&&(clearTimeout(o),Sn.delete(o),nr.delete(n))}}},{threshold:.5}));for(let t of document.querySelectorAll("a[href]")){let r=ar(t);if(r==="render"){let n=ir(t);n&&Ge(n,fe(t))}else r==="viewport"&&e&&ze.observe(t)}}function wt(e){T.clear();for(let t of Ne)t!==e&&_n.add(t)}function Nl(e,t){let r=Se(e,t);T.delete(r),Ne.has(r)&&_n.add(r)}function Cl(e,t){return T.get(Se(e,t))||null}function Rl(){return Ne.size}function Ll(){T.clear(),_e.clear(),Ne.clear(),_n.clear(),or.length=0,yn.clear(),En(),Do()}function Ol(){ze&&(ze.disconnect(),ze=null)}var Hd,$i,kl,Ud,Vd,Wd,T,_e,Kd,Ne,_n,or,yn,sr,wn,ze,nr,Sn,St=S(()=>{xo();We();U();Ke();ke();rr();Hd=8,$i=3e4,kl=3,Ud=24,Vd=100,Wd=250,T=new Map,_e=new Map,Kd=16;Ne=new Set,_n=new Set,or=[],yn=new Set,sr=null,wn=null,ze=null,nr=new WeakMap,Sn=new Set});function Hi(e){for(let t of e.querySelectorAll("template[data-webjs-resolve]")){let r=t.cloneNode(!0);document.body.appendChild(r);let n=r.getAttribute("data-webjs-resolve"),o=window.__webjsResolve;n&&typeof o=="function"&&o(n)}}async function Tn(e){if(!e.body||typeof e.body.getReader!="function")return{shell:await e.text(),streaming:!1};let t=e.body.getReader(),r=new TextDecoder,n="",o="<template data-webjs-resolve",s="<!--wj-stream-shell-->",i=/<\/html\s*>/i;for(;;){let{value:a,done:c}=await t.read();a&&(n+=r.decode(a,{stream:!0})),c&&(n+=r.decode());let l=n.indexOf(s);if(l!==-1)return{shell:n.slice(0,l),streaming:!0,reader:c?null:t,dec:r,rest:n.slice(l+s.length)};let u=n.indexOf(o);if(u!==-1)return{shell:n.slice(0,u),streaming:!0,reader:c?null:t,dec:r,rest:n.slice(u)};if(c)return{shell:n,streaming:!1};let f=i.exec(n);if(f){let p=f.index+f[0].length;return{shell:n.slice(0,p),streaming:!0,reader:t,dec:r,rest:n.slice(p)}}}}function Fo(e){let t=/<template\s+data-webjs-resolve="([^"]+)"\s*>/i.exec(e);if(!t)return null;let r=t[1],n=t.index+t[0].length,o=/<(\/?)template\b[^>]*>/gi;o.lastIndex=n;let s=1,i;for(;i=o.exec(e);)if(i[1]==="/"){if(s--,s===0)return{id:r,content:e.slice(n,i.index),rest:e.slice(i.index+i[0].length)}}else s++;return null}function $o(e,t){let r=document.getElementById(e);if(!r){ul(e);return}let n=document.createElement("template");n.innerHTML=t;let o=[...n.content.childNodes];r.replaceWith(n.content);for(let s of o)s.nodeType===1&&Bo(s)}async function kn(e,t,r,n){let o=r,s=()=>{let i;for(;i=Fo(o);){if(!n())return!1;$o(i.id,i.content),o=i.rest}return!0};if(!e){s();return}try{for(;;){if(!s()){try{await e.cancel()}catch{}return}let{value:i,done:a}=await e.read();if(i&&(o+=t.decode(i,{stream:!0})),a){o+=t.decode(),s();return}}}catch{}}var Nn=S(()=>{le();_t()});function ur(){if(typeof document>"u")return!1;let e=document.querySelector('meta[name="view-transition"]');return e?(e.getAttribute("content")||"").trim().toLowerCase()==="same-origin":!1}function At(e,t){let r=typeof document<"u"?document.startViewTransition:void 0;if(ur()&&typeof r=="function"){let n=r.call(document,e);return n&&n.finished&&typeof n.finished.then=="function"?n.finished.then(()=>{t&&t()}).catch(()=>{}):t&&t(),n&&n.updateCallbackDone&&typeof n.updateCallbackDone.then=="function"?n.updateCallbackDone.catch(()=>{}):Promise.resolve()}return e(),t&&t(),Promise.resolve()}function Cn(e,t){if(!e||!t||typeof e.querySelectorAll!="function")return;let r=e.querySelectorAll("[data-webjs-permanent][id]");for(let n of r){let o=n.id;if(!o)continue;let s=null;try{s=t.querySelector(`#${CSS.escape(o)}`)}catch{s=null}if(!s||!n.hasAttribute||!n.hasAttribute("data-webjs-permanent"))continue;let i=s.parentNode;i&&s!==n&&(i.replaceChild(n,s),lr.add(n))}}function Ce(e,t){let r=[];for(let n of e){if(n.nodeType!==1)continue;let o=n;if(o.hasAttribute&&o.hasAttribute("data-webjs-permanent")&&o.id&&r.push(o),typeof o.querySelectorAll=="function")for(let s of o.querySelectorAll("[data-webjs-permanent][id]"))r.push(s)}if(r.length)for(let n of r){let o=n.id;if(!o)continue;let s=Zd(t,o);if(!s||s===n)continue;let i=s.parentNode;if(i)i.replaceChild(n,s),lr.add(n);else{let a=t.indexOf(s);a!==-1&&(t[a]=n,lr.add(n))}}}function Zd(e,t){for(let r of e){if(r.nodeType!==1)continue;let n=r;if(n.id===t)return n;if(typeof n.querySelector=="function"){let o=null;try{o=n.querySelector(`#${CSS.escape(t)}`)}catch{o=null}if(o)return o}}return null}var lr,xt=S(()=>{lr=new WeakSet});function jl(e,t){let r=[];for(let n=e.parentNode;n;n=n.parentNode)if(r.unshift(n),n===t)return r;return null}function ql(e,t,r,n){let o=jl(e.start,r),s=jl(t.start,n);if(!o||!s||o.length!==s.length)return null;for(let i=1;i<o.length;i++)if(o[i].tagName!==s[i].tagName||Ui(o[i]))return null;return{live:o,incoming:s,liveRange:e,incomingRange:t}}function Pl(e,t,r){let n=[],o=[],s=n;for(let i=e.firstChild;i;i=i.nextSibling)i===t&&(s=null),s&&s.push(i),i===r&&(s=o);return{before:n,after:o}}function Qd(e,t){for(let r of t.attributes)Te.has(r.name)||r.name==="data-wj-serialized"||e.getAttribute(r.name)!==r.value&&e.setAttribute(r.name,r.value);for(let r of[...e.attributes])Te.has(r.name)||t.hasAttribute(r.name)||e.removeAttribute(r.name)}function ep(e,t){let r=new Map;for(let i of e){if(i.nodeType!==1)continue;let a=oe(i);a&&r.set(a,i)}let n=new Set,o=0,s=[];for(let i of t){if(i.nodeType===1){let c=oe(i),l=c?r.get(c):null;if(l&&!n.has(l)){n.add(l),Re(l,i),s.push(l),o=Math.max(o,e.indexOf(l)+1);continue}}let a=o;for(;a<e.length;a++){let c=e[a];if(n.has(c)||c.nodeType!==i.nodeType)continue;if(c.nodeType!==1)break;let l=c;if(!oe(l)&&l.tagName===i.tagName)break}if(a<e.length&&(i.nodeType===1||i.nodeType===3||i.nodeType===8)){let c=e[a];n.add(c),c.nodeType===1?Re(c,i):c.nodeValue!==i.nodeValue&&(c.nodeValue=i.nodeValue),s.push(c),o=a+1;continue}s.push(i)}return s}function Il(e,t,r,n,o){let s=r.map(u=>document.importNode(u,!0));Ce(t,s);let i=ep(t,s),a=new Set(i),c=n;if(o){let u=-1;for(let p=0;p<t.length;p++)a.has(t[p])&&(u=p);let f=t.slice(u+1);if(f.length){for(let p of f)a.add(p);c=f[0]}}for(let u of t)!a.has(u)&&u.parentNode===e&&e.removeChild(u);for(let u=i.length-1;u>=0;u--){let f=i[u];(f.parentNode!==e||f.nextSibling!==c)&&e.insertBefore(f,c),c=f}let l=new Set(t);return i.filter(u=>!l.has(u))}function Dl(e){let{live:t,incoming:r,liveRange:n,incomingRange:o}=e,s=[];for(let i=0;i<t.length;i++){let a=t[i],c=r[i];i>0&&Qd(a,c);let l=i===t.length-1,u=l?n.start:t[i+1],f=l?n.end:t[i+1],p=l?o.start:r[i+1],b=l?o.end:r[i+1],h=Pl(a,u,f),y=Pl(c,p,b),g=[...Il(a,h.before,y.before,u,!1),...Il(a,h.after,y.after,null,i===0)];for(let w of g)w.nodeType===1&&s.push(Ye(w));for(let w of[h.before,h.after])for(let m of w)m.nodeType===1&&m.isConnected&&s.push(m)}for(let i of s)i.isConnected&&Le(i)}var Ml=S(()=>{U();vt();_t();xt()});function Tt(e,t,r,n,o,s,i,a){let c=!1,l=()=>{if(!c){c=!0;try{ho(e,{frame:!!t})}catch{}}};try{for(let h of e.querySelectorAll("[data-wj-host]"))h.setAttribute("data-wj-serialized","")}catch{}try{typeof sessionStorage<"u"&&(!n||t||r)&&sessionStorage.removeItem("webjs:importmap-reload")}catch{}if(n&&!t&&!r){let h=document.querySelector('script[type="importmap"]'),y=h?h.getAttribute("data-webjs-build"):null,g=!1;if(o&&y&&(g=o!==y),!g&&e.head&&e.head.children.length>0){let w=Di(document),m=Di(e);w!==m&&(g=!0)}if(g&&typeof location<"u"){N.clear(),wt(),cr();try{let w="webjs:importmap-reload";if(sessionStorage&&sessionStorage.getItem(w))sessionStorage.removeItem(w),ce("deploy-mismatch-reload-suppressed",n,!1);else return sessionStorage&&sessionStorage.setItem(w,"1"),ce("deploy-mismatch",n),ye(n),"none"}catch{return ce("deploy-mismatch",n),ye(n),"none"}}else if(!g){let w=h?h.getAttribute("data-webjs-src"):null;s&&w&&s!==w&&(N.clear(),wt(),cr(),h&&h.setAttribute("data-webjs-src",s));try{typeof sessionStorage<"u"&&sessionStorage.removeItem("webjs:importmap-reload")}catch{}}}if(t){l();let h=document.querySelector(`webjs-frame#${CSS.escape(t)}`),y=e.querySelector(`webjs-frame#${CSS.escape(t)}`);if(h&&y){a&&a(),Qt(e.head),Je=At(()=>{Ul(h,y),Ye(h),Le(h),Hi(e.body),Et()},()=>Le(h));return}let g=new CustomEvent("webjs:frame-missing",{bubbles:!0,cancelable:!0,detail:{frameId:t,url:n||(typeof location<"u"?location.href:null),document:e}});return(h||document).dispatchEvent(g),g.defaultPrevented||console.warn(`[webjs] frame "${t}" was not in the navigation response, leaving it unchanged. Handle "webjs:frame-missing" (preventDefault) to override.`),"none"}if(i==="shell"){l(),a&&a(),Vi(e);return}let u=ue(document.body),f=ue(e.body),p=u&&f?Qr(u,f):null,b=p&&i==="layouts"?ql(p.live,p.incoming,document.body,e.body):null;if(p&&i==="layouts"&&!b){l(),a&&a(),Vi(e);return}if(p){l(),a&&a();let{mode:h,live:y,incoming:g}=p;Qt(e.head),Je=At(()=>{h==="replace"?$l(y,g):Bl(y,g,e),Hl(y.start,g.start),b&&Dl(b),Hi(e.body),Et()},()=>Fl(y));return}if(n&&!r&&typeof location<"u")return ce(u?f?"no-shared-boundary":"incoming-boundaries-malformed":"live-boundaries-malformed",n),ye(n),"none";if(n&&r)return ce("revalidation-discarded",n,!1),"discard";l(),a&&a(),Vi(e)}function Vi(e){ln(e.head),Cn(document.body,e.body);let t=[...e.body.childNodes];Je=At(()=>{document.body.replaceChildren(...t),Ye(document.body),Le(document.body),Et()},()=>Le(document.body))}var Je,Rn=S(()=>{mo();We();le();vt();Ke();un();Ml();St();rr();ke();Nn();_t();xt();Je=Promise.resolve()});function Vl(){Wi||typeof MutationObserver>"u"||typeof customElements>"u"||(Wi=new MutationObserver(e=>{for(let t of e)for(let r of t.addedNodes){if(r.nodeType!==1)continue;let n=r;n.tagName?.includes("-")&&customElements.upgrade(n);for(let o of n.querySelectorAll("*"))o.tagName?.includes("-")&&customElements.upgrade(o)}}),Wi.observe(document.body,{childList:!0,subtree:!0}))}function Fl(e){if(!(!e||!e.start))for(let t=e.start.nextSibling;t&&t!==e.end;t=t.nextSibling)t.nodeType===1&&Le(t)}function Le(e){typeof customElements>"u"||Bo(e)}function Bo(e){let t=e instanceof Element?[e,...e.querySelectorAll("*")]:[...e.querySelectorAll("*")];for(let r of t)r.tagName&&r.tagName.includes("-")&&(customElements.upgrade(r),r.shadowRoot&&Bo(r.shadowRoot))}function Ye(e){if(e.tagName==="SCRIPT"){let r=cn(e);return e.replaceWith(r),r}let t=[];lr.has(e)&&t.push(e);for(let r of e.querySelectorAll("[data-webjs-permanent]"))lr.has(r)&&t.push(r);for(let r of e.querySelectorAll("script"))t.length&&t.some(n=>n!==r&&n.contains(r))||r.replaceWith(cn(r));return e}function Ln(e){let t=[];for(let r=e.start.nextSibling;r&&r!==e.end;r=r.nextSibling)r.nodeType===1&&t.push(r);for(let r of t){let n=Ye(r);n.isConnected!==!1&&Le(n)}}var Wi,_t=S(()=>{We();U();le();vt();tn();jo();vo();Ke();un();St();rr();Nn();Rn();xt();Wi=null});function Et(){let e=document.activeElement;!e||e===document.body||e===document.documentElement||typeof e.blur=="function"&&e.blur()}function $l(e,t){let r=e.start.parentNode;if(!r)return;let n=[];for(let s=e.start.nextSibling;s&&s!==e.end;s=s.nextSibling)n.push(s);let o=[];for(let s=t.start.nextSibling;s&&s!==t.end;s=s.nextSibling)o.push(document.importNode(s,!0));Ce(n,o);for(let s of n)s.parentNode===r&&r.removeChild(s);for(let s of o)r.insertBefore(s,e.end);Ln(e)}function Bl(e,t,r){if(!e||!t)return;let n=e.start.parentNode;if(!n)return;let o=[];for(let i=e.start.nextSibling;i&&i!==e.end;i=i.nextSibling)o.push(i);let s=[];for(let i=t.start.nextSibling;i&&i!==t.end;i=i.nextSibling)s.push(document.importNode(i,!0));Ce(o,s),tp(n,e.start,e.end,o,s),Ln(e)}function tp(e,t,r,n,o){let s=new Map;for(let c of n){if(c.nodeType!==1)continue;let l=oe(c);l&&s.set(l,c)}let i=r,a=[];for(let c of o){if(c.nodeType===1){let l=oe(c);if(l&&s.has(l)){let u=s.get(l);Re(u,c),a.push(u),s.delete(l);continue}}a.push(c)}for(let c of n)if(c.parentNode===e){if(c.nodeType===1&&a.includes(c))continue;e.removeChild(c)}for(let c of a)e.insertBefore(c,i)}function Re(e,t){if(e===t)return;if(e.tagName!==t.tagName){e.replaceWith(t);return}let r=new Set;for(let n of t.attributes)r.add(n.name),!Te.has(n.name)&&n.name!=="data-wj-serialized"&&e.getAttribute(n.name)!==n.value&&e.setAttribute(n.name,n.value);for(let n of[...e.attributes])Te.has(n.name)||r.has(n.name)||e.removeAttribute(n.name);if(Ui(e)){np(e,t);return}fr(e,t)}function Ui(e){let t=e;return t[Symbol.for("webjs.instance")]!=null||t[A]!=null}function rp(e,t){for(let r=e.parentElement;r&&r!==t;r=r.parentElement)if(r.tagName.includes("-"))return!1;return!0}function Ho(e){let t=new Map,r=`slot[${x}][${P}="${B}"]`;for(let n of e.querySelectorAll(r)){let o=n;if(!rp(o,e)||xs(e,o))continue;let s=!1;for(let a=o.parentElement;a&&a!==e;a=a.parentElement)if(a.tagName==="SLOT"&&a.hasAttribute(x)&&a.getAttribute(P)===B){s=!0;break}if(s)continue;let i=G(o.getAttribute("name"));t.has(i)||t.set(i,o)}return t}function Hl(e,t){let r=e.parentNode;if(!r||r.nodeType!==1)return;let n=r;if(n.tagName!=="SLOT"||!n.hasAttribute(x))return;let o=null;for(let f=n.parentElement;f;f=f.parentElement){if(f[A]){o=f;break}if(f.tagName.includes("-"))return}if(!o)return;let s=G(n.getAttribute("name"));De(o,s,[...n.childNodes]);let i=t.parentNode;if(!i||i.nodeType!==1)return;let a=i;if(a.tagName!=="SLOT")return;let c=null;for(let f=a.parentElement;f;f=f.parentElement)if(f.tagName.includes("-")){c=f;break}if(!c||c.tagName!==o.tagName)return;let l=Ho(o),u=Ho(c);for(let f of new Set([...l.keys(),...u.keys()])){if(f===s)continue;let p=u.get(f);p?De(o,f,[...p.childNodes].map(b=>document.importNode(b,!0))):l.get(f)&&De(o,f,null)}}function np(e,t){if(!e[A])return;let r=Ho(e),n=Ho(t);if(r.size===0&&n.size===0)return;let o=new Set([...r.keys(),...n.keys()]);for(let s of o){let i=r.get(s),a=n.get(s);i&&a?(fr(i,a),De(e,s,[...i.childNodes])):a?De(e,s,[...a.childNodes].map(c=>document.importNode(c,!0))):De(e,s,null)}}function fr(e,t){let r=[...e.childNodes],n=[...t.childNodes].map(a=>document.importNode(a,!0));Ce(r,n);let o=new Map;for(let a of r){if(a.nodeType!==1)continue;let c=oe(a);c&&o.set(c,a)}let s=[];for(let a=0;a<n.length;a++){let c=n[a];if(c.nodeType===1){let l=oe(c);if(l&&o.has(l)){let f=o.get(l);Re(f,c),s.push(f),o.delete(l);continue}let u=r[a];if(u&&u.nodeType===1&&!oe(u)&&u.tagName===c.tagName&&op(u,c)){Re(u,c),s.push(u);continue}}else if(c.nodeType===3){let l=r[a];if(l&&l.nodeType===3){l.nodeValue!==c.nodeValue&&(l.nodeValue=c.nodeValue),s.push(l);continue}}else if(c.nodeType===8){let l=r[a];if(l&&l.nodeType===8){l.nodeValue!==c.nodeValue&&(l.nodeValue=c.nodeValue),s.push(l);continue}}s.push(c)}let i=new Set(s);for(let a of r)!i.has(a)&&a.parentNode===e&&e.removeChild(a);for(let a=0;a<s.length;a++){let c=s[a];(c.parentNode!==e||e.childNodes[a]!==c)&&e.insertBefore(c,e.childNodes[a]||null)}}function op(e,t){let r=e.localName;return r!=="input"&&r!=="select"&&r!=="textarea"?!0:!(e.getAttribute("name")!==t.getAttribute("name")||r==="input"&&(e.getAttribute("type")||"text").toLowerCase()!==(t.getAttribute("type")||"text").toLowerCase())}function oe(e){let t=e.getAttribute("data-key");return t?`${e.tagName}:k:${t}`:e.id?`${e.tagName}:i:${e.id}`:null}function dr(){let e=ue(document.body);if(!e||e.size===0)return null;let t=[...e.keys()].sort((c,l)=>l.length-c.length),r=null,n=null;for(let c of t){let l=document.getElementById(`wj-loading:${c}`);if(l instanceof HTMLTemplateElement){r=c,n=l;break}}if(r===null||n===null)return null;let o=e.get(r),s=be(),i=[];for(let c=o.start.nextSibling;c&&c!==o.end;c=c.nextSibling)i.push(c);let a=document.createRange();return a.setStartAfter(o.start),a.setEndBefore(o.end),a.deleteContents(),o.start.parentNode.insertBefore(n.content.cloneNode(!0),o.end),{slot:o,oldChildren:i,token:k,haveKeys:s}}function Xe(e){if(!e||e.token!==k)return;let{slot:t,oldChildren:r}=e;if(t.start.parentNode!==t.end.parentNode)return;let n=document.createRange();n.setStartAfter(t.start),n.setEndBefore(t.end),n.deleteContents();for(let o of r)t.start.parentNode.insertBefore(o,t.end)}function Ul(e,t){fr(e,t)}var vt=S(()=>{ct();We();U();ke();_t();xt()});function sp(e){if(typeof document>"u"||!document.body)return!1;let t=ue(document.body);if(!t)return!1;let r,n=-1;for(let[c,l]of t)c.length>n&&(n=c.length,r=l);if(!r)return!1;let o=r.start.parentNode;if(!o||r.start.parentNode!==r.end.parentNode)return!1;let s=document.createElement("div");s.setAttribute("role","alert"),s.setAttribute("data-webjs-nav-error","");let i=e?`This page could not be loaded. (status ${e})`:"This page could not be loaded.";s.textContent=i;let a=document.createRange();return a.setStartAfter(r.start),a.setEndBefore(r.end),a.deleteContents(),o.insertBefore(s,r.end),!0}function Uo(e,t,r){let n=new CustomEvent("webjs:navigation-error",{bubbles:!0,cancelable:!0,detail:{url:e,status:t??null,error:r||null}});if(typeof document<"u")try{document.dispatchEvent(n)}catch{}n.defaultPrevented||sp(t)||typeof location<"u"&&(ce("navigation-error-unrecoverable",e),ye(e))}var Wl=S(()=>{We();le();ke()});async function On(e,t,r,n,o,s,i,a,c,l){o=o||"GET";let u=l&&l.refresh||void 0,f=s!=null&&o!=="GET"&&o!=="HEAD"&&!t,p=!!(l&&l.noPrefetch),b=!!(l&&l.preserveScroll),h=typeof a=="number"?a:k,y,g=null,w=null,m=null,_=null,E=!1,C=e,J=t?fn(t,h):null;try{try{let W=o==="GET"&&!s&&!u&&!p?vn(e,n?n.haveKeys:void 0,t):null;if(W)y=W.html,w=W.build,m=W.src,C=W.finalUrl,_=200,E=!0;else{let Ze={"x-webjs-router":"1"},ea=u||f?"":be();ea&&(Ze["x-webjs-have"]=ea),t&&(Ze["x-webjs-frame"]=t),s!=null&&o!=="GET"&&o!=="HEAD"&&(Ze.accept=ki+", text/html");let Go={method:o,headers:Ze,credentials:"same-origin",cache:"no-cache"};i&&(Go.signal=i),s!=null&&o!=="GET"&&o!=="HEAD"&&(Go.body=s);let K=await fetch(e,Go);_=K.status,E=K.ok;let ta=Ti(K.headers.get("x-webjs-invalidate"));ta.length&&Ei(ta);let ra=K.headers.get("content-type")||"",ru=/^text\/html\b/i.test(ra);if(ra.toLowerCase().indexOf(ki)===0){let nu=await K.text(),Pn=h===k;return Pn&&(Xe(n),_i(nu)),{ok:Pn&&E,status:_,aborted:!Pn,applied:Pn}}if(K.redirected&&K.url&&(C=K.url),K.status===204||K.status===205)return h===k&&r&&history.pushState(null,"",C),{ok:E,status:_,aborted:!1,applied:!1};if(!ru)return h===k&&(Xe(n),Uo(e,K.status,null)),{ok:!1,status:_,aborted:!1,applied:!1};w=K.headers.get("x-webjs-build"),m=K.headers.get("x-webjs-src");let Yo=await Tn(K);y=Yo.shell,Yo.streaming&&(g=Yo)}}catch(W){return W&&W.name==="AbortError"?{ok:!1,status:null,aborted:!0,applied:!1}:h!==k?{ok:!1,status:null,aborted:!0,applied:!1}:(Xe(n),Uo(e,null,W instanceof Error?W:new Error(String(W))),{ok:!1,status:null,aborted:!1,applied:!1})}if(h!==k){if(g&&g.reader)try{g.reader.cancel()}catch{}return{ok:!1,status:_,aborted:!0,applied:!1}}let V=bt(y);if(!V)return Xe(n),Uo(e,null,new Error("navigation response did not parse as HTML")),{ok:!1,status:_,aborted:!1,applied:!1};let F=!1,$=r?()=>{F||(F=!0,history.pushState(null,"",C))}:null,d=Tt(V,t,!!c,C,w,m,u||(f?"layouts":void 0),$),kt=d!=="none";if(d==="discard"){if(g&&g.reader)try{g.reader.cancel()}catch{}return{ok:E,status:_,aborted:!1,applied:!1}}if($&&$(),r&&!t){let W=new URL(C),Ze=W.hash?document.getElementById(W.hash.slice(1)):null;Ze?Ze.scrollIntoView():b||(fl(),window.scrollTo({left:0,top:0,behavior:"instant"}))}return g&&(g.reader||g.rest)&&Je.then(()=>kn(g.reader,g.dec,g.rest,()=>h===k)),document.dispatchEvent(new CustomEvent("webjs:navigate",{detail:{url:C,frameId:t,from:"navigate"}})),{ok:E,status:_,aborted:!1,applied:kt}}finally{J&&dn(J,h)}}var Kl=S(()=>{bo();Jr();We();U();le();vt();tn();Ke();Wl();bn();St();ke();Nn();Rn()});function Ki(e){if(e.id)return`id:${e.id}`;let t=e.querySelector(`input[name="${zl}"]`);return t?`act:${t.getAttribute("value")||""}`:`url:${e.getAttribute("action")||""}`}function ap(e,t){let r=0;for(let n of document.querySelectorAll("form")){if(n===e)return r;Ki(n)===t&&r++}return-1}function cp(e){let t=e.localName;if(t==="textarea")return"text";if(t==="select")return"select";if(t!=="input")return null;let r=(e.getAttribute("type")||"text").toLowerCase();return ip.has(r)?null:r==="checkbox"||r==="radio"?"check":"text"}function Gl(e){let t=new Map,r=[],n=e.elements?[...e.elements]:[...e.querySelectorAll("input, textarea, select")];for(let o of n){let s=o.getAttribute&&o.getAttribute("name");if(!s||s===zl)continue;let i=cp(o);if(!i)continue;let a=i==="check"?`${s}\0${o.getAttribute("value")??"on"}`:s,c=t.get(a)||0;t.set(a,c+1),r.push({el:o,name:s,kind:i,n:c})}return r}function Yl(e,t){if(t==="check")return{def:String(!!e.defaultChecked),cur:String(!!e.checked)};if(t==="select"){let r=[...e.options];return{def:JSON.stringify(r.map(n=>n.defaultSelected)),cur:JSON.stringify(r.filter(n=>n.selected).map(n=>n.value))}}return{def:e.defaultValue??"",cur:e.value??""}}function Jl(e){if(!e||e.getAttribute("data-preserve-values")==="false")return null;let t=Ki(e),r=Gl(e).map(({el:n,name:o,kind:s,n:i})=>({name:o,kind:s,n:i,...s==="check"?{value:n.getAttribute("value")??"on"}:{},...Yl(n,s)}));return r.length?{form:e,key:t,ord:ap(e,t),controls:r}:null}function lp(e){if(e.form.isConnected)return e.form;let t=0;for(let r of document.querySelectorAll("form"))if(Ki(r)===e.key){if(t===e.ord)return r;t++}return null}function Xl(e){if(!e)return 0;let t=lp(e);if(!t)return 0;let r=new Map;for(let o of Gl(t)){let s=o.kind==="check"?`${o.name}\0${o.el.getAttribute("value")??"on"}\0${o.n}`:`${o.name}\0${o.n}`;r.set(s,o)}let n=0;for(let o of e.controls){let s=o.kind==="check"?`${o.name}\0${o.value}\0${o.n}`:`${o.name}\0${o.n}`,i=r.get(s);if(!i||i.kind!==o.kind)continue;let a=Yl(i.el,i.kind);if(a.def===o.def&&a.cur!==o.cur){if(o.kind==="check")i.el.checked=o.cur==="true";else if(o.kind==="select"){let c=new Set(JSON.parse(o.cur));for(let l of i.el.options)l.selected=c.has(l.value)}else i.el.value=o.cur;n++}}return n}var zl,ip,Zl=S(()=>{zl="__webjs_action",ip=new Set(["password","file","hidden","submit","button","image","reset"])});function vl(e){if(!yl(e)||!ee)return!1;let t,r;try{t=new URL(ee),r=new URL(e,location.href)}catch{return!1}return t.pathname!==r.pathname||t.search!==r.search?!1:(ee=r.href,!0)}function jn(){Q||typeof document>"u"||(Oi(!0),globalThis.__webjsRefreshPage=Ko,document.addEventListener("click",Mi,!1),document.addEventListener("submit",tr,!1),window.addEventListener("popstate",er),document.addEventListener("pointerover",yt,!0),document.addEventListener("focusin",yt,!0),document.addEventListener("touchstart",yt,{capture:!0,passive:!0}),document.addEventListener("pointerout",Bi,!0),document.addEventListener("webjs:navigate",Mo),Vl(),Mo(),typeof history<"u"&&"scrollRestoration"in history&&(Vo=history.scrollRestoration,history.scrollRestoration="auto"),typeof location<"u"&&(ee=location.href),ll())}function zi(){Q&&(Oi(!1),document.removeEventListener("click",Mi,!1),document.removeEventListener("submit",tr,!1),window.removeEventListener("popstate",er),_o(),document.removeEventListener("pointerover",yt,!0),document.removeEventListener("focusin",yt,!0),document.removeEventListener("touchstart",yt,{capture:!0}),document.removeEventListener("pointerout",Bi,!0),document.removeEventListener("webjs:navigate",Mo),En(),Do(),Ol(),typeof history<"u"&&Vo!==null&&(history.scrollRestoration=Vo,Vo=null),Lo(),re&&re(),ne&&ne(),ee=null,delete globalThis.__webjsRefreshPage)}async function Gi(e,t){let r=new URL(e,location.href);if(r.origin!==location.origin){ye(e);return}await gn(r.href,t?.replace??!1,null,{preserveScroll:t?.scroll===!1})}async function Yi(e,t){if(typeof location>"u")return{ok:!1,status:null,aborted:!1,applied:!1};let r=e&&e.id;if(!r)return{ok:!1,status:null,aborted:!1,applied:!1};let n=new URL(t,location.href);if(n.origin!==location.origin)return{ok:!1,status:null,aborted:!1,applied:!1};se&&se.abort(),se=new AbortController;let o=se.signal,s=So(),i=await On(n.href,r,!1,null,"GET",null,o,s,!1,{noPrefetch:!0});return i&&i.applied&&Nl(n.href,r),i}function Wo(e){if(!e){N.clear(),wt();return}let t=new URL(e,location.href),r=t.pathname+t.search;N.delete(r),T.delete(r);let n=` ${r}`;for(let o of[...T.keys()])o.endsWith(n)&&T.delete(o)}async function Ko(e){if(!Q||typeof location>"u")return!1;Wo(),cr();try{let t=await gn(location.href,!1,null,{refresh:e==="shell"?"shell":"page"});return!t||t.aborted?!0:t.applied}catch{return!1}}async function gn(e,t,r,n){_o();let o=n&&n.refresh||void 0,s=!!(n&&n.preserveScroll);if(Li(t,r)&&typeof location<"u")return ce("readyState-loading",e),ye(e),null;se&&se.abort(),se=new AbortController;let i=se.signal,a=So();r||(Lo(),re&&re(),ne&&ne()),!o&&ee&&Fi(ee);let c=setTimeout(()=>{Zr(!0),c=null},150),l=null;!t&&!o&&(l=dr());let u=!1;try{if(t){let p=Tl(e);if(p){let b=bt(p.html);if(b){let h=xl(p.scrollHeight);Tt(b,r,!0,null);let y=()=>{};if(typeof window<"u"){let m=()=>{y=Al(p.scrollX,p.scrollY)};if(ur()&&typeof document.startViewTransition=="function"){let _=Co;Je.then(()=>{_!==Co||!Q||m()}).catch(()=>{})}else m()}let g=On(e,r,!1,l,"GET",null,i,a,!0).catch(()=>{}),w=new Promise(m=>setTimeout(m,500));return Promise.all([g,w]).then(()=>Ro(()=>{y(),Ro(h)})),null}}u=!0,typeof window<"u"&&window.scrollTo({left:0,top:0,behavior:"instant"})}let f=await On(e,r,!t&&!o,l,"GET",null,i,a,!1,{refresh:o,preserveScroll:s});return u&&f&&f.applied&&typeof window<"u"&&Ro(()=>{a!==k||!Q||window.scrollTo({left:0,top:0,behavior:"instant"})}),f}finally{c&&clearTimeout(c),a===k&&(Zr(!1),typeof location<"u"&&(ee=location.href))}}async function El(e,t,r,n,o,s){_o(),se&&se.abort(),se=new AbortController;let i=se.signal,a=So();n||(Lo(),re&&re(),ne&&ne());let c=t==="get"||t==="head",l=new URL(e,location.href);if(c){l.search="";for(let[y,g]of r)l.searchParams.append(y,typeof g=="string"?g:g.name)}ee&&Fi(ee);let u=setTimeout(()=>{Zr(!0),u=null},150),f=dr(),p=o?pn(o,a,l.href):null,b=c?null:Jl(o),h=!1;try{let y=await On(l.href,n,!0,f,c?"GET":t.toUpperCase(),c?null:r,i,a,!1,{preserveScroll:!!(s&&s.preserveScroll)});h=!!(y&&y.ok),b&&y&&y.applied&&!y.ok&&a===k&&(await Je,a===k&&Xl(b)),!c&&a===k&&(N.clear(),wt())}finally{p&&hn(p,a,l.href,h),u&&clearTimeout(u),a===k&&(Zr(!1),typeof location<"u"&&(ee=location.href))}}function Ql(){return ee}function eu(e){ee=e}var se,ee,Vo,bn=S(()=>{U();le();vt();tn();jo();Kl();Ke();Zl();St();Oo();rr();ke();Rn();_t();xt();se=null,ee=null;Vo=null});var Zc={};na(Zc,{_FALLBACK_MARKER_KEY:()=>gt,_FRAME_TOP:()=>Xr,_LIVE_ATTRS:()=>Te,_activateSwappedRange:()=>Ln,_activeFrameId:()=>No,_addNewHeadElements:()=>Qt,_applyOptimisticLoading:()=>dr,_applyStreamedResolve:()=>$o,_applySwap:()=>Tt,_blurOutgoingFocus:()=>Et,_buildHaveHeader:()=>be,_buildSubmitFormData:()=>an,_bumpNavToken:()=>gl,_clearFormBusy:()=>hn,_clearFrameBusy:()=>dn,_collectBoundaries:()=>ue,_currentPageUrl:()=>Ql,_diffElementInPlace:()=>Re,_eligibleAnchorHref:()=>ir,_encodeSubmitBody:()=>sn,_findAnchorInPath:()=>Ao,_getSubmitAction:()=>nn,_getSubmitEnctype:()=>on,_getSubmitMethod:()=>rn,_isNonHtmlPath:()=>sl,_isPreBootNavigation:()=>wo,_keyOf:()=>oe,_markFormBusy:()=>pn,_markFrameBusy:()=>fn,_mergeHead:()=>ln,_navToken:()=>ml,_onPopState:()=>er,_onSubmit:()=>tr,_parseHTML:()=>bt,_planBoundarySwap:()=>Qr,_prefetch:()=>Ge,_prefetchAnchor:()=>qo,_prefetchCache:()=>T,_prefetchHasHoverPointer:()=>Po,_prefetchInflightSize:()=>Rl,_prefetchMode:()=>ar,_prefetchPeek:()=>Cl,_prefetchSaysSaveData:()=>xn,_prefetchSuppressed:()=>Io,_prefetchTake:()=>vn,_reactivateScripts:()=>Ye,_readStreamedShell:()=>Tn,_reconcileChildren:()=>fr,_regraftPermanentElements:()=>Cn,_regraftPermanentInSlice:()=>Ce,_resetParseProbe:()=>ji,_resetPrefetch:()=>Ll,_resetWarnOnce:()=>dl,_resolvePreserveScroll:()=>mn,_resolveTargetFrameId:()=>fe,_restoreOptimistic:()=>Xe,_runWithTransition:()=>At,_setCurrentPageUrl:()=>eu,_setHardNavigate:()=>hl,_shouldFullLoadDuringParse:()=>pl,_snapshotCache:()=>N,_streamBoundariesProgressively:()=>kn,_takeResolveUnit:()=>Fo,_viewTransitionsEnabled:()=>ur,disableClientRouter:()=>zi,enableClientRouter:()=>jn,loadFrame:()=>Yi,navigate:()=>Gi,refreshPage:()=>Ko,revalidate:()=>Wo});var wi=S(()=>{yi();Jr();Jr();xe();el();mo();bo();ct();bn();U();le();bn();St();ke();We();U();le();vt();tn();xo();jo();vo();Ke();un();St();Oo();rr();Nn();Rn();_t();xt();(typeof window>"u"||window.__WEBJS_CLIENT_ROUTER__!==!1)&&jn()});function Jo(e,...t){return{_$webjs:"template",strings:e,values:t}}function I(e){return!!e&&typeof e=="object"&&e._$webjs==="template"}var R="wjm-";function su(e,...t){let r=e[0];for(let n=1;n<e.length;n++)r+=String(t[n-1]??"")+e[n];return{_$webjsCss:!0,text:r}}function pr(e){return!!e&&typeof e=="object"&&e._$webjsCss===!0}function Xo(e,t){if(!(!t||!t.length))if("adoptedStyleSheets"in e&&typeof CSSStyleSheet<"u"){let r=t.map(n=>{let o=new CSSStyleSheet;return o.replaceSync(n.text),o});e.adoptedStyleSheets=r}else{let r=e,n=document.createElement("style");n.textContent=t.map(o=>o.text).join(`
4
+ `),r.appendChild(n)}}function Zo(e){return!e||!e.length?"":`<style>${e.map(t=>t.text).join(`
5
+ `)}</style>`}xe();var pa=Symbol.for("webjs.repeat");function ha(e,t,r){return{[pa]:!0,items:[...e],keyFn:t,templateFn:r}}function Lt(e){return!!e&&typeof e=="object"&&e[pa]===!0}function ss(e){return{_$webjs:"unsafe-html",value:String(e??"")}}function xr(e){return!!e&&typeof e=="object"&&e._$webjs==="unsafe-html"}function Su(e){return{_$webjs:"live",value:e}}function X(e){return!!e&&typeof e=="object"&&e._$webjs==="live"}function _u(e,t){return{_$webjs:"keyed",key:e,value:t}}function Ot(e){return!!e&&typeof e=="object"&&e._$webjs==="keyed"}function Au(e,t){return{_$webjs:"guard",deps:e,fn:t}}function jt(e){return!!e&&typeof e=="object"&&e._$webjs==="guard"}function xu(e){return{_$webjs:"template-content",template:e}}function vr(e){return!!e&&typeof e=="object"&&e._$webjs==="template-content"}function vu(e){return{_$webjs:"ref",target:e}}function Pt(e){return!!e&&typeof e=="object"&&e._$webjs==="ref"}function Eu(){return{value:void 0}}function Tu(e){return{_$webjs:"cache",value:e}}function It(e){return!!e&&typeof e=="object"&&e._$webjs==="cache"}function ku(...e){return{_$webjs:"until",args:e}}function qt(e){return!!e&&typeof e=="object"&&e._$webjs==="until"}function Nu(e,t){return{_$webjs:"async-append",iterable:e,mapper:t}}function Er(e){return!!e&&typeof e=="object"&&e._$webjs==="async-append"}function Cu(e,t){return{_$webjs:"async-replace",iterable:e,mapper:t}}function Tr(e){return!!e&&typeof e=="object"&&e._$webjs==="async-replace"}function Ru(e){return{_$webjs:"watch",signal:e}}function Dt(e){return!!e&&typeof e=="object"&&e._$webjs==="watch"}et();ct();et();xe();ct();var Kn=new WeakMap,zn=new WeakMap,Pr=Symbol.for("webjs.instance");function $t(e){let{strings:t}=e,r=Kn.get(t);if(r)return r;let n=[],o="",s="text",i="",a=0,c="",l=0,u=null,f="",p="";for(let y=0;y<t.length;y++){let g=t[y];for(let w=0;w<g.length;w++){let m=g[w];switch(s){case"text":o+=m,m==="<"&&(s="tag-open");break;case"tag-open":o+=m,m==="!"?s="bang-1":m==="/"?(s="tag-name",f=""):/[a-zA-Z]/.test(m)?(s="tag-name",f=m.toLowerCase()):s="text";break;case"bang-1":o+=m,s=m==="-"?"bang-dash":"tag-name";break;case"bang-dash":o+=m,m==="-"?(s="comment",l=0):s="tag-name";break;case"comment":o+=m,m==="-"?l+=1:(m===">"&&l>=2&&(s="text"),l=0);break;case"tag-name":o+=m,m===">"?(s=f==="script"||f==="style"?"rawtext":"text",s==="rawtext"&&(p="")):/\s/.test(m)?s="in-tag":f+=m.toLowerCase();break;case"in-tag":o+=m,m===">"?(s=f==="script"||f==="style"?"rawtext":"text",s==="rawtext"&&(p="")):!/\s/.test(m)&&m!=="/"&&(s="attr-name",i=m,a=o.length-1);break;case"rawtext":o+=m,p=(p+m.toLowerCase()).slice(-9),(p.endsWith("<\/script>")||p.endsWith("</style>"))&&(s="text",p="",f="");break;case"attr-name":m==="="?(s="after-eq",o+=m):/\s/.test(m)?(s="in-tag",i="",o+=m):m===">"?(s="text",i="",o+=m):(i+=m,o+=m);break;case"after-eq":m==='"'||m==="'"?(s="attr-quoted",c=m,o+=m):/\s/.test(m)?(s="in-tag",i="",o+=m):m===">"?(s="text",i="",o+=m):(s="attr-unquoted",o+=m);break;case"attr-unquoted":/\s/.test(m)?(s="in-tag",i="",o+=m):(m===">"&&(s="text",i=""),o+=m);break;case"attr-quoted":o+=m,m===c&&(s="in-tag",i="");break;case"skip-attr":if(m===c){if(u){let _=u.firstPartIdx,E=[];for(let d=_;d<n.length;d++)(n[d].kind==="noop"||n[d].kind==="attr-mixed")&&E.push(d);let C=[],J=t[E[0]],V=J.lastIndexOf(c);C.push(V>=0?J.slice(V+1):J);for(let d=1;d<E.length;d++)C.push(t[E[d]]);let F=t[E[E.length-1]+1],$=F.indexOf(c);C.push($>=0?F.slice(0,$):F),n[_]={kind:"attr-mixed",path:[],name:u.name,statics:C,group:E};for(let d=1;d<E.length;d++)n[E[d]]={kind:"noop",path:[],mixedAnchor:_};u=null}s="in-tag",i=""}break}}if(y<t.length-1){let w=n.length;if(s==="comment"){l=0,n.push({kind:"noop",path:[]});continue}if(s==="rawtext"){p="",n.push({kind:"noop",path:[]});continue}if(s==="text")o+=`<!--${R}${w}-->`,n.push({kind:"child",path:[]});else if(s==="in-tag"){let m=`data-${R}${w}`;o+=`${m}=""`,n.push({kind:"element",path:[]})}else if(s==="after-eq"){let m=i[0],_=i.slice(1);if(mr(m)){o=o.slice(0,a);let E=hr[m],C=`data-${R}${w}`;o+=`${C}=""`,n.push({kind:E,path:[],name:_})}else{o=o.slice(0,a);let E=`data-${R}${w}`;o+=`${E}=""`,n.push({kind:"attr",path:[],name:i})}s="in-tag",i=""}else if(s==="attr-quoted"||s==="attr-unquoted"){o=o.slice(0,a);let m=`data-${R}${w}`;o+=`${m}=""`,u={name:i,firstPartIdx:w},n.push({kind:"noop",path:[]}),s="skip-attr"}else s==="skip-attr"&&n.push({kind:"noop",path:[]})}}let b=document.createElement("template");b.innerHTML=o,qu(b.content,n);let h=Du(b.content,n);return r={templateEl:b,parts:n,formActions:h},Kn.set(t,r),r}function qu(e,t){let r=e.querySelectorAll("slot");for(let n of r){n.setAttribute(x,"");let o=t.length;n.setAttribute(`data-${R}${o}`,""),t.push({kind:"slot",path:[]})}}function Du(e,t){let r=[],n=[];function o(s){for(let i=0;i<s.childNodes.length;i++){let a=s.childNodes[i];if(r.push(i),a.nodeType===8){let c=a.data;if(c.startsWith(R)){let l=Number(c.slice(R.length));t[l]&&t[l].kind==="child"&&(t[l].path=r.slice())}}else if(a.nodeType===1){let c=a,l=[],u=[];for(let f of c.attributes)if(f.name.startsWith(`data-${R}`)){let p=Number(f.name.slice(`data-${R}`.length));t[p]&&t[p].kind!=="child"&&(t[p].path=r.slice(),u.push({idx:p,kind:t[p].kind,name:t[p].name||""})),l.push(f.name)}if(c.localName==="form"||c.localName==="button"||c.localName==="input"){let f=Mu(c,u,t);f&&n.push(f)}for(let f of l)c.removeAttribute(f);o(a)}r.pop()}}return o(e),n.length?n:null}function Mu(e,t,r){let n=e.localName==="form",o=n?"action":"formaction",s=n?"method":"formmethod",i=n?"enctype":"formenctype",a=t.filter(g=>g.kind==="attr"&&g.name.toLowerCase()===o);if(!a.length)return null;let c=[],l=[],u=[],f=n?[]:t.filter(g=>g.name.toLowerCase()==="name"&&(g.kind==="attr"||g.kind==="attr-mixed"||g.kind==="bool")).map(g=>({i:g.idx,kind:g.kind})),p=!n&&e.hasAttribute("name"),b=!n&&e.hasAttribute("form"),h=!n&&e.hasAttribute("value"),y=n?[]:t.filter(g=>g.name.toLowerCase()==="value"&&(g.kind==="attr"||g.kind==="attr-mixed"||g.kind==="bool")).map(g=>({i:g.idx,kind:g.kind}));for(let g of t){let w=String(g.name).toLowerCase();if(g.kind==="prop"){n?(w==="method"||w==="enctype"||w==="encoding")&&u.push(g.name):_r(w)&&u.push(g.name);continue}if(w!==s&&w!==i||g.kind!=="attr"&&g.kind!=="attr-mixed"&&g.kind!=="bool")continue;let m=r[g.idx],_={i:g.idx,kind:g.kind};g.kind==="attr-mixed"&&(_.statics=m.statics||[],_.group=m.group||[]),(w===s?c:l).push(_)}return{isForm:n,tag:e.localName,actionIdxs:a.map(g=>g.idx),duplicateAction:a.length>1,staticAction:e.getAttribute(o)!=null,authoredName:p,authoredValue:h,authoredForm:b,propAttrs:u,nameParts:f,valueParts:y,staticMethod:e.getAttribute(s),staticEnctype:e.getAttribute(i),methodParts:c,enctypeParts:l}}xe();var ie=null,Me=!1,Ht=0,Bt=null,Is=0,ka=(e,t)=>Object.is(e,t),Yn=()=>{},Na=()=>!1;function Ca(e,t){e.liveConsumers||(e.liveConsumers=new Map);let r=e.liveConsumers.size===0;if(e.liveConsumers.set(t,(e.liveConsumers.get(t)||0)+1),r){if(e.producers&&e.producers.length>0)for(let n of e.producers)Ca(n,e);if(e.watched)try{e.watched.call(e.wrapper)}catch(n){console.error(n)}}}function Ir(e,t){if(!e.liveConsumers)return;let r=e.liveConsumers.get(t);if(r!==void 0){if(r>1){e.liveConsumers.set(t,r-1);return}if(e.liveConsumers.delete(t),e.liveConsumers.size===0){if(e.producers&&e.producers.length>0)for(let n of e.producers)Ir(n,e);if(e.unwatched)try{e.unwatched.call(e.wrapper)}catch(n){console.error(n)}}}}function Bs(e){if(Me)throw new Error("Signal read during notification phase");if(ie===null)return;let t=ie,r=t.nextProducerIndex++;r<t.producers.length&&t.producers[r]!==e&&Ms(t)&&Ir(t.producers[r],t),t.producers[r]!==e&&(t.producers[r]=e,Ms(t)&&Ca(e,t)),t.producerLastReadVersions[r]=e.version}function Ms(e){return e.consumerIsAlwaysLive||e.liveConsumers&&e.liveConsumers.size>0}function Ra(e){if(!e.liveConsumers||e.liveConsumers.size===0)return;let t=Me;Me=!0;try{for(let r of e.liveConsumers.keys())r.dirty||Fu(r)}finally{Me=t}}function Fu(e){e.dirty=!0,Ra(e),e.consumerMarkedDirty.call(e.wrapper||e)}function Jn(e){if(!(!e.dirty&&e.lastCleanEpoch===Ht)){if(!e.producerMustRecompute()&&!$u(e)){e.dirty=!1,e.lastCleanEpoch=Ht;return}e.producerRecomputeValue(),e.dirty=!1,e.lastCleanEpoch=Ht}}function $u(e){for(let t=0;t<e.producers.length;t++){let r=e.producers[t],n=e.producerLastReadVersions[t];if(n!==r.version||(Jn(r),n!==r.version))return!0}return!1}function Fs(e){e&&(e.nextProducerIndex=0);let t=ie;return ie=e,t}function $s(e,t){if(ie=t,!!e){if(Ms(e))for(let r=e.nextProducerIndex;r<e.producers.length;r++)Ir(e.producers[r],e);for(;e.producers.length>e.nextProducerIndex;)e.producers.pop(),e.producerLastReadVersions.pop()}}var Xn=class{constructor(t,r){this.__value=t,this.version=0,this.lastCleanEpoch=Ht,this.dirty=!1,this.producers=[],this.producerLastReadVersions=[],this.liveConsumers=void 0,this.consumerAllowSignalWrites=!0,this.consumerIsAlwaysLive=!1,this.producerMustRecompute=Na,this.producerRecomputeValue=Yn,this.consumerMarkedDirty=Yn,this.wrapper=this,this.__isSignal=!0,this.__equal=r?.equals||ka,this.watched=r?.[Hs],this.unwatched=r?.[Us]}get(){return Bs(this),this.__value}peek(){return this.__value}set(t){if(Me)throw new Error("Signal write during notification phase");this.__equal.call(this,this.__value,t)||(this.__value=t,this.version++,Ht++,Bt!==null?La(this):Ra(this))}};function La(e){let t=Me;Me=!0;try{if(!e.liveConsumers)return;for(let r of e.liveConsumers.keys())r.dirty||(r.dirty=!0,r.__isWatcher?Bt.add(r):La(r))}finally{Me=t}}var qs=Symbol("unset"),Ds=Symbol("computing"),Gn=Symbol("errored"),qr=class{constructor(t,r){this.__fn=t,this.__value=qs,this.__error=null,this.version=0,this.lastCleanEpoch=-1,this.dirty=!0,this.producers=[],this.producerLastReadVersions=[],this.nextProducerIndex=0,this.liveConsumers=void 0,this.consumerAllowSignalWrites=!1,this.consumerIsAlwaysLive=!1,this.wrapper=this,this.__isSignal=!0,this.__isComputed=!0,this.__equal=r?.equals||ka,this.watched=r?.[Hs],this.unwatched=r?.[Us];let n=this;this.producerMustRecompute=function(){return n.__value===qs||n.__value===Ds},this.producerRecomputeValue=function(){if(n.__value===Ds)throw new Error("Detected cycle in computations.");let o=n.__value;n.__value=Ds;let s=Fs(n),i,a=!1;try{i=n.__fn.call(n.wrapper)}catch(l){i=Gn,n.__error=l,a=!0}finally{$s(n,s)}if(!a&&(o!==qs&&o!==Gn)&&n.__equal.call(n.wrapper,o,i)){n.__value=o;return}n.__value=i,n.version++},this.consumerMarkedDirty=Yn}get(){if(Jn(this),Bs(this),this.__value===Gn)throw this.__error;return this.__value}peek(){if(Jn(this),this.__value===Gn)throw this.__error;return this.__value}},Zn=class{constructor(t){this.__notify=t,this.version=0,this.lastCleanEpoch=Ht,this.dirty=!1,this.producers=[],this.producerLastReadVersions=[],this.nextProducerIndex=0,this.liveConsumers=void 0,this.consumerAllowSignalWrites=!1,this.consumerIsAlwaysLive=!0,this.producerMustRecompute=Na,this.producerRecomputeValue=Yn,this.wrapper=this,this.__isWatcher=!0;let r=this;this.consumerMarkedDirty=function(){r.__fire()}}__fire(){this.__notify&&this.__notify.call(this)}watch(...t){if(t.length===0){this.dirty=!1;return}let r=Fs(this);try{for(let n of t)Bs(n),n.__isComputed&&Jn(n)}finally{$s(this,r)}this.dirty=!1}unwatch(...t){for(let r=this.producers.length-1;r>=0;r--)t.includes(this.producers[r])&&(Ir(this.producers[r],this),this.producers.splice(r,1),this.producerLastReadVersions.splice(r,1),this.nextProducerIndex=Math.min(this.nextProducerIndex,this.producers.length))}getPending(){return this.producers.filter(t=>t.__isComputed&&t.dirty)}observe(t){let r=Fs(this),n;try{n=t()}finally{$s(this,r)}return this.dirty=!1,n}dispose(){for(let t of this.producers)Ir(t,this);this.producers=[],this.producerLastReadVersions=[],this.__notify=null}},Hs=Symbol("watched"),Us=Symbol("unwatched");function Bu(e){let t=ie;ie=null;try{return e()}finally{ie=t}}function Hu(e){return e.producers.slice()}function Uu(e){return e.liveConsumers?[...e.liveConsumers.keys()]:[]}function Vu(e){return!!e.liveConsumers&&e.liveConsumers.size>0}function Wu(e){return e.producers.length>0}function Ku(){return ie&&ie.__isComputed?ie:null}function zu(e){Is++,Bt===null&&(Bt=new Set);try{e()}finally{if(Is--,Is===0){let t=Bt;Bt=null;for(let r of t)r.__fire()}}}var Dr={State:Xn,Computed:qr,subtle:{Watcher:Zn,untrack:Bu,introspectSources:Hu,introspectSinks:Uu,hasSinks:Vu,hasSources:Wu,currentComputed:Ku,watched:Hs,unwatched:Us}};function Gu(e,t){return new Xn(e,t)}function Yu(e,t){return new qr(e,t)}function Ju(e){return!!(e&&typeof e=="object"&&e.__isSignal===!0)}function Xu(e){let t=!1,r=!1,n=new qr(e),o=new Zn(()=>{t||r||(t=!0,queueMicrotask(()=>{if(t=!1,!r){try{n.get()}catch(s){console.error(s)}o.watch()}}))});o.watch(n);try{n.get()}catch(s){console.error(s)}return()=>{r||(r=!0,o.dispose())}}ct();et();var Y=null;function Ws(e){Y=e}function ja(e,t){let r=e&&e[A]?e:null;return r?it(r,t):t()}function eo(e){return e?e.nodeType===11&&e.host?e.host:e:null}function Ks(e,t){let r=e.__commitOwner,n=Y;r&&(Y=r);try{t()}finally{Y=n}}function Fr(e,t){if(e.kind==="noop")return{kind:"noop",mixedAnchor:e.mixedAnchor};let r=t;for(let o of e.path)r=r.childNodes[o];if(e.kind==="child")return{kind:"child",marker:r};let n=r;if(e.kind==="event"){let o={kind:"event",el:n,name:e.name||"",handler:null,dispatcher(s){o.handler?.(s)}};return n.addEventListener(o.name,o.dispatcher),o}if(e.kind==="attr")return{kind:"attr",el:n,name:e.name||""};if(e.kind==="attr-mixed")return{kind:"attr-mixed",el:n,name:e.name||"",statics:e.statics||[],group:e.group||[]};if(e.kind==="prop")return{kind:"prop",el:n,name:e.name||""};if(e.kind==="bool")return{kind:"bool",el:n,name:e.name||""};if(e.kind==="element")return{kind:"element",el:n};if(e.kind==="slot")return{kind:"slot",slotEl:n,applied:!1};throw new Error(`unknown part kind ${e.kind}`)}function ae(e,t,r,n,o){if(X(t)){let s=t.value;if(e.kind==="prop"&&e.el[e.name]===s||e.kind==="attr"&&e.el.getAttribute(e.name)===String(s)||e.kind==="bool"&&e.el.hasAttribute(e.name)===!!s)return;t=s}switch(e.kind){case"child":ef(e,t,o);break;case"attr":{let s=Qe(e.name,t);s===null?e.el.removeAttribute(e.name):Ct(t,e.name,e.el.localName)||(Ae(t,e.name,e.el.localName),e.el.setAttribute(e.name,s));break}case"prop":qn(t,e.name,e.el.localName),e.el[e.name]=t;break;case"bool":Ae(t,e.name,e.el.localName),t?e.el.setAttribute(e.name,""):e.el.removeAttribute(e.name);break;case"event":e.handler=typeof t=="function"?t:null;break;case"element":Qu(e,t);break;case"attr-mixed":{let s=e,i=s.statics[0];for(let a=0;a<s.group.length;a++){let c=n?n[s.group[a]]:t;X(c)&&(c=c.value),Ae(c,e.name,e.el.localName),i+=String(c??""),i+=s.statics[a+1]||""}e.el.setAttribute(e.name,i);break}case"slot":{if(e.applied)break;let s=e.slotEl,i=()=>{let c=Ut(s);if(!c){e.applied=!0;return}if(!c.contains(s)){c.isConnected?queueMicrotask(i):e.applied=!0;return}if(e.applied=!0,Zu(s))return;let l=document.createDocumentFragment();for(;s.firstChild;)l.appendChild(s.firstChild);s[je]=l,queueMicrotask(()=>Z(c))},a=Ut(s);a&&a.contains(s)?i():queueMicrotask(i);break}case"noop":break}}function Ut(e){let t=e[rt];if(t&&t.isConnected)return t;let r=e.parentElement;for(;r;){if(r[A])return r;r=r.parentElement}return null}function Zu(e){let t=e;for(let r=0;r<128;r++){let n=t.parentNode;if(!n||n===t)return!1;if(n.nodeType===11&&n.host)return!0;t=n}return!1}function Qu(e,t){let r=e,n=Pt(t)?t.target:void 0,o=r.__refTarget,s=n!==o;if(s&&o)if(typeof o=="function")try{o(void 0)}catch{}else typeof o=="object"&&(o.value=void 0);if(s||r.__refElement!==e.el){if(r.__refTarget=n,n)if(typeof n=="function"){if(!s&&r.__refElement!==void 0)try{n(void 0)}catch{}try{n(e.el)}catch{}}else typeof n=="object"&&(n.value=e.el);r.__refElement=e.el,e.lastTarget=n}}function ef(e,t,r){return uf(e,t),me(e,t,r)}function me(e,t,r){return ja(e.marker&&e.marker.parentNode,()=>Pa(e,t,r))}function Pa(e,t,r){let n=e.marker;if(X(t))return Pa(e,t.value,r);if(xr(t)){Fe(e);let s=String(t.value??""),i=document.createElement("template");i.innerHTML=s;let a=[...i.content.childNodes],c=document.createDocumentFragment();for(let l of a)c.appendChild(l);n.parentNode?.insertBefore(c,n),e.child=a;return}if(Ot(t)){let s=t,i=e.__keyedKey;i!==void 0&&!Object.is(i,s.key)&&Fe(e),e.__keyedKey=s.key,me(e,s.value,r);return}if(jt(t)){let s=t,i=e.__guardDeps,a=s.deps;if(i!==void 0&&(Array.isArray(i)&&Array.isArray(a)?lf(i,a):Object.is(i,a)))return;let c=Array.isArray(a)?a.slice():a;me(e,s.fn(),r),e.__guardDeps=c;return}if(vr(t)){Fe(e);let s=t.template;if(s&&s.content){let i=s.content.cloneNode(!0),a=[...i.childNodes];n.parentNode?.insertBefore(i,n),e.child=a}return}if(Pt(t))return;if(It(t))return ff(e,t.value,r);if(qt(t))return df(e,t.args,r);if(Dt(t))return pf(e,t.signal,r);if(Er(t))return hf(e,t,r);if(Tr(t))return mf(e,t,r);if(Lt(t)){if(e.child&&e.child.kind==="repeat"){nf(e,t,r);return}Fe(e);let s={kind:"repeat",map:new Map};e.child=s,rf(n,s,t,r);return}if(Array.isArray(t)){if(e.child&&e.child.kind==="array"){af(e,t,r);return}Fe(e);let s={kind:"array",items:[]};e.child=s,sf(n,s,t,r);return}if(e.child){let s=e.child;if(s.kind==="repeat")Ia(s),e.child=void 0;else if(s.kind==="array")Da(s),e.child=void 0;else if(s.kind==="async-stream")Ba(s),e.child=void 0;else if("strings"in e.child){let i=e.child;if(I(t)&&i.strings===t.strings){lt(i,t.values,r);return}Vt(i.startNode,i.endNode),e.child=void 0}else{for(let i of e.child)i.parentNode&&i.parentNode.removeChild(i);e.child=void 0}}if(t==null||t===!1||t===!0)return;if(I(t)){let s=t,{templateEl:i,parts:a,formActions:c}=$t(s),l=i.content.cloneNode(!0),u=document.createComment(`${R}s`),f=document.createComment(`${R}e`),p=a.map(y=>Fr(y,l)),b=[];for(let y=0;y<s.values.length;y++)ae(p[y],s.values[y],void 0,s.values,r),b.push(s.values[y]);r&&r(c,p,s.values);let h=[u,...l.childNodes,f];n.parentNode?.insertBefore(tf(h),n);for(let y of p)y.kind==="slot"&&ae(y,void 0,void 0,[],r);e.child={strings:s.strings,bound:p,lastValues:b,startNode:u,endNode:f};return}let o=document.createTextNode(String(t));n.parentNode?.insertBefore(o,n),e.child=[o]}function lt(e,t,r){for(let n=0;n<t.length;n++){let o=t[n];if(Object.is(o,e.lastValues[n]))continue;let s=e.bound[n],i=s.mixedAnchor;try{s.kind==="noop"&&i!=null?ae(e.bound[i],t[i],e.lastValues[i],t,r):ae(s,o,e.lastValues[n],t,r)}catch(a){throw e.lastValues[n]=Oa,s.kind==="noop"&&i!=null&&(e.lastValues[i]=Oa),a}e.lastValues[n]=o}r&&r(Kn.get(e.strings)?.formActions??null,e.bound,t)}var Oa=Symbol("webjs.commitFailed");function Vt(e,t){let r=e.parentNode;if(!r)return;let n=e;for(;n&&n!==t;){let o=n.nextSibling;n.parentNode?.removeChild(n),n=o}t.parentNode===r&&r.removeChild(t)}function tf(e){let t=document.createDocumentFragment();for(let r of e)t.appendChild(r);return t}function zs(e,t){let{templateEl:r,parts:n,formActions:o}=$t(e),s=r.content.cloneNode(!0),i=document.createComment(`${R}s`),a=document.createComment(`${R}e`),c=n.map(f=>Fr(f,s)),l=[];for(let f=0;f<e.values.length;f++)ae(c[f],e.values[f],void 0,e.values,t),l.push(e.values[f]);t&&t(o,c,e.values);for(let f of c)f.kind==="slot"&&ae(f,void 0,void 0,[],t);let u=document.createDocumentFragment();for(u.appendChild(i);s.firstChild;)u.appendChild(s.firstChild);return u.appendChild(a),{inst:{strings:e.strings,bound:c,lastValues:l,startNode:i,endNode:a},frag:u}}function Mr(e){for(let t of e.bound)if(t.kind==="event"&&t.el.removeEventListener(t.name,t.dispatcher),t.kind==="element"){let r=t.lastTarget;if(r){if(typeof r=="function")try{r(void 0)}catch{}else if(typeof r=="object")try{r.value=void 0}catch{}t.lastTarget=void 0,t.__lastEl=void 0}}}function rf(e,t,r,n){let{items:o,keyFn:s,templateFn:i}=r,a=e.parentNode;if(!a)return;let c=document.createDocumentFragment();for(let l=0;l<o.length;l++){let u=s(o[l],l),f=i(o[l],l);if(!I(f))continue;let{inst:p,frag:b}=zs(f,n);t.map.set(u,p),c.appendChild(b)}a.insertBefore(c,e)}function nf(e,t,r){let n=e.marker,o=n.parentNode;if(!o)return;let s=e.child,{items:i,keyFn:a,templateFn:c}=t,l=new Map;try{for(let u=0;u<i.length;u++){let f=a(i[u],u),p=c(i[u],u);if(!I(p))continue;let b=s.map.get(f);if(b&&b.strings===p.strings)lt(b,p.values,r),Vs(b.startNode,b.endNode,o,n),l.set(f,b),s.map.delete(f);else{b&&(s.map.delete(f),Mr(b),Vt(b.startNode,b.endNode));let{inst:h,frag:y}=zs(p,r);o.insertBefore(y,n),l.set(f,h)}}for(let[u,f]of[...s.map]){s.map.delete(u);try{Mr(f)}finally{Vt(f.startNode,f.endNode)}}s.map=l}catch(u){for(let[f,p]of l)s.map.set(f,p);throw u}}function Ia(e){for(let[t,r]of[...e.map]){e.map.delete(t);try{Mr(r)}finally{Vt(r.startNode,r.endNode)}}e.map.clear()}function of(e){return e.type==="tpl"?e.inst.startNode:e.type==="text"?e.node:null}function Qn(e){e.type==="tpl"?(Mr(e.inst),Vt(e.inst.startNode,e.inst.endNode)):e.type==="text"&&e.node.parentNode?.removeChild(e.node)}function qa(e,t){if(X(e)&&(e=e.value),I(e)){let{inst:r,frag:n}=zs(e,t);return{item:{type:"tpl",inst:r},frag:n}}if(e!=null&&e!==!1&&e!==!0){let r=document.createTextNode(String(e));return{item:{type:"text",node:r},frag:r}}return{item:{type:"empty"},frag:null}}function sf(e,t,r,n){let o=e.parentNode;if(!o)return;let s=document.createDocumentFragment(),i=[];for(let a of r){let{item:c,frag:l}=qa(a,n);l&&s.appendChild(l),i.push(c)}o.insertBefore(s,e),t.items=i}function af(e,t,r){let n=e.marker,o=n.parentNode;if(!o)return;let s=e.child,i=s.items,a=[],c=0;try{for(let l=0;l<t.length;l++){let u=t[l],f=X(u)?u.value:u,p=i[l];if(I(f)){let y=f;if(p&&p.type==="tpl"&&p.inst.strings===y.strings){lt(p.inst,y.values,r),a.push(p),c=l+1;continue}}else if(f!=null&&f!==!1&&f!==!0){if(p&&p.type==="text"){let y=String(f);p.node.data!==y&&(p.node.data=y),a.push(p),c=l+1;continue}}else{p&&Qn(p),a.push({type:"empty"}),c=l+1;continue}let{item:b,frag:h}=qa(f,r);h&&o.insertBefore(h,cf(i,l,n)),a.push(b),p&&Qn(p),c=l+1}for(let l=t.length;l<i.length;l++)Qn(i[l]),c=l+1;s.items=a}catch(l){throw s.items=a.concat(i.slice(c)),l}}function cf(e,t,r){for(let n=t;n<e.length;n++){let o=of(e[n]);if(o&&o.parentNode)return o}return r}function Da(e){for(let t of e.items)Qn(t);e.items=[]}function Vs(e,t,r,n){if(t.nextSibling===n&&e.parentNode===r)return;let o=document.createDocumentFragment(),s=e;for(;s;){let i=s.nextSibling;if(o.appendChild(s),s===t)break;s=i}r.insertBefore(o,n)}function lf(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function Fe(e){let t=e;if(t.__untilState&&(t.__untilState.aborted=!0,t.__untilState=void 0),t.__watchSub&&Ma(t),!e.child)return;let r=e.child;if(r.kind==="repeat")Ia(r);else if(r.kind==="array")Da(r);else if(r.kind==="async-stream")Ba(r);else if("strings"in r){let n=e.child;Mr(n),Vt(n.startNode,n.endNode)}else for(let n of e.child)n.parentNode&&n.parentNode.removeChild(n);e.child=void 0}function uf(e,t){let r=e;r.__untilState&&!qt(t)&&(r.__untilState.aborted=!0,r.__untilState=void 0),r.__guardDeps!==void 0&&!jt(t)&&(r.__guardDeps=void 0),r.__cacheMap&&!It(t)&&(r.__cacheMap=void 0),r.__keyedKey!==void 0&&!Ot(t)&&(r.__keyedKey=void 0),r.__watchSub&&!Dt(t)&&Ma(r)}function ff(e,t,r){let n=e.marker,o=e,s=o.__cacheMap;s||(s=new Map,o.__cacheMap=s);let i=e.child;if(i&&"strings"in i){let c=i;if(I(t)&&c.strings===t.strings){lt(c,t.values,r);return}let l=document.createDocumentFragment();Vs(c.startNode,c.endNode,l,null),s.set(c.strings,{inst:c,holder:l}),e.child=void 0}if(I(t)){let c=t,l=s.get(c.strings);if(l){s.delete(c.strings),e.child&&Fe(e),Vs(l.inst.startNode,l.inst.endNode,n.parentNode,n),lt(l.inst,c.values,r),e.child=l.inst;let u=new Set;for(let f=l.inst.startNode.nextSibling;f&&f!==l.inst.endNode;f=f.nextSibling){if(f.nodeType!==1)continue;let p=f;if(p.matches("slot[data-webjs-light]")){let b=Ut(p);b&&u.add(b)}for(let b of p.querySelectorAll("slot[data-webjs-light]")){let h=Ut(b);h&&u.add(h)}}for(let f of u)Z(f);return}}me(e,t,r)}function df(e,t,r){let n=e;Y&&(n.__commitOwner=eo(Y));let o=n.__untilState,s=n.__untilArgs,i=(b,h)=>!!(Object.is(b,h)||I(b)&&I(h)&&b.strings===h.strings),c=s&&s.length===t.length&&s.every((b,h)=>i(b,t[h]))&&o?o.highestResolved:1/0;o&&(o.aborted=!0),n.__untilArgs=t.slice();let l={aborted:!1,highestResolved:c};n.__untilState=l;let u=-1,f;for(let b=0;b<t.length;b++){let h=t[b];if(!h||typeof h.then!="function"){u=b,f=h;break}}u!==-1&&u<=l.highestResolved?(me(e,f,r),l.highestResolved=u):u===-1&&!n.__untilEverRendered&&me(e,"",r),n.__untilEverRendered=!0;let p=Math.min(u===-1?t.length:u,l.highestResolved);for(let b=0;b<p;b++){let h=t[b];!h||typeof h.then!="function"||Promise.resolve(h).then(y=>{if(!l.aborted&&!(b>=l.highestResolved)){try{Ks(e,()=>me(e,y,r))}catch(g){Gs(e,g);return}l.highestResolved=b}},()=>{})}}function Gs(e,t){let r;try{r=t instanceof Error?t:new Error(String(t))}catch{r=new Error("render error (unstringifiable thrown value)")}let n=e.__commitOwner;if(n&&typeof n._handleRenderError=="function"){n._handleRenderError(r);return}throw r}function pf(e,t,r){let n=e;if(Y&&(n.__commitOwner=eo(Y)),n.__watchSig===t&&n.__watchSub){let i;n.__watchSub.observe(()=>{i=t.get()}),me(e,i,r);return}n.__watchSub&&(n.__watchSub.dispose(),n.__watchSub=void 0),n.__watchSig=t;let o=new Dr.subtle.Watcher(()=>{queueMicrotask(()=>{if(n.__watchSub!==o)return;let i;try{o.observe(()=>{i=t.get()}),Ks(e,()=>me(e,i,r))}catch(a){Gs(e,a)}})});n.__watchSub=o;let s;o.observe(()=>{s=t.get()}),me(e,s,r)}function Ma(e){e.__watchSub&&(e.__watchSub.dispose(),e.__watchSub=void 0,e.__watchSig=void 0)}function hf(e,t,r){let n=e;Y&&(n.__commitOwner=eo(Y));let o=e.child;if(o&&o.kind==="async-stream"&&o.mode==="append"&&o.iterable===t.iterable)return;Fe(e);let s=t.iterable[Symbol.asyncIterator](),i={kind:"async-stream",mode:"append",aborted:!1,iterable:t.iterable,iterator:s,nodes:[]};e.child=i,Fa(i,e,t,r)}function mf(e,t,r){let n=e;Y&&(n.__commitOwner=eo(Y));let o=e.child;if(o&&o.kind==="async-stream"&&o.mode==="replace"&&o.iterable===t.iterable)return;Fe(e);let s=t.iterable[Symbol.asyncIterator](),i={kind:"async-stream",mode:"replace",aborted:!1,iterable:t.iterable,iterator:s,nodes:[]};e.child=i,Fa(i,e,t,r)}async function Fa(e,t,r,n){let o=t.marker,s=0;for(;!e.aborted;){let i,a;try{if(i=await e.iterator.next(),e.aborted||i.done)break;a=r.mapper?r.mapper(i.value,s):i.value}catch(c){typeof console<"u"&&console.error("[webjs] asyncStream error:",c);return}try{Ks(t,()=>{let c=$a(a,n);ja(o.parentNode,()=>{if(e.mode==="replace"){for(let u of e.nodes)u.parentNode&&u.parentNode.removeChild(u);e.nodes=[]}let l=document.createDocumentFragment();for(let u of c)l.appendChild(u);o.parentNode?.insertBefore(l,o),e.nodes.push(...c)})})}catch(c){e.aborted=!0;try{e.iterator.return?.()?.catch?.(()=>{})}catch{}Gs(t,c);return}s++}}function $a(e,t){if(X(e)&&(e=e.value),e==null||e===!1||e===!0)return[];if(I(e)){let r=e,{templateEl:n,parts:o,formActions:s}=$t(r),i=n.content.cloneNode(!0),a=o.map(c=>Fr(c,i));for(let c=0;c<r.values.length;c++)ae(a[c],r.values[c],void 0,r.values,t);t&&t(s,a,r.values);for(let c of a)c.kind==="slot"&&ae(c,void 0,void 0,[],t);return[...i.childNodes]}if(Array.isArray(e)){let r=[];for(let n of e)r.push(...$a(n,t));return r}return[document.createTextNode(String(e))]}function Ba(e){e.aborted=!0;for(let t of e.nodes)t.parentNode&&t.parentNode.removeChild(t);e.nodes=[];try{e.iterator.return?.()?.catch?.(()=>{})}catch{}}function ft(e,t){let r=t,n=r[j];r[j]=!0;let o=Y;Ws(t);try{let s=r[Pr];if(I(e)){let i=e;if(s&&s.strings===i.strings){lt(s,i.values,ro);return}s&&Ha(s,t);let a=t.firstChild;a&&a.nodeType===8&&a.data==="webjs-hydrate"&&a.remove(),r[Pr]=null;let c=yf(i,t);r[Pr]=c;return}if(s&&Ha(s,t),r[Pr]=null,t.replaceChildren(),e==null||e===!1||e===!0)return;if(Array.isArray(e)){for(let i of e){let a=document.createTextNode(String(i??""));t.appendChild(a)}return}t.appendChild(document.createTextNode(String(e)))}finally{Ws(o),r[j]=n,n||Bn(r)}}function ro(e,t,r){if(e)for(let n of[!0,!1])for(let o of e){if(o.isForm!==n)continue;let s=o.actionIdxs[0],i=o.isForm?"action":"formaction";for(let l of o.actionIdxs)if(Ct(ut(r[l]),i,o.tag)){s=l;break}let a=t[s];if(!a||!a.el)continue;let c=ut(r[s]);if(o.isForm)ua(a.el,c,to(o.methodParts,o.staticMethod,r),to(o.enctypeParts,o.staticEnctype,r),o);else{let l=u=>u.some(f=>f.kind==="bool"?!!ut(r[f.i]):f.kind==="attr"?Qe("name",ut(r[f.i]))!==null:!0);bf(a.el,c,o,l(o.nameParts),l(o.valueParts),to(o.methodParts,o.staticMethod,r),to(o.enctypeParts,o.staticEnctype,r))}}}function gf(e){(zn.has(e)||e.getAttribute("name")===O)&&(e.getAttribute("name")===O&&e.removeAttribute("name"),e.removeAttribute("value"),zn.delete(e))}function bf(e,t,r,n,o,s,i){let a=typeof t=="function"?In(t):null;if(!a){typeof t=="function"&&Rt(null,e.localName),gf(e),fa(e,s,i,r.propAttrs);return}Sr(r.duplicateAction,e.localName),ns(r.propAttrs,e.localName),r.staticAction&&rs(e.localName),(r.authoredValue||o)&&yr(e.localName),(r.authoredName||n)&&br(e.getAttribute("name")||O,e.localName,!1),(r.authoredForm||e.hasAttribute("form"))&&wr(e.localName),ts(e.localName,e.getAttribute("type"));let c=os(e.localName,s,i);e.removeAttribute("formaction"),e.setAttribute("name",O),e.setAttribute("value",a),gr(e,"formmethod",s,c.formMethod),gr(e,"formenctype",i,c.formEnctype),zn.set(e,a)}function to(e,t,r){for(let n of e){if(n.kind==="bool")return ut(r[n.i])?"":q;if(n.kind==="attr"){let a=Qe("method",ut(r[n.i]));return a===null?q:a}let o=n.statics||[],s=n.group||[],i=o[0]||"";for(let a=0;a<s.length;a++)i+=String(ut(r[s[a]])??""),i+=o[a+1]||"";return i}return t??q}function ut(e){return X(e)?e.value:e}function yf(e,t){let{templateEl:r,parts:n,formActions:o}=$t(e),s=r.content.cloneNode(!0),i=document.createComment(`${R}s`),a=document.createComment(`${R}e`),c=n.map(f=>Fr(f,s)),l=[];for(let f=0;f<e.values.length;f++)ae(c[f],e.values[f],void 0,e.values,ro),l.push(e.values[f]);ro(o,c,e.values),t.replaceChildren(i,...s.childNodes,a);let u=t.nodeType===1&&t[A]?t:null;for(let f of c)f.kind==="slot"&&(u&&f.slotEl&&(f.slotEl[rt]=u),ae(f,void 0,void 0,[],ro));return{strings:e.strings,bound:c,lastValues:l,startNode:i,endNode:a}}function Ha(e,t){for(let r of e.bound){if(r.kind==="event"&&r.el.removeEventListener(r.name,r.dispatcher),r.kind==="element"){let n=r.lastTarget;if(n){if(typeof n=="function")try{n(void 0)}catch{}else if(typeof n=="object")try{n.value=void 0}catch{}r.lastTarget=void 0,r.__lastEl=void 0}}if(r.kind==="slot"){let n=Ut(r.slotEl);n&&Ps(n,r.slotEl)}}t.replaceChildren()}function no(e,t){if(e.converter&&e.converter.fromAttribute)return e.converter.fromAttribute(t,e.type);if(e.type===Number)return t==null?null:Number(t);if(e.type===Boolean)return t!=null&&t!=="false";if(e.type===Object||e.type===Array){if(t==null)return null;try{return JSON.parse(t)}catch{return null}}return t}function wf(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function oo(e,t){let r;for(let{propName:n,def:o,primary:s,alias:i}of Ka(e)){if(s===t)return{propName:n,def:o};r===void 0&&i===t&&(r={propName:n,def:o})}return r}function Wa(e){let t=new Set,r=Ka(e);for(let{primary:n}of r)t.add(n);for(let{alias:n}of r)n&&t.add(n);return[...t]}function Ka(e){if(e&&typeof e=="function"){let t=Ua.get(e);if(t)return t;let r=Va(e);return Ua.set(e,r),r}return Va(e)}var Ua=new WeakMap;function Va(e){let t=e&&e.properties||{},r=[];for(let[n,o]of Object.entries(t)){let s=typeof o=="object"&&o!==null?o:{type:o};if(s.state)continue;let i=s.attribute||wf(n),a=n.toLowerCase(),c=!s.attribute&&a!==i?a:void 0;r.push({propName:n,def:s,primary:i,alias:c})}return r}var za=null;function so(e){za=e||null}function Ys(){return za||void 0}xe();var Ga=Symbol.for("webjs:registry"),Ya=Symbol.for("webjs:classToTag"),Wt=globalThis,ge=Wt[Ga]||(Wt[Ga]=new Map),Xa=Wt[Ya]||(Wt[Ya]=new WeakMap),Ja=Symbol.for("webjs:registryVersion"),Za=Wt[Ja]||(Wt[Ja]={v:0}),io=typeof window<"u"&&typeof customElements<"u";function Js(e,t){if(!e||typeof e!="string"||!e.includes("-"))throw new Error(`customElements.define: tag "${e}" must contain a hyphen (HTML spec)`);let r=t.lazy===!0,n=ge.get(e);n?(n.cls=t,n.lazy=r):(ge.set(e,{cls:t,moduleUrl:null,lazy:r,tag:e}),Za.v+=1),Xa.set(t,e)}if(io){let e=customElements.define.bind(customElements);customElements.define=function(t,r,n){customElements.get(t)||e(t,r,n),Js(t,r)}}if(!io){let e=globalThis;e.customElements||(e.customElements={define(t,r){Js(t,r)},get(t){return ge.get(t)?.cls},upgrade(){},whenDefined(t){let r=ge.get(t);return Promise.resolve(r?.cls)}})}function Qa(e,t){io?customElements.define(e,t):Js(e,t)}function Sf(e,t){if(io)return;let r=ge.get(e);if(r){r.moduleUrl=t;return}ge.set(e,{cls:null,moduleUrl:t,lazy:!1,tag:e}),Za.v+=1}function ao(e){return ge.get(e)?.cls}function _f(e){return ge.get(e)?.moduleUrl||null}function Af(e){return ge.get(e)?.lazy===!0}function dt(e){return Xa.get(e)}function xf(){return[...ge.keys()]}ht();ct();function qf(){return{states:new Set,shadowRoot:null,form:null,labels:[],role:"",willValidate:!0,validity:{},validationMessage:"",setFormValue(){},setValidity(){},checkValidity(){return!0},reportValidity(){return!0}}}var Ur=class{constructor(){this.__ssrAttrs=new Map,this.__internals=null}get attributes(){return[...this.__ssrAttrs].map(([t,r])=>({name:t,value:r}))}getAttribute(t){let r=this.__ssrAttrs.get(String(t).toLowerCase());return r===void 0?null:r}setAttribute(t,r){this.__ssrAttrs.set(String(t).toLowerCase(),String(r))}removeAttribute(t){this.__ssrAttrs.delete(String(t).toLowerCase())}hasAttribute(t){return this.__ssrAttrs.has(String(t).toLowerCase())}toggleAttribute(t,r){let n=String(t).toLowerCase(),o=this.__ssrAttrs.has(n);return(r===void 0?!o:r)?(this.__ssrAttrs.set(n,""),!0):(this.__ssrAttrs.delete(n),!1)}getAttributeNames(){return[...this.__ssrAttrs.keys()]}closest(t){let r=String(t).trim().toLowerCase();if(!/^[a-z][a-z0-9-]*$/.test(r))return null;if(this.__ssrTag===r)return this;let n=this.__ssrAncestors;if(!Array.isArray(n))return null;for(let o=n.length-1;o>=0;o--)if(n[o]&&n[o].__ssrTag===r)return n[o];return null}get dataset(){if(this.__dataset)return this.__dataset;let t=this,r=n=>"data-"+String(n).replace(/[A-Z]/g,o=>"-"+o.toLowerCase());return this.__dataset=new Proxy({},{get(n,o){if(typeof o!="string")return;let s=t.getAttribute(r(o));return s===null?void 0:s},set(n,o,s){return typeof o=="string"&&t.setAttribute(r(o),s),!0},has(n,o){return typeof o=="string"&&t.hasAttribute(r(o))},deleteProperty(n,o){return typeof o=="string"&&t.removeAttribute(r(o)),!0},ownKeys(){return t.getAttributeNames().filter(n=>n.startsWith("data-")).map(n=>n.slice(5).replace(/-([a-z])/g,(o,s)=>s.toUpperCase()))},getOwnPropertyDescriptor(n,o){if(typeof o=="string"&&t.hasAttribute(r(o)))return{enumerable:!0,configurable:!0,value:t.getAttribute(r(o))}}}),this.__dataset}get className(){return this.getAttribute("class")??""}set className(t){this.setAttribute("class",t)}get hidden(){return this.hasAttribute("hidden")}set hidden(t){this.toggleAttribute("hidden",!!t)}get id(){return this.getAttribute("id")??""}set id(t){this.setAttribute("id",t)}get title(){return this.getAttribute("title")??""}set title(t){this.setAttribute("title",t)}get slot(){return this.getAttribute("slot")??""}set slot(t){this.setAttribute("slot",t)}get role(){return this.getAttribute("role")}set role(t){t==null?this.removeAttribute("role"):this.setAttribute("role",t)}get tabIndex(){let t=this.getAttribute("tabindex");return t===null?-1:Number.parseInt(t,10)||0}set tabIndex(t){this.setAttribute("tabindex",String(t))}addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return this.__internals=qf(),this.__internals}},Df=["ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"];for(let e of Df){let t="aria-"+e.slice(4).toLowerCase();Object.defineProperty(Ur.prototype,e,{configurable:!0,get(){return this.getAttribute(t)},set(r){r==null?this.removeAttribute(t):this.setAttribute(t,String(r))}})}function oc(e,t){return e!==t}function sc(e){try{return String(e)}catch{return Object.prototype.toString.call(e)}}function Xs(e,t,r){if(typeof console>"u"||!console.warn)return;let n=dt(e.constructor)||e.tagName?.toLowerCase()||"unknown";console.warn(`[webjs] reflect:true property "${t}" on <${n}> holds a function (or an array carrying one), which has no HTML attribute representation. Removing "${r}" instead of stringifying it (a stringified function writes its source into the page, so a server action's body would ship to the browser). Pass a string, or drop reflect on this property.`)}function ic(e,t,r,n){if(typeof console>"u"||!console.warn)return;let o=dt(e.constructor)||e.tagName?.toLowerCase()||"unknown";console.warn(`[webjs] reflect:true property "${t}" on <${o}> holds a value JSON.stringify cannot serialize (a cycle, a BigInt, or a throwing toJSON), so it has no HTML attribute representation. Removing "${r}" instead. Detail: ${n}`)}function ac(e,t={}){return e&&typeof e=="object"&&!("call"in e)&&(t=e,e=void 0),{...e?{type:e}:{},...t}}var lc=typeof window<"u"&&typeof HTMLElement<"u",Mf=lc?HTMLElement:Ur,uc=Symbol("webjs.factoryProps"),cc=new WeakSet,Ff=Promise.resolve(!0),Kt=new Set,fc=new WeakMap;function $f(e,t){let r=[];for(let[n,o]of Object.entries(t)){let s=typeof o=="object"&&o!==null?o:{type:o};r.push({propName:n,decl:s});let i=s.hasChanged||oc;Object.defineProperty(e.prototype,n,{configurable:!0,enumerable:!0,get(){return this.__propValues[n]},set(a){let c=this.__propValues[n];i(a,c)&&(this.__propValues[n]=a,s.reflect&&!s.state&&this._connected&&this._reflectAttribute(n,a,s),this.requestUpdate(n,c))}})}return fc.set(e,r),r}var zt=class e extends Mf{static shadow=!1;static hydrate=void 0;static properties={};static styles=null;static register(t){Qa(t,this)}static get observedAttributes(){return Wa(this)}constructor(){super(),this._renderRoot=null,this._scheduled=!1,this._connected=!1,this.__controllers=null,this.__firstRendered=!1,this._changedProperties=new Map,this._updateResolve=null,this._updatePromise=Ff,this._isUpdating=!1,this._assertFactoryProperties(),this._initializeProperties()}_assertFactoryProperties(){let t=this.constructor;if(cc.has(t))return;let r=t;for(;r&&r!==e;){if(Object.hasOwn(r,"properties")&&!Object.hasOwn(r,uc)){let n=r.name||"a component";throw new Error(`${n}: \`static properties\` is no longer supported. Declare reactive properties via the factory instead: \`class ${n} extends WebComponent({ count: Number })\`. Use the \`prop()\` helper for options (\`prop(Number, { reflect: true })\`) and set defaults in the constructor after \`super()\`. See https://webjs.dev/docs/components.`)}r=Object.getPrototypeOf(r)}cc.add(t)}_initializeProperties(){let t=this.constructor,r=t.properties;if(!r||typeof r!="object")return;this.__propValues={};let n=fc.get(t);n===void 0&&(n=$f(t,r));for(let o=0;o<n.length;o++){let{propName:s,decl:i}=n[o],a;Object.hasOwn(this,s)&&(a=this[s],delete this[s]),a!==void 0?this.__propValues[s]=a:i.default!==void 0&&(this.__propValues[s]=typeof i.default=="function"?i.default():i.default)}}_reflectAttribute(t,r,n){let o=n.attribute||Bf(t);if(!this.__reflectingAttribute){this.__reflectingAttribute=!0;try{if(n.converter&&n.converter.toAttribute){let s=n.converter.toAttribute(r,n.type);s==null?this.removeAttribute(o):this.setAttribute(o,s)}else if(typeof r=="function")this.removeAttribute(o),Xs(this,t,o);else if(n.type===Boolean)r?this.setAttribute(o,""):this.removeAttribute(o);else if(r==null)this.removeAttribute(o);else if(n.type===Object||n.type===Array){let s,i=!0;try{s=JSON.stringify(r)}catch(a){i=!1,this.removeAttribute(o),ic(this,t,o,a&&a.message)}i&&this.setAttribute(o,s)}else Mn(r)?(this.removeAttribute(o),Xs(this,t,o)):this.setAttribute(o,String(r))}finally{this.__reflectingAttribute=!1}}}connectedCallback(){if(!lc)return;if(this.__webjsPropsHydrated||(this.__webjsPropsHydrated=!0,this._hydratePropAttrs()),this.constructor.hydrate==="visible"&&typeof IntersectionObserver<"u"&&!this.__hydrationActivated){this.__hydrationActivated=!1,this.__hydrationObserver=new IntersectionObserver(r=>{for(let n of r)if(n.isIntersecting){this.__hydrationObserver.unobserve(this),this.__hydrationObserver.disconnect(),this.__hydrationObserver=null,this.__hydrationActivated=!0,this._activate();return}},{rootMargin:"200px"}),this.__hydrationObserver.observe(this);return}this._activate()}_hydratePropAttrs(){let t=[],r=this.attributes;for(let n=0;n<r.length;n++){let o=r[n].name;o.startsWith("data-webjs-prop-")&&t.push(o)}for(let n of t){let o=this.getAttribute(n);if(this.removeAttribute(n),o==null)continue;let s=Hf(n.slice(16));try{this[s]=Ee(o)}catch(i){console.warn(`[webjs] failed to decode ${n} on <${this.tagName.toLowerCase()}>: ${i&&i.message}`)}}}_activate(){this._connected=!0,this._reflectDeclaredAttributes();let t=this.constructor;if(t.shadow!==!0&&!this.hasAttribute("data-wj-host")&&this.setAttribute("data-wj-host",""),t.shadow===!0){let r=!!this.shadowRoot;this.shadowRoot||this.attachShadow({mode:"open"}),this._renderRoot=this.shadowRoot;let n=t.styles,o=Array.isArray(n)?n:pr(n)?[n]:[];if(o.length){if(r){let s=this.shadowRoot.querySelector("style");s&&s.remove()}Xo(this._renderRoot,o)}}else this._renderRoot=this,t.styles&&console.warn(`[webjs] <${dt(t)||this.tagName?.toLowerCase()}> has static shadow = false AND static styles. static styles only works with shadow DOM (adoptedStyleSheets). For light DOM, use global CSS or <style> in render().`),kr(this)?bs(this):this.__isHydrating()||this.hasAttribute("data-wj-serialized")||js(this)?(this.removeAttribute("data-wj-serialized"),H(this),us(this)):ls(this),vs(this),ms(this);for(let r of this.__controllers||Kt)r.hostConnected&&r.hostConnected();this._updateResolve===null&&(this._updatePromise=new Promise(r=>{this._updateResolve=r})),this._scheduled=!0,queueMicrotask(()=>{this._scheduled=!1;try{this._performRender()}catch(r){console.error("[webjs] lifecycle hook threw during initial render:",r)}})}__isHydrating(){let t=this.firstChild,r=t!=null&&t.nodeType===8&&t.data==="webjs-hydrate";return r&&(this.__hydratedAtActivate=!0),r}disconnectedCallback(){this._connected=!1,this.__hydrationObserver&&(this.__hydrationObserver.disconnect(),this.__hydrationObserver=null),gs(this),this.__signalWatcher&&(this.__signalWatcher.dispose(),this.__signalWatcher=void 0);for(let t of this.__controllers||Kt)t.hostDisconnected&&t.hostDisconnected()}attributeChangedCallback(t,r,n){if(this.__reflectingAttribute)return;let o=oo(this.constructor,t);if(o===void 0)return;let{propName:s,def:i}=o,a=no(i,n);this[s]!==a&&(this[s]=a,this._connected&&this.requestUpdate())}requestUpdate(t,r){t!==void 0&&!this._changedProperties.has(t)&&this._changedProperties.set(t,r),this._scheduleUpdate()}_scheduleUpdate(){this._updateResolve===null&&(this._updatePromise=new Promise(t=>{this._updateResolve=t})),!this._isUpdating&&(this._scheduled||!this._connected||(this._scheduled=!0,queueMicrotask(()=>{this._scheduled=!1;try{this._performRender()}catch(t){console.error("[webjs] lifecycle hook threw during update cycle:",t)}})))}_performRender(){if(!this._renderRoot)return;let t=this._changedProperties;this._isUpdating=!0;let r=!1,n=null;try{if(this.shouldUpdate(t)){this.willUpdate(t);for(let o of this.__controllers||Kt)o.hostUpdate&&o.hostUpdate();this.__renderToken=(this.__renderToken||0)+1,this.__renderAbort&&this.__renderAbort.abort(),this.__renderAbort=typeof AbortController<"u"?new AbortController:null;try{let o=this.update(t);o&&typeof o.then=="function"&&(n=o)}catch(o){this._handleRenderError(o)}if(!n){for(let o of this.__controllers||Kt)o.hostUpdated&&o.hostUpdated();r=!0}}}catch(o){console.error("[webjs] lifecycle hook threw during update phase:",o)}finally{this._isUpdating=!1,(r||n)&&(this._changedProperties=new Map)}if(n){let o=this.__renderToken;this.__pendingAsyncCommits=(this.__pendingAsyncCommits||0)+1;let s=()=>{if(this.__pendingAsyncCommits--,o===this.__renderToken){for(let i of this.__controllers||Kt)i.hostUpdated&&i.hostUpdated();this._postCommit(t)}};n.then(s,i=>{try{o===this.__renderToken&&this._handleRenderError(i instanceof Error?i:new Error(sc(i)))}finally{s()}});return}r?this._postCommit(t):this.__pendingAsyncCommits||this._resolveUpdate()}_resolveUpdate(){if(this._updateResolve){let t=this._changedProperties.size===0;this._updateResolve(t),this._updateResolve=null}}performServerUpdate(){let t=this._changedProperties;this._isUpdating=!0;try{this.willUpdate(t);for(let r of this.__controllers||Kt)r.hostUpdate&&r.hostUpdate();this._reflectDeclaredAttributes()}finally{this._isUpdating=!1}}_reflectDeclaredAttributes(){let t=this.constructor.properties||{};for(let r of Object.keys(t)){let n=t[r];!n||!n.reflect||n.state||this._reflectAttribute(r,this[r],n)}}shouldUpdate(t){return!0}willUpdate(t){}update(t){this.__signalWatcher||(this.__signalWatcher=new Dr.subtle.Watcher(()=>{this._connected&&this.requestUpdate()}));let r,n=Ys();so(this.__renderAbort?this.__renderAbort.signal:null);try{this.__signalWatcher.observe(()=>{r=this.render()})}finally{so(n||null)}if(r&&typeof r.then=="function")return this._commitAsync(r);ft(r,this._renderRoot)}_commitAsync(t){let r=this.__renderToken;if(this.__firstRendered&&this._overridesRenderFallback())try{let n=this.renderFallback();n!==void 0&&ft(n,this._renderRoot)}catch(n){console.error("[webjs] renderFallback() threw:",n)}return Promise.resolve(t).then(n=>{if(r===this.__renderToken)try{ft(n,this._renderRoot)}catch(o){this._handleRenderError(o instanceof Error?o:new Error(String(o)))}},n=>{r===this.__renderToken&&this._handleRenderError(n instanceof Error?n:new Error(String(n)))})}_overridesRenderFallback(){return this.renderFallback!==Vr.prototype.renderFallback}_handleRenderError(t){console.error(`[webjs] render error in <${dt(this.constructor)||this.tagName?.toLowerCase()}>:`,t);try{let r=this.renderError(t);r!==void 0&&ft(r,this._renderRoot)}catch(r){console.error("[webjs] renderError() also threw:",r)}}_postCommit(t){try{this.__firstRendered||(this.__firstRendered=!0,this.firstUpdated(t)),this.updated(t)}catch(r){console.error("[webjs] lifecycle hook threw during post-commit phase:",r)}finally{this._resolveUpdate()}}updated(t){}firstUpdated(t){}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}addController(t){(this.__controllers??=new Set).add(t),this._connected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers&&this.__controllers.delete(t)}render(){return""}renderError(t){}renderFallback(){}};function Bf(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function Hf(e){return e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function Vr(e){return new.target?Reflect.construct(zt,arguments,new.target):class extends zt{static properties=e;static[uc]=!0}}Object.setPrototypeOf(Vr,zt);Vr.prototype=zt.prototype;var Zs=null;function Uf(e){Zs=e}function Qs(){if(!Zs)return"";try{return Zs()||""}catch{return""}}tt();et();tt();xe();var Sm=Symbol.for("webjs.suspense");function Vf(e){return{_$webjsSuspense:!0,fallback:e.fallback,children:e.children}}function ei(e){return!!e&&typeof e=="object"&&e._$webjsSuspense===!0}ht();var dc={AElig:198,AMP:38,Aacute:193,Abreve:258,Acirc:194,Acy:1040,Afr:120068,Agrave:192,Alpha:913,Amacr:256,And:10835,Aogon:260,Aopf:120120,ApplyFunction:8289,Aring:197,Ascr:119964,Assign:8788,Atilde:195,Auml:196,Backslash:8726,Barv:10983,Barwed:8966,Bcy:1041,Because:8757,Bernoullis:8492,Beta:914,Bfr:120069,Bopf:120121,Breve:728,Bscr:8492,Bumpeq:8782,CHcy:1063,COPY:169,Cacute:262,Cap:8914,CapitalDifferentialD:8517,Cayleys:8493,Ccaron:268,Ccedil:199,Ccirc:264,Cconint:8752,Cdot:266,Cedilla:184,CenterDot:183,Cfr:8493,Chi:935,CircleDot:8857,CircleMinus:8854,CirclePlus:8853,CircleTimes:8855,ClockwiseContourIntegral:8754,CloseCurlyDoubleQuote:8221,CloseCurlyQuote:8217,Colon:8759,Colone:10868,Congruent:8801,Conint:8751,ContourIntegral:8750,Copf:8450,Coproduct:8720,CounterClockwiseContourIntegral:8755,Cross:10799,Cscr:119966,Cup:8915,CupCap:8781,DD:8517,DDotrahd:10513,DJcy:1026,DScy:1029,DZcy:1039,Dagger:8225,Darr:8609,Dashv:10980,Dcaron:270,Dcy:1044,Del:8711,Delta:916,Dfr:120071,DiacriticalAcute:180,DiacriticalDot:729,DiacriticalDoubleAcute:733,DiacriticalGrave:96,DiacriticalTilde:732,Diamond:8900,DifferentialD:8518,Dopf:120123,Dot:168,DotDot:8412,DotEqual:8784,DoubleContourIntegral:8751,DoubleDot:168,DoubleDownArrow:8659,DoubleLeftArrow:8656,DoubleLeftRightArrow:8660,DoubleLeftTee:10980,DoubleLongLeftArrow:10232,DoubleLongLeftRightArrow:10234,DoubleLongRightArrow:10233,DoubleRightArrow:8658,DoubleRightTee:8872,DoubleUpArrow:8657,DoubleUpDownArrow:8661,DoubleVerticalBar:8741,DownArrow:8595,DownArrowBar:10515,DownArrowUpArrow:8693,DownBreve:785,DownLeftRightVector:10576,DownLeftTeeVector:10590,DownLeftVector:8637,DownLeftVectorBar:10582,DownRightTeeVector:10591,DownRightVector:8641,DownRightVectorBar:10583,DownTee:8868,DownTeeArrow:8615,Downarrow:8659,Dscr:119967,Dstrok:272,ENG:330,ETH:208,Eacute:201,Ecaron:282,Ecirc:202,Ecy:1069,Edot:278,Efr:120072,Egrave:200,Element:8712,Emacr:274,EmptySmallSquare:9723,EmptyVerySmallSquare:9643,Eogon:280,Eopf:120124,Epsilon:917,Equal:10869,EqualTilde:8770,Equilibrium:8652,Escr:8496,Esim:10867,Eta:919,Euml:203,Exists:8707,ExponentialE:8519,Fcy:1060,Ffr:120073,FilledSmallSquare:9724,FilledVerySmallSquare:9642,Fopf:120125,ForAll:8704,Fouriertrf:8497,Fscr:8497,GJcy:1027,GT:62,Gamma:915,Gammad:988,Gbreve:286,Gcedil:290,Gcirc:284,Gcy:1043,Gdot:288,Gfr:120074,Gg:8921,Gopf:120126,GreaterEqual:8805,GreaterEqualLess:8923,GreaterFullEqual:8807,GreaterGreater:10914,GreaterLess:8823,GreaterSlantEqual:10878,GreaterTilde:8819,Gscr:119970,Gt:8811,HARDcy:1066,Hacek:711,Hat:94,Hcirc:292,Hfr:8460,HilbertSpace:8459,Hopf:8461,HorizontalLine:9472,Hscr:8459,Hstrok:294,HumpDownHump:8782,HumpEqual:8783,IEcy:1045,IJlig:306,IOcy:1025,Iacute:205,Icirc:206,Icy:1048,Idot:304,Ifr:8465,Igrave:204,Im:8465,Imacr:298,ImaginaryI:8520,Implies:8658,Int:8748,Integral:8747,Intersection:8898,InvisibleComma:8291,InvisibleTimes:8290,Iogon:302,Iopf:120128,Iota:921,Iscr:8464,Itilde:296,Iukcy:1030,Iuml:207,Jcirc:308,Jcy:1049,Jfr:120077,Jopf:120129,Jscr:119973,Jsercy:1032,Jukcy:1028,KHcy:1061,KJcy:1036,Kappa:922,Kcedil:310,Kcy:1050,Kfr:120078,Kopf:120130,Kscr:119974,LJcy:1033,LT:60,Lacute:313,Lambda:923,Lang:10218,Laplacetrf:8466,Larr:8606,Lcaron:317,Lcedil:315,Lcy:1051,LeftAngleBracket:10216,LeftArrow:8592,LeftArrowBar:8676,LeftArrowRightArrow:8646,LeftCeiling:8968,LeftDoubleBracket:10214,LeftDownTeeVector:10593,LeftDownVector:8643,LeftDownVectorBar:10585,LeftFloor:8970,LeftRightArrow:8596,LeftRightVector:10574,LeftTee:8867,LeftTeeArrow:8612,LeftTeeVector:10586,LeftTriangle:8882,LeftTriangleBar:10703,LeftTriangleEqual:8884,LeftUpDownVector:10577,LeftUpTeeVector:10592,LeftUpVector:8639,LeftUpVectorBar:10584,LeftVector:8636,LeftVectorBar:10578,Leftarrow:8656,Leftrightarrow:8660,LessEqualGreater:8922,LessFullEqual:8806,LessGreater:8822,LessLess:10913,LessSlantEqual:10877,LessTilde:8818,Lfr:120079,Ll:8920,Lleftarrow:8666,Lmidot:319,LongLeftArrow:10229,LongLeftRightArrow:10231,LongRightArrow:10230,Longleftarrow:10232,Longleftrightarrow:10234,Longrightarrow:10233,Lopf:120131,LowerLeftArrow:8601,LowerRightArrow:8600,Lscr:8466,Lsh:8624,Lstrok:321,Lt:8810,Map:10501,Mcy:1052,MediumSpace:8287,Mellintrf:8499,Mfr:120080,MinusPlus:8723,Mopf:120132,Mscr:8499,Mu:924,NJcy:1034,Nacute:323,Ncaron:327,Ncedil:325,Ncy:1053,NegativeMediumSpace:8203,NegativeThickSpace:8203,NegativeThinSpace:8203,NegativeVeryThinSpace:8203,NestedGreaterGreater:8811,NestedLessLess:8810,NewLine:10,Nfr:120081,NoBreak:8288,NonBreakingSpace:160,Nopf:8469,Not:10988,NotCongruent:8802,NotCupCap:8813,NotDoubleVerticalBar:8742,NotElement:8713,NotEqual:8800,NotEqualTilde:[8770,824],NotExists:8708,NotGreater:8815,NotGreaterEqual:8817,NotGreaterFullEqual:[8807,824],NotGreaterGreater:[8811,824],NotGreaterLess:8825,NotGreaterSlantEqual:[10878,824],NotGreaterTilde:8821,NotHumpDownHump:[8782,824],NotHumpEqual:[8783,824],NotLeftTriangle:8938,NotLeftTriangleBar:[10703,824],NotLeftTriangleEqual:8940,NotLess:8814,NotLessEqual:8816,NotLessGreater:8824,NotLessLess:[8810,824],NotLessSlantEqual:[10877,824],NotLessTilde:8820,NotNestedGreaterGreater:[10914,824],NotNestedLessLess:[10913,824],NotPrecedes:8832,NotPrecedesEqual:[10927,824],NotPrecedesSlantEqual:8928,NotReverseElement:8716,NotRightTriangle:8939,NotRightTriangleBar:[10704,824],NotRightTriangleEqual:8941,NotSquareSubset:[8847,824],NotSquareSubsetEqual:8930,NotSquareSuperset:[8848,824],NotSquareSupersetEqual:8931,NotSubset:[8834,8402],NotSubsetEqual:8840,NotSucceeds:8833,NotSucceedsEqual:[10928,824],NotSucceedsSlantEqual:8929,NotSucceedsTilde:[8831,824],NotSuperset:[8835,8402],NotSupersetEqual:8841,NotTilde:8769,NotTildeEqual:8772,NotTildeFullEqual:8775,NotTildeTilde:8777,NotVerticalBar:8740,Nscr:119977,Ntilde:209,Nu:925,OElig:338,Oacute:211,Ocirc:212,Ocy:1054,Odblac:336,Ofr:120082,Ograve:210,Omacr:332,Omega:937,Omicron:927,Oopf:120134,OpenCurlyDoubleQuote:8220,OpenCurlyQuote:8216,Or:10836,Oscr:119978,Oslash:216,Otilde:213,Otimes:10807,Ouml:214,OverBar:8254,OverBrace:9182,OverBracket:9140,OverParenthesis:9180,PartialD:8706,Pcy:1055,Pfr:120083,Phi:934,Pi:928,PlusMinus:177,Poincareplane:8460,Popf:8473,Pr:10939,Precedes:8826,PrecedesEqual:10927,PrecedesSlantEqual:8828,PrecedesTilde:8830,Prime:8243,Product:8719,Proportion:8759,Proportional:8733,Pscr:119979,Psi:936,QUOT:34,Qfr:120084,Qopf:8474,Qscr:119980,RBarr:10512,REG:174,Racute:340,Rang:10219,Rarr:8608,Rarrtl:10518,Rcaron:344,Rcedil:342,Rcy:1056,Re:8476,ReverseElement:8715,ReverseEquilibrium:8651,ReverseUpEquilibrium:10607,Rfr:8476,Rho:929,RightAngleBracket:10217,RightArrow:8594,RightArrowBar:8677,RightArrowLeftArrow:8644,RightCeiling:8969,RightDoubleBracket:10215,RightDownTeeVector:10589,RightDownVector:8642,RightDownVectorBar:10581,RightFloor:8971,RightTee:8866,RightTeeArrow:8614,RightTeeVector:10587,RightTriangle:8883,RightTriangleBar:10704,RightTriangleEqual:8885,RightUpDownVector:10575,RightUpTeeVector:10588,RightUpVector:8638,RightUpVectorBar:10580,RightVector:8640,RightVectorBar:10579,Rightarrow:8658,Ropf:8477,RoundImplies:10608,Rrightarrow:8667,Rscr:8475,Rsh:8625,RuleDelayed:10740,SHCHcy:1065,SHcy:1064,SOFTcy:1068,Sacute:346,Sc:10940,Scaron:352,Scedil:350,Scirc:348,Scy:1057,Sfr:120086,ShortDownArrow:8595,ShortLeftArrow:8592,ShortRightArrow:8594,ShortUpArrow:8593,Sigma:931,SmallCircle:8728,Sopf:120138,Sqrt:8730,Square:9633,SquareIntersection:8851,SquareSubset:8847,SquareSubsetEqual:8849,SquareSuperset:8848,SquareSupersetEqual:8850,SquareUnion:8852,Sscr:119982,Star:8902,Sub:8912,Subset:8912,SubsetEqual:8838,Succeeds:8827,SucceedsEqual:10928,SucceedsSlantEqual:8829,SucceedsTilde:8831,SuchThat:8715,Sum:8721,Sup:8913,Superset:8835,SupersetEqual:8839,Supset:8913,THORN:222,TRADE:8482,TSHcy:1035,TScy:1062,Tab:9,Tau:932,Tcaron:356,Tcedil:354,Tcy:1058,Tfr:120087,Therefore:8756,Theta:920,ThickSpace:[8287,8202],ThinSpace:8201,Tilde:8764,TildeEqual:8771,TildeFullEqual:8773,TildeTilde:8776,Topf:120139,TripleDot:8411,Tscr:119983,Tstrok:358,Uacute:218,Uarr:8607,Uarrocir:10569,Ubrcy:1038,Ubreve:364,Ucirc:219,Ucy:1059,Udblac:368,Ufr:120088,Ugrave:217,Umacr:362,UnderBar:95,UnderBrace:9183,UnderBracket:9141,UnderParenthesis:9181,Union:8899,UnionPlus:8846,Uogon:370,Uopf:120140,UpArrow:8593,UpArrowBar:10514,UpArrowDownArrow:8645,UpDownArrow:8597,UpEquilibrium:10606,UpTee:8869,UpTeeArrow:8613,Uparrow:8657,Updownarrow:8661,UpperLeftArrow:8598,UpperRightArrow:8599,Upsi:978,Upsilon:933,Uring:366,Uscr:119984,Utilde:360,Uuml:220,VDash:8875,Vbar:10987,Vcy:1042,Vdash:8873,Vdashl:10982,Vee:8897,Verbar:8214,Vert:8214,VerticalBar:8739,VerticalLine:124,VerticalSeparator:10072,VerticalTilde:8768,VeryThinSpace:8202,Vfr:120089,Vopf:120141,Vscr:119985,Vvdash:8874,Wcirc:372,Wedge:8896,Wfr:120090,Wopf:120142,Wscr:119986,Xfr:120091,Xi:926,Xopf:120143,Xscr:119987,YAcy:1071,YIcy:1031,YUcy:1070,Yacute:221,Ycirc:374,Ycy:1067,Yfr:120092,Yopf:120144,Yscr:119988,Yuml:376,ZHcy:1046,Zacute:377,Zcaron:381,Zcy:1047,Zdot:379,ZeroWidthSpace:8203,Zeta:918,Zfr:8488,Zopf:8484,Zscr:119989,aacute:225,abreve:259,ac:8766,acE:[8766,819],acd:8767,acirc:226,acute:180,acy:1072,aelig:230,af:8289,afr:120094,agrave:224,alefsym:8501,aleph:8501,alpha:945,amacr:257,amalg:10815,amp:38,and:8743,andand:10837,andd:10844,andslope:10840,andv:10842,ang:8736,ange:10660,angle:8736,angmsd:8737,angmsdaa:10664,angmsdab:10665,angmsdac:10666,angmsdad:10667,angmsdae:10668,angmsdaf:10669,angmsdag:10670,angmsdah:10671,angrt:8735,angrtvb:8894,angrtvbd:10653,angsph:8738,angst:197,angzarr:9084,aogon:261,aopf:120146,ap:8776,apE:10864,apacir:10863,ape:8778,apid:8779,apos:39,approx:8776,approxeq:8778,aring:229,ascr:119990,ast:42,asymp:8776,asympeq:8781,atilde:227,auml:228,awconint:8755,awint:10769,bNot:10989,backcong:8780,backepsilon:1014,backprime:8245,backsim:8765,backsimeq:8909,barvee:8893,barwed:8965,barwedge:8965,bbrk:9141,bbrktbrk:9142,bcong:8780,bcy:1073,bdquo:8222,becaus:8757,because:8757,bemptyv:10672,bepsi:1014,bernou:8492,beta:946,beth:8502,between:8812,bfr:120095,bigcap:8898,bigcirc:9711,bigcup:8899,bigodot:10752,bigoplus:10753,bigotimes:10754,bigsqcup:10758,bigstar:9733,bigtriangledown:9661,bigtriangleup:9651,biguplus:10756,bigvee:8897,bigwedge:8896,bkarow:10509,blacklozenge:10731,blacksquare:9642,blacktriangle:9652,blacktriangledown:9662,blacktriangleleft:9666,blacktriangleright:9656,blank:9251,blk12:9618,blk14:9617,blk34:9619,block:9608,bne:[61,8421],bnequiv:[8801,8421],bnot:8976,bopf:120147,bot:8869,bottom:8869,bowtie:8904,boxDL:9559,boxDR:9556,boxDl:9558,boxDr:9555,boxH:9552,boxHD:9574,boxHU:9577,boxHd:9572,boxHu:9575,boxUL:9565,boxUR:9562,boxUl:9564,boxUr:9561,boxV:9553,boxVH:9580,boxVL:9571,boxVR:9568,boxVh:9579,boxVl:9570,boxVr:9567,boxbox:10697,boxdL:9557,boxdR:9554,boxdl:9488,boxdr:9484,boxh:9472,boxhD:9573,boxhU:9576,boxhd:9516,boxhu:9524,boxminus:8863,boxplus:8862,boxtimes:8864,boxuL:9563,boxuR:9560,boxul:9496,boxur:9492,boxv:9474,boxvH:9578,boxvL:9569,boxvR:9566,boxvh:9532,boxvl:9508,boxvr:9500,bprime:8245,breve:728,brvbar:166,bscr:119991,bsemi:8271,bsim:8765,bsime:8909,bsol:92,bsolb:10693,bsolhsub:10184,bull:8226,bullet:8226,bump:8782,bumpE:10926,bumpe:8783,bumpeq:8783,cacute:263,cap:8745,capand:10820,capbrcup:10825,capcap:10827,capcup:10823,capdot:10816,caps:[8745,65024],caret:8257,caron:711,ccaps:10829,ccaron:269,ccedil:231,ccirc:265,ccups:10828,ccupssm:10832,cdot:267,cedil:184,cemptyv:10674,cent:162,centerdot:183,cfr:120096,chcy:1095,check:10003,checkmark:10003,chi:967,cir:9675,cirE:10691,circ:710,circeq:8791,circlearrowleft:8634,circlearrowright:8635,circledR:174,circledS:9416,circledast:8859,circledcirc:8858,circleddash:8861,cire:8791,cirfnint:10768,cirmid:10991,cirscir:10690,clubs:9827,clubsuit:9827,colon:58,colone:8788,coloneq:8788,comma:44,commat:64,comp:8705,compfn:8728,complement:8705,complexes:8450,cong:8773,congdot:10861,conint:8750,copf:120148,coprod:8720,copy:169,copysr:8471,crarr:8629,cross:10007,cscr:119992,csub:10959,csube:10961,csup:10960,csupe:10962,ctdot:8943,cudarrl:10552,cudarrr:10549,cuepr:8926,cuesc:8927,cularr:8630,cularrp:10557,cup:8746,cupbrcap:10824,cupcap:10822,cupcup:10826,cupdot:8845,cupor:10821,cups:[8746,65024],curarr:8631,curarrm:10556,curlyeqprec:8926,curlyeqsucc:8927,curlyvee:8910,curlywedge:8911,curren:164,curvearrowleft:8630,curvearrowright:8631,cuvee:8910,cuwed:8911,cwconint:8754,cwint:8753,cylcty:9005,dArr:8659,dHar:10597,dagger:8224,daleth:8504,darr:8595,dash:8208,dashv:8867,dbkarow:10511,dblac:733,dcaron:271,dcy:1076,dd:8518,ddagger:8225,ddarr:8650,ddotseq:10871,deg:176,delta:948,demptyv:10673,dfisht:10623,dfr:120097,dharl:8643,dharr:8642,diam:8900,diamond:8900,diamondsuit:9830,diams:9830,die:168,digamma:989,disin:8946,div:247,divide:247,divideontimes:8903,divonx:8903,djcy:1106,dlcorn:8990,dlcrop:8973,dollar:36,dopf:120149,dot:729,doteq:8784,doteqdot:8785,dotminus:8760,dotplus:8724,dotsquare:8865,doublebarwedge:8966,downarrow:8595,downdownarrows:8650,downharpoonleft:8643,downharpoonright:8642,drbkarow:10512,drcorn:8991,drcrop:8972,dscr:119993,dscy:1109,dsol:10742,dstrok:273,dtdot:8945,dtri:9663,dtrif:9662,duarr:8693,duhar:10607,dwangle:10662,dzcy:1119,dzigrarr:10239,eDDot:10871,eDot:8785,eacute:233,easter:10862,ecaron:283,ecir:8790,ecirc:234,ecolon:8789,ecy:1101,edot:279,ee:8519,efDot:8786,efr:120098,eg:10906,egrave:232,egs:10902,egsdot:10904,el:10905,elinters:9191,ell:8467,els:10901,elsdot:10903,emacr:275,empty:8709,emptyset:8709,emptyv:8709,emsp:8195,emsp13:8196,emsp14:8197,eng:331,ensp:8194,eogon:281,eopf:120150,epar:8917,eparsl:10723,eplus:10865,epsi:949,epsilon:949,epsiv:1013,eqcirc:8790,eqcolon:8789,eqsim:8770,eqslantgtr:10902,eqslantless:10901,equals:61,equest:8799,equiv:8801,equivDD:10872,eqvparsl:10725,erDot:8787,erarr:10609,escr:8495,esdot:8784,esim:8770,eta:951,eth:240,euml:235,euro:8364,excl:33,exist:8707,expectation:8496,exponentiale:8519,fallingdotseq:8786,fcy:1092,female:9792,ffilig:64259,fflig:64256,ffllig:64260,ffr:120099,filig:64257,fjlig:[102,106],flat:9837,fllig:64258,fltns:9649,fnof:402,fopf:120151,forall:8704,fork:8916,forkv:10969,fpartint:10765,frac12:189,frac13:8531,frac14:188,frac15:8533,frac16:8537,frac18:8539,frac23:8532,frac25:8534,frac34:190,frac35:8535,frac38:8540,frac45:8536,frac56:8538,frac58:8541,frac78:8542,frasl:8260,frown:8994,fscr:119995,gE:8807,gEl:10892,gacute:501,gamma:947,gammad:989,gap:10886,gbreve:287,gcirc:285,gcy:1075,gdot:289,ge:8805,gel:8923,geq:8805,geqq:8807,geqslant:10878,ges:10878,gescc:10921,gesdot:10880,gesdoto:10882,gesdotol:10884,gesl:[8923,65024],gesles:10900,gfr:120100,gg:8811,ggg:8921,gimel:8503,gjcy:1107,gl:8823,glE:10898,gla:10917,glj:10916,gnE:8809,gnap:10890,gnapprox:10890,gne:10888,gneq:10888,gneqq:8809,gnsim:8935,gopf:120152,grave:96,gscr:8458,gsim:8819,gsime:10894,gsiml:10896,gt:62,gtcc:10919,gtcir:10874,gtdot:8919,gtlPar:10645,gtquest:10876,gtrapprox:10886,gtrarr:10616,gtrdot:8919,gtreqless:8923,gtreqqless:10892,gtrless:8823,gtrsim:8819,gvertneqq:[8809,65024],gvnE:[8809,65024],hArr:8660,hairsp:8202,half:189,hamilt:8459,hardcy:1098,harr:8596,harrcir:10568,harrw:8621,hbar:8463,hcirc:293,hearts:9829,heartsuit:9829,hellip:8230,hercon:8889,hfr:120101,hksearow:10533,hkswarow:10534,hoarr:8703,homtht:8763,hookleftarrow:8617,hookrightarrow:8618,hopf:120153,horbar:8213,hscr:119997,hslash:8463,hstrok:295,hybull:8259,hyphen:8208,iacute:237,ic:8291,icirc:238,icy:1080,iecy:1077,iexcl:161,iff:8660,ifr:120102,igrave:236,ii:8520,iiiint:10764,iiint:8749,iinfin:10716,iiota:8489,ijlig:307,imacr:299,image:8465,imagline:8464,imagpart:8465,imath:305,imof:8887,imped:437,in:8712,incare:8453,infin:8734,infintie:10717,inodot:305,int:8747,intcal:8890,integers:8484,intercal:8890,intlarhk:10775,intprod:10812,iocy:1105,iogon:303,iopf:120154,iota:953,iprod:10812,iquest:191,iscr:119998,isin:8712,isinE:8953,isindot:8949,isins:8948,isinsv:8947,isinv:8712,it:8290,itilde:297,iukcy:1110,iuml:239,jcirc:309,jcy:1081,jfr:120103,jmath:567,jopf:120155,jscr:119999,jsercy:1112,jukcy:1108,kappa:954,kappav:1008,kcedil:311,kcy:1082,kfr:120104,kgreen:312,khcy:1093,kjcy:1116,kopf:120156,kscr:12e4,lAarr:8666,lArr:8656,lAtail:10523,lBarr:10510,lE:8806,lEg:10891,lHar:10594,lacute:314,laemptyv:10676,lagran:8466,lambda:955,lang:10216,langd:10641,langle:10216,lap:10885,laquo:171,larr:8592,larrb:8676,larrbfs:10527,larrfs:10525,larrhk:8617,larrlp:8619,larrpl:10553,larrsim:10611,larrtl:8610,lat:10923,latail:10521,late:10925,lates:[10925,65024],lbarr:10508,lbbrk:10098,lbrace:123,lbrack:91,lbrke:10635,lbrksld:10639,lbrkslu:10637,lcaron:318,lcedil:316,lceil:8968,lcub:123,lcy:1083,ldca:10550,ldquo:8220,ldquor:8222,ldrdhar:10599,ldrushar:10571,ldsh:8626,le:8804,leftarrow:8592,leftarrowtail:8610,leftharpoondown:8637,leftharpoonup:8636,leftleftarrows:8647,leftrightarrow:8596,leftrightarrows:8646,leftrightharpoons:8651,leftrightsquigarrow:8621,leftthreetimes:8907,leg:8922,leq:8804,leqq:8806,leqslant:10877,les:10877,lescc:10920,lesdot:10879,lesdoto:10881,lesdotor:10883,lesg:[8922,65024],lesges:10899,lessapprox:10885,lessdot:8918,lesseqgtr:8922,lesseqqgtr:10891,lessgtr:8822,lesssim:8818,lfisht:10620,lfloor:8970,lfr:120105,lg:8822,lgE:10897,lhard:8637,lharu:8636,lharul:10602,lhblk:9604,ljcy:1113,ll:8810,llarr:8647,llcorner:8990,llhard:10603,lltri:9722,lmidot:320,lmoust:9136,lmoustache:9136,lnE:8808,lnap:10889,lnapprox:10889,lne:10887,lneq:10887,lneqq:8808,lnsim:8934,loang:10220,loarr:8701,lobrk:10214,longleftarrow:10229,longleftrightarrow:10231,longmapsto:10236,longrightarrow:10230,looparrowleft:8619,looparrowright:8620,lopar:10629,lopf:120157,loplus:10797,lotimes:10804,lowast:8727,lowbar:95,loz:9674,lozenge:9674,lozf:10731,lpar:40,lparlt:10643,lrarr:8646,lrcorner:8991,lrhar:8651,lrhard:10605,lrm:8206,lrtri:8895,lsaquo:8249,lscr:120001,lsh:8624,lsim:8818,lsime:10893,lsimg:10895,lsqb:91,lsquo:8216,lsquor:8218,lstrok:322,lt:60,ltcc:10918,ltcir:10873,ltdot:8918,lthree:8907,ltimes:8905,ltlarr:10614,ltquest:10875,ltrPar:10646,ltri:9667,ltrie:8884,ltrif:9666,lurdshar:10570,luruhar:10598,lvertneqq:[8808,65024],lvnE:[8808,65024],mDDot:8762,macr:175,male:9794,malt:10016,maltese:10016,map:8614,mapsto:8614,mapstodown:8615,mapstoleft:8612,mapstoup:8613,marker:9646,mcomma:10793,mcy:1084,mdash:8212,measuredangle:8737,mfr:120106,mho:8487,micro:181,mid:8739,midast:42,midcir:10992,middot:183,minus:8722,minusb:8863,minusd:8760,minusdu:10794,mlcp:10971,mldr:8230,mnplus:8723,models:8871,mopf:120158,mp:8723,mscr:120002,mstpos:8766,mu:956,multimap:8888,mumap:8888,nGg:[8921,824],nGt:[8811,8402],nGtv:[8811,824],nLeftarrow:8653,nLeftrightarrow:8654,nLl:[8920,824],nLt:[8810,8402],nLtv:[8810,824],nRightarrow:8655,nVDash:8879,nVdash:8878,nabla:8711,nacute:324,nang:[8736,8402],nap:8777,napE:[10864,824],napid:[8779,824],napos:329,napprox:8777,natur:9838,natural:9838,naturals:8469,nbsp:160,nbump:[8782,824],nbumpe:[8783,824],ncap:10819,ncaron:328,ncedil:326,ncong:8775,ncongdot:[10861,824],ncup:10818,ncy:1085,ndash:8211,ne:8800,neArr:8663,nearhk:10532,nearr:8599,nearrow:8599,nedot:[8784,824],nequiv:8802,nesear:10536,nesim:[8770,824],nexist:8708,nexists:8708,nfr:120107,ngE:[8807,824],nge:8817,ngeq:8817,ngeqq:[8807,824],ngeqslant:[10878,824],nges:[10878,824],ngsim:8821,ngt:8815,ngtr:8815,nhArr:8654,nharr:8622,nhpar:10994,ni:8715,nis:8956,nisd:8954,niv:8715,njcy:1114,nlArr:8653,nlE:[8806,824],nlarr:8602,nldr:8229,nle:8816,nleftarrow:8602,nleftrightarrow:8622,nleq:8816,nleqq:[8806,824],nleqslant:[10877,824],nles:[10877,824],nless:8814,nlsim:8820,nlt:8814,nltri:8938,nltrie:8940,nmid:8740,nopf:120159,not:172,notin:8713,notinE:[8953,824],notindot:[8949,824],notinva:8713,notinvb:8951,notinvc:8950,notni:8716,notniva:8716,notnivb:8958,notnivc:8957,npar:8742,nparallel:8742,nparsl:[11005,8421],npart:[8706,824],npolint:10772,npr:8832,nprcue:8928,npre:[10927,824],nprec:8832,npreceq:[10927,824],nrArr:8655,nrarr:8603,nrarrc:[10547,824],nrarrw:[8605,824],nrightarrow:8603,nrtri:8939,nrtrie:8941,nsc:8833,nsccue:8929,nsce:[10928,824],nscr:120003,nshortmid:8740,nshortparallel:8742,nsim:8769,nsime:8772,nsimeq:8772,nsmid:8740,nspar:8742,nsqsube:8930,nsqsupe:8931,nsub:8836,nsubE:[10949,824],nsube:8840,nsubset:[8834,8402],nsubseteq:8840,nsubseteqq:[10949,824],nsucc:8833,nsucceq:[10928,824],nsup:8837,nsupE:[10950,824],nsupe:8841,nsupset:[8835,8402],nsupseteq:8841,nsupseteqq:[10950,824],ntgl:8825,ntilde:241,ntlg:8824,ntriangleleft:8938,ntrianglelefteq:8940,ntriangleright:8939,ntrianglerighteq:8941,nu:957,num:35,numero:8470,numsp:8199,nvDash:8877,nvHarr:10500,nvap:[8781,8402],nvdash:8876,nvge:[8805,8402],nvgt:[62,8402],nvinfin:10718,nvlArr:10498,nvle:[8804,8402],nvlt:[60,8402],nvltrie:[8884,8402],nvrArr:10499,nvrtrie:[8885,8402],nvsim:[8764,8402],nwArr:8662,nwarhk:10531,nwarr:8598,nwarrow:8598,nwnear:10535,oS:9416,oacute:243,oast:8859,ocir:8858,ocirc:244,ocy:1086,odash:8861,odblac:337,odiv:10808,odot:8857,odsold:10684,oelig:339,ofcir:10687,ofr:120108,ogon:731,ograve:242,ogt:10689,ohbar:10677,ohm:937,oint:8750,olarr:8634,olcir:10686,olcross:10683,oline:8254,olt:10688,omacr:333,omega:969,omicron:959,omid:10678,ominus:8854,oopf:120160,opar:10679,operp:10681,oplus:8853,or:8744,orarr:8635,ord:10845,order:8500,orderof:8500,ordf:170,ordm:186,origof:8886,oror:10838,orslope:10839,orv:10843,oscr:8500,oslash:248,osol:8856,otilde:245,otimes:8855,otimesas:10806,ouml:246,ovbar:9021,par:8741,para:182,parallel:8741,parsim:10995,parsl:11005,part:8706,pcy:1087,percnt:37,period:46,permil:8240,perp:8869,pertenk:8241,pfr:120109,phi:966,phiv:981,phmmat:8499,phone:9742,pi:960,pitchfork:8916,piv:982,planck:8463,planckh:8462,plankv:8463,plus:43,plusacir:10787,plusb:8862,pluscir:10786,plusdo:8724,plusdu:10789,pluse:10866,plusmn:177,plussim:10790,plustwo:10791,pm:177,pointint:10773,popf:120161,pound:163,pr:8826,prE:10931,prap:10935,prcue:8828,pre:10927,prec:8826,precapprox:10935,preccurlyeq:8828,preceq:10927,precnapprox:10937,precneqq:10933,precnsim:8936,precsim:8830,prime:8242,primes:8473,prnE:10933,prnap:10937,prnsim:8936,prod:8719,profalar:9006,profline:8978,profsurf:8979,prop:8733,propto:8733,prsim:8830,prurel:8880,pscr:120005,psi:968,puncsp:8200,qfr:120110,qint:10764,qopf:120162,qprime:8279,qscr:120006,quaternions:8461,quatint:10774,quest:63,questeq:8799,quot:34,rAarr:8667,rArr:8658,rAtail:10524,rBarr:10511,rHar:10596,race:[8765,817],racute:341,radic:8730,raemptyv:10675,rang:10217,rangd:10642,range:10661,rangle:10217,raquo:187,rarr:8594,rarrap:10613,rarrb:8677,rarrbfs:10528,rarrc:10547,rarrfs:10526,rarrhk:8618,rarrlp:8620,rarrpl:10565,rarrsim:10612,rarrtl:8611,rarrw:8605,ratail:10522,ratio:8758,rationals:8474,rbarr:10509,rbbrk:10099,rbrace:125,rbrack:93,rbrke:10636,rbrksld:10638,rbrkslu:10640,rcaron:345,rcedil:343,rceil:8969,rcub:125,rcy:1088,rdca:10551,rdldhar:10601,rdquo:8221,rdquor:8221,rdsh:8627,real:8476,realine:8475,realpart:8476,reals:8477,rect:9645,reg:174,rfisht:10621,rfloor:8971,rfr:120111,rhard:8641,rharu:8640,rharul:10604,rho:961,rhov:1009,rightarrow:8594,rightarrowtail:8611,rightharpoondown:8641,rightharpoonup:8640,rightleftarrows:8644,rightleftharpoons:8652,rightrightarrows:8649,rightsquigarrow:8605,rightthreetimes:8908,ring:730,risingdotseq:8787,rlarr:8644,rlhar:8652,rlm:8207,rmoust:9137,rmoustache:9137,rnmid:10990,roang:10221,roarr:8702,robrk:10215,ropar:10630,ropf:120163,roplus:10798,rotimes:10805,rpar:41,rpargt:10644,rppolint:10770,rrarr:8649,rsaquo:8250,rscr:120007,rsh:8625,rsqb:93,rsquo:8217,rsquor:8217,rthree:8908,rtimes:8906,rtri:9657,rtrie:8885,rtrif:9656,rtriltri:10702,ruluhar:10600,rx:8478,sacute:347,sbquo:8218,sc:8827,scE:10932,scap:10936,scaron:353,sccue:8829,sce:10928,scedil:351,scirc:349,scnE:10934,scnap:10938,scnsim:8937,scpolint:10771,scsim:8831,scy:1089,sdot:8901,sdotb:8865,sdote:10854,seArr:8664,searhk:10533,searr:8600,searrow:8600,sect:167,semi:59,seswar:10537,setminus:8726,setmn:8726,sext:10038,sfr:120112,sfrown:8994,sharp:9839,shchcy:1097,shcy:1096,shortmid:8739,shortparallel:8741,shy:173,sigma:963,sigmaf:962,sigmav:962,sim:8764,simdot:10858,sime:8771,simeq:8771,simg:10910,simgE:10912,siml:10909,simlE:10911,simne:8774,simplus:10788,simrarr:10610,slarr:8592,smallsetminus:8726,smashp:10803,smeparsl:10724,smid:8739,smile:8995,smt:10922,smte:10924,smtes:[10924,65024],softcy:1100,sol:47,solb:10692,solbar:9023,sopf:120164,spades:9824,spadesuit:9824,spar:8741,sqcap:8851,sqcaps:[8851,65024],sqcup:8852,sqcups:[8852,65024],sqsub:8847,sqsube:8849,sqsubset:8847,sqsubseteq:8849,sqsup:8848,sqsupe:8850,sqsupset:8848,sqsupseteq:8850,squ:9633,square:9633,squarf:9642,squf:9642,srarr:8594,sscr:120008,ssetmn:8726,ssmile:8995,sstarf:8902,star:9734,starf:9733,straightepsilon:1013,straightphi:981,strns:175,sub:8834,subE:10949,subdot:10941,sube:8838,subedot:10947,submult:10945,subnE:10955,subne:8842,subplus:10943,subrarr:10617,subset:8834,subseteq:8838,subseteqq:10949,subsetneq:8842,subsetneqq:10955,subsim:10951,subsub:10965,subsup:10963,succ:8827,succapprox:10936,succcurlyeq:8829,succeq:10928,succnapprox:10938,succneqq:10934,succnsim:8937,succsim:8831,sum:8721,sung:9834,sup:8835,sup1:185,sup2:178,sup3:179,supE:10950,supdot:10942,supdsub:10968,supe:8839,supedot:10948,suphsol:10185,suphsub:10967,suplarr:10619,supmult:10946,supnE:10956,supne:8843,supplus:10944,supset:8835,supseteq:8839,supseteqq:10950,supsetneq:8843,supsetneqq:10956,supsim:10952,supsub:10964,supsup:10966,swArr:8665,swarhk:10534,swarr:8601,swarrow:8601,swnwar:10538,szlig:223,target:8982,tau:964,tbrk:9140,tcaron:357,tcedil:355,tcy:1090,tdot:8411,telrec:8981,tfr:120113,there4:8756,therefore:8756,theta:952,thetasym:977,thetav:977,thickapprox:8776,thicksim:8764,thinsp:8201,thkap:8776,thksim:8764,thorn:254,tilde:732,times:215,timesb:8864,timesbar:10801,timesd:10800,tint:8749,toea:10536,top:8868,topbot:9014,topcir:10993,topf:120165,topfork:10970,tosa:10537,tprime:8244,trade:8482,triangle:9653,triangledown:9663,triangleleft:9667,trianglelefteq:8884,triangleq:8796,triangleright:9657,trianglerighteq:8885,tridot:9708,trie:8796,triminus:10810,triplus:10809,trisb:10701,tritime:10811,trpezium:9186,tscr:120009,tscy:1094,tshcy:1115,tstrok:359,twixt:8812,twoheadleftarrow:8606,twoheadrightarrow:8608,uArr:8657,uHar:10595,uacute:250,uarr:8593,ubrcy:1118,ubreve:365,ucirc:251,ucy:1091,udarr:8645,udblac:369,udhar:10606,ufisht:10622,ufr:120114,ugrave:249,uharl:8639,uharr:8638,uhblk:9600,ulcorn:8988,ulcorner:8988,ulcrop:8975,ultri:9720,umacr:363,uml:168,uogon:371,uopf:120166,uparrow:8593,updownarrow:8597,upharpoonleft:8639,upharpoonright:8638,uplus:8846,upsi:965,upsih:978,upsilon:965,upuparrows:8648,urcorn:8989,urcorner:8989,urcrop:8974,uring:367,urtri:9721,uscr:120010,utdot:8944,utilde:361,utri:9653,utrif:9652,uuarr:8648,uuml:252,uwangle:10663,vArr:8661,vBar:10984,vBarv:10985,vDash:8872,vangrt:10652,varepsilon:1013,varkappa:1008,varnothing:8709,varphi:981,varpi:982,varpropto:8733,varr:8597,varrho:1009,varsigma:962,varsubsetneq:[8842,65024],varsubsetneqq:[10955,65024],varsupsetneq:[8843,65024],varsupsetneqq:[10956,65024],vartheta:977,vartriangleleft:8882,vartriangleright:8883,vcy:1074,vdash:8866,vee:8744,veebar:8891,veeeq:8794,vellip:8942,verbar:124,vert:124,vfr:120115,vltri:8882,vnsub:[8834,8402],vnsup:[8835,8402],vopf:120167,vprop:8733,vrtri:8883,vscr:120011,vsubnE:[10955,65024],vsubne:[8842,65024],vsupnE:[10956,65024],vsupne:[8843,65024],vzigzag:10650,wcirc:373,wedbar:10847,wedge:8743,wedgeq:8793,weierp:8472,wfr:120116,wopf:120168,wp:8472,wr:8768,wreath:8768,wscr:120012,xcap:8898,xcirc:9711,xcup:8899,xdtri:9661,xfr:120117,xhArr:10234,xharr:10231,xi:958,xlArr:10232,xlarr:10229,xmap:10236,xnis:8955,xodot:10752,xopf:120169,xoplus:10753,xotime:10754,xrArr:10233,xrarr:10230,xscr:120013,xsqcup:10758,xuplus:10756,xutri:9651,xvee:8897,xwedge:8896,yacute:253,yacy:1103,ycirc:375,ycy:1099,yen:165,yfr:120118,yicy:1111,yopf:120170,yscr:120014,yucy:1102,yuml:255,zacute:378,zcaron:382,zcy:1079,zdot:380,zeetrf:8488,zeta:950,zfr:120119,zhcy:1078,zigrarr:8669,zopf:120171,zscr:120015,zwj:8205,zwnj:8204},pc=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];function yc(e){return e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function wc(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var hc={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},Wf=/&(?:#(\d+);?|#[xX]([0-9a-fA-F]+);?|([a-zA-Z][a-zA-Z0-9]*)(;?))/g,mc=new Map(Object.entries(dc)),Kf=new Set(pc);function Gt(e){return e.indexOf("&")===-1?e:e.replace(Wf,(t,r,n,o,s,i)=>r!==void 0?bc(parseInt(r,10)):n!==void 0?bc(parseInt(n,16)):zf(t,o,s===";",e[i+t.length]))}function zf(e,t,r,n){if(r){let o=mc.get(t);return o===void 0?e:gc(o)}return!Kf.has(t)||n==="="?e:gc(mc.get(t))}function gc(e){return typeof e=="number"?String.fromCodePoint(e):String.fromCodePoint(...e)}function bc(e){return e===0||e>1114111||e>=55296&&e<=57343?"\uFFFD":hc[e]!==void 0?String.fromCodePoint(hc[e]):String.fromCodePoint(e)}var Gf=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Wr(e){return Gf.has(e.toLowerCase())}function ti(e){return e==="script"||e==="style"}function Yf(e){return e==="textarea"||e==="title"}function co(e){return ti(e)||Yf(e)||e==="iframe"||e==="xmp"||e==="noembed"||e==="noframes"||e==="plaintext"}et();var ri=0,ni=1,oi=2,si=3,Be=4,ii=0,lo=1,ai=2,ci=3,Jf=4,Sc=new WeakMap,Xf=0;function xc(e){let t=Sc.get(e);return t===void 0&&(t=vc(e),Sc.set(e,t)),t}function uo(e){return vc([e])}var mt=/\s/,_c=/[a-zA-Z]/,Ac=/[\s/>]/,Zf=/^\?$/,Qf=new Set(["tag-name","in-tag","attr-name","after-name","after-eq","attr-quoted","attr-unquoted"]);function vc(e){Xf+=1;let t=[],r="",n=()=>{r&&(t.push({t:ri,s:r}),r="")},o="text",s="",i=0,a="",c=0,l="",u=null,f=-1,p=0,b=!1,h="",y=!1,g=!1,w=!1,m="",_="",E=()=>{u&&(u.tag=l,u=null)},C=V=>{let F=r.slice(p);r=r.slice(0,p),n(),t.push({t:si,tag:V,text:F}),o="text"},J=V=>{let F=b,$=F?"/>":">";r=r.slice(0,r.length-$.length),n(),t.push({t:oi,selfClose:F,close:$}),b=!1,s="";let d=l;if(ti(d)&&V){o="rawtext",h="",y=!1,g=!1,w=!1;return}if(!F&&co(d)){o="textonly",m=d,_="";return}o="text"};for(let V=0;V<e.length;V++){let F=e[V];for(let $=0;$<F.length;$++){let d=F[$];switch(o){case"text":d==="<"&&(n(),o="tag-open"),r+=d;break;case"tag-open":d==="!"?(r+=d,o="bang-1"):Zf.test(d)?(r+=d,o="bogus"):d==="/"?(r+=d,o="close-open"):_c.test(d)?(r=r.slice(0,-1),n(),u={t:ni,tag:""},f=t.length,t.push(u),r="<"+d,l=d.toLowerCase(),o="tag-name"):(r+=d,o="text");break;case"close-open":_c.test(d)?(p=r.length-2,r+=d,l=d.toLowerCase(),o="close-name"):(r+=d,o=d===">"?"text":"bogus");break;case"close-name":r+=d,d===">"?C(l):mt.test(d)||d==="/"?o="close-tail":l+=d.toLowerCase();break;case"close-tail":r+=d,d===">"&&C(l);break;case"bang-1":r+=d,o=d==="-"?"bang-dash":"bogus";break;case"bang-dash":r+=d,o=d==="-"?"comment-start":"bogus";break;case"bogus":r+=d,d===">"&&(o="text");break;case"comment-start":r+=d,d===">"?o="text":d==="-"?o="comment-start-dash":(o="comment",c=0);break;case"comment-start-dash":r+=d,d===">"?o="text":d==="-"?(o="comment",c=2):(o="comment",c=0);break;case"comment":r+=d,d==="-"?c+=1:d===">"&&c>=2?(o="text",c=0):d==="!"&&c>=2?o="comment-bang":c=0;break;case"comment-bang":r+=d,d===">"?(o="text",c=0):(o="comment",c=d==="-"?1:0);break;case"tag-name":r+=d,d===">"?(E(),J(!0)):mt.test(d)?(E(),o="in-tag"):d==="/"?(E(),b=!0,o="in-tag"):l+=d.toLowerCase();break;case"in-tag":r+=d,d===">"?J(!0):d==="/"?b=!0:mt.test(d)?b=!1:(b=!1,o="attr-name",s=d,i=r.length-1);break;case"attr-name":d==="="?(o="after-eq",r+=d):mt.test(d)?(o="after-name",r+=d):d==="/"?(o="in-tag",s="",b=!0,r+=d):d===">"?(r+=d,J(!1)):(s+=d,r+=d);break;case"after-name":r+=d,d==="="?o="after-eq":mt.test(d)||(d===">"?J(!0):d==="/"?(o="in-tag",s="",b=!0):(o="attr-name",s=d,i=r.length-1));break;case"after-eq":d==='"'||d==="'"?(o="attr-quoted",a=d,r+=d):mt.test(d)?r+=d:d===">"?(r+=d,J(!1)):(o="attr-unquoted",r+=d);break;case"attr-unquoted":mt.test(d)?(o="in-tag",s="",r+=d):d===">"?(r+=d,J(!1)):r+=d;break;case"attr-quoted":r+=d,d===a&&(o="in-tag",s="");break;case"rawtext":{r+=d;let kt=d.toLowerCase();l==="script"?(w&&(w=!1,Ac.test(d)&&y&&(g=!0)),h=(h+kt).slice(-9),h.endsWith("<!--")?y||(y=!0):h.endsWith("-->")||h.endsWith("--!>")?(y=!1,g=!1):h.endsWith("<script")?w=!0:h.endsWith("<\/script>")&&(g?g=!1:(p=r.length-9,C("script"),h="",l=""))):(h=(h+kt).slice(-8),h.endsWith("</style>")&&(p=r.length-8,C("style"),h="",l=""));break}case"textonly":if(_==="</"+m&&Ac.test(d)){p=r.length-_.length,r+=d,l=m,m="",_="",d===">"?C(l):o="close-tail";break}r+=d,m!=="plaintext"&&(_=(_+d.toLowerCase()).slice(-(m.length+2)));break}}if(V<e.length-1)if(o==="comment"||o==="comment-start"||o==="comment-start-dash"||o==="comment-bang")n(),t.push({t:Be,k:lo}),c=0,o="comment";else if(o==="rawtext")n(),t.push({t:Be,k:lo}),h="",w=!1;else if(o==="text"||o==="textonly")n(),t.push({t:Be,k:ii}),_="";else if(o==="after-eq"){let $=s[0],d=hr[$],kt=r.slice(i);r=r.slice(0,i),n(),t.push({t:Be,k:ai,kind:d===void 0?"plain":d,name:d===void 0?s:s.slice(1),tag:l,lead:kt}),o="in-tag",s=""}else o==="attr-quoted"||o==="attr-unquoted"?(n(),t.push({t:Be,k:ci,name:s,tag:l})):(n(),t.push({t:Be,k:Jf}),p=0)}return u&&(u.tag=l),f!==-1&&Qf.has(o)&&t.splice(f,1),n(),t}tt();function Ec(){return typeof process<"u"&&process.env&&!0}function li(e){let t=e&&typeof e.message=="string"?e.message:"",r=/^(\w+) is not defined\b/.exec(t);return e instanceof ReferenceError&&r&&ed.has(r[1])?`\`${r[1]}\` is a browser-only global and is undefined during SSR.`:(r=/\.(\w+) is not a function\b/.exec(t),e instanceof TypeError&&r&&td.has(r[1])?`\`${r[1]}\` is an HTMLElement method that does not exist on the server-side component instance during SSR.`:null)}var ed=new Set(["document","window","localStorage","sessionStorage","navigator","matchMedia","requestAnimationFrame","getComputedStyle","IntersectionObserver","MutationObserver","ResizeObserver"]),td=new Set(["attachShadow","querySelector","querySelectorAll","getBoundingClientRect","focus","blur","scrollIntoView"]);function Kr(e,t,r){if(!(r===void 0?!Ec():!!r))return"";let o=t&&t.message?t.message:String(t);return Jo`<div data-webjs-error="${e}" style="border:1px solid #f5c2c7;background:#f8d7da;color:#842029;padding:8px 12px;border-radius:6px;font:13px/1.4 system-ui,sans-serif">
3
6
  <strong>&lt;${e}&gt; failed to render</strong>
4
7
  <div style="margin-top:4px;white-space:pre-wrap">${o}</div>
5
- </div>`}async function P(e,t){if(e==null||e===!1||e===!0)return"";if(e&&typeof e.then=="function")return e=await e,P(e,t);if(Xt(e))return String(e.value??"");if(J(e))return P(e.value,t);if(mt(e))return P(e.signal.get(),t);if(lt(e))return P(e.value,t);if(ut(e))return P(e.fn(),t);if(Qt(e)){let r=e.template;return String(r?.innerHTML??"")}if(ft(e))return"";if(dt(e))return P(e.value,t);if(pt(e)){let r=e.args;for(let n of r)if(!n||typeof n.then!="function")return P(n,t);if(r.length>0)try{let n=await Promise.race(r.map(o=>Promise.resolve(o).catch(()=>{})));return P(n,t)}catch{return""}return""}if(er(e)||tr(e))return"";if(Array.isArray(e))return(await Promise.all(e.map(n=>P(n,t)))).join("");if(ct(e)){let r=e;return(await Promise.all(r.items.map((o,i)=>P(r.templateFn(o,i),t)))).join("")}if(wo(e)){let r=e,n=await P(r.fallback,t);if(t){let o=`s${t.nextId++}`;return t.pending.push({id:o,promise:Promise.resolve(r.children)}),`<webjs-boundary id="${o}">${n}</webjs-boundary>`}return n}return K(e)?yc(e,t):Kn(String(e))}async function yc(e,t){let{strings:r,values:n}=e,o="",i="text",s="",a=0,c="",l=0,u="",f="",d=-1,p=null,m=null,y=0,g=[],S=[],b=()=>{let k=g,N=S,_=y>1,h=m;if(g=[],S=[],y=0,m=null,p!=null){qr({duplicateAction:_,propAttrs:k});let w=mi(o.slice(d),p);o=o.slice(0,d)+w.tag+w.hidden,p=null}h!=null&&(o=o.slice(0,d)+gi(o.slice(d),h,{duplicateAction:_,propAttrs:N}))},E=(k,N)=>{let _=String(N).toLowerCase();if(_==="button"||_==="input"){Jt(k)&&S.push(String(k));return}if(_!=="form")return;let h=String(k).toLowerCase();h==="encoding"&&(h="enctype"),(h==="method"||h==="enctype")&&g.push(String(k))},x=(k,N)=>{let _=String(N).toLowerCase(),h=String(k).toLowerCase();(_==="form"&&h==="action"||(_==="button"||_==="input")&&h==="formaction")&&(y+=1)},v=k=>{b(),i=k&&So(u)?"rawtext":"text",i==="rawtext"&&(f="")};for(let k=0;k<r.length;k++){let N=r[k];for(let _=0;_<N.length;_++){let h=N[_];switch(i){case"text":o+=h,h==="<"&&(i="tag-open",d=o.length-1);break;case"tag-open":o+=h,h==="!"?i="bang-1":h==="/"?(i="tag-name",u=""):/[a-zA-Z]/.test(h)?(i="tag-name",u=h.toLowerCase()):i="text";break;case"bang-1":o+=h,i=h==="-"?"bang-dash":"tag-name";break;case"bang-dash":o+=h,h==="-"?(i="comment",l=0):i="tag-name";break;case"comment":o+=h,h==="-"?l+=1:(h===">"&&l>=2&&(i="text"),l=0);break;case"tag-name":o+=h,h===">"?v(!0):/\s/.test(h)?i="in-tag":u+=h.toLowerCase();break;case"in-tag":o+=h,h===">"?v(!0):!/\s/.test(h)&&h!=="/"&&(i="attr-name",s=h,a=o.length-1);break;case"rawtext":o+=h,f=(f+h.toLowerCase()).slice(-9),(f.endsWith("<\/script>")||f.endsWith("</style>"))&&(i="text",f="",u="");break;case"attr-name":h==="="?(i="after-eq",o+=h):/\s/.test(h)?(i="in-tag",s="",o+=h):h===">"?(i="text",s="",o+=h,v(!1)):(s+=h,o+=h);break;case"after-eq":h==='"'||h==="'"?(i="attr-quoted",c=h,o+=h):/\s/.test(h)?(i="in-tag",s="",o+=h):h===">"?(i="text",s="",o+=h,v(!1)):(i="attr-unquoted",o+=h);break;case"attr-unquoted":/\s/.test(h)?(i="in-tag",s="",o+=h):h===">"?(i="text",s="",o+=h,v(!1)):o+=h;break;case"attr-quoted":o+=h,h===c&&(i="in-tag",s="");break}}if(k<n.length){let _=n[k];if(_&&typeof _.then=="function"&&(_=await _),J(_)&&(_=_.value),i==="comment")o+=String(_??""),l=0;else if(i==="rawtext")o+=String(_??""),f="";else if(i==="text")o+=await P(_,t);else if(i==="after-eq"){let h=s[0],w=s.slice(1),I=Vt[h];if(I==="event")o=o.slice(0,a),i="in-tag",s="";else if(I==="prop"){if(o=o.slice(0,a),u==="webjs-suspense"&&w==="fallback"){let A=await P(_,t);o+=`data-webjs-fallback="${U(A)}"`,i="in-tag",s="";continue}if(!u.includes("-")){Ir(_,w,u),E(w,u),i="in-tag",s="";continue}if(_===void 0){i="in-tag",s="";continue}try{let A=await Qr(_);o+=`data-webjs-prop-${gc(w)}="${U(A)}"`}catch(A){console.warn(`[webjs] property binding .${w} has an unserializable value during SSR. Dropping. The browser will see the property as undefined. Detail: ${A&&A.message}`)}i="in-tag",s=""}else if(I==="bool")ae(_,w,u),o=o.slice(0,a),_&&(o+=`${w}=""`),i="in-tag",s="";else if(at(_,s,u)){if(x(s,u),u==="form")p=Be(await Pr(_),u),o=o.slice(0,a).replace(/\s+$/,"");else{Yt(m!=null,u);let A=Zt(o.slice(d));A.has("name")&&Kt(A.get("name")||"",u,!1),A.has("value")&&zt(u),A.has("form")&&Gt(u);let C=Be(await Pr(_),u);m=u,o=o.slice(0,a)+`name="${B}" value="${U(C)}"`}i="in-tag",s=""}else{x(s,u),ae(_,s,u);let A=Fe(s,_);A===null?o=o.slice(0,a):o+=`"${U(A)}"`,i="in-tag",s=""}}else(i==="attr-quoted"||i==="attr-unquoted")&&(ae(_,s,u),o+=U(String(_??"")))}}return o}async function ne(e,t,r){if(!(e==null||e===!1||e===!0)){if(e&&typeof e.then=="function")return e=await e,ne(e,t,r);if(Xt(e)){r.enqueue(String(e.value??""));return}if(J(e))return ne(e.value,t,r);if(mt(e))return ne(e.signal.get(),t,r);if(lt(e))return ne(e.value,t,r);if(ut(e))return ne(e.fn(),t,r);if(Qt(e)){let n=e.template;r.enqueue(String(n?.innerHTML??""));return}if(!ft(e)){if(dt(e))return ne(e.value,t,r);if(pt(e)){let n=e.args;for(let o of n)if(!o||typeof o.then!="function")return ne(o,t,r);if(n.length>0)try{let o=await Promise.race(n.map(i=>Promise.resolve(i).catch(()=>{})));return ne(o,t,r)}catch{return}return}if(!(er(e)||tr(e))){if(Array.isArray(e)){for(let n of e)await ne(n,t,r);return}if(ct(e)){let n=e;for(let o=0;o<n.items.length;o++)await ne(n.templateFn(n.items[o],o),t,r);return}if(wo(e)){let n=e;if(t){let o=`s${t.nextId++}`;r.enqueue(`<webjs-boundary id="${o}">`),await ne(n.fallback,t,r),r.enqueue("</webjs-boundary>"),t.pending.push({id:o,promise:Promise.resolve(n.children)})}else await ne(n.fallback,t,r);return}if(K(e)){await wc(e,t,r);return}r.enqueue(Kn(String(e)))}}}}async function wc(e,t,r){let{strings:n,values:o}=e,i="text",s="",a=0,c="",l=0,u="",f="",d="",p=-1,m=null,y=0,g=[],S=[],b=null,E=()=>{let N=g,_=S,h=y>1,w=b;if(g=[],S=[],y=0,b=null,m!=null){qr({duplicateAction:h,propAttrs:N});let I=mi(d.slice(p),m);d=d.slice(0,p)+I.tag+I.hidden,m=null}w!=null&&(d=d.slice(0,p)+gi(d.slice(p),w,{duplicateAction:h,propAttrs:_}))},x=(N,_)=>{let h=String(_).toLowerCase();if(h==="button"||h==="input"){Jt(N)&&S.push(String(N));return}if(h!=="form")return;let w=String(N).toLowerCase();w==="encoding"&&(w="enctype"),(w==="method"||w==="enctype")&&g.push(String(N))},v=(N,_)=>{let h=String(_).toLowerCase(),w=String(N).toLowerCase();(h==="form"&&w==="action"||(h==="button"||h==="input")&&w==="formaction")&&(y+=1)},k=N=>{E(),i=N&&So(u)?"rawtext":"text",i==="rawtext"&&(f="")};for(let N=0;N<n.length;N++){let _=n[N];for(let h=0;h<_.length;h++){let w=_[h];switch(i){case"text":d+=w,w==="<"&&(i="tag-open",p=d.length-1);break;case"tag-open":d+=w,w==="!"?i="bang-1":w==="/"?(i="tag-name",u=""):/[a-zA-Z]/.test(w)?(i="tag-name",u=w.toLowerCase()):i="text";break;case"bang-1":d+=w,i=w==="-"?"bang-dash":"tag-name";break;case"bang-dash":d+=w,w==="-"?(i="comment",l=0):i="tag-name";break;case"comment":d+=w,w==="-"?l+=1:(w===">"&&l>=2&&(i="text"),l=0);break;case"tag-name":d+=w,w===">"?k(!0):/\s/.test(w)?i="in-tag":u+=w.toLowerCase();break;case"in-tag":d+=w,w===">"?k(!0):!/\s/.test(w)&&w!=="/"&&(i="attr-name",s=w,a=d.length-1);break;case"rawtext":d+=w,f=(f+w.toLowerCase()).slice(-9),(f.endsWith("<\/script>")||f.endsWith("</style>"))&&(i="text",f="",u="");break;case"attr-name":w==="="?(i="after-eq",d+=w):/\s/.test(w)?(i="in-tag",s="",d+=w):w===">"?(i="text",s="",d+=w,k(!1)):(s+=w,d+=w);break;case"after-eq":w==='"'||w==="'"?(i="attr-quoted",c=w,d+=w):/\s/.test(w)?(i="in-tag",s="",d+=w):w===">"?(i="text",s="",d+=w,k(!1)):(i="attr-unquoted",d+=w);break;case"attr-unquoted":/\s/.test(w)?(i="in-tag",s="",d+=w):w===">"?(i="text",s="",d+=w,k(!1)):d+=w;break;case"attr-quoted":d+=w,w===c&&(i="in-tag",s="");break}}if(N<o.length){let h=o[N];if(h&&typeof h.then=="function"&&(h=await h),J(h)&&(h=h.value),i==="comment")d+=String(h??""),l=0;else if(i==="rawtext")d+=String(h??""),f="";else if(i==="text")d&&(r.enqueue(d),d=""),await ne(h,t,r);else if(i==="after-eq"){let w=s[0],I=s.slice(1),A=Vt[w];if(A==="event"||A==="prop")A==="prop"&&!u.includes("-")&&(Ir(h,I,u),x(I,u)),d=d.slice(0,a),i="in-tag",s="";else if(A==="bool")ae(h,I,u),d=d.slice(0,a),h&&(d+=`${I}=""`),i="in-tag",s="";else if(at(h,s,u)){if(v(s,u),u==="form")m=Be(await Pr(h),u),d=d.slice(0,a).replace(/\s+$/,"");else{Yt(b!=null,u);let C=Zt(d.slice(p));C.has("name")&&Kt(C.get("name")||"",u,!1),C.has("value")&&zt(u),C.has("form")&&Gt(u);let W=Be(await Pr(h),u);b=u,d=d.slice(0,a)+`name="${B}" value="${U(W)}"`}i="in-tag",s=""}else{v(s,u),ae(h,s,u);let C=Fe(s,h);C===null?d=d.slice(0,a):d+=`"${U(C)}"`,i="in-tag",s=""}}else(i==="attr-quoted"||i==="attr-unquoted")&&(ae(h,s,u),d+=U(String(h??"")))}}d&&r.enqueue(d)}var jf,Pf,xo=T(()=>{Ht();Wt();st();Ce();Mr();hs();rr();kt();_o();Ao();jf=new Set(["document","window","localStorage","sessionStorage","navigator","matchMedia","requestAnimationFrame","getComputedStyle","IntersectionObserver","MutationObserver","ResizeObserver"]),Pf=new Set(["attachShadow","querySelector","querySelectorAll","getBoundingClientRect","focus","blur","scrollIntoView"])});var qc={};ai(qc,{observeLazy:()=>Zf,observeViewportOnce:()=>ed});function Ic(e){let t=xs.get(e);return t||(t=import(e).finally(()=>xs.delete(e)),xs.set(e,t),t)}function Zf(e){for(let[t,r]of Object.entries(e))Je.set(t.toLowerCase(),r);if(typeof IntersectionObserver>"u"){for(let t of Je.values())Ic(t);Je.clear();return}sn||(sn=new IntersectionObserver(Xf,{rootMargin:"200px"})),Pc(),!As&&typeof MutationObserver<"u"&&(As=new MutationObserver(()=>Pc()),As.observe(document.body,{childList:!0,subtree:!0}))}function Pc(){if(!(!sn||!Je.size))for(let e of Je.keys()){if(customElements.get(e)){Je.delete(e);continue}for(let t of document.querySelectorAll(e))sn.observe(t)}}function Xf(e){for(let t of e){if(!t.isIntersecting)continue;let r=t.target.tagName.toLowerCase(),n=Je.get(r);n&&(Ic(n),Je.delete(r),sn?.unobserve(t.target))}}function Qf(e){for(let t of e){if(!t.isIntersecting)continue;let r=vo.get(t.target);vo.delete(t.target),on?.unobserve(t.target),r&&r()}}function ed(e,t){return typeof IntersectionObserver>"u"?(t(),()=>{}):(on||(on=new IntersectionObserver(Qf,{rootMargin:"200px"})),vo.set(e,t),on.observe(e),()=>{vo.delete(e),on?.unobserve(e)})}var Je,sn,As,xs,on,vo,Mc=T(()=>{Je=new Map,sn=null,As=null,xs=new Map;on=null,vo=new WeakMap});var vs,Es=T(()=>{vs=typeof HTMLElement<"u"?class extends HTMLElement{constructor(){super(),this._webjsLoadedSrc=null,this._webjsLazyTeardown=null}static get observedAttributes(){return["src"]}connectedCallback(){this._webjsScheduleLoad()}disconnectedCallback(){this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null)}attributeChangedCallback(t,r,n){t==="src"&&this.isConnected&&this._webjsScheduleLoad()}_webjsScheduleLoad(){let t=this.getAttribute("src");if(!t){this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null),this._webjsLoadedSrc=null;return}let r=t;try{r=new URL(t,location.href).href}catch{}if(r===this._webjsLoadedSrc)return;this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null),(this.getAttribute("loading")||"eager").toLowerCase()==="lazy"?(this._webjsLoadedSrc=r,Promise.resolve().then(()=>(Mc(),qc)).then(({observeViewportOnce:o})=>{this._webjsLoadedSrc!==r||!this.isConnected||(this._webjsLazyTeardown=o(this,()=>{this._webjsLazyTeardown=null,this._webjsLoad(r)}))})):(this._webjsLoadedSrc=r,this._webjsLoad(r))}_webjsLoad(t){Promise.resolve().then(()=>(Ts(),Dc)).then(({loadFrame:r})=>{this._webjsLoadedSrc!==t||!this.isConnected||r(this,t)})}}:null;typeof customElements<"u"&&vs&&!customElements.get("webjs-frame")&&customElements.define("webjs-frame",vs)});function rd(e,t,r){switch(e){case"append":r&&t.append(r);break;case"prepend":r&&t.prepend(r);break;case"before":r&&t.before(r);break;case"after":r&&t.after(r);break;case"replace":r&&t.replaceWith(r);break;case"update":r&&t.replaceChildren(r);break;case"remove":t.remove();break;default:break}}function Ns(e,t){let r=t||(typeof document<"u"?document:null);if(!r)return;let n=null;if(typeof e=="string"){let i=r.createElement("template");i.innerHTML=e,n=i.content}else if(e&&e.nodeType)n=e;else return;let o=n.querySelectorAll?Array.from(n.querySelectorAll("webjs-stream")):[];if(o.length)for(let i of o)r.body.append(i);else r.body.append(n)}var td,ks,an=T(()=>{td=new Set(["append","prepend","before","after","replace","update"]);ks=typeof HTMLElement<"u"?class extends HTMLElement{connectedCallback(){this._webjsApplied||(this._webjsApplied=!0,this._webjsApply())}_webjsApply(){let t=(this.getAttribute("action")||"").toLowerCase(),r=this.ownerDocument||document,n=[],o=this.getAttribute("target");if(o){let s=r.getElementById(o);s&&(n=[s])}else{let s=this.getAttribute("targets");if(s)try{n=Array.from(r.querySelectorAll(s))}catch{n=[]}}let i=td.has(t)?this.querySelector("template"):null;try{for(let s of n){let a=i?i.content.cloneNode(!0):null;rd(t,s,a)}}finally{this.remove()}}}:null;typeof customElements<"u"&&ks&&!customElements.get("webjs-stream")&&customElements.define("webjs-stream",ks)});var $c,Fc=T(()=>{$c=typeof HTMLElement<"u"?class extends HTMLElement{connectedCallback(){this.style.display||(this.style.display="contents")}}:null;typeof customElements<"u"&&$c&&!customElements.get("webjs-suspense")&&customElements.define("webjs-suspense",$c)});function Eo(e,t){let r=typeof document<"u"?document:null,n=e||r;if(!n||typeof n.querySelectorAll!="function")return;if(t&&t.frame===!0){Cs(n,!0);return}Uc();let o=n===r,i=!!r&&!o&&typeof r.contains=="function"&&r.contains(n),s=!!r&&!o&&!i;s&&(Cs(r,!0),Ze.clear(),Ls.clear()),(o||s)&&(Rs=!0);let a=Y.ingested+Y.replaced;id(Cs(n),a)}function Cs(e,t){let r=null;for(let n of e.querySelectorAll('script[type="application/json"]#__webjs-seeds, script[type="application/json"][data-webjs-seeds]')){let o=od(n.getAttribute?.("data-webjs-dev"));o!==null&&(r=o),Bc(t?null:n.textContent,n)}for(let n of e.querySelectorAll("[data-webjs-seed]"))Bc(t?null:n.getAttribute("data-webjs-seed"),n,()=>n.removeAttribute("data-webjs-seed"));return r}function Bc(e,t,r){if(e)try{let n=Le(e);if(n&&typeof n=="object")for(let o in n){Ze.has(o)?Y.replaced++:Y.ingested++,Ze.set(o,n[o]);let i=o.indexOf("/",o.indexOf("/")+1);i>0&&Ls.add(o.slice(0,i))}}catch{}r?r():t.remove?.()}function od(e){return typeof e!="string"?null:e||"ok"}function id(e,t){if(e===null)return;let r=++nd;pr={epoch:r,hits:Y.hits,misses:Y.misses,keyMisses:Y.keyMisses,merged:t,marker:e};let n=()=>{!pr||pr.epoch!==r||Uc()};try{typeof requestIdleCallback=="function"?requestIdleCallback(n,{timeout:1e3}):setTimeout(n,250)}catch{pr=null}}function Uc(){let e=pr;if(pr=null,!!e)try{sd(e)}catch{}}function sd(e){let t=Y.hits-e.hits,r=Y.misses-e.misses,n=Y.ingested+Y.replaced-e.merged,o=Y.keyMisses-e.keyMisses;if(r===0)return;let i=e.marker==="streamed"?"This page streams (a Suspense or <webjs-suspense> boundary), and a streamed render emits no seeds, so every action call on it goes to the network.":e.marker==="drop"?"The page's seeds could not be serialized, so the whole block was dropped. Something an action returned is not serializer-safe; the server response reports collected above emitted.":o===0?null:"The key is the action file hash plus the function name plus the serialized arguments, so an argument the SSR render never used misses (a deliberate refetch after hydration misses too, and is expected). A miss on an action this page never seeded is NOT counted here, because a mutation or a client-only read could never have been seeded.";if(i===null)return;let a=e.marker==="streamed"||e.marker==="drop"?`${r} of ${t+r} action call(s) in the hydration window went to the network`:`${o} action call(s) in the hydration window asked for a key this page seeded under DIFFERENT arguments`;console.warn(`[webjs] SSR action seeding: ${a} (${n} seed(s) on this page, ${Ze.size} still unconsumed). ${i} See https://webjs.dev/docs/data-fetching for the seeding reference.`)}function ad(e,t,r){Rs||(Rs=!0,Eo());let n=`${e}/${t}/${r}`;if(Ze.has(n)){let o=Ze.get(n);return Ze.delete(n),Y.hits++,o}return Y.misses++,Ls.has(`${e}/${t}`)&&Y.keyMisses++,Hc}function cd(){return{...Y,pending:Ze.size}}var Ze,Hc,Rs,Y,Ls,pr,nd,To=T(()=>{kt();Ze=new Map,Hc=Symbol("webjs.seed.miss"),Rs=!1,Y={ingested:0,replaced:0,hits:0,misses:0,keyMisses:0},Ls=new Set,pr=null,nd=0});function Os(e){if(!(!Array.isArray(e)||!e.length)){ko+=1;for(let t of e)t&&Vc.set(t,ko)}}function ud(){return ko}function fd(e,t,r){if(!(!Array.isArray(t)||!t.length)&&(mr.delete(e),mr.set(e,{tags:t.slice(),since:typeof r=="number"?r:ko}),mr.size>ld)){let n=mr.keys().next().value;n!==void 0&&mr.delete(n)}}function dd(e){let t=mr.get(e);if(!t)return!1;for(let r of t.tags)if((Vc.get(r)||0)>t.since)return!0;return!1}function js(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}var ko,Vc,mr,ld,No=T(()=>{ko=0,Vc=new Map,mr=new Map,ld=1e3});function Wc(e){return hr.test(e)}var Ps,Is,hr,cn,Rt,je,Co,Kc,Q=T(()=>{Ps="text/vnd.webjs-stream.html",Is=["wheel","touchmove","keydown","pointerdown"],hr=/\.(?:pdf|zip|tar|gz|7z|rar|dmg|exe|msi|deb|rpm|apk|ipa|xlsx?|docx?|pptx?|csv|odt|ods|odp|rtf|epub|mobi|xml|json|rss|atom|txt|md|wasm|mp3|mp4|mov|avi|webm|ogg|flac|wav|m4a|m4v|mkv|png|jpe?g|gif|webp|avif|bmp|ico|svg|tiff?|heic)$/i,cn="_top",Rt="webjs:nav-fallback",je=new Set(["value","checked","selected","indeterminate","disabled","open","popover"]),Co="name=csp-nonce";Kc=250});function Xe(e,t,r="warn"){if(qs.has(e)||(qs.add(e),typeof console>"u"))return;let n=r==="error"?console.error:console.warn;n&&n.call(console,t)}function Gc(e,t,r,n){if(typeof process<"u"&&process.env||!n.has(B))return;let o="";try{o=new URL(e.getAttribute("action")||location.href,location.href).pathname}catch{o=location.pathname}if(r!=="post"){Xe(`submit-nowhere:${o}:${r}`,`[webjs] this submission carries a bound server action's identity but submits as ${r.toUpperCase()}, which sends no body, so the identity rides the query string and the action never runs. A submitter's own formmethod overrides the form's, and WebJs honours it rather than refusing it, so check for a formmethod on the button that was pressed.`,"error");return}let i=t&&t.getAttribute("formenctype")||e.getAttribute("enctype")||"application/x-www-form-urlencoded";if(i.toLowerCase()==="text/plain"){Xe(`submit-nowhere:${o}:${i}`,`[webjs] this submission carries a bound server action's identity but declares enctype="${i}", which the server cannot parse. The router declines to send it so both paths behave the same way, and both are answered with a 405. Drop the enctype and let the binding supply it.`,"error");return}o&&o!==location.pathname&&Xe(`submit-elsewhere:${o}`,`[webjs] this submission carries a bound server action's identity but posts to "${o}" rather than this page, because the enclosing <form> declares its own action. A bound submitter emits no formaction, so the form's target wins, which is what native HTML does. The action runs only if "${o}" is a page route; against a route.ts or another origin the identity is ignored and nothing runs. Drop the form's action attribute to keep the submission on this page.`)}function Ds(e,t){return!e&&!t&&typeof document<"u"&&document.readyState==="loading"}function Ro(e,t,r,n){if(e!=="navigate"||!t||n&&n===r)return!1;try{return new URL(t).origin===new URL(r).origin}catch{return!1}}function Yc(){if(typeof location>"u"||zc)return;zc=!0;let e=null;try{e=sessionStorage.getItem(Rt),sessionStorage.removeItem(Rt)}catch{}let t="";try{let r=performance.getEntriesByType("navigation")[0];t=r?r.type:""}catch{}Ro(t,document.referrer,location.href,e)&&he("pre-boot-navigation",location.href,!1)}function he(e,t,r=!0){if(r)try{sessionStorage.setItem(Rt,t)}catch{}if(typeof document<"u"&&typeof CustomEvent<"u")try{document.dispatchEvent(new CustomEvent("webjs:navigation-fallback",{detail:{cause:e,href:t,willReload:r}}))}catch{}typeof process<"u"&&process.env||Xe(`fallback:${e}`,r?`[webjs] client router fell back to a full page load (${e}) navigating to ${t}. This is correct (no DOM corruption), just not a soft nav.`:`[webjs] client router degraded a soft navigation (${e}) for ${t}, without a full page load.`)}function Jc(e){typeof process<"u"&&process.env||Xe(`stream-drop:${e}`,`[webjs] dropped a streamed Suspense resolve for "${e}": no #${e} boundary in the DOM. Benign if this navigation was superseded or degraded. A stuck skeleton here means the shell swap did not place the boundary.`)}function Zc(){if(typeof process<"u"&&process.env||Ms||typeof document>"u"||typeof getComputedStyle!="function")return;let e=document.documentElement;if(!e)return;Ms=!0;let t;try{t=getComputedStyle(e).scrollBehavior}catch{return}t==="smooth"&&Xe("scroll-behavior-smooth-html","[webjs] Detected `scroll-behavior: smooth` on <html>. The client router scrolls to the top instantly on navigation (like a native page load), so route transitions are not affected by it. It still applies to in-page #anchor links. Pairing it with a sticky `backdrop-filter` header can also flash on iOS during navigation.")}function ln(e){if(typeof document>"u")return;let t=document.documentElement;if(!(!t||!t.hasAttribute("data-webjs-nav-progress")))try{e?t.setAttribute("data-navigating",""):t.removeAttribute("data-navigating")}catch{}}function Xc(){qs.clear(),Ms=!1}function Qc(e,t){return Ds(e,t)}var qs,zc,Ms,ge=T(()=>{Ce();Q();qs=new Set;zc=!1;Ms=!1});function be(e){let t=new Map,r=[],n=!1;function o(i){if(!n){if(i.nodeType===8){let s=i.data.trim();if(s.startsWith("wj:children:")){let a=s.slice(12),c=a.lastIndexOf(":");if(c<=0||c===a.length-1){n=!0;return}let l=a.slice(0,c),u=a.slice(c+1);if(t.has(l)||r.some(f=>f.segment===l)){n=!0;return}r.push({segment:l,routeKey:u,start:i});return}if(s.startsWith("/wj:children")){let a=s.slice(12).replace(/^:/,""),c=r.pop();if(!c||c.segment!==a){n=!0;return}if(c.start.parentNode!==i.parentNode){n=!0;return}{let l=c.start.parentNode.tagName;if(l==="TABLE"||l==="TBODY"||l==="THEAD"||l==="TFOOT"||l==="TR"){n=!0;return}}t.set(c.segment,{routeKey:c.routeKey,start:c.start,end:i});return}return}if(i.hasChildNodes&&i.hasChildNodes())for(let s=i.firstChild;s&&!n;s=s.nextSibling)o(s)}}return o(e),n||r.length>0?null:t}function un(e,t){let r=[...e.keys()].filter(s=>t.has(s)).sort((s,a)=>s.length-a.length);if(r.length===0)return null;for(let s of r)if(e.get(s).routeKey!==t.get(s).routeKey){let a=null;for(let c of r){if(c===s)break;s.startsWith(c==="/"?c:c+"/")&&(a=c)}return a?{mode:"replace",segment:a,live:e.get(a),incoming:t.get(a)}:null}let n=r[r.length-1],o=s=>{let a=null;for(let c of s.keys())(a===null||c.length>a.length)&&(a=c);return a};return{mode:o(e)===n&&o(t)===n?"morph":"replace",segment:n,live:e.get(n),incoming:t.get(n)}}function ve(){let e=be(document.body);return e?[...e.entries()].map(([t,r])=>`${t}:${r.routeKey}`).join(","):""}var Qe=T(()=>{});function el(e){Ee=e||(t=>{location.href=t})}function tl(){return M}function rl(){return++M}function Lo(){return++M}function $s(e){ie=e}function nl(e){fn=e}function ol(e){let t=fn!==null&&fn===e;return fn=null,t}function Oo(){fn=null}var M,Ee,ie,fn,Pe=T(()=>{M=0,Ee=e=>{location.href=e};ie=!1;fn=null});function Lt(e){if(!/^\s*(?:<!doctype|<html)/i.test(e)&&typeof document<"u"&&document.implementation)try{let r=document.implementation.createHTMLDocument();if(typeof r.body.setHTMLUnsafe=="function")r.body.setHTMLUnsafe(e);else{let n=r.createElement("template");n.innerHTML=e,r.body.appendChild(n.content)}return r}catch{}return typeof Document<"u"&&typeof Document.parseHTMLUnsafe=="function"&&pd()?Document.parseHTMLUnsafe(e):md(e)}function pd(){if(gr!==null)return gr;try{gr=Document.parseHTMLUnsafe("<!doctype html><body><!--c--><i></i>")?.body?.firstChild?.nodeType===8}catch{gr=!1}return gr}function Fs(){gr=null}function md(e){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(e,"text/html")}var gr,dn=T(()=>{gr=null});function jo(e){for(let t of e.composedPath())if(t instanceof HTMLAnchorElement)return t;return null}function Bs(e){let t=e;for(;t;){if(t instanceof HTMLAnchorElement)return t;let r=t.nodeType===1?t:null;if(r){let o=r.closest&&r.closest("a");if(o instanceof HTMLAnchorElement)return o}let n=t.getRootNode?t.getRootNode():null;t=n&&n.host?n.host:null}return null}var Po=T(()=>{});function pn(e,t){return((t&&t.hasAttribute("formmethod")?t.getAttribute("formmethod")||"":e.getAttribute("method")||"")||"get").toLowerCase()}function mn(e,t){return t&&t.hasAttribute("formaction")?t.getAttribute("formaction")||"":e.getAttribute("action")||e.action||location.href}function hd(e){let t=String(e||"").toLowerCase();return t==="multipart/form-data"?"multipart/form-data":t==="text/plain"?"text/plain":"application/x-www-form-urlencoded"}function hn(e,t){return hd(t&&t.hasAttribute("formenctype")?t.getAttribute("formenctype"):e.getAttribute("enctype"))}function gn(e,t){if(t==="multipart/form-data")return e;let r=new URLSearchParams;for(let[n,o]of e)r.append(n,typeof o=="string"?o:o.name);return r}function bn(e,t){try{return new FormData(e,t||void 0)}catch{let r=new FormData(e);return t&&t.getAttribute("name")&&r.append(t.getAttribute("name"),t.getAttribute("value")||""),r}}var Io=T(()=>{});function il(){if(typeof document>"u")return"";let e=document.querySelector('meta[name="csp-nonce"]');return e&&e.getAttribute("content")||""}function yn(e){let t=document.createElement("script");for(let n of e.attributes)n.name!=="nonce"&&t.setAttribute(n.name,n.value);let r=il();return r&&t.setAttribute("nonce",r),t.textContent=e.textContent,t}function Hs(e){if(!e.hasAttribute("nonce"))return e.cloneNode(!0);let t=e.cloneNode(!0),r=il();return r?t.setAttribute("nonce",r):t.removeAttribute("nonce"),t}function Te(e){if(!e.hasAttribute("nonce"))return e.outerHTML;let t=e.cloneNode(!0);return t.removeAttribute("nonce"),t.outerHTML}function qo(e){let t=e.getAttribute("name");if(t)return"name="+t;let r=e.getAttribute("property");if(r)return"property="+r;let n=e.getAttribute("http-equiv");return n?"http-equiv="+n:e.hasAttribute("charset")?"charset":null}function gd(e){if(!e.querySelector("meta"))return;let t=o=>{let i=new Map;for(let s of o.querySelectorAll("meta")){let a=qo(s);if(!a||a===Co)continue;let c=i.get(a);c?c.push(s):i.set(a,[s])}return i},r=t(e),n=t(document.head);for(let[o,i]of r){let s=n.get(o)||[],a=i.map(Te).join(`
6
- `),c=s.map(Te).join(`
7
- `);if(a!==c){if(i.length===1&&s.length===1){let l=s[0];for(let u of[...l.attributes])l.removeAttribute(u.name);for(let u of i[0].attributes)l.setAttribute(u.name,u.value);continue}for(let l of s)l.remove();for(let l of i)document.head.appendChild(Hs(l))}}for(let[o,i]of n)if(!r.has(o))for(let s of i)s.remove()}function br(e){let t=e.querySelector("title");t&&(document.title=t.textContent||"");let r=new Set;for(let n of document.head.children)r.add(Te(n));for(let n of e.children)n.tagName==="SCRIPT"&&n.getAttribute("type")==="importmap"||n.tagName!=="BASE"&&n.tagName!=="TITLE"&&(n.tagName==="META"&&qo(n)||r.has(Te(n))||(n.tagName==="SCRIPT"?document.head.appendChild(yn(n)):document.head.appendChild(Hs(n))));gd(e)}function bd(e){return e.tagName==="STYLE"?!0:e.tagName==="LINK"&&(e.getAttribute("rel")||"").toLowerCase().split(/\s+/).includes("stylesheet")}function wn(e){let t=document.head,r=e.querySelector("title");r&&(document.title=r.textContent||"");let n=new Set;for(let i of t.children)i.tagName==="SCRIPT"&&i.getAttribute("type")==="importmap"||i.tagName!=="BASE"&&n.add(Te(i));let o=new Set;for(let i of e.children)i.tagName==="SCRIPT"&&i.getAttribute("type")==="importmap"||i.tagName!=="BASE"&&o.add(Te(i));for(let i of[...t.children])i.tagName==="SCRIPT"&&i.getAttribute("type")==="importmap"||i.tagName!=="BASE"&&i.tagName!=="TITLE"&&(bd(i)||i.tagName==="META"&&qo(i)===Co||o.has(Te(i))||i.remove());for(let i of e.children)i.tagName==="SCRIPT"&&i.getAttribute("type")==="importmap"||i.tagName!=="BASE"&&i.tagName!=="TITLE"&&(i.tagName==="META"&&qo(i)===Co||n.has(Te(i))||(i.tagName==="SCRIPT"?t.appendChild(yn(i)):t.appendChild(Hs(i))))}var Sn=T(()=>{Q()});function $o(e){let t=e;for(;t;){let r=t.closest("webjs-frame");if(r&&r.id)return r.id;let n=t.getRootNode();if(n&&n.host)t=n.host;else break}return null}function ye(e){if(!e)return null;let t=e.closest&&e.closest("[data-webjs-frame]"),r=t?t.dataset?t.dataset.webjsFrame:t.getAttribute("data-webjs-frame"):null;if(r!=null&&r!==""){if(r===cn)return null;let n=typeof document<"u"?document.getElementById(r):null;return n&&n.tagName&&n.tagName.toLowerCase()==="webjs-frame"?r:(Xe(`webjs:frame-unresolved:${r}`,`[webjs] data-webjs-frame="${r}" did not match a live <webjs-frame id="${r}">; performing a normal navigation instead.`),null)}return $o(e)}function Us(e){if(!e||typeof document>"u")return null;let t=null;try{t=document.querySelector(`webjs-frame#${CSS.escape(e)}`)}catch{t=document.getElementById(e)}return!t||!t.tagName||t.tagName.toLowerCase()!=="webjs-frame"?null:t}function _n(e,t){let r=Us(e);if(!r)return null;let n=Mo.has(r);return Mo.set(r,t),r.setAttribute("aria-busy","true"),n||r.dispatchEvent(new CustomEvent("webjs:frame-busy",{bubbles:!0,detail:{frameId:e,busy:!0}})),r}function An(e,t){if(Mo.get(e)!==t)return;Mo.delete(e),e.setAttribute("aria-busy","false");let r=e.id||null;e.dispatchEvent(new CustomEvent("webjs:frame-busy",{bubbles:!0,detail:{frameId:r,busy:!1}}))}function xn(e,t,r){let n=Do.has(e);return Do.set(e,t),e.setAttribute("aria-busy","true"),n||e.dispatchEvent(new CustomEvent("webjs:submit-start",{bubbles:!0,detail:{form:e,url:r}})),e}function vn(e,t,r,n){if(Do.get(e)!==t)return;Do.delete(e),e.setAttribute("aria-busy","false");let o=new CustomEvent("webjs:submit-end",{bubbles:!0,detail:{form:e,url:r,ok:!!n}});e.isConnected?e.dispatchEvent(o):typeof document<"u"?document.dispatchEvent(o):e.dispatchEvent(o)}function Vs(e){if(!e||!e.head)return"";let t=e.head.querySelectorAll('[data-webjs-track="reload"]');if(!t.length)return"";let r="";for(let n of t)r+=Te(n);return r}var Mo,Do,et=T(()=>{Q();ge();Sn();Mo=new WeakMap;Do=new WeakMap});function cl(e,t){if(typeof document>"u"||!document.documentElement)return()=>{};le&&le();let r=document.documentElement,n=r.style.getPropertyValue("overflow-anchor");r.style.setProperty("overflow-anchor","none");let o=null,i=typeof t=="number",a=i&&typeof setTimeout=="function"?setTimeout(()=>{i=!1},Kc):null,c=typeof t=="number"&&typeof window<"u"?()=>{i&&(Math.abs(window.scrollY-t)<=1&&Math.abs(window.scrollX-(e||0))<=1||window.scrollTo({left:e||0,top:t,behavior:"instant"}))}:null,l=()=>{if(le===l){if(le=null,o&&(clearTimeout(o),o=null),a&&clearTimeout(a),i=!1,typeof window<"u"){for(let u of Is)window.removeEventListener(u,l,{capture:!0});c&&window.removeEventListener("scroll",c)}n?r.style.setProperty("overflow-anchor",n):r.style.removeProperty("overflow-anchor")}};if(le=l,o=setTimeout(l,2e3),typeof window<"u"){for(let u of Is)window.addEventListener(u,l,{capture:!0,passive:!0});c&&window.addEventListener("scroll",c,{passive:!0})}return l}function ll(e){if(typeof document>"u"||!document.documentElement)return()=>{};if(ue&&ue(),!(e>0))return()=>{};let t=document.documentElement,r=t.style.getPropertyValue("min-height");t.style.setProperty("min-height",e+"px");let n=null,o=()=>{ue===o&&(ue=null,n&&(clearTimeout(n),n=null),r?t.style.setProperty("min-height",r):t.style.removeProperty("min-height"))};return ue=o,n=setTimeout(o,2e3),o}function Bo(e){if(typeof requestAnimationFrame!="function"){setTimeout(e,0);return}requestAnimationFrame(()=>requestAnimationFrame(e))}function Ho(){Fo+=1}function En(e,t){let r=sl(e)||sl(t);return r?(r.getAttribute("data-preserve-scroll")||"").toLowerCase().trim()!=="false":!1}function sl(e){return!e||typeof e.closest!="function"?null:e.closest("[data-preserve-scroll]")}var le,ue,Fo,Uo=T(()=>{Q();le=null;ue=null;Fo=0});function Ws(e){if(!ie||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=jo(e);if(!t||t.hasAttribute("download")||t.target&&t.target!=="_self")return;let r=t.href;if(!r)return;let n=new URL(r);if(n.origin!==location.origin)return;if(n.pathname===location.pathname&&n.search===location.search&&n.href.includes("#")){nl(n.href);return}if(t.hasAttribute("data-no-router")||hr.test(n.pathname))return;e.preventDefault();let o=ye(t);Tn(r,!1,o,{preserveScroll:En(t)})}function yr(e){ul(location.href)||Tn(location.href,!0,null)}function wr(e){if(!ie||e.defaultPrevented)return;let t=e.target;if(!t||t.nodeType!==1||t.tagName!=="FORM"||t.hasAttribute("data-no-router"))return;let r=e.submitter??null;if(r&&r.hasAttribute("data-no-router"))return;let n=r&&r.hasAttribute("formtarget")?r.getAttribute("formtarget")||"":t.getAttribute("target")||"";if(n&&n!=="_self")return;let o=pn(t,r);if(o==="dialog")return;let i=hn(t,r),s=o==="get"||o==="head",a=mn(t,r),c;try{c=new URL(a,location.href)}catch{return}if(c.origin!==location.origin||hr.test(c.pathname))return;let l=bn(t,r);if(Gc(t,r,o,l),!s&&i==="text/plain")return;let u=gn(l,i);e.preventDefault();let f=ye(r||t),d=En(r||t,t);fl(c.href,o,u,f,t,{preserveScroll:d})}var Vo=T(()=>{Po();Q();Pe();ge();Io();et();Uo();kn()});function Ks(e){let t=ke(e);document.dispatchEvent(new CustomEvent("webjs:before-cache",{detail:{url:e}})),D.has(t)&&D.delete(t);let r={html:document.documentElement.outerHTML,scrollX:typeof window<"u"&&window.scrollX||0,scrollY:typeof window<"u"&&window.scrollY||0,scrollHeight:typeof document<"u"&&document.documentElement&&document.documentElement.scrollHeight||0};for(D.set(t,r);D.size>16;){let n=D.keys().next().value;D.delete(n)}}function dl(e){let t=ke(e),r=D.get(t);return r==null?null:(D.delete(t),D.set(t,r),typeof r=="string"?{html:r,scrollX:0,scrollY:0,scrollHeight:0}:r)}function ke(e,t){let r=new URL(e,location.href),n=r.pathname+r.search;return t?`${t} ${n}`:n}var D,Sr=T(()=>{Q();D=new Map});function vd(e){let t=Ne.get(e);return t==null?!1:On()-t>=zs?(Ne.delete(e),!1):!0}function Tr(){Ne.clear()}function Ed(e){for(Ne.has(e)&&Ne.delete(e),Ne.set(e,On());Ne.size>xd;)Ne.delete(Ne.keys().next().value)}function jn(){try{let e=typeof navigator<"u"?navigator.connection:null;if(e&&(e.saveData===!0||typeof e.effectiveType=="string"&&/2g$/.test(e.effectiveType))||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-data: reduce)").matches)return!0}catch{}return!1}function Wo(){try{if(typeof matchMedia=="function")return matchMedia("(hover: hover) and (pointer: fine)").matches}catch{}return!0}function Td(e){let t=e.getAttribute("rel");return t?t.toLowerCase().split(/\s+/).filter(Boolean):[]}function vr(e){if(!e||!(e instanceof HTMLAnchorElement)||e.hasAttribute("download")||e.hasAttribute("data-no-router")||e.target&&e.target!=="_self")return null;let t=e.href;if(!t)return null;let r;try{r=new URL(t)}catch{return null}return r.origin!==location.origin||r.pathname===location.pathname&&r.search===location.search&&r.href.includes("#")||hr.test(r.pathname)?null:t}function Ko(e){if(e.hasAttribute("data-no-prefetch"))return!0;let t=Td(e);return t.includes("external")||t.includes("no-prefetch")}function Er(e){if(Ko(e))return"none";switch((e.getAttribute("data-prefetch")||"").toLowerCase().trim()){case"false":case"none":return"none";case"true":case"render":return"render";case"auto":case"viewport":return"viewport";case"intent":return"intent";default:return Wo()?"intent":"viewport"}}function rt(e,t){if(!ie||typeof fetch!="function"||jn())return;let r=ke(e,t);if(typeof location<"u"&&r===ke(location.href,t)||Ie.has(r)||Nn.has(r))return;let n=j.get(r);if(n&&On()-n.at<zs||vd(r))return;if(Ie.size>=pl){for(Nn.add(r),Ar.push({href:e,frameId:t||null});Ar.length>Sd;){let s=Ar.shift();Nn.delete(ke(s.href,s.frameId))}return}let o=ve();if(!o&&typeof document<"u"&&document.readyState==="loading")return;Ie.add(r);let i={"x-webjs-router":"1","x-webjs-prefetch":"1"};o&&(i["x-webjs-have"]=o),t&&(i["x-webjs-frame"]=t),fetch(e,{method:"GET",headers:i,credentials:"same-origin",cache:"no-cache"}).then(async s=>{let a=s.headers.get("content-type")||"";if(!/^text\/html\b/i.test(a)||s.status>=400)return;let c=s.headers.get("x-webjs-build"),l=s.headers.get("x-webjs-src"),u=typeof document<"u"?document.querySelector('script[type="importmap"]'):null,f=u?u.getAttribute("data-webjs-build"):null,d=u?u.getAttribute("data-webjs-src"):null;if((c&&f&&c!==f||l&&d&&l!==d)&&(D.clear(),jt(r),Tr()),(s.headers.get("x-webjs-frame")||null)!==(t||null)){Ed(r);return}let m=s.redirected&&s.url?s.url:e,y=await s.text();Ln.has(r)||Nd(r,{html:y,build:c,src:l,finalUrl:m,frameId:t||null,at:On()})}).catch(()=>{}).finally(()=>{Ie.delete(r),Ln.delete(r),kd()})}function kd(){for(;Ar.length&&Ie.size<pl;){let{href:e,frameId:t}=Ar.shift();Nn.delete(ke(e,t)),rt(e,t)}}function Nd(e,t){for(j.has(e)&&j.delete(e),j.set(e,t);j.size>wd;){let r=j.keys().next().value;j.delete(r)}typeof document<"u"&&document.dispatchEvent(new CustomEvent("webjs:prefetch",{detail:{url:t.finalUrl,key:e,from:"prefetch"}}))}function zo(e){let t=/<!--wj:children:([^>]*?)-->/.exec(e||"");return t?t[1]:null}function Pn(e,t,r){let n=ke(e,r),o=j.get(n);if(!o)return null;if(On()-o.at>=zs)return j.delete(n),null;if(o.frameId)return j.delete(n),Us(o.frameId)?o:null;let i=zo(o.html);return i&&!new Set(String(t??(ve()||"")).split(",").filter(Boolean)).has(i)?(j.delete(n),null):(j.delete(n),o)}function On(){try{if(typeof performance<"u"&&typeof performance.now=="function")return performance.now()}catch{}return 0}function Ot(e){if(!ie)return;let t=Bs(e.target);if(!t)return;let r=Er(t);if(r==="none"||r==="render")return;let n=vr(t);if(n){if(e.type==="touchstart"){rt(n,ye(t));return}r==="intent"&&(Cn===t&&xr||(In(),Cn=t,xr=setTimeout(()=>{xr=null,Cn=null,rt(n,ye(t))},_d)))}}function Gs(e){let t=Bs(e.target);t&&t===Cn&&In()}function In(){xr&&(clearTimeout(xr),xr=null),Cn=null}function Go(){for(let e of Rn)clearTimeout(e);Rn.clear(),_r=new WeakMap}function Yo(){if(typeof document>"u"||jn())return;let e=typeof IntersectionObserver<"u";e&&(tt?(tt.disconnect(),Go()):tt=new IntersectionObserver(t=>{for(let r of t){let n=r.target;if(r.isIntersecting){if(_r.has(n))continue;let o=setTimeout(()=>{Rn.delete(o),_r.delete(n),tt.unobserve(n);let i=vr(n);i&&Er(n)==="viewport"&&rt(i,ye(n))},Ad);_r.set(n,o),Rn.add(o)}else{let o=_r.get(n);o&&(clearTimeout(o),Rn.delete(o),_r.delete(n))}}},{threshold:.5}));for(let t of document.querySelectorAll("a[href]")){let r=Er(t);if(r==="render"){let n=vr(t);n&&rt(n,ye(t))}else r==="viewport"&&e&&tt.observe(t)}}function jt(e){j.clear();for(let t of Ie)t!==e&&Ln.add(t)}function ml(e,t){let r=ke(e,t);j.delete(r),Ie.has(r)&&Ln.add(r)}function hl(e,t){return j.get(ke(e,t))||null}function gl(){return Ie.size}function bl(){j.clear(),Ne.clear(),Ie.clear(),Ln.clear(),Ar.length=0,Nn.clear(),In(),Go()}function yl(){tt&&(tt.disconnect(),tt=null)}var wd,zs,pl,Sd,_d,Ad,j,Ne,xd,Ie,Ln,Ar,Nn,xr,Cn,tt,_r,Rn,Pt=T(()=>{Po();Qe();Q();et();Pe();Sr();wd=8,zs=3e4,pl=3,Sd=24,_d=100,Ad=250,j=new Map,Ne=new Map,xd=16;Ie=new Set,Ln=new Set,Ar=[],Nn=new Set,xr=null,Cn=null,tt=null,_r=new WeakMap,Rn=new Set});function Ys(e){for(let t of e.querySelectorAll("template[data-webjs-resolve]")){let r=t.cloneNode(!0);document.body.appendChild(r);let n=r.getAttribute("data-webjs-resolve"),o=window.__webjsResolve;n&&typeof o=="function"&&o(n)}}async function qn(e){if(!e.body||typeof e.body.getReader!="function")return{shell:await e.text(),streaming:!1};let t=e.body.getReader(),r=new TextDecoder,n="",o="<template data-webjs-resolve",i="<!--wj-stream-shell-->",s=/<\/html\s*>/i;for(;;){let{value:a,done:c}=await t.read();a&&(n+=r.decode(a,{stream:!0})),c&&(n+=r.decode());let l=n.indexOf(i);if(l!==-1)return{shell:n.slice(0,l),streaming:!0,reader:c?null:t,dec:r,rest:n.slice(l+i.length)};let u=n.indexOf(o);if(u!==-1)return{shell:n.slice(0,u),streaming:!0,reader:c?null:t,dec:r,rest:n.slice(u)};if(c)return{shell:n,streaming:!1};let f=s.exec(n);if(f){let d=f.index+f[0].length;return{shell:n.slice(0,d),streaming:!0,reader:t,dec:r,rest:n.slice(d)}}}}function Jo(e){let t=/<template\s+data-webjs-resolve="([^"]+)"\s*>/i.exec(e);if(!t)return null;let r=t[1],n=t.index+t[0].length,o=/<(\/?)template\b[^>]*>/gi;o.lastIndex=n;let i=1,s;for(;s=o.exec(e);)if(s[1]==="/"){if(i--,i===0)return{id:r,content:e.slice(n,s.index),rest:e.slice(s.index+s[0].length)}}else i++;return null}function Zo(e,t){let r=document.getElementById(e);if(!r){Jc(e);return}let n=document.createElement("template");n.innerHTML=t;let o=[...n.content.childNodes];r.replaceWith(n.content);for(let i of o)i.nodeType===1&&Xo(i)}async function Mn(e,t,r,n){let o=r,i=()=>{let s;for(;s=Jo(o);){if(!n())return!1;Zo(s.id,s.content),o=s.rest}return!0};if(!e){i();return}try{for(;;){if(!i()){try{await e.cancel()}catch{}return}let{value:s,done:a}=await e.read();if(s&&(o+=t.decode(s,{stream:!0})),a){o+=t.decode(),i();return}}}catch{}}var Dn=T(()=>{ge();It()});function Nr(){if(typeof document>"u")return!1;let e=document.querySelector('meta[name="view-transition"]');return e?(e.getAttribute("content")||"").trim().toLowerCase()==="same-origin":!1}function qt(e,t){let r=typeof document<"u"?document.startViewTransition:void 0;if(Nr()&&typeof r=="function"){let n=r.call(document,e);return n&&n.finished&&typeof n.finished.then=="function"?n.finished.then(()=>{t&&t()}).catch(()=>{}):t&&t(),n&&n.updateCallbackDone&&typeof n.updateCallbackDone.then=="function"?n.updateCallbackDone.catch(()=>{}):Promise.resolve()}return e(),t&&t(),Promise.resolve()}function $n(e,t){if(!e||!t||typeof e.querySelectorAll!="function")return;let r=e.querySelectorAll("[data-webjs-permanent][id]");for(let n of r){let o=n.id;if(!o)continue;let i=null;try{i=t.querySelector(`#${CSS.escape(o)}`)}catch{i=null}if(!i||!n.hasAttribute||!n.hasAttribute("data-webjs-permanent"))continue;let s=i.parentNode;s&&i!==n&&(s.replaceChild(n,i),kr.add(n))}}function qe(e,t){let r=[];for(let n of e){if(n.nodeType!==1)continue;let o=n;if(o.hasAttribute&&o.hasAttribute("data-webjs-permanent")&&o.id&&r.push(o),typeof o.querySelectorAll=="function")for(let i of o.querySelectorAll("[data-webjs-permanent][id]"))r.push(i)}if(r.length)for(let n of r){let o=n.id;if(!o)continue;let i=Cd(t,o);if(!i||i===n)continue;let s=i.parentNode;if(s)s.replaceChild(n,i),kr.add(n);else{let a=t.indexOf(i);a!==-1&&(t[a]=n,kr.add(n))}}}function Cd(e,t){for(let r of e){if(r.nodeType!==1)continue;let n=r;if(n.id===t)return n;if(typeof n.querySelector=="function"){let o=null;try{o=n.querySelector(`#${CSS.escape(t)}`)}catch{o=null}if(o)return o}}return null}var kr,Mt=T(()=>{kr=new WeakSet});function wl(e,t){let r=[];for(let n=e.parentNode;n;n=n.parentNode)if(r.unshift(n),n===t)return r;return null}function Al(e,t,r,n){let o=wl(e.start,r),i=wl(t.start,n);if(!o||!i||o.length!==i.length)return null;for(let s=1;s<o.length;s++)if(o[s].tagName!==i[s].tagName||Js(o[s]))return null;return{live:o,incoming:i,liveRange:e,incomingRange:t}}function Sl(e,t,r){let n=[],o=[],i=n;for(let s=e.firstChild;s;s=s.nextSibling)s===t&&(i=null),i&&i.push(s),s===r&&(i=o);return{before:n,after:o}}function Rd(e,t){for(let r of t.attributes)je.has(r.name)||r.name==="data-wj-serialized"||e.getAttribute(r.name)!==r.value&&e.setAttribute(r.name,r.value);for(let r of[...e.attributes])je.has(r.name)||t.hasAttribute(r.name)||e.removeAttribute(r.name)}function Ld(e,t){let r=new Map;for(let s of e){if(s.nodeType!==1)continue;let a=fe(s);a&&r.set(a,s)}let n=new Set,o=0,i=[];for(let s of t){if(s.nodeType===1){let c=fe(s),l=c?r.get(c):null;if(l&&!n.has(l)){n.add(l),Me(l,s),i.push(l),o=Math.max(o,e.indexOf(l)+1);continue}}let a=o;for(;a<e.length;a++){let c=e[a];if(n.has(c)||c.nodeType!==s.nodeType)continue;if(c.nodeType!==1)break;let l=c;if(!fe(l)&&l.tagName===s.tagName)break}if(a<e.length&&(s.nodeType===1||s.nodeType===3||s.nodeType===8)){let c=e[a];n.add(c),c.nodeType===1?Me(c,s):c.nodeValue!==s.nodeValue&&(c.nodeValue=s.nodeValue),i.push(c),o=a+1;continue}i.push(s)}return i}function _l(e,t,r,n,o){let i=r.map(u=>document.importNode(u,!0));qe(t,i);let s=Ld(t,i),a=new Set(s),c=n;if(o){let u=-1;for(let d=0;d<t.length;d++)a.has(t[d])&&(u=d);let f=t.slice(u+1);if(f.length){for(let d of f)a.add(d);c=f[0]}}for(let u of t)!a.has(u)&&u.parentNode===e&&e.removeChild(u);for(let u=s.length-1;u>=0;u--){let f=s[u];(f.parentNode!==e||f.nextSibling!==c)&&e.insertBefore(f,c),c=f}let l=new Set(t);return s.filter(u=>!l.has(u))}function xl(e){let{live:t,incoming:r,liveRange:n,incomingRange:o}=e,i=[];for(let s=0;s<t.length;s++){let a=t[s],c=r[s];s>0&&Rd(a,c);let l=s===t.length-1,u=l?n.start:t[s+1],f=l?n.end:t[s+1],d=l?o.start:r[s+1],p=l?o.end:r[s+1],m=Sl(a,u,f),y=Sl(c,d,p),g=[..._l(a,m.before,y.before,u,!1),..._l(a,m.after,y.after,null,s===0)];for(let S of g)S.nodeType===1&&i.push(nt(S));for(let S of[m.before,m.after])for(let b of S)b.nodeType===1&&b.isConnected&&i.push(b)}for(let s of i)s.isConnected&&De(s)}var vl=T(()=>{Q();Dt();It();Mt()});function Ft(e,t,r,n,o,i,s,a){let c=!1,l=()=>{if(!c){c=!0;try{Eo(e,{frame:!!t})}catch{}}};try{for(let m of e.querySelectorAll("[data-wj-host]"))m.setAttribute("data-wj-serialized","")}catch{}try{typeof sessionStorage<"u"&&(!n||t||r)&&sessionStorage.removeItem("webjs:importmap-reload")}catch{}if(n&&!t&&!r){let m=document.querySelector('script[type="importmap"]'),y=m?m.getAttribute("data-webjs-build"):null,g=!1;if(o&&y&&(g=o!==y),!g&&e.head&&e.head.children.length>0){let S=Vs(document),b=Vs(e);S!==b&&(g=!0)}if(g&&typeof location<"u"){D.clear(),jt(),Tr();try{let S="webjs:importmap-reload";if(sessionStorage&&sessionStorage.getItem(S))sessionStorage.removeItem(S),he("deploy-mismatch-reload-suppressed",n,!1);else return sessionStorage&&sessionStorage.setItem(S,"1"),he("deploy-mismatch",n),Ee(n),"none"}catch{return he("deploy-mismatch",n),Ee(n),"none"}}else if(!g){let S=m?m.getAttribute("data-webjs-src"):null;i&&S&&i!==S&&(D.clear(),jt(),Tr(),m&&m.setAttribute("data-webjs-src",i));try{typeof sessionStorage<"u"&&sessionStorage.removeItem("webjs:importmap-reload")}catch{}}}if(t){l();let m=document.querySelector(`webjs-frame#${CSS.escape(t)}`),y=e.querySelector(`webjs-frame#${CSS.escape(t)}`);if(m&&y){a&&a(),br(e.head),ot=qt(()=>{Cl(m,y),nt(m),De(m),Ys(e.body),$t()},()=>De(m));return}let g=new CustomEvent("webjs:frame-missing",{bubbles:!0,cancelable:!0,detail:{frameId:t,url:n||(typeof location<"u"?location.href:null),document:e}});return(m||document).dispatchEvent(g),g.defaultPrevented||console.warn(`[webjs] frame "${t}" was not in the navigation response, leaving it unchanged. Handle "webjs:frame-missing" (preventDefault) to override.`),"none"}if(s==="shell"){l(),a&&a(),Zs(e);return}let u=be(document.body),f=be(e.body),d=u&&f?un(u,f):null,p=d&&s==="layouts"?Al(d.live,d.incoming,document.body,e.body):null;if(d&&s==="layouts"&&!p){l(),a&&a(),Zs(e);return}if(d){l(),a&&a();let{mode:m,live:y,incoming:g}=d;br(e.head),ot=qt(()=>{m==="replace"?Tl(y,g):kl(y,g,e),Nl(y.start,g.start),p&&xl(p),Ys(e.body),$t()},()=>El(y));return}if(n&&!r&&typeof location<"u")return he(u?f?"no-shared-boundary":"incoming-boundaries-malformed":"live-boundaries-malformed",n),Ee(n),"none";if(n&&r)return he("revalidation-discarded",n,!1),"discard";l(),a&&a(),Zs(e)}function Zs(e){wn(e.head),$n(document.body,e.body);let t=[...e.body.childNodes];ot=qt(()=>{document.body.replaceChildren(...t),nt(document.body),De(document.body),$t()},()=>De(document.body))}var ot,Fn=T(()=>{To();Qe();ge();Dt();et();Sn();vl();Pt();Sr();Pe();Dn();It();Mt();ot=Promise.resolve()});function Rl(){Xs||typeof MutationObserver>"u"||typeof customElements>"u"||(Xs=new MutationObserver(e=>{for(let t of e)for(let r of t.addedNodes){if(r.nodeType!==1)continue;let n=r;n.tagName?.includes("-")&&customElements.upgrade(n);for(let o of n.querySelectorAll("*"))o.tagName?.includes("-")&&customElements.upgrade(o)}}),Xs.observe(document.body,{childList:!0,subtree:!0}))}function El(e){if(!(!e||!e.start))for(let t=e.start.nextSibling;t&&t!==e.end;t=t.nextSibling)t.nodeType===1&&De(t)}function De(e){typeof customElements>"u"||Xo(e)}function Xo(e){let t=e instanceof Element?[e,...e.querySelectorAll("*")]:[...e.querySelectorAll("*")];for(let r of t)r.tagName&&r.tagName.includes("-")&&(customElements.upgrade(r),r.shadowRoot&&Xo(r.shadowRoot))}function nt(e){if(e.tagName==="SCRIPT"){let r=yn(e);return e.replaceWith(r),r}let t=[];kr.has(e)&&t.push(e);for(let r of e.querySelectorAll("[data-webjs-permanent]"))kr.has(r)&&t.push(r);for(let r of e.querySelectorAll("script"))t.length&&t.some(n=>n!==r&&n.contains(r))||r.replaceWith(yn(r));return e}function Bn(e){let t=[];for(let r=e.start.nextSibling;r&&r!==e.end;r=r.nextSibling)r.nodeType===1&&t.push(r);for(let r of t){let n=nt(r);n.isConnected!==!1&&De(n)}}var Xs,It=T(()=>{Qe();Q();ge();Dt();dn();Vo();Io();et();Sn();Pt();Sr();Dn();Fn();Mt();Xs=null});function $t(){let e=document.activeElement;!e||e===document.body||e===document.documentElement||typeof e.blur=="function"&&e.blur()}function Tl(e,t){let r=e.start.parentNode;if(!r)return;let n=[];for(let i=e.start.nextSibling;i&&i!==e.end;i=i.nextSibling)n.push(i);let o=[];for(let i=t.start.nextSibling;i&&i!==t.end;i=i.nextSibling)o.push(document.importNode(i,!0));qe(n,o);for(let i of n)i.parentNode===r&&r.removeChild(i);for(let i of o)r.insertBefore(i,e.end);Bn(e)}function kl(e,t,r){if(!e||!t)return;let n=e.start.parentNode;if(!n)return;let o=[];for(let s=e.start.nextSibling;s&&s!==e.end;s=s.nextSibling)o.push(s);let i=[];for(let s=t.start.nextSibling;s&&s!==t.end;s=s.nextSibling)i.push(document.importNode(s,!0));qe(o,i),Od(n,e.start,e.end,o,i),Bn(e)}function Od(e,t,r,n,o){let i=new Map;for(let c of n){if(c.nodeType!==1)continue;let l=fe(c);l&&i.set(l,c)}let s=r,a=[];for(let c of o){if(c.nodeType===1){let l=fe(c);if(l&&i.has(l)){let u=i.get(l);Me(u,c),a.push(u),i.delete(l);continue}}a.push(c)}for(let c of n)if(c.parentNode===e){if(c.nodeType===1&&a.includes(c))continue;e.removeChild(c)}for(let c of a)e.insertBefore(c,s)}function Me(e,t){if(e===t)return;if(e.tagName!==t.tagName){e.replaceWith(t);return}let r=new Set;for(let n of t.attributes)r.add(n.name),!je.has(n.name)&&n.name!=="data-wj-serialized"&&e.getAttribute(n.name)!==n.value&&e.setAttribute(n.name,n.value);for(let n of[...e.attributes])je.has(n.name)||r.has(n.name)||e.removeAttribute(n.name);if(Js(e)){Pd(e,t);return}Cr(e,t)}function Js(e){let t=e;return t[Symbol.for("webjs.instance")]!=null||t[R]!=null}function jd(e,t){for(let r=e.parentElement;r&&r!==t;r=r.parentElement)if(r.tagName.includes("-"))return!1;return!0}function Qo(e){let t=new Map,r=`slot[${L}][${z}="${Z}"]`;for(let n of e.querySelectorAll(r)){let o=n;if(!jd(o,e)||Ii(e,o))continue;let i=!1;for(let a=o.parentElement;a&&a!==e;a=a.parentElement)if(a.tagName==="SLOT"&&a.hasAttribute(L)&&a.getAttribute(z)===Z){i=!0;break}if(i)continue;let s=te(o.getAttribute("name"));t.has(s)||t.set(s,o)}return t}function Nl(e,t){let r=e.parentNode;if(!r||r.nodeType!==1)return;let n=r;if(n.tagName!=="SLOT"||!n.hasAttribute(L))return;let o=null;for(let f=n.parentElement;f;f=f.parentElement){if(f[R]){o=f;break}if(f.tagName.includes("-"))return}if(!o)return;let i=te(n.getAttribute("name"));Ke(o,i,[...n.childNodes]);let s=t.parentNode;if(!s||s.nodeType!==1)return;let a=s;if(a.tagName!=="SLOT")return;let c=null;for(let f=a.parentElement;f;f=f.parentElement)if(f.tagName.includes("-")){c=f;break}if(!c||c.tagName!==o.tagName)return;let l=Qo(o),u=Qo(c);for(let f of new Set([...l.keys(),...u.keys()])){if(f===i)continue;let d=u.get(f);d?Ke(o,f,[...d.childNodes].map(p=>document.importNode(p,!0))):l.get(f)&&Ke(o,f,null)}}function Pd(e,t){if(!e[R])return;let r=Qo(e),n=Qo(t);if(r.size===0&&n.size===0)return;let o=new Set([...r.keys(),...n.keys()]);for(let i of o){let s=r.get(i),a=n.get(i);s&&a?(Cr(s,a),Ke(e,i,[...s.childNodes])):a?Ke(e,i,[...a.childNodes].map(c=>document.importNode(c,!0))):Ke(e,i,null)}}function Cr(e,t){let r=[...e.childNodes],n=[...t.childNodes].map(a=>document.importNode(a,!0));qe(r,n);let o=new Map;for(let a of r){if(a.nodeType!==1)continue;let c=fe(a);c&&o.set(c,a)}let i=[];for(let a=0;a<n.length;a++){let c=n[a];if(c.nodeType===1){let l=fe(c);if(l&&o.has(l)){let f=o.get(l);Me(f,c),i.push(f),o.delete(l);continue}let u=r[a];if(u&&u.nodeType===1&&!fe(u)&&u.tagName===c.tagName&&Id(u,c)){Me(u,c),i.push(u);continue}}else if(c.nodeType===3){let l=r[a];if(l&&l.nodeType===3){l.nodeValue!==c.nodeValue&&(l.nodeValue=c.nodeValue),i.push(l);continue}}else if(c.nodeType===8){let l=r[a];if(l&&l.nodeType===8){l.nodeValue!==c.nodeValue&&(l.nodeValue=c.nodeValue),i.push(l);continue}}i.push(c)}let s=new Set(i);for(let a of r)!s.has(a)&&a.parentNode===e&&e.removeChild(a);for(let a=0;a<i.length;a++){let c=i[a];(c.parentNode!==e||e.childNodes[a]!==c)&&e.insertBefore(c,e.childNodes[a]||null)}}function Id(e,t){let r=e.localName;return r!=="input"&&r!=="select"&&r!=="textarea"?!0:!(e.getAttribute("name")!==t.getAttribute("name")||r==="input"&&(e.getAttribute("type")||"text").toLowerCase()!==(t.getAttribute("type")||"text").toLowerCase())}function fe(e){let t=e.getAttribute("data-key");return t?`${e.tagName}:k:${t}`:e.id?`${e.tagName}:i:${e.id}`:null}function Rr(){let e=be(document.body);if(!e||e.size===0)return null;let t=[...e.keys()].sort((c,l)=>l.length-c.length),r=null,n=null;for(let c of t){let l=document.getElementById(`wj-loading:${c}`);if(l instanceof HTMLTemplateElement){r=c,n=l;break}}if(r===null||n===null)return null;let o=e.get(r),i=ve(),s=[];for(let c=o.start.nextSibling;c&&c!==o.end;c=c.nextSibling)s.push(c);let a=document.createRange();return a.setStartAfter(o.start),a.setEndBefore(o.end),a.deleteContents(),o.start.parentNode.insertBefore(n.content.cloneNode(!0),o.end),{slot:o,oldChildren:s,token:M,haveKeys:i}}function it(e){if(!e||e.token!==M)return;let{slot:t,oldChildren:r}=e;if(t.start.parentNode!==t.end.parentNode)return;let n=document.createRange();n.setStartAfter(t.start),n.setEndBefore(t.end),n.deleteContents();for(let o of r)t.start.parentNode.insertBefore(o,t.end)}function Cl(e,t){Cr(e,t)}var Dt=T(()=>{_t();Qe();Q();Pe();It();Mt()});function qd(e){if(typeof document>"u"||!document.body)return!1;let t=be(document.body);if(!t)return!1;let r,n=-1;for(let[c,l]of t)c.length>n&&(n=c.length,r=l);if(!r)return!1;let o=r.start.parentNode;if(!o||r.start.parentNode!==r.end.parentNode)return!1;let i=document.createElement("div");i.setAttribute("role","alert"),i.setAttribute("data-webjs-nav-error","");let s=e?`This page could not be loaded. (status ${e})`:"This page could not be loaded.";i.textContent=s;let a=document.createRange();return a.setStartAfter(r.start),a.setEndBefore(r.end),a.deleteContents(),o.insertBefore(i,r.end),!0}function ei(e,t,r){let n=new CustomEvent("webjs:navigation-error",{bubbles:!0,cancelable:!0,detail:{url:e,status:t??null,error:r||null}});if(typeof document<"u")try{document.dispatchEvent(n)}catch{}n.defaultPrevented||qd(t)||typeof location<"u"&&(he("navigation-error-unrecoverable",e),Ee(e))}var Ll=T(()=>{Qe();ge();Pe()});async function Hn(e,t,r,n,o,i,s,a,c,l){o=o||"GET";let u=l&&l.refresh||void 0,f=i!=null&&o!=="GET"&&o!=="HEAD"&&!t,d=!!(l&&l.noPrefetch),p=!!(l&&l.preserveScroll),m=typeof a=="number"?a:M,y,g=null,S=null,b=null,E=null,x=!1,v=e,k=t?_n(t,m):null;try{try{let A=o==="GET"&&!i&&!u&&!d?Pn(e,n?n.haveKeys:void 0,t):null;if(A)y=A.html,S=A.build,b=A.src,v=A.finalUrl,E=200,x=!0;else{let C={"x-webjs-router":"1"},W=u||f?"":ve();W&&(C["x-webjs-have"]=W),t&&(C["x-webjs-frame"]=t),i!=null&&o!=="GET"&&o!=="HEAD"&&(C.accept=Ps+", text/html");let q={method:o,headers:C,credentials:"same-origin",cache:"no-cache"};s&&(q.signal=s),i!=null&&o!=="GET"&&o!=="HEAD"&&(q.body=i);let $=await fetch(e,q);E=$.status,x=$.ok;let Bt=js($.headers.get("x-webjs-invalidate"));Bt.length&&Os(Bt);let Lr=$.headers.get("content-type")||"",ii=/^text\/html\b/i.test(Lr);if(Lr.toLowerCase().indexOf(Ps)===0){let Hl=await $.text(),Vn=m===M;return Vn&&(it(n),Ns(Hl)),{ok:Vn&&x,status:E,aborted:!Vn,applied:Vn}}if($.redirected&&$.url&&(v=$.url),$.status===204||$.status===205)return m===M&&r&&history.pushState(null,"",v),{ok:x,status:E,aborted:!1,applied:!1};if(!ii)return m===M&&(it(n),ei(e,$.status,null)),{ok:!1,status:E,aborted:!1,applied:!1};S=$.headers.get("x-webjs-build"),b=$.headers.get("x-webjs-src");let si=await qn($);y=si.shell,si.streaming&&(g=si)}}catch(A){return A&&A.name==="AbortError"?{ok:!1,status:null,aborted:!0,applied:!1}:m!==M?{ok:!1,status:null,aborted:!0,applied:!1}:(it(n),ei(e,null,A instanceof Error?A:new Error(String(A))),{ok:!1,status:null,aborted:!1,applied:!1})}if(m!==M){if(g&&g.reader)try{g.reader.cancel()}catch{}return{ok:!1,status:E,aborted:!0,applied:!1}}let N=Lt(y);if(!N)return it(n),ei(e,null,new Error("navigation response did not parse as HTML")),{ok:!1,status:E,aborted:!1,applied:!1};let _=!1,h=r?()=>{_||(_=!0,history.pushState(null,"",v))}:null,w=Ft(N,t,!!c,v,S,b,u||(f?"layouts":void 0),h),I=w!=="none";if(w==="discard"){if(g&&g.reader)try{g.reader.cancel()}catch{}return{ok:x,status:E,aborted:!1,applied:!1}}if(h&&h(),r&&!t){let A=new URL(v),C=A.hash?document.getElementById(A.hash.slice(1)):null;C?C.scrollIntoView():p||(Zc(),window.scrollTo({left:0,top:0,behavior:"instant"}))}return g&&(g.reader||g.rest)&&ot.then(()=>Mn(g.reader,g.dec,g.rest,()=>m===M)),document.dispatchEvent(new CustomEvent("webjs:navigate",{detail:{url:v,frameId:t,from:"navigate"}})),{ok:x,status:E,aborted:!1,applied:I}}finally{k&&An(k,m)}}var Ol=T(()=>{No();an();Qe();Q();ge();Dt();dn();et();Ll();kn();Pt();Pe();Dn();Fn()});function Qs(e){if(e.id)return`id:${e.id}`;let t=e.querySelector(`input[name="${jl}"]`);return t?`act:${t.getAttribute("value")||""}`:`url:${e.getAttribute("action")||""}`}function Dd(e,t){let r=0;for(let n of document.querySelectorAll("form")){if(n===e)return r;Qs(n)===t&&r++}return-1}function $d(e){let t=e.localName;if(t==="textarea")return"text";if(t==="select")return"select";if(t!=="input")return null;let r=(e.getAttribute("type")||"text").toLowerCase();return Md.has(r)?null:r==="checkbox"||r==="radio"?"check":"text"}function Pl(e){let t=new Map,r=[],n=e.elements?[...e.elements]:[...e.querySelectorAll("input, textarea, select")];for(let o of n){let i=o.getAttribute&&o.getAttribute("name");if(!i||i===jl)continue;let s=$d(o);if(!s)continue;let a=s==="check"?`${i}\0${o.getAttribute("value")??"on"}`:i,c=t.get(a)||0;t.set(a,c+1),r.push({el:o,name:i,kind:s,n:c})}return r}function Il(e,t){if(t==="check")return{def:String(!!e.defaultChecked),cur:String(!!e.checked)};if(t==="select"){let r=[...e.options];return{def:JSON.stringify(r.map(n=>n.defaultSelected)),cur:JSON.stringify(r.filter(n=>n.selected).map(n=>n.value))}}return{def:e.defaultValue??"",cur:e.value??""}}function ql(e){if(!e||e.getAttribute("data-preserve-values")==="false")return null;let t=Qs(e),r=Pl(e).map(({el:n,name:o,kind:i,n:s})=>({name:o,kind:i,n:s,...i==="check"?{value:n.getAttribute("value")??"on"}:{},...Il(n,i)}));return r.length?{form:e,key:t,ord:Dd(e,t),controls:r}:null}function Fd(e){if(e.form.isConnected)return e.form;let t=0;for(let r of document.querySelectorAll("form"))if(Qs(r)===e.key){if(t===e.ord)return r;t++}return null}function Ml(e){if(!e)return 0;let t=Fd(e);if(!t)return 0;let r=new Map;for(let o of Pl(t)){let i=o.kind==="check"?`${o.name}\0${o.el.getAttribute("value")??"on"}\0${o.n}`:`${o.name}\0${o.n}`;r.set(i,o)}let n=0;for(let o of e.controls){let i=o.kind==="check"?`${o.name}\0${o.value}\0${o.n}`:`${o.name}\0${o.n}`,s=r.get(i);if(!s||s.kind!==o.kind)continue;let a=Il(s.el,s.kind);if(a.def===o.def&&a.cur!==o.cur){if(o.kind==="check")s.el.checked=o.cur==="true";else if(o.kind==="select"){let c=new Set(JSON.parse(o.cur));for(let l of s.el.options)l.selected=c.has(l.value)}else s.el.value=o.cur;n++}}return n}var jl,Md,Dl=T(()=>{jl="__webjs_action",Md=new Set(["password","file","hidden","submit","button","image","reset"])});function ul(e){if(!ol(e)||!se)return!1;let t,r;try{t=new URL(se),r=new URL(e,location.href)}catch{return!1}return t.pathname!==r.pathname||t.search!==r.search?!1:(se=r.href,!0)}function Un(){ie||typeof document>"u"||($s(!0),globalThis.__webjsRefreshPage=ni,document.addEventListener("click",Ws,!1),document.addEventListener("submit",wr,!1),window.addEventListener("popstate",yr),document.addEventListener("pointerover",Ot,!0),document.addEventListener("focusin",Ot,!0),document.addEventListener("touchstart",Ot,{capture:!0,passive:!0}),document.addEventListener("pointerout",Gs,!0),document.addEventListener("webjs:navigate",Yo),Rl(),Yo(),typeof history<"u"&&"scrollRestoration"in history&&(ti=history.scrollRestoration,history.scrollRestoration="auto"),typeof location<"u"&&(se=location.href),Yc())}function ea(){ie&&($s(!1),document.removeEventListener("click",Ws,!1),document.removeEventListener("submit",wr,!1),window.removeEventListener("popstate",yr),Oo(),document.removeEventListener("pointerover",Ot,!0),document.removeEventListener("focusin",Ot,!0),document.removeEventListener("touchstart",Ot,{capture:!0}),document.removeEventListener("pointerout",Gs,!0),document.removeEventListener("webjs:navigate",Yo),In(),Go(),yl(),typeof history<"u"&&ti!==null&&(history.scrollRestoration=ti,ti=null),Ho(),le&&le(),ue&&ue(),se=null,delete globalThis.__webjsRefreshPage)}async function ta(e,t){let r=new URL(e,location.href);if(r.origin!==location.origin){Ee(e);return}await Tn(r.href,t?.replace??!1,null,{preserveScroll:t?.scroll===!1})}async function ra(e,t){if(typeof location>"u")return{ok:!1,status:null,aborted:!1,applied:!1};let r=e&&e.id;if(!r)return{ok:!1,status:null,aborted:!1,applied:!1};let n=new URL(t,location.href);if(n.origin!==location.origin)return{ok:!1,status:null,aborted:!1,applied:!1};de&&de.abort(),de=new AbortController;let o=de.signal,i=Lo(),s=await Hn(n.href,r,!1,null,"GET",null,o,i,!1,{noPrefetch:!0});return s&&s.applied&&ml(n.href,r),s}function ri(e){if(!e){D.clear(),jt();return}let t=new URL(e,location.href),r=t.pathname+t.search;D.delete(r),j.delete(r);let n=` ${r}`;for(let o of[...j.keys()])o.endsWith(n)&&j.delete(o)}async function ni(e){if(!ie||typeof location>"u")return!1;ri(),Tr();try{let t=await Tn(location.href,!1,null,{refresh:e==="shell"?"shell":"page"});return!t||t.aborted?!0:t.applied}catch{return!1}}async function Tn(e,t,r,n){Oo();let o=n&&n.refresh||void 0,i=!!(n&&n.preserveScroll);if(Ds(t,r)&&typeof location<"u")return he("readyState-loading",e),Ee(e),null;de&&de.abort(),de=new AbortController;let s=de.signal,a=Lo();r||(Ho(),le&&le(),ue&&ue()),!o&&se&&Ks(se);let c=setTimeout(()=>{ln(!0),c=null},150),l=null;!t&&!o&&(l=Rr());let u=!1;try{if(t){let d=dl(e);if(d){let p=Lt(d.html);if(p){let m=ll(d.scrollHeight);Ft(p,r,!0,null);let y=()=>{};if(typeof window<"u"){let b=()=>{y=cl(d.scrollX,d.scrollY)};if(Nr()&&typeof document.startViewTransition=="function"){let E=Fo;ot.then(()=>{E!==Fo||!ie||b()}).catch(()=>{})}else b()}let g=Hn(e,r,!1,l,"GET",null,s,a,!0).catch(()=>{}),S=new Promise(b=>setTimeout(b,500));return Promise.all([g,S]).then(()=>Bo(()=>{y(),Bo(m)})),null}}u=!0,typeof window<"u"&&window.scrollTo({left:0,top:0,behavior:"instant"})}let f=await Hn(e,r,!t&&!o,l,"GET",null,s,a,!1,{refresh:o,preserveScroll:i});return u&&f&&f.applied&&typeof window<"u"&&Bo(()=>{a!==M||!ie||window.scrollTo({left:0,top:0,behavior:"instant"})}),f}finally{c&&clearTimeout(c),a===M&&(ln(!1),typeof location<"u"&&(se=location.href))}}async function fl(e,t,r,n,o,i){Oo(),de&&de.abort(),de=new AbortController;let s=de.signal,a=Lo();n||(Ho(),le&&le(),ue&&ue());let c=t==="get"||t==="head",l=new URL(e,location.href);if(c){l.search="";for(let[y,g]of r)l.searchParams.append(y,typeof g=="string"?g:g.name)}se&&Ks(se);let u=setTimeout(()=>{ln(!0),u=null},150),f=Rr(),d=o?xn(o,a,l.href):null,p=c?null:ql(o),m=!1;try{let y=await Hn(l.href,n,!0,f,c?"GET":t.toUpperCase(),c?null:r,s,a,!1,{preserveScroll:!!(i&&i.preserveScroll)});m=!!(y&&y.ok),p&&y&&y.applied&&!y.ok&&a===M&&(await ot,a===M&&Ml(p)),!c&&a===M&&(D.clear(),jt())}finally{d&&vn(d,a,l.href,m),u&&clearTimeout(u),a===M&&(ln(!1),typeof location<"u"&&(se=location.href))}}function $l(){return se}function Fl(e){se=e}var de,se,ti,kn=T(()=>{Q();ge();Dt();dn();Vo();Ol();et();Dl();Pt();Uo();Sr();Pe();Fn();It();Mt();de=null,se=null;ti=null});var Dc={};ai(Dc,{_FALLBACK_MARKER_KEY:()=>Rt,_FRAME_TOP:()=>cn,_LIVE_ATTRS:()=>je,_activateSwappedRange:()=>Bn,_activeFrameId:()=>$o,_addNewHeadElements:()=>br,_applyOptimisticLoading:()=>Rr,_applyStreamedResolve:()=>Zo,_applySwap:()=>Ft,_blurOutgoingFocus:()=>$t,_buildHaveHeader:()=>ve,_buildSubmitFormData:()=>bn,_bumpNavToken:()=>rl,_clearFormBusy:()=>vn,_clearFrameBusy:()=>An,_collectBoundaries:()=>be,_currentPageUrl:()=>$l,_diffElementInPlace:()=>Me,_eligibleAnchorHref:()=>vr,_encodeSubmitBody:()=>gn,_findAnchorInPath:()=>jo,_getSubmitAction:()=>mn,_getSubmitEnctype:()=>hn,_getSubmitMethod:()=>pn,_isNonHtmlPath:()=>Wc,_isPreBootNavigation:()=>Ro,_keyOf:()=>fe,_markFormBusy:()=>xn,_markFrameBusy:()=>_n,_mergeHead:()=>wn,_navToken:()=>tl,_onPopState:()=>yr,_onSubmit:()=>wr,_parseHTML:()=>Lt,_planBoundarySwap:()=>un,_prefetch:()=>rt,_prefetchAnchor:()=>zo,_prefetchCache:()=>j,_prefetchHasHoverPointer:()=>Wo,_prefetchInflightSize:()=>gl,_prefetchMode:()=>Er,_prefetchPeek:()=>hl,_prefetchSaysSaveData:()=>jn,_prefetchSuppressed:()=>Ko,_prefetchTake:()=>Pn,_reactivateScripts:()=>nt,_readStreamedShell:()=>qn,_reconcileChildren:()=>Cr,_regraftPermanentElements:()=>$n,_regraftPermanentInSlice:()=>qe,_resetParseProbe:()=>Fs,_resetPrefetch:()=>bl,_resetWarnOnce:()=>Xc,_resolvePreserveScroll:()=>En,_resolveTargetFrameId:()=>ye,_restoreOptimistic:()=>it,_runWithTransition:()=>qt,_setCurrentPageUrl:()=>Fl,_setHardNavigate:()=>el,_shouldFullLoadDuringParse:()=>Qc,_snapshotCache:()=>D,_streamBoundariesProgressively:()=>Mn,_takeResolveUnit:()=>Jo,_viewTransitionsEnabled:()=>Nr,disableClientRouter:()=>ea,enableClientRouter:()=>Un,loadFrame:()=>ra,navigate:()=>ta,refreshPage:()=>ni,revalidate:()=>ri});var Ts=T(()=>{Es();an();an();Ce();Fc();To();No();_t();kn();Q();ge();kn();Pt();Pe();Qe();Q();ge();Dt();dn();Po();Vo();Io();et();Sn();Pt();Uo();Sr();Dn();Fn();It();Mt();(typeof window>"u"||window.__WEBJS_CLIENT_ROUTER__!==!1)&&Un()});Ht();function Vl(e,...t){let r=e[0];for(let n=1;n<e.length;n++)r+=String(t[n-1]??"")+e[n];return{_$webjsCss:!0,text:r}}function Ut(e){return!!e&&typeof e=="object"&&e._$webjsCss===!0}function li(e,t){if(!(!t||!t.length))if("adoptedStyleSheets"in e&&typeof CSSStyleSheet<"u"){let r=t.map(n=>{let o=new CSSStyleSheet;return o.replaceSync(n.text),o});e.adoptedStyleSheets=r}else{let r=e,n=document.createElement("style");n.textContent=t.map(o=>o.text).join(`
8
- `),r.appendChild(n)}}function Wn(e){return!e||!e.length?"":`<style>${e.map(t=>t.text).join(`
9
- `)}</style>`}Ht();Ce();rr();Wt();_t();Ht();Wt();Ce();_t();var ro=new WeakMap,no=new WeakMap,Wr=Symbol.for("webjs.instance");function ir(e){let{strings:t}=e,r=ro.get(t);if(r)return r;let n=[],o="",i="text",s="",a=0,c="",l=0,u=null,f="",d="";for(let y=0;y<t.length;y++){let g=t[y];for(let S=0;S<g.length;S++){let b=g[S];switch(i){case"text":o+=b,b==="<"&&(i="tag-open");break;case"tag-open":o+=b,b==="!"?i="bang-1":b==="/"?(i="tag-name",f=""):/[a-zA-Z]/.test(b)?(i="tag-name",f=b.toLowerCase()):i="text";break;case"bang-1":o+=b,i=b==="-"?"bang-dash":"tag-name";break;case"bang-dash":o+=b,b==="-"?(i="comment",l=0):i="tag-name";break;case"comment":o+=b,b==="-"?l+=1:(b===">"&&l>=2&&(i="text"),l=0);break;case"tag-name":o+=b,b===">"?(i=f==="script"||f==="style"?"rawtext":"text",i==="rawtext"&&(d="")):/\s/.test(b)?i="in-tag":f+=b.toLowerCase();break;case"in-tag":o+=b,b===">"?(i=f==="script"||f==="style"?"rawtext":"text",i==="rawtext"&&(d="")):!/\s/.test(b)&&b!=="/"&&(i="attr-name",s=b,a=o.length-1);break;case"rawtext":o+=b,d=(d+b.toLowerCase()).slice(-9),(d.endsWith("<\/script>")||d.endsWith("</style>"))&&(i="text",d="",f="");break;case"attr-name":b==="="?(i="after-eq",o+=b):/\s/.test(b)?(i="in-tag",s="",o+=b):b===">"?(i="text",s="",o+=b):(s+=b,o+=b);break;case"after-eq":b==='"'||b==="'"?(i="attr-quoted",c=b,o+=b):/\s/.test(b)?(i="in-tag",s="",o+=b):b===">"?(i="text",s="",o+=b):(i="attr-unquoted",o+=b);break;case"attr-unquoted":/\s/.test(b)?(i="in-tag",s="",o+=b):(b===">"&&(i="text",s=""),o+=b);break;case"attr-quoted":o+=b,b===c&&(i="in-tag",s="");break;case"skip-attr":if(b===c){if(u){let E=u.firstPartIdx,x=[];for(let w=E;w<n.length;w++)(n[w].kind==="noop"||n[w].kind==="attr-mixed")&&x.push(w);let v=[],k=t[x[0]],N=k.lastIndexOf(c);v.push(N>=0?k.slice(N+1):k);for(let w=1;w<x.length;w++)v.push(t[x[w]]);let _=t[x[x.length-1]+1],h=_.indexOf(c);v.push(h>=0?_.slice(0,h):_),n[E]={kind:"attr-mixed",path:[],name:u.name,statics:v,group:x};for(let w=1;w<x.length;w++)n[x[w]]={kind:"noop",path:[],mixedAnchor:E};u=null}i="in-tag",s=""}break}}if(y<t.length-1){let S=n.length;if(i==="comment"){l=0,n.push({kind:"noop",path:[]});continue}if(i==="rawtext"){d="",n.push({kind:"noop",path:[]});continue}if(i==="text")o+=`<!--${F}${S}-->`,n.push({kind:"child",path:[]});else if(i==="in-tag"){let b=`data-${F}${S}`;o+=`${b}=""`,n.push({kind:"element",path:[]})}else if(i==="after-eq"){let b=s[0],E=s.slice(1);if(Or(b)){o=o.slice(0,a);let x=Vt[b],v=`data-${F}${S}`;o+=`${v}=""`,n.push({kind:x,path:[],name:E})}else{o=o.slice(0,a);let x=`data-${F}${S}`;o+=`${x}=""`,n.push({kind:"attr",path:[],name:s})}i="in-tag",s=""}else if(i==="attr-quoted"||i==="attr-unquoted"){o=o.slice(0,a);let b=`data-${F}${S}`;o+=`${b}=""`,u={name:s,firstPartIdx:S},n.push({kind:"noop",path:[]}),i="skip-attr"}else i==="skip-attr"&&n.push({kind:"noop",path:[]})}}let p=document.createElement("template");p.innerHTML=o,wu(p.content,n);let m=Su(p.content,n);return r={templateEl:p,parts:n,formActions:m},ro.set(t,r),r}function wu(e,t){let r=e.querySelectorAll("slot");for(let n of r){n.setAttribute(L,"");let o=t.length;n.setAttribute(`data-${F}${o}`,""),t.push({kind:"slot",path:[]})}}function Su(e,t){let r=[],n=[];function o(i){for(let s=0;s<i.childNodes.length;s++){let a=i.childNodes[s];if(r.push(s),a.nodeType===8){let c=a.data;if(c.startsWith(F)){let l=Number(c.slice(F.length));t[l]&&t[l].kind==="child"&&(t[l].path=r.slice())}}else if(a.nodeType===1){let c=a,l=[],u=[];for(let f of c.attributes)if(f.name.startsWith(`data-${F}`)){let d=Number(f.name.slice(`data-${F}`.length));t[d]&&t[d].kind!=="child"&&(t[d].path=r.slice(),u.push({idx:d,kind:t[d].kind,name:t[d].name||""})),l.push(f.name)}if(c.localName==="form"||c.localName==="button"||c.localName==="input"){let f=_u(c,u,t);f&&n.push(f)}for(let f of l)c.removeAttribute(f);o(a)}r.pop()}}return o(e),n.length?n:null}function _u(e,t,r){let n=e.localName==="form",o=n?"action":"formaction",i=n?"method":"formmethod",s=n?"enctype":"formenctype",a=t.filter(g=>g.kind==="attr"&&g.name.toLowerCase()===o);if(!a.length)return null;let c=[],l=[],u=[],f=n?[]:t.filter(g=>g.name.toLowerCase()==="name"&&(g.kind==="attr"||g.kind==="attr-mixed"||g.kind==="bool")).map(g=>({i:g.idx,kind:g.kind})),d=!n&&e.hasAttribute("name"),p=!n&&e.hasAttribute("form"),m=!n&&e.hasAttribute("value"),y=n?[]:t.filter(g=>g.name.toLowerCase()==="value"&&(g.kind==="attr"||g.kind==="attr-mixed"||g.kind==="bool")).map(g=>({i:g.idx,kind:g.kind}));for(let g of t){let S=String(g.name).toLowerCase();if(g.kind==="prop"){n?(S==="method"||S==="enctype"||S==="encoding")&&u.push(g.name):Jt(S)&&u.push(g.name);continue}if(S!==i&&S!==s||g.kind!=="attr"&&g.kind!=="attr-mixed"&&g.kind!=="bool")continue;let b=r[g.idx],E={i:g.idx,kind:g.kind};g.kind==="attr-mixed"&&(E.statics=b.statics||[],E.group=b.group||[]),(S===i?c:l).push(E)}return{isForm:n,tag:e.localName,actionIdxs:a.map(g=>g.idx),duplicateAction:a.length>1,staticAction:e.getAttribute(o)!=null,authoredName:d,authoredValue:m,authoredForm:p,propAttrs:u,nameParts:f,valueParts:y,staticMethod:e.getAttribute(i),staticEnctype:e.getAttribute(s),methodParts:c,enctypeParts:l}}Ht();Ce();Mr();rr();var pe=null,ze=!1,ar=0,sr=null,zi=0,Na=(e,t)=>Object.is(e,t),io=()=>{},Ca=()=>!1;function Ra(e,t){e.liveConsumers||(e.liveConsumers=new Map);let r=e.liveConsumers.size===0;if(e.liveConsumers.set(t,(e.liveConsumers.get(t)||0)+1),r){if(e.producers&&e.producers.length>0)for(let n of e.producers)Ra(n,e);if(e.watched)try{e.watched.call(e.wrapper)}catch(n){console.error(n)}}}function Kr(e,t){if(!e.liveConsumers)return;let r=e.liveConsumers.get(t);if(r!==void 0){if(r>1){e.liveConsumers.set(t,r-1);return}if(e.liveConsumers.delete(t),e.liveConsumers.size===0){if(e.producers&&e.producers.length>0)for(let n of e.producers)Kr(n,e);if(e.unwatched)try{e.unwatched.call(e.wrapper)}catch(n){console.error(n)}}}}function Qi(e){if(ze)throw new Error("Signal read during notification phase");if(pe===null)return;let t=pe,r=t.nextProducerIndex++;r<t.producers.length&&t.producers[r]!==e&&Ji(t)&&Kr(t.producers[r],t),t.producers[r]!==e&&(t.producers[r]=e,Ji(t)&&Ra(e,t)),t.producerLastReadVersions[r]=e.version}function Ji(e){return e.consumerIsAlwaysLive||e.liveConsumers&&e.liveConsumers.size>0}function La(e){if(!e.liveConsumers||e.liveConsumers.size===0)return;let t=ze;ze=!0;try{for(let r of e.liveConsumers.keys())r.dirty||Au(r)}finally{ze=t}}function Au(e){e.dirty=!0,La(e),e.consumerMarkedDirty.call(e.wrapper||e)}function so(e){if(!(!e.dirty&&e.lastCleanEpoch===ar)){if(!e.producerMustRecompute()&&!xu(e)){e.dirty=!1,e.lastCleanEpoch=ar;return}e.producerRecomputeValue(),e.dirty=!1,e.lastCleanEpoch=ar}}function xu(e){for(let t=0;t<e.producers.length;t++){let r=e.producers[t],n=e.producerLastReadVersions[t];if(n!==r.version||(so(r),n!==r.version))return!0}return!1}function Zi(e){e&&(e.nextProducerIndex=0);let t=pe;return pe=e,t}function Xi(e,t){if(pe=t,!!e){if(Ji(e))for(let r=e.nextProducerIndex;r<e.producers.length;r++)Kr(e.producers[r],e);for(;e.producers.length>e.nextProducerIndex;)e.producers.pop(),e.producerLastReadVersions.pop()}}var ao=class{constructor(t,r){this.__value=t,this.version=0,this.lastCleanEpoch=ar,this.dirty=!1,this.producers=[],this.producerLastReadVersions=[],this.liveConsumers=void 0,this.consumerAllowSignalWrites=!0,this.consumerIsAlwaysLive=!1,this.producerMustRecompute=Ca,this.producerRecomputeValue=io,this.consumerMarkedDirty=io,this.wrapper=this,this.__isSignal=!0,this.__equal=r?.equals||Na,this.watched=r?.[es],this.unwatched=r?.[ts]}get(){return Qi(this),this.__value}peek(){return this.__value}set(t){if(ze)throw new Error("Signal write during notification phase");this.__equal.call(this,this.__value,t)||(this.__value=t,this.version++,ar++,sr!==null?Oa(this):La(this))}};function Oa(e){let t=ze;ze=!0;try{if(!e.liveConsumers)return;for(let r of e.liveConsumers.keys())r.dirty||(r.dirty=!0,r.__isWatcher?sr.add(r):Oa(r))}finally{ze=t}}var Gi=Symbol("unset"),Yi=Symbol("computing"),oo=Symbol("errored"),zr=class{constructor(t,r){this.__fn=t,this.__value=Gi,this.__error=null,this.version=0,this.lastCleanEpoch=-1,this.dirty=!0,this.producers=[],this.producerLastReadVersions=[],this.nextProducerIndex=0,this.liveConsumers=void 0,this.consumerAllowSignalWrites=!1,this.consumerIsAlwaysLive=!1,this.wrapper=this,this.__isSignal=!0,this.__isComputed=!0,this.__equal=r?.equals||Na,this.watched=r?.[es],this.unwatched=r?.[ts];let n=this;this.producerMustRecompute=function(){return n.__value===Gi||n.__value===Yi},this.producerRecomputeValue=function(){if(n.__value===Yi)throw new Error("Detected cycle in computations.");let o=n.__value;n.__value=Yi;let i=Zi(n),s,a=!1;try{s=n.__fn.call(n.wrapper)}catch(l){s=oo,n.__error=l,a=!0}finally{Xi(n,i)}if(!a&&(o!==Gi&&o!==oo)&&n.__equal.call(n.wrapper,o,s)){n.__value=o;return}n.__value=s,n.version++},this.consumerMarkedDirty=io}get(){if(so(this),Qi(this),this.__value===oo)throw this.__error;return this.__value}peek(){if(so(this),this.__value===oo)throw this.__error;return this.__value}},co=class{constructor(t){this.__notify=t,this.version=0,this.lastCleanEpoch=ar,this.dirty=!1,this.producers=[],this.producerLastReadVersions=[],this.nextProducerIndex=0,this.liveConsumers=void 0,this.consumerAllowSignalWrites=!1,this.consumerIsAlwaysLive=!0,this.producerMustRecompute=Ca,this.producerRecomputeValue=io,this.wrapper=this,this.__isWatcher=!0;let r=this;this.consumerMarkedDirty=function(){r.__fire()}}__fire(){this.__notify&&this.__notify.call(this)}watch(...t){if(t.length===0){this.dirty=!1;return}let r=Zi(this);try{for(let n of t)Qi(n),n.__isComputed&&so(n)}finally{Xi(this,r)}this.dirty=!1}unwatch(...t){for(let r=this.producers.length-1;r>=0;r--)t.includes(this.producers[r])&&(Kr(this.producers[r],this),this.producers.splice(r,1),this.producerLastReadVersions.splice(r,1),this.nextProducerIndex=Math.min(this.nextProducerIndex,this.producers.length))}getPending(){return this.producers.filter(t=>t.__isComputed&&t.dirty)}observe(t){let r=Zi(this),n;try{n=t()}finally{Xi(this,r)}return this.dirty=!1,n}dispose(){for(let t of this.producers)Kr(t,this);this.producers=[],this.producerLastReadVersions=[],this.__notify=null}},es=Symbol("watched"),ts=Symbol("unwatched");function vu(e){let t=pe;pe=null;try{return e()}finally{pe=t}}function Eu(e){return e.producers.slice()}function Tu(e){return e.liveConsumers?[...e.liveConsumers.keys()]:[]}function ku(e){return!!e.liveConsumers&&e.liveConsumers.size>0}function Nu(e){return e.producers.length>0}function Cu(){return pe&&pe.__isComputed?pe:null}function Ru(e){zi++,sr===null&&(sr=new Set);try{e()}finally{if(zi--,zi===0){let t=sr;sr=null;for(let r of t)r.__fire()}}}var Gr={State:ao,Computed:zr,subtle:{Watcher:co,untrack:vu,introspectSources:Eu,introspectSinks:Tu,hasSinks:ku,hasSources:Nu,currentComputed:Cu,watched:es,unwatched:ts}};function Lu(e,t){return new ao(e,t)}function Ou(e,t){return new zr(e,t)}function ju(e){return!!(e&&typeof e=="object"&&e.__isSignal===!0)}function Pu(e){let t=!1,r=!1,n=new zr(e),o=new co(()=>{t||r||(t=!0,queueMicrotask(()=>{if(t=!1,!r){try{n.get()}catch(i){console.error(i)}o.watch()}}))});o.watch(n);try{n.get()}catch(i){console.error(i)}return()=>{r||(r=!0,o.dispose())}}_t();Wt();var re=null;function ns(e){re=e}function Pa(e,t){let r=e&&e[R]?e:null;return r?wt(r,t):t()}function uo(e){return e?e.nodeType===11&&e.host?e.host:e:null}function os(e,t){let r=e.__commitOwner,n=re;r&&(re=r);try{t()}finally{re=n}}function Jr(e,t){if(e.kind==="noop")return{kind:"noop",mixedAnchor:e.mixedAnchor};let r=t;for(let o of e.path)r=r.childNodes[o];if(e.kind==="child")return{kind:"child",marker:r};let n=r;if(e.kind==="event"){let o={kind:"event",el:n,name:e.name||"",handler:null,dispatcher(i){o.handler?.(i)}};return n.addEventListener(o.name,o.dispatcher),o}if(e.kind==="attr")return{kind:"attr",el:n,name:e.name||""};if(e.kind==="attr-mixed")return{kind:"attr-mixed",el:n,name:e.name||"",statics:e.statics||[],group:e.group||[]};if(e.kind==="prop")return{kind:"prop",el:n,name:e.name||""};if(e.kind==="bool")return{kind:"bool",el:n,name:e.name||""};if(e.kind==="element")return{kind:"element",el:n};if(e.kind==="slot")return{kind:"slot",slotEl:n,applied:!1};throw new Error(`unknown part kind ${e.kind}`)}function me(e,t,r,n,o){if(J(t)){let i=t.value;if(e.kind==="prop"&&e.el[e.name]===i||e.kind==="attr"&&e.el.getAttribute(e.name)===String(i)||e.kind==="bool"&&e.el.hasAttribute(e.name)===!!i)return;t=i}switch(e.kind){case"child":Mu(e,t,o);break;case"attr":{let i=Fe(e.name,t);i===null?e.el.removeAttribute(e.name):at(t,e.name,e.el.localName)||(ae(t,e.name,e.el.localName),e.el.setAttribute(e.name,i));break}case"prop":Ir(t,e.name,e.el.localName),e.el[e.name]=t;break;case"bool":ae(t,e.name,e.el.localName),t?e.el.setAttribute(e.name,""):e.el.removeAttribute(e.name);break;case"event":e.handler=typeof t=="function"?t:null;break;case"element":qu(e,t);break;case"attr-mixed":{let i=e,s=i.statics[0];for(let a=0;a<i.group.length;a++){let c=n?n[i.group[a]]:t;J(c)&&(c=c.value),ae(c,e.name,e.el.localName),s+=String(c??""),s+=i.statics[a+1]||""}e.el.setAttribute(e.name,s);break}case"slot":{if(e.applied)break;let i=e.slotEl,s=()=>{let c=cr(i);if(!c){e.applied=!0;return}if(!c.contains(i)){c.isConnected?queueMicrotask(s):e.applied=!0;return}if(e.applied=!0,Iu(i))return;let l=document.createDocumentFragment();for(;i.firstChild;)l.appendChild(i.firstChild);i[He]=l,queueMicrotask(()=>oe(c))},a=cr(i);a&&a.contains(i)?s():queueMicrotask(s);break}case"noop":break}}function cr(e){let t=e[ht];if(t&&t.isConnected)return t;let r=e.parentElement;for(;r;){if(r[R])return r;r=r.parentElement}return null}function Iu(e){let t=e;for(let r=0;r<128;r++){let n=t.parentNode;if(!n||n===t)return!1;if(n.nodeType===11&&n.host)return!0;t=n}return!1}function qu(e,t){let r=e,n=ft(t)?t.target:void 0,o=r.__refTarget,i=n!==o;if(i&&o)if(typeof o=="function")try{o(void 0)}catch{}else typeof o=="object"&&(o.value=void 0);if(i||r.__refElement!==e.el){if(r.__refTarget=n,n)if(typeof n=="function"){if(!i&&r.__refElement!==void 0)try{n(void 0)}catch{}try{n(e.el)}catch{}}else typeof n=="object"&&(n.value=e.el);r.__refElement=e.el,e.lastTarget=n}}function Mu(e,t,r){return Ku(e,t),Ae(e,t,r)}function Ae(e,t,r){return Pa(e.marker&&e.marker.parentNode,()=>Ia(e,t,r))}function Ia(e,t,r){let n=e.marker;if(J(t))return Ia(e,t.value,r);if(Xt(t)){Ge(e);let i=String(t.value??""),s=document.createElement("template");s.innerHTML=i;let a=[...s.content.childNodes],c=document.createDocumentFragment();for(let l of a)c.appendChild(l);n.parentNode?.insertBefore(c,n),e.child=a;return}if(lt(t)){let i=t,s=e.__keyedKey;s!==void 0&&!Object.is(s,i.key)&&Ge(e),e.__keyedKey=i.key,Ae(e,i.value,r);return}if(ut(t)){let i=t,s=e.__guardDeps,a=i.deps;if(s!==void 0&&(Array.isArray(s)&&Array.isArray(a)?Wu(s,a):Object.is(s,a)))return;let c=Array.isArray(a)?a.slice():a;Ae(e,i.fn(),r),e.__guardDeps=c;return}if(Qt(t)){Ge(e);let i=t.template;if(i&&i.content){let s=i.content.cloneNode(!0),a=[...s.childNodes];n.parentNode?.insertBefore(s,n),e.child=a}return}if(ft(t))return;if(dt(t))return zu(e,t.value,r);if(pt(t))return Gu(e,t.args,r);if(mt(t))return Yu(e,t.signal,r);if(er(t))return Ju(e,t,r);if(tr(t))return Zu(e,t,r);if(ct(t)){if(e.child&&e.child.kind==="repeat"){Fu(e,t,r);return}Ge(e);let i={kind:"repeat",map:new Map};e.child=i,$u(n,i,t,r);return}if(Array.isArray(t)){if(e.child&&e.child.kind==="array"){Uu(e,t,r);return}Ge(e);let i={kind:"array",items:[]};e.child=i,Hu(n,i,t,r);return}if(e.child){let i=e.child;if(i.kind==="repeat")qa(i),e.child=void 0;else if(i.kind==="array")Da(i),e.child=void 0;else if(i.kind==="async-stream")Ha(i),e.child=void 0;else if("strings"in e.child){let s=e.child;if(K(t)&&s.strings===t.strings){At(s,t.values,r);return}lr(s.startNode,s.endNode),e.child=void 0}else{for(let s of e.child)s.parentNode&&s.parentNode.removeChild(s);e.child=void 0}}if(t==null||t===!1||t===!0)return;if(K(t)){let i=t,{templateEl:s,parts:a,formActions:c}=ir(i),l=s.content.cloneNode(!0),u=document.createComment(`${F}s`),f=document.createComment(`${F}e`),d=a.map(y=>Jr(y,l)),p=[];for(let y=0;y<i.values.length;y++)me(d[y],i.values[y],void 0,i.values,r),p.push(i.values[y]);r&&r(c,d,i.values);let m=[u,...l.childNodes,f];n.parentNode?.insertBefore(Du(m),n);for(let y of d)y.kind==="slot"&&me(y,void 0,void 0,[],r);e.child={strings:i.strings,bound:d,lastValues:p,startNode:u,endNode:f};return}let o=document.createTextNode(String(t));n.parentNode?.insertBefore(o,n),e.child=[o]}function At(e,t,r){for(let n=0;n<t.length;n++){let o=t[n];if(Object.is(o,e.lastValues[n]))continue;let i=e.bound[n],s=i.mixedAnchor;try{i.kind==="noop"&&s!=null?me(e.bound[s],t[s],e.lastValues[s],t,r):me(i,o,e.lastValues[n],t,r)}catch(a){throw e.lastValues[n]=ja,i.kind==="noop"&&s!=null&&(e.lastValues[s]=ja),a}e.lastValues[n]=o}r&&r(ro.get(e.strings)?.formActions??null,e.bound,t)}var ja=Symbol("webjs.commitFailed");function lr(e,t){let r=e.parentNode;if(!r)return;let n=e;for(;n&&n!==t;){let o=n.nextSibling;n.parentNode?.removeChild(n),n=o}t.parentNode===r&&r.removeChild(t)}function Du(e){let t=document.createDocumentFragment();for(let r of e)t.appendChild(r);return t}function is(e,t){let{templateEl:r,parts:n,formActions:o}=ir(e),i=r.content.cloneNode(!0),s=document.createComment(`${F}s`),a=document.createComment(`${F}e`),c=n.map(f=>Jr(f,i)),l=[];for(let f=0;f<e.values.length;f++)me(c[f],e.values[f],void 0,e.values,t),l.push(e.values[f]);t&&t(o,c,e.values);for(let f of c)f.kind==="slot"&&me(f,void 0,void 0,[],t);let u=document.createDocumentFragment();for(u.appendChild(s);i.firstChild;)u.appendChild(i.firstChild);return u.appendChild(a),{inst:{strings:e.strings,bound:c,lastValues:l,startNode:s,endNode:a},frag:u}}function Yr(e){for(let t of e.bound)if(t.kind==="event"&&t.el.removeEventListener(t.name,t.dispatcher),t.kind==="element"){let r=t.lastTarget;if(r){if(typeof r=="function")try{r(void 0)}catch{}else if(typeof r=="object")try{r.value=void 0}catch{}t.lastTarget=void 0,t.__lastEl=void 0}}}function $u(e,t,r,n){let{items:o,keyFn:i,templateFn:s}=r,a=e.parentNode;if(!a)return;let c=document.createDocumentFragment();for(let l=0;l<o.length;l++){let u=i(o[l],l),f=s(o[l],l);if(!K(f))continue;let{inst:d,frag:p}=is(f,n);t.map.set(u,d),c.appendChild(p)}a.insertBefore(c,e)}function Fu(e,t,r){let n=e.marker,o=n.parentNode;if(!o)return;let i=e.child,{items:s,keyFn:a,templateFn:c}=t,l=new Map;try{for(let u=0;u<s.length;u++){let f=a(s[u],u),d=c(s[u],u);if(!K(d))continue;let p=i.map.get(f);if(p&&p.strings===d.strings)At(p,d.values,r),rs(p.startNode,p.endNode,o,n),l.set(f,p),i.map.delete(f);else{p&&(i.map.delete(f),Yr(p),lr(p.startNode,p.endNode));let{inst:m,frag:y}=is(d,r);o.insertBefore(y,n),l.set(f,m)}}for(let[u,f]of[...i.map]){i.map.delete(u);try{Yr(f)}finally{lr(f.startNode,f.endNode)}}i.map=l}catch(u){for(let[f,d]of l)i.map.set(f,d);throw u}}function qa(e){for(let[t,r]of[...e.map]){e.map.delete(t);try{Yr(r)}finally{lr(r.startNode,r.endNode)}}e.map.clear()}function Bu(e){return e.type==="tpl"?e.inst.startNode:e.type==="text"?e.node:null}function lo(e){e.type==="tpl"?(Yr(e.inst),lr(e.inst.startNode,e.inst.endNode)):e.type==="text"&&e.node.parentNode?.removeChild(e.node)}function Ma(e,t){if(J(e)&&(e=e.value),K(e)){let{inst:r,frag:n}=is(e,t);return{item:{type:"tpl",inst:r},frag:n}}if(e!=null&&e!==!1&&e!==!0){let r=document.createTextNode(String(e));return{item:{type:"text",node:r},frag:r}}return{item:{type:"empty"},frag:null}}function Hu(e,t,r,n){let o=e.parentNode;if(!o)return;let i=document.createDocumentFragment(),s=[];for(let a of r){let{item:c,frag:l}=Ma(a,n);l&&i.appendChild(l),s.push(c)}o.insertBefore(i,e),t.items=s}function Uu(e,t,r){let n=e.marker,o=n.parentNode;if(!o)return;let i=e.child,s=i.items,a=[],c=0;try{for(let l=0;l<t.length;l++){let u=t[l],f=J(u)?u.value:u,d=s[l];if(K(f)){let y=f;if(d&&d.type==="tpl"&&d.inst.strings===y.strings){At(d.inst,y.values,r),a.push(d),c=l+1;continue}}else if(f!=null&&f!==!1&&f!==!0){if(d&&d.type==="text"){let y=String(f);d.node.data!==y&&(d.node.data=y),a.push(d),c=l+1;continue}}else{d&&lo(d),a.push({type:"empty"}),c=l+1;continue}let{item:p,frag:m}=Ma(f,r);m&&o.insertBefore(m,Vu(s,l,n)),a.push(p),d&&lo(d),c=l+1}for(let l=t.length;l<s.length;l++)lo(s[l]),c=l+1;i.items=a}catch(l){throw i.items=a.concat(s.slice(c)),l}}function Vu(e,t,r){for(let n=t;n<e.length;n++){let o=Bu(e[n]);if(o&&o.parentNode)return o}return r}function Da(e){for(let t of e.items)lo(t);e.items=[]}function rs(e,t,r,n){if(t.nextSibling===n&&e.parentNode===r)return;let o=document.createDocumentFragment(),i=e;for(;i;){let s=i.nextSibling;if(o.appendChild(i),i===t)break;i=s}r.insertBefore(o,n)}function Wu(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function Ge(e){let t=e;if(t.__untilState&&(t.__untilState.aborted=!0,t.__untilState=void 0),t.__watchSub&&$a(t),!e.child)return;let r=e.child;if(r.kind==="repeat")qa(r);else if(r.kind==="array")Da(r);else if(r.kind==="async-stream")Ha(r);else if("strings"in r){let n=e.child;Yr(n),lr(n.startNode,n.endNode)}else for(let n of e.child)n.parentNode&&n.parentNode.removeChild(n);e.child=void 0}function Ku(e,t){let r=e;r.__untilState&&!pt(t)&&(r.__untilState.aborted=!0,r.__untilState=void 0),r.__guardDeps!==void 0&&!ut(t)&&(r.__guardDeps=void 0),r.__cacheMap&&!dt(t)&&(r.__cacheMap=void 0),r.__keyedKey!==void 0&&!lt(t)&&(r.__keyedKey=void 0),r.__watchSub&&!mt(t)&&$a(r)}function zu(e,t,r){let n=e.marker,o=e,i=o.__cacheMap;i||(i=new Map,o.__cacheMap=i);let s=e.child;if(s&&"strings"in s){let c=s;if(K(t)&&c.strings===t.strings){At(c,t.values,r);return}let l=document.createDocumentFragment();rs(c.startNode,c.endNode,l,null),i.set(c.strings,{inst:c,holder:l}),e.child=void 0}if(K(t)){let c=t,l=i.get(c.strings);if(l){i.delete(c.strings),e.child&&Ge(e),rs(l.inst.startNode,l.inst.endNode,n.parentNode,n),At(l.inst,c.values,r),e.child=l.inst;let u=new Set;for(let f=l.inst.startNode.nextSibling;f&&f!==l.inst.endNode;f=f.nextSibling){if(f.nodeType!==1)continue;let d=f;if(d.matches("slot[data-webjs-light]")){let p=cr(d);p&&u.add(p)}for(let p of d.querySelectorAll("slot[data-webjs-light]")){let m=cr(p);m&&u.add(m)}}for(let f of u)oe(f);return}}Ae(e,t,r)}function Gu(e,t,r){let n=e;re&&(n.__commitOwner=uo(re));let o=n.__untilState,i=n.__untilArgs,s=(p,m)=>!!(Object.is(p,m)||K(p)&&K(m)&&p.strings===m.strings),c=i&&i.length===t.length&&i.every((p,m)=>s(p,t[m]))&&o?o.highestResolved:1/0;o&&(o.aborted=!0),n.__untilArgs=t.slice();let l={aborted:!1,highestResolved:c};n.__untilState=l;let u=-1,f;for(let p=0;p<t.length;p++){let m=t[p];if(!m||typeof m.then!="function"){u=p,f=m;break}}u!==-1&&u<=l.highestResolved?(Ae(e,f,r),l.highestResolved=u):u===-1&&!n.__untilEverRendered&&Ae(e,"",r),n.__untilEverRendered=!0;let d=Math.min(u===-1?t.length:u,l.highestResolved);for(let p=0;p<d;p++){let m=t[p];!m||typeof m.then!="function"||Promise.resolve(m).then(y=>{if(!l.aborted&&!(p>=l.highestResolved)){try{os(e,()=>Ae(e,y,r))}catch(g){ss(e,g);return}l.highestResolved=p}},()=>{})}}function ss(e,t){let r;try{r=t instanceof Error?t:new Error(String(t))}catch{r=new Error("render error (unstringifiable thrown value)")}let n=e.__commitOwner;if(n&&typeof n._handleRenderError=="function"){n._handleRenderError(r);return}throw r}function Yu(e,t,r){let n=e;if(re&&(n.__commitOwner=uo(re)),n.__watchSig===t&&n.__watchSub){let s;n.__watchSub.observe(()=>{s=t.get()}),Ae(e,s,r);return}n.__watchSub&&(n.__watchSub.dispose(),n.__watchSub=void 0),n.__watchSig=t;let o=new Gr.subtle.Watcher(()=>{queueMicrotask(()=>{if(n.__watchSub!==o)return;let s;try{o.observe(()=>{s=t.get()}),os(e,()=>Ae(e,s,r))}catch(a){ss(e,a)}})});n.__watchSub=o;let i;o.observe(()=>{i=t.get()}),Ae(e,i,r)}function $a(e){e.__watchSub&&(e.__watchSub.dispose(),e.__watchSub=void 0,e.__watchSig=void 0)}function Ju(e,t,r){let n=e;re&&(n.__commitOwner=uo(re));let o=e.child;if(o&&o.kind==="async-stream"&&o.mode==="append"&&o.iterable===t.iterable)return;Ge(e);let i=t.iterable[Symbol.asyncIterator](),s={kind:"async-stream",mode:"append",aborted:!1,iterable:t.iterable,iterator:i,nodes:[]};e.child=s,Fa(s,e,t,r)}function Zu(e,t,r){let n=e;re&&(n.__commitOwner=uo(re));let o=e.child;if(o&&o.kind==="async-stream"&&o.mode==="replace"&&o.iterable===t.iterable)return;Ge(e);let i=t.iterable[Symbol.asyncIterator](),s={kind:"async-stream",mode:"replace",aborted:!1,iterable:t.iterable,iterator:i,nodes:[]};e.child=s,Fa(s,e,t,r)}async function Fa(e,t,r,n){let o=t.marker,i=0;for(;!e.aborted;){let s,a;try{if(s=await e.iterator.next(),e.aborted||s.done)break;a=r.mapper?r.mapper(s.value,i):s.value}catch(c){typeof console<"u"&&console.error("[webjs] asyncStream error:",c);return}try{os(t,()=>{let c=Ba(a,n);Pa(o.parentNode,()=>{if(e.mode==="replace"){for(let u of e.nodes)u.parentNode&&u.parentNode.removeChild(u);e.nodes=[]}let l=document.createDocumentFragment();for(let u of c)l.appendChild(u);o.parentNode?.insertBefore(l,o),e.nodes.push(...c)})})}catch(c){e.aborted=!0;try{e.iterator.return?.()?.catch?.(()=>{})}catch{}ss(t,c);return}i++}}function Ba(e,t){if(J(e)&&(e=e.value),e==null||e===!1||e===!0)return[];if(K(e)){let r=e,{templateEl:n,parts:o,formActions:i}=ir(r),s=n.content.cloneNode(!0),a=o.map(c=>Jr(c,s));for(let c=0;c<r.values.length;c++)me(a[c],r.values[c],void 0,r.values,t);t&&t(i,a,r.values);for(let c of a)c.kind==="slot"&&me(c,void 0,void 0,[],t);return[...s.childNodes]}if(Array.isArray(e)){let r=[];for(let n of e)r.push(...Ba(n,t));return r}return[document.createTextNode(String(e))]}function Ha(e){e.aborted=!0;for(let t of e.nodes)t.parentNode&&t.parentNode.removeChild(t);e.nodes=[];try{e.iterator.return?.()?.catch?.(()=>{})}catch{}}function vt(e,t){let r=t,n=r[V];r[V]=!0;let o=re;ns(t);try{let i=r[Wr];if(K(e)){let s=e;if(i&&i.strings===s.strings){At(i,s.values,po);return}i&&Ua(i,t);let a=t.firstChild;a&&a.nodeType===8&&a.data==="webjs-hydrate"&&a.remove(),r[Wr]=null;let c=ef(s,t);r[Wr]=c;return}if(i&&Ua(i,t),r[Wr]=null,t.replaceChildren(),e==null||e===!1||e===!0)return;if(Array.isArray(e)){for(let s of e){let a=document.createTextNode(String(s??""));t.appendChild(a)}return}t.appendChild(document.createTextNode(String(e)))}finally{ns(o),r[V]=n,n||Zn(r)}}function po(e,t,r){if(e)for(let n of[!0,!1])for(let o of e){if(o.isForm!==n)continue;let i=o.actionIdxs[0],s=o.isForm?"action":"formaction";for(let l of o.actionIdxs)if(at(xt(r[l]),s,o.tag)){i=l;break}let a=t[i];if(!a||!a.el)continue;let c=xt(r[i]);if(o.isForm)fa(a.el,c,fo(o.methodParts,o.staticMethod,r),fo(o.enctypeParts,o.staticEnctype,r),o);else{let l=u=>u.some(f=>f.kind==="bool"?!!xt(r[f.i]):f.kind==="attr"?Fe("name",xt(r[f.i]))!==null:!0);Qu(a.el,c,o,l(o.nameParts),l(o.valueParts),fo(o.methodParts,o.staticMethod,r),fo(o.enctypeParts,o.staticEnctype,r))}}}function Xu(e){(no.has(e)||e.getAttribute("name")===B)&&(e.getAttribute("name")===B&&e.removeAttribute("name"),e.removeAttribute("value"),no.delete(e))}function Qu(e,t,r,n,o,i,s){let a=typeof t=="function"?zn(t):null;if(!a){typeof t=="function"&&Be(null,e.localName),Xu(e),da(e,i,s,r.propAttrs);return}Yt(r.duplicateAction,e.localName),pi(r.propAttrs,e.localName),r.staticAction&&di(e.localName),(r.authoredValue||o)&&zt(e.localName),(r.authoredName||n)&&Kt(e.getAttribute("name")||B,e.localName,!1),(r.authoredForm||e.hasAttribute("form"))&&Gt(e.localName),fi(e.localName,e.getAttribute("type"));let c=hi(e.localName,i,s);e.removeAttribute("formaction"),e.setAttribute("name",B),e.setAttribute("value",a),jr(e,"formmethod",i,c.formMethod),jr(e,"formenctype",s,c.formEnctype),no.set(e,a)}function fo(e,t,r){for(let n of e){if(n.kind==="bool")return xt(r[n.i])?"":G;if(n.kind==="attr"){let a=Fe("method",xt(r[n.i]));return a===null?G:a}let o=n.statics||[],i=n.group||[],s=o[0]||"";for(let a=0;a<i.length;a++)s+=String(xt(r[i[a]])??""),s+=o[a+1]||"";return s}return t??G}function xt(e){return J(e)?e.value:e}function ef(e,t){let{templateEl:r,parts:n,formActions:o}=ir(e),i=r.content.cloneNode(!0),s=document.createComment(`${F}s`),a=document.createComment(`${F}e`),c=n.map(f=>Jr(f,i)),l=[];for(let f=0;f<e.values.length;f++)me(c[f],e.values[f],void 0,e.values,po),l.push(e.values[f]);po(o,c,e.values),t.replaceChildren(s,...i.childNodes,a);let u=t.nodeType===1&&t[R]?t:null;for(let f of c)f.kind==="slot"&&(u&&f.slotEl&&(f.slotEl[ht]=u),me(f,void 0,void 0,[],po));return{strings:e.strings,bound:c,lastValues:l,startNode:s,endNode:a}}function Ua(e,t){for(let r of e.bound){if(r.kind==="event"&&r.el.removeEventListener(r.name,r.dispatcher),r.kind==="element"){let n=r.lastTarget;if(n){if(typeof n=="function")try{n(void 0)}catch{}else if(typeof n=="object")try{n.value=void 0}catch{}r.lastTarget=void 0,r.__lastEl=void 0}}if(r.kind==="slot"){let n=cr(r.slotEl);n&&Ki(n,r.slotEl)}}t.replaceChildren()}function mo(e,t){if(e.converter&&e.converter.fromAttribute)return e.converter.fromAttribute(t,e.type);if(e.type===Number)return t==null?null:Number(t);if(e.type===Boolean)return t!=null&&t!=="false";if(e.type===Object||e.type===Array){if(t==null)return null;try{return JSON.parse(t)}catch{return null}}return t}function tf(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function ho(e,t){let r;for(let{propName:n,def:o,primary:i,alias:s}of Wa(e)){if(i===t)return{propName:n,def:o};r===void 0&&s===t&&(r={propName:n,def:o})}return r}function Va(e){let t=new Set,r=Wa(e);for(let{primary:n}of r)t.add(n);for(let{alias:n}of r)n&&t.add(n);return[...t]}function Wa(e){let t=e&&e.properties||{},r=[];for(let[n,o]of Object.entries(t)){let i=typeof o=="object"&&o!==null?o:{type:o};if(i.state)continue;let s=i.attribute||tf(n),a=n.toLowerCase(),c=!i.attribute&&a!==s?a:void 0;r.push({propName:n,def:i,primary:s,alias:c})}return r}var Ka=null;function go(e){Ka=e||null}function as(){return Ka||void 0}Ce();var za=Symbol.for("webjs:registry"),Ga=Symbol.for("webjs:classToTag"),bo=globalThis,xe=bo[za]||(bo[za]=new Map),Ya=bo[Ga]||(bo[Ga]=new WeakMap),yo=typeof window<"u"&&typeof customElements<"u";function cs(e,t){if(!e||typeof e!="string"||!e.includes("-"))throw new Error(`customElements.define: tag "${e}" must contain a hyphen (HTML spec)`);let r=t.lazy===!0,n=xe.get(e);n?(n.cls=t,n.lazy=r):xe.set(e,{cls:t,moduleUrl:null,lazy:r,tag:e}),Ya.set(t,e)}if(yo){let e=customElements.define.bind(customElements);customElements.define=function(t,r,n){customElements.get(t)||e(t,r,n),cs(t,r)}}if(!yo){let e=globalThis;e.customElements||(e.customElements={define(t,r){cs(t,r)},get(t){return xe.get(t)?.cls},upgrade(){},whenDefined(t){let r=xe.get(t);return Promise.resolve(r?.cls)}})}function ls(e,t){yo?customElements.define(e,t):cs(e,t)}function rf(e,t){if(yo)return;let r=xe.get(e);if(r){r.moduleUrl=t;return}xe.set(e,{cls:null,moduleUrl:t,lazy:!1,tag:e})}function us(e){return xe.get(e)?.cls}function nf(e){return xe.get(e)?.moduleUrl||null}function of(e){return xe.get(e)?.lazy===!0}function Et(e){return Ya.get(e)}function fs(){return[...xe.keys()]}kt();_t();function yf(){return{states:new Set,shadowRoot:null,form:null,labels:[],role:"",willValidate:!0,validity:{},validationMessage:"",setFormValue(){},setValidity(){},checkValidity(){return!0},reportValidity(){return!0}}}var en=class{constructor(){this.__ssrAttrs=new Map,this.__internals=null}get attributes(){return[...this.__ssrAttrs].map(([t,r])=>({name:t,value:r}))}getAttribute(t){let r=this.__ssrAttrs.get(String(t).toLowerCase());return r===void 0?null:r}setAttribute(t,r){this.__ssrAttrs.set(String(t).toLowerCase(),String(r))}removeAttribute(t){this.__ssrAttrs.delete(String(t).toLowerCase())}hasAttribute(t){return this.__ssrAttrs.has(String(t).toLowerCase())}toggleAttribute(t,r){let n=String(t).toLowerCase(),o=this.__ssrAttrs.has(n);return(r===void 0?!o:r)?(this.__ssrAttrs.set(n,""),!0):(this.__ssrAttrs.delete(n),!1)}getAttributeNames(){return[...this.__ssrAttrs.keys()]}closest(t){let r=String(t).trim().toLowerCase();if(!/^[a-z][a-z0-9-]*$/.test(r))return null;if(this.__ssrTag===r)return this;let n=this.__ssrAncestors;if(!Array.isArray(n))return null;for(let o=n.length-1;o>=0;o--)if(n[o]&&n[o].__ssrTag===r)return n[o];return null}get dataset(){if(this.__dataset)return this.__dataset;let t=this,r=n=>"data-"+String(n).replace(/[A-Z]/g,o=>"-"+o.toLowerCase());return this.__dataset=new Proxy({},{get(n,o){if(typeof o!="string")return;let i=t.getAttribute(r(o));return i===null?void 0:i},set(n,o,i){return typeof o=="string"&&t.setAttribute(r(o),i),!0},has(n,o){return typeof o=="string"&&t.hasAttribute(r(o))},deleteProperty(n,o){return typeof o=="string"&&t.removeAttribute(r(o)),!0},ownKeys(){return t.getAttributeNames().filter(n=>n.startsWith("data-")).map(n=>n.slice(5).replace(/-([a-z])/g,(o,i)=>i.toUpperCase()))},getOwnPropertyDescriptor(n,o){if(typeof o=="string"&&t.hasAttribute(r(o)))return{enumerable:!0,configurable:!0,value:t.getAttribute(r(o))}}}),this.__dataset}get className(){return this.getAttribute("class")??""}set className(t){this.setAttribute("class",t)}get hidden(){return this.hasAttribute("hidden")}set hidden(t){this.toggleAttribute("hidden",!!t)}get id(){return this.getAttribute("id")??""}set id(t){this.setAttribute("id",t)}get title(){return this.getAttribute("title")??""}set title(t){this.setAttribute("title",t)}get slot(){return this.getAttribute("slot")??""}set slot(t){this.setAttribute("slot",t)}get role(){return this.getAttribute("role")}set role(t){t==null?this.removeAttribute("role"):this.setAttribute("role",t)}get tabIndex(){let t=this.getAttribute("tabindex");return t===null?-1:Number.parseInt(t,10)||0}set tabIndex(t){this.setAttribute("tabindex",String(t))}addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return this.__internals=yf(),this.__internals}},wf=["ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"];for(let e of wf){let t="aria-"+e.slice(4).toLowerCase();Object.defineProperty(en.prototype,e,{configurable:!0,get(){return this.getAttribute(t)},set(r){r==null?this.removeAttribute(t):this.setAttribute(t,String(r))}})}function ec(e,t){return e!==t}function tc(e){try{return String(e)}catch{return Object.prototype.toString.call(e)}}function ds(e,t,r){if(typeof console>"u"||!console.warn)return;let n=Et(e.constructor)||e.tagName?.toLowerCase()||"unknown";console.warn(`[webjs] reflect:true property "${t}" on <${n}> holds a function (or an array carrying one), which has no HTML attribute representation. Removing "${r}" instead of stringifying it (a stringified function writes its source into the page, so a server action's body would ship to the browser). Pass a string, or drop reflect on this property.`)}function rc(e,t,r,n){if(typeof console>"u"||!console.warn)return;let o=Et(e.constructor)||e.tagName?.toLowerCase()||"unknown";console.warn(`[webjs] reflect:true property "${t}" on <${o}> holds a value JSON.stringify cannot serialize (a cycle, a BigInt, or a throwing toJSON), so it has no HTML attribute representation. Removing "${r}" instead. Detail: ${n}`)}function nc(e,t={}){return e&&typeof e=="object"&&!("call"in e)&&(t=e,e=void 0),{...e?{type:e}:{},...t}}var ic=typeof window<"u"&&typeof HTMLElement<"u",Sf=ic?HTMLElement:en,sc=Symbol("webjs.factoryProps"),oc=new WeakSet,ur=class e extends Sf{static shadow=!1;static hydrate=void 0;static properties={};static styles=null;static register(t){ls(t,this)}static get observedAttributes(){return Va(this)}constructor(){super(),this._renderRoot=null,this._scheduled=!1,this._connected=!1,this.__controllers=new Set,this.__firstRendered=!1,this._changedProperties=new Map,this._updateResolve=null,this._updatePromise=Promise.resolve(!0),this._isUpdating=!1,this._assertFactoryProperties(),this._initializeProperties()}_assertFactoryProperties(){let t=this.constructor;if(oc.has(t))return;let r=t;for(;r&&r!==e;){if(Object.hasOwn(r,"properties")&&!Object.hasOwn(r,sc)){let n=r.name||"a component";throw new Error(`${n}: \`static properties\` is no longer supported. Declare reactive properties via the factory instead: \`class ${n} extends WebComponent({ count: Number })\`. Use the \`prop()\` helper for options (\`prop(Number, { reflect: true })\`) and set defaults in the constructor after \`super()\`. See https://webjs.dev/docs/components.`)}r=Object.getPrototypeOf(r)}oc.add(t)}_initializeProperties(){let r=this.constructor.properties;if(!(!r||typeof r!="object")){this.__propValues={};for(let[n,o]of Object.entries(r)){let i=typeof o=="object"?o:{type:o},s=this[n];Object.defineProperty(this,n,{configurable:!0,enumerable:!0,get:()=>this.__propValues[n],set:a=>{let c=this.__propValues[n];(i.hasChanged||ec)(a,c)&&(this.__propValues[n]=a,i.reflect&&!i.state&&this._connected&&this._reflectAttribute(n,a,i),this.requestUpdate(n,c))}}),s!==void 0?this.__propValues[n]=s:i.default!==void 0&&(this.__propValues[n]=typeof i.default=="function"?i.default():i.default)}}}_reflectAttribute(t,r,n){let o=n.attribute||_f(t);if(!this.__reflectingAttribute){this.__reflectingAttribute=!0;try{if(n.converter&&n.converter.toAttribute){let i=n.converter.toAttribute(r,n.type);i==null?this.removeAttribute(o):this.setAttribute(o,i)}else if(typeof r=="function")this.removeAttribute(o),ds(this,t,o);else if(n.type===Boolean)r?this.setAttribute(o,""):this.removeAttribute(o);else if(r==null)this.removeAttribute(o);else if(n.type===Object||n.type===Array){let i,s=!0;try{i=JSON.stringify(r)}catch(a){s=!1,this.removeAttribute(o),rc(this,t,o,a&&a.message)}s&&this.setAttribute(o,i)}else Gn(r)?(this.removeAttribute(o),ds(this,t,o)):this.setAttribute(o,String(r))}finally{this.__reflectingAttribute=!1}}}connectedCallback(){if(!ic)return;if(this.__webjsPropsHydrated||(this.__webjsPropsHydrated=!0,this._hydratePropAttrs()),this.constructor.hydrate==="visible"&&typeof IntersectionObserver<"u"&&!this.__hydrationActivated){this.__hydrationActivated=!1,this.__hydrationObserver=new IntersectionObserver(r=>{for(let n of r)if(n.isIntersecting){this.__hydrationObserver.unobserve(this),this.__hydrationObserver.disconnect(),this.__hydrationObserver=null,this.__hydrationActivated=!0,this._activate();return}},{rootMargin:"200px"}),this.__hydrationObserver.observe(this);return}this._activate()}_hydratePropAttrs(){let t=[],r=this.attributes;for(let n=0;n<r.length;n++){let o=r[n].name;o.startsWith("data-webjs-prop-")&&t.push(o)}for(let n of t){let o=this.getAttribute(n);if(this.removeAttribute(n),o==null)continue;let i=Af(n.slice(16));try{this[i]=Le(o)}catch(s){console.warn(`[webjs] failed to decode ${n} on <${this.tagName.toLowerCase()}>: ${s&&s.message}`)}}}_activate(){this._connected=!0,this._reflectDeclaredAttributes();let t=this.constructor;if(t.shadow!==!0&&!this.hasAttribute("data-wj-host")&&this.setAttribute("data-wj-host",""),t.shadow===!0){let r=!!this.shadowRoot;this.shadowRoot||this.attachShadow({mode:"open"}),this._renderRoot=this.shadowRoot;let n=t.styles,o=Array.isArray(n)?n:Ut(n)?[n]:[];if(o.length){if(r){let i=this.shadowRoot.querySelector("style");i&&i.remove()}li(this._renderRoot,o)}}else this._renderRoot=this,t.styles&&console.warn(`[webjs] <${Et(t)||this.tagName?.toLowerCase()}> has static shadow = false AND static styles. static styles only works with shadow DOM (adoptedStyleSheets). For light DOM, use global CSS or <style> in render().`),Dr(this)?Ci(this):this.__isHydrating()||this.hasAttribute("data-wj-serialized")||Wi(this)?(this.removeAttribute("data-wj-serialized"),X(this),Ai(this)):_i(this),qi(this),ki(this);for(let r of this.__controllers)r.hostConnected&&r.hostConnected();this._updateResolve===null&&(this._updatePromise=new Promise(r=>{this._updateResolve=r})),this._scheduled=!0,queueMicrotask(()=>{this._scheduled=!1;try{this._performRender()}catch(r){console.error("[webjs] lifecycle hook threw during initial render:",r)}})}__isHydrating(){let t=this.firstChild,r=t!=null&&t.nodeType===8&&t.data==="webjs-hydrate";return r&&(this.__hydratedAtActivate=!0),r}disconnectedCallback(){this._connected=!1,this.__hydrationObserver&&(this.__hydrationObserver.disconnect(),this.__hydrationObserver=null),Ni(this),this.__signalWatcher&&(this.__signalWatcher.dispose(),this.__signalWatcher=void 0);for(let t of this.__controllers)t.hostDisconnected&&t.hostDisconnected()}attributeChangedCallback(t,r,n){if(this.__reflectingAttribute)return;let o=ho(this.constructor,t);if(o===void 0)return;let{propName:i,def:s}=o,a=mo(s,n);this[i]!==a&&(this[i]=a,this._connected&&this.requestUpdate())}requestUpdate(t,r){t!==void 0&&!this._changedProperties.has(t)&&this._changedProperties.set(t,r),this._scheduleUpdate()}_scheduleUpdate(){this._updateResolve===null&&(this._updatePromise=new Promise(t=>{this._updateResolve=t})),!this._isUpdating&&(this._scheduled||!this._connected||(this._scheduled=!0,queueMicrotask(()=>{this._scheduled=!1;try{this._performRender()}catch(t){console.error("[webjs] lifecycle hook threw during update cycle:",t)}})))}_performRender(){if(!this._renderRoot)return;let t=this._changedProperties;this._isUpdating=!0;let r=!1,n=null;try{if(this.shouldUpdate(t)){this.willUpdate(t);for(let o of this.__controllers)o.hostUpdate&&o.hostUpdate();this.__renderToken=(this.__renderToken||0)+1,this.__renderAbort&&this.__renderAbort.abort(),this.__renderAbort=typeof AbortController<"u"?new AbortController:null;try{let o=this.update(t);o&&typeof o.then=="function"&&(n=o)}catch(o){this._handleRenderError(o)}if(!n){for(let o of this.__controllers)o.hostUpdated&&o.hostUpdated();r=!0}}}catch(o){console.error("[webjs] lifecycle hook threw during update phase:",o)}finally{this._isUpdating=!1,(r||n)&&(this._changedProperties=new Map)}if(n){let o=this.__renderToken;this.__pendingAsyncCommits=(this.__pendingAsyncCommits||0)+1;let i=()=>{if(this.__pendingAsyncCommits--,o===this.__renderToken){for(let s of this.__controllers)s.hostUpdated&&s.hostUpdated();this._postCommit(t)}};n.then(i,s=>{try{o===this.__renderToken&&this._handleRenderError(s instanceof Error?s:new Error(tc(s)))}finally{i()}});return}r?this._postCommit(t):this.__pendingAsyncCommits||this._resolveUpdate()}_resolveUpdate(){if(this._updateResolve){let t=this._changedProperties.size===0;this._updateResolve(t),this._updateResolve=null}}performServerUpdate(){let t=this._changedProperties;this._isUpdating=!0;try{this.willUpdate(t);for(let r of this.__controllers)r.hostUpdate&&r.hostUpdate();this._reflectDeclaredAttributes()}finally{this._isUpdating=!1}}_reflectDeclaredAttributes(){let t=this.constructor.properties||{};for(let r of Object.keys(t)){let n=t[r];!n||!n.reflect||n.state||this._reflectAttribute(r,this[r],n)}}shouldUpdate(t){return!0}willUpdate(t){}update(t){this.__signalWatcher||(this.__signalWatcher=new Gr.subtle.Watcher(()=>{this._connected&&this.requestUpdate()}));let r,n=as();go(this.__renderAbort?this.__renderAbort.signal:null);try{this.__signalWatcher.observe(()=>{r=this.render()})}finally{go(n||null)}if(r&&typeof r.then=="function")return this._commitAsync(r);vt(r,this._renderRoot)}_commitAsync(t){let r=this.__renderToken;if(this.__firstRendered&&this._overridesRenderFallback())try{let n=this.renderFallback();n!==void 0&&vt(n,this._renderRoot)}catch(n){console.error("[webjs] renderFallback() threw:",n)}return Promise.resolve(t).then(n=>{if(r===this.__renderToken)try{vt(n,this._renderRoot)}catch(o){this._handleRenderError(o instanceof Error?o:new Error(String(o)))}},n=>{r===this.__renderToken&&this._handleRenderError(n instanceof Error?n:new Error(String(n)))})}_overridesRenderFallback(){return this.renderFallback!==tn.prototype.renderFallback}_handleRenderError(t){console.error(`[webjs] render error in <${Et(this.constructor)||this.tagName?.toLowerCase()}>:`,t);try{let r=this.renderError(t);r!==void 0&&vt(r,this._renderRoot)}catch(r){console.error("[webjs] renderError() also threw:",r)}}_postCommit(t){try{this.__firstRendered||(this.__firstRendered=!0,this.firstUpdated(t)),this.updated(t)}catch(r){console.error("[webjs] lifecycle hook threw during post-commit phase:",r)}finally{this._resolveUpdate()}}updated(t){}firstUpdated(t){}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}addController(t){this.__controllers.add(t),this._connected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}render(){return""}renderError(t){}renderFallback(){}};function _f(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function Af(e){return e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function tn(e){return new.target?Reflect.construct(ur,arguments,new.target):class extends ur{static properties=e;static[sc]=!0}}Object.setPrototypeOf(tn,ur);tn.prototype=ur.prototype;var ps=null;function xf(e){ps=e}function ms(){if(!ps)return"";try{return ps()||""}catch{return""}}st();xo();rr();xo();_o();Ao();st();kt();Ao();function ys(e){let t={},r=/([a-zA-Z_:][\w:.-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,n;for(;(n=r.exec(e))!==null;)t[n[1]]=n[2]??n[3]??n[4]??"";return t}function _c(e,t){if(!(!e||typeof e.setAttribute!="function"))for(let[r,n]of Object.entries(t))e.setAttribute(r,dr(n))}function ws(e){return/\sdata-wj-host(?=[\s>=])/i.test(e)?e:`${e.slice(0,-1)} data-wj-host>`}function Ac(e,t,r){if(!t||typeof t.getAttributeNames!="function")return e;let n="";for(let o of t.getAttributeNames()){let i=String(o).toLowerCase();if(r.has(i))continue;let s=t.getAttribute(o);n+=s===""?` ${i}`:` ${i}="${U(String(s))}"`}return n?`${e.slice(0,-1)}${n}>`:e}function xc(e,t,r){for(let[n,o]of Object.entries(t)){let i=ho(r,n.toLowerCase());if(i===void 0)continue;let{propName:s,def:a}=i;e[s]=mo(a,dr(o))}}function vc(e){let t={};for(let r of Object.keys(e)){if(!r.startsWith("data-webjs-prop-"))continue;let n=hc(r.slice(16));try{t[n]=Le(dr(e[r]))}catch{}delete e[r]}return t}st();_o();function If(e){let t=/\bslot\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(e);if(!t)return null;let r=t[1]??t[2]??t[3]??"";return r===""||r==="default"?null:r}function Tc(e){let t=new Map,r="",n=0;for(;n<e.length;){let o=e.indexOf("<",n);if(o===-1){r+=e.slice(n);break}o>n&&(r+=e.slice(n,o));let i=e.slice(o);if(i.startsWith("<!--")){let g=gs(e,o);if(g===-1){r+=i,n=e.length;break}r+=e.slice(o,g),n=g;continue}if(i.startsWith("<!")||i.startsWith("</")){let g=e.indexOf(">",o);if(g===-1){r+=i,n=e.length;break}r+=e.slice(o,g+1),n=g+1;continue}let s=/^<([a-zA-Z][\w-]*)((?:"[^"]*"|'[^']*'|[^>])*?)(\/?)>/.exec(i);if(!s){r+="<",n=o+1;continue}let[a,c,l,u]=s,f=c.toLowerCase(),d=!!u||ac(f),p=If(l),m;if(d)m=o+a.length;else{let g=o+a.length,S=Nt(e,g,f);if(S===-1){let k=e.slice(o);p!==null?Ec(t,p,k):r+=k,n=e.length;continue}let b=new RegExp(`</${Ct(f)}\\s*>`,"i"),E=e.slice(S),x=b.exec(E),v=x?x[0].length:`</${f}>`.length;m=S+v}let y=e.slice(o,m);p!==null?Ec(t,p,y):r+=y,n=m}return r.length>0&&t.set(null,r),t}function Ec(e,t,r){let n=e.get(t);n!==void 0?e.set(t,n+r):e.set(t,r)}function kc(e,t,r){let n=r?` data-wj-slot-owner="${U(r)}"`:"",o=new Set,i="",s=0,a=/<slot((?:"[^"]*"|'[^']*'|[^>])*?)(\/?)>/gi,c=fr(e),l=rn(c),u;for(;(u=a.exec(e))!==null;){if(l(u.index))continue;i+=e.slice(s,u.index);let[f,d,p]=u,m=!!p,y=/\bname\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(d),g=y?y[1]??y[2]??y[3]:null,S=d.replace(/\bname\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/i,"").trim(),b="",E;if(m)E=u.index+f.length;else{let _=u.index+f.length,h=Nt(e,_,"slot",c);if(h===-1)b=e.slice(_),E=e.length;else{b=e.slice(_,h);let w=/<\/slot\s*>/i,I=e.slice(h),A=w.exec(I),C=A?A[0].length:7;E=h+C}}let x=g==="default"||g===""?null:g,v=t.get(x),k=g!==null?` name="${U(g)}"`:"",N=S?` ${S}`:"";v!==void 0&&!o.has(x)?(o.add(x),i+=`<slot data-webjs-light data-projection="actual"${n}${k}${N}>${v}</slot>`):i+=`<slot data-webjs-light data-projection="fallback"${n}${k}${N}>${b}</slot>`,s=E,a.lastIndex=E}return i+=e.slice(s),i}async function Oe(e,t,r=[],n){e=await qf(e,t,r,n);let o=fs();if(!o.length)return e;let i=[...o].sort((p,m)=>m.length-p.length),s=new RegExp(`<(${i.map(Ct).join("|")})(?=[\\s>/])((?:"[^"]*"|'[^']*'|[^>])*?)(/?)>`,"g"),a=[],c=fr(e),l=rn(c);for(let p of e.matchAll(s)){let[m,y,g,S]=p,b=us(y);if(!b||l(p.index))continue;t&&t.usedComponents&&t.usedComponents.add(y);let E=S?`<${y}${g}>`:m,x=null;try{let v=b.shadow===!0;x=new b,x.__ssrTag=y,x.__ssrAncestors=r;let k=ys(g),N=vc(k),_=new Set(Object.keys(ys(g)).map(W=>W.toLowerCase()));_c(x,k),xc(x,k,b);for(let[W,q]of Object.entries(N))x[W]=q;let h="",w=p.index+m.length;if(!S){let W=p.index+m.length,q=Nt(e,W,y,c);if(q!==-1){h=e.slice(W,q);let $=new RegExp(`</${Ct(y)}\\s*>`,"i"),Bt=e.slice(q),Lr=$.exec(Bt),ii=Lr?Lr[0].length:`</${y}>`.length;w=q+ii}else h=e.slice(W),w=e.length}let I=Tc(h);typeof x.performServerUpdate=="function"&&x.performServerUpdate();let A=x.render?x.render():"";A&&typeof A.then=="function"&&(A=await A),E=Ac(E,x,_),v||(E=ws(E));let C=await P(A,t);if(v){let W=await Oe(C,t,[...r,x],n),q=b.styles,$=Array.isArray(q)?q:q&&Ut(q)?[q]:[],Bt=Wn($);a.push({start:p.index,end:p.index+m.length,text:`${E}<template shadowrootmode="open">${Bt}${W}</template>`})}else{if(C.trim()===""){a.push({start:p.index,end:p.index+m.length,text:`${E}<!--webjs-hydrate-->`});continue}let q=kc(C,I,y),$=await Oe(q,t,[...r,x],n);a.push({start:p.index,end:w,text:`${E}<!--webjs-hydrate-->${$}</${y}>`})}}catch(v){let k=bs(v);console.error(k?`[webjs] SSR failed for <${y}>: ${k} It was touched in the component's constructor or render(), which run during SSR. Move browser-only work to connectedCallback() or a lifecycle hook (firstUpdated/updated), which SSR never calls; seed first-paint defaults in the constructor only from server-known inputs (attributes / props).`:`[webjs] SSR failed for <${y}>:`,v);let N=v instanceof Error?v:new Error(String(v)),_="";try{let A;x&&typeof x.renderError=="function"&&(A=x.renderError(N)),A===void 0&&(A=nn(y,N,n)),_=await P(A,t),_.trim()&&(_=await Oe(_,t,x?[...r,x]:r,n))}catch(A){console.error(`[webjs] renderError() for <${y}> also threw:`,A),_=""}let h=p.index+m.length;if(!S){let A=p.index+m.length,C=Nt(e,A,y,c);if(C!==-1){let q=new RegExp(`</${Ct(y)}\\s*>`,"i").exec(e.slice(C));h=C+(q?q[0].length:`</${y}>`.length)}else h=e.length}let w=b.shadow===!0;w||(E=ws(E));let I;if(w){let A=b.styles,C=Array.isArray(A)?A:A&&Ut(A)?[A]:[],W=Wn(C);I=`${E}<template shadowrootmode="open">${W}${_}</template>`}else I=`${E}<!--webjs-hydrate-->${_}</${y}>`;a.push({start:p.index,end:h,text:I})}}if(!a.length)return e;a.sort((p,m)=>p.start-m.start);let u=[],f=-1;for(let p of a)p.start>=f&&(u.push(p),f=p.end);let d=e;for(let p=u.length-1;p>=0;p--){let{start:m,end:y,text:g}=u[p];d=d.slice(0,m)+g+d.slice(y)}return d}async function qf(e,t,r=[],n){if(e.indexOf("<webjs-suspense")===-1)return e;let o=/<webjs-suspense((?:"[^"]*"|'[^']*'|[^>])*?)>/i,i=fr(e),s=rn(i),a=0,c="",l=e;for(let u=0;u<1e4;u++){let f=o.exec(l);if(!f){c+=l;break}if(s(a+f.index)){let v=f.index+f[0].length;c+=l.slice(0,v),l=l.slice(v),a+=v;continue}let d=f.index,p=f.index+f[0].length;c+=l.slice(0,d);let m=f[1]||"",y=/data-webjs-fallback="([^"]*)"/i.exec(m),g=y?dr(y[1]):"",S=[];for(let[v,k]of i)k<=a||S.push([Math.max(0,v-a),k-a]);let b=Nt(l,p,"webjs-suspense",S),E,x;if(b===-1)E=l.slice(p),x="";else{E=l.slice(p,b);let v=/<\/webjs-suspense\s*>/i.exec(l.slice(b));x=l.slice(b+(v?v[0].length:17))}if(t){let v=`s${t.nextId++}`;t.pending.push({id:v,promise:Promise.resolve(bi(E))}),c+=`<webjs-suspense id="${v}">${g}</webjs-suspense>`}else{let v=await Oe(E,t,r,n);c+=`<webjs-suspense>${v}</webjs-suspense>`}a+=l.length-x.length,l=x}return c}async function Nc(e,t={ssr:!0}){let r=t&&t.suspenseCtx,n=t&&t.dev!==void 0?t.dev:r&&r.dev;r&&r.dev===void 0&&n!==void 0&&(r.dev=n);let o=await P(e,r);return t&&t.ssr===!1?o:await Oe(o,r,[],n)}function Cc(e,t={ssr:!0}){let r=t&&t.suspenseCtx,n=t&&t.dev!==void 0?t.dev:r&&r.dev;return r&&r.dev===void 0&&n!==void 0&&(r.dev=n),new ReadableStream({async start(o){try{if(t&&t.ssr===!1){let{streamRender:i}=await Promise.resolve().then(()=>(xo(),Sc));await i(e,r,o)}else{let i=await P(e,r),s=await Oe(i,r,[],n);o.enqueue(s)}r&&r.pending.length&&await Mf(r,o,n),o.close()}catch(i){o.error(i)}}})}async function Mf(e,t,r){let n=ms(),o=n?` nonce="${U(n)}"`:"";for(;e.pending.length;){let i=e.pending.splice(0);await Promise.all(i.map(async({id:s,promise:a})=>{try{let c=await a,l=await P(c,e),u=await Oe(l,e,[],r);t.enqueue(`<template data-webjs-resolve="${s}">${u}</template><script${o}>(function(){var t=document.currentScript.previousElementSibling;var b=document.getElementById("${s}");if(b&&t){b.replaceWith(t.content.cloneNode(true));t.remove()}document.currentScript.remove()})()<\/script>`)}catch(c){console.error(`[webjs] Suspense boundary "${s}" rejected:`,c);try{let l=c instanceof Error?c:new Error(String(c)),u=await Oe(await P(nn("webjs-suspense",l,r),e),e,[],r);t.enqueue(`<template data-webjs-resolve="${s}">${u}</template><script${o}>(function(){var t=document.currentScript.previousElementSibling;var b=document.getElementById("${s}");if(b&&t){b.replaceWith(t.content.cloneNode(true));t.remove()}document.currentScript.remove()})()<\/script>`)}catch(l){console.error(`[webjs] Suspense boundary "${s}" error render also threw:`,l)}}}))}}st();var Rc=Symbol.for("webjs.notFound"),Lc=Symbol.for("webjs.redirect"),Oc=Symbol.for("webjs.forbidden"),jc=Symbol.for("webjs.unauthorized");function Df(){let e=new Error("webjs: notFound()");throw e.__webjs=Rc,e}function $f(){let e=new Error("webjs: forbidden()");throw e.__webjs=Oc,e}function Ff(){let e=new Error("webjs: unauthorized()");throw e.__webjs=jc,e}function Bf(e,t){let r=typeof t=="object"&&t!==null?t.status:t,n=new Error(`webjs: redirect(${e})`);throw n.__webjs=Lc,n.url=e,n.status=typeof r=="number"?r:void 0,n}function Hf(e){return!!e&&e.__webjs===Rc}function Uf(e){return!!e&&e.__webjs===Lc}function Vf(e){return!!e&&e.__webjs===Oc}function Wf(e){return!!e&&e.__webjs===jc}var Ss=null;function Kf(e){Ss=e}function zf(e){if(typeof e!="string"||!e||!Ss)return e;try{return Ss(e)||e}catch{return e}}Ce();Mr();hs();function Gf(e,t={}){let r=t.reconnect!==!1,n=0,o=!1,i=null,s=[];function a(){o||(i=new WebSocket(Yf(e),t.protocols),i.onopen=c=>{for(n=0;s.length&&i&&i.readyState===WebSocket.OPEN;)i.send(s.shift());t.onOpen?.(c)},i.onmessage=c=>{let l=c.data;if(typeof l=="string")try{l=JSON.parse(l)}catch{}t.onMessage?.(l,c)},i.onerror=c=>{t.onError?.(c)},i.onclose=c=>{if(t.onClose?.(c),!o&&r){let l=Math.min(1e3*2**n++,3e4);setTimeout(a,l)}})}return a(),{send(c){let l=typeof c=="string"||c instanceof ArrayBuffer||ArrayBuffer.isView(c)?c:JSON.stringify(c);i&&i.readyState===WebSocket.OPEN?i.send(l):s.push(l)},close(c,l){o=!0;try{i?.close(c,l)}catch{}},get socket(){return i},get readyState(){return i?.readyState??3}}}function Yf(e){if(/^wss?:\/\//i.test(e))return e;let t=typeof location<"u"&&location.protocol==="https:"?"wss:":"ws:",r=typeof location<"u"?location.host:"";return`${t}//${r}${e.startsWith("/")?e:"/"+e}`}kt();var _s="application/vnd.webjs+json";async function Jf(e,t={}){let r=new Headers(t.headers||{});r.has("accept")||r.set("accept",_s);let n=t.body;n!=null&&typeof n=="object"&&!(n instanceof FormData)&&!(n instanceof Blob)&&!(n instanceof ArrayBuffer)&&!(n instanceof URLSearchParams)&&!(typeof ReadableStream<"u"&&n instanceof ReadableStream)&&!ArrayBuffer.isView(n)&&(n=await Qr(n),r.has("content-type")||r.set("content-type",_s));let o=await fetch(e,{...t,headers:r,body:n}),i=o.headers.get("content-type")||"",s=await o.text(),a=i.includes(_s)?s?Le(s):null:i.includes("application/json")?s?JSON.parse(s):null:s;if(!o.ok){let c=a&&a.error||`richFetch ${e} -> ${o.status}`,l=new Error(c);throw l.status=o.status,l.body=a,l}return a}kt();Ts();Es();an();var na=class{constructor(t,r){this.host=t,this.options=r,this.updates=[],this._nextId=0}get value(){let t=this.options.source();if(!this.options.update)return this.updates.length>0?this.updates[this.updates.length-1].payload:t;for(let r of this.updates)t=this.options.update(t,r.payload);return t}add(t,r){let n=`opt-${++this._nextId}`;this.updates.push({id:n,payload:t}),this.host?.requestUpdate?.();let o=()=>{let i=this.updates.findIndex(s=>s.id===n);i!==-1&&(this.updates.splice(i,1),this.host?.requestUpdate?.())};return r&&typeof r.then=="function"&&(typeof r.finally=="function"?r.finally(()=>o()).catch(()=>{}):r.then(()=>o(),()=>o())),o}};async function Hd(e,t,r){let n=e.get();e.set(t);let o;try{o=await r()}catch(i){throw e.set(n),i}return o&&o.success===!1&&e.set(n),o}function Ud(e,t,r){return e&&typeof e.get=="function"&&typeof e.set=="function"?Hd(e,t,r):new na(e,t)}To();No();var Vd="application/vnd.webjs+stream",Wd=1,Kd=2,zd=3,Bl=new Uint8Array(0);function Gd(e,t){let r=t||Bl,n=r.length,o=new Uint8Array(5+n);return o[0]=e&255,o[1]=n>>>24&255,o[2]=n>>>16&255,o[3]=n>>>8&255,o[4]=n&255,n&&o.set(r,5),o}function Yd(){let e=Bl;return{push(t){if(t&&t.length){let n=new Uint8Array(e.length+t.length);n.set(e,0),n.set(t,e.length),e=n}let r=[];for(;e.length>=5;){let n=e[0],o=(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0;if(e.length<5+o)break;let i=e.slice(5,5+o);r.push({type:n,payload:i}),e=e.slice(5+o)}return r}}}rr();var Jd=Symbol.for("webjs.context");function Zd(e){return{__context__:Jd,name:e}}var oi=class extends Event{constructor(t,r,n=!1){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=r,this.subscribe=n}},oa=class{constructor(t,{context:r,initialValue:n}){this._host=t,this._context=r,this._value=n,this._subscriptions=new Set,this._onRequest=o=>{let i=o;if(i.context===this._context)if(o.stopPropagation(),i.subscribe){let s={callback:i.callback},a=()=>{this._subscriptions.delete(s)};this._subscriptions.add(s),i.callback(this._value,a)}else i.callback(this._value)},typeof t.addController=="function"&&t.addController(this)}get value(){return this._value}setValue(t){if(!Object.is(this._value,t)){this._value=t;for(let r of this._subscriptions){let n=()=>{this._subscriptions.delete(r)};r.callback(t,n)}}}hostConnected(){this._host.addEventListener("context-request",this._onRequest)}hostDisconnected(){this._host.removeEventListener("context-request",this._onRequest),this._subscriptions.clear()}},ia=class{constructor(t,{context:r,subscribe:n=!0}){this._host=t,this._context=r,this._subscribe=n,this._value=void 0,this._unsubscribe=void 0,typeof t.addController=="function"&&t.addController(this)}get value(){return this._value}hostConnected(){this._dispatchRequest()}hostDisconnected(){this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=void 0)}_dispatchRequest(){let t=new oi(this._context,(r,n)=>{let o=this._value;this._value=r,n&&(this._unsubscribe=n),!Object.is(o,r)&&typeof this._host.requestUpdate=="function"&&this._host.requestUpdate()},this._subscribe);this._host.dispatchEvent(t)}};function Xd(){return typeof window<"u"}var $e={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},sa=class{constructor(t,{task:r,args:n,autoRun:o=!0}){this._host=t,this._taskFn=r,this._argsFn=n||(()=>[]),this._autoRun=o,this._status=$e.INITIAL,this._value=void 0,this._error=void 0,this._abortController=null,this._prevArgs=null,typeof t.addController=="function"&&t.addController(this)}get status(){return this._status}get value(){return this._value}get error(){return this._error}async run(){this.abort();let t=new AbortController;this._abortController=t;let r=this._argsFn();this._prevArgs=r,this._status=$e.PENDING,this._error=void 0,this._requestHostUpdate();try{let n=await this._taskFn(...r,{signal:t.signal});if(t.signal.aborted)return;this._value=n,this._status=$e.COMPLETE,this._error=void 0}catch(n){if(t.signal.aborted)return;this._error=n,this._status=$e.ERROR,this._value=void 0}finally{this._abortController===t&&(this._abortController=null)}this._requestHostUpdate()}abort(){this._abortController&&(this._abortController.abort(),this._abortController=null)}render(t={}){switch(this._status){case $e.INITIAL:return t.initial?.();case $e.PENDING:return t.pending?.();case $e.COMPLETE:return t.complete?.(this._value);case $e.ERROR:return t.error?.(this._error);default:return}}hostUpdate(){if(!this._autoRun||!Xd())return;let t=this._argsFn();this._argsEqual(this._prevArgs,t)||this.run()}hostUpdated(){}hostConnected(){}hostDisconnected(){this.abort()}_requestHostUpdate(){typeof this._host.requestUpdate=="function"&&this._host.requestUpdate()}_argsEqual(t,r){if(t===null||t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==r[n])return!1;return!0}};export{ia as ContextConsumer,oa as ContextProvider,oi as ContextRequestEvent,B as FORM_ACTION_FIELD,ca as FORM_ACTION_ID_KEY,Wd as FRAME_CHUNK,Kd as FRAME_END,zd as FRAME_ERROR,F as MARKER,Hc as SEED_MISS,Vd as STREAM_CONTENT_TYPE,Gr as Signal,vf as Suspense,sa as Task,$e as TaskStatus,tn as WebComponent,vs as WebjsFrame,ks as WebjsStream,as as activeActionSignal,li as adoptStyles,fs as allTags,zf as asset,fu as asyncAppend,du as asyncReplace,Ru as batch,lu as cache,Ou as computed,Gf as connectWS,dd as consumeStale,Zd as createContext,Yd as createFrameDecoder,cu as createRef,ms as cspNonce,Vl as css,Xa as deserialize,ea as disableClientRouter,Pu as effect,Un as enableClientRouter,Gd as encodeFrame,U as escapeAttr,Kn as escapeText,ud as fetchMark,$f as forbidden,iu as guard,ci as html,er as isAsyncAppend,tr as isAsyncReplace,Ut as isCSS,dt as isCache,Vf as isForbidden,ut as isGuard,lt as isKeyed,of as isLazy,J as isLive,Hf as isNotFound,Uf as isRedirect,ft as isRef,ct as isRepeat,ju as isSignal,wo as isSuspense,K as isTemplate,Qt as isTemplateContent,Wf as isUnauthorized,Xt as isUnsafeHTML,pt as isUntil,mt as isWatch,ou as keyed,nu as live,ra as loadFrame,us as lookup,nf as lookupModuleUrl,Os as markStale,ta as navigate,Df as notFound,Ud as optimistic,Le as parse,js as parseTagHeader,rf as primeModuleUrl,nc as prop,Bf as redirect,au as ref,ni as refreshPage,ls as register,fd as registerKeyTags,vt as render,Ns as renderStream,Cc as renderToStream,Nc as renderToString,ha as repeat,ri as revalidate,Jf as richFetch,Eo as scanSeeds,cd as seedStats,Za as serialize,go as setActiveActionSignal,Kf as setAssetUrlProvider,xf as setCspNonceProvider,Kl as setFormActionResolver,Lu as signal,Qr as stringify,Wn as stylesToString,Et as tagOf,ad as takeSeed,su as templateContent,Ff as unauthorized,bi as unsafeHTML,uu as until,pu as watch};
8
+ </div>`}tt();ht();function Tc(e){let t={},r=/([a-zA-Z_:][\w:.-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,n;for(;(n=r.exec(e))!==null;)t[n[1]]=n[2]??n[3]??n[4]??"";return t}function kc(e,t){if(!(!e||typeof e.setAttribute!="function"))for(let r in t)e.setAttribute(r,Gt(t[r]))}function ui(e){return e.includes("data-wj-host")&&/\sdata-wj-host(?=[\s>=])/i.test(e)?e:`${e.slice(0,-1)} data-wj-host>`}function Nc(e,t,r){if(!t||typeof t.getAttributeNames!="function")return e;let n="";for(let o of t.getAttributeNames()){let s=String(o).toLowerCase();if(r.has(s))continue;let i=t.getAttribute(o);n+=i===""?` ${s}`:` ${s}="${D(String(i))}"`}return n?`${e.slice(0,-1)}${n}>`:e}function Cc(e,t,r){for(let n in t){let o=t[n],s=oo(r,n.toLowerCase());if(s===void 0)continue;let{propName:i,def:a}=s;e[i]=no(a,Gt(o))}}function Rc(e){let t={};for(let r of Object.keys(e)){if(!r.startsWith("data-webjs-prop-"))continue;let n=yc(r.slice(16));try{t[n]=Ee(Gt(e[r]))}catch{}delete e[r]}return t}var Lc=/\S/;function Oc(e,t,r,n,o){e.ctx&&e.ctx.usedComponents&&e.ctx.usedComponents.add(t);let s=r.shadow===!0,i={kind:"component",tag:t,Cls:r,isShadow:s,instance:null,opening:n,tpl:void 0,pending:null,presentAttrNames:null,error:null,outer:"",partition:!s,depth:0,seg:null,pendingSeg:null,segments:null,closeText:""};try{let a=new r;i.instance=a,a.__ssrTag=t,a.__ssrAncestors=e.ancestors.slice();let c=o?Tc(o):{},l=new Set;for(let p in c)l.add(p.toLowerCase());let u=Rc(c);kc(a,c),Cc(a,c,r);for(let p in u)a[p]=u[p];typeof a.performServerUpdate=="function"&&a.performServerUpdate();let f=a.render?a.render():"";if(i.presentAttrNames=l,f&&typeof f.then=="function")return i.pending=f,i;i.tpl=f,Pc(i)}catch(a){i.error=a}return i}async function jc(e){try{e.tpl=await e.pending,Pc(e)}catch(t){e.error=t}e.pending=null}function Pc(e){e.opening=Nc(e.opening,e.instance,e.presentAttrNames),e.isShadow||(e.opening=ui(e.opening))}async function Ic(e,t,r){let{tag:n,Cls:o,isShadow:s}=t;if(t.error===null)try{let i=await rd(e,t,r);return s?`${t.opening}<template shadowrootmode="open">${qc(o)}${i}</template>${r}${t.closeText}`:Lc.test(i)?`${t.opening}<!--webjs-hydrate-->${i}</${n}>`:`${t.opening}<!--webjs-hydrate-->${r}${t.closeText}`}catch(i){t.error=i}return od(e,t)}async function rd(e,t,r){let n=e.owner;e.owner=t.isShadow?null:{tag:t.tag,partition:nd(r,t.segments),consumed:null};try{return await e.capture(()=>e.value(t.tpl))}finally{e.owner=n}}function nd(e,t){let r=new Map;if(!t)return e.length>0&&r.set(null,e),r;let n="",o=0;for(let s of t){n+=e.slice(o,s.start);let i=r.get(s.slot);r.set(s.slot,i===void 0?e.slice(s.start,s.end):i+e.slice(s.start,s.end)),o=s.end}return n+=e.slice(o),n.length>0&&r.set(null,n),r}function qc(e){let t=e.styles,r=Array.isArray(t)?t:t&&pr(t)?[t]:[];return Zo(r)}async function od(e,t){let{tag:r,Cls:n,instance:o,isShadow:s}=t,i=t.error,a=li(i);console.error(a?`[webjs] SSR failed for <${r}>: ${a} It was touched in the component's constructor or render(), which run during SSR. Move browser-only work to connectedCallback() or a lifecycle hook (firstUpdated/updated), which SSR never calls; seed first-paint defaults in the constructor only from server-known inputs (attributes / props).`:`[webjs] SSR failed for <${r}>:`,i);let c=i instanceof Error?i:new Error(String(i)),l="";try{let f;o&&typeof o.renderError=="function"&&(f=o.renderError(c)),f===void 0&&(f=Kr(r,c,e.dev)),l=await e.capture(()=>e.value(f))}catch(f){console.error(`[webjs] renderError() for <${r}> also threw:`,f),l=""}let u=t.opening;return s||(u=ui(u)),s?`${u}<template shadowrootmode="open">${qc(n)}${l}</template>`:`${u}<!--webjs-hydrate-->${l}</${r}>`}function fi(e){let t=/\bslot\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(e);if(!t)return null;let r=t[1]??t[2]??t[3]??"";return r===""||r==="default"?null:r}function Dc(e,t){let{attrsRaw:r,owner:n}=e,o=n.tag?` data-wj-slot-owner="${D(n.tag)}"`:"",s=null,i="";if(Lc.test(r)){let f=/\bname\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(r);s=f?f[1]??f[2]??f[3]:null,i=r.replace(/\bname\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/i,"").trim()}let a=s==="default"||s===""?null:s,c=n.partition.get(a),l=s!==null?` name="${D(s)}"`:"",u=i?` ${i}`:"";return c!==void 0&&!(n.consumed&&n.consumed.has(a))?((n.consumed??=new Set).add(a),`<slot data-webjs-light data-projection="actual"${o}${l}${u}>${c}</slot>`):`<slot data-webjs-light data-projection="fallback"${o}${l}${u}>${t}</slot>`}async function Mc(e,t,r){return e.ctx&&t.id?(e.ctx.pending.push({id:t.id,promise:Promise.resolve(ss(r))}),`<webjs-suspense id="${t.id}">${t.fallback}</webjs-suspense>`):`<webjs-suspense>${r}</webjs-suspense>`}var fo=class{constructor(t,r={}){this.ctx=t,this.expand=r.expand!==!1,this.dev=r.dev,this.controller=r.controller||null,this.buf="",this.frames=[],this.ancestors=r.ancestors?r.ancestors.slice():[],this.owner=null,this.inert=[],this.defer=0,this.tagState=null}flush(){this.controller&&this.buf&&(this.controller.enqueue(this.buf),this.buf="")}emit(t){this.controller?(this.flush(),this.controller.enqueue(t)):this.buf+=t}async capture(t){let r=this.buf,n=this.frames,o=this.tagState,s=this.controller,i=this.inert,a=this.defer,c=this.ancestors.length;this.buf="",this.frames=[],this.tagState=null,this.controller=null,this.inert=i.slice();try{return await t(),await this.finishOpenFrames(),this.buf}finally{this.buf=r,this.frames=n,this.tagState=o,this.controller=s,this.inert=i,this.defer=a,this.ancestors.length=c}}async value(t){if(!(t==null||t===!1||t===!0)){if(typeof t.then=="function")return this.value(await t);if(typeof t=="string"){this.emit(Nt(t));return}if(I(t))return this.template(t);if(Array.isArray(t)){for(let r of t)await this.value(r);return}if(xr(t)){let r=String(t.value??"");this.expand?await this.ops(uo(r),di):this.emit(r);return}if(X(t))return this.value(t.value);if(Dt(t))return this.value(t.signal.get());if(Ot(t))return this.value(t.value);if(jt(t))return this.value(t.fn());if(vr(t)){let r=t.template,n=String(r?.innerHTML??"");this.expand?await this.ops(uo(n),di):this.emit(n);return}if(!Pt(t)){if(It(t))return this.value(t.value);if(qt(t)){let r=t.args;for(let n of r)if(!n||typeof n.then!="function")return this.value(n);if(r.length>0)try{let n=await Promise.race(r.map(o=>Promise.resolve(o).catch(()=>{})));return this.value(n)}catch{return}return}if(!(Er(t)||Tr(t))){if(Lt(t)){let r=t;for(let n=0;n<r.items.length;n++)await this.value(r.templateFn(r.items[n],n));return}if(ei(t)){let r=t,n=this.ctx;if(n){let o=`s${n.nextId++}`;this.emit(`<webjs-boundary id="${o}">`),await this.value(r.fallback),this.emit("</webjs-boundary>"),n.pending.push({id:o,promise:Promise.resolve(r.children)})}else await this.value(r.fallback);return}this.emit(Nt(String(t)))}}}}async template(t){await this.ops(xc(t.strings),t.values),this.flush()}async ops(t,r){let n=0;for(let o=0;o<t.length;o++){let s=t[o];switch(s.t){case ri:this.buf+=s.s;break;case ni:this.open(s.tag);break;case oi:{let i=this.tagEnd(s);i&&await i;break}case si:{let i=this.close(s);i&&await i;break}case Be:{let i=r[n++];switch(i&&typeof i.then=="function"&&(i=await i),X(i)&&(i=i.value),s.k){case ii:this.flush(),typeof i=="string"?this.emit(Nt(i)):typeof i=="number"?this.emit(Nt(String(i))):await this.value(i);break;case lo:this.buf+=String(i??"");break;case ai:await this.attr(s,i);break;case ci:Ae(i,s.name,s.tag),this.buf+=D(String(i??""));break;default:break}break}}}}open(t){let r=this.frames[this.frames.length-1];r&&r.partition&&r.depth===0&&!this.inert.length&&(r.seg={start:this.buf.length,end:0,slot:null});let n,o;this.expand&&this.defer===0&&!this.inert.length&&(t==="webjs-suspense"||t==="slot"&&this.owner!==null||t.includes("-")&&ao(t))?(n=this.buf,this.buf=""):(t==="form"||t==="button"||t==="input")&&(o=this.buf,this.buf=""),this.tagState={tag:t,start:this.buf.length,outer:n,formOuter:o,actionId:null,submitterTag:null,actionCount:0,propAttrs:null,submitterProps:null,fallback:null}}async attr(t,r){let n=this.tagState,o=t.name,s=t.tag;if(t.kind==="event")return;if(t.kind==="prop"){if(s==="webjs-suspense"&&o==="fallback"){this.expand&&this.ctx&&n&&(n.fallback=await this.capture(()=>this.value(r)));return}if(!s.includes("-")){qn(r,o,s),n&&sd(n,o,s);return}if(!this.expand||r===void 0)return;try{let a=await Hr(r);this.buf+=`data-webjs-prop-${wc(o)}="${D(a)}"`}catch(a){console.warn(`[webjs] property binding .${o} has an unserializable value during SSR. Dropping. The browser will see the property as undefined. Detail: ${a&&a.message}`)}return}if(t.kind==="bool"){Ae(r,o,s),r&&(this.buf+=`${o}=""`);return}if(Ct(r,o,s)){if(n&&Fc(n,o,s),s==="form")n&&(n.actionId=Rt(await es(r),s)),this.buf=this.buf.replace(/\s+$/,"");else{Sr(!!n&&n.submitterTag!=null,s);let a=Ar(n?this.buf.slice(n.start):"");a.has("name")&&br(a.get("name")||"",s,!1),a.has("value")&&yr(s),a.has("form")&&wr(s);let c=Rt(await es(r),s);n&&(n.submitterTag=s),this.buf+=`name="${O}" value="${D(c)}"`}return}n&&Fc(n,o,s),Ae(r,o,s);let i=Qe(o,r);i!==null&&(this.buf+=`${t.lead}"${D(i)}"`)}tagEnd(t){let r=this.tagState;if(this.tagState=null,r&&r.fallback!=null&&this.defer>0&&r.tag==="webjs-suspense"&&(this.buf+=` data-webjs-fallback="${D(r.fallback)}"`),this.buf+=t.close,!r)return;let n=r.tag;if((r.actionId!=null||r.submitterTag!=null)&&this.closeBoundFormTag(r),r.formOuter!==void 0&&(r.start=r.formOuter.length,this.buf=r.formOuter+this.buf),this.inert.length)return;let o=!!t.selfClose;co(n)&&!o&&this.inert.push(n);let s=this.frames[this.frames.length-1];if(r.outer!==void 0)return n==="webjs-suspense"?this.openSuspense(t,r,s,o):n==="slot"?this.openSlot(t,r,s,o):this.openComponent(t,r,s,o,ao(n));if(!o&&!Wr(n)){for(let i=this.frames.length-1;i>=0;i--)if(this.frames[i].tag===n){this.frames[i].nested=(this.frames[i].nested||0)+1;break}}if(s&&s.partition&&s.seg&&s.depth===0){let i=this.buf.slice(r.start);s.seg.slot=fi(i.slice(1+n.length,i.length-t.close.length)),o||Wr(n)?this.endSeg(s):s.depth+=1}else s&&s.partition&&!o&&!Wr(n)&&(s.depth+=1)}async openSuspense(t,r,n,o){this.closeSeg(n,r);let s=r.fallback;if(s===null){let a=/data-webjs-fallback="([^"]*)"/i.exec(this.buf);if(a){let c=Gt(a[1]);s=await this.capture(()=>this.ops(uo(c),di))}}let i={kind:"suspense",tag:r.tag,outer:r.outer,fallback:s||"",id:null};if(this.ctx&&(i.id=`s${this.ctx.nextId++}`),this.buf="",this.ctx&&(this.defer+=1),o){await this.finish(i);return}this.frames.push(i)}async openSlot(t,r,n,o){let s=r.tag;this.closeSeg(n,r);let i=this.buf,a=i.slice(1+s.length,i.length-t.close.length),c={kind:"slot",tag:s,outer:r.outer,attrsRaw:a,owner:this.owner};if(this.buf="",o){await this.finish(c);return}this.frames.push(c)}async openComponent(t,r,n,o,s){let i=r.tag;this.closeSeg(n,r);let a=this.buf,c=t.selfClose?a.slice(0,a.length-t.close.length)+">":a,l=a.slice(1+i.length,a.length-t.close.length);this.buf="";let u=Oc(this,i,s,c,l);if(u.pending&&await jc(u),u.outer=r.outer,u.instance&&(this.ancestors.push(u.instance),u.pushedAncestor=!0),o){await this.finish(u);return}this.frames.push(u)}closeSeg(t,r){if(!(t&&t.partition&&t.seg&&t.depth===0))return;let n=this.buf;t.seg.slot=fi(n.slice(1+r.tag.length).replace(/\/?>$/,"")),t.pendingSeg=t.seg,t.seg=null}endSeg(t){let r=t.seg;t.seg=null,!(!r||r.slot===null)&&(r.end=this.buf.length,(t.segments??=[]).push(r))}closeBoundFormTag(t){let r=t.actionCount>1;if(t.actionId!=null){Dn({duplicateAction:r,propAttrs:t.propAttrs||[]});let n=aa(this.buf.slice(t.start),t.actionId);this.buf=this.buf.slice(0,t.start)+n.tag+n.hidden}t.submitterTag!=null&&(this.buf=this.buf.slice(0,t.start)+la(this.buf.slice(t.start),t.submitterTag,{duplicateAction:r,propAttrs:t.submitterProps||[]}))}close(t){let r=t.tag;if(this.inert.length){if(this.inert[this.inert.length-1]!==r){this.buf+=t.text;return}this.inert.pop(),this.buf+=t.text,this.ordinaryClose();return}for(let n=this.frames.length-1;n>=0;n--)if(this.frames[n].tag===r){if(this.frames[n].nested>0){this.frames[n].nested-=1;break}return this.closeFrames(n,t.text)}this.buf+=t.text,this.ordinaryClose()}async closeFrames(t,r){for(;this.frames.length-1>t;)await this.finish(this.frames.pop());let n=this.frames.pop();n.closeText=r,await this.finish(n)}ordinaryClose(){let t=this.frames[this.frames.length-1];t&&t.partition&&(t.depth>0&&(t.depth-=1),t.depth===0&&t.seg&&this.endSeg(t))}async finishOpenFrames(){for(;this.frames.length;)await this.finish(this.frames.pop())}async finish(t){t.kind==="suspense"&&this.ctx&&t.id&&(this.defer-=1);let r=this.buf;this.buf=t.outer;let n;t.kind==="component"?(t.seg&&this.endSegIn(t,r),n=await Ic(this,t,r),t.pushedAncestor&&this.ancestors.pop()):t.kind==="slot"?n=Dc(t,r):n=await Mc(this,t,r),this.buf+=n;let o=this.frames[this.frames.length-1];o&&o.partition&&o.pendingSeg&&(o.seg=o.pendingSeg,o.pendingSeg=null,this.endSeg(o))}endSegIn(t,r){let n=t.seg;t.seg=null,n.slot!==null&&(n.end=r.length,(t.segments??=[]).push(n))}},di=Object.freeze([]);function sd(e,t,r){let n=String(r).toLowerCase();if(n==="button"||n==="input"){_r(t)&&(e.submitterProps??=[]).push(String(t));return}if(n!=="form")return;let o=String(t).toLowerCase();o==="encoding"&&(o="enctype"),(o==="method"||o==="enctype")&&(e.propAttrs??=[]).push(String(t))}function Fc(e,t,r){let n=String(r).toLowerCase(),o=String(t).toLowerCase();(n==="form"&&o==="action"||(n==="button"||n==="input")&&o==="formaction")&&(e.actionCount+=1)}async function zr(e,t,r){let n=new fo(t,r);return await n.value(e),await n.finishOpenFrames(),n.buf}async function $c(e,t,r){let n=new fo(t,{expand:!1,controller:r});await n.value(e),n.flush()}function Bc(e,t,r){return $c(e,t,r)}async function Hc(e,t={ssr:!0}){let r=t&&t.suspenseCtx,n=t&&t.dev!==void 0?t.dev:r&&r.dev;return r&&r.dev===void 0&&n!==void 0&&(r.dev=n),zr(e,r,{expand:!(t&&t.ssr===!1),dev:n})}function Uc(e,t={ssr:!0}){let r=t&&t.suspenseCtx,n=t&&t.dev!==void 0?t.dev:r&&r.dev;return r&&r.dev===void 0&&n!==void 0&&(r.dev=n),new ReadableStream({async start(o){try{if(t&&t.ssr===!1)await Bc(e,r,o);else{let s=await zr(e,r,{expand:!0,dev:n});o.enqueue(s)}r&&r.pending.length&&await id(r,o,n),o.close()}catch(s){o.error(s)}}})}async function id(e,t,r){let n=Qs(),o=n?` nonce="${D(n)}"`:"";for(;e.pending.length;){let s=e.pending.splice(0);await Promise.all(s.map(async({id:i,promise:a})=>{try{let c=await a,l=await zr(c,e,{expand:!0,dev:r});t.enqueue(`<template data-webjs-resolve="${i}">${l}</template><script${o}>(function(){var t=document.currentScript.previousElementSibling;var b=document.getElementById("${i}");if(b&&t){b.replaceWith(t.content.cloneNode(true));t.remove()}document.currentScript.remove()})()<\/script>`)}catch(c){console.error(`[webjs] Suspense boundary "${i}" rejected:`,c);try{let l=c instanceof Error?c:new Error(String(c)),u=await zr(Kr("webjs-suspense",l,r),e,{expand:!0,dev:r});t.enqueue(`<template data-webjs-resolve="${i}">${u}</template><script${o}>(function(){var t=document.currentScript.previousElementSibling;var b=document.getElementById("${i}");if(b&&t){b.replaceWith(t.content.cloneNode(true));t.remove()}document.currentScript.remove()})()<\/script>`)}catch(l){console.error(`[webjs] Suspense boundary "${i}" error render also threw:`,l)}}}))}}tt();var Vc=Symbol.for("webjs.notFound"),Wc=Symbol.for("webjs.redirect"),Kc=Symbol.for("webjs.forbidden"),zc=Symbol.for("webjs.unauthorized");function ad(){let e=new Error("webjs: notFound()");throw e.__webjs=Vc,e}function cd(){let e=new Error("webjs: forbidden()");throw e.__webjs=Kc,e}function ld(){let e=new Error("webjs: unauthorized()");throw e.__webjs=zc,e}function ud(e,t){let r=typeof t=="object"&&t!==null?t.status:t,n=new Error(`webjs: redirect(${e})`);throw n.__webjs=Wc,n.url=e,n.status=typeof r=="number"?r:void 0,n}function fd(e){return!!e&&e.__webjs===Vc}function dd(e){return!!e&&e.__webjs===Wc}function pd(e){return!!e&&e.__webjs===Kc}function hd(e){return!!e&&e.__webjs===zc}var pi=null;function md(e){pi=e}function gd(e){if(typeof e!="string"||!e||!pi)return e;try{return pi(e)||e}catch{return e}}xe();function bd(e,t={}){let r=t.reconnect!==!1,n=0,o=!1,s=null,i=[];function a(){o||(s=new WebSocket(yd(e),t.protocols),s.onopen=c=>{for(n=0;i.length&&s&&s.readyState===WebSocket.OPEN;)s.send(i.shift());t.onOpen?.(c)},s.onmessage=c=>{let l=c.data;if(typeof l=="string")try{l=JSON.parse(l)}catch{}t.onMessage?.(l,c)},s.onerror=c=>{t.onError?.(c)},s.onclose=c=>{if(t.onClose?.(c),!o&&r){let l=Math.min(1e3*2**n++,3e4);setTimeout(a,l)}})}return a(),{send(c){let l=typeof c=="string"||c instanceof ArrayBuffer||ArrayBuffer.isView(c)?c:JSON.stringify(c);s&&s.readyState===WebSocket.OPEN?s.send(l):i.push(l)},close(c,l){o=!0;try{s?.close(c,l)}catch{}},get socket(){return s},get readyState(){return s?.readyState??3}}}function yd(e){if(/^wss?:\/\//i.test(e))return e;let t=typeof location<"u"&&location.protocol==="https:"?"wss:":"ws:",r=typeof location<"u"?location.host:"";return`${t}//${r}${e.startsWith("/")?e:"/"+e}`}ht();var hi="application/vnd.webjs+json";async function wd(e,t={}){let r=new Headers(t.headers||{});r.has("accept")||r.set("accept",hi);let n=t.body;n!=null&&typeof n=="object"&&!(n instanceof FormData)&&!(n instanceof Blob)&&!(n instanceof ArrayBuffer)&&!(n instanceof URLSearchParams)&&!(typeof ReadableStream<"u"&&n instanceof ReadableStream)&&!ArrayBuffer.isView(n)&&(n=await Hr(n),r.has("content-type")||r.set("content-type",hi));let o=await fetch(e,{...t,headers:r,body:n}),s=o.headers.get("content-type")||"",i=await o.text(),a=s.includes(hi)?i?Ee(i):null:s.includes("application/json")?i?JSON.parse(i):null:i;if(!o.ok){let c=a&&a.error||`richFetch ${e} -> ${o.status}`,l=new Error(c);throw l.status=o.status,l.body=a,l}return a}ht();wi();yi();Jr();var Ji=class{constructor(t,r){this.host=t,this.options=r,this.updates=[],this._nextId=0}get value(){let t=this.options.source();if(!this.options.update)return this.updates.length>0?this.updates[this.updates.length-1].payload:t;for(let r of this.updates)t=this.options.update(t,r.payload);return t}add(t,r){let n=`opt-${++this._nextId}`;this.updates.push({id:n,payload:t}),this.host?.requestUpdate?.();let o=()=>{let s=this.updates.findIndex(i=>i.id===n);s!==-1&&(this.updates.splice(s,1),this.host?.requestUpdate?.())};return r&&typeof r.then=="function"&&(typeof r.finally=="function"?r.finally(()=>o()).catch(()=>{}):r.then(()=>o(),()=>o())),o}};async function fp(e,t,r){let n=e.get();e.set(t);let o;try{o=await r()}catch(s){throw e.set(n),s}return o&&o.success===!1&&e.set(n),o}function dp(e,t,r){return e&&typeof e.get=="function"&&typeof e.set=="function"?fp(e,t,r):new Ji(e,t)}mo();bo();var pp="application/vnd.webjs+stream",hp=1,mp=2,gp=3,tu=new Uint8Array(0);function bp(e,t){let r=t||tu,n=r.length,o=new Uint8Array(5+n);return o[0]=e&255,o[1]=n>>>24&255,o[2]=n>>>16&255,o[3]=n>>>8&255,o[4]=n&255,n&&o.set(r,5),o}function yp(){let e=tu;return{push(t){if(t&&t.length){let n=new Uint8Array(e.length+t.length);n.set(e,0),n.set(t,e.length),e=n}let r=[];for(;e.length>=5;){let n=e[0],o=(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0;if(e.length<5+o)break;let s=e.slice(5,5+o);r.push({type:n,payload:s}),e=e.slice(5+o)}return r}}}var wp=Symbol.for("webjs.context");function Sp(e){return{__context__:wp,name:e}}var zo=class extends Event{constructor(t,r,n=!1){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=r,this.subscribe=n}},Xi=class{constructor(t,{context:r,initialValue:n}){this._host=t,this._context=r,this._value=n,this._subscriptions=new Set,this._onRequest=o=>{let s=o;if(s.context===this._context)if(o.stopPropagation(),s.subscribe){let i={callback:s.callback},a=()=>{this._subscriptions.delete(i)};this._subscriptions.add(i),s.callback(this._value,a)}else s.callback(this._value)},typeof t.addController=="function"&&t.addController(this)}get value(){return this._value}setValue(t){if(!Object.is(this._value,t)){this._value=t;for(let r of this._subscriptions){let n=()=>{this._subscriptions.delete(r)};r.callback(t,n)}}}hostConnected(){this._host.addEventListener("context-request",this._onRequest)}hostDisconnected(){this._host.removeEventListener("context-request",this._onRequest),this._subscriptions.clear()}},Zi=class{constructor(t,{context:r,subscribe:n=!0}){this._host=t,this._context=r,this._subscribe=n,this._value=void 0,this._unsubscribe=void 0,typeof t.addController=="function"&&t.addController(this)}get value(){return this._value}hostConnected(){this._dispatchRequest()}hostDisconnected(){this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=void 0)}_dispatchRequest(){let t=new zo(this._context,(r,n)=>{let o=this._value;this._value=r,n&&(this._unsubscribe=n),!Object.is(o,r)&&typeof this._host.requestUpdate=="function"&&this._host.requestUpdate()},this._subscribe);this._host.dispatchEvent(t)}};function _p(){return typeof window<"u"}var Oe={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},Qi=class{constructor(t,{task:r,args:n,autoRun:o=!0}){this._host=t,this._taskFn=r,this._argsFn=n||(()=>[]),this._autoRun=o,this._status=Oe.INITIAL,this._value=void 0,this._error=void 0,this._abortController=null,this._prevArgs=null,typeof t.addController=="function"&&t.addController(this)}get status(){return this._status}get value(){return this._value}get error(){return this._error}async run(){this.abort();let t=new AbortController;this._abortController=t;let r=this._argsFn();this._prevArgs=r,this._status=Oe.PENDING,this._error=void 0,this._requestHostUpdate();try{let n=await this._taskFn(...r,{signal:t.signal});if(t.signal.aborted)return;this._value=n,this._status=Oe.COMPLETE,this._error=void 0}catch(n){if(t.signal.aborted)return;this._error=n,this._status=Oe.ERROR,this._value=void 0}finally{this._abortController===t&&(this._abortController=null)}this._requestHostUpdate()}abort(){this._abortController&&(this._abortController.abort(),this._abortController=null)}render(t={}){switch(this._status){case Oe.INITIAL:return t.initial?.();case Oe.PENDING:return t.pending?.();case Oe.COMPLETE:return t.complete?.(this._value);case Oe.ERROR:return t.error?.(this._error);default:return}}hostUpdate(){if(!this._autoRun||!_p())return;let t=this._argsFn();this._argsEqual(this._prevArgs,t)||this.run()}hostUpdated(){}hostConnected(){}hostDisconnected(){this.abort()}_requestHostUpdate(){typeof this._host.requestUpdate=="function"&&this._host.requestUpdate()}_argsEqual(t,r){if(t===null||t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==r[n])return!1;return!0}};export{Zi as ContextConsumer,Xi as ContextProvider,zo as ContextRequestEvent,O as FORM_ACTION_FIELD,sa as FORM_ACTION_ID_KEY,hp as FRAME_CHUNK,mp as FRAME_END,gp as FRAME_ERROR,R as MARKER,rl as SEED_MISS,pp as STREAM_CONTENT_TYPE,Dr as Signal,Vf as Suspense,Qi as Task,Oe as TaskStatus,Vr as WebComponent,bi as WebjsFrame,Si as WebjsStream,Ys as activeActionSignal,Xo as adoptStyles,xf as allTags,gd as asset,Nu as asyncAppend,Cu as asyncReplace,zu as batch,Tu as cache,Yu as computed,bd as connectWS,Id as consumeStale,Sp as createContext,yp as createFrameDecoder,Eu as createRef,Qs as cspNonce,su as css,rc as deserialize,zi as disableClientRouter,Xu as effect,jn as enableClientRouter,bp as encodeFrame,D as escapeAttr,Nt as escapeText,jd as fetchMark,cd as forbidden,Au as guard,Jo as html,Er as isAsyncAppend,Tr as isAsyncReplace,pr as isCSS,It as isCache,pd as isForbidden,jt as isGuard,Ot as isKeyed,Af as isLazy,X as isLive,fd as isNotFound,dd as isRedirect,Pt as isRef,Lt as isRepeat,Ju as isSignal,ei as isSuspense,I as isTemplate,vr as isTemplateContent,hd as isUnauthorized,xr as isUnsafeHTML,qt as isUntil,Dt as isWatch,_u as keyed,Su as live,Yi as loadFrame,ao as lookup,_f as lookupModuleUrl,Ei as markStale,Gi as navigate,ad as notFound,dp as optimistic,Ee as parse,Ti as parseTagHeader,Sf as primeModuleUrl,ac as prop,ud as redirect,vu as ref,Ko as refreshPage,Pd as registerKeyTags,ft as render,_i as renderStream,Uc as renderToStream,Hc as renderToString,ha as repeat,Wo as revalidate,wd as richFetch,ho as scanSeeds,Ld as seedStats,tc as serialize,so as setActiveActionSignal,md as setAssetUrlProvider,Uf as setCspNonceProvider,lu as setFormActionResolver,Gu as signal,Hr as stringify,Zo as stylesToString,dt as tagOf,Rd as takeSeed,xu as templateContent,ld as unauthorized,ss as unsafeHTML,ku as until,Ru as watch};
10
9
  //# sourceMappingURL=webjs-core.js.map