reflex_behaviors 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -7
- data/README.md +1 -1
- data/app/assets/builds/reflex_behaviors.js +164 -10
- data/app/assets/builds/reflex_behaviors.js.map +4 -4
- data/app/javascript/devtools/dom.js +36 -0
- data/app/javascript/devtools/elements/devtool_element.js +76 -0
- data/app/javascript/devtools/elements/supervisor_element.js +129 -0
- data/app/javascript/devtools/elements/tooltip_element.js +103 -0
- data/app/javascript/devtools/index.js +3 -115
- data/app/javascript/devtools/supervisor.js +103 -0
- data/app/javascript/devtools/toggle.js +178 -0
- data/app/javascript/elements/reflex_element.js +12 -0
- data/app/javascript/elements/toggle_trigger_element.js +38 -42
- data/app/javascript/index.js +1 -5
- data/app/reflexes/reflex_behaviors/application_reflex.rb +6 -3
- data/lib/reflex_behaviors/engine.rb +0 -1
- data/lib/reflex_behaviors/tag_builders/toggle_tags_builder.rb +19 -19
- data/lib/reflex_behaviors/version.rb +1 -1
- data/package.json +1 -1
- data/tags +1069 -853
- data/yarn.lock +141 -141
- metadata +8 -7
- data/app/assets/config/reflex_behaviors_manifest.js +0 -1
- data/app/assets/stylesheets/devtools.css +0 -51
- data/app/assets/stylesheets/reflex_behaviors.css +0 -4
- data/app/assets/stylesheets/toggle.css +0 -56
- data/app/assets/stylesheets/tooltip.css +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1623697af38dcfa5bb3309b0b4cd4afabdc816be6ea2a94cd00e7e43fd01a69
|
4
|
+
data.tar.gz: bd0bfb4888f34fbe1a3c0d90fb3ac8ab4068e164da22ed8c73321826090c0b7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 826b2406ce2b573fd4d0e54c54305c74b7d05ed3ff19efb0c721aecc51cd7b29e397dc30ad5d40c5ef61b115db30c0c11d5f2e5fd65fd8acdf1448abbac20e4d
|
7
|
+
data.tar.gz: aaa8ff57defb624cb6cfa44ae065594a6e26847550e787b33f4c6962e7f27bf4fa5675b1aa47140596aa751f5c992583880f3352847d86f9d253fb794eb6c17b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
reflex_behaviors (0.0.
|
4
|
+
reflex_behaviors (0.0.5)
|
5
5
|
rails (>= 6.1)
|
6
6
|
turbo-rails (>= 1.1)
|
7
7
|
turbo_ready (>= 0.1.2)
|
@@ -87,13 +87,17 @@ GEM
|
|
87
87
|
activesupport (>= 5.0)
|
88
88
|
i18n (1.12.0)
|
89
89
|
concurrent-ruby (~> 1.0)
|
90
|
-
json (2.6.
|
90
|
+
json (2.6.3)
|
91
|
+
language_server-protocol (3.17.0.2)
|
91
92
|
loofah (2.19.0)
|
92
93
|
crass (~> 1.0.2)
|
93
94
|
nokogiri (>= 1.5.9)
|
94
95
|
magic_frozen_string_literal (1.2.0)
|
95
|
-
mail (2.
|
96
|
+
mail (2.8.0)
|
96
97
|
mini_mime (>= 0.1.1)
|
98
|
+
net-imap
|
99
|
+
net-pop
|
100
|
+
net-smtp
|
97
101
|
marcel (1.0.2)
|
98
102
|
method_source (1.0.0)
|
99
103
|
mini_mime (1.1.2)
|
@@ -107,7 +111,7 @@ GEM
|
|
107
111
|
net-protocol
|
108
112
|
net-pop (0.1.2)
|
109
113
|
net-protocol
|
110
|
-
net-protocol (0.
|
114
|
+
net-protocol (0.2.0)
|
111
115
|
timeout
|
112
116
|
net-smtp (0.3.3)
|
113
117
|
net-protocol
|
@@ -123,7 +127,7 @@ GEM
|
|
123
127
|
pry-byebug (3.10.1)
|
124
128
|
byebug (~> 11.0)
|
125
129
|
pry (>= 0.13, < 0.15)
|
126
|
-
racc (1.6.
|
130
|
+
racc (1.6.1)
|
127
131
|
rack (2.2.4)
|
128
132
|
rack-test (2.0.2)
|
129
133
|
rack (>= 1.3)
|
@@ -173,13 +177,14 @@ GEM
|
|
173
177
|
rubocop (>= 1.7.0, < 2.0)
|
174
178
|
rubocop-ast (>= 0.4.0)
|
175
179
|
ruby-progressbar (1.11.0)
|
176
|
-
standard (1.
|
180
|
+
standard (1.19.1)
|
181
|
+
language_server-protocol (~> 3.17.0.2)
|
177
182
|
rubocop (= 1.39.0)
|
178
183
|
rubocop-performance (= 1.15.1)
|
179
184
|
standardrb (1.0.1)
|
180
185
|
standard
|
181
186
|
thor (1.2.1)
|
182
|
-
timeout (0.3.
|
187
|
+
timeout (0.3.1)
|
183
188
|
turbo-rails (1.3.2)
|
184
189
|
actionpack (>= 6.0.0)
|
185
190
|
activejob (>= 6.0.0)
|
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-838-47d299.svg" />
|
8
8
|
</a>
|
9
9
|
<a href="https://codeclimate.com/github/hopsoft/reflex_behaviors/maintainability">
|
10
10
|
<img src="https://api.codeclimate.com/v1/badges/7aac6daed3e4032e292e/maintainability" />
|
@@ -1,14 +1,168 @@
|
|
1
|
-
function
|
1
|
+
function ci(e,t,r={}){let n=new CustomEvent(t,r);e.forEach(i=>i.dispatchEvent(n))}var pr=ci;var wt=!1,St=!1,re=[];function fi(e){di(e)}function di(e){re.includes(e)||re.push(e),pi()}function yr(e){let t=re.indexOf(e);t!==-1&&re.splice(t,1)}function pi(){!St&&!wt&&(wt=!0,queueMicrotask(hi))}function hi(){wt=!1,St=!0;for(let e=0;e<re.length;e++)re[e]();re.length=0,St=!1}var ge,Ce,Ue,Er,At=!0;function gi(e){At=!1,e(),At=!0}function mi(e){ge=e.reactive,Ue=e.release,Ce=t=>e.effect(t,{scheduler:r=>{At?fi(r):r()}}),Er=e.raw}function hr(e){Ce=e}function vi(e){let t=()=>{};return[n=>{let i=Ce(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),Ue(i))},i},()=>{t()}]}var wr=[],Sr=[],Ar=[];function xi(e){Ar.push(e)}function Tr(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Sr.push(t))}function _i(e){wr.push(e)}function bi(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function Cr(e,t){!e._x_attributeCleanups||Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{(t===void 0||t.includes(r))&&(n.forEach(i=>i()),delete e._x_attributeCleanups[r])})}var jt=new MutationObserver(Bt),Ft=!1;function kr(){jt.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Ft=!0}function yi(){Ei(),jt.disconnect(),Ft=!1}var we=[],_t=!1;function Ei(){we=we.concat(jt.takeRecords()),we.length&&!_t&&(_t=!0,queueMicrotask(()=>{wi(),_t=!1}))}function wi(){Bt(we),we.length=0}function A(e){if(!Ft)return e();yi();let t=e();return kr(),t}var Kt=!1,ze=[];function Si(){Kt=!0}function Ai(){Kt=!1,Bt(ze),ze=[]}function Bt(e){if(Kt){ze=ze.concat(e);return}let t=[],r=[],n=new Map,i=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&(e[o].type==="childList"&&(e[o].addedNodes.forEach(s=>s.nodeType===1&&t.push(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&r.push(s))),e[o].type==="attributes")){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,u=()=>{n.has(s)||n.set(s,[]),n.get(s).push({name:a,value:s.getAttribute(a)})},f=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&l===null?u():s.hasAttribute(a)?(f(),u()):f()}i.forEach((o,s)=>{Cr(s,o)}),n.forEach((o,s)=>{wr.forEach(a=>a(s,o))});for(let o of r)if(!t.includes(o)&&(Sr.forEach(s=>s(o)),o._x_cleanups))for(;o._x_cleanups.length;)o._x_cleanups.pop()();t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)r.includes(o)||!o.isConnected||(delete o._x_ignoreSelf,delete o._x_ignore,Ar.forEach(s=>s(o)),o._x_ignore=!0,o._x_ignoreSelf=!0);t.forEach(o=>{delete o._x_ignoreSelf,delete o._x_ignore}),t=null,r=null,n=null,i=null}function Or(e){return Oe(de(e))}function ke(e,t,r){return e._x_dataStack=[t,...de(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function gr(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function de(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?de(e.host):e.parentNode?de(e.parentNode):[]}function Oe(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(r=>Object.keys(r)))),has:(r,n)=>e.some(i=>i.hasOwnProperty(n)),get:(r,n)=>(e.find(i=>{if(i.hasOwnProperty(n)){let o=Object.getOwnPropertyDescriptor(i,n);if(o.get&&o.get._x_alreadyBound||o.set&&o.set._x_alreadyBound)return!0;if((o.get||o.set)&&o.enumerable){let s=o.get,a=o.set,l=o;s=s&&s.bind(t),a=a&&a.bind(t),s&&(s._x_alreadyBound=!0),a&&(a._x_alreadyBound=!0),Object.defineProperty(i,n,{...l,get:s,set:a})}return!0}return!1})||{})[n],set:(r,n,i)=>{let o=e.find(s=>s.hasOwnProperty(n));return o?o[n]=i:e[e.length-1][n]=i,!0}});return t}function Rr(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([o,{value:s,enumerable:a}])=>{if(a===!1||s===void 0)return;let l=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?n[o]=s.initialize(e,l,o):t(s)&&s!==n&&!(s instanceof Element)&&r(s,l)})};return r(e)}function Mr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>Ti(n,i),s=>Tt(n,i,s),i,o)}};return t(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a)=>{let l=n.initialize(o,s,a);return r.initialValue=l,i(o,s,a)}}else r.initialValue=n;return r}}function Ti(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function Tt(e,t,r){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=r;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),Tt(e[t[0]],t.slice(1),r)}}var Lr={};function H(e,t){Lr[e]=t}function Ct(e,t){return Object.entries(Lr).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){let[i,o]=Hr(t);return i={interceptor:Mr,...i},Tr(t,o),n(t,i)},enumerable:!1})}),e}function Ci(e,t,r,...n){try{return r(...n)}catch(i){Te(i,e,t)}}function Te(e,t,r=void 0){Object.assign(e,{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
|
2
2
|
|
3
3
|
${r?'Expression: "'+r+`"
|
4
4
|
|
5
|
-
`:""}`,t),setTimeout(()=>{throw e},0)}var De=!0;function gi(e){let t=De;De=!1,e(),De=t}function fe(e,t,r={}){let n;return R(e,t)(i=>n=i,r),n}function R(...e){return Or(...e)}var Or=Cr;function vi(e){Or=e}function Cr(e,t){let r={};vt(r,e);let n=[r,...de(e)];if(typeof t=="function")return xi(n,t);let i=yi(n,t,e);return _i.bind(null,e,t,i)}function xi(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Re([n,...e]),i);Fe(r,o)}}var ft={};function bi(e,t){if(ft[e])return ft[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(a){return Te(a,t,e),Promise.resolve()}})();return ft[e]=o,o}function yi(e,t,r){let n=bi(t,r);return(i=()=>{},{scope:o={},params:a=[]}={})=>{n.result=void 0,n.finished=!1;let s=Re([o,...e]);if(typeof n=="function"){let l=n(n,s).catch(u=>Te(u,r,t));n.finished?(Fe(i,n.result,s,a,r),n.result=void 0):l.then(u=>{Fe(i,u,s,a,r)}).catch(u=>Te(u,r,t)).finally(()=>n.result=void 0)}}}function Fe(e,t,r,n,i){if(De&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(a=>Fe(e,a,r,n)).catch(a=>Te(a,i,t)):e(o)}else e(t)}var Nt="x-";function _e(e=""){return Nt+e}function Ei(e){Nt=e}var Rr={};function w(e,t){Rr[e]=t}function Pt(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([s,l])=>({name:s,value:l})),a=kr(o);o=o.map(s=>a.find(l=>l.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),t=t.concat(o)}let n={};return t.map(Pr((o,a)=>n[o]=a)).filter(Dr).map(Si(n,r)).sort(Ti).map(o=>Ai(e,o))}function kr(e){return Array.from(e).map(Pr()).filter(t=>!Dr(t))}var xt=!1,Ee=new Map,Mr=Symbol();function wi(e){xt=!0;let t=Symbol();Mr=t,Ee.set(t,[]);let r=()=>{for(;Ee.get(t).length;)Ee.get(t).shift()();Ee.delete(t)},n=()=>{xt=!1,r()};e(r),n()}function Lr(e){let t=[],r=s=>t.push(s),[n,i]=ai(e);return t.push(i),[{Alpine:ke,effect:n,cleanup:r,evaluateLater:R.bind(R,e),evaluate:fe.bind(fe,e)},()=>t.forEach(s=>s())]}function Ai(e,t){let r=()=>{},n=Rr[t.type]||r,[i,o]=Lr(e);ui(e,t.original,o);let a=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),xt?Ee.get(Mr).push(n):n())};return a.runCleanups=o,a}var $r=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Nr=e=>e;function Pr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Ir.reduce((o,a)=>a(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Ir=[];function It(e){Ir.push(e)}function Dr({name:e}){return jr().test(e)}var jr=()=>new RegExp(`^${Nt}([^:^.]+)\\b`);function Si(e,t){return({name:r,value:n})=>{let i=r.match(jr()),o=r.match(/:([a-zA-Z0-9\-:]+)/),a=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],s=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:a.map(l=>l.replace(".","")),expression:n,original:s}}}var bt="DEFAULT",Pe=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",bt,"teleport"];function Ti(e,t){let r=Pe.indexOf(e.type)===-1?bt:e.type,n=Pe.indexOf(t.type)===-1?bt:t.type;return Pe.indexOf(r)-Pe.indexOf(n)}function Ae(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var yt=[],Dt=!1;function Fr(e=()=>{}){return queueMicrotask(()=>{Dt||setTimeout(()=>{Et()})}),new Promise(t=>{yt.push(()=>{e(),t()})})}function Et(){for(Dt=!1;yt.length;)yt.shift()()}function Oi(){Dt=!0}function ie(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>ie(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)ie(n,t,!1),n=n.nextElementSibling}function pe(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function Ci(){document.body||pe("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),Ae(document,"alpine:init"),Ae(document,"alpine:initializing"),Er(),si(t=>U(t,ie)),br(t=>ki(t)),li((t,r)=>{Pt(t,r).forEach(n=>n())});let e=t=>!Be(t.parentElement,!0);Array.from(document.querySelectorAll(Br())).filter(e).forEach(t=>{U(t)}),Ae(document,"alpine:initialized")}var jt=[],Kr=[];function Hr(){return jt.map(e=>e())}function Br(){return jt.concat(Kr).map(e=>e())}function qr(e){jt.push(e)}function zr(e){Kr.push(e)}function Be(e,t=!1){return qe(e,r=>{if((t?Br():Hr()).some(i=>r.matches(i)))return!0})}function qe(e,t){if(!!e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return qe(e.parentElement,t)}}function Ri(e){return Hr().some(t=>e.matches(t))}function U(e,t=ie){wi(()=>{t(e,(r,n)=>{Pt(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function ki(e){ie(e,t=>yr(t))}function Ft(e,t){return Array.isArray(t)?cr(e,t.join(" ")):typeof t=="object"&&t!==null?Mi(e,t):typeof t=="function"?Ft(e,t()):cr(e,t)}function cr(e,t){let r=o=>o.split(" ").filter(Boolean),n=o=>o.split(" ").filter(a=>!e.classList.contains(a)).filter(Boolean),i=o=>(e.classList.add(...o),()=>{e.classList.remove(...o)});return t=t===!0?t="":t||"",i(n(t))}function Mi(e,t){let r=s=>s.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([s,l])=>l?r(s):!1).filter(Boolean),i=Object.entries(t).flatMap(([s,l])=>l?!1:r(s)).filter(Boolean),o=[],a=[];return i.forEach(s=>{e.classList.contains(s)&&(e.classList.remove(s),a.push(s))}),n.forEach(s=>{e.classList.contains(s)||(e.classList.add(s),o.push(s))}),()=>{a.forEach(s=>e.classList.add(s)),o.forEach(s=>e.classList.remove(s))}}function ze(e,t){return typeof t=="object"&&t!==null?Li(e,t):$i(e,t)}function Li(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],n.startsWith("--")||(n=Ni(n)),e.style.setProperty(n,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{ze(e,r)}}function $i(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Ni(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function wt(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:i})=>{typeof n=="function"&&(n=i(n)),n?Pi(e,n,t):Ii(e,r,t)});function Pi(e,t,r){Vr(e,Ft,""),{enter:i=>{e._x_transition.enter.during=i},"enter-start":i=>{e._x_transition.enter.start=i},"enter-end":i=>{e._x_transition.enter.end=i},leave:i=>{e._x_transition.leave.during=i},"leave-start":i=>{e._x_transition.leave.start=i},"leave-end":i=>{e._x_transition.leave.end=i}}[r](t)}function Ii(e,t,r){Vr(e,ze);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);t.includes("in")&&!n&&(t=t.filter((g,b)=>b<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((g,b)=>b>t.indexOf("out")));let a=!t.includes("opacity")&&!t.includes("scale"),s=a||t.includes("opacity"),l=a||t.includes("scale"),u=s?0:1,f=l?be(t,"scale",95)/100:1,h=be(t,"delay",0),v=be(t,"origin","center"),$="opacity, transform",E=be(t,"duration",150)/1e3,ce=be(t,"duration",75)/1e3,d="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:v,transitionDelay:h,transitionProperty:$,transitionDuration:`${E}s`,transitionTimingFunction:d},e._x_transition.enter.start={opacity:u,transform:`scale(${f})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:v,transitionDelay:h,transitionProperty:$,transitionDuration:`${ce}s`,transitionTimingFunction:d},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:u,transform:`scale(${f})`})}function Vr(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=()=>{},i=()=>{}){At(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){At(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(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):o():e._x_transition?e._x_transition.in(r):o();return}e._x_hidePromise=e._x_transition?new Promise((a,s)=>{e._x_transition.out(()=>{},()=>a(n)),e._x_transitioning.beforeCancel(()=>s({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let a=Wr(e);a?(a._x_hideChildren||(a._x_hideChildren=[]),a._x_hideChildren.push(e)):i(()=>{let s=l=>{let u=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(s)]).then(([f])=>f());return delete l._x_hidePromise,delete l._x_hideChildren,u};s(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function Wr(e){let t=e.parentNode;if(!!t)return t._x_hidePromise?t:Wr(t)}function At(e,t,{during:r,start:n,end:i}={},o=()=>{},a=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),a();return}let s,l,u;Di(e,{start(){s=t(e,n)},during(){l=t(e,r)},before:o,end(){s(),u=t(e,i)},after:a,cleanup(){l(),u()}})}function Di(e,t){let r,n,i,o=wt(()=>{S(()=>{r=!0,n||t.before(),i||(t.end(),Et()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(a){this.beforeCancels.push(a)},cancel:wt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},S(()=>{t.start(),t.during()}),Oi(),requestAnimationFrame(()=>{if(r)return;let a=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,s=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;a===0&&(a=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),S(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{r||(S(()=>{t.end()}),Et(),setTimeout(e._x_transitioning.finish,a+s),i=!0)})})}function be(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 i=n.match(/([0-9]+)ms/);if(i)return i[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}var St=!1;function Ve(e,t=()=>{}){return(...r)=>St?t(...r):e(...r)}function ji(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),St=!0,Ki(()=>{Fi(t)}),St=!1}function Fi(e){let t=!1;U(e,(n,i)=>{ie(n,(o,a)=>{if(t&&Ri(o))return a();t=!0,i(o,a)})})}function Ki(e){let t=Oe;lr((r,n)=>{let i=t(r);return He(i),()=>{}}),e(),lr(t)}function Ur(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=me({})),e._x_bindings[t]=r,t=n.includes("camel")?Ui(t):t,t){case"value":Hi(e,r);break;case"style":qi(e,r);break;case"class":Bi(e,r);break;default:zi(e,t,r);break}}function Hi(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=fr(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=>fr(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")Wi(e,t);else{if(e.value===t)return;e.value=t}}function Bi(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Ft(e,t)}function qi(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=ze(e,t)}function zi(e,t,r){[null,void 0,!1].includes(r)&&Xi(t)?e.removeAttribute(t):(Xr(t)&&(r=t),Vi(e,t,r))}function Vi(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function Wi(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function Ui(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function fr(e,t){return e==t}function Xr(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 Xi(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Yi(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:Xr(t)?!![t,"true"].includes(n):n}function Yr(e,t){var r;return function(){var n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function Gr(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function Gi(e){e(ke)}var ee={},dr=!1;function Ji(e,t){if(dr||(ee=me(ee),dr=!0),t===void 0)return ee[e];ee[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&ee[e].init(),Ar(ee[e])}function Zi(){return ee}var Jr={};function Qi(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?Zr(e,r()):Jr[e]=r}function eo(e){return Object.entries(Jr).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function Zr(e,t,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(t).map(([a,s])=>({name:a,value:s})),o=kr(i);i=i.map(a=>o.find(s=>s.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),Pt(e,i,r).map(a=>{n.push(a.runCleanups),a()})}var Qr={};function to(e,t){Qr[e]=t}function ro(e,t){return Object.entries(Qr).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var no={get reactive(){return me},get release(){return He},get effect(){return Oe},get raw(){return _r},version:"3.10.5",flushAndStopDeferringMutations:hi,dontAutoEvaluateFunctions:gi,disableEffectScheduling:ii,setReactivityEngine:oi,closestDataStack:de,skipDuringClone:Ve,addRootSelector:qr,addInitSelector:zr,addScopeToNode:Ce,deferMutations:pi,mapAttributes:It,evaluateLater:R,setEvaluator:vi,mergeProxies:Re,findClosest:qe,closestRoot:Be,interceptor:Sr,transition:At,setStyles:ze,mutateDom:S,directive:w,throttle:Gr,debounce:Yr,evaluate:fe,initTree:U,nextTick:Fr,prefixed:_e,prefix:Ei,plugin:Gi,magic:D,store:Ji,start:Ci,clone:ji,bound:Yi,$data:wr,data:to,bind:Qi},ke=no;function en(e,t){let r=Object.create(null),n=e.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return t?i=>!!r[i.toLowerCase()]:i=>!!r[i]}var io="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ka=en(io+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),oo=Object.freeze({}),Ha=Object.freeze([]),tn=Object.assign,ao=Object.prototype.hasOwnProperty,We=(e,t)=>ao.call(e,t),re=Array.isArray,Se=e=>rn(e)==="[object Map]",so=e=>typeof e=="string",Kt=e=>typeof e=="symbol",Ue=e=>e!==null&&typeof e=="object",lo=Object.prototype.toString,rn=e=>lo.call(e),nn=e=>rn(e).slice(8,-1),Ht=e=>so(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Xe=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},uo=/-(\w)/g,Ba=Xe(e=>e.replace(uo,(t,r)=>r?r.toUpperCase():"")),co=/\B([A-Z])/g,qa=Xe(e=>e.replace(co,"-$1").toLowerCase()),on=Xe(e=>e.charAt(0).toUpperCase()+e.slice(1)),za=Xe(e=>e?`on${on(e)}`:""),an=(e,t)=>e!==t&&(e===e||t===t),Tt=new WeakMap,ye=[],B,ne=Symbol("iterate"),Ot=Symbol("Map key iterate");function fo(e){return e&&e._isEffect===!0}function po(e,t=oo){fo(e)&&(e=e.raw);let r=_o(e,t);return t.lazy||r(),r}function ho(e){e.active&&(sn(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var mo=0;function _o(e,t){let r=function(){if(!r.active)return e();if(!ye.includes(r)){sn(r);try{return vo(),ye.push(r),B=r,e()}finally{ye.pop(),ln(),B=ye[ye.length-1]}}};return r.id=mo++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function sn(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var he=!0,Bt=[];function go(){Bt.push(he),he=!1}function vo(){Bt.push(he),he=!0}function ln(){let e=Bt.pop();he=e===void 0?!0:e}function I(e,t,r){if(!he||B===void 0)return;let n=Tt.get(e);n||Tt.set(e,n=new Map);let i=n.get(r);i||n.set(r,i=new Set),i.has(B)||(i.add(B),B.deps.push(i),B.options.onTrack&&B.options.onTrack({effect:B,target:e,type:t,key:r}))}function X(e,t,r,n,i,o){let a=Tt.get(e);if(!a)return;let s=new Set,l=f=>{f&&f.forEach(h=>{(h!==B||h.allowRecurse)&&s.add(h)})};if(t==="clear")a.forEach(l);else if(r==="length"&&re(e))a.forEach((f,h)=>{(h==="length"||h>=n)&&l(f)});else switch(r!==void 0&&l(a.get(r)),t){case"add":re(e)?Ht(r)&&l(a.get("length")):(l(a.get(ne)),Se(e)&&l(a.get(Ot)));break;case"delete":re(e)||(l(a.get(ne)),Se(e)&&l(a.get(Ot)));break;case"set":Se(e)&&l(a.get(ne));break}let u=f=>{f.options.onTrigger&&f.options.onTrigger({effect:f,target:e,key:r,type:t,newValue:n,oldValue:i,oldTarget:o}),f.options.scheduler?f.options.scheduler(f):f()};s.forEach(u)}var xo=en("__proto__,__v_isRef,__isVue"),un=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Kt)),bo=Ye(),yo=Ye(!1,!0),Eo=Ye(!0),wo=Ye(!0,!0),Ke={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];Ke[e]=function(...r){let n=x(this);for(let o=0,a=this.length;o<a;o++)I(n,"get",o+"");let i=t.apply(n,r);return i===-1||i===!1?t.apply(n,r.map(x)):i}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];Ke[e]=function(...r){go();let n=t.apply(this,r);return ln(),n}});function Ye(e=!1,t=!1){return function(n,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_raw"&&o===(e?t?$o:wn:t?Lo:En).get(n))return n;let a=re(n);if(!e&&a&&We(Ke,i))return Reflect.get(Ke,i,o);let s=Reflect.get(n,i,o);return(Kt(i)?un.has(i):xo(i))||(e||I(n,"get",i),t)?s:Ct(s)?!a||!Ht(i)?s.value:s:Ue(s)?e?An(s):Wt(s):s}}var Ao=cn(),So=cn(!0);function cn(e=!1){return function(r,n,i,o){let a=r[n];if(!e&&(i=x(i),a=x(a),!re(r)&&Ct(a)&&!Ct(i)))return a.value=i,!0;let s=re(r)&&Ht(n)?Number(n)<r.length:We(r,n),l=Reflect.set(r,n,i,o);return r===x(o)&&(s?an(i,a)&&X(r,"set",n,i,a):X(r,"add",n,i)),l}}function To(e,t){let r=We(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&X(e,"delete",t,void 0,n),i}function Oo(e,t){let r=Reflect.has(e,t);return(!Kt(t)||!un.has(t))&&I(e,"has",t),r}function Co(e){return I(e,"iterate",re(e)?"length":ne),Reflect.ownKeys(e)}var fn={get:bo,set:Ao,deleteProperty:To,has:Oo,ownKeys:Co},dn={get:Eo,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}},Va=tn({},fn,{get:yo,set:So}),Wa=tn({},dn,{get:wo}),qt=e=>Ue(e)?Wt(e):e,zt=e=>Ue(e)?An(e):e,Vt=e=>e,Ge=e=>Reflect.getPrototypeOf(e);function Je(e,t,r=!1,n=!1){e=e.__v_raw;let i=x(e),o=x(t);t!==o&&!r&&I(i,"get",t),!r&&I(i,"get",o);let{has:a}=Ge(i),s=n?Vt:r?zt:qt;if(a.call(i,t))return s(e.get(t));if(a.call(i,o))return s(e.get(o));e!==i&&e.get(t)}function Ze(e,t=!1){let r=this.__v_raw,n=x(r),i=x(e);return e!==i&&!t&&I(n,"has",e),!t&&I(n,"has",i),e===i?r.has(e):r.has(e)||r.has(i)}function Qe(e,t=!1){return e=e.__v_raw,!t&&I(x(e),"iterate",ne),Reflect.get(e,"size",e)}function pn(e){e=x(e);let t=x(this);return Ge(t).has.call(t,e)||(t.add(e),X(t,"add",e,e)),this}function hn(e,t){t=x(t);let r=x(this),{has:n,get:i}=Ge(r),o=n.call(r,e);o?yn(r,n,e):(e=x(e),o=n.call(r,e));let a=i.call(r,e);return r.set(e,t),o?an(t,a)&&X(r,"set",e,t,a):X(r,"add",e,t),this}function mn(e){let t=x(this),{has:r,get:n}=Ge(t),i=r.call(t,e);i?yn(t,r,e):(e=x(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,a=t.delete(e);return i&&X(t,"delete",e,void 0,o),a}function _n(){let e=x(this),t=e.size!==0,r=Se(e)?new Map(e):new Set(e),n=e.clear();return t&&X(e,"clear",void 0,void 0,r),n}function et(e,t){return function(n,i){let o=this,a=o.__v_raw,s=x(a),l=t?Vt:e?zt:qt;return!e&&I(s,"iterate",ne),a.forEach((u,f)=>n.call(i,l(u),l(f),o))}}function Ie(e,t,r){return function(...n){let i=this.__v_raw,o=x(i),a=Se(o),s=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,u=i[e](...n),f=r?Vt:t?zt:qt;return!t&&I(o,"iterate",l?Ot:ne),{next(){let{value:h,done:v}=u.next();return v?{value:h,done:v}:{value:s?[f(h[0]),f(h[1])]:f(h),done:v}},[Symbol.iterator](){return this}}}}function W(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${on(e)} operation ${r}failed: target is readonly.`,x(this))}return e==="delete"?!1:this}}var gn={get(e){return Je(this,e)},get size(){return Qe(this)},has:Ze,add:pn,set:hn,delete:mn,clear:_n,forEach:et(!1,!1)},vn={get(e){return Je(this,e,!1,!0)},get size(){return Qe(this)},has:Ze,add:pn,set:hn,delete:mn,clear:_n,forEach:et(!1,!0)},xn={get(e){return Je(this,e,!0)},get size(){return Qe(this,!0)},has(e){return Ze.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:et(!0,!1)},bn={get(e){return Je(this,e,!0,!0)},get size(){return Qe(this,!0)},has(e){return Ze.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:et(!0,!0)},Ro=["keys","values","entries",Symbol.iterator];Ro.forEach(e=>{gn[e]=Ie(e,!1,!1),xn[e]=Ie(e,!0,!1),vn[e]=Ie(e,!1,!0),bn[e]=Ie(e,!0,!0)});function tt(e,t){let r=t?e?bn:vn:e?xn:gn;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(We(r,i)&&i in n?r:n,i,o)}var ko={get:tt(!1,!1)},Ua={get:tt(!1,!0)},Mo={get:tt(!0,!1)},Xa={get:tt(!0,!0)};function yn(e,t,r){let n=x(r);if(n!==r&&t.call(e,n)){let i=nn(e);console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="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 En=new WeakMap,Lo=new WeakMap,wn=new WeakMap,$o=new WeakMap;function No(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Po(e){return e.__v_skip||!Object.isExtensible(e)?0:No(nn(e))}function Wt(e){return e&&e.__v_isReadonly?e:Sn(e,!1,fn,ko,En)}function An(e){return Sn(e,!0,dn,Mo,wn)}function Sn(e,t,r,n,i){if(!Ue(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;let o=i.get(e);if(o)return o;let a=Po(e);if(a===0)return e;let s=new Proxy(e,a===2?n:r);return i.set(e,s),s}function x(e){return e&&x(e.__v_raw)||e}function Ct(e){return Boolean(e&&e.__v_isRef===!0)}D("nextTick",()=>Fr);D("dispatch",e=>Ae.bind(Ae,e));D("watch",(e,{evaluateLater:t,effect:r})=>(n,i)=>{let o=t(n),a=!0,s,l=r(()=>o(u=>{JSON.stringify(u),a?s=u:queueMicrotask(()=>{i(u,s),s=u}),a=!1}));e._x_effects.delete(l)});D("store",Zi);D("data",e=>wr(e));D("root",e=>Be(e));D("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Re(Io(e))),e._x_refs_proxy));function Io(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var dt={};function Tn(e){return dt[e]||(dt[e]=0),++dt[e]}function Do(e,t){return qe(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function jo(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Tn(t))}D("id",e=>(t,r=null)=>{let n=Do(e,t),i=n?n._x_ids[t]:Tn(t);return r?`${t}-${i}-${r}`:`${t}-${i}`});D("el",e=>e);On("Focus","focus","focus");On("Persist","persist","persist");function On(e,t,r){D(t,n=>pe(`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 i=n(t),o=()=>{let u;return i(f=>u=f),u},a=n(`${t} = __placeholder`),s=u=>a(()=>{},{scope:{__placeholder:u}}),l=o();s(l),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let u=e._x_model.get,f=e._x_model.set;r(()=>s(u())),r(()=>f(o()))})});w("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&pe("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||pe(`Cannot find x-teleport element for selector: "${t}"`);let i=e.content.cloneNode(!0).firstElementChild;e._x_teleport=i,i._x_teleportBack=e,e._x_forwardEvents&&e._x_forwardEvents.forEach(o=>{i.addEventListener(o,a=>{a.stopPropagation(),e.dispatchEvent(new a.constructor(a.type,a))})}),Ce(i,{},e),S(()=>{n.appendChild(i),U(i),i._x_ignore=!0}),r(()=>i.remove())});var Cn=()=>{};Cn.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",Cn);w("effect",(e,{expression:t},{effect:r})=>r(R(e,t)));function Rn(e,t,r,n){let i=e,o=l=>n(l),a={},s=(l,u)=>f=>u(l,f);if(r.includes("dot")&&(t=Fo(t)),r.includes("camel")&&(t=Ko(t)),r.includes("passive")&&(a.passive=!0),r.includes("capture")&&(a.capture=!0),r.includes("window")&&(i=window),r.includes("document")&&(i=document),r.includes("prevent")&&(o=s(o,(l,u)=>{u.preventDefault(),l(u)})),r.includes("stop")&&(o=s(o,(l,u)=>{u.stopPropagation(),l(u)})),r.includes("self")&&(o=s(o,(l,u)=>{u.target===e&&l(u)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=s(o,(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")&&(o=s(o,(l,u)=>{l(u),i.removeEventListener(t,o,a)})),o=s(o,(l,u)=>{Bo(t)&&qo(u,r)||l(u)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",u=Rt(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=Yr(o,u)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",u=Rt(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=Gr(o,u)}return i.addEventListener(t,o,a),()=>{i.removeEventListener(t,o,a)}}function Fo(e){return e.replace(/-/g,".")}function Ko(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Rt(e){return!Array.isArray(e)&&!isNaN(e)}function Ho(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Bo(e){return["keydown","keyup"].includes(e)}function qo(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,Rt((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&pr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter(o=>r.includes(o));return r=r.filter(o=>!i.includes(o)),!(i.length>0&&i.filter(a=>((a==="cmd"||a==="super")&&(a="meta"),e[`${a}Key`])).length===i.length&&pr(e.key).includes(r[0]))}function pr(e){if(!e)return[];e=Ho(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:i})=>{let o=R(e,r),a=`${r} = rightSideOfExpression($event, ${r})`,s=R(e,a);var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let u=zo(e,t,r),f=Rn(e,l,t,v=>{s(()=>{},{scope:{$event:v,rightSideOfExpression:u}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=f,i(()=>e._x_removeModelListeners.default());let h=R(e,`${r} = __placeholder`);e._x_model={get(){let v;return o($=>v=$),v},set(v){h(()=>{},{scope:{__placeholder:v}})}},e._x_forceModelUpdate=()=>{o(v=>{v===void 0&&r.match(/\./)&&(v=""),window.fromModel=!0,S(()=>Ur(e,"value",v)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function zo(e,t,r){return e.type==="radio"&&S(()=>{e.hasAttribute("name")||e.setAttribute("name",r)}),(n,i)=>S(()=>{if(n instanceof CustomEvent&&n.detail!==void 0)return n.detail||n.target.value;if(e.type==="checkbox")if(Array.isArray(i)){let o=t.includes("number")?pt(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(a=>!Vo(a,o))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(o=>{let a=o.value||o.text;return pt(a)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?pt(o):t.includes("trim")?o.trim():o}}})}function pt(e){let t=e?parseFloat(e):null;return Wo(t)?t:e}function Vo(e,t){return e==t}function Wo(e){return!Array.isArray(e)&&!isNaN(e)}w("cloak",e=>queueMicrotask(()=>S(()=>e.removeAttribute(_e("cloak")))));zr(()=>`[${_e("init")}]`);w("init",Ve((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 i=n(t);r(()=>{i(o=>{S(()=>{e.textContent=o})})})});w("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{S(()=>{e.innerHTML=o,e._x_ignoreSelf=!0,U(e),delete e._x_ignoreSelf})})})});It($r(":",Nr(_e("bind:"))));w("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let s={};eo(s),R(e,n)(u=>{Zr(e,u,i)},{scope:s});return}if(t==="key")return Uo(e,n);let a=R(e,n);o(()=>a(s=>{s===void 0&&typeof n=="string"&&n.match(/\./)&&(s=""),S(()=>Ur(e,t,s,r))}))});function Uo(e,t){e._x_keyExpression=t}qr(()=>`[${_e("data")}]`);w("data",Ve((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};vt(n,e);let i={};ro(i,n);let o=fe(e,t,{scope:i});o===void 0&&(o={}),vt(o,e);let a=me(o);Ar(a);let s=Ce(e,a);a.init&&fe(e,a.init),r(()=>{a.destroy&&fe(e,a.destroy),s()})}));w("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=R(e,r);e._x_doHide||(e._x_doHide=()=>{S(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{S(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let o=()=>{e._x_doHide(),e._x_isShown=!1},a=()=>{e._x_doShow(),e._x_isShown=!0},s=()=>setTimeout(a),l=wt(h=>h?a():o(),h=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,h,a,o):h?s():o()}),u,f=!0;n(()=>i(h=>{!f&&h===u||(t.includes("immediate")&&(h?s():o()),l(h),u=h,f=!1)}))});w("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=Yo(t),o=R(e,i.items),a=R(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>Xo(e,i,o,a)),n(()=>{Object.values(e._x_lookup).forEach(s=>s.remove()),delete e._x_prevKeys,delete e._x_lookup})});function Xo(e,t,r,n){let i=a=>typeof a=="object"&&!Array.isArray(a),o=e;r(a=>{Go(a)&&a>=0&&(a=Array.from(Array(a).keys(),d=>d+1)),a===void 0&&(a=[]);let s=e._x_lookup,l=e._x_prevKeys,u=[],f=[];if(i(a))a=Object.entries(a).map(([d,g])=>{let b=hr(t,g,d,a);n(O=>f.push(O),{scope:{index:d,...b}}),u.push(b)});else for(let d=0;d<a.length;d++){let g=hr(t,a[d],d,a);n(b=>f.push(b),{scope:{index:d,...g}}),u.push(g)}let h=[],v=[],$=[],E=[];for(let d=0;d<l.length;d++){let g=l[d];f.indexOf(g)===-1&&$.push(g)}l=l.filter(d=>!$.includes(d));let ce="template";for(let d=0;d<f.length;d++){let g=f[d],b=l.indexOf(g);if(b===-1)l.splice(d,0,g),h.push([ce,d]);else if(b!==d){let O=l.splice(d,1)[0],k=l.splice(b-1,1)[0];l.splice(d,0,k),l.splice(b,0,O),v.push([O,k])}else E.push(g);ce=g}for(let d=0;d<$.length;d++){let g=$[d];s[g]._x_effects&&s[g]._x_effects.forEach(mr),s[g].remove(),s[g]=null,delete s[g]}for(let d=0;d<v.length;d++){let[g,b]=v[d],O=s[g],k=s[b],V=document.createElement("div");S(()=>{k.after(V),O.after(k),k._x_currentIfEl&&k.after(k._x_currentIfEl),V.before(O),O._x_currentIfEl&&O.after(O._x_currentIfEl),V.remove()}),ur(k,u[f.indexOf(b)])}for(let d=0;d<h.length;d++){let[g,b]=h[d],O=g==="template"?o:s[g];O._x_currentIfEl&&(O=O._x_currentIfEl);let k=u[b],V=f[b],P=document.importNode(o.content,!0).firstElementChild;Ce(P,me(k),o),S(()=>{O.after(P),U(P)}),typeof V=="object"&&pe("x-for key cannot be an object, it must be a string or an integer",o),s[V]=P}for(let d=0;d<E.length;d++)ur(s[E[d]],u[f.indexOf(E[d])]);o._x_prevKeys=f})}function Yo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let a=i[1].replace(r,"").trim(),s=a.match(t);return s?(o.item=a.replace(t,"").trim(),o.index=s[1].trim(),s[2]&&(o.collection=s[2].trim())):o.item=a,o}function hr(e,t,r,n){let i={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(a=>a.trim()).forEach((a,s)=>{i[a]=t[s]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(a=>a.trim()).forEach(a=>{i[a]=t[a]}):i[e.item]=t,e.index&&(i[e.index]=r),e.collection&&(i[e.collection]=n),i}function Go(e){return!Array.isArray(e)&&!isNaN(e)}function kn(){}kn.inline=(e,{expression:t},{cleanup:r})=>{let n=Be(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",kn);w("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=R(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let s=e.content.cloneNode(!0).firstElementChild;return Ce(s,{},e),S(()=>{e.after(s),U(s)}),e._x_currentIfEl=s,e._x_undoIf=()=>{ie(s,l=>{l._x_effects&&l._x_effects.forEach(mr)}),s.remove(),delete e._x_currentIfEl},s},a=()=>{!e._x_undoIf||(e._x_undoIf(),delete e._x_undoIf)};r(()=>i(s=>{s?o():a()})),n(()=>e._x_undoIf&&e._x_undoIf())});w("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach(i=>jo(e,i))});It($r("@",Nr(_e("on:"))));w("on",Ve((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?R(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let a=Rn(e,t,r,s=>{o(()=>{},{scope:{$event:s},params:[s]})});i(()=>a())}));rt("Collapse","collapse","collapse");rt("Intersect","intersect","intersect");rt("Focus","trap","focus");rt("Mask","mask","mask");function rt(e,t,r){w(t,n=>pe(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}ke.setEvaluator(Cr);ke.setReactivityEngine({reactive:Wt,effect:po,release:ho,raw:x});var Jo=ke,Ut=Jo;var Zo=class{el=void 0;constructor(e){this.el=e}traversals={first:"firstElementChild",next:"nextElementSibling",parent:"parentElement"};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 T(e){return new Zo(e)}function Qo(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function ea(e){return e.nodeType===3||e.nodeType===8}var Mn=()=>{},Ln=()=>{};async function Xt(e,t,r){let n,i,o,a,s,l,u,f,h,v,$;function E(c){if(!!$)return Ln((c||"").replace(`
|
6
|
-
`,"\\n"),n,i),new Promise(p=>Mn=()=>p())}function ce(c={}){let p=N=>N.getAttribute("key"),m=()=>{};s=c.updating||m,l=c.updated||m,u=c.removing||m,f=c.removed||m,h=c.adding||m,v=c.added||m,o=c.key||p,a=c.lookahead||!1,$=c.debug||!1}async function d(c,p){if(g(c,p)){let N=b(c,p);return await E("Swap elements"),N}let m=!1;if(!ge(s,c,p,()=>m=!0)){if(window.Alpine&&ta(c,p,()=>m=!0),ea(p)){await O(c,p),l(c,p);return}m||await k(c,p),l(c,p),await V(c,p)}}function g(c,p){return c.nodeType!=p.nodeType||c.nodeName!=p.nodeName||P(c)!=P(p)}function b(c,p){if(ge(u,c))return;let m=p.cloneNode(!0);ge(h,m)||(T(c).replace(m),f(c),v(m))}async function O(c,p){let m=p.nodeValue;c.nodeValue!==m&&(c.nodeValue=m,await E("Change text node to: "+m))}async function k(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let m=Array.from(c.attributes),N=Array.from(p.attributes);for(let z=m.length-1;z>=0;z--){let K=m[z].name;p.hasAttribute(K)||(c.removeAttribute(K),await E("Remove attribute"))}for(let z=N.length-1;z>=0;z--){let K=N[z].name,y=N[z].value;c.getAttribute(K)!==y&&(c.setAttribute(K,y),await E(`Set [${K}] attribute to: "${y}"`))}}async function V(c,p){let m=c.childNodes,N=p.childNodes,z=or(N),K=or(m),y=T(p).nodes().first(),_=T(c).nodes().first(),Q={};for(;y;){let M=P(y),H=P(_);if(!_)if(M&&Q[M]){let L=Q[M];T(c).append(L),_=L,await E("Add element (from key)")}else{let L=Jn(y,c)||{};await E("Add element: "+(L.outerHTML||L.nodeValue)),y=T(y).nodes().next();continue}if(a){let L=T(y).next(),ar=!1;for(;!ar&&L;)_.isEqualNode(L)&&(ar=!0,_=lt(y,_),H=P(_),await E("Move element (lookahead)")),L=T(L).next()}if(M!==H){if(!M&&H){Q[H]=_,_=lt(y,_),Q[H].remove(),_=T(_).nodes().next(),y=T(y).nodes().next(),await E('No "to" key');continue}if(M&&!H&&K[M]&&(_=T(_).replace(K[M]),await E('No "from" key')),M&&H){Q[H]=_;let L=K[M];if(L)_=T(_).replace(L),await E('Move "from" key');else{Q[H]=_,_=lt(y,_),Q[H].remove(),_=T(_).next(),y=T(y).next(),await E("Swap elements with keys");continue}}}let Zn=_&&T(_).nodes().next();await d(_,y),y=y&&T(y).nodes().next(),_=Zn}let ut=[];for(;_;)ge(u,_)||ut.push(_),_=T(_).nodes().next();for(;ut.length;){let M=ut.shift();M.remove(),await E("remove el"),f(M)}}function P(c){return c&&c.nodeType===1&&o(c)}function or(c){let p={};return c.forEach(m=>{let N=P(m);N&&(p[N]=m)}),p}function Jn(c,p){if(!ge(h,c)){let m=c.cloneNode(!0);return T(p).append(m),v(m),m}return null}function lt(c,p){if(!ge(h,c)){let m=c.cloneNode(!0);return T(p).before(m),v(m),m}return p}return ce(r),n=e,i=Qo(t),window.Alpine&&window.Alpine.closestDataStack&&!e._x_dataStack&&(i._x_dataStack=window.Alpine.closestDataStack(e),i._x_dataStack&&window.Alpine.clone(e,i)),await E(),await d(e,i),n=void 0,i=void 0,e}Xt.step=()=>Mn();Xt.log=e=>{Ln=e};function ge(e,...t){let r=!1;return e(...t,()=>r=!0),r}function ta(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function ra(e){e.morph=Xt}var $n=ra;Ut.plugin($n);var na=/INPUT/i,ia=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,oa=/TEXTAREA/i;function aa(e,t,r,n){if(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)return;if(e.tagName.match(oa)||e.tagName.match(na)&&e.getAttribute("type").match(ia))return n()}function sa(e,t){e.forEach(r=>Ut.morph(r,t,{updating:aa}))}var Nn=sa;function la(e,t,r){if(e.match(/^dispatch(Event)?$/))return sr(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Nn(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 ua(){let e=JSON.parse(this.templateContent.textContent),{id:t,selector:r,receiver:n,method:i,args:o}=e,a=[self];r&&(a=Array.from(document.querySelectorAll(r))),n&&(a=a.map(s=>{let l=s,u=n.split(".");for(;u.length>0;)l=l[u.shift()];return l})),la(i,o,a)}var Pn=ua;function ca(e){e.invoke=Pn}var In={initialize:ca};var Yt=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token(){return this.element.getAttribute("content")}get busy(){return this.element.dataset.busy==="true"}set busy(t){return this.element.dataset.busy=!!t}},A=new Yt;var Y={start:"turbo-reflex:start",success:"turbo-reflex:success",finish:"turbo-reflex:finish",abort:"turbo-reflex:abort",clientError:"turbo-reflex:client-error",serverError:"turbo-reflex:server-error"},G={stateLoad:"turbo-reflex:state-load",stateChange:"turbo-reflex:state-change"},j={...Y,...G};function C(e,t=document,r={},n=!1){try{t=t||document;let i=new CustomEvent(e,{detail:r,cancelable:!1,bubbles:!0});t.dispatchEvent(i)}catch(i){if(n)throw i;C(Y.clientError,t,{error:i,...r},!0)}}var Gt;function nt(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],C(G.stateChange,A.element,{state:Gt}),!0},set(n,i,o,a){return n[i]=nt(o,this),C(G.stateChange,A.element,{state:Gt}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=nt(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=nt(i,r);return t||(Gt=r),r}var Dn=nt;var Jt,oe,it,jn;function Fn(){if(!A.element)return ve();let e=atob(A.element.dataset.state);it={},oe=Dn(JSON.parse(e)),Jt={...oe},delete A.element.dataset.clientStateChange,setTimeout(()=>C(G.stateLoad,A.element,{state:oe}))}function ve(){clearTimeout(jn),jn=setTimeout(Fn,10)}Jt||Fn();addEventListener("DOMContentLoaded",ve);addEventListener("load",ve);addEventListener("turbo:load",ve);addEventListener("turbo:frame-load",ve);addEventListener("turbo-reflex:success",ve);addEventListener(G.stateChange,e=>{it={};for(let[t,r]of Object.entries(oe))Jt[t]!==r&&(it[t]=r);A.element.dataset.clientStateChange=!0,A.element.dataset.state=btoa(JSON.stringify(oe))});var ae={events:G,get current(){return oe},get delta(){return it},get payloadChunks(){return btoa(JSON.stringify(oe)).match(/.{1,2000}/g)}};function fa(e){let t="<html",r="</html",n=e.indexOf(t),i=e.lastIndexOf(r);if(n>=0&&i>=0){let o=e.slice(e.indexOf(">",n)+1,i);document.documentElement.innerHTML=o}}function da(e){document.body.insertAdjacentHTML("beforeend",e)}var se={append:da,replaceDocument:fa};var ot={};function pa(e){ot[e.id]=e}function ha(e){delete ot[e]}var at={add:pa,remove:ha,get reflexes(){return[...Object.values(ot)]},get length(){return Object.keys(ot).length}};function Kn(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>C(Y.finish,e.target,e.detail),20)}addEventListener(Y.serverError,Kn);addEventListener(Y.success,Kn);addEventListener(Y.finish,e=>at.remove(e.detail.id),!0);var J={events:Y};var Zt={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:r}=e.detail;if(A.busy){let n=["text/vnd.turbo-reflex.html",r.headers.Accept];n=n.filter(i=>i&&i.trim().length>0).join(", "),r.headers.Accept=n,r.headers["TurboReflex-Token"]=A.token}ae.payloadChunks.forEach((n,i)=>{r.headers[`TurboReflex-State-${i.toString().padStart(4,"0")}`]=n})});addEventListener("turbo:before-fetch-response",e=>{let t=e.target.closest("turbo-frame"),{fetchResponse:r}=e.detail;if(t&&(Zt[t.id]=t.src),r.header("TurboReflex")){if(r.statusCode<200||r.statusCode>399){let n=`Server returned a ${r.statusCode} status code! TurboReflex requires 2XX-3XX status codes.`;C(J.events.clientError,document,{...e.detail,error:n},!0)}r.header("TurboReflex")==="Append"&&(e.preventDefault(),r.responseText.then(n=>se.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboReflexSrc=Zt[t.id]||t.src||t.dataset.turboReflexSrc,delete Zt[t.id]});var ma={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",reflexAttribute:"data-turbo-reflex"},F={...ma};var st={},Hn;function _a(e,t){st[e]=t,document.addEventListener(e,Hn,!0)}function ga(e){return Object.keys(st).find(t=>!!st[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function va(e,t){return e===ga(t)}var Z={events:st,register:_a,isRegisteredForElement:va,set handler(e){Hn=e}};function xa(e){return e.closest(`[${F.reflexAttribute}]`)}function ba(e){return e.closest("turbo-frame")}function ya(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 Ea(e){let t=Array.from(e.attributes).reduce((r,n)=>{let i=n.value;return r[n.name]=i,r},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,ya(e,t),delete t.class,delete t.action,delete t.href,delete t[F.reflexAttribute],delete t[F.frameAttribute],t}var Me={buildAttributePayload:Ea,findClosestReflex:xa,findClosestFrame:ba};function wa(e,t={}){t.token=A.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_reflex",r.value=JSON.stringify(t),e.appendChild(r)}var Bn={invokeReflex:wa};function Aa(e,t={}){let r=document.createElement("a");r.href=e;let n=new URL(r);return n.searchParams.set("turbo_reflex",JSON.stringify(t)),n}var xe={build:Aa};function Sa(e,t){let r=t.src;t={...t},delete t.src,e.src=xe.build(r,t)}var Qt={invokeReflex:Sa};function Ta(e,t={}){let r=t.src;t={...t},delete t.src,delete t.href,e.setAttribute("href",xe.build(r,t))}var qn={invokeReflex:Ta};function Oa(e){let t=e.target;C(J.events.abort,document,{xhr:t,...e.detail})}function er(e){let t=e.target;t.getResponseHeader("TurboReflex")==="Append"?se.append(t.responseText):se.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboReflex requires 2XX-3XX status codes.`;C(J.events.clientError,document,{xhr:t,...e.detail,error:r},!0)}function Ca(e){let t=e.target;if(t.status<200||t.status>399)return er(e);let r=t.responseText;t.getResponseHeader("TurboReflex")==="Append"?se.append(t.responseText):se.replaceDocument(t.responseText)}function Ra(e){let t=e.src;e={...e},delete e.src;try{let r=new XMLHttpRequest;r.open("GET",xe.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-reflex.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboReflex-Token",A.token),ae.payloadChunks.forEach((n,i)=>r.setRequestHeader(`TurboReflex-State-${i.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",Oa),r.addEventListener("error",er),r.addEventListener("load",Ca),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;er(r,{detail:{message:n}})}}var zn={invokeReflex:Ra};function tr(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboReflexSrc||location.href}function ka(e){let t=Me.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,invokeReflex:Bn.invokeReflex}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeReflex:qn.invokeReflex}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:tr(e,t),invokeReflex:Qt.invokeReflex}):(!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:tr(e,t),invokeReflex:Qt.invokeReflex}:{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:tr(e),invokeReflex:zn.invokeReflex}}var Vn={find:ka};var Le="unknown",Wn={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=>{Wn[Le].includes(t.type)&&console[Le==="debug"?"log":Le](t.type,{target:t.target,detail:t.detail})})});var Un={get level(){return Le},set level(e){return Object.keys(Wn).includes(e)||(e="unknown"),Le=e}};function Ma(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var Xn={v4:Ma};function La(e){let t,r={};try{if(t=Me.findClosestReflex(e.target),!t||!Z.isRegisteredForElement(e.type,t))return;let n=Vn.find(t);switch(r={id:`reflex-${Xn.v4()}`,name:t.dataset.turboReflex,driver:n.name,src:n.src,frameId:n.frame?n.frame.id:null,elementId:t.id.length>0?t.id:null,elementAttributes:Me.buildAttributePayload(t),startedAt:new Date().getTime()},at.add(r),C(J.events.start,t,r),["frame","window"].includes(n.name)&&e.preventDefault(),A.busy=!0,setTimeout(()=>A.busy=!1,10),n.name){case"method":return n.invokeReflex(t,r);case"form":return n.invokeReflex(t,r);case"frame":return n.invokeReflex(n.frame,r);case"window":return n.invokeReflex(r)}}catch(n){C(J.events.clientError,t,{error:n,...r})}}Z.handler=La;Z.register("change",[`input[${F.reflexAttribute}]`,`select[${F.reflexAttribute}]`,`textarea[${F.reflexAttribute}]`]);Z.register("submit",[`form[${F.reflexAttribute}]`]);Z.register("click",[`[${F.reflexAttribute}]`]);var hl=self.TurboReflex={logger:Un,schema:F,registerEventDelegate:Z.register,get eventDelegates(){return{...Z.events}},get events(){return{...j}},get state(){return ae.current},get stateDelta(){return ae.delta}};var le=class extends HTMLElement{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(){return this.dataset.viewStack?JSON.parse(this.dataset.viewStack):[]}get coordinates(){let t=this.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:this.offsetWidth,height:this.offsetHeight}}};var $e=class extends le{};var q;addEventListener("click",()=>{setTimeout(()=>{document.querySelectorAll(".reflex-behaviors-tooltip").forEach(e=>e.remove())},300)});function $a(e,t,r,n,i="top"){let o=document.createElement("div");o.classList.add("reflex-behaviors-tooltip",n),o.innerHTML=`<strong>${t}</strong><hr>${r}`,document.body.appendChild(o);let a=e.coordinates;i==="top"&&(o.style.top=`${Math.ceil(a.top-o.offsetHeight-5)}px`,o.style.left=`${Math.ceil(a.left+4)}px`),i==="bottom"&&(o.style.top=`${Math.ceil(a.top+a.height+5)}px`,o.style.left=`${Math.ceil(a.left+4)}px`)}function nr(){return(document.body.dataset.devtools||"").trim().split(" ")}function Yn(e){return nr().includes(e)}function Gn(e){if(Yn(e))return;let t=nr();t.push(e),document.body.dataset.devtools=t.join(" ").trim()}function ir(e){let t=nr(),r=t.indexOf(e);r<0||(t.splice(r,1),document.body.dataset.devtools=t.join(" ").trim())}function rr(){!q||(q.querySelectorAll(".devtool").forEach(e=>ir(e.getAttribute("name"))),q.remove(),q=null)}function Na(){rr(),q=document.createElement("div"),q.id="reflex-behaviors-devtools",q.innerHTML=`
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
`:""}`,t),setTimeout(()=>{throw e},0)}var qe=!0;function ki(e){let t=qe;qe=!1,e(),qe=t}function fe(e,t,r={}){let n;return O(e,t)(i=>n=i,r),n}function O(...e){return $r(...e)}var $r=Nr;function Oi(e){$r=e}function Nr(e,t){let r={};Ct(r,e);let n=[r,...de(e)];if(typeof t=="function")return Ri(n,t);let i=Li(n,t,e);return Ci.bind(null,e,t,i)}function Ri(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Oe([n,...e]),i);Ve(r,o)}}var bt={};function Mi(e,t){if(bt[e])return bt[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(s){return Te(s,t,e),Promise.resolve()}})();return bt[e]=o,o}function Li(e,t,r){let n=Mi(t,r);return(i=()=>{},{scope:o={},params:s=[]}={})=>{n.result=void 0,n.finished=!1;let a=Oe([o,...e]);if(typeof n=="function"){let l=n(n,a).catch(u=>Te(u,r,t));n.finished?(Ve(i,n.result,a,s,r),n.result=void 0):l.then(u=>{Ve(i,u,a,s,r)}).catch(u=>Te(u,r,t)).finally(()=>n.result=void 0)}}}function Ve(e,t,r,n,i){if(qe&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(s=>Ve(e,s,r,n)).catch(s=>Te(s,i,t)):e(o)}else e(t)}var qt="x-";function me(e=""){return qt+e}function $i(e){qt=e}var Ir={};function w(e,t){Ir[e]=t}function zt(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),s=Pr(o);o=o.map(a=>s.find(l=>l.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),t=t.concat(o)}let n={};return t.map(Kr((o,s)=>n[o]=s)).filter(qr).map(Pi(n,r)).sort(Di).map(o=>Ii(e,o))}function Pr(e){return Array.from(e).map(Kr()).filter(t=>!qr(t))}var kt=!1,Ee=new Map,Dr=Symbol();function Ni(e){kt=!0;let t=Symbol();Dr=t,Ee.set(t,[]);let r=()=>{for(;Ee.get(t).length;)Ee.get(t).shift()();Ee.delete(t)},n=()=>{kt=!1,r()};e(r),n()}function Hr(e){let t=[],r=a=>t.push(a),[n,i]=vi(e);return t.push(i),[{Alpine:Re,effect:n,cleanup:r,evaluateLater:O.bind(O,e),evaluate:fe.bind(fe,e)},()=>t.forEach(a=>a())]}function Ii(e,t){let r=()=>{},n=Ir[t.type]||r,[i,o]=Hr(e);bi(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),kt?Ee.get(Dr).push(n):n())};return s.runCleanups=o,s}var jr=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Fr=e=>e;function Kr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Br.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Br=[];function Vt(e){Br.push(e)}function qr({name:e}){return zr().test(e)}var zr=()=>new RegExp(`^${qt}([^:^.]+)\\b`);function Pi(e,t){return({name:r,value:n})=>{let i=r.match(zr()),o=r.match(/:([a-zA-Z0-9\-:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map(l=>l.replace(".","")),expression:n,original:a}}}var Ot="DEFAULT",Ke=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",Ot,"teleport"];function Di(e,t){let r=Ke.indexOf(e.type)===-1?Ot:e.type,n=Ke.indexOf(t.type)===-1?Ot:t.type;return Ke.indexOf(r)-Ke.indexOf(n)}function Se(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var Rt=[],Wt=!1;function Vr(e=()=>{}){return queueMicrotask(()=>{Wt||setTimeout(()=>{Mt()})}),new Promise(t=>{Rt.push(()=>{e(),t()})})}function Mt(){for(Wt=!1;Rt.length;)Rt.shift()()}function Hi(){Wt=!0}function oe(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>oe(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)oe(n,t,!1),n=n.nextElementSibling}function pe(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function ji(){document.body||pe("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"),kr(),xi(t=>U(t,oe)),Tr(t=>Ki(t)),_i((t,r)=>{zt(t,r).forEach(n=>n())});let e=t=>!Ge(t.parentElement,!0);Array.from(document.querySelectorAll(Gr())).filter(e).forEach(t=>{U(t)}),Se(document,"alpine:initialized")}var Ut=[],Wr=[];function Ur(){return Ut.map(e=>e())}function Gr(){return Ut.concat(Wr).map(e=>e())}function Xr(e){Ut.push(e)}function Yr(e){Wr.push(e)}function Ge(e,t=!1){return Xe(e,r=>{if((t?Gr():Ur()).some(i=>r.matches(i)))return!0})}function Xe(e,t){if(!!e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return Xe(e.parentElement,t)}}function Fi(e){return Ur().some(t=>e.matches(t))}function U(e,t=oe){Ni(()=>{t(e,(r,n)=>{zt(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function Ki(e){oe(e,t=>Cr(t))}function Gt(e,t){return Array.isArray(t)?mr(e,t.join(" ")):typeof t=="object"&&t!==null?Bi(e,t):typeof t=="function"?Gt(e,t()):mr(e,t)}function mr(e,t){let r=o=>o.split(" ").filter(Boolean),n=o=>o.split(" ").filter(s=>!e.classList.contains(s)).filter(Boolean),i=o=>(e.classList.add(...o),()=>{e.classList.remove(...o)});return t=t===!0?t="":t||"",i(n(t))}function Bi(e,t){let r=a=>a.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([a,l])=>l?r(a):!1).filter(Boolean),i=Object.entries(t).flatMap(([a,l])=>l?!1:r(a)).filter(Boolean),o=[],s=[];return i.forEach(a=>{e.classList.contains(a)&&(e.classList.remove(a),s.push(a))}),n.forEach(a=>{e.classList.contains(a)||(e.classList.add(a),o.push(a))}),()=>{s.forEach(a=>e.classList.add(a)),o.forEach(a=>e.classList.remove(a))}}function Ye(e,t){return typeof t=="object"&&t!==null?qi(e,t):zi(e,t)}function qi(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],n.startsWith("--")||(n=Vi(n)),e.style.setProperty(n,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{Ye(e,r)}}function zi(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Vi(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Lt(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:i})=>{typeof n=="function"&&(n=i(n)),n?Wi(e,n,t):Ui(e,r,t)});function Wi(e,t,r){Jr(e,Gt,""),{enter:i=>{e._x_transition.enter.during=i},"enter-start":i=>{e._x_transition.enter.start=i},"enter-end":i=>{e._x_transition.enter.end=i},leave:i=>{e._x_transition.leave.during=i},"leave-start":i=>{e._x_transition.leave.start=i},"leave-end":i=>{e._x_transition.leave.end=i}}[r](t)}function Ui(e,t,r){Jr(e,Ye);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);t.includes("in")&&!n&&(t=t.filter((v,b)=>b<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((v,b)=>b>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,f=l?be(t,"scale",95)/100:1,h=be(t,"delay",0),x=be(t,"origin","center"),N="opacity, transform",E=be(t,"duration",150)/1e3,ce=be(t,"duration",75)/1e3,d="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:x,transitionDelay:h,transitionProperty:N,transitionDuration:`${E}s`,transitionTimingFunction:d},e._x_transition.enter.start={opacity:u,transform:`scale(${f})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:x,transitionDelay:h,transitionProperty:N,transitionDuration:`${ce}s`,transitionTimingFunction:d},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:u,transform:`scale(${f})`})}function Jr(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=()=>{},i=()=>{}){$t(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){$t(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(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):o():e._x_transition?e._x_transition.in(r):o();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=Zr(e);s?(s._x_hideChildren||(s._x_hideChildren=[]),s._x_hideChildren.push(e)):i(()=>{let a=l=>{let u=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([f])=>f());return delete l._x_hidePromise,delete l._x_hideChildren,u};a(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function Zr(e){let t=e.parentNode;if(!!t)return t._x_hidePromise?t:Zr(t)}function $t(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,u;Gi(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),u=t(e,i)},after:s,cleanup(){l(),u()}})}function Gi(e,t){let r,n,i,o=Lt(()=>{A(()=>{r=!0,n||t.before(),i||(t.end(),Mt()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Lt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},A(()=>{t.start(),t.during()}),Hi(),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),A(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{r||(A(()=>{t.end()}),Mt(),setTimeout(e._x_transitioning.finish,s+a),i=!0)})})}function be(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 i=n.match(/([0-9]+)ms/);if(i)return i[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}var Nt=!1;function Je(e,t=()=>{}){return(...r)=>Nt?t(...r):e(...r)}function Xi(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),Nt=!0,Ji(()=>{Yi(t)}),Nt=!1}function Yi(e){let t=!1;U(e,(n,i)=>{oe(n,(o,s)=>{if(t&&Fi(o))return s();t=!0,i(o,s)})})}function Ji(e){let t=Ce;hr((r,n)=>{let i=t(r);return Ue(i),()=>{}}),e(),hr(t)}function Qr(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=ge({})),e._x_bindings[t]=r,t=n.includes("camel")?io(t):t,t){case"value":Zi(e,r);break;case"style":eo(e,r);break;case"class":Qi(e,r);break;default:to(e,t,r);break}}function Zi(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=vr(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=>vr(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")no(e,t);else{if(e.value===t)return;e.value=t}}function Qi(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Gt(e,t)}function eo(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=Ye(e,t)}function to(e,t,r){[null,void 0,!1].includes(r)&&oo(t)?e.removeAttribute(t):(en(t)&&(r=t),ro(e,t,r))}function ro(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function no(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function io(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function vr(e,t){return e==t}function en(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 oo(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function so(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:en(t)?!![t,"true"].includes(n):n}function tn(e,t){var r;return function(){var n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function rn(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function ao(e){e(Re)}var te={},xr=!1;function lo(e,t){if(xr||(te=ge(te),xr=!0),t===void 0)return te[e];te[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&te[e].init(),Rr(te[e])}function uo(){return te}var nn={};function co(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?on(e,r()):nn[e]=r}function fo(e){return Object.entries(nn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function on(e,t,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Pr(i);i=i.map(s=>o.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),zt(e,i,r).map(s=>{n.push(s.runCleanups),s()})}var sn={};function po(e,t){sn[e]=t}function ho(e,t){return Object.entries(sn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var go={get reactive(){return ge},get release(){return Ue},get effect(){return Ce},get raw(){return Er},version:"3.10.5",flushAndStopDeferringMutations:Ai,dontAutoEvaluateFunctions:ki,disableEffectScheduling:gi,setReactivityEngine:mi,closestDataStack:de,skipDuringClone:Je,addRootSelector:Xr,addInitSelector:Yr,addScopeToNode:ke,deferMutations:Si,mapAttributes:Vt,evaluateLater:O,setEvaluator:Oi,mergeProxies:Oe,findClosest:Xe,closestRoot:Ge,interceptor:Mr,transition:$t,setStyles:Ye,mutateDom:A,directive:w,throttle:rn,debounce:tn,evaluate:fe,initTree:U,nextTick:Vr,prefixed:me,prefix:$i,plugin:ao,magic:H,store:lo,start:ji,clone:Xi,bound:so,$data:Or,data:po,bind:co},Re=go;function an(e,t){let r=Object.create(null),n=e.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return t?i=>!!r[i.toLowerCase()]:i=>!!r[i]}var mo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ea=an(mo+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),vo=Object.freeze({}),ta=Object.freeze([]),ln=Object.assign,xo=Object.prototype.hasOwnProperty,Ze=(e,t)=>xo.call(e,t),ne=Array.isArray,Ae=e=>un(e)==="[object Map]",_o=e=>typeof e=="string",Xt=e=>typeof e=="symbol",Qe=e=>e!==null&&typeof e=="object",bo=Object.prototype.toString,un=e=>bo.call(e),cn=e=>un(e).slice(8,-1),Yt=e=>_o(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,et=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},yo=/-(\w)/g,ra=et(e=>e.replace(yo,(t,r)=>r?r.toUpperCase():"")),Eo=/\B([A-Z])/g,na=et(e=>e.replace(Eo,"-$1").toLowerCase()),fn=et(e=>e.charAt(0).toUpperCase()+e.slice(1)),ia=et(e=>e?`on${fn(e)}`:""),dn=(e,t)=>e!==t&&(e===e||t===t),It=new WeakMap,ye=[],q,ie=Symbol("iterate"),Pt=Symbol("Map key iterate");function wo(e){return e&&e._isEffect===!0}function So(e,t=vo){wo(e)&&(e=e.raw);let r=Co(e,t);return t.lazy||r(),r}function Ao(e){e.active&&(pn(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var To=0;function Co(e,t){let r=function(){if(!r.active)return e();if(!ye.includes(r)){pn(r);try{return Oo(),ye.push(r),q=r,e()}finally{ye.pop(),hn(),q=ye[ye.length-1]}}};return r.id=To++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function pn(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var he=!0,Jt=[];function ko(){Jt.push(he),he=!1}function Oo(){Jt.push(he),he=!0}function hn(){let e=Jt.pop();he=e===void 0?!0:e}function D(e,t,r){if(!he||q===void 0)return;let n=It.get(e);n||It.set(e,n=new Map);let i=n.get(r);i||n.set(r,i=new Set),i.has(q)||(i.add(q),q.deps.push(i),q.options.onTrack&&q.options.onTrack({effect:q,target:e,type:t,key:r}))}function G(e,t,r,n,i,o){let s=It.get(e);if(!s)return;let a=new Set,l=f=>{f&&f.forEach(h=>{(h!==q||h.allowRecurse)&&a.add(h)})};if(t==="clear")s.forEach(l);else if(r==="length"&&ne(e))s.forEach((f,h)=>{(h==="length"||h>=n)&&l(f)});else switch(r!==void 0&&l(s.get(r)),t){case"add":ne(e)?Yt(r)&&l(s.get("length")):(l(s.get(ie)),Ae(e)&&l(s.get(Pt)));break;case"delete":ne(e)||(l(s.get(ie)),Ae(e)&&l(s.get(Pt)));break;case"set":Ae(e)&&l(s.get(ie));break}let u=f=>{f.options.onTrigger&&f.options.onTrigger({effect:f,target:e,key:r,type:t,newValue:n,oldValue:i,oldTarget:o}),f.options.scheduler?f.options.scheduler(f):f()};a.forEach(u)}var Ro=an("__proto__,__v_isRef,__isVue"),gn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Xt)),Mo=tt(),Lo=tt(!1,!0),$o=tt(!0),No=tt(!0,!0),We={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];We[e]=function(...r){let n=_(this);for(let o=0,s=this.length;o<s;o++)D(n,"get",o+"");let i=t.apply(n,r);return i===-1||i===!1?t.apply(n,r.map(_)):i}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];We[e]=function(...r){ko();let n=t.apply(this,r);return hn(),n}});function tt(e=!1,t=!1){return function(n,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_raw"&&o===(e?t?zo:On:t?qo:kn).get(n))return n;let s=ne(n);if(!e&&s&&Ze(We,i))return Reflect.get(We,i,o);let a=Reflect.get(n,i,o);return(Xt(i)?gn.has(i):Ro(i))||(e||D(n,"get",i),t)?a:Dt(a)?!s||!Yt(i)?a.value:a:Qe(a)?e?Rn(a):tr(a):a}}var Io=mn(),Po=mn(!0);function mn(e=!1){return function(r,n,i,o){let s=r[n];if(!e&&(i=_(i),s=_(s),!ne(r)&&Dt(s)&&!Dt(i)))return s.value=i,!0;let a=ne(r)&&Yt(n)?Number(n)<r.length:Ze(r,n),l=Reflect.set(r,n,i,o);return r===_(o)&&(a?dn(i,s)&&G(r,"set",n,i,s):G(r,"add",n,i)),l}}function Do(e,t){let r=Ze(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&G(e,"delete",t,void 0,n),i}function Ho(e,t){let r=Reflect.has(e,t);return(!Xt(t)||!gn.has(t))&&D(e,"has",t),r}function jo(e){return D(e,"iterate",ne(e)?"length":ie),Reflect.ownKeys(e)}var vn={get:Mo,set:Io,deleteProperty:Do,has:Ho,ownKeys:jo},xn={get:$o,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}},oa=ln({},vn,{get:Lo,set:Po}),sa=ln({},xn,{get:No}),Zt=e=>Qe(e)?tr(e):e,Qt=e=>Qe(e)?Rn(e):e,er=e=>e,rt=e=>Reflect.getPrototypeOf(e);function nt(e,t,r=!1,n=!1){e=e.__v_raw;let i=_(e),o=_(t);t!==o&&!r&&D(i,"get",t),!r&&D(i,"get",o);let{has:s}=rt(i),a=n?er:r?Qt:Zt;if(s.call(i,t))return a(e.get(t));if(s.call(i,o))return a(e.get(o));e!==i&&e.get(t)}function it(e,t=!1){let r=this.__v_raw,n=_(r),i=_(e);return e!==i&&!t&&D(n,"has",e),!t&&D(n,"has",i),e===i?r.has(e):r.has(e)||r.has(i)}function ot(e,t=!1){return e=e.__v_raw,!t&&D(_(e),"iterate",ie),Reflect.get(e,"size",e)}function _n(e){e=_(e);let t=_(this);return rt(t).has.call(t,e)||(t.add(e),G(t,"add",e,e)),this}function bn(e,t){t=_(t);let r=_(this),{has:n,get:i}=rt(r),o=n.call(r,e);o?Cn(r,n,e):(e=_(e),o=n.call(r,e));let s=i.call(r,e);return r.set(e,t),o?dn(t,s)&&G(r,"set",e,t,s):G(r,"add",e,t),this}function yn(e){let t=_(this),{has:r,get:n}=rt(t),i=r.call(t,e);i?Cn(t,r,e):(e=_(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,s=t.delete(e);return i&&G(t,"delete",e,void 0,o),s}function En(){let e=_(this),t=e.size!==0,r=Ae(e)?new Map(e):new Set(e),n=e.clear();return t&&G(e,"clear",void 0,void 0,r),n}function st(e,t){return function(n,i){let o=this,s=o.__v_raw,a=_(s),l=t?er:e?Qt:Zt;return!e&&D(a,"iterate",ie),s.forEach((u,f)=>n.call(i,l(u),l(f),o))}}function Be(e,t,r){return function(...n){let i=this.__v_raw,o=_(i),s=Ae(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,u=i[e](...n),f=r?er:t?Qt:Zt;return!t&&D(o,"iterate",l?Pt:ie),{next(){let{value:h,done:x}=u.next();return x?{value:h,done:x}:{value:a?[f(h[0]),f(h[1])]:f(h),done:x}},[Symbol.iterator](){return this}}}}function W(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${fn(e)} operation ${r}failed: target is readonly.`,_(this))}return e==="delete"?!1:this}}var wn={get(e){return nt(this,e)},get size(){return ot(this)},has:it,add:_n,set:bn,delete:yn,clear:En,forEach:st(!1,!1)},Sn={get(e){return nt(this,e,!1,!0)},get size(){return ot(this)},has:it,add:_n,set:bn,delete:yn,clear:En,forEach:st(!1,!0)},An={get(e){return nt(this,e,!0)},get size(){return ot(this,!0)},has(e){return it.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:st(!0,!1)},Tn={get(e){return nt(this,e,!0,!0)},get size(){return ot(this,!0)},has(e){return it.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:st(!0,!0)},Fo=["keys","values","entries",Symbol.iterator];Fo.forEach(e=>{wn[e]=Be(e,!1,!1),An[e]=Be(e,!0,!1),Sn[e]=Be(e,!1,!0),Tn[e]=Be(e,!0,!0)});function at(e,t){let r=t?e?Tn:Sn:e?An:wn;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(Ze(r,i)&&i in n?r:n,i,o)}var Ko={get:at(!1,!1)},aa={get:at(!1,!0)},Bo={get:at(!0,!1)},la={get:at(!0,!0)};function Cn(e,t,r){let n=_(r);if(n!==r&&t.call(e,n)){let i=cn(e);console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="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 kn=new WeakMap,qo=new WeakMap,On=new WeakMap,zo=new WeakMap;function Vo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Wo(e){return e.__v_skip||!Object.isExtensible(e)?0:Vo(cn(e))}function tr(e){return e&&e.__v_isReadonly?e:Mn(e,!1,vn,Ko,kn)}function Rn(e){return Mn(e,!0,xn,Bo,On)}function Mn(e,t,r,n,i){if(!Qe(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;let o=i.get(e);if(o)return o;let s=Wo(e);if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function _(e){return e&&_(e.__v_raw)||e}function Dt(e){return Boolean(e&&e.__v_isRef===!0)}H("nextTick",()=>Vr);H("dispatch",e=>Se.bind(Se,e));H("watch",(e,{evaluateLater:t,effect:r})=>(n,i)=>{let o=t(n),s=!0,a,l=r(()=>o(u=>{JSON.stringify(u),s?a=u:queueMicrotask(()=>{i(u,a),a=u}),s=!1}));e._x_effects.delete(l)});H("store",uo);H("data",e=>Or(e));H("root",e=>Ge(e));H("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Oe(Uo(e))),e._x_refs_proxy));function Uo(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var yt={};function Ln(e){return yt[e]||(yt[e]=0),++yt[e]}function Go(e,t){return Xe(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function Xo(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Ln(t))}H("id",e=>(t,r=null)=>{let n=Go(e,t),i=n?n._x_ids[t]:Ln(t);return r?`${t}-${i}-${r}`:`${t}-${i}`});H("el",e=>e);$n("Focus","focus","focus");$n("Persist","persist","persist");function $n(e,t,r){H(t,n=>pe(`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 i=n(t),o=()=>{let u;return i(f=>u=f),u},s=n(`${t} = __placeholder`),a=u=>s(()=>{},{scope:{__placeholder:u}}),l=o();a(l),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let u=e._x_model.get,f=e._x_model.set;r(()=>a(u())),r(()=>f(o()))})});w("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&pe("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||pe(`Cannot find x-teleport element for selector: "${t}"`);let i=e.content.cloneNode(!0).firstElementChild;e._x_teleport=i,i._x_teleportBack=e,e._x_forwardEvents&&e._x_forwardEvents.forEach(o=>{i.addEventListener(o,s=>{s.stopPropagation(),e.dispatchEvent(new s.constructor(s.type,s))})}),ke(i,{},e),A(()=>{n.appendChild(i),U(i),i._x_ignore=!0}),r(()=>i.remove())});var Nn=()=>{};Nn.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",Nn);w("effect",(e,{expression:t},{effect:r})=>r(O(e,t)));function In(e,t,r,n){let i=e,o=l=>n(l),s={},a=(l,u)=>f=>u(l,f);if(r.includes("dot")&&(t=Yo(t)),r.includes("camel")&&(t=Jo(t)),r.includes("passive")&&(s.passive=!0),r.includes("capture")&&(s.capture=!0),r.includes("window")&&(i=window),r.includes("document")&&(i=document),r.includes("prevent")&&(o=a(o,(l,u)=>{u.preventDefault(),l(u)})),r.includes("stop")&&(o=a(o,(l,u)=>{u.stopPropagation(),l(u)})),r.includes("self")&&(o=a(o,(l,u)=>{u.target===e&&l(u)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=a(o,(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")&&(o=a(o,(l,u)=>{l(u),i.removeEventListener(t,o,s)})),o=a(o,(l,u)=>{Qo(t)&&es(u,r)||l(u)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",u=Ht(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=tn(o,u)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",u=Ht(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=rn(o,u)}return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Yo(e){return e.replace(/-/g,".")}function Jo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ht(e){return!Array.isArray(e)&&!isNaN(e)}function Zo(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Qo(e){return["keydown","keyup"].includes(e)}function es(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,Ht((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 i=["ctrl","shift","alt","meta","cmd","super"].filter(o=>r.includes(o));return r=r.filter(o=>!i.includes(o)),!(i.length>0&&i.filter(s=>((s==="cmd"||s==="super")&&(s="meta"),e[`${s}Key`])).length===i.length&&_r(e.key).includes(r[0]))}function _r(e){if(!e)return[];e=Zo(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:i})=>{let o=O(e,r),s=`${r} = rightSideOfExpression($event, ${r})`,a=O(e,s);var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let u=ts(e,t,r),f=In(e,l,t,x=>{a(()=>{},{scope:{$event:x,rightSideOfExpression:u}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=f,i(()=>e._x_removeModelListeners.default());let h=O(e,`${r} = __placeholder`);e._x_model={get(){let x;return o(N=>x=N),x},set(x){h(()=>{},{scope:{__placeholder:x}})}},e._x_forceModelUpdate=()=>{o(x=>{x===void 0&&r.match(/\./)&&(x=""),window.fromModel=!0,A(()=>Qr(e,"value",x)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function ts(e,t,r){return e.type==="radio"&&A(()=>{e.hasAttribute("name")||e.setAttribute("name",r)}),(n,i)=>A(()=>{if(n instanceof CustomEvent&&n.detail!==void 0)return n.detail||n.target.value;if(e.type==="checkbox")if(Array.isArray(i)){let o=t.includes("number")?Et(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(s=>!rs(s,o))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(o=>{let s=o.value||o.text;return Et(s)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?Et(o):t.includes("trim")?o.trim():o}}})}function Et(e){let t=e?parseFloat(e):null;return ns(t)?t:e}function rs(e,t){return e==t}function ns(e){return!Array.isArray(e)&&!isNaN(e)}w("cloak",e=>queueMicrotask(()=>A(()=>e.removeAttribute(me("cloak")))));Yr(()=>`[${me("init")}]`);w("init",Je((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 i=n(t);r(()=>{i(o=>{A(()=>{e.textContent=o})})})});w("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{A(()=>{e.innerHTML=o,e._x_ignoreSelf=!0,U(e),delete e._x_ignoreSelf})})})});Vt(jr(":",Fr(me("bind:"))));w("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let a={};fo(a),O(e,n)(u=>{on(e,u,i)},{scope:a});return}if(t==="key")return is(e,n);let s=O(e,n);o(()=>s(a=>{a===void 0&&typeof n=="string"&&n.match(/\./)&&(a=""),A(()=>Qr(e,t,a,r))}))});function is(e,t){e._x_keyExpression=t}Xr(()=>`[${me("data")}]`);w("data",Je((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};Ct(n,e);let i={};ho(i,n);let o=fe(e,t,{scope:i});o===void 0&&(o={}),Ct(o,e);let s=ge(o);Rr(s);let a=ke(e,s);s.init&&fe(e,s.init),r(()=>{s.destroy&&fe(e,s.destroy),a()})}));w("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=O(e,r);e._x_doHide||(e._x_doHide=()=>{A(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{A(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=Lt(h=>h?s():o(),h=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,h,s,o):h?a():o()}),u,f=!0;n(()=>i(h=>{!f&&h===u||(t.includes("immediate")&&(h?a():o()),l(h),u=h,f=!1)}))});w("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=ss(t),o=O(e,i.items),s=O(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>os(e,i,o,s)),n(()=>{Object.values(e._x_lookup).forEach(a=>a.remove()),delete e._x_prevKeys,delete e._x_lookup})});function os(e,t,r,n){let i=s=>typeof s=="object"&&!Array.isArray(s),o=e;r(s=>{as(s)&&s>=0&&(s=Array.from(Array(s).keys(),d=>d+1)),s===void 0&&(s=[]);let a=e._x_lookup,l=e._x_prevKeys,u=[],f=[];if(i(s))s=Object.entries(s).map(([d,v])=>{let b=br(t,v,d,s);n(C=>f.push(C),{scope:{index:d,...b}}),u.push(b)});else for(let d=0;d<s.length;d++){let v=br(t,s[d],d,s);n(b=>f.push(b),{scope:{index:d,...v}}),u.push(v)}let h=[],x=[],N=[],E=[];for(let d=0;d<l.length;d++){let v=l[d];f.indexOf(v)===-1&&N.push(v)}l=l.filter(d=>!N.includes(d));let ce="template";for(let d=0;d<f.length;d++){let v=f[d],b=l.indexOf(v);if(b===-1)l.splice(d,0,v),h.push([ce,d]);else if(b!==d){let C=l.splice(d,1)[0],R=l.splice(b-1,1)[0];l.splice(d,0,R),l.splice(b,0,C),x.push([C,R])}else E.push(v);ce=v}for(let d=0;d<N.length;d++){let v=N[d];a[v]._x_effects&&a[v]._x_effects.forEach(yr),a[v].remove(),a[v]=null,delete a[v]}for(let d=0;d<x.length;d++){let[v,b]=x[d],C=a[v],R=a[b],V=document.createElement("div");A(()=>{R.after(V),C.after(R),R._x_currentIfEl&&R.after(R._x_currentIfEl),V.before(C),C._x_currentIfEl&&C.after(C._x_currentIfEl),V.remove()}),gr(R,u[f.indexOf(b)])}for(let d=0;d<h.length;d++){let[v,b]=h[d],C=v==="template"?o:a[v];C._x_currentIfEl&&(C=C._x_currentIfEl);let R=u[b],V=f[b],P=document.importNode(o.content,!0).firstElementChild;ke(P,ge(R),o),A(()=>{C.after(P),U(P)}),typeof V=="object"&&pe("x-for key cannot be an object, it must be a string or an integer",o),a[V]=P}for(let d=0;d<E.length;d++)gr(a[E[d]],u[f.indexOf(E[d])]);o._x_prevKeys=f})}function ss(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(r,"").trim(),a=s.match(t);return a?(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2]&&(o.collection=a[2].trim())):o.item=s,o}function br(e,t,r,n){let i={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(s=>s.trim()).forEach((s,a)=>{i[s]=t[a]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(s=>s.trim()).forEach(s=>{i[s]=t[s]}):i[e.item]=t,e.index&&(i[e.index]=r),e.collection&&(i[e.collection]=n),i}function as(e){return!Array.isArray(e)&&!isNaN(e)}function Pn(){}Pn.inline=(e,{expression:t},{cleanup:r})=>{let n=Ge(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",Pn);w("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=O(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return ke(a,{},e),A(()=>{e.after(a),U(a)}),e._x_currentIfEl=a,e._x_undoIf=()=>{oe(a,l=>{l._x_effects&&l._x_effects.forEach(yr)}),a.remove(),delete e._x_currentIfEl},a},s=()=>{!e._x_undoIf||(e._x_undoIf(),delete e._x_undoIf)};r(()=>i(a=>{a?o():s()})),n(()=>e._x_undoIf&&e._x_undoIf())});w("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach(i=>Xo(e,i))});Vt(jr("@",Fr(me("on:"))));w("on",Je((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?O(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=In(e,t,r,a=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));lt("Collapse","collapse","collapse");lt("Intersect","intersect","intersect");lt("Focus","trap","focus");lt("Mask","mask","mask");function lt(e,t,r){w(t,n=>pe(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}Re.setEvaluator(Nr);Re.setReactivityEngine({reactive:tr,effect:So,release:Ao,raw:_});var ls=Re,rr=ls;var us=class{el=void 0;constructor(e){this.el=e}traversals={first:"firstElementChild",next:"nextElementSibling",parent:"parentElement"};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 T(e){return new us(e)}function cs(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function fs(e){return e.nodeType===3||e.nodeType===8}var Dn=()=>{},Hn=()=>{};async function nr(e,t,r){let n,i,o,s,a,l,u,f,h,x,N;function E(c){if(!!N)return Hn((c||"").replace(`
|
6
|
+
`,"\\n"),n,i),new Promise(p=>Dn=()=>p())}function ce(c={}){let p=I=>I.getAttribute("key"),g=()=>{};a=c.updating||g,l=c.updated||g,u=c.removing||g,f=c.removed||g,h=c.adding||g,x=c.added||g,o=c.key||p,s=c.lookahead||!1,N=c.debug||!1}async function d(c,p){if(v(c,p)){let I=b(c,p);return await E("Swap elements"),I}let g=!1;if(!ve(a,c,p,()=>g=!0)){if(window.Alpine&&ds(c,p,()=>g=!0),fs(p)){await C(c,p),l(c,p);return}g||await R(c,p),l(c,p),await V(c,p)}}function v(c,p){return c.nodeType!=p.nodeType||c.nodeName!=p.nodeName||P(c)!=P(p)}function b(c,p){if(ve(u,c))return;let g=p.cloneNode(!0);ve(h,g)||(T(c).replace(g),f(c),x(g))}async function C(c,p){let g=p.nodeValue;c.nodeValue!==g&&(c.nodeValue=g,await E("Change text node to: "+g))}async function R(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let g=Array.from(c.attributes),I=Array.from(p.attributes);for(let z=g.length-1;z>=0;z--){let K=g[z].name;p.hasAttribute(K)||(c.removeAttribute(K),await E("Remove attribute"))}for(let z=I.length-1;z>=0;z--){let K=I[z].name,y=I[z].value;c.getAttribute(K)!==y&&(c.setAttribute(K,y),await E(`Set [${K}] attribute to: "${y}"`))}}async function V(c,p){let g=c.childNodes,I=p.childNodes,z=fr(I),K=fr(g),y=T(p).nodes().first(),m=T(c).nodes().first(),ee={};for(;y;){let M=P(y),B=P(m);if(!m)if(M&&ee[M]){let L=ee[M];T(c).append(L),m=L,await E("Add element (from key)")}else{let L=li(y,c)||{};await E("Add element: "+(L.outerHTML||L.nodeValue)),y=T(y).nodes().next();continue}if(s){let L=T(y).next(),dr=!1;for(;!dr&&L;)m.isEqualNode(L)&&(dr=!0,m=vt(y,m),B=P(m),await E("Move element (lookahead)")),L=T(L).next()}if(M!==B){if(!M&&B){ee[B]=m,m=vt(y,m),ee[B].remove(),m=T(m).nodes().next(),y=T(y).nodes().next(),await E('No "to" key');continue}if(M&&!B&&K[M]&&(m=T(m).replace(K[M]),await E('No "from" key')),M&&B){ee[B]=m;let L=K[M];if(L)m=T(m).replace(L),await E('Move "from" key');else{ee[B]=m,m=vt(y,m),ee[B].remove(),m=T(m).next(),y=T(y).next(),await E("Swap elements with keys");continue}}}let ui=m&&T(m).nodes().next();await d(m,y),y=y&&T(y).nodes().next(),m=ui}let xt=[];for(;m;)ve(u,m)||xt.push(m),m=T(m).nodes().next();for(;xt.length;){let M=xt.shift();M.remove(),await E("remove el"),f(M)}}function P(c){return c&&c.nodeType===1&&o(c)}function fr(c){let p={};return c.forEach(g=>{let I=P(g);I&&(p[I]=g)}),p}function li(c,p){if(!ve(h,c)){let g=c.cloneNode(!0);return T(p).append(g),x(g),g}return null}function vt(c,p){if(!ve(h,c)){let g=c.cloneNode(!0);return T(p).before(g),x(g),g}return p}return ce(r),n=e,i=cs(t),window.Alpine&&window.Alpine.closestDataStack&&!e._x_dataStack&&(i._x_dataStack=window.Alpine.closestDataStack(e),i._x_dataStack&&window.Alpine.clone(e,i)),await E(),await d(e,i),n=void 0,i=void 0,e}nr.step=()=>Dn();nr.log=e=>{Hn=e};function ve(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 ps(e){e.morph=nr}var jn=ps;rr.plugin(jn);var hs=/INPUT/i,gs=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,ms=/TEXTAREA/i;function vs(e,t,r,n){if(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)return;if(e.tagName.match(ms)||e.tagName.match(hs)&&e.getAttribute("type").match(gs))return n()}function xs(e,t){e.forEach(r=>rr.morph(r,t,{updating:vs}))}var Fn=xs;function _s(e,t,r){if(e.match(/^dispatch(Event)?$/))return pr(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Fn(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 bs(){let e=JSON.parse(this.templateContent.textContent),{id:t,selector:r,receiver:n,method:i,args:o}=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})),_s(i,o,s)}var Kn=bs;function ys(e){e.invoke=Kn}var Bn={initialize:ys};var ir=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token(){return this.element.getAttribute("content")}get busy(){return this.element.dataset.busy==="true"}set busy(t){return this.element.dataset.busy=!!t}},S=new ir;var X={start:"turbo-reflex:start",success:"turbo-reflex:success",finish:"turbo-reflex:finish",abort:"turbo-reflex:abort",clientError:"turbo-reflex:client-error",serverError:"turbo-reflex:server-error"},Y={stateLoad:"turbo-reflex:state-load",stateChange:"turbo-reflex:state-change"},j={...X,...Y};function k(e,t=document,r={},n=!1){try{t=t||document;let i=new CustomEvent(e,{detail:r,cancelable:!1,bubbles:!0});t.dispatchEvent(i)}catch(i){if(n)throw i;k(X.clientError,t,{error:i,...r},!0)}}var or;function ut(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],k(Y.stateChange,S.element,{state:or}),!0},set(n,i,o,s){return n[i]=ut(o,this),k(Y.stateChange,S.element,{state:or}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=ut(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=ut(i,r);return t||(or=r),r}var qn=ut;var sr,se,ct,zn;function Vn(){if(!S.element)return xe();let e=atob(S.element.dataset.state);ct={},se=qn(JSON.parse(e)),sr={...se},delete S.element.dataset.clientStateChange,setTimeout(()=>k(Y.stateLoad,S.element,{state:se}))}function xe(){clearTimeout(zn),zn=setTimeout(Vn,10)}sr||Vn();addEventListener("DOMContentLoaded",xe);addEventListener("load",xe);addEventListener("turbo:load",xe);addEventListener("turbo:frame-load",xe);addEventListener("turbo-reflex:success",xe);addEventListener(Y.stateChange,e=>{ct={};for(let[t,r]of Object.entries(se))sr[t]!==r&&(ct[t]=r);S.element.dataset.clientStateChange=!0,S.element.dataset.state=btoa(JSON.stringify(se))});var ae={events:Y,get current(){return se},get delta(){return ct},get payloadChunks(){return btoa(JSON.stringify(se)).match(/.{1,2000}/g)}};function Es(e){let t="<html",r="</html",n=e.indexOf(t),i=e.lastIndexOf(r);if(n>=0&&i>=0){let o=e.slice(e.indexOf(">",n)+1,i);document.documentElement.innerHTML=o}}function ws(e){document.body.insertAdjacentHTML("beforeend",e)}var le={append:ws,replaceDocument:Es};var ft={};function Ss(e){ft[e.id]=e}function As(e){delete ft[e]}var dt={add:Ss,remove:As,get reflexes(){return[...Object.values(ft)]},get length(){return Object.keys(ft).length}};function Wn(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>k(X.finish,e.target,e.detail),20)}addEventListener(X.serverError,Wn);addEventListener(X.success,Wn);addEventListener(X.finish,e=>dt.remove(e.detail.id),!0);var J={events:X};var ar={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:r}=e.detail;if(S.busy){let n=["text/vnd.turbo-reflex.html",r.headers.Accept];n=n.filter(i=>i&&i.trim().length>0).join(", "),r.headers.Accept=n,r.headers["TurboReflex-Token"]=S.token}ae.payloadChunks.forEach((n,i)=>{r.headers[`TurboReflex-State-${i.toString().padStart(4,"0")}`]=n})});addEventListener("turbo:before-fetch-response",e=>{let t=e.target.closest("turbo-frame"),{fetchResponse:r}=e.detail;if(t&&(ar[t.id]=t.src),r.header("TurboReflex")){if(r.statusCode<200||r.statusCode>399){let n=`Server returned a ${r.statusCode} status code! TurboReflex requires 2XX-3XX status codes.`;k(J.events.clientError,document,{...e.detail,error:n},!0)}r.header("TurboReflex")==="Append"&&(e.preventDefault(),r.responseText.then(n=>le.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboReflexSrc=ar[t.id]||t.src||t.dataset.turboReflexSrc,delete ar[t.id]});var Ts={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",reflexAttribute:"data-turbo-reflex"},F={...Ts};var pt={},Un;function Cs(e,t){pt[e]=t,document.addEventListener(e,Un,!0)}function ks(e){return Object.keys(pt).find(t=>!!pt[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function Os(e,t){return e===ks(t)}var Z={events:pt,register:Cs,isRegisteredForElement:Os,set handler(e){Un=e}};function Rs(e){return e.closest(`[${F.reflexAttribute}]`)}function Ms(e){return e.closest("turbo-frame")}function Ls(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 $s(e){let t=Array.from(e.attributes).reduce((r,n)=>{let i=n.value;return r[n.name]=i,r},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,Ls(e,t),delete t.class,delete t.action,delete t.href,delete t[F.reflexAttribute],delete t[F.frameAttribute],t}var Me={buildAttributePayload:$s,findClosestReflex:Rs,findClosestFrame:Ms};function Ns(e,t={}){t.token=S.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_reflex",r.value=JSON.stringify(t),e.appendChild(r)}var Gn={invokeReflex:Ns};function Is(e,t={}){let r=document.createElement("a");r.href=e;let n=new URL(r);return n.searchParams.set("turbo_reflex",JSON.stringify(t)),n}var _e={build:Is};function Ps(e,t){let r=t.src;t={...t},delete t.src,e.src=_e.build(r,t)}var lr={invokeReflex:Ps};function Ds(e,t={}){let r=t.src;t={...t},delete t.src,delete t.href,e.setAttribute("href",_e.build(r,t))}var Xn={invokeReflex:Ds};function Hs(e){let t=e.target;k(J.events.abort,document,{xhr:t,...e.detail})}function ur(e){let t=e.target;t.getResponseHeader("TurboReflex")==="Append"?le.append(t.responseText):le.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboReflex requires 2XX-3XX status codes.`;k(J.events.clientError,document,{xhr:t,...e.detail,error:r},!0)}function js(e){let t=e.target;if(t.status<200||t.status>399)return ur(e);let r=t.responseText;t.getResponseHeader("TurboReflex")==="Append"?le.append(t.responseText):le.replaceDocument(t.responseText)}function Fs(e){let t=e.src;e={...e},delete e.src;try{let r=new XMLHttpRequest;r.open("GET",_e.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-reflex.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboReflex-Token",S.token),ae.payloadChunks.forEach((n,i)=>r.setRequestHeader(`TurboReflex-State-${i.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",Hs),r.addEventListener("error",ur),r.addEventListener("load",js),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;ur(r,{detail:{message:n}})}}var Yn={invokeReflex:Fs};function cr(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboReflexSrc||location.href}function Ks(e){let t=Me.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,invokeReflex:Gn.invokeReflex}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeReflex:Xn.invokeReflex}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:cr(e,t),invokeReflex:lr.invokeReflex}):(!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:cr(e,t),invokeReflex:lr.invokeReflex}:{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:cr(e),invokeReflex:Yn.invokeReflex}}var Jn={find:Ks};var Le="unknown",Zn={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=>{Zn[Le].includes(t.type)&&console[Le==="debug"?"log":Le](t.type,{target:t.target,detail:t.detail})})});var Qn={get level(){return Le},set level(e){return Object.keys(Zn).includes(e)||(e="unknown"),Le=e}};function Bs(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var ei={v4:Bs};function qs(e){let t,r={};try{if(t=Me.findClosestReflex(e.target),!t||!Z.isRegisteredForElement(e.type,t))return;let n=Jn.find(t);switch(r={id:`reflex-${ei.v4()}`,name:t.dataset.turboReflex,driver:n.name,src:n.src,frameId:n.frame?n.frame.id:null,elementId:t.id.length>0?t.id:null,elementAttributes:Me.buildAttributePayload(t),startedAt:new Date().getTime()},dt.add(r),k(J.events.start,t,r),["frame","window"].includes(n.name)&&e.preventDefault(),S.busy=!0,setTimeout(()=>S.busy=!1,10),n.name){case"method":return n.invokeReflex(t,r);case"form":return n.invokeReflex(t,r);case"frame":return n.invokeReflex(n.frame,r);case"window":return n.invokeReflex(r)}}catch(n){k(J.events.clientError,t,{error:n,...r})}}Z.handler=qs;Z.register("change",[`input[${F.reflexAttribute}]`,`select[${F.reflexAttribute}]`,`textarea[${F.reflexAttribute}]`]);Z.register("submit",[`form[${F.reflexAttribute}]`]);Z.register("click",[`[${F.reflexAttribute}]`]);var kl=self.TurboReflex={logger:Qn,schema:F,registerEventDelegate:Z.register,get eventDelegates(){return{...Z.events}},get events(){return{...j}},get state(){return ae.current},get stateDelta(){return ae.delta}};var ue=class extends HTMLElement{constructor(){super(),this.devtool="unknown",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML="<slot></slot>"}connectedCallback(){this.ensureId(),this.dataset.elementOrigin="hopsoft/reflex_behaviors"}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(){return this.dataset.viewStack?JSON.parse(this.dataset.viewStack):[]}get partial(){return this.viewStack[0]}get coordinates(){let t=this.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:this.offsetWidth,height:this.offsetHeight}}};var $e=class extends ue{};function zs(e){let t=document.createElement("template");return t.innerHTML=e,t}function Ne(e,t){return t=t||document.body,t.appendChild(zs(e).content.cloneNode(!0))}function ht(e,t={}){if(!e)return;let{color:r,offset:n,width:i}=t;r=r||"red",n=n||"0px",i=i||"3px";let{outline:o,outlineOffset:s}=e.style;e.originalStyles=e.originalStyles||{outline:o,outlineOffset:s},e.style.outline=`dotted ${i} ${r}`,e.style.outlineOffset=n,e.dataset.reflexBehaviorsHighlight=!0}function Ie(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.reflexBehaviorsHighlight}}var Pe=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
|
+
<style>${this.stylesheet}</style>
|
8
|
+
<div>
|
9
|
+
<input name="checkbox" type="checkbox">
|
10
|
+
<label for="checkbox"><slot name="label"></slot></label>
|
11
|
+
</div>
|
12
|
+
`}get stylesheet(){return`
|
13
|
+
:host, :host * {
|
14
|
+
cursor: pointer;
|
15
|
+
}
|
16
|
+
|
17
|
+
div {
|
18
|
+
display: flex;
|
19
|
+
position: relative;
|
20
|
+
top: -1px;
|
21
|
+
}
|
22
|
+
|
23
|
+
input:checked + label{
|
24
|
+
font-weight: bold;
|
25
|
+
}
|
26
|
+
|
27
|
+
label {
|
28
|
+
color: indigo;
|
29
|
+
}
|
30
|
+
`}};var De=class extends HTMLElement{constructor(){super(),this.enabledDevtools={},this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.shadowRoot.querySelector("button").addEventListener("click",()=>this.close()),this.addEventListener("change",t=>{let r=t.target,{checked:n,name:i}=r;n?this.enableDevtool(i):this.disableDevtool(i)})}enableDevtool(t){this.enabledDevtools[t]||(this.enabledDevtools[t]=!0,this.dispatchEvent(new CustomEvent("reflex-behaviors:devtool-enable",{bubbles:!0,detail:{name:t}})))}disableDevtool(t){!this.enabledDevtools[t]||(delete this.enabledDevtools[t],this.dispatchEvent(new CustomEvent("reflex-behaviors:devtool-disable",{bubbles:!0,detail:{name:t}})))}close(){this.devtoolElements.forEach(t=>{t.checked&&t.uncheck()}),this.remove()}get devtoolElements(){return this.querySelectorAll('[slot="devtool"]')}get closeElement(){return this.querySelector("button")}get html(){return`
|
31
|
+
<style>${this.stylesheet}</style>
|
32
|
+
<div>
|
33
|
+
<label>ReflexBehaviors</label>
|
34
|
+
<slot name="devtool"></slot>
|
35
|
+
<button>X</button>
|
36
|
+
</div>
|
37
|
+
`}get stylesheet(){return`
|
38
|
+
:host {
|
39
|
+
background-color: lavender;
|
40
|
+
border-radius: 15px;
|
41
|
+
bottom: 20px;
|
42
|
+
display: block;
|
43
|
+
filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));
|
44
|
+
left: 50%;
|
45
|
+
outline-offset: 1px;
|
46
|
+
outline: solid 3px indigo;
|
47
|
+
padding: 5px 10px;
|
48
|
+
position: fixed;
|
49
|
+
transform: translateX(-50%);
|
50
|
+
z-index: 100000;
|
51
|
+
}
|
52
|
+
|
53
|
+
:host, :host * {
|
54
|
+
-webkit-user-select: none;
|
55
|
+
font-family: helvetica, sans-serif;
|
56
|
+
user-select: none;
|
57
|
+
}
|
58
|
+
|
59
|
+
:host:has( input) {
|
60
|
+
outline-color: red;
|
61
|
+
outline-width: 2px;
|
62
|
+
}
|
63
|
+
|
64
|
+
label {
|
65
|
+
color: indigo;
|
66
|
+
opacity: 0.5;
|
67
|
+
}
|
68
|
+
|
69
|
+
div {
|
70
|
+
display: flex;
|
71
|
+
gap: 0 5px;
|
72
|
+
position: relative;
|
73
|
+
}
|
74
|
+
|
75
|
+
button {
|
76
|
+
background-color: thistle;
|
77
|
+
border-radius: 50%;
|
78
|
+
border: none;
|
79
|
+
color: indigo;
|
80
|
+
cursor: pointer;
|
81
|
+
font-size: 10px;
|
82
|
+
height: 18px;
|
83
|
+
line-height: 18px;
|
84
|
+
margin: 0 -5px 0 10px;
|
85
|
+
outline: solid 1px indigo;
|
86
|
+
padding: 0 2px;
|
87
|
+
position: relative;
|
88
|
+
top: 1px;
|
89
|
+
width: 18px;
|
90
|
+
}
|
91
|
+
|
92
|
+
button:hover {
|
93
|
+
outline-width: 2px;
|
94
|
+
}
|
95
|
+
`}};var He=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html}get color(){return this.getAttribute("color")||"darkslategray"}get emphasisColor(){return this.getAttribute("emphasis-color")||"black"}get backgroundColor(){return this.getAttribute("background-color")||"gainsboro"}get position(){return this.getAttribute("position")||"top"}get cssArrow(){switch(this.position){case"bottom":return`transparent transparent ${this.emphasisColor} transparent`;default:return`${this.emphasisColor} transparent transparent transparent;`}}get html(){return`
|
96
|
+
<style>${this.stylesheet}</style>
|
97
|
+
<div role="tooltip">
|
98
|
+
<slot name="title"></slot>
|
99
|
+
<hr>
|
100
|
+
<slot name="normal"></slot>
|
101
|
+
<slot name="emphasis"></slot>
|
102
|
+
</div>
|
103
|
+
`}get stylesheet(){return`
|
104
|
+
:host {
|
105
|
+
display: block;
|
106
|
+
position: absolute;
|
107
|
+
z-index: 10000;
|
108
|
+
}
|
109
|
+
|
110
|
+
* {
|
111
|
+
color: ${this.color}
|
112
|
+
}
|
113
|
+
|
114
|
+
[role="tooltip"] {
|
115
|
+
background-color: ${this.backgroundColor};
|
116
|
+
border-radius: 15px;
|
117
|
+
filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));
|
118
|
+
font-family: monospace;
|
119
|
+
left: 50px;
|
120
|
+
min-height: 30px;
|
121
|
+
min-width: 100px;
|
122
|
+
opacity: 0.9;
|
123
|
+
outline-offset: 1px;
|
124
|
+
outline: solid 3px ${this.emphasisColor};
|
125
|
+
padding: 8px 12px 8px 12px;
|
126
|
+
white-space: nowrap;
|
127
|
+
}
|
128
|
+
|
129
|
+
[role="tooltip"]::after {
|
130
|
+
border-color: ${this.cssArrow};
|
131
|
+
border-style: solid;
|
132
|
+
border-width: 10px;
|
133
|
+
content: "";
|
134
|
+
margin-left: -7px;
|
135
|
+
position: absolute;
|
136
|
+
top: ${this.position==="bottom"?"-21px":"calc(100% + 1px)"};
|
137
|
+
}
|
138
|
+
|
139
|
+
slot[name="title"] {
|
140
|
+
color: ${this.emphasisColor};
|
141
|
+
font-weight: bold;
|
142
|
+
}
|
143
|
+
|
144
|
+
slot[name="emphasis"] {
|
145
|
+
color: ${this.emphasisColor};
|
146
|
+
font-weight: normal;
|
147
|
+
opacity: 0.7;
|
148
|
+
}
|
149
|
+
|
150
|
+
hr {
|
151
|
+
background-color: ${this.emphasisColor};
|
152
|
+
border: none;
|
153
|
+
height: 1px;
|
154
|
+
margin-bottom: 4px;
|
155
|
+
margin-top: 4px;
|
156
|
+
opacity: 0.3;
|
157
|
+
}
|
158
|
+
`}};customElements.define("reflex-behaviors-devtool",Pe);customElements.define("reflex-behaviors-devtool-supervisor",De);customElements.define("reflex-behaviors-devools-tooltip",He);var $;function ri(){ii()||($.close(),$.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-stop",{bubbles:!0})),$=null)}function ni(){gt()||(Ne("<reflex-behaviors-devtool-supervisor></reflex-behaviors-devtool-supervisor>"),$=document.body.querySelector("reflex-behaviors-devtool-supervisor"),$.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-start",{bubbles:!0})))}function Vs(){let e=$?Object.keys($.enabledDevtools):[];ri(),ni(),$.devtoolElements.forEach(t=>{e.includes(t.name)&&t.check()})}function gt(){return!!$}function ii(){return!gt()}var ti;function oi(){clearTimeout(ti),ti=setTimeout(Vs,25)}function mt(){gt()&&oi()}addEventListener("turbo:load",mt);addEventListener("turbo-frame:load",mt);addEventListener("turbo-reflex:success",mt);addEventListener("turbo-reflex:finish",mt);function Ws(e,t){if(!!$)return Ne(`
|
159
|
+
<reflex-behaviors-devtool name="${e}" slot="devtool">
|
160
|
+
<span slot="label">${t}</span>
|
161
|
+
</reflex-behaviors-devtool>
|
162
|
+
`,$)}function Us(e){return $?$.enabledDevtools[e]:!1}var Q={enabled:Us,register:Ws,start:ni,stop:ri,restart:oi,get started(){return gt()},get stopped(){return ii()}};document.addEventListener("reflex-behaviors:devtools-start",()=>Q.register("toggle","toggles<small>(trigger/target)</small>"));var Gs="toggle-trigger-tooltip",Xs="toggle-target-tooltip";function si(e,t,r,n={}){let{backgroundColor:i,color:o,emphaisColor:s,position:a}=n;return o=o||"white",a=a||"top",Ne(`
|
163
|
+
<reflex-behaviors-devools-tooltip id="${e}" position="${a}" background-color="${i}" color="${o}" emphasis-color="${s}">
|
164
|
+
<div slot='title'>${t}</div>
|
165
|
+
${r}
|
166
|
+
</reflex-behaviors-devools-tooltip>
|
167
|
+
`),document.getElementById(e)}var je=class{constructor(t){this.name="toggle",this.reflex=t.dataset.turboReflex,this.trigger=t,this.target=t.target,document.addEventListener("reflex-behaviors:devtool-enable",r=>{let{name:n}=r.detail;n===this.name&&ht(this.trigger,{color:"red",offset:"2px"})}),document.addEventListener("reflex-behaviors:devtool-disable",r=>{let{name:n}=r.detail;n===this.name&&Ie(this.trigger)}),document.addEventListener("click",r=>{r.target.closest("reflex-behaviors-devools-tooltip")||this.hide()})}get enabled(){return Q.enabled(this.name)}show(){if(!this.enabled)return;this.hide(),this.createTriggerTooltip(),this.createTargetTooltip(),ht(this.target,{color:"blue",offset:"-2px"});let t=this.trigger?this.trigger.renderingPartial:null;t=t||(this.target?this.target.renderingPartial:null);let r=this.trigger?this.trigger.renderingElement:null;r=r||(this.target?this.target.renderingElement:null),ht(r,{color:"turquoise",offset:"4px",width:"4px"});let n={rendering:{partial:null,id:null},trigger:{partial:null,id:null},target:{partial:null,id:null}};t&&(n.rendering.partial=t),r&&(n.rendering.id=r.id),this.trigger&&(n.trigger={partial:this.trigger.partial,id:this.trigger.id}),this.target?n.target={partial:this.target.partial,id:this.target.id}:this.trigger&&(n.target.id=`No element matches the targeted DOM id: ${this.trigger.controls}`),console.table(n)}hide(){let t=this.trigger?this.trigger.renderingElement:null;t=t||(this.target?this.target.renderingElement:null),this.destroyTriggerTooltip(),this.destroyTargetTooltip(),Ie(this.target),Ie(t),this.cleanup()}cleanup(){document.querySelectorAll("reflex-behaviors-devools-tooltip").forEach(t=>t.remove()),document.querySelectorAll("[data-reflex-behaviors-highlight]").forEach(t=>{t.tagName.match(/toggle-trigger/i)||Ie(t)})}createTriggerTooltip(){if(!this.trigger)return;let t=`TRIGGER (targets: ${this.trigger.controls})`,r=this.trigger.viewStack.map(s=>this.trigger.sharedViews.includes(s)?`<div slot="emphasis">${s}</div>`:`<div slot="normal">${s}</div>`,this).join("");this.triggerTooltip=si(Gs,t,r,{backgroundColor:"pink",emphaisColor:"darkred"});let n=this.trigger.coordinates,i=Math.ceil(n.top-this.triggerTooltip.offsetHeight-14),o=Math.ceil(n.left-15);this.triggerTooltip.style.top=`${i}px`,this.triggerTooltip.style.left=`${o}px`}destroyTriggerTooltip(){!this.triggerTooltip||(this.triggerTooltip.remove(),delete this.triggerTooltip)}createTargetTooltip(){if(!this.target||!this.target.viewStack)return;let t=`TARGET (id: ${this.target.id})`,r=this.target.viewStack.map(s=>this.trigger.sharedViews.includes(s)?`<div slot="emphasis">${s}</div>`:`<div slot="normal">${s}</div>`,this).join("");this.targetTooltip=si(Xs,t,r,{backgroundColor:"lightskyblue",emphaisColor:"blue",position:"bottom"});let n=this.target.coordinates,i=Math.ceil(n.top+n.height+12),o=Math.ceil(n.left-15);this.targetTooltip.style.top=`${i}px`,this.targetTooltip.style.left=`${o}px`}destroyTargetTooltip(){!this.targetTooltip||(this.targetTooltip.remove(),delete this.targetTooltip)}};var Fe=class extends ue{connectedCallback(){super.connectedCallback();let t=()=>this.devtool.show();document.addEventListener("reflex-behaviors:devtools-start",()=>{this.devtool=new je(this),this.addEventListener("mouseenter",t)}),document.addEventListener("reflex-behaviors:devtools-stop",()=>{this.removeEventListener("mouseenter",t),delete this.devtool}),Q.started&&Q.restart()}collapse(){try{this.target.remove(),this.setAttribute("aria-expanded",!1)}catch(t){console.error("Failed to collapse toggle-trigger target!",t)}}get sharedViews(){if(!this.target)return[];if(!this.target.viewStack)return[];let t=(r,n)=>(this.target.viewStack.includes(n)&&r.push(n),r);return this.viewStack.reduce(t.bind(this),[])}get renderingInfo(){return this.dataset.render?JSON.parse(this.dataset.render):{}}get renderingPartial(){return this.renderingInfo.partial}get renderingElement(){let{id:t}=this.renderingInfo;return t?document.getElementById(t):null}get expanded(){return this.getAttribute("aria-expanded")==="true"}get controls(){return this.getAttribute("aria-controls")}get target(){return document.getElementById(this.controls)}get active(){return this.getAttribute("data-active")==="true"}set active(t){this.setAttribute("data-active",!!t)}};addEventListener(TurboReflex.events.start,e=>e.target.active=!0);addEventListener(TurboReflex.events.success,e=>e.target.active=!1);addEventListener(TurboReflex.events.finish,e=>e.target.active=!1);addEventListener("click",e=>{e.target.tagName.match(/reflex-behaviors-devtool/i)||setTimeout(()=>{let t='toggle-trigger[aria-controls][aria-expanded="true"][data-auto-collapse="true"]';document.querySelectorAll(t).forEach(r=>r.collapse())})});customElements.define("toggle-target",$e);customElements.define("toggle-trigger",Fe);var{restart:Ys,start:Js,stop:Zs}=Q,ai={restart:Ys,start:Js,stop:Zs};Bn.initialize(Turbo.StreamActions);self.ReflexBehaviors={devtools:ai};
|
14
168
|
//# sourceMappingURL=reflex_behaviors.js.map
|