turbo_boost-elements 0.0.6 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fbb4aa082272135b6e68ce96c25134982108185f8fedaeeb96495068de535c5
|
4
|
+
data.tar.gz: bbf7a891a1fdad5116a77e5bd67c6a29dede840cb157725f86a68a7fc929e795
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 765a74982c806b5aefb79acde68a058e50d525eeb098ee8d14968aa4e4948e94afc23ea95e891ce49afe8db633f008056e68ac746c5e4b8388544f4fc447b8e7
|
7
|
+
data.tar.gz: 1225bf1fc4963d369f0651d3feb293ae051d35d3099a238634d28429091d05f2dd6cd628b1d31fa1f94c6c5c2798a414852b5231f26bb541c2b1b739cae4179f
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
</h1>
|
5
5
|
<p align="center">
|
6
6
|
<a href="http://blog.codinghorror.com/the-best-code-is-no-code-at-all/">
|
7
|
-
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-
|
7
|
+
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-1169-47d299.svg" />
|
8
8
|
</a>
|
9
9
|
<a href="https://codeclimate.com/github/hopsoft/turbo_boost-elements/maintainability">
|
10
10
|
<img src="https://api.codeclimate.com/v1/badges/7aac6daed3e4032e292e/maintainability" />
|
@@ -3,7 +3,7 @@ var _o=Object.defineProperty,xo=Object.defineProperties;var yo=Object.getOwnProp
|
|
3
3
|
${r?'Expression: "'+r+`"
|
4
4
|
|
5
5
|
`:""}`,t),setTimeout(()=>{throw e},0)}var Ue=!0;function ei(e){let t=Ue;Ue=!1,e(),Ue=t}function pe(e,t,r={}){let n;return C(e,t)(o=>n=o,r),n}function C(...e){return Zr(...e)}var Zr=Gr;function ti(e){Zr=e}function Gr(e,t){let r={};Mt(r,e);let n=[r,...me(e)];if(typeof t=="function")return ri(n,t);let o=oi(n,t,e);return Qo.bind(null,e,t,o)}function ri(e,t){return(r=()=>{},{scope:n={},params:o=[]}={})=>{let i=t.apply(Re([n,...e]),o);Ze(r,i)}}var kt={};function ni(e,t){if(kt[e])return kt[e];let r=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)\s/.test(e)?`(() => { ${e} })()`:e,o=(()=>{try{return new r(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`)}catch(i){return Le(i,t,e),Promise.resolve()}})();return kt[e]=o,o}function oi(e,t,r){let n=ni(t,r);return(o=()=>{},{scope:i={},params:s=[]}={})=>{n.result=void 0,n.finished=!1;let a=Re([i,...e]);if(typeof n=="function"){let l=n(n,a).catch(u=>Le(u,r,t));n.finished?(Ze(o,n.result,a,s,r),n.result=void 0):l.then(u=>{Ze(o,u,a,s,r)}).catch(u=>Le(u,r,t)).finally(()=>n.result=void 0)}}}function Ze(e,t,r,n,o){if(Ue&&typeof t=="function"){let i=t.apply(r,n);i instanceof Promise?i.then(s=>Ze(e,s,r,n)).catch(s=>Le(s,o,t)):e(i)}else e(t)}var Gt="x-";function _e(e=""){return Gt+e}function ii(e){Gt=e}var Yr={};function w(e,t){Yr[e]=t}function Yt(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([s,a])=>({name:s,value:a})),i=Qr(o);o=o.map(s=>i.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),t=t.concat(o)}let n={};return t.map(on((o,i)=>n[o]=i)).filter(an).map(li(n,r)).sort(ui).map(o=>ai(e,o))}function Qr(e){return Array.from(e).map(on()).filter(t=>!an(t))}var Nt=!1,Te=new Map,en=Symbol();function si(e){Nt=!0;let t=Symbol();en=t,Te.set(t,[]);let r=()=>{for(;Te.get(t).length;)Te.get(t).shift()();Te.delete(t)},n=()=>{Nt=!1,r()};e(r),n()}function tn(e){let t=[],r=i=>t.push(i),[n,o]=Fo(e);return t.push(o),[{Alpine:Pe,effect:n,cleanup:r,evaluateLater:C.bind(C,e),evaluate:pe.bind(pe,e)},()=>t.forEach(i=>i())]}function ai(e,t){let r=()=>{},n=Yr[t.type]||r,[o,i]=tn(e);Uo(e,t.original,i);let s=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,o),n=n.bind(n,e,t,o),Nt?Te.get(en).push(n):n())};return s.runCleanups=i,s}var rn=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),nn=e=>e;function on(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:o}=sn.reduce((i,s)=>s(i),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:o}}}var sn=[];function Qt(e){sn.push(e)}function an({name:e}){return ln().test(e)}var ln=()=>new RegExp(`^${Gt}([^:^.]+)\\b`);function li(e,t){return({name:r,value:n})=>{let o=r.match(ln()),i=r.match(/:([a-zA-Z0-9\-:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:o?o[1]:null,value:i?i[1]:null,modifiers:s.map(l=>l.replace(".","")),expression:n,original:a}}}var Rt="DEFAULT",We=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",Rt,"teleport"];function ui(e,t){let r=We.indexOf(e.type)===-1?Rt:e.type,n=We.indexOf(t.type)===-1?Rt:t.type;return We.indexOf(r)-We.indexOf(n)}function Se(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var Pt=[],er=!1;function un(e=()=>{}){return queueMicrotask(()=>{er||setTimeout(()=>{Dt()})}),new Promise(t=>{Pt.push(()=>{e(),t()})})}function Dt(){for(er=!1;Pt.length;)Pt.shift()()}function ci(){er=!0}function ae(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(o=>ae(o,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)ae(n,t,!1),n=n.nextElementSibling}function ge(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function di(){document.body||ge("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),Se(document,"alpine:init"),Se(document,"alpine:initializing"),Wr(),Wo(t=>Q(t,ae)),zr(t=>pi(t)),Vo((t,r)=>{Yt(t,r).forEach(n=>n())});let e=t=>!tt(t.parentElement,!0);Array.from(document.querySelectorAll(fn())).filter(e).forEach(t=>{Q(t)}),Se(document,"alpine:initialized")}var tr=[],cn=[];function dn(){return tr.map(e=>e())}function fn(){return tr.concat(cn).map(e=>e())}function pn(e){tr.push(e)}function hn(e){cn.push(e)}function tt(e,t=!1){return rt(e,r=>{if((t?fn():dn()).some(n=>r.matches(n)))return!0})}function rt(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return rt(e.parentElement,t)}}function fi(e){return dn().some(t=>e.matches(t))}function Q(e,t=ae){si(()=>{t(e,(r,n)=>{Yt(r,r.attributes).forEach(o=>o()),r._x_ignore&&n()})})}function pi(e){ae(e,t=>Fr(t))}function rr(e,t){return Array.isArray(t)?Cr(e,t.join(" ")):typeof t=="object"&&t!==null?hi(e,t):typeof t=="function"?rr(e,t()):Cr(e,t)}function Cr(e,t){let r=i=>i.split(" ").filter(Boolean),n=i=>i.split(" ").filter(s=>!e.classList.contains(s)).filter(Boolean),o=i=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",o(n(t))}function hi(e,t){let r=a=>a.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([a,l])=>l?r(a):!1).filter(Boolean),o=Object.entries(t).flatMap(([a,l])=>l?!1:r(a)).filter(Boolean),i=[],s=[];return o.forEach(a=>{e.classList.contains(a)&&(e.classList.remove(a),s.push(a))}),n.forEach(a=>{e.classList.contains(a)||(e.classList.add(a),i.push(a))}),()=>{s.forEach(a=>e.classList.add(a)),i.forEach(a=>e.classList.remove(a))}}function nt(e,t){return typeof t=="object"&&t!==null?mi(e,t):gi(e,t)}function mi(e,t){let r={};return Object.entries(t).forEach(([n,o])=>{r[n]=e.style[n],n.startsWith("--")||(n=bi(n)),e.style.setProperty(n,o)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{nt(e,r)}}function gi(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function bi(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Bt(e,t=()=>{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}w("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:o})=>{typeof n=="function"&&(n=o(n)),n?vi(e,n,t):_i(e,r,t)});function vi(e,t,r){mn(e,rr,""),{enter:n=>{e._x_transition.enter.during=n},"enter-start":n=>{e._x_transition.enter.start=n},"enter-end":n=>{e._x_transition.enter.end=n},leave:n=>{e._x_transition.leave.during=n},"leave-start":n=>{e._x_transition.leave.start=n},"leave-end":n=>{e._x_transition.leave.end=n}}[r](t)}function _i(e,t,r){mn(e,nt);let n=!t.includes("in")&&!t.includes("out")&&!r,o=n||t.includes("in")||["enter"].includes(r),i=n||t.includes("out")||["leave"].includes(r);t.includes("in")&&!n&&(t=t.filter((b,x)=>x<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((b,x)=>x>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),u=a?0:1,d=l?we(t,"scale",95)/100:1,p=we(t,"delay",0),v=we(t,"origin","center"),N="opacity, transform",E=we(t,"duration",150)/1e3,de=we(t,"duration",75)/1e3,f="cubic-bezier(0.4, 0.0, 0.2, 1)";o&&(e._x_transition.enter.during={transformOrigin:v,transitionDelay:p,transitionProperty:N,transitionDuration:`${E}s`,transitionTimingFunction:f},e._x_transition.enter.start={opacity:u,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),i&&(e._x_transition.leave.during={transformOrigin:v,transitionDelay:p,transitionProperty:N,transitionDuration:`${de}s`,transitionTimingFunction:f},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:u,transform:`scale(${d})`})}function mn(e,t,r={}){e._x_transition||(e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},o=()=>{}){Ht(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,o)},out(n=()=>{},o=()=>{}){Ht(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,o)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let o=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,i=()=>o(r);if(t){e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):i():e._x_transition?e._x_transition.in(r):i();return}e._x_hidePromise=e._x_transition?new Promise((s,a)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=gn(e);s?(s._x_hideChildren||(s._x_hideChildren=[]),s._x_hideChildren.push(e)):o(()=>{let a=l=>{let u=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([d])=>d());return delete l._x_hidePromise,delete l._x_hideChildren,u};a(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function gn(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:gn(t)}function Ht(e,t,{during:r,start:n,end:o}={},i=()=>{},s=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(o).length===0){i(),s();return}let a,l,u;xi(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:i,end(){a(),u=t(e,o)},after:s,cleanup(){l(),u()}})}function xi(e,t){let r,n,o,i=Bt(()=>{T(()=>{r=!0,n||t.before(),o||(t.end(),Dt()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Bt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();i()}),finish:i},T(()=>{t.start(),t.during()}),ci(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;s===0&&(s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),T(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{r||(T(()=>{t.end()}),Dt(),setTimeout(e._x_transitioning.finish,s+a),o=!0)})})}function we(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n||t==="scale"&&isNaN(n))return r;if(t==="duration"){let o=n.match(/([0-9]+)ms/);if(o)return o[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}var qt=!1;function ot(e,t=()=>{}){return(...r)=>qt?t(...r):e(...r)}function yi(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),qt=!0,wi(()=>{Ei(t)}),qt=!1}function Ei(e){let t=!1;Q(e,(r,n)=>{ae(r,(o,i)=>{if(t&&fi(o))return i();t=!0,n(o,i)})})}function wi(e){let t=Me;Ar((r,n)=>{let o=t(r);return et(o),()=>{}}),e(),Ar(t)}function bn(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=ve({})),e._x_bindings[t]=r,t=n.includes("camel")?Li(t):t,t){case"value":ki(e,r);break;case"style":Ai(e,r);break;case"class":Ti(e,r);break;default:Si(e,t,r);break}}function ki(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=Or(e.value,t));else if(e.type==="checkbox")Number.isInteger(t)?e.value=t:!Number.isInteger(t)&&!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(r=>Or(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")Oi(e,t);else{if(e.value===t)return;e.value=t}}function Ti(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=rr(e,t)}function Ai(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=nt(e,t)}function Si(e,t,r){[null,void 0,!1].includes(r)&&$i(t)?e.removeAttribute(t):(vn(t)&&(r=t),Ci(e,t,r))}function Ci(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function Oi(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function Li(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Or(e,t){return e==t}function vn(e){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}function $i(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function ji(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];let n=e.getAttribute(t);return n===null?typeof r=="function"?r():r:n===""?!0:vn(t)?!![t,"true"].includes(n):n}function _n(e,t){var r;return function(){var n=this,o=arguments,i=function(){r=null,e.apply(n,o)};clearTimeout(r),r=setTimeout(i,t)}}function xn(e,t){let r;return function(){let n=this,o=arguments;r||(e.apply(n,o),r=!0,setTimeout(()=>r=!1,t))}}function Mi(e){e(Pe)}var ne={},Lr=!1;function Ni(e,t){if(Lr||(ne=ve(ne),Lr=!0),t===void 0)return ne[e];ne[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&ne[e].init(),Ur(ne[e])}function Ri(){return ne}var yn={};function Pi(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?En(e,r()):yn[e]=r}function Di(e){return Object.entries(yn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function En(e,t,r){let n=[];for(;n.length;)n.pop()();let o=Object.entries(t).map(([s,a])=>({name:s,value:a})),i=Qr(o);o=o.map(s=>i.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),Yt(e,o,r).map(s=>{n.push(s.runCleanups),s()})}var wn={};function Bi(e,t){wn[e]=t}function Hi(e,t){return Object.entries(wn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...o)=>n.bind(t)(...o)},enumerable:!1})}),e}var qi={get reactive(){return ve},get release(){return et},get effect(){return Me},get raw(){return Br},version:"3.10.5",flushAndStopDeferringMutations:Go,dontAutoEvaluateFunctions:ei,disableEffectScheduling:Io,setReactivityEngine:zo,closestDataStack:me,skipDuringClone:ot,addRootSelector:pn,addInitSelector:hn,addScopeToNode:Ne,deferMutations:Zo,mapAttributes:Qt,evaluateLater:C,setEvaluator:ti,mergeProxies:Re,findClosest:rt,closestRoot:tt,interceptor:Xr,transition:Ht,setStyles:nt,mutateDom:T,directive:w,throttle:xn,debounce:_n,evaluate:pe,initTree:Q,nextTick:un,prefixed:_e,prefix:ii,plugin:Mi,magic:H,store:Ni,start:di,clone:yi,bound:ji,$data:Vr,data:Bi,bind:Pi},Pe=qi;function kn(e,t){let r=Object.create(null),n=e.split(",");for(let o=0;o<n.length;o++)r[n[o]]=!0;return t?o=>!!r[o.toLowerCase()]:o=>!!r[o]}var Ii="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ha=kn(Ii+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),zi=Object.freeze({}),qa=Object.freeze([]),Tn=Object.assign,Fi=Object.prototype.hasOwnProperty,it=(e,t)=>Fi.call(e,t),ie=Array.isArray,Ce=e=>An(e)==="[object Map]",Wi=e=>typeof e=="string",nr=e=>typeof e=="symbol",st=e=>e!==null&&typeof e=="object",Vi=Object.prototype.toString,An=e=>Vi.call(e),Sn=e=>An(e).slice(8,-1),or=e=>Wi(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,at=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},Ui=/-(\w)/g,Ia=at(e=>e.replace(Ui,(t,r)=>r?r.toUpperCase():"")),Xi=/\B([A-Z])/g,za=at(e=>e.replace(Xi,"-$1").toLowerCase()),Cn=at(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fa=at(e=>e?`on${Cn(e)}`:""),On=(e,t)=>e!==t&&(e===e||t===t),It=new WeakMap,ke=[],z,se=Symbol("iterate"),zt=Symbol("Map key iterate");function Ki(e){return e&&e._isEffect===!0}function Ji(e,t=zi){Ki(e)&&(e=e.raw);let r=Yi(e,t);return t.lazy||r(),r}function Zi(e){e.active&&(Ln(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var Gi=0;function Yi(e,t){let r=function(){if(!r.active)return e();if(!ke.includes(r)){Ln(r);try{return es(),ke.push(r),z=r,e()}finally{ke.pop(),$n(),z=ke[ke.length-1]}}};return r.id=Gi++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function Ln(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var be=!0,ir=[];function Qi(){ir.push(be),be=!1}function es(){ir.push(be),be=!0}function $n(){let e=ir.pop();be=e===void 0?!0:e}function B(e,t,r){if(!be||z===void 0)return;let n=It.get(e);n||It.set(e,n=new Map);let o=n.get(r);o||n.set(r,o=new Set),o.has(z)||(o.add(z),z.deps.push(o),z.options.onTrack&&z.options.onTrack({effect:z,target:e,type:t,key:r}))}function ee(e,t,r,n,o,i){let s=It.get(e);if(!s)return;let a=new Set,l=d=>{d&&d.forEach(p=>{(p!==z||p.allowRecurse)&&a.add(p)})};if(t==="clear")s.forEach(l);else if(r==="length"&&ie(e))s.forEach((d,p)=>{(p==="length"||p>=n)&&l(d)});else switch(r!==void 0&&l(s.get(r)),t){case"add":ie(e)?or(r)&&l(s.get("length")):(l(s.get(se)),Ce(e)&&l(s.get(zt)));break;case"delete":ie(e)||(l(s.get(se)),Ce(e)&&l(s.get(zt)));break;case"set":Ce(e)&&l(s.get(se));break}let u=d=>{d.options.onTrigger&&d.options.onTrigger({effect:d,target:e,key:r,type:t,newValue:n,oldValue:o,oldTarget:i}),d.options.scheduler?d.options.scheduler(d):d()};a.forEach(u)}var ts=kn("__proto__,__v_isRef,__isVue"),jn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(nr)),rs=lt(),ns=lt(!1,!0),os=lt(!0),is=lt(!0,!0),Ge={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];Ge[e]=function(...r){let n=_(this);for(let i=0,s=this.length;i<s;i++)B(n,"get",i+"");let o=t.apply(n,r);return o===-1||o===!1?t.apply(n,r.map(_)):o}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];Ge[e]=function(...r){Qi();let n=t.apply(this,r);return $n(),n}});function lt(e=!1,t=!1){return function(r,n,o){if(n==="__v_isReactive")return!e;if(n==="__v_isReadonly")return e;if(n==="__v_raw"&&o===(e?t?ms:Un:t?hs:Vn).get(r))return r;let i=ie(r);if(!e&&i&&it(Ge,n))return Reflect.get(Ge,n,o);let s=Reflect.get(r,n,o);return(nr(n)?jn.has(n):ts(n))||(e||B(r,"get",n),t)?s:Ft(s)?!i||!or(n)?s.value:s:st(s)?e?Xn(s):ur(s):s}}var ss=Mn(),as=Mn(!0);function Mn(e=!1){return function(t,r,n,o){let i=t[r];if(!e&&(n=_(n),i=_(i),!ie(t)&&Ft(i)&&!Ft(n)))return i.value=n,!0;let s=ie(t)&&or(r)?Number(r)<t.length:it(t,r),a=Reflect.set(t,r,n,o);return t===_(o)&&(s?On(n,i)&&ee(t,"set",r,n,i):ee(t,"add",r,n)),a}}function ls(e,t){let r=it(e,t),n=e[t],o=Reflect.deleteProperty(e,t);return o&&r&&ee(e,"delete",t,void 0,n),o}function us(e,t){let r=Reflect.has(e,t);return(!nr(t)||!jn.has(t))&&B(e,"has",t),r}function cs(e){return B(e,"iterate",ie(e)?"length":se),Reflect.ownKeys(e)}var Nn={get:rs,set:ss,deleteProperty:ls,has:us,ownKeys:cs},Rn={get:os,set(e,t){return console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},Wa=Tn({},Nn,{get:ns,set:as}),Va=Tn({},Rn,{get:is}),sr=e=>st(e)?ur(e):e,ar=e=>st(e)?Xn(e):e,lr=e=>e,ut=e=>Reflect.getPrototypeOf(e);function ct(e,t,r=!1,n=!1){e=e.__v_raw;let o=_(e),i=_(t);t!==i&&!r&&B(o,"get",t),!r&&B(o,"get",i);let{has:s}=ut(o),a=n?lr:r?ar:sr;if(s.call(o,t))return a(e.get(t));if(s.call(o,i))return a(e.get(i));e!==o&&e.get(t)}function dt(e,t=!1){let r=this.__v_raw,n=_(r),o=_(e);return e!==o&&!t&&B(n,"has",e),!t&&B(n,"has",o),e===o?r.has(e):r.has(e)||r.has(o)}function ft(e,t=!1){return e=e.__v_raw,!t&&B(_(e),"iterate",se),Reflect.get(e,"size",e)}function Pn(e){e=_(e);let t=_(this);return ut(t).has.call(t,e)||(t.add(e),ee(t,"add",e,e)),this}function Dn(e,t){t=_(t);let r=_(this),{has:n,get:o}=ut(r),i=n.call(r,e);i?Wn(r,n,e):(e=_(e),i=n.call(r,e));let s=o.call(r,e);return r.set(e,t),i?On(t,s)&&ee(r,"set",e,t,s):ee(r,"add",e,t),this}function Bn(e){let t=_(this),{has:r,get:n}=ut(t),o=r.call(t,e);o?Wn(t,r,e):(e=_(e),o=r.call(t,e));let i=n?n.call(t,e):void 0,s=t.delete(e);return o&&ee(t,"delete",e,void 0,i),s}function Hn(){let e=_(this),t=e.size!==0,r=Ce(e)?new Map(e):new Set(e),n=e.clear();return t&&ee(e,"clear",void 0,void 0,r),n}function pt(e,t){return function(r,n){let o=this,i=o.__v_raw,s=_(i),a=t?lr:e?ar:sr;return!e&&B(s,"iterate",se),i.forEach((l,u)=>r.call(n,a(l),a(u),o))}}function Ve(e,t,r){return function(...n){let o=this.__v_raw,i=_(o),s=Ce(i),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,u=o[e](...n),d=r?lr:t?ar:sr;return!t&&B(i,"iterate",l?zt:se),{next(){let{value:p,done:v}=u.next();return v?{value:p,done:v}:{value:a?[d(p[0]),d(p[1])]:d(p),done:v}},[Symbol.iterator](){return this}}}}function G(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${Cn(e)} operation ${r}failed: target is readonly.`,_(this))}return e==="delete"?!1:this}}var qn={get(e){return ct(this,e)},get size(){return ft(this)},has:dt,add:Pn,set:Dn,delete:Bn,clear:Hn,forEach:pt(!1,!1)},In={get(e){return ct(this,e,!1,!0)},get size(){return ft(this)},has:dt,add:Pn,set:Dn,delete:Bn,clear:Hn,forEach:pt(!1,!0)},zn={get(e){return ct(this,e,!0)},get size(){return ft(this,!0)},has(e){return dt.call(this,e,!0)},add:G("add"),set:G("set"),delete:G("delete"),clear:G("clear"),forEach:pt(!0,!1)},Fn={get(e){return ct(this,e,!0,!0)},get size(){return ft(this,!0)},has(e){return dt.call(this,e,!0)},add:G("add"),set:G("set"),delete:G("delete"),clear:G("clear"),forEach:pt(!0,!0)},ds=["keys","values","entries",Symbol.iterator];ds.forEach(e=>{qn[e]=Ve(e,!1,!1),zn[e]=Ve(e,!0,!1),In[e]=Ve(e,!1,!0),Fn[e]=Ve(e,!0,!0)});function ht(e,t){let r=t?e?Fn:In:e?zn:qn;return(n,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(it(r,o)&&o in n?r:n,o,i)}var fs={get:ht(!1,!1)},Ua={get:ht(!1,!0)},ps={get:ht(!0,!1)},Xa={get:ht(!0,!0)};function Wn(e,t,r){let n=_(r);if(n!==r&&t.call(e,n)){let o=Sn(e);console.warn(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Vn=new WeakMap,hs=new WeakMap,Un=new WeakMap,ms=new WeakMap;function gs(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bs(e){return e.__v_skip||!Object.isExtensible(e)?0:gs(Sn(e))}function ur(e){return e&&e.__v_isReadonly?e:Kn(e,!1,Nn,fs,Vn)}function Xn(e){return Kn(e,!0,Rn,ps,Un)}function Kn(e,t,r,n,o){if(!st(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=o.get(e);if(i)return i;let s=bs(e);if(s===0)return e;let a=new Proxy(e,s===2?n:r);return o.set(e,a),a}function _(e){return e&&_(e.__v_raw)||e}function Ft(e){return Boolean(e&&e.__v_isRef===!0)}H("nextTick",()=>un);H("dispatch",e=>Se.bind(Se,e));H("watch",(e,{evaluateLater:t,effect:r})=>(n,o)=>{let i=t(n),s=!0,a,l=r(()=>i(u=>{JSON.stringify(u),s?a=u:queueMicrotask(()=>{o(u,a),a=u}),s=!1}));e._x_effects.delete(l)});H("store",Ri);H("data",e=>Vr(e));H("root",e=>tt(e));H("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Re(vs(e))),e._x_refs_proxy));function vs(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var Tt={};function Jn(e){return Tt[e]||(Tt[e]=0),++Tt[e]}function _s(e,t){return rt(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function xs(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Jn(t))}H("id",e=>(t,r=null)=>{let n=_s(e,t),o=n?n._x_ids[t]:Jn(t);return r?`${t}-${o}-${r}`:`${t}-${o}`});H("el",e=>e);Zn("Focus","focus","focus");Zn("Persist","persist","persist");function Zn(e,t,r){H(t,n=>ge(`You can't use [$${directiveName}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}w("modelable",(e,{expression:t},{effect:r,evaluateLater:n})=>{let o=n(t),i=()=>{let u;return o(d=>u=d),u},s=n(`${t} = __placeholder`),a=u=>s(()=>{},{scope:{__placeholder:u}}),l=i();a(l),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let u=e._x_model.get,d=e._x_model.set;r(()=>a(u())),r(()=>d(i()))})});w("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&ge("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||ge(`Cannot find x-teleport element for selector: "${t}"`);let o=e.content.cloneNode(!0).firstElementChild;e._x_teleport=o,o._x_teleportBack=e,e._x_forwardEvents&&e._x_forwardEvents.forEach(i=>{o.addEventListener(i,s=>{s.stopPropagation(),e.dispatchEvent(new s.constructor(s.type,s))})}),Ne(o,{},e),T(()=>{n.appendChild(o),Q(o),o._x_ignore=!0}),r(()=>o.remove())});var Gn=()=>{};Gn.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};w("ignore",Gn);w("effect",(e,{expression:t},{effect:r})=>r(C(e,t)));function Yn(e,t,r,n){let o=e,i=l=>n(l),s={},a=(l,u)=>d=>u(l,d);if(r.includes("dot")&&(t=ys(t)),r.includes("camel")&&(t=Es(t)),r.includes("passive")&&(s.passive=!0),r.includes("capture")&&(s.capture=!0),r.includes("window")&&(o=window),r.includes("document")&&(o=document),r.includes("prevent")&&(i=a(i,(l,u)=>{u.preventDefault(),l(u)})),r.includes("stop")&&(i=a(i,(l,u)=>{u.stopPropagation(),l(u)})),r.includes("self")&&(i=a(i,(l,u)=>{u.target===e&&l(u)})),(r.includes("away")||r.includes("outside"))&&(o=document,i=a(i,(l,u)=>{e.contains(u.target)||u.target.isConnected!==!1&&(e.offsetWidth<1&&e.offsetHeight<1||e._x_isShown!==!1&&l(u))})),r.includes("once")&&(i=a(i,(l,u)=>{l(u),o.removeEventListener(t,i,s)})),i=a(i,(l,u)=>{ks(t)&&Ts(u,r)||l(u)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",u=Wt(l.split("ms")[0])?Number(l.split("ms")[0]):250;i=_n(i,u)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",u=Wt(l.split("ms")[0])?Number(l.split("ms")[0]):250;i=xn(i,u)}return o.addEventListener(t,i,s),()=>{o.removeEventListener(t,i,s)}}function ys(e){return e.replace(/-/g,".")}function Es(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Wt(e){return!Array.isArray(e)&&!isNaN(e)}function ws(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function ks(e){return["keydown","keyup"].includes(e)}function Ts(e,t){let r=t.filter(o=>!["window","document","prevent","stop","once"].includes(o));if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Wt((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&$r(e.key).includes(r[0]))return!1;let n=["ctrl","shift","alt","meta","cmd","super"].filter(o=>r.includes(o));return r=r.filter(o=>!n.includes(o)),!(n.length>0&&n.filter(o=>((o==="cmd"||o==="super")&&(o="meta"),e[`${o}Key`])).length===n.length&&$r(e.key).includes(r[0]))}function $r(e){if(!e)return[];e=ws(e);let t={ctrl:"control",slash:"/",space:"-",spacebar:"-",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",equal:"="};return t[e]=e,Object.keys(t).map(r=>{if(t[r]===e)return r}).filter(r=>r)}w("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:o})=>{let i=C(e,r),s=`${r} = rightSideOfExpression($event, ${r})`,a=C(e,s);var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let u=As(e,t,r),d=Yn(e,l,t,v=>{a(()=>{},{scope:{$event:v,rightSideOfExpression:u}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=d,o(()=>e._x_removeModelListeners.default());let p=C(e,`${r} = __placeholder`);e._x_model={get(){let v;return i(N=>v=N),v},set(v){p(()=>{},{scope:{__placeholder:v}})}},e._x_forceModelUpdate=()=>{i(v=>{v===void 0&&r.match(/\./)&&(v=""),window.fromModel=!0,T(()=>bn(e,"value",v)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function As(e,t,r){return e.type==="radio"&&T(()=>{e.hasAttribute("name")||e.setAttribute("name",r)}),(n,o)=>T(()=>{if(n instanceof CustomEvent&&n.detail!==void 0)return n.detail||n.target.value;if(e.type==="checkbox")if(Array.isArray(o)){let i=t.includes("number")?At(n.target.value):n.target.value;return n.target.checked?o.concat([i]):o.filter(s=>!Ss(s,i))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(i=>{let s=i.value||i.text;return At(s)}):Array.from(n.target.selectedOptions).map(i=>i.value||i.text);{let i=n.target.value;return t.includes("number")?At(i):t.includes("trim")?i.trim():i}}})}function At(e){let t=e?parseFloat(e):null;return Cs(t)?t:e}function Ss(e,t){return e==t}function Cs(e){return!Array.isArray(e)&&!isNaN(e)}w("cloak",e=>queueMicrotask(()=>T(()=>e.removeAttribute(_e("cloak")))));hn(()=>`[${_e("init")}]`);w("init",ot((e,{expression:t},{evaluate:r})=>typeof t=="string"?!!t.trim()&&r(t,{},!1):r(t,{},!1)));w("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let o=n(t);r(()=>{o(i=>{T(()=>{e.textContent=i})})})});w("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let o=n(t);r(()=>{o(i=>{T(()=>{e.innerHTML=i,e._x_ignoreSelf=!0,Q(e),delete e._x_ignoreSelf})})})});Qt(rn(":",nn(_e("bind:"))));w("bind",(e,{value:t,modifiers:r,expression:n,original:o},{effect:i})=>{if(!t){let a={};Di(a),C(e,n)(l=>{En(e,l,o)},{scope:a});return}if(t==="key")return Os(e,n);let s=C(e,n);i(()=>s(a=>{a===void 0&&typeof n=="string"&&n.match(/\./)&&(a=""),T(()=>bn(e,t,a,r))}))});function Os(e,t){e._x_keyExpression=t}pn(()=>`[${_e("data")}]`);w("data",ot((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};Mt(n,e);let o={};Hi(o,n);let i=pe(e,t,{scope:o});i===void 0&&(i={}),Mt(i,e);let s=ve(i);Ur(s);let a=Ne(e,s);s.init&&pe(e,s.init),r(()=>{s.destroy&&pe(e,s.destroy),a()})}));w("show",(e,{modifiers:t,expression:r},{effect:n})=>{let o=C(e,r);e._x_doHide||(e._x_doHide=()=>{T(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{T(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let i=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=Bt(p=>p?s():i(),p=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,p,s,i):p?a():i()}),u,d=!0;n(()=>o(p=>{!d&&p===u||(t.includes("immediate")&&(p?a():i()),l(p),u=p,d=!1)}))});w("for",(e,{expression:t},{effect:r,cleanup:n})=>{let o=$s(t),i=C(e,o.items),s=C(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>Ls(e,o,i,s)),n(()=>{Object.values(e._x_lookup).forEach(a=>a.remove()),delete e._x_prevKeys,delete e._x_lookup})});function Ls(e,t,r,n){let o=s=>typeof s=="object"&&!Array.isArray(s),i=e;r(s=>{js(s)&&s>=0&&(s=Array.from(Array(s).keys(),f=>f+1)),s===void 0&&(s=[]);let a=e._x_lookup,l=e._x_prevKeys,u=[],d=[];if(o(s))s=Object.entries(s).map(([f,b])=>{let x=jr(t,b,f,s);n(A=>d.push(A),{scope:Ke({index:f},x)}),u.push(x)});else for(let f=0;f<s.length;f++){let b=jr(t,s[f],f,s);n(x=>d.push(x),{scope:Ke({index:f},b)}),u.push(b)}let p=[],v=[],N=[],E=[];for(let f=0;f<l.length;f++){let b=l[f];d.indexOf(b)===-1&&N.push(b)}l=l.filter(f=>!N.includes(f));let de="template";for(let f=0;f<d.length;f++){let b=d[f],x=l.indexOf(b);if(x===-1)l.splice(f,0,b),p.push([de,f]);else if(x!==f){let A=l.splice(f,1)[0],$=l.splice(x-1,1)[0];l.splice(f,0,$),l.splice(x,0,A),v.push([A,$])}else E.push(b);de=b}for(let f=0;f<N.length;f++){let b=N[f];a[b]._x_effects&&a[b]._x_effects.forEach(Dr),a[b].remove(),a[b]=null,delete a[b]}for(let f=0;f<v.length;f++){let[b,x]=v[f],A=a[b],$=a[x],U=document.createElement("div");T(()=>{$.after(U),A.after($),$._x_currentIfEl&&$.after($._x_currentIfEl),U.before(A),A._x_currentIfEl&&A.after(A._x_currentIfEl),U.remove()}),Sr($,u[d.indexOf(x)])}for(let f=0;f<p.length;f++){let[b,x]=p[f],A=b==="template"?i:a[b];A._x_currentIfEl&&(A=A._x_currentIfEl);let $=u[x],U=d[x],D=document.importNode(i.content,!0).firstElementChild;Ne(D,ve($),i),T(()=>{A.after(D),Q(D)}),typeof U=="object"&&ge("x-for key cannot be an object, it must be a string or an integer",i),a[U]=D}for(let f=0;f<E.length;f++)Sr(a[E[f]],u[d.indexOf(E[f])]);i._x_prevKeys=d})}function $s(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,o=e.match(n);if(!o)return;let i={};i.items=o[2].trim();let s=o[1].replace(r,"").trim(),a=s.match(t);return a?(i.item=s.replace(t,"").trim(),i.index=a[1].trim(),a[2]&&(i.collection=a[2].trim())):i.item=s,i}function jr(e,t,r,n){let o={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(i=>i.trim()).forEach((i,s)=>{o[i]=t[s]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(i=>i.trim()).forEach(i=>{o[i]=t[i]}):o[e.item]=t,e.index&&(o[e.index]=r),e.collection&&(o[e.collection]=n),o}function js(e){return!Array.isArray(e)&&!isNaN(e)}function Qn(){}Qn.inline=(e,{expression:t},{cleanup:r})=>{let n=tt(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",Qn);w("if",(e,{expression:t},{effect:r,cleanup:n})=>{let o=C(e,t),i=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Ne(a,{},e),T(()=>{e.after(a),Q(a)}),e._x_currentIfEl=a,e._x_undoIf=()=>{ae(a,l=>{l._x_effects&&l._x_effects.forEach(Dr)}),a.remove(),delete e._x_currentIfEl},a},s=()=>{e._x_undoIf&&(e._x_undoIf(),delete e._x_undoIf)};r(()=>o(a=>{a?i():s()})),n(()=>e._x_undoIf&&e._x_undoIf())});w("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach(n=>xs(e,n))});Qt(rn("@",nn(_e("on:"))));w("on",ot((e,{value:t,modifiers:r,expression:n},{cleanup:o})=>{let i=n?C(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=Yn(e,t,r,a=>{i(()=>{},{scope:{$event:a},params:[a]})});o(()=>s())}));mt("Collapse","collapse","collapse");mt("Intersect","intersect","intersect");mt("Focus","trap","focus");mt("Mask","mask","mask");function mt(e,t,r){w(t,n=>ge(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}Pe.setEvaluator(Gr);Pe.setReactivityEngine({reactive:ur,effect:Ji,release:Zi,raw:_});var Ms=Pe,eo=Ms,Ns=class{constructor(e){Tr(this,"el"),Tr(this,"traversals",{first:"firstElementChild",next:"nextElementSibling",parent:"parentElement"}),this.el=e}nodes(){return this.traversals={first:"firstChild",next:"nextSibling",parent:"parentNode"},this}first(){return this.teleportTo(this.el[this.traversals.first])}next(){return this.teleportTo(this.teleportBack(this.el[this.traversals.next]))}before(e){return this.el[this.traversals.parent].insertBefore(e,this.el),e}replace(e){return this.el[this.traversals.parent].replaceChild(e,this.el),e}append(e){return this.el.appendChild(e),e}teleportTo(e){return e&&(e._x_teleport?e._x_teleport:e)}teleportBack(e){return e&&(e._x_teleportBack?e._x_teleportBack:e)}};function k(e){return new Ns(e)}function Rs(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function Ps(e){return e.nodeType===3||e.nodeType===8}var to=()=>{},ro=()=>{};async function cr(e,t,r){let n,o,i,s,a,l,u,d,p,v,N;function E(c){if(N)return ro((c||"").replace(`
|
6
|
-
`,"\\n"),n,o),new Promise(h=>to=()=>h())}function de(c={}){let h=R=>R.getAttribute("key"),m=()=>{};a=c.updating||m,l=c.updated||m,u=c.removing||m,d=c.removed||m,p=c.adding||m,v=c.added||m,i=c.key||h,s=c.lookahead||!1,N=c.debug||!1}async function f(c,h){if(b(c,h)){let R=x(c,h);return await E("Swap elements"),R}let m=!1;if(!fe(a,c,h,()=>m=!0)){if(window.Alpine&&Ds(c,h,()=>m=!0),Ps(h)){await A(c,h),l(c,h);return}m||await $(c,h),l(c,h),await U(c,h)}}function b(c,h){return c.nodeType!=h.nodeType||c.nodeName!=h.nodeName||D(c)!=D(h)}function x(c,h){if(fe(u,c))return;let m=h.cloneNode(!0);fe(p,m)||(k(c).replace(m),d(c),v(m))}async function A(c,h){let m=h.nodeValue;c.nodeValue!==m&&(c.nodeValue=m,await E("Change text node to: "+m))}async function $(c,h){if(c._x_isShown&&!h._x_isShown||!c._x_isShown&&h._x_isShown)return;let m=Array.from(c.attributes),R=Array.from(h.attributes);for(let V=m.length-1;V>=0;V--){let q=m[V].name;h.hasAttribute(q)||(c.removeAttribute(q),await E("Remove attribute"))}for(let V=R.length-1;V>=0;V--){let q=R[V].name,y=R[V].value;c.getAttribute(q)!==y&&(c.setAttribute(q,y),await E(`Set [${q}] attribute to: "${y}"`))}}async function U(c,h){let m=c.childNodes,R=h.childNodes,V=vr(R),q=vr(m),y=k(h).nodes().first(),g=k(c).nodes().first(),re={};for(;y;){let j=D(y),I=D(g);if(!g)if(j&&re[j]){let M=re[j];k(c).append(M),g=M,await E("Add element (from key)")}else{let M=bo(y,c)||{};await E("Add element: "+(M.outerHTML||M.nodeValue)),y=k(y).nodes().next();continue}if(s){let M=k(y).next(),_r=!1;for(;!_r&&M;)g.isEqualNode(M)&&(_r=!0,g=yt(y,g),I=D(g),await E("Move element (lookahead)")),M=k(M).next()}if(j!==I){if(!j&&I){re[I]=g,g=yt(y,g),re[I].remove(),g=k(g).nodes().next(),y=k(y).nodes().next(),await E('No "to" key');continue}if(j&&!I&&q[j]&&(g=k(g).replace(q[j]),await E('No "from" key')),j&&I){re[I]=g;let M=q[j];if(M)g=k(g).replace(M),await E('Move "from" key');else{re[I]=g,g=yt(y,g),re[I].remove(),g=k(g).next(),y=k(y).next(),await E("Swap elements with keys");continue}}}let vo=g&&k(g).nodes().next();await f(g,y),y=y&&k(y).nodes().next(),g=vo}let Et=[];for(;g;)fe(u,g)||Et.push(g),g=k(g).nodes().next();for(;Et.length;){let j=Et.shift();j.remove(),await E("remove el"),d(j)}}function D(c){return c&&c.nodeType===1&&i(c)}function vr(c){let h={};return c.forEach(m=>{let R=D(m);R&&(h[R]=m)}),h}function bo(c,h){if(!fe(p,c)){let m=c.cloneNode(!0);return k(h).append(m),v(m),m}return null}function yt(c,h){if(!fe(p,c)){let m=c.cloneNode(!0);return k(h).before(m),v(m),m}return h}return de(r),n=e,o=Rs(t),window.Alpine&&window.Alpine.closestDataStack&&!e._x_dataStack&&(o._x_dataStack=window.Alpine.closestDataStack(e),o._x_dataStack&&window.Alpine.clone(e,o)),await E(),await f(e,o),n=void 0,o=void 0,e}cr.step=()=>to();cr.log=e=>{ro=e};function fe(e,...t){let r=!1;return e(...t,()=>r=!0),r}function Ds(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function Bs(e){e.morph=cr}var Hs=Bs;eo.plugin(Hs);var qs=/INPUT/i,Is=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,zs=/TEXTAREA/i;function Fs(e,t,r,n){if(!(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)&&(e.tagName.match(zs)||e.tagName.match(qs)&&e.getAttribute("type").match(Is)))return n()}function Ws(e,t){e.forEach(r=>eo.morph(r,t,{updating:Fs}))}var Vs=Ws;function Us(e,t,r){if(e.match(/^dispatch(Event)?$/))return Po(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Vs(r,t[0]);if(e.endsWith("="))return r.forEach(n=>n[e.slice(0,-1).trim()]=t[0]);r.forEach(n=>n[e].apply(n,t))}function Xs(){let e=JSON.parse(this.templateContent.textContent),{id:t,selector:r,receiver:n,method:o,args:i}=e,s=[self];r&&(s=Array.from(document.querySelectorAll(r))),n&&(s=s.map(a=>{let l=a,u=n.split(".");for(;u.length>0;)l=l[u.shift()];return l})),Us(o,i,s)}var no=Xs;if(!self.Turbo)throw new Error("`Turbo` is not defined! Be sure to import `@turbo-boost/streams` after `@hotwired/turbo` or `@hotwired/turbo-rails`.");if(!Turbo.StreamActions)throw new Error("`Turbo.StreamActions` is not defined! Verify that you are running >= `7.2.0` of `@hotwired/turbo`.");Turbo.StreamActions.invoke=no;self.TurboBoost=self.TurboBoost||{};self.TurboBoost.Streams={invoke:no};console.info("@turbo-boost/streams has initialized and registered new stream actions with Turbo.");var Ks=class{get element(){return document.querySelector('meta[name="turbo-boost"]')}get token(){return this.element.getAttribute("content")}get busy(){return this.element.dataset.busy==="true"}set busy(e){return this.element.dataset.busy=!!e}},L=new Ks,P={start:"turbo-boost:command:start",success:"turbo-boost:command:success",finish:"turbo-boost:command:finish",abort:"turbo-boost:command:abort",clientError:"turbo-boost:command:client-error",serverError:"turbo-boost:command:server-error"},le={stateLoad:"turbo-boost:state:load",stateChange:"turbo-boost:state:change"},J=S(S({},P),le);function F(e,t,r={}){r=r||{},r.detail=r.detail||{},t=t||document;let n=new CustomEvent(e,Y(S({},r),{bubbles:!0}));return t.dispatchEvent(n),n}var St;function Xe(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,o){return delete n[o],F(le.stateChange,L.element,{detail:{state:St}}),!0},set(n,o,i,s){return n[o]=Xe(i,this),F(le.stateChange,L.element,{detail:{state:St}}),!0}});if(Array.isArray(e))e.forEach((n,o)=>e[o]=Xe(n,r));else if(typeof e=="object")for(let[n,o]of Object.entries(e))e[n]=Xe(o,r);return t||(St=r),r}var Js=Xe,dr,he,$e,Mr;function oo(){if(!L.element)return xe();let e=atob(L.element.dataset.state);$e={},he=Js(JSON.parse(e)),dr=S({},he),delete L.element.dataset.clientStateChange,setTimeout(()=>F(le.stateLoad,L.element,{detail:{state:he}}))}function xe(){clearTimeout(Mr),Mr=setTimeout(oo,10)}dr||oo();addEventListener("DOMContentLoaded",xe);addEventListener("load",xe);addEventListener("turbo:load",xe);addEventListener("turbo:frame-load",xe);addEventListener(P.success,xe);addEventListener(le.stateChange,e=>{$e={};for(let[t,r]of Object.entries(he))dr[t]!==r&&($e[t]=r);L.element.dataset.clientStateChange=!0,L.element.dataset.state=btoa(JSON.stringify(he))});var Ye={events:le,get current(){return he},get delta(){return $e},get payloadChunks(){return btoa(JSON.stringify($e)).match(/.{1,2000}/g)}};function Zs(e){let t="<html",r="</html",n=e.indexOf(t),o=e.lastIndexOf(r);if(n>=0&&o>=0){let i=e.slice(e.indexOf(">",n)+1,o);document.documentElement.innerHTML=i}}function Gs(e){document.body.insertAdjacentHTML("beforeend",e)}var je={append:Gs,replaceDocument:Zs},Qe={};function Ys(e){Qe[e.id]=e}function Qs(e){delete Qe[e]}var io={add:Ys,remove:Qs,get commands(){return[...Object.values(Qe)]},get length(){return Object.keys(Qe).length}};function so(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>F(P.finish,e.target,{detail:e.detail}),25)}addEventListener(P.serverError,so);addEventListener(P.success,so);addEventListener(P.finish,e=>io.remove(e.detail.id),!0);var fr={events:P},Vt={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:r}=e.detail;if(L.busy){let n=["text/vnd.turbo-boost.html",r.headers.Accept];n=n.filter(o=>o&&o.trim().length>0).join(", "),r.headers.Accept=n,r.headers["TurboBoost-Token"]=L.token}Ye.payloadChunks.forEach((n,o)=>{r.headers[`TurboBoost-State-${o.toString().padStart(4,"0")}`]=n})});addEventListener("turbo:before-fetch-response",e=>{let t=e.target.closest("turbo-frame"),{fetchResponse:r}=e.detail;if(t&&(Vt[t.id]=t.src),r.header("TurboBoost")){if(r.statusCode<200||r.statusCode>399){let n=`Server returned a ${r.statusCode} status code! TurboBoost Commands require 2XX-3XX status codes.`;F(fr.events.clientError,document,{detail:Y(S({},e.detail),{error:n})},!0)}r.header("TurboBoost")==="Append"&&(e.preventDefault(),r.responseText.then(n=>je.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboBoostSrc=Vt[t.id]||t.src||t.dataset.turboBoostSrc,delete Vt[t.id]});var ea={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",commandAttribute:"data-turbo-command"},W=S({},ea),Z=[],ao;function ta(e,t){let r=Z.find(n=>n.name===e);return r&&Z.splice(Z.indexOf(r),1),Z=[{name:e,selectors:t},...Z],document.addEventListener(e,ao,!0),S({},Z.find(n=>n.name===e))}function ra(e){return Z.find(t=>t.selectors.find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function na(e,t){let r=ra(t);return r&&r.name===e}var ue={register:ta,isRegisteredForElement:na,get events(){return[...Z]},set handler(e){ao=e}};function oa(e){return e.closest(`[${W.commandAttribute}]`)}function ia(e){return e.closest("turbo-frame")}function sa(e,t={}){if(e.tagName.toLowerCase()!=="select")return t.value=e.value||null;if(!e.multiple)return t.value=e.options[e.selectedIndex].value;t.values=Array.from(e.options).reduce((r,n)=>(n.selected&&r.push(n.value),r),[])}function aa(e){let t=Array.from(e.attributes).reduce((r,n)=>{let o=n.value;return r[n.name]=o,r},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,sa(e,t),delete t.class,delete t.action,delete t.href,delete t[W.commandAttribute],delete t[W.frameAttribute],t}var pr={buildAttributePayload:aa,findClosestCommand:oa,findClosestFrame:ia};function la(e,t={}){t.token=L.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_boost_command",r.value=JSON.stringify(t),e.appendChild(r)}var ua={invokeCommand:la};function ca(e,t={}){let r=document.createElement("a");r.href=e;let n=new URL(r);return n.searchParams.set("turbo_boost_command",JSON.stringify(t)),n}var hr={build:ca};function da(e,t){let r=t.src;t=S({},t),delete t.src,e.src=hr.build(r,t)}var Nr={invokeCommand:da};function fa(e,t={}){let r=t.src;t=S({},t),delete t.src,delete t.href,e.setAttribute("href",hr.build(r,t))}var pa={invokeCommand:fa};function ha(e){let t=e.target;F(fr.events.abort,document,{detail:Y(S({},e.detail),{xhr:t})})}function Ut(e){let t=e.target;t.getResponseHeader("TurboBoost")==="Append"?je.append(t.responseText):je.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboBoost Commands require 2XX-3XX status codes.`;F(fr.events.clientError,document,{detail:Y(S({},e.detail),{error:r,xhr:t})},!0)}function ma(e){let t=e.target;if(t.status<200||t.status>399)return Ut(e);let r=t.responseText;t.getResponseHeader("TurboBoost")==="Append"?je.append(t.responseText):je.replaceDocument(t.responseText)}function ga(e){let t=e.src;e=S({},e),delete e.src;try{let r=new XMLHttpRequest;r.open("GET",hr.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-boost.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboBoost-Token",L.token),Ye.payloadChunks.forEach((n,o)=>r.setRequestHeader(`TurboBoost-State-${o.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",ha),r.addEventListener("error",Ut),r.addEventListener("load",ma),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;Ut(r,{detail:{message:n}})}}var ba={invokeCommand:ga};function Ct(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboBoostSrc||location.href}function va(e){let t=pr.findClosestFrame(e),{turboFrame:r,turboMethod:n}=e.dataset;return e.tagName.toLowerCase()==="form"?{name:"form",reason:"Element is a form.",frame:t,src:e.action,invokeCommand:ua.invokeCommand}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeCommand:pa.invokeCommand}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:Ct(e,t),invokeCommand:Nr.invokeCommand}):(!r||r==="_self")&&t?{name:"frame",reason:"element does NOT target a frame or targets _self and is contained by a frame",frame:t,src:Ct(e,t),invokeCommand:Nr.invokeCommand}:{name:"window",reason:"element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)",frame:null,src:Ct(e),invokeCommand:ba.invokeCommand}}var Rr={find:va},Oe="unknown",lo={debug:Object.values(J),info:Object.values(J),warn:[J.abort,J.clientError,J.serverError],error:[J.clientError,J.serverError],unknown:[]};Object.values(J).forEach(e=>{addEventListener(e,t=>{lo[Oe].includes(t.type)&&console[Oe==="debug"?"log":Oe](t.type,{target:t.target,detail:t.detail})})});var _a={get level(){return Oe},set level(e){return Object.keys(lo).includes(e)||(e="unknown"),Oe=e}};function xa(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var ya={v4:xa};function Pr(e,t){return{id:e,name:t.getAttribute(W.commandAttribute),elementId:t.id.length>0?t.id:null,elementAttributes:pr.buildAttributePayload(t),startedAt:new Date().getTime()}}function Ea(e){let t,r={};try{if(t=pr.findClosestCommand(e.target),!t||!ue.isRegisteredForElement(e.type,t))return;let n=`turbo-command-${ya.v4()}`,o=Rr.find(t),i=Y(S({},Pr(n,t)),{driver:o.name,frameId:o.frame?o.frame.id:null,src:o.src}),s=F(P.start,t,{cancelable:!0,detail:i});if(s.defaultPrevented)return F(P.abort,t,{detail:{message:`An event handler for '${P.start}' prevented default behavior and blocked command invocation!`,source:s}});switch(o=Rr.find(t),i=Y(S({},Pr(n,t)),{driver:o.name,frameId:o.frame?o.frame.id:null,src:o.src}),io.add(i),["frame","window"].includes(o.name)&&e.preventDefault(),L.busy=!0,setTimeout(()=>L.busy=!1,10),o.name){case"method":return o.invokeCommand(t,i);case"form":return o.invokeCommand(t,i);case"frame":return o.invokeCommand(o.frame,i);case"window":return o.invokeCommand(i)}}catch(n){F(P.clientError,t,{detail:Y(S({},r),{error:n})})}}ue.handler=Ea;ue.register("click",[`[${W.commandAttribute}]`]);ue.register("submit",[`form[${W.commandAttribute}]`]);ue.register("change",[`input[${W.commandAttribute}]`,`select[${W.commandAttribute}]`,`textarea[${W.commandAttribute}]`]);self.TurboBoost=self.TurboBoost||{};self.TurboBoost=Y(S({},self.TurboBoost),{stateEvents:le,get state(){return Ye.current},get stateDelta(){return Ye.delta}});self.TurboBoost.Commands={logger:_a,schema:W,events:P,registerEventDelegate:ue.register,get eventDelegates(){return ue.events}};var Ka=self.TurboBoost.Commands;var ce=class extends HTMLElement{constructor(){super(),this.devtool="unknown",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML="<slot></slot>"}connectedCallback(){this.ensureId()}ensureId(){this.id.trim().length||(this.id=`${this.tagName}-${this.uuidv4()}`.toLowerCase())}uuidv4(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}get viewStack(){let t=this.getAttribute("view-stack");return t?JSON.parse(t):[]}get partial(){return this.viewStack[0]}};function wa(e){["bold","bullet","code","heading1","href","italic","number","quote","strike"].forEach(r=>e.deactivateAttribute(r))}function ka(e){if(e.value.length===0)return;let t=e.editor,r=[];for(;r[0]!==t.getSelectedRange()[0]&&r[1]!==t.getSelectedRange()[1];)r=t.getSelectedRange(),t.moveCursorInDirection("forward");t.insertString(" "),t.moveCursorInDirection("forward"),t.setSelectedRange([r[1],t.getSelectedRange()[1]]),wa(t),t.setSelectedRange([t.getSelectedRange()[1],t.getSelectedRange()[1]])}function Ta(e){return e.closest("turbo-boost-toggle-target")&&e.tagName.match(/^input|textarea|trix-editor$/i)}function Aa(e){let t=e.closest("trix-editor");try{t?ka(t):e.selectionStart=e.selectionEnd=e.value.length}catch(r){}finally{setTimeout(()=>e.scrollIntoView({block:"center",behavior:"smooth"}),100)}}addEventListener("focus",e=>{Ta(document.activeElement)&&Aa(document.activeElement)},!0);var De=class extends ce{connectedCallback(){super.connectedCallback(),this.addEventListener("mouseenter",()=>clearTimeout(this.collapseTimeout)),this.collapseOn.forEach(t=>this.addEventListener(t,()=>this.collapse()))}cacheHTML(){}renderCachedHTML(){}collapse(){clearTimeout(this.collapseTimeout),this.collapseTimeout=setTimeout(()=>{this.innerHTML="";try{this.currentTriggerElement.expanded=!1,this.currentTriggerElement.hideDevtool()}catch(t){}},250)}collapseMatches(){document.querySelectorAll(this.collapseSelector).forEach(t=>{t!==this&&t.collapse&&t.collapse()})}get collapseSelector(){return this.currentTriggerElement&&this.currentTriggerElement.collapseSelector?this.currentTriggerElement.collapseSelector:this.getAttribute("collapse-selector")}focus(){clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(()=>{this.focusElement&&this.focusElement.focus()},50)}get focusSelector(){return this.currentTriggerElement&&this.currentTriggerElement.focusSelector?this.currentTriggerElement.focusSelector:this.getAttribute("focus-selector")}get focusElement(){return this.querySelector(this.focusSelector)}get labeledBy(){return this.getAttribute("aria-labeledby")}get collapseOn(){let t=this.getAttribute("collapse-on");return t?JSON.parse(t):[]}};function Sa(e){let t=document.createElement("template");return t.innerHTML=e,t}function Be(e,t){t=t||document.body;let n=Sa(e).content.cloneNode(!0).querySelector("*");return t.appendChild(n)}function gt(e,t={}){if(!e)return;bt(e);let{outline:r,outlineOffset:n}=t;r=r||"dashed 3px red",n=n||"0px",e.originalStyles=e.originalStyles||{display:e.style.display,minHeight:e.style.minHeight,minWidth:e.style.minWidth,outline:e.style.outline,outlineOffset:e.style.outlineOffset},getComputedStyle(e).display.match(/^inline$/i)&&e.offsetWidth===0&&e.offsetHeight===0&&(e.style.display="inline-block",e.style.minHeight="2px",e.style.minWidth="2px"),e.style.outline=r,e.style.outlineOffset=n,e.dataset.turboBoostHighlight=!0}function bt(e){if(e){if(e.originalStyles){for(let[t,r]of Object.entries(e.originalStyles))r?e.style[t]=r:e.style[t]="";delete e.originalStyles}delete e.dataset.turboBoostHighlight}}function vt(e){if(!e)return{};let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:e.offsetWidth,height:e.offsetHeight}}var He=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.labelElement.addEventListener("click",t=>{t.preventDefault(),this.toggle()}),this.checkboxElement.addEventListener("change",t=>this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}toggle(){this.checked?this.uncheck():this.check()}check(){this.checkboxElement.checked=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}uncheck(){this.checkboxElement.checked=!1,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}get name(){return this.getAttribute("name")}get checked(){return this.checkboxElement.checked}get checkboxElement(){return this.shadowRoot.querySelector("input")}get labelElement(){return this.shadowRoot.querySelector("label")}get html(){return`
|
6
|
+
`,"\\n"),n,o),new Promise(h=>to=()=>h())}function de(c={}){let h=R=>R.getAttribute("key"),m=()=>{};a=c.updating||m,l=c.updated||m,u=c.removing||m,d=c.removed||m,p=c.adding||m,v=c.added||m,i=c.key||h,s=c.lookahead||!1,N=c.debug||!1}async function f(c,h){if(b(c,h)){let R=x(c,h);return await E("Swap elements"),R}let m=!1;if(!fe(a,c,h,()=>m=!0)){if(window.Alpine&&Ds(c,h,()=>m=!0),Ps(h)){await A(c,h),l(c,h);return}m||await $(c,h),l(c,h),await U(c,h)}}function b(c,h){return c.nodeType!=h.nodeType||c.nodeName!=h.nodeName||D(c)!=D(h)}function x(c,h){if(fe(u,c))return;let m=h.cloneNode(!0);fe(p,m)||(k(c).replace(m),d(c),v(m))}async function A(c,h){let m=h.nodeValue;c.nodeValue!==m&&(c.nodeValue=m,await E("Change text node to: "+m))}async function $(c,h){if(c._x_isShown&&!h._x_isShown||!c._x_isShown&&h._x_isShown)return;let m=Array.from(c.attributes),R=Array.from(h.attributes);for(let V=m.length-1;V>=0;V--){let q=m[V].name;h.hasAttribute(q)||(c.removeAttribute(q),await E("Remove attribute"))}for(let V=R.length-1;V>=0;V--){let q=R[V].name,y=R[V].value;c.getAttribute(q)!==y&&(c.setAttribute(q,y),await E(`Set [${q}] attribute to: "${y}"`))}}async function U(c,h){let m=c.childNodes,R=h.childNodes,V=vr(R),q=vr(m),y=k(h).nodes().first(),g=k(c).nodes().first(),re={};for(;y;){let j=D(y),I=D(g);if(!g)if(j&&re[j]){let M=re[j];k(c).append(M),g=M,await E("Add element (from key)")}else{let M=bo(y,c)||{};await E("Add element: "+(M.outerHTML||M.nodeValue)),y=k(y).nodes().next();continue}if(s){let M=k(y).next(),_r=!1;for(;!_r&&M;)g.isEqualNode(M)&&(_r=!0,g=yt(y,g),I=D(g),await E("Move element (lookahead)")),M=k(M).next()}if(j!==I){if(!j&&I){re[I]=g,g=yt(y,g),re[I].remove(),g=k(g).nodes().next(),y=k(y).nodes().next(),await E('No "to" key');continue}if(j&&!I&&q[j]&&(g=k(g).replace(q[j]),await E('No "from" key')),j&&I){re[I]=g;let M=q[j];if(M)g=k(g).replace(M),await E('Move "from" key');else{re[I]=g,g=yt(y,g),re[I].remove(),g=k(g).next(),y=k(y).next(),await E("Swap elements with keys");continue}}}let vo=g&&k(g).nodes().next();await f(g,y),y=y&&k(y).nodes().next(),g=vo}let Et=[];for(;g;)fe(u,g)||Et.push(g),g=k(g).nodes().next();for(;Et.length;){let j=Et.shift();j.remove(),await E("remove el"),d(j)}}function D(c){return c&&c.nodeType===1&&i(c)}function vr(c){let h={};return c.forEach(m=>{let R=D(m);R&&(h[R]=m)}),h}function bo(c,h){if(!fe(p,c)){let m=c.cloneNode(!0);return k(h).append(m),v(m),m}return null}function yt(c,h){if(!fe(p,c)){let m=c.cloneNode(!0);return k(h).before(m),v(m),m}return h}return de(r),n=e,o=Rs(t),window.Alpine&&window.Alpine.closestDataStack&&!e._x_dataStack&&(o._x_dataStack=window.Alpine.closestDataStack(e),o._x_dataStack&&window.Alpine.clone(e,o)),await E(),await f(e,o),n=void 0,o=void 0,e}cr.step=()=>to();cr.log=e=>{ro=e};function fe(e,...t){let r=!1;return e(...t,()=>r=!0),r}function Ds(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function Bs(e){e.morph=cr}var Hs=Bs;eo.plugin(Hs);var qs=/INPUT/i,Is=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,zs=/TEXTAREA/i;function Fs(e,t,r,n){if(!(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)&&(e.tagName.match(zs)||e.tagName.match(qs)&&e.getAttribute("type").match(Is)))return n()}function Ws(e,t){e.forEach(r=>eo.morph(r,t,{updating:Fs}))}var Vs=Ws;function Us(e,t,r){if(e.match(/^dispatch(Event)?$/))return Po(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Vs(r,t[0]);if(e.endsWith("="))return r.forEach(n=>n[e.slice(0,-1).trim()]=t[0]);r.forEach(n=>n[e].apply(n,t))}function Xs(){let e=JSON.parse(this.templateContent.textContent),{id:t,selector:r,receiver:n,method:o,args:i}=e,s=[self];r&&(s=Array.from(document.querySelectorAll(r))),n&&(s=s.map(a=>{let l=a,u=n.split(".");for(;u.length>0;)l=l[u.shift()];return l})),Us(o,i,s)}var no=Xs;if(!self.Turbo)throw new Error("`Turbo` is not defined! Be sure to import `@turbo-boost/streams` after `@hotwired/turbo` or `@hotwired/turbo-rails`.");if(!Turbo.StreamActions)throw new Error("`Turbo.StreamActions` is not defined! Verify that you are running >= `7.2.0` of `@hotwired/turbo`.");Turbo.StreamActions.invoke=no;self.TurboBoost=self.TurboBoost||{};self.TurboBoost.Streams={invoke:no};console.info("@turbo-boost/streams has initialized and registered new stream actions with Turbo.");var Ks=class{get element(){return document.querySelector('meta[name="turbo-boost"]')}get token(){return this.element.getAttribute("content")}get busy(){return this.element.dataset.busy==="true"}set busy(e){return this.element.dataset.busy=!!e}},L=new Ks,P={start:"turbo-boost:command:start",success:"turbo-boost:command:success",finish:"turbo-boost:command:finish",abort:"turbo-boost:command:abort",clientError:"turbo-boost:command:client-error",serverError:"turbo-boost:command:server-error"},le={stateLoad:"turbo-boost:state:load",stateChange:"turbo-boost:state:change"},J=S(S({},P),le);function F(e,t,r={}){r=r||{},r.detail=r.detail||{},t=t||document;let n=new CustomEvent(e,Y(S({},r),{bubbles:!0}));return t.dispatchEvent(n),n}var St;function Xe(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,o){return delete n[o],F(le.stateChange,L.element,{detail:{state:St}}),!0},set(n,o,i,s){return n[o]=Xe(i,this),F(le.stateChange,L.element,{detail:{state:St}}),!0}});if(Array.isArray(e))e.forEach((n,o)=>e[o]=Xe(n,r));else if(typeof e=="object")for(let[n,o]of Object.entries(e))e[n]=Xe(o,r);return t||(St=r),r}var Js=Xe,dr,he,$e,Mr;function oo(){if(!L.element)return xe();let e=atob(L.element.dataset.state);$e={},he=Js(JSON.parse(e)),dr=S({},he),delete L.element.dataset.clientStateChange,setTimeout(()=>F(le.stateLoad,L.element,{detail:{state:he}}))}function xe(){clearTimeout(Mr),Mr=setTimeout(oo,10)}dr||oo();addEventListener("DOMContentLoaded",xe);addEventListener("load",xe);addEventListener("turbo:load",xe);addEventListener("turbo:frame-load",xe);addEventListener(P.success,xe);addEventListener(le.stateChange,e=>{$e={};for(let[t,r]of Object.entries(he))dr[t]!==r&&($e[t]=r);L.element.dataset.clientStateChange=!0,L.element.dataset.state=btoa(JSON.stringify(he))});var Ye={events:le,get current(){return he},get delta(){return $e},get payloadChunks(){return btoa(JSON.stringify($e)).match(/.{1,2000}/g)}};function Zs(e){let t="<html",r="</html",n=e.indexOf(t),o=e.lastIndexOf(r);if(n>=0&&o>=0){let i=e.slice(e.indexOf(">",n)+1,o);document.documentElement.innerHTML=i}}function Gs(e){document.body.insertAdjacentHTML("beforeend",e)}var je={append:Gs,replaceDocument:Zs},Qe={};function Ys(e){Qe[e.id]=e}function Qs(e){delete Qe[e]}var io={add:Ys,remove:Qs,get commands(){return[...Object.values(Qe)]},get length(){return Object.keys(Qe).length}};function so(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>F(P.finish,e.target,{detail:e.detail}),25)}addEventListener(P.serverError,so);addEventListener(P.success,so);addEventListener(P.finish,e=>io.remove(e.detail.id),!0);var fr={events:P},Vt={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:r}=e.detail;if(L.busy){let n=["text/vnd.turbo-boost.html",r.headers.Accept];n=n.filter(o=>o&&o.trim().length>0).join(", "),r.headers.Accept=n,r.headers["TurboBoost-Token"]=L.token}Ye.payloadChunks.forEach((n,o)=>{r.headers[`TurboBoost-State-${o.toString().padStart(4,"0")}`]=n})});addEventListener("turbo:before-fetch-response",e=>{let t=e.target.closest("turbo-frame"),{fetchResponse:r}=e.detail;if(t&&(Vt[t.id]=t.src),r.header("TurboBoost")){if(r.statusCode<200||r.statusCode>399){let n=`Server returned a ${r.statusCode} status code! TurboBoost Commands require 2XX-3XX status codes.`;F(fr.events.clientError,document,{detail:Y(S({},e.detail),{error:n})},!0)}r.header("TurboBoost")==="Append"&&(e.preventDefault(),r.responseText.then(n=>je.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboBoostSrc=Vt[t.id]||t.src||t.dataset.turboBoostSrc,delete Vt[t.id]});var ea={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",commandAttribute:"data-turbo-command"},W=S({},ea),Z=[],ao;function ta(e,t){let r=Z.find(n=>n.name===e);return r&&Z.splice(Z.indexOf(r),1),Z=[{name:e,selectors:t},...Z],document.addEventListener(e,ao,!0),S({},Z.find(n=>n.name===e))}function ra(e){return Z.find(t=>t.selectors.find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function na(e,t){let r=ra(t);return r&&r.name===e}var ue={register:ta,isRegisteredForElement:na,get events(){return[...Z]},set handler(e){ao=e}};function oa(e){return e.closest(`[${W.commandAttribute}]`)}function ia(e){return e.closest("turbo-frame")}function sa(e,t={}){if(e.tagName.toLowerCase()!=="select")return t.value=e.value||null;if(!e.multiple)return t.value=e.options[e.selectedIndex].value;t.values=Array.from(e.options).reduce((r,n)=>(n.selected&&r.push(n.value),r),[])}function aa(e){let t=Array.from(e.attributes).reduce((r,n)=>{let o=n.value;return r[n.name]=o,r},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,sa(e,t),delete t.class,delete t.action,delete t.href,delete t[W.commandAttribute],delete t[W.frameAttribute],t}var pr={buildAttributePayload:aa,findClosestCommand:oa,findClosestFrame:ia};function la(e,t={}){t.token=L.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_boost_command",r.value=JSON.stringify(t),e.appendChild(r)}var ua={invokeCommand:la};function ca(e,t={}){let r=document.createElement("a");r.href=e;let n=new URL(r);return n.searchParams.set("turbo_boost_command",JSON.stringify(t)),n}var hr={build:ca};function da(e,t){let r=t.src;t=S({},t),delete t.src,e.src=hr.build(r,t)}var Nr={invokeCommand:da};function fa(e,t={}){let r=t.src;t=S({},t),delete t.src,delete t.href,e.setAttribute("href",hr.build(r,t))}var pa={invokeCommand:fa};function ha(e){let t=e.target;F(fr.events.abort,document,{detail:Y(S({},e.detail),{xhr:t})})}function Ut(e){let t=e.target;t.getResponseHeader("TurboBoost")==="Append"?je.append(t.responseText):je.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboBoost Commands require 2XX-3XX status codes.`;F(fr.events.clientError,document,{detail:Y(S({},e.detail),{error:r,xhr:t})},!0)}function ma(e){let t=e.target;if(t.status<200||t.status>399)return Ut(e);let r=t.responseText;t.getResponseHeader("TurboBoost")==="Append"?je.append(t.responseText):je.replaceDocument(t.responseText)}function ga(e){let t=e.src;e=S({},e),delete e.src;try{let r=new XMLHttpRequest;r.open("GET",hr.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-boost.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboBoost-Token",L.token),Ye.payloadChunks.forEach((n,o)=>r.setRequestHeader(`TurboBoost-State-${o.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",ha),r.addEventListener("error",Ut),r.addEventListener("load",ma),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;Ut(r,{detail:{message:n}})}}var ba={invokeCommand:ga};function Ct(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboBoostSrc||location.href}function va(e){let t=pr.findClosestFrame(e),{turboFrame:r,turboMethod:n}=e.dataset;return e.tagName.toLowerCase()==="form"?{name:"form",reason:"Element is a form.",frame:t,src:e.action,invokeCommand:ua.invokeCommand}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeCommand:pa.invokeCommand}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:Ct(e,t),invokeCommand:Nr.invokeCommand}):(!r||r==="_self")&&t?{name:"frame",reason:"element does NOT target a frame or targets _self and is contained by a frame",frame:t,src:Ct(e,t),invokeCommand:Nr.invokeCommand}:{name:"window",reason:"element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)",frame:null,src:Ct(e),invokeCommand:ba.invokeCommand}}var Rr={find:va},Oe="unknown",lo={debug:Object.values(J),info:Object.values(J),warn:[J.abort,J.clientError,J.serverError],error:[J.clientError,J.serverError],unknown:[]};Object.values(J).forEach(e=>{addEventListener(e,t=>{lo[Oe].includes(t.type)&&console[Oe==="debug"?"log":Oe](t.type,{target:t.target,detail:t.detail})})});var _a={get level(){return Oe},set level(e){return Object.keys(lo).includes(e)||(e="unknown"),Oe=e}};function xa(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var ya={v4:xa};function Pr(e,t){return{id:e,name:t.getAttribute(W.commandAttribute),elementId:t.id.length>0?t.id:null,elementAttributes:pr.buildAttributePayload(t),startedAt:new Date().getTime()}}function Ea(e){let t,r={};try{if(t=pr.findClosestCommand(e.target),!t||!ue.isRegisteredForElement(e.type,t))return;let n=`turbo-command-${ya.v4()}`,o=Rr.find(t),i=Y(S({},Pr(n,t)),{driver:o.name,frameId:o.frame?o.frame.id:null,src:o.src}),s=F(P.start,t,{cancelable:!0,detail:i});if(s.defaultPrevented)return F(P.abort,t,{detail:{message:`An event handler for '${P.start}' prevented default behavior and blocked command invocation!`,source:s}});switch(o=Rr.find(t),i=Y(S({},Pr(n,t)),{driver:o.name,frameId:o.frame?o.frame.id:null,src:o.src}),io.add(i),["frame","window"].includes(o.name)&&e.preventDefault(),L.busy=!0,setTimeout(()=>L.busy=!1,10),o.name){case"method":return o.invokeCommand(t,i);case"form":return o.invokeCommand(t,i);case"frame":return o.invokeCommand(o.frame,i);case"window":return o.invokeCommand(i)}}catch(n){F(P.clientError,t,{detail:Y(S({},r),{error:n})})}}ue.handler=Ea;ue.register("click",[`[${W.commandAttribute}]`]);ue.register("submit",[`form[${W.commandAttribute}]`]);ue.register("change",[`input[${W.commandAttribute}]`,`select[${W.commandAttribute}]`,`textarea[${W.commandAttribute}]`]);self.TurboBoost=self.TurboBoost||{};self.TurboBoost=Y(S({},self.TurboBoost),{stateEvents:le,get state(){return Ye.current},get stateDelta(){return Ye.delta}});self.TurboBoost.Commands={logger:_a,schema:W,events:P,registerEventDelegate:ue.register,get eventDelegates(){return ue.events}};var Ka=self.TurboBoost.Commands;var ce=class extends HTMLElement{constructor(){super(),this.devtool="unknown",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML="<slot></slot>"}connectedCallback(){this.ensureId()}ensureId(){this.id.trim().length||(this.id=`${this.tagName}-${this.uuidv4()}`.toLowerCase())}uuidv4(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}get viewStack(){let t=this.getAttribute("view-stack");return t?JSON.parse(t):[]}get partial(){return this.viewStack[0]}};function wa(e){["bold","bullet","code","heading1","href","italic","number","quote","strike"].forEach(r=>e.deactivateAttribute(r))}function ka(e){if(e.value.length===0)return;let t=e.editor,r=[];for(;r[0]!==t.getSelectedRange()[0]&&r[1]!==t.getSelectedRange()[1];)r=t.getSelectedRange(),t.moveCursorInDirection("forward");t.insertString(" "),t.moveCursorInDirection("forward"),t.setSelectedRange([r[1],t.getSelectedRange()[1]]),wa(t),t.setSelectedRange([t.getSelectedRange()[1],t.getSelectedRange()[1]])}function Ta(e){return e.closest("turbo-boost-toggle-target")&&e.tagName.match(/^input|textarea|trix-editor$/i)}function Aa(e){let t=e.closest("trix-editor");try{t?ka(t):e.selectionStart=e.selectionEnd=e.value.length}catch(r){}finally{setTimeout(()=>e.scrollIntoView({block:"center",behavior:"smooth"}),100)}}addEventListener("focus",e=>{Ta(document.activeElement)&&Aa(document.activeElement)},!0);var De=class extends ce{connectedCallback(){super.connectedCallback(),this.addEventListener("mouseenter",()=>clearTimeout(this.collapseTimeout)),this.collapseOn.forEach(t=>this.addEventListener(t,()=>this.collapse()))}cacheHTML(){}renderCachedHTML(){}collapse(t=250){if(t>0)return clearTimeout(this.collapseTimeout),this.collapseTimeout=setTimeout(()=>this.collapse(0),t);this.innerHTML="";try{this.currentTriggerElement.expanded=!1,this.currentTriggerElement.hideDevtool()}catch(r){}}collapseMatches(){document.querySelectorAll(this.collapseSelector).forEach(t=>{t!==this&&t.collapse&&t.collapse(0)})}get collapseSelector(){return this.currentTriggerElement&&this.currentTriggerElement.collapseSelector?this.currentTriggerElement.collapseSelector:this.getAttribute("collapse-selector")}focus(){clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(()=>{this.focusElement&&this.focusElement.focus()},50)}get focusSelector(){return this.currentTriggerElement&&this.currentTriggerElement.focusSelector?this.currentTriggerElement.focusSelector:this.getAttribute("focus-selector")}get focusElement(){return this.querySelector(this.focusSelector)}get labeledBy(){return this.getAttribute("aria-labeledby")}get collapseOn(){let t=this.getAttribute("collapse-on");return t?JSON.parse(t):[]}};function Sa(e){let t=document.createElement("template");return t.innerHTML=e,t}function Be(e,t){t=t||document.body;let n=Sa(e).content.cloneNode(!0).querySelector("*");return t.appendChild(n)}function gt(e,t={}){if(!e)return;bt(e);let{outline:r,outlineOffset:n}=t;r=r||"dashed 3px red",n=n||"0px",e.originalStyles=e.originalStyles||{display:e.style.display,minHeight:e.style.minHeight,minWidth:e.style.minWidth,outline:e.style.outline,outlineOffset:e.style.outlineOffset},getComputedStyle(e).display.match(/^inline$/i)&&e.offsetWidth===0&&e.offsetHeight===0&&(e.style.display="inline-block",e.style.minHeight="2px",e.style.minWidth="2px"),e.style.outline=r,e.style.outlineOffset=n,e.dataset.turboBoostHighlight=!0}function bt(e){if(e){if(e.originalStyles){for(let[t,r]of Object.entries(e.originalStyles))r?e.style[t]=r:e.style[t]="";delete e.originalStyles}delete e.dataset.turboBoostHighlight}}function vt(e){if(!e)return{};let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:e.offsetWidth,height:e.offsetHeight}}var He=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.labelElement.addEventListener("click",t=>{t.preventDefault(),this.toggle()}),this.checkboxElement.addEventListener("change",t=>this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}toggle(){this.checked?this.uncheck():this.check()}check(){this.checkboxElement.checked=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}uncheck(){this.checkboxElement.checked=!1,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}get name(){return this.getAttribute("name")}get checked(){return this.checkboxElement.checked}get checkboxElement(){return this.shadowRoot.querySelector("input")}get labelElement(){return this.shadowRoot.querySelector("label")}get html(){return`
|
7
7
|
<style>${this.stylesheet}</style>
|
8
8
|
<div>
|
9
9
|
<input name="checkbox" type="checkbox">
|