reflex_behaviors 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 790dd6d87320e0be4355b093f9ba0ef6081d57bb278d2631cdd6d861c0fc436e
4
- data.tar.gz: 4435d5d573e59e9bf93dab9e350a4697eb32665a85206e794f39ceadb4310037
3
+ metadata.gz: f83d909d9d0ce0555658314fc52332c764d12fae5e5c075bf652d8de0e03aba7
4
+ data.tar.gz: 8be353c779bd0b26b5119e1b8d6ac2e98dde3012a48a7f88fc7787d035acd76d
5
5
  SHA512:
6
- metadata.gz: c28aa755d9f6c496af602dee7e96a94505523a3d3c9771b9c03bc39ebcf94429900db89246c002978344c8cb683e57af4c15c3b802c1cafd74bf94b74199b7a6
7
- data.tar.gz: 542a5415eca576369f2b95de2a1bcf4f41c2b49b73ab98989f39bb216e8e261f9720312d89c496df2fd56d493e8e98641f6cfe6dc757752bfe231f017dfbcb61
6
+ metadata.gz: b154f5ed49ebf440217d853eb4cf45658fec720168d4ff113d5e4bcf6a30cc68298dee6fab7607ed1f628389fc052e45863fc7741dae741625e1c4e9ed191b46
7
+ data.tar.gz: 33cb1cac6686e7a6788400984e01234f40a86f8555578b2d014294cb26407b8ca98133bfe52f310d6bd498b14aa76d6f4b618121acd58f5988bbf241baaaa62e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- reflex_behaviors (0.0.9)
4
+ reflex_behaviors (0.0.10)
5
5
  rails (>= 6.1)
6
6
  turbo-rails (>= 1.1)
7
7
  turbo_reflex (>= 0.0.30)
@@ -89,7 +89,7 @@ GEM
89
89
  concurrent-ruby (~> 1.0)
90
90
  json (2.6.3)
91
91
  language_server-protocol (3.17.0.2)
92
- loofah (2.19.0)
92
+ loofah (2.19.1)
93
93
  crass (~> 1.0.2)
94
94
  nokogiri (>= 1.5.9)
95
95
  magic_frozen_string_literal (1.2.0)
@@ -149,8 +149,8 @@ GEM
149
149
  rails-dom-testing (2.0.3)
150
150
  activesupport (>= 4.2.0)
151
151
  nokogiri (>= 1.6)
152
- rails-html-sanitizer (1.4.3)
153
- loofah (~> 2.3)
152
+ rails-html-sanitizer (1.4.4)
153
+ loofah (~> 2.19, >= 2.19.1)
154
154
  railties (7.0.4)
155
155
  actionpack (= 7.0.4)
156
156
  activesupport (= 7.0.4)
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-989-47d299.svg" />
7
+ <img alt="Lines of Code" src="https://img.shields.io/badge/loc-1116-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" />
@@ -123,8 +123,8 @@ This example will re-render the `post` partial and toggle the `form` section.
123
123
  <%= tag.div id: dom_id(post) do %>
124
124
  <!-- content -->
125
125
 
126
- <%= toggle_trigger_tag target: dom_id(post, :form),
127
- render: reflex_render(id: dom_id(post), partial: current_partial_path, locals: local_assigns, assigns: { post: @post }) do %>
126
+ <%= toggle_trigger_tag renders: current_partial_path, morphs: dom_id(post),
127
+ controls: dom_id(post, :form), locals: local_assigns, assigns: { post: @post }) do %>
128
128
  <% if toggle_target_collapsed? dom_id(post, :form) %>
129
129
  <%= link_to "Edit Post Inline", request.path %>
130
130
  <% else %>
@@ -142,26 +142,30 @@ This example will re-render the `post` partial and toggle the `form` section.
142
142
 
143
143
  #### Tag Helpers
144
144
 
145
- - `toggle_trigger_tag(target:, render:, auto_collapse: false, disabled: false, aria: {}, data: {}, **kwargs, &block)`
146
-
147
- - `target` - **REQUIRED**, the DOM id of the target
148
- - `render` - **REQUIRED**, a payload that indicates what the reflex should render
149
- - `block` - **REQUIRED**, the block of HTML to render inside the trigger container element
150
- - `disabled` - `[false]`, indicates if the trigger should be disabled
151
- - `aria` - `[{}]`, the desired ARIA payload, sensible defaults are automatically applied
152
- - `data` - `[{}]`, the desired dataset payload, sensible defaults are automatically applied
153
-
154
- - `auto_collapse` - `[false]`, indicates if the toggled content automatically collapses when the user clicks outside
155
- - `remember` - [false], indicates if the toggled state should be remembered across requests
156
-
145
+ - `toggle_trigger_tag`
146
+
147
+ - `renders` - **REQUIRED**, the partial path to render
148
+ - `morphs` - **REQUIRED**, `dom_id` of the partial's outermost containing element
149
+ - `controls` - **REQUIRED**, `dom_id` of the toggle target
150
+ - `assigns` - `{}`, `assigns` required to render the partial i.e. instance variables
151
+ - `locals` - `{}`, `local_assigns` required to render the parital
152
+ - `collapse_selector` - `nil`, CSS selector for other targets to collapse when the target is expanded
153
+ - `focus_selector` - `nil`, CSS selector for the element to focus when the target is expanded
154
+ - `method` - `:toggle`, reflex method to inovke (:show, :hide, :toggle)
155
+ - `disabled` - `false`, disable the trigger
156
+ - `remember` - `false`, remember state between requests
157
157
  - `kwargs` - generic support for additional element attributes like `class` etc.
158
+ - `&block` - a Ruby block that emits the rendered content
158
159
 
159
- - `toggle_target_tag(id, expanded: false, **kwargs, &block)`
160
+ - `toggle_target_tag`
160
161
 
161
- - `id` - **REQUIRED**, the DOM id of the target
162
- - `block` - **REQUIRED**, the block of HTML to render inside the trigger container element
163
- - `expanded` - [false] override that indicates whether or not the target is expanded
162
+ - `id` - **REQUIRED**, the `dom_id` for the element
163
+ - `collapse_on` - `[]`, list of events that trigger collapse
164
+ - `collapse_selector` - `nil`, CSS selector for other targets to collapse when this target is expanded
165
+ - `expanded` - `false`, override to force expansion
166
+ - `focus_selector` - `nil`, CSS selector for the element to focus when content is expanded
164
167
  - `kwargs` - generic support for additional element attributes like `class` etc.
168
+ - `&block` - a Ruby block that emits the rendered content
165
169
 
166
170
  ## Releasing
167
171
 
@@ -1,9 +1,9 @@
1
- function gi(e,t,r={}){let n=new CustomEvent(t,r);e.forEach(i=>i.dispatchEvent(n))}var _r=gi;var Tt=!1,Ot=!1,re=[];function mi(e){vi(e)}function vi(e){re.includes(e)||re.push(e),bi()}function kr(e){let t=re.indexOf(e);t!==-1&&re.splice(t,1)}function bi(){!Ot&&!Tt&&(Tt=!0,queueMicrotask(xi))}function xi(){Tt=!1,Ot=!0;for(let e=0;e<re.length;e++)re[e]();re.length=0,Ot=!1}var ge,Ce,Ge,Cr,kt=!0;function _i(e){kt=!1,e(),kt=!0}function yi(e){ge=e.reactive,Ge=e.release,Ce=t=>e.effect(t,{scheduler:r=>{kt?mi(r):r()}}),Cr=e.raw}function yr(e){Ce=e}function Ei(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),Ge(i))},i},()=>{t()}]}var Rr=[],Lr=[],Mr=[];function wi(e){Mr.push(e)}function $r(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Lr.push(t))}function Si(e){Rr.push(e)}function Ai(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function Nr(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 Bt=new MutationObserver(Wt),qt=!1;function Pr(){Bt.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),qt=!0}function Ti(){Oi(),Bt.disconnect(),qt=!1}var Ae=[],Et=!1;function Oi(){Ae=Ae.concat(Bt.takeRecords()),Ae.length&&!Et&&(Et=!0,queueMicrotask(()=>{ki(),Et=!1}))}function ki(){Wt(Ae),Ae.length=0}function A(e){if(!qt)return e();Ti();let t=e();return Pr(),t}var zt=!1,We=[];function Ci(){zt=!0}function Ri(){zt=!1,Wt(We),We=[]}function Wt(e){if(zt){We=We.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)})},d=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&l===null?u():s.hasAttribute(a)?(d(),u()):d()}i.forEach((o,s)=>{Nr(s,o)}),n.forEach((o,s)=>{Rr.forEach(a=>a(s,o))});for(let o of r)if(!t.includes(o)&&(Lr.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,Mr.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 Dr(e){return Le(fe(e))}function Re(e,t,r){return e._x_dataStack=[t,...fe(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function Er(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function fe(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?fe(e.host):e.parentNode?fe(e.parentNode):[]}function Le(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 Ir(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 Hr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>Li(n,i),s=>Ct(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 Li(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function Ct(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]]={}),Ct(e[t[0]],t.slice(1),r)}}var jr={};function H(e,t){jr[e]=t}function Rt(e,t){return Object.entries(jr).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){let[i,o]=Wr(t);return i={interceptor:Hr,...i},$r(t,o),n(t,i)},enumerable:!1})}),e}function Mi(e,t,r,...n){try{return r(...n)}catch(i){ke(i,e,t)}}function ke(e,t,r=void 0){Object.assign(e,{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
1
+ function mi(e,t,r={}){let n=new CustomEvent(t,r);e.forEach(i=>i.dispatchEvent(n))}var _r=mi;var Tt=!1,Ot=!1,re=[];function gi(e){vi(e)}function vi(e){re.includes(e)||re.push(e),bi()}function kr(e){let t=re.indexOf(e);t!==-1&&re.splice(t,1)}function bi(){!Ot&&!Tt&&(Tt=!0,queueMicrotask(xi))}function xi(){Tt=!1,Ot=!0;for(let e=0;e<re.length;e++)re[e]();re.length=0,Ot=!1}var me,Ce,Ge,Cr,kt=!0;function _i(e){kt=!1,e(),kt=!0}function yi(e){me=e.reactive,Ge=e.release,Ce=t=>e.effect(t,{scheduler:r=>{kt?gi(r):r()}}),Cr=e.raw}function yr(e){Ce=e}function Ei(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),Ge(i))},i},()=>{t()}]}var Lr=[],Rr=[],Mr=[];function wi(e){Mr.push(e)}function $r(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Rr.push(t))}function Si(e){Lr.push(e)}function Ai(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function Nr(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 Bt=new MutationObserver(Vt),qt=!1;function Dr(){Bt.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),qt=!0}function Ti(){Oi(),Bt.disconnect(),qt=!1}var Ae=[],Et=!1;function Oi(){Ae=Ae.concat(Bt.takeRecords()),Ae.length&&!Et&&(Et=!0,queueMicrotask(()=>{ki(),Et=!1}))}function ki(){Vt(Ae),Ae.length=0}function A(e){if(!qt)return e();Ti();let t=e();return Dr(),t}var zt=!1,Ve=[];function Ci(){zt=!0}function Li(){zt=!1,Vt(Ve),Ve=[]}function Vt(e){if(zt){Ve=Ve.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)})},d=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&l===null?u():s.hasAttribute(a)?(d(),u()):d()}i.forEach((o,s)=>{Nr(s,o)}),n.forEach((o,s)=>{Lr.forEach(a=>a(s,o))});for(let o of r)if(!t.includes(o)&&(Rr.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,Mr.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 Pr(e){return Re(fe(e))}function Le(e,t,r){return e._x_dataStack=[t,...fe(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function Er(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function fe(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?fe(e.host):e.parentNode?fe(e.parentNode):[]}function Re(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 Ir(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 Hr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>Ri(n,i),s=>Ct(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 Ri(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function Ct(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]]={}),Ct(e[t[0]],t.slice(1),r)}}var jr={};function H(e,t){jr[e]=t}function Lt(e,t){return Object.entries(jr).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){let[i,o]=Vr(t);return i={interceptor:Hr,...i},$r(t,o),n(t,i)},enumerable:!1})}),e}function Mi(e,t,r,...n){try{return r(...n)}catch(i){ke(i,e,t)}}function ke(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 ze=!0;function $i(e){let t=ze;ze=!1,e(),ze=t}function de(e,t,r={}){let n;return C(e,t)(i=>n=i,r),n}function C(...e){return Fr(...e)}var Fr=Kr;function Ni(e){Fr=e}function Kr(e,t){let r={};Rt(r,e);let n=[r,...fe(e)];if(typeof t=="function")return Pi(n,t);let i=Ii(n,t,e);return Mi.bind(null,e,t,i)}function Pi(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Le([n,...e]),i);Ve(r,o)}}var wt={};function Di(e,t){if(wt[e])return wt[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 ke(s,t,e),Promise.resolve()}})();return wt[e]=o,o}function Ii(e,t,r){let n=Di(t,r);return(i=()=>{},{scope:o={},params:s=[]}={})=>{n.result=void 0,n.finished=!1;let a=Le([o,...e]);if(typeof n=="function"){let l=n(n,a).catch(u=>ke(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=>ke(u,r,t)).finally(()=>n.result=void 0)}}}function Ve(e,t,r,n,i){if(ze&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(s=>Ve(e,s,r,n)).catch(s=>ke(s,i,t)):e(o)}else e(t)}var Vt="x-";function me(e=""){return Vt+e}function Hi(e){Vt=e}var Br={};function w(e,t){Br[e]=t}function Ut(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=qr(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(Gr((o,s)=>n[o]=s)).filter(Xr).map(Ki(n,r)).sort(Bi).map(o=>Fi(e,o))}function qr(e){return Array.from(e).map(Gr()).filter(t=>!Xr(t))}var Lt=!1,Se=new Map,zr=Symbol();function ji(e){Lt=!0;let t=Symbol();zr=t,Se.set(t,[]);let r=()=>{for(;Se.get(t).length;)Se.get(t).shift()();Se.delete(t)},n=()=>{Lt=!1,r()};e(r),n()}function Wr(e){let t=[],r=a=>t.push(a),[n,i]=Ei(e);return t.push(i),[{Alpine:Me,effect:n,cleanup:r,evaluateLater:C.bind(C,e),evaluate:de.bind(de,e)},()=>t.forEach(a=>a())]}function Fi(e,t){let r=()=>{},n=Br[t.type]||r,[i,o]=Wr(e);Ai(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),Lt?Se.get(zr).push(n):n())};return s.runCleanups=o,s}var Vr=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Ur=e=>e;function Gr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Jr.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Jr=[];function Gt(e){Jr.push(e)}function Xr({name:e}){return Yr().test(e)}var Yr=()=>new RegExp(`^${Vt}([^:^.]+)\\b`);function Ki(e,t){return({name:r,value:n})=>{let i=r.match(Yr()),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 Mt="DEFAULT",Be=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",Mt,"teleport"];function Bi(e,t){let r=Be.indexOf(e.type)===-1?Mt:e.type,n=Be.indexOf(t.type)===-1?Mt:t.type;return Be.indexOf(r)-Be.indexOf(n)}function Te(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var $t=[],Jt=!1;function Zr(e=()=>{}){return queueMicrotask(()=>{Jt||setTimeout(()=>{Nt()})}),new Promise(t=>{$t.push(()=>{e(),t()})})}function Nt(){for(Jt=!1;$t.length;)$t.shift()()}function qi(){Jt=!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 zi(){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?"),Te(document,"alpine:init"),Te(document,"alpine:initializing"),Pr(),wi(t=>U(t,oe)),$r(t=>Vi(t)),Si((t,r)=>{Ut(t,r).forEach(n=>n())});let e=t=>!Je(t.parentElement,!0);Array.from(document.querySelectorAll(tn())).filter(e).forEach(t=>{U(t)}),Te(document,"alpine:initialized")}var Xt=[],Qr=[];function en(){return Xt.map(e=>e())}function tn(){return Xt.concat(Qr).map(e=>e())}function rn(e){Xt.push(e)}function nn(e){Qr.push(e)}function Je(e,t=!1){return Xe(e,r=>{if((t?tn():en()).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 Wi(e){return en().some(t=>e.matches(t))}function U(e,t=oe){ji(()=>{t(e,(r,n)=>{Ut(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function Vi(e){oe(e,t=>Nr(t))}function Yt(e,t){return Array.isArray(t)?wr(e,t.join(" ")):typeof t=="object"&&t!==null?Ui(e,t):typeof t=="function"?Yt(e,t()):wr(e,t)}function wr(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 Ui(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?Gi(e,t):Ji(e,t)}function Gi(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],n.startsWith("--")||(n=Xi(n)),e.style.setProperty(n,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{Ye(e,r)}}function Ji(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Xi(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Pt(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?Yi(e,n,t):Zi(e,r,t)});function Yi(e,t,r){on(e,Yt,""),{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 Zi(e,t,r){on(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,_)=>_<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((v,_)=>_>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),u=a?0:1,d=l?Ee(t,"scale",95)/100:1,h=Ee(t,"delay",0),b=Ee(t,"origin","center"),N="opacity, transform",E=Ee(t,"duration",150)/1e3,ce=Ee(t,"duration",75)/1e3,f="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:b,transitionDelay:h,transitionProperty:N,transitionDuration:`${E}s`,transitionTimingFunction:f},e._x_transition.enter.start={opacity:u,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:b,transitionDelay:h,transitionProperty:N,transitionDuration:`${ce}s`,transitionTimingFunction:f},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:u,transform:`scale(${d})`})}function on(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=()=>{}){Dt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Dt(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=sn(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(([d])=>d());return delete l._x_hidePromise,delete l._x_hideChildren,u};a(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function sn(e){let t=e.parentNode;if(!!t)return t._x_hidePromise?t:sn(t)}function Dt(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;Qi(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 Qi(e,t){let r,n,i,o=Pt(()=>{A(()=>{r=!0,n||t.before(),i||(t.end(),Nt()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Pt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},A(()=>{t.start(),t.during()}),qi(),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()}),Nt(),setTimeout(e._x_transitioning.finish,s+a),i=!0)})})}function Ee(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 It=!1;function Ze(e,t=()=>{}){return(...r)=>It?t(...r):e(...r)}function eo(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),It=!0,ro(()=>{to(t)}),It=!1}function to(e){let t=!1;U(e,(n,i)=>{oe(n,(o,s)=>{if(t&&Wi(o))return s();t=!0,i(o,s)})})}function ro(e){let t=Ce;yr((r,n)=>{let i=t(r);return Ge(i),()=>{}}),e(),yr(t)}function an(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=ge({})),e._x_bindings[t]=r,t=n.includes("camel")?uo(t):t,t){case"value":no(e,r);break;case"style":oo(e,r);break;case"class":io(e,r);break;default:so(e,t,r);break}}function no(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=Sr(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=>Sr(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")lo(e,t);else{if(e.value===t)return;e.value=t}}function io(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Yt(e,t)}function oo(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=Ye(e,t)}function so(e,t,r){[null,void 0,!1].includes(r)&&co(t)?e.removeAttribute(t):(ln(t)&&(r=t),ao(e,t,r))}function ao(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function lo(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function uo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Sr(e,t){return e==t}function ln(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 co(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function fo(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:ln(t)?!![t,"true"].includes(n):n}function un(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 cn(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function po(e){e(Me)}var te={},Ar=!1;function ho(e,t){if(Ar||(te=ge(te),Ar=!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(),Ir(te[e])}function go(){return te}var dn={};function mo(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?fn(e,r()):dn[e]=r}function vo(e){return Object.entries(dn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function fn(e,t,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=qr(i);i=i.map(s=>o.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),Ut(e,i,r).map(s=>{n.push(s.runCleanups),s()})}var pn={};function bo(e,t){pn[e]=t}function xo(e,t){return Object.entries(pn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var _o={get reactive(){return ge},get release(){return Ge},get effect(){return Ce},get raw(){return Cr},version:"3.10.5",flushAndStopDeferringMutations:Ri,dontAutoEvaluateFunctions:$i,disableEffectScheduling:_i,setReactivityEngine:yi,closestDataStack:fe,skipDuringClone:Ze,addRootSelector:rn,addInitSelector:nn,addScopeToNode:Re,deferMutations:Ci,mapAttributes:Gt,evaluateLater:C,setEvaluator:Ni,mergeProxies:Le,findClosest:Xe,closestRoot:Je,interceptor:Hr,transition:Dt,setStyles:Ye,mutateDom:A,directive:w,throttle:cn,debounce:un,evaluate:de,initTree:U,nextTick:Zr,prefixed:me,prefix:Hi,plugin:po,magic:H,store:ho,start:zi,clone:eo,bound:fo,$data:Dr,data:bo,bind:mo},Me=_o;function hn(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 yo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",sa=hn(yo+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),Eo=Object.freeze({}),aa=Object.freeze([]),gn=Object.assign,wo=Object.prototype.hasOwnProperty,Qe=(e,t)=>wo.call(e,t),ne=Array.isArray,Oe=e=>mn(e)==="[object Map]",So=e=>typeof e=="string",Zt=e=>typeof e=="symbol",et=e=>e!==null&&typeof e=="object",Ao=Object.prototype.toString,mn=e=>Ao.call(e),vn=e=>mn(e).slice(8,-1),Qt=e=>So(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tt=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},To=/-(\w)/g,la=tt(e=>e.replace(To,(t,r)=>r?r.toUpperCase():"")),Oo=/\B([A-Z])/g,ua=tt(e=>e.replace(Oo,"-$1").toLowerCase()),bn=tt(e=>e.charAt(0).toUpperCase()+e.slice(1)),ca=tt(e=>e?`on${bn(e)}`:""),xn=(e,t)=>e!==t&&(e===e||t===t),Ht=new WeakMap,we=[],q,ie=Symbol("iterate"),jt=Symbol("Map key iterate");function ko(e){return e&&e._isEffect===!0}function Co(e,t=Eo){ko(e)&&(e=e.raw);let r=Mo(e,t);return t.lazy||r(),r}function Ro(e){e.active&&(_n(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var Lo=0;function Mo(e,t){let r=function(){if(!r.active)return e();if(!we.includes(r)){_n(r);try{return No(),we.push(r),q=r,e()}finally{we.pop(),yn(),q=we[we.length-1]}}};return r.id=Lo++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function _n(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,er=[];function $o(){er.push(he),he=!1}function No(){er.push(he),he=!0}function yn(){let e=er.pop();he=e===void 0?!0:e}function I(e,t,r){if(!he||q===void 0)return;let n=Ht.get(e);n||Ht.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=Ht.get(e);if(!s)return;let a=new Set,l=d=>{d&&d.forEach(h=>{(h!==q||h.allowRecurse)&&a.add(h)})};if(t==="clear")s.forEach(l);else if(r==="length"&&ne(e))s.forEach((d,h)=>{(h==="length"||h>=n)&&l(d)});else switch(r!==void 0&&l(s.get(r)),t){case"add":ne(e)?Qt(r)&&l(s.get("length")):(l(s.get(ie)),Oe(e)&&l(s.get(jt)));break;case"delete":ne(e)||(l(s.get(ie)),Oe(e)&&l(s.get(jt)));break;case"set":Oe(e)&&l(s.get(ie));break}let u=d=>{d.options.onTrigger&&d.options.onTrigger({effect:d,target:e,key:r,type:t,newValue:n,oldValue:i,oldTarget:o}),d.options.scheduler?d.options.scheduler(d):d()};a.forEach(u)}var Po=hn("__proto__,__v_isRef,__isVue"),En=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Zt)),Do=rt(),Io=rt(!1,!0),Ho=rt(!0),jo=rt(!0,!0),Ue={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];Ue[e]=function(...r){let n=x(this);for(let o=0,s=this.length;o<s;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];Ue[e]=function(...r){$o();let n=t.apply(this,r);return yn(),n}});function rt(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?Jo:Dn:t?Go:Pn).get(n))return n;let s=ne(n);if(!e&&s&&Qe(Ue,i))return Reflect.get(Ue,i,o);let a=Reflect.get(n,i,o);return(Zt(i)?En.has(i):Po(i))||(e||I(n,"get",i),t)?a:Ft(a)?!s||!Qt(i)?a.value:a:et(a)?e?In(a):ir(a):a}}var Fo=wn(),Ko=wn(!0);function wn(e=!1){return function(r,n,i,o){let s=r[n];if(!e&&(i=x(i),s=x(s),!ne(r)&&Ft(s)&&!Ft(i)))return s.value=i,!0;let a=ne(r)&&Qt(n)?Number(n)<r.length:Qe(r,n),l=Reflect.set(r,n,i,o);return r===x(o)&&(a?xn(i,s)&&G(r,"set",n,i,s):G(r,"add",n,i)),l}}function Bo(e,t){let r=Qe(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&G(e,"delete",t,void 0,n),i}function qo(e,t){let r=Reflect.has(e,t);return(!Zt(t)||!En.has(t))&&I(e,"has",t),r}function zo(e){return I(e,"iterate",ne(e)?"length":ie),Reflect.ownKeys(e)}var Sn={get:Do,set:Fo,deleteProperty:Bo,has:qo,ownKeys:zo},An={get:Ho,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}},da=gn({},Sn,{get:Io,set:Ko}),fa=gn({},An,{get:jo}),tr=e=>et(e)?ir(e):e,rr=e=>et(e)?In(e):e,nr=e=>e,nt=e=>Reflect.getPrototypeOf(e);function it(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:s}=nt(i),a=n?nr:r?rr:tr;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 ot(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 st(e,t=!1){return e=e.__v_raw,!t&&I(x(e),"iterate",ie),Reflect.get(e,"size",e)}function Tn(e){e=x(e);let t=x(this);return nt(t).has.call(t,e)||(t.add(e),G(t,"add",e,e)),this}function On(e,t){t=x(t);let r=x(this),{has:n,get:i}=nt(r),o=n.call(r,e);o?Nn(r,n,e):(e=x(e),o=n.call(r,e));let s=i.call(r,e);return r.set(e,t),o?xn(t,s)&&G(r,"set",e,t,s):G(r,"add",e,t),this}function kn(e){let t=x(this),{has:r,get:n}=nt(t),i=r.call(t,e);i?Nn(t,r,e):(e=x(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 Cn(){let e=x(this),t=e.size!==0,r=Oe(e)?new Map(e):new Set(e),n=e.clear();return t&&G(e,"clear",void 0,void 0,r),n}function at(e,t){return function(n,i){let o=this,s=o.__v_raw,a=x(s),l=t?nr:e?rr:tr;return!e&&I(a,"iterate",ie),s.forEach((u,d)=>n.call(i,l(u),l(d),o))}}function qe(e,t,r){return function(...n){let i=this.__v_raw,o=x(i),s=Oe(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,u=i[e](...n),d=r?nr:t?rr:tr;return!t&&I(o,"iterate",l?jt:ie),{next(){let{value:h,done:b}=u.next();return b?{value:h,done:b}:{value:a?[d(h[0]),d(h[1])]:d(h),done:b}},[Symbol.iterator](){return this}}}}function V(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${bn(e)} operation ${r}failed: target is readonly.`,x(this))}return e==="delete"?!1:this}}var Rn={get(e){return it(this,e)},get size(){return st(this)},has:ot,add:Tn,set:On,delete:kn,clear:Cn,forEach:at(!1,!1)},Ln={get(e){return it(this,e,!1,!0)},get size(){return st(this)},has:ot,add:Tn,set:On,delete:kn,clear:Cn,forEach:at(!1,!0)},Mn={get(e){return it(this,e,!0)},get size(){return st(this,!0)},has(e){return ot.call(this,e,!0)},add:V("add"),set:V("set"),delete:V("delete"),clear:V("clear"),forEach:at(!0,!1)},$n={get(e){return it(this,e,!0,!0)},get size(){return st(this,!0)},has(e){return ot.call(this,e,!0)},add:V("add"),set:V("set"),delete:V("delete"),clear:V("clear"),forEach:at(!0,!0)},Wo=["keys","values","entries",Symbol.iterator];Wo.forEach(e=>{Rn[e]=qe(e,!1,!1),Mn[e]=qe(e,!0,!1),Ln[e]=qe(e,!1,!0),$n[e]=qe(e,!0,!0)});function lt(e,t){let r=t?e?$n:Ln:e?Mn:Rn;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(Qe(r,i)&&i in n?r:n,i,o)}var Vo={get:lt(!1,!1)},pa={get:lt(!1,!0)},Uo={get:lt(!0,!1)},ha={get:lt(!0,!0)};function Nn(e,t,r){let n=x(r);if(n!==r&&t.call(e,n)){let i=vn(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 Pn=new WeakMap,Go=new WeakMap,Dn=new WeakMap,Jo=new WeakMap;function Xo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yo(e){return e.__v_skip||!Object.isExtensible(e)?0:Xo(vn(e))}function ir(e){return e&&e.__v_isReadonly?e:Hn(e,!1,Sn,Vo,Pn)}function In(e){return Hn(e,!0,An,Uo,Dn)}function Hn(e,t,r,n,i){if(!et(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=Yo(e);if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function x(e){return e&&x(e.__v_raw)||e}function Ft(e){return Boolean(e&&e.__v_isRef===!0)}H("nextTick",()=>Zr);H("dispatch",e=>Te.bind(Te,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",go);H("data",e=>Dr(e));H("root",e=>Je(e));H("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Le(Zo(e))),e._x_refs_proxy));function Zo(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var St={};function jn(e){return St[e]||(St[e]=0),++St[e]}function Qo(e,t){return Xe(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function es(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=jn(t))}H("id",e=>(t,r=null)=>{let n=Qo(e,t),i=n?n._x_ids[t]:jn(t);return r?`${t}-${i}-${r}`:`${t}-${i}`});H("el",e=>e);Fn("Focus","focus","focus");Fn("Persist","persist","persist");function Fn(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(d=>u=d),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,d=e._x_model.set;r(()=>a(u())),r(()=>d(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))})}),Re(i,{},e),A(()=>{n.appendChild(i),U(i),i._x_ignore=!0}),r(()=>i.remove())});var Kn=()=>{};Kn.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",Kn);w("effect",(e,{expression:t},{effect:r})=>r(C(e,t)));function Bn(e,t,r,n){let i=e,o=l=>n(l),s={},a=(l,u)=>d=>u(l,d);if(r.includes("dot")&&(t=ts(t)),r.includes("camel")&&(t=rs(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)=>{is(t)&&os(u,r)||l(u)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",u=Kt(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=un(o,u)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",u=Kt(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=cn(o,u)}return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function ts(e){return e.replace(/-/g,".")}function rs(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Kt(e){return!Array.isArray(e)&&!isNaN(e)}function ns(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function is(e){return["keydown","keyup"].includes(e)}function os(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,Kt((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&Tr(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&&Tr(e.key).includes(r[0]))}function Tr(e){if(!e)return[];e=ns(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=C(e,r),s=`${r} = rightSideOfExpression($event, ${r})`,a=C(e,s);var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let u=ss(e,t,r),d=Bn(e,l,t,b=>{a(()=>{},{scope:{$event:b,rightSideOfExpression:u}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=d,i(()=>e._x_removeModelListeners.default());let h=C(e,`${r} = __placeholder`);e._x_model={get(){let b;return o(N=>b=N),b},set(b){h(()=>{},{scope:{__placeholder:b}})}},e._x_forceModelUpdate=()=>{o(b=>{b===void 0&&r.match(/\./)&&(b=""),window.fromModel=!0,A(()=>an(e,"value",b)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function ss(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")?At(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(s=>!as(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 At(s)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?At(o):t.includes("trim")?o.trim():o}}})}function At(e){let t=e?parseFloat(e):null;return ls(t)?t:e}function as(e,t){return e==t}function ls(e){return!Array.isArray(e)&&!isNaN(e)}w("cloak",e=>queueMicrotask(()=>A(()=>e.removeAttribute(me("cloak")))));nn(()=>`[${me("init")}]`);w("init",Ze((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})})})});Gt(Vr(":",Ur(me("bind:"))));w("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let a={};vo(a),C(e,n)(u=>{fn(e,u,i)},{scope:a});return}if(t==="key")return us(e,n);let s=C(e,n);o(()=>s(a=>{a===void 0&&typeof n=="string"&&n.match(/\./)&&(a=""),A(()=>an(e,t,a,r))}))});function us(e,t){e._x_keyExpression=t}rn(()=>`[${me("data")}]`);w("data",Ze((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};Rt(n,e);let i={};xo(i,n);let o=de(e,t,{scope:i});o===void 0&&(o={}),Rt(o,e);let s=ge(o);Ir(s);let a=Re(e,s);s.init&&de(e,s.init),r(()=>{s.destroy&&de(e,s.destroy),a()})}));w("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=C(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=Pt(h=>h?s():o(),h=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,h,s,o):h?a():o()}),u,d=!0;n(()=>i(h=>{!d&&h===u||(t.includes("immediate")&&(h?a():o()),l(h),u=h,d=!1)}))});w("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=ds(t),o=C(e,i.items),s=C(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>cs(e,i,o,s)),n(()=>{Object.values(e._x_lookup).forEach(a=>a.remove()),delete e._x_prevKeys,delete e._x_lookup})});function cs(e,t,r,n){let i=s=>typeof s=="object"&&!Array.isArray(s),o=e;r(s=>{fs(s)&&s>=0&&(s=Array.from(Array(s).keys(),f=>f+1)),s===void 0&&(s=[]);let a=e._x_lookup,l=e._x_prevKeys,u=[],d=[];if(i(s))s=Object.entries(s).map(([f,v])=>{let _=Or(t,v,f,s);n(O=>d.push(O),{scope:{index:f,..._}}),u.push(_)});else for(let f=0;f<s.length;f++){let v=Or(t,s[f],f,s);n(_=>d.push(_),{scope:{index:f,...v}}),u.push(v)}let h=[],b=[],N=[],E=[];for(let f=0;f<l.length;f++){let v=l[f];d.indexOf(v)===-1&&N.push(v)}l=l.filter(f=>!N.includes(f));let ce="template";for(let f=0;f<d.length;f++){let v=d[f],_=l.indexOf(v);if(_===-1)l.splice(f,0,v),h.push([ce,f]);else if(_!==f){let O=l.splice(f,1)[0],L=l.splice(_-1,1)[0];l.splice(f,0,L),l.splice(_,0,O),b.push([O,L])}else E.push(v);ce=v}for(let f=0;f<N.length;f++){let v=N[f];a[v]._x_effects&&a[v]._x_effects.forEach(kr),a[v].remove(),a[v]=null,delete a[v]}for(let f=0;f<b.length;f++){let[v,_]=b[f],O=a[v],L=a[_],W=document.createElement("div");A(()=>{L.after(W),O.after(L),L._x_currentIfEl&&L.after(L._x_currentIfEl),W.before(O),O._x_currentIfEl&&O.after(O._x_currentIfEl),W.remove()}),Er(L,u[d.indexOf(_)])}for(let f=0;f<h.length;f++){let[v,_]=h[f],O=v==="template"?o:a[v];O._x_currentIfEl&&(O=O._x_currentIfEl);let L=u[_],W=d[_],D=document.importNode(o.content,!0).firstElementChild;Re(D,ge(L),o),A(()=>{O.after(D),U(D)}),typeof W=="object"&&pe("x-for key cannot be an object, it must be a string or an integer",o),a[W]=D}for(let f=0;f<E.length;f++)Er(a[E[f]],u[d.indexOf(E[f])]);o._x_prevKeys=d})}function ds(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 Or(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 fs(e){return!Array.isArray(e)&&!isNaN(e)}function qn(){}qn.inline=(e,{expression:t},{cleanup:r})=>{let n=Je(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",qn);w("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=C(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Re(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(kr)}),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=>es(e,i))});Gt(Vr("@",Ur(me("on:"))));w("on",Ze((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?C(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=Bn(e,t,r,a=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));ut("Collapse","collapse","collapse");ut("Intersect","intersect","intersect");ut("Focus","trap","focus");ut("Mask","mask","mask");function ut(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))}Me.setEvaluator(Kr);Me.setReactivityEngine({reactive:ir,effect:Co,release:Ro,raw:x});var ps=Me,or=ps;var hs=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 hs(e)}function gs(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function ms(e){return e.nodeType===3||e.nodeType===8}var zn=()=>{},Wn=()=>{};async function sr(e,t,r){let n,i,o,s,a,l,u,d,h,b,N;function E(c){if(!!N)return Wn((c||"").replace(`
6
- `,"\\n"),n,i),new Promise(p=>zn=()=>p())}function ce(c={}){let p=P=>P.getAttribute("key"),g=()=>{};a=c.updating||g,l=c.updated||g,u=c.removing||g,d=c.removed||g,h=c.adding||g,b=c.added||g,o=c.key||p,s=c.lookahead||!1,N=c.debug||!1}async function f(c,p){if(v(c,p)){let P=_(c,p);return await E("Swap elements"),P}let g=!1;if(!ve(a,c,p,()=>g=!0)){if(window.Alpine&&vs(c,p,()=>g=!0),ms(p)){await O(c,p),l(c,p);return}g||await L(c,p),l(c,p),await W(c,p)}}function v(c,p){return c.nodeType!=p.nodeType||c.nodeName!=p.nodeName||D(c)!=D(p)}function _(c,p){if(ve(u,c))return;let g=p.cloneNode(!0);ve(h,g)||(T(c).replace(g),d(c),b(g))}async function O(c,p){let g=p.nodeValue;c.nodeValue!==g&&(c.nodeValue=g,await E("Change text node to: "+g))}async function L(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let g=Array.from(c.attributes),P=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=P.length-1;z>=0;z--){let K=P[z].name,y=P[z].value;c.getAttribute(K)!==y&&(c.setAttribute(K,y),await E(`Set [${K}] attribute to: "${y}"`))}}async function W(c,p){let g=c.childNodes,P=p.childNodes,z=br(P),K=br(g),y=T(p).nodes().first(),m=T(c).nodes().first(),ee={};for(;y;){let M=D(y),B=D(m);if(!m)if(M&&ee[M]){let $=ee[M];T(c).append($),m=$,await E("Add element (from key)")}else{let $=pi(y,c)||{};await E("Add element: "+($.outerHTML||$.nodeValue)),y=T(y).nodes().next();continue}if(s){let $=T(y).next(),xr=!1;for(;!xr&&$;)m.isEqualNode($)&&(xr=!0,m=_t(y,m),B=D(m),await E("Move element (lookahead)")),$=T($).next()}if(M!==B){if(!M&&B){ee[B]=m,m=_t(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 $=K[M];if($)m=T(m).replace($),await E('Move "from" key');else{ee[B]=m,m=_t(y,m),ee[B].remove(),m=T(m).next(),y=T(y).next(),await E("Swap elements with keys");continue}}}let hi=m&&T(m).nodes().next();await f(m,y),y=y&&T(y).nodes().next(),m=hi}let yt=[];for(;m;)ve(u,m)||yt.push(m),m=T(m).nodes().next();for(;yt.length;){let M=yt.shift();M.remove(),await E("remove el"),d(M)}}function D(c){return c&&c.nodeType===1&&o(c)}function br(c){let p={};return c.forEach(g=>{let P=D(g);P&&(p[P]=g)}),p}function pi(c,p){if(!ve(h,c)){let g=c.cloneNode(!0);return T(p).append(g),b(g),g}return null}function _t(c,p){if(!ve(h,c)){let g=c.cloneNode(!0);return T(p).before(g),b(g),g}return p}return ce(r),n=e,i=gs(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 f(e,i),n=void 0,i=void 0,e}sr.step=()=>zn();sr.log=e=>{Wn=e};function ve(e,...t){let r=!1;return e(...t,()=>r=!0),r}function vs(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function bs(e){e.morph=sr}var Vn=bs;or.plugin(Vn);var xs=/INPUT/i,_s=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,ys=/TEXTAREA/i;function Es(e,t,r,n){if(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)return;if(e.tagName.match(ys)||e.tagName.match(xs)&&e.getAttribute("type").match(_s))return n()}function ws(e,t){e.forEach(r=>or.morph(r,t,{updating:Es}))}var Un=ws;function Ss(e,t,r){if(e.match(/^dispatch(Event)?$/))return _r(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Un(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 As(){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})),Ss(i,o,s)}var ar=As;if(!self.Turbo)throw new Error("`Turbo` is not defined! Be sure to import `turbo_ready` after `@hotwired/turbo` or `@hotwired/turbo-rails`.");if(!Turbo.StreamActions)throw new Error("`Turbo.StreamActions` is not defined! Verify that you are running >= `7.2.0` of `@hotwired/turbo`.");Turbo.StreamActions.invoke=ar;self.TurboReady={StreamActions:{invoke:ar}};console.info("TurboReady has initialized and has registered new stream actions with Turbo.");var lr=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 lr;var J={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"},X={stateLoad:"turbo-reflex:state-load",stateChange:"turbo-reflex:state-change"},j={...J,...X};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(J.clientError,t,{error:i,...r},!0)}}var ur;function ct(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],k(X.stateChange,S.element,{state:ur}),!0},set(n,i,o,s){return n[i]=ct(o,this),k(X.stateChange,S.element,{state:ur}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=ct(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=ct(i,r);return t||(ur=r),r}var Gn=ct;var cr,se,dt,Jn;function Xn(){if(!S.element)return be();let e=atob(S.element.dataset.state);dt={},se=Gn(JSON.parse(e)),cr={...se},delete S.element.dataset.clientStateChange,setTimeout(()=>k(X.stateLoad,S.element,{state:se}))}function be(){clearTimeout(Jn),Jn=setTimeout(Xn,10)}cr||Xn();addEventListener("DOMContentLoaded",be);addEventListener("load",be);addEventListener("turbo:load",be);addEventListener("turbo:frame-load",be);addEventListener("turbo-reflex:success",be);addEventListener(X.stateChange,e=>{dt={};for(let[t,r]of Object.entries(se))cr[t]!==r&&(dt[t]=r);S.element.dataset.clientStateChange=!0,S.element.dataset.state=btoa(JSON.stringify(se))});var ae={events:X,get current(){return se},get delta(){return dt},get payloadChunks(){return btoa(JSON.stringify(se)).match(/.{1,2000}/g)}};function Ts(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 Os(e){document.body.insertAdjacentHTML("beforeend",e)}var le={append:Os,replaceDocument:Ts};var ft={};function ks(e){ft[e.id]=e}function Cs(e){delete ft[e]}var pt={add:ks,remove:Cs,get reflexes(){return[...Object.values(ft)]},get length(){return Object.keys(ft).length}};function Yn(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>k(J.finish,e.target,e.detail),20)}addEventListener(J.serverError,Yn);addEventListener(J.success,Yn);addEventListener(J.finish,e=>pt.remove(e.detail.id),!0);var Y={events:J};var dr={};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&&(dr[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(Y.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=dr[t.id]||t.src||t.dataset.turboReflexSrc,delete dr[t.id]});var Rs={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",reflexAttribute:"data-turbo-reflex"},F={...Rs};var ht={},Zn;function Ls(e,t){ht[e]=t,document.addEventListener(e,Zn,!0)}function Ms(e){return Object.keys(ht).find(t=>!!ht[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function $s(e,t){return e===Ms(t)}var Z={events:ht,register:Ls,isRegisteredForElement:$s,set handler(e){Zn=e}};function Ns(e){return e.closest(`[${F.reflexAttribute}]`)}function Ps(e){return e.closest("turbo-frame")}function Ds(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 Is(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,Ds(e,t),delete t.class,delete t.action,delete t.href,delete t[F.reflexAttribute],delete t[F.frameAttribute],t}var $e={buildAttributePayload:Is,findClosestReflex:Ns,findClosestFrame:Ps};function Hs(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 Qn={invokeReflex:Hs};function js(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:js};function Fs(e,t){let r=t.src;t={...t},delete t.src,e.src=xe.build(r,t)}var fr={invokeReflex:Fs};function Ks(e,t={}){let r=t.src;t={...t},delete t.src,delete t.href,e.setAttribute("href",xe.build(r,t))}var ei={invokeReflex:Ks};function Bs(e){let t=e.target;k(Y.events.abort,document,{xhr:t,...e.detail})}function pr(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(Y.events.clientError,document,{xhr:t,...e.detail,error:r},!0)}function qs(e){let t=e.target;if(t.status<200||t.status>399)return pr(e);let r=t.responseText;t.getResponseHeader("TurboReflex")==="Append"?le.append(t.responseText):le.replaceDocument(t.responseText)}function zs(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",S.token),ae.payloadChunks.forEach((n,i)=>r.setRequestHeader(`TurboReflex-State-${i.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",Bs),r.addEventListener("error",pr),r.addEventListener("load",qs),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;pr(r,{detail:{message:n}})}}var ti={invokeReflex:zs};function hr(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboReflexSrc||location.href}function Ws(e){let t=$e.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:Qn.invokeReflex}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeReflex:ei.invokeReflex}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:hr(e,t),invokeReflex:fr.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:hr(e,t),invokeReflex:fr.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:hr(e),invokeReflex:ti.invokeReflex}}var ri={find:Ws};var Ne="unknown",ni={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=>{ni[Ne].includes(t.type)&&console[Ne==="debug"?"log":Ne](t.type,{target:t.target,detail:t.detail})})});var ii={get level(){return Ne},set level(e){return Object.keys(ni).includes(e)||(e="unknown"),Ne=e}};function Vs(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var oi={v4:Vs};function Us(e){let t,r={};try{if(t=$e.findClosestReflex(e.target),!t||!Z.isRegisteredForElement(e.type,t))return;let n=ri.find(t);switch(r={id:`reflex-${oi.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:$e.buildAttributePayload(t),startedAt:new Date().getTime()},pt.add(r),k(Y.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(Y.events.clientError,t,{error:n,...r})}}Z.handler=Us;Z.register("change",[`input[${F.reflexAttribute}]`,`select[${F.reflexAttribute}]`,`textarea[${F.reflexAttribute}]`]);Z.register("submit",[`form[${F.reflexAttribute}]`]);Z.register("click",[`[${F.reflexAttribute}]`]);self.TurboReflex={logger:ii,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 Nl=self.TurboReflex;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]}};var Pe=class extends ue{};function Gs(e){let t=document.createElement("template");return t.innerHTML=e,t}function De(e,t){t=t||document.body;let n=Gs(e).content.cloneNode(!0).querySelector("*");return t.appendChild(n)}function gt(e,t={}){if(!e)return;mt(e);let{outline:r,outlineOffset:n}=t;r=r||"dashed 3px red",n=n||"0px",e.originalStyles=e.originalStyles||{display:e.style.display,minHeight:e.style.minHeight,minWidth:e.style.minWidth,outline:e.style.outline,outlineOffset:e.style.outlineOffset},getComputedStyle(e).display.match(/^inline$/i)&&e.offsetWidth===0&&e.offsetHeight===0&&(e.style.display="inline-block",e.style.minHeight="2px",e.style.minWidth="2px"),e.style.outline=r,e.style.outlineOffset=n,e.dataset.reflexBehaviorsHighlight=!0}function mt(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}}function vt(e){if(!e)return{};let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:e.offsetWidth,height:e.offsetHeight}}var Ie=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`
5
+ `:""}`,t),setTimeout(()=>{throw e},0)}var ze=!0;function $i(e){let t=ze;ze=!1,e(),ze=t}function de(e,t,r={}){let n;return C(e,t)(i=>n=i,r),n}function C(...e){return Fr(...e)}var Fr=Kr;function Ni(e){Fr=e}function Kr(e,t){let r={};Lt(r,e);let n=[r,...fe(e)];if(typeof t=="function")return Di(n,t);let i=Ii(n,t,e);return Mi.bind(null,e,t,i)}function Di(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Re([n,...e]),i);We(r,o)}}var wt={};function Pi(e,t){if(wt[e])return wt[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 ke(s,t,e),Promise.resolve()}})();return wt[e]=o,o}function Ii(e,t,r){let n=Pi(t,r);return(i=()=>{},{scope:o={},params:s=[]}={})=>{n.result=void 0,n.finished=!1;let a=Re([o,...e]);if(typeof n=="function"){let l=n(n,a).catch(u=>ke(u,r,t));n.finished?(We(i,n.result,a,s,r),n.result=void 0):l.then(u=>{We(i,u,a,s,r)}).catch(u=>ke(u,r,t)).finally(()=>n.result=void 0)}}}function We(e,t,r,n,i){if(ze&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(s=>We(e,s,r,n)).catch(s=>ke(s,i,t)):e(o)}else e(t)}var Wt="x-";function ge(e=""){return Wt+e}function Hi(e){Wt=e}var Br={};function w(e,t){Br[e]=t}function Ut(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=qr(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(Gr((o,s)=>n[o]=s)).filter(Xr).map(Ki(n,r)).sort(Bi).map(o=>Fi(e,o))}function qr(e){return Array.from(e).map(Gr()).filter(t=>!Xr(t))}var Rt=!1,Se=new Map,zr=Symbol();function ji(e){Rt=!0;let t=Symbol();zr=t,Se.set(t,[]);let r=()=>{for(;Se.get(t).length;)Se.get(t).shift()();Se.delete(t)},n=()=>{Rt=!1,r()};e(r),n()}function Vr(e){let t=[],r=a=>t.push(a),[n,i]=Ei(e);return t.push(i),[{Alpine:Me,effect:n,cleanup:r,evaluateLater:C.bind(C,e),evaluate:de.bind(de,e)},()=>t.forEach(a=>a())]}function Fi(e,t){let r=()=>{},n=Br[t.type]||r,[i,o]=Vr(e);Ai(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),Rt?Se.get(zr).push(n):n())};return s.runCleanups=o,s}var Wr=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Ur=e=>e;function Gr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Jr.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Jr=[];function Gt(e){Jr.push(e)}function Xr({name:e}){return Yr().test(e)}var Yr=()=>new RegExp(`^${Wt}([^:^.]+)\\b`);function Ki(e,t){return({name:r,value:n})=>{let i=r.match(Yr()),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 Mt="DEFAULT",Be=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",Mt,"teleport"];function Bi(e,t){let r=Be.indexOf(e.type)===-1?Mt:e.type,n=Be.indexOf(t.type)===-1?Mt:t.type;return Be.indexOf(r)-Be.indexOf(n)}function Te(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var $t=[],Jt=!1;function Zr(e=()=>{}){return queueMicrotask(()=>{Jt||setTimeout(()=>{Nt()})}),new Promise(t=>{$t.push(()=>{e(),t()})})}function Nt(){for(Jt=!1;$t.length;)$t.shift()()}function qi(){Jt=!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 he(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function zi(){document.body||he("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),Te(document,"alpine:init"),Te(document,"alpine:initializing"),Dr(),wi(t=>U(t,oe)),$r(t=>Wi(t)),Si((t,r)=>{Ut(t,r).forEach(n=>n())});let e=t=>!Je(t.parentElement,!0);Array.from(document.querySelectorAll(tn())).filter(e).forEach(t=>{U(t)}),Te(document,"alpine:initialized")}var Xt=[],Qr=[];function en(){return Xt.map(e=>e())}function tn(){return Xt.concat(Qr).map(e=>e())}function rn(e){Xt.push(e)}function nn(e){Qr.push(e)}function Je(e,t=!1){return Xe(e,r=>{if((t?tn():en()).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 Vi(e){return en().some(t=>e.matches(t))}function U(e,t=oe){ji(()=>{t(e,(r,n)=>{Ut(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function Wi(e){oe(e,t=>Nr(t))}function Yt(e,t){return Array.isArray(t)?wr(e,t.join(" ")):typeof t=="object"&&t!==null?Ui(e,t):typeof t=="function"?Yt(e,t()):wr(e,t)}function wr(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 Ui(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?Gi(e,t):Ji(e,t)}function Gi(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],n.startsWith("--")||(n=Xi(n)),e.style.setProperty(n,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{Ye(e,r)}}function Ji(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Xi(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Dt(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?Yi(e,n,t):Zi(e,r,t)});function Yi(e,t,r){on(e,Yt,""),{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 Zi(e,t,r){on(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,_)=>_<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((v,_)=>_>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),u=a?0:1,d=l?Ee(t,"scale",95)/100:1,h=Ee(t,"delay",0),b=Ee(t,"origin","center"),N="opacity, transform",E=Ee(t,"duration",150)/1e3,ce=Ee(t,"duration",75)/1e3,f="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:b,transitionDelay:h,transitionProperty:N,transitionDuration:`${E}s`,transitionTimingFunction:f},e._x_transition.enter.start={opacity:u,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:b,transitionDelay:h,transitionProperty:N,transitionDuration:`${ce}s`,transitionTimingFunction:f},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:u,transform:`scale(${d})`})}function on(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=()=>{}){Pt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Pt(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=sn(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(([d])=>d());return delete l._x_hidePromise,delete l._x_hideChildren,u};a(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function sn(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:sn(t)}function Pt(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;Qi(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 Qi(e,t){let r,n,i,o=Dt(()=>{A(()=>{r=!0,n||t.before(),i||(t.end(),Nt()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Dt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},A(()=>{t.start(),t.during()}),qi(),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()}),Nt(),setTimeout(e._x_transitioning.finish,s+a),i=!0)})})}function Ee(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 It=!1;function Ze(e,t=()=>{}){return(...r)=>It?t(...r):e(...r)}function eo(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),It=!0,ro(()=>{to(t)}),It=!1}function to(e){let t=!1;U(e,(n,i)=>{oe(n,(o,s)=>{if(t&&Vi(o))return s();t=!0,i(o,s)})})}function ro(e){let t=Ce;yr((r,n)=>{let i=t(r);return Ge(i),()=>{}}),e(),yr(t)}function an(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=me({})),e._x_bindings[t]=r,t=n.includes("camel")?uo(t):t,t){case"value":no(e,r);break;case"style":oo(e,r);break;case"class":io(e,r);break;default:so(e,t,r);break}}function no(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=Sr(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=>Sr(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")lo(e,t);else{if(e.value===t)return;e.value=t}}function io(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Yt(e,t)}function oo(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=Ye(e,t)}function so(e,t,r){[null,void 0,!1].includes(r)&&co(t)?e.removeAttribute(t):(ln(t)&&(r=t),ao(e,t,r))}function ao(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function lo(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function uo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Sr(e,t){return e==t}function ln(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 co(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function fo(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:ln(t)?!![t,"true"].includes(n):n}function un(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 cn(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function ho(e){e(Me)}var te={},Ar=!1;function po(e,t){if(Ar||(te=me(te),Ar=!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(),Ir(te[e])}function mo(){return te}var dn={};function go(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?fn(e,r()):dn[e]=r}function vo(e){return Object.entries(dn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function fn(e,t,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=qr(i);i=i.map(s=>o.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),Ut(e,i,r).map(s=>{n.push(s.runCleanups),s()})}var hn={};function bo(e,t){hn[e]=t}function xo(e,t){return Object.entries(hn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var _o={get reactive(){return me},get release(){return Ge},get effect(){return Ce},get raw(){return Cr},version:"3.10.5",flushAndStopDeferringMutations:Li,dontAutoEvaluateFunctions:$i,disableEffectScheduling:_i,setReactivityEngine:yi,closestDataStack:fe,skipDuringClone:Ze,addRootSelector:rn,addInitSelector:nn,addScopeToNode:Le,deferMutations:Ci,mapAttributes:Gt,evaluateLater:C,setEvaluator:Ni,mergeProxies:Re,findClosest:Xe,closestRoot:Je,interceptor:Hr,transition:Pt,setStyles:Ye,mutateDom:A,directive:w,throttle:cn,debounce:un,evaluate:de,initTree:U,nextTick:Zr,prefixed:ge,prefix:Hi,plugin:ho,magic:H,store:po,start:zi,clone:eo,bound:fo,$data:Pr,data:bo,bind:go},Me=_o;function pn(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 yo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",sa=pn(yo+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),Eo=Object.freeze({}),aa=Object.freeze([]),mn=Object.assign,wo=Object.prototype.hasOwnProperty,Qe=(e,t)=>wo.call(e,t),ne=Array.isArray,Oe=e=>gn(e)==="[object Map]",So=e=>typeof e=="string",Zt=e=>typeof e=="symbol",et=e=>e!==null&&typeof e=="object",Ao=Object.prototype.toString,gn=e=>Ao.call(e),vn=e=>gn(e).slice(8,-1),Qt=e=>So(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tt=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},To=/-(\w)/g,la=tt(e=>e.replace(To,(t,r)=>r?r.toUpperCase():"")),Oo=/\B([A-Z])/g,ua=tt(e=>e.replace(Oo,"-$1").toLowerCase()),bn=tt(e=>e.charAt(0).toUpperCase()+e.slice(1)),ca=tt(e=>e?`on${bn(e)}`:""),xn=(e,t)=>e!==t&&(e===e||t===t),Ht=new WeakMap,we=[],q,ie=Symbol("iterate"),jt=Symbol("Map key iterate");function ko(e){return e&&e._isEffect===!0}function Co(e,t=Eo){ko(e)&&(e=e.raw);let r=Mo(e,t);return t.lazy||r(),r}function Lo(e){e.active&&(_n(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var Ro=0;function Mo(e,t){let r=function(){if(!r.active)return e();if(!we.includes(r)){_n(r);try{return No(),we.push(r),q=r,e()}finally{we.pop(),yn(),q=we[we.length-1]}}};return r.id=Ro++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function _n(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var pe=!0,er=[];function $o(){er.push(pe),pe=!1}function No(){er.push(pe),pe=!0}function yn(){let e=er.pop();pe=e===void 0?!0:e}function I(e,t,r){if(!pe||q===void 0)return;let n=Ht.get(e);n||Ht.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=Ht.get(e);if(!s)return;let a=new Set,l=d=>{d&&d.forEach(h=>{(h!==q||h.allowRecurse)&&a.add(h)})};if(t==="clear")s.forEach(l);else if(r==="length"&&ne(e))s.forEach((d,h)=>{(h==="length"||h>=n)&&l(d)});else switch(r!==void 0&&l(s.get(r)),t){case"add":ne(e)?Qt(r)&&l(s.get("length")):(l(s.get(ie)),Oe(e)&&l(s.get(jt)));break;case"delete":ne(e)||(l(s.get(ie)),Oe(e)&&l(s.get(jt)));break;case"set":Oe(e)&&l(s.get(ie));break}let u=d=>{d.options.onTrigger&&d.options.onTrigger({effect:d,target:e,key:r,type:t,newValue:n,oldValue:i,oldTarget:o}),d.options.scheduler?d.options.scheduler(d):d()};a.forEach(u)}var Do=pn("__proto__,__v_isRef,__isVue"),En=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Zt)),Po=rt(),Io=rt(!1,!0),Ho=rt(!0),jo=rt(!0,!0),Ue={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];Ue[e]=function(...r){let n=x(this);for(let o=0,s=this.length;o<s;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];Ue[e]=function(...r){$o();let n=t.apply(this,r);return yn(),n}});function rt(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?Jo:Pn:t?Go:Dn).get(n))return n;let s=ne(n);if(!e&&s&&Qe(Ue,i))return Reflect.get(Ue,i,o);let a=Reflect.get(n,i,o);return(Zt(i)?En.has(i):Do(i))||(e||I(n,"get",i),t)?a:Ft(a)?!s||!Qt(i)?a.value:a:et(a)?e?In(a):ir(a):a}}var Fo=wn(),Ko=wn(!0);function wn(e=!1){return function(r,n,i,o){let s=r[n];if(!e&&(i=x(i),s=x(s),!ne(r)&&Ft(s)&&!Ft(i)))return s.value=i,!0;let a=ne(r)&&Qt(n)?Number(n)<r.length:Qe(r,n),l=Reflect.set(r,n,i,o);return r===x(o)&&(a?xn(i,s)&&G(r,"set",n,i,s):G(r,"add",n,i)),l}}function Bo(e,t){let r=Qe(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&G(e,"delete",t,void 0,n),i}function qo(e,t){let r=Reflect.has(e,t);return(!Zt(t)||!En.has(t))&&I(e,"has",t),r}function zo(e){return I(e,"iterate",ne(e)?"length":ie),Reflect.ownKeys(e)}var Sn={get:Po,set:Fo,deleteProperty:Bo,has:qo,ownKeys:zo},An={get:Ho,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}},da=mn({},Sn,{get:Io,set:Ko}),fa=mn({},An,{get:jo}),tr=e=>et(e)?ir(e):e,rr=e=>et(e)?In(e):e,nr=e=>e,nt=e=>Reflect.getPrototypeOf(e);function it(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:s}=nt(i),a=n?nr:r?rr:tr;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 ot(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 st(e,t=!1){return e=e.__v_raw,!t&&I(x(e),"iterate",ie),Reflect.get(e,"size",e)}function Tn(e){e=x(e);let t=x(this);return nt(t).has.call(t,e)||(t.add(e),G(t,"add",e,e)),this}function On(e,t){t=x(t);let r=x(this),{has:n,get:i}=nt(r),o=n.call(r,e);o?Nn(r,n,e):(e=x(e),o=n.call(r,e));let s=i.call(r,e);return r.set(e,t),o?xn(t,s)&&G(r,"set",e,t,s):G(r,"add",e,t),this}function kn(e){let t=x(this),{has:r,get:n}=nt(t),i=r.call(t,e);i?Nn(t,r,e):(e=x(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 Cn(){let e=x(this),t=e.size!==0,r=Oe(e)?new Map(e):new Set(e),n=e.clear();return t&&G(e,"clear",void 0,void 0,r),n}function at(e,t){return function(n,i){let o=this,s=o.__v_raw,a=x(s),l=t?nr:e?rr:tr;return!e&&I(a,"iterate",ie),s.forEach((u,d)=>n.call(i,l(u),l(d),o))}}function qe(e,t,r){return function(...n){let i=this.__v_raw,o=x(i),s=Oe(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,u=i[e](...n),d=r?nr:t?rr:tr;return!t&&I(o,"iterate",l?jt:ie),{next(){let{value:h,done:b}=u.next();return b?{value:h,done:b}:{value:a?[d(h[0]),d(h[1])]:d(h),done:b}},[Symbol.iterator](){return this}}}}function W(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${bn(e)} operation ${r}failed: target is readonly.`,x(this))}return e==="delete"?!1:this}}var Ln={get(e){return it(this,e)},get size(){return st(this)},has:ot,add:Tn,set:On,delete:kn,clear:Cn,forEach:at(!1,!1)},Rn={get(e){return it(this,e,!1,!0)},get size(){return st(this)},has:ot,add:Tn,set:On,delete:kn,clear:Cn,forEach:at(!1,!0)},Mn={get(e){return it(this,e,!0)},get size(){return st(this,!0)},has(e){return ot.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:at(!0,!1)},$n={get(e){return it(this,e,!0,!0)},get size(){return st(this,!0)},has(e){return ot.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:at(!0,!0)},Vo=["keys","values","entries",Symbol.iterator];Vo.forEach(e=>{Ln[e]=qe(e,!1,!1),Mn[e]=qe(e,!0,!1),Rn[e]=qe(e,!1,!0),$n[e]=qe(e,!0,!0)});function lt(e,t){let r=t?e?$n:Rn:e?Mn:Ln;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(Qe(r,i)&&i in n?r:n,i,o)}var Wo={get:lt(!1,!1)},ha={get:lt(!1,!0)},Uo={get:lt(!0,!1)},pa={get:lt(!0,!0)};function Nn(e,t,r){let n=x(r);if(n!==r&&t.call(e,n)){let i=vn(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 Dn=new WeakMap,Go=new WeakMap,Pn=new WeakMap,Jo=new WeakMap;function Xo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yo(e){return e.__v_skip||!Object.isExtensible(e)?0:Xo(vn(e))}function ir(e){return e&&e.__v_isReadonly?e:Hn(e,!1,Sn,Wo,Dn)}function In(e){return Hn(e,!0,An,Uo,Pn)}function Hn(e,t,r,n,i){if(!et(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=Yo(e);if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function x(e){return e&&x(e.__v_raw)||e}function Ft(e){return Boolean(e&&e.__v_isRef===!0)}H("nextTick",()=>Zr);H("dispatch",e=>Te.bind(Te,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",mo);H("data",e=>Pr(e));H("root",e=>Je(e));H("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Re(Zo(e))),e._x_refs_proxy));function Zo(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var St={};function jn(e){return St[e]||(St[e]=0),++St[e]}function Qo(e,t){return Xe(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function es(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=jn(t))}H("id",e=>(t,r=null)=>{let n=Qo(e,t),i=n?n._x_ids[t]:jn(t);return r?`${t}-${i}-${r}`:`${t}-${i}`});H("el",e=>e);Fn("Focus","focus","focus");Fn("Persist","persist","persist");function Fn(e,t,r){H(t,n=>he(`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(d=>u=d),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,d=e._x_model.set;r(()=>a(u())),r(()=>d(o()))})});w("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&he("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||he(`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))})}),Le(i,{},e),A(()=>{n.appendChild(i),U(i),i._x_ignore=!0}),r(()=>i.remove())});var Kn=()=>{};Kn.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",Kn);w("effect",(e,{expression:t},{effect:r})=>r(C(e,t)));function Bn(e,t,r,n){let i=e,o=l=>n(l),s={},a=(l,u)=>d=>u(l,d);if(r.includes("dot")&&(t=ts(t)),r.includes("camel")&&(t=rs(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)=>{is(t)&&os(u,r)||l(u)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",u=Kt(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=un(o,u)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",u=Kt(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=cn(o,u)}return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function ts(e){return e.replace(/-/g,".")}function rs(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Kt(e){return!Array.isArray(e)&&!isNaN(e)}function ns(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function is(e){return["keydown","keyup"].includes(e)}function os(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,Kt((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&Tr(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&&Tr(e.key).includes(r[0]))}function Tr(e){if(!e)return[];e=ns(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=C(e,r),s=`${r} = rightSideOfExpression($event, ${r})`,a=C(e,s);var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let u=ss(e,t,r),d=Bn(e,l,t,b=>{a(()=>{},{scope:{$event:b,rightSideOfExpression:u}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=d,i(()=>e._x_removeModelListeners.default());let h=C(e,`${r} = __placeholder`);e._x_model={get(){let b;return o(N=>b=N),b},set(b){h(()=>{},{scope:{__placeholder:b}})}},e._x_forceModelUpdate=()=>{o(b=>{b===void 0&&r.match(/\./)&&(b=""),window.fromModel=!0,A(()=>an(e,"value",b)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function ss(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")?At(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(s=>!as(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 At(s)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?At(o):t.includes("trim")?o.trim():o}}})}function At(e){let t=e?parseFloat(e):null;return ls(t)?t:e}function as(e,t){return e==t}function ls(e){return!Array.isArray(e)&&!isNaN(e)}w("cloak",e=>queueMicrotask(()=>A(()=>e.removeAttribute(ge("cloak")))));nn(()=>`[${ge("init")}]`);w("init",Ze((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})})})});Gt(Wr(":",Ur(ge("bind:"))));w("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let a={};vo(a),C(e,n)(u=>{fn(e,u,i)},{scope:a});return}if(t==="key")return us(e,n);let s=C(e,n);o(()=>s(a=>{a===void 0&&typeof n=="string"&&n.match(/\./)&&(a=""),A(()=>an(e,t,a,r))}))});function us(e,t){e._x_keyExpression=t}rn(()=>`[${ge("data")}]`);w("data",Ze((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};Lt(n,e);let i={};xo(i,n);let o=de(e,t,{scope:i});o===void 0&&(o={}),Lt(o,e);let s=me(o);Ir(s);let a=Le(e,s);s.init&&de(e,s.init),r(()=>{s.destroy&&de(e,s.destroy),a()})}));w("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=C(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=Dt(h=>h?s():o(),h=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,h,s,o):h?a():o()}),u,d=!0;n(()=>i(h=>{!d&&h===u||(t.includes("immediate")&&(h?a():o()),l(h),u=h,d=!1)}))});w("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=ds(t),o=C(e,i.items),s=C(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>cs(e,i,o,s)),n(()=>{Object.values(e._x_lookup).forEach(a=>a.remove()),delete e._x_prevKeys,delete e._x_lookup})});function cs(e,t,r,n){let i=s=>typeof s=="object"&&!Array.isArray(s),o=e;r(s=>{fs(s)&&s>=0&&(s=Array.from(Array(s).keys(),f=>f+1)),s===void 0&&(s=[]);let a=e._x_lookup,l=e._x_prevKeys,u=[],d=[];if(i(s))s=Object.entries(s).map(([f,v])=>{let _=Or(t,v,f,s);n(O=>d.push(O),{scope:{index:f,..._}}),u.push(_)});else for(let f=0;f<s.length;f++){let v=Or(t,s[f],f,s);n(_=>d.push(_),{scope:{index:f,...v}}),u.push(v)}let h=[],b=[],N=[],E=[];for(let f=0;f<l.length;f++){let v=l[f];d.indexOf(v)===-1&&N.push(v)}l=l.filter(f=>!N.includes(f));let ce="template";for(let f=0;f<d.length;f++){let v=d[f],_=l.indexOf(v);if(_===-1)l.splice(f,0,v),h.push([ce,f]);else if(_!==f){let O=l.splice(f,1)[0],R=l.splice(_-1,1)[0];l.splice(f,0,R),l.splice(_,0,O),b.push([O,R])}else E.push(v);ce=v}for(let f=0;f<N.length;f++){let v=N[f];a[v]._x_effects&&a[v]._x_effects.forEach(kr),a[v].remove(),a[v]=null,delete a[v]}for(let f=0;f<b.length;f++){let[v,_]=b[f],O=a[v],R=a[_],V=document.createElement("div");A(()=>{R.after(V),O.after(R),R._x_currentIfEl&&R.after(R._x_currentIfEl),V.before(O),O._x_currentIfEl&&O.after(O._x_currentIfEl),V.remove()}),Er(R,u[d.indexOf(_)])}for(let f=0;f<h.length;f++){let[v,_]=h[f],O=v==="template"?o:a[v];O._x_currentIfEl&&(O=O._x_currentIfEl);let R=u[_],V=d[_],P=document.importNode(o.content,!0).firstElementChild;Le(P,me(R),o),A(()=>{O.after(P),U(P)}),typeof V=="object"&&he("x-for key cannot be an object, it must be a string or an integer",o),a[V]=P}for(let f=0;f<E.length;f++)Er(a[E[f]],u[d.indexOf(E[f])]);o._x_prevKeys=d})}function ds(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 Or(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 fs(e){return!Array.isArray(e)&&!isNaN(e)}function qn(){}qn.inline=(e,{expression:t},{cleanup:r})=>{let n=Je(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",qn);w("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=C(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Le(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(kr)}),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=>es(e,i))});Gt(Wr("@",Ur(ge("on:"))));w("on",Ze((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?C(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=Bn(e,t,r,a=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));ut("Collapse","collapse","collapse");ut("Intersect","intersect","intersect");ut("Focus","trap","focus");ut("Mask","mask","mask");function ut(e,t,r){w(t,n=>he(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}Me.setEvaluator(Kr);Me.setReactivityEngine({reactive:ir,effect:Co,release:Lo,raw:x});var hs=Me,or=hs;var ps=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 ps(e)}function ms(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function gs(e){return e.nodeType===3||e.nodeType===8}var zn=()=>{},Vn=()=>{};async function sr(e,t,r){let n,i,o,s,a,l,u,d,h,b,N;function E(c){if(N)return Vn((c||"").replace(`
6
+ `,"\\n"),n,i),new Promise(p=>zn=()=>p())}function ce(c={}){let p=D=>D.getAttribute("key"),m=()=>{};a=c.updating||m,l=c.updated||m,u=c.removing||m,d=c.removed||m,h=c.adding||m,b=c.added||m,o=c.key||p,s=c.lookahead||!1,N=c.debug||!1}async function f(c,p){if(v(c,p)){let D=_(c,p);return await E("Swap elements"),D}let m=!1;if(!ve(a,c,p,()=>m=!0)){if(window.Alpine&&vs(c,p,()=>m=!0),gs(p)){await O(c,p),l(c,p);return}m||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 _(c,p){if(ve(u,c))return;let m=p.cloneNode(!0);ve(h,m)||(T(c).replace(m),d(c),b(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 R(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let m=Array.from(c.attributes),D=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=D.length-1;z>=0;z--){let K=D[z].name,y=D[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,D=p.childNodes,z=br(D),K=br(m),y=T(p).nodes().first(),g=T(c).nodes().first(),ee={};for(;y;){let M=P(y),B=P(g);if(!g)if(M&&ee[M]){let $=ee[M];T(c).append($),g=$,await E("Add element (from key)")}else{let $=hi(y,c)||{};await E("Add element: "+($.outerHTML||$.nodeValue)),y=T(y).nodes().next();continue}if(s){let $=T(y).next(),xr=!1;for(;!xr&&$;)g.isEqualNode($)&&(xr=!0,g=_t(y,g),B=P(g),await E("Move element (lookahead)")),$=T($).next()}if(M!==B){if(!M&&B){ee[B]=g,g=_t(y,g),ee[B].remove(),g=T(g).nodes().next(),y=T(y).nodes().next(),await E('No "to" key');continue}if(M&&!B&&K[M]&&(g=T(g).replace(K[M]),await E('No "from" key')),M&&B){ee[B]=g;let $=K[M];if($)g=T(g).replace($),await E('Move "from" key');else{ee[B]=g,g=_t(y,g),ee[B].remove(),g=T(g).next(),y=T(y).next(),await E("Swap elements with keys");continue}}}let pi=g&&T(g).nodes().next();await f(g,y),y=y&&T(y).nodes().next(),g=pi}let yt=[];for(;g;)ve(u,g)||yt.push(g),g=T(g).nodes().next();for(;yt.length;){let M=yt.shift();M.remove(),await E("remove el"),d(M)}}function P(c){return c&&c.nodeType===1&&o(c)}function br(c){let p={};return c.forEach(m=>{let D=P(m);D&&(p[D]=m)}),p}function hi(c,p){if(!ve(h,c)){let m=c.cloneNode(!0);return T(p).append(m),b(m),m}return null}function _t(c,p){if(!ve(h,c)){let m=c.cloneNode(!0);return T(p).before(m),b(m),m}return p}return ce(r),n=e,i=ms(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 f(e,i),n=void 0,i=void 0,e}sr.step=()=>zn();sr.log=e=>{Vn=e};function ve(e,...t){let r=!1;return e(...t,()=>r=!0),r}function vs(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function bs(e){e.morph=sr}var Wn=bs;or.plugin(Wn);var xs=/INPUT/i,_s=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,ys=/TEXTAREA/i;function Es(e,t,r,n){if(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)return;if(e.tagName.match(ys)||e.tagName.match(xs)&&e.getAttribute("type").match(_s))return n()}function ws(e,t){e.forEach(r=>or.morph(r,t,{updating:Es}))}var Un=ws;function Ss(e,t,r){if(e.match(/^dispatch(Event)?$/))return _r(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Un(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 As(){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})),Ss(i,o,s)}var ar=As;if(!self.Turbo)throw new Error("`Turbo` is not defined! Be sure to import `turbo_ready` after `@hotwired/turbo` or `@hotwired/turbo-rails`.");if(!Turbo.StreamActions)throw new Error("`Turbo.StreamActions` is not defined! Verify that you are running >= `7.2.0` of `@hotwired/turbo`.");Turbo.StreamActions.invoke=ar;self.TurboReady={StreamActions:{invoke:ar}};console.info("TurboReady has initialized and has registered new stream actions with Turbo.");var lr=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 lr;var J={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"},X={stateLoad:"turbo-reflex:state-load",stateChange:"turbo-reflex:state-change"},j={...J,...X};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(J.clientError,t,{error:i,...r},!0)}}var ur;function ct(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],k(X.stateChange,S.element,{state:ur}),!0},set(n,i,o,s){return n[i]=ct(o,this),k(X.stateChange,S.element,{state:ur}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=ct(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=ct(i,r);return t||(ur=r),r}var Gn=ct;var cr,se,dt,Jn;function Xn(){if(!S.element)return be();let e=atob(S.element.dataset.state);dt={},se=Gn(JSON.parse(e)),cr={...se},delete S.element.dataset.clientStateChange,setTimeout(()=>k(X.stateLoad,S.element,{state:se}))}function be(){clearTimeout(Jn),Jn=setTimeout(Xn,10)}cr||Xn();addEventListener("DOMContentLoaded",be);addEventListener("load",be);addEventListener("turbo:load",be);addEventListener("turbo:frame-load",be);addEventListener("turbo-reflex:success",be);addEventListener(X.stateChange,e=>{dt={};for(let[t,r]of Object.entries(se))cr[t]!==r&&(dt[t]=r);S.element.dataset.clientStateChange=!0,S.element.dataset.state=btoa(JSON.stringify(se))});var ae={events:X,get current(){return se},get delta(){return dt},get payloadChunks(){return btoa(JSON.stringify(se)).match(/.{1,2000}/g)}};function Ts(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 Os(e){document.body.insertAdjacentHTML("beforeend",e)}var le={append:Os,replaceDocument:Ts};var ft={};function ks(e){ft[e.id]=e}function Cs(e){delete ft[e]}var ht={add:ks,remove:Cs,get reflexes(){return[...Object.values(ft)]},get length(){return Object.keys(ft).length}};function Yn(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>k(J.finish,e.target,e.detail),20)}addEventListener(J.serverError,Yn);addEventListener(J.success,Yn);addEventListener(J.finish,e=>ht.remove(e.detail.id),!0);var Y={events:J};var dr={};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&&(dr[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(Y.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=dr[t.id]||t.src||t.dataset.turboReflexSrc,delete dr[t.id]});var Ls={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",reflexAttribute:"data-turbo-reflex"},F={...Ls};var pt={},Zn;function Rs(e,t){pt[e]=t,document.addEventListener(e,Zn,!0)}function Ms(e){return Object.keys(pt).find(t=>!!pt[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function $s(e,t){return e===Ms(t)}var Z={events:pt,register:Rs,isRegisteredForElement:$s,set handler(e){Zn=e}};function Ns(e){return e.closest(`[${F.reflexAttribute}]`)}function Ds(e){return e.closest("turbo-frame")}function Ps(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 Is(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,Ps(e,t),delete t.class,delete t.action,delete t.href,delete t[F.reflexAttribute],delete t[F.frameAttribute],t}var $e={buildAttributePayload:Is,findClosestReflex:Ns,findClosestFrame:Ds};function Hs(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 Qn={invokeReflex:Hs};function js(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:js};function Fs(e,t){let r=t.src;t={...t},delete t.src,e.src=xe.build(r,t)}var fr={invokeReflex:Fs};function Ks(e,t={}){let r=t.src;t={...t},delete t.src,delete t.href,e.setAttribute("href",xe.build(r,t))}var ei={invokeReflex:Ks};function Bs(e){let t=e.target;k(Y.events.abort,document,{xhr:t,...e.detail})}function hr(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(Y.events.clientError,document,{xhr:t,...e.detail,error:r},!0)}function qs(e){let t=e.target;if(t.status<200||t.status>399)return hr(e);let r=t.responseText;t.getResponseHeader("TurboReflex")==="Append"?le.append(t.responseText):le.replaceDocument(t.responseText)}function zs(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",S.token),ae.payloadChunks.forEach((n,i)=>r.setRequestHeader(`TurboReflex-State-${i.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",Bs),r.addEventListener("error",hr),r.addEventListener("load",qs),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;hr(r,{detail:{message:n}})}}var ti={invokeReflex:zs};function pr(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboReflexSrc||location.href}function Vs(e){let t=$e.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:Qn.invokeReflex}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeReflex:ei.invokeReflex}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:pr(e,t),invokeReflex:fr.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:pr(e,t),invokeReflex:fr.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:pr(e),invokeReflex:ti.invokeReflex}}var ri={find:Vs};var Ne="unknown",ni={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=>{ni[Ne].includes(t.type)&&console[Ne==="debug"?"log":Ne](t.type,{target:t.target,detail:t.detail})})});var ii={get level(){return Ne},set level(e){return Object.keys(ni).includes(e)||(e="unknown"),Ne=e}};function Ws(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var oi={v4:Ws};function Us(e){let t,r={};try{if(t=$e.findClosestReflex(e.target),!t||!Z.isRegisteredForElement(e.type,t))return;let n=ri.find(t);switch(r={id:`reflex-${oi.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:$e.buildAttributePayload(t),startedAt:new Date().getTime()},ht.add(r),k(Y.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(Y.events.clientError,t,{error:n,...r})}}Z.handler=Us;Z.register("change",[`input[${F.reflexAttribute}]`,`select[${F.reflexAttribute}]`,`textarea[${F.reflexAttribute}]`]);Z.register("submit",[`form[${F.reflexAttribute}]`]);Z.register("click",[`[${F.reflexAttribute}]`]);self.TurboReflex={logger:ii,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 Nl=self.TurboReflex;var ue=class extends HTMLElement{constructor(){super(),this.devtool="unknown",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML="<slot></slot>"}connectedCallback(){this.ensureId()}ensureId(){this.id.trim().length||(this.id=`${this.tagName}-${this.uuidv4()}`.toLowerCase())}uuidv4(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}get viewStack(){let t=this.getAttribute("view-stack");return t?JSON.parse(t):[]}get partial(){return this.viewStack[0]}};var De=class extends ue{connectedCallback(){super.connectedCallback(),this.addEventListener("mouseenter",()=>clearTimeout(this.collapseTimeout)),this.collapseOn.forEach(t=>this.addEventListener(t,()=>this.collapse()))}cacheHTML(){}renderCachedHTML(){}collapse(){clearTimeout(this.collapseTimeout),this.collapseTimeout=setTimeout(()=>{this.innerHTML="";try{this.currentTriggerElement.expanded=!1,this.currentTriggerElement.hideDevtool()}catch{}},250)}collapseMatches(){document.querySelectorAll(this.collapseSelector).forEach(t=>{t!==this&&t.collapse&&t.collapse()})}get collapseSelector(){return this.currentTriggerElement&&this.currentTriggerElement.collapseSelector?this.currentTriggerElement.collapseSelector:this.getAttribute("collapse-selector")}focus(){clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(()=>{this.focusElement&&(this.focusElement.focus(),this.focusElement.scrollIntoView({block:"center",behavior:"smooth"}))},50)}get focusSelector(){return this.currentTriggerElement&&this.currentTriggerElement.focusSelector?this.currentTriggerElement.focusSelector:this.getAttribute("focus-selector")}get focusElement(){return this.querySelector(this.focusSelector)}get labeledBy(){return this.getAttribute("aria-labeledby")}get collapseOn(){let t=this.getAttribute("collapse-on");return t?JSON.parse(t):[]}};function Gs(e){let t=document.createElement("template");return t.innerHTML=e,t}function Pe(e,t){t=t||document.body;let n=Gs(e).content.cloneNode(!0).querySelector("*");return t.appendChild(n)}function mt(e,t={}){if(!e)return;gt(e);let{outline:r,outlineOffset:n}=t;r=r||"dashed 3px red",n=n||"0px",e.originalStyles=e.originalStyles||{display:e.style.display,minHeight:e.style.minHeight,minWidth:e.style.minWidth,outline:e.style.outline,outlineOffset:e.style.outlineOffset},getComputedStyle(e).display.match(/^inline$/i)&&e.offsetWidth===0&&e.offsetHeight===0&&(e.style.display="inline-block",e.style.minHeight="2px",e.style.minWidth="2px"),e.style.outline=r,e.style.outlineOffset=n,e.dataset.reflexBehaviorsHighlight=!0}function gt(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}}function vt(e){if(!e)return{};let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:e.offsetWidth,height:e.offsetHeight}}var Ie=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.labelElement.addEventListener("click",t=>{t.preventDefault(),this.toggle()}),this.checkboxElement.addEventListener("change",t=>this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}toggle(){this.checked?this.uncheck():this.check()}check(){this.checkboxElement.checked=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}uncheck(){this.checkboxElement.checked=!1,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}get name(){return this.getAttribute("name")}get checked(){return this.checkboxElement.checked}get checkboxElement(){return this.shadowRoot.querySelector("input")}get labelElement(){return this.shadowRoot.querySelector("label")}get html(){return`
7
7
  <style>${this.stylesheet}</style>
8
8
  <div>
9
9
  <input name="checkbox" type="checkbox">
@@ -27,7 +27,7 @@ ${r?'Expression: "'+r+`"
27
27
  label {
28
28
  color: indigo;
29
29
  }
30
- `}};var He=class extends HTMLElement{constructor(){super(),this.enabledDevtools={},this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.shadowRoot.querySelector("button").addEventListener("click",()=>this.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-close",{bubbles:!0}))),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`
30
+ `}};var He=class extends HTMLElement{constructor(){super(),this.enabledDevtools={},this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.shadowRoot.querySelector("button").addEventListener("click",()=>this.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-close",{bubbles:!0}))),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
31
  <style>${this.stylesheet}</style>
32
32
  <div>
33
33
  <label>ReflexBehaviors</label>
@@ -94,6 +94,7 @@ ${r?'Expression: "'+r+`"
94
94
  <style>${this.stylesheet}</style>
95
95
  <div>
96
96
  <slot name="title"></slot>
97
+ <slot name="subtitle"></slot>
97
98
  <slot name="content-top"></slot>
98
99
  <slot name="content"></slot>
99
100
  <slot name="content-bottom"></slot>
@@ -120,18 +121,29 @@ ${r?'Expression: "'+r+`"
120
121
  opacity: 0.9;
121
122
  outline-offset: 1px;
122
123
  outline: dashed 3px ${this.color};
123
- padding: 8px 12px 8px 12px;
124
+ padding: 12px;
124
125
  position: relative;
125
126
  white-space: nowrap;
126
127
  }
127
128
 
128
129
  slot[name="title"] {
129
- border-bottom: dotted 1px ${this.color};
130
130
  color: ${this.color};
131
- display: inline-block;
131
+ display: block;
132
132
  font-weight: bold;
133
+ width: 100%;
134
+ }
135
+
136
+ slot[name="subtitle"] {
137
+ border-bottom: dotted 1px ${this.color};
138
+ border-top: dotted 1px ${this.color};
139
+ color: ${this.color};
140
+ display: block;
141
+ font-size: 0.8rem;
142
+ font-weight: lighter;
133
143
  margin-bottom: 8px;
134
- padding-bottom: 8px;
144
+ margin-top: 4px;
145
+ padding-bottom: 4px;
146
+ padding-top: 4px;
135
147
  width: 100%;
136
148
  }
137
149
 
@@ -152,14 +164,24 @@ ${r?'Expression: "'+r+`"
152
164
  font-weight: normal;
153
165
  opacity: 0.7;
154
166
  }
155
- `}};var _e=[],Js={LeaderLine:{src:"https://cdnjs.cloudflare.com/ajax/libs/leader-line/1.0.7/leader-line.min.js",integrity:"sha512-0dNdzMjpT6pJdFGF1DwybFCfm3K/lzHhxaMXC/92J9/DZujHlqYFqmhTOAoD0o+LkeEsVK2ar/ESs7/Q2B6wJg==",global:"LeaderLine"},PlainDraggable:{src:"https://cdn.jsdelivr.net/npm/plain-draggable@2.5.14/plain-draggable.min.js",global:"PlainDraggable"}};function Xs(e){return e.global&&self[e.global]||document.querySelector(`[src='${e.src}']`)?!0:_e.includes(e)}function Ys(e){if(Xs(e))return;_e.push(e);let{src:t,integrity:r}=e,n=document.createElement("script");n.setAttribute("src",t),n.setAttribute("crossorigin","anonymous"),n.setAttribute("referrerpolicy","no-referrer"),r&&n.setAttribute("integrity",r),document.head.appendChild(n)}function si(e){if(!_e.includes(e))return;_e.splice(_e.indexOf(e),1);let{src:t}=e,r=document.querySelector(`script[src='${t}']`);r&&r.remove(),e.global&&self[e.global]&&(self[e.global]=null)}function Zs(){[..._e].forEach(e=>si(e))}var ye={...Js,add:Ys,remove:si,removeAll:Zs};customElements.define("reflex-behaviors-devtool",Ie);customElements.define("reflex-behaviors-devtool-supervisor",He);customElements.define("reflex-behaviors-devools-tooltip",je);var R;function li(){if(!!R)try{new PlainDraggable(R)}catch{setTimeout(li,200)}}function gr(){ci()||(R.close(),R.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-stop",{bubbles:!0})),R=null,ye.removeAll())}function ui(){bt()||(ye.add(ye.LeaderLine),ye.add(ye.PlainDraggable),R=De("<reflex-behaviors-devtool-supervisor></reflex-behaviors-devtool-supervisor>"),setTimeout(li,200),R.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-start",{bubbles:!0})))}function Qs(){let e=R?Object.keys(R.enabledDevtools):[];gr(),ui(),R.devtoolElements.forEach(t=>{e.includes(t.name)&&t.check()})}function bt(){return!!R}function ci(){return!bt()}var ai;function di(){clearTimeout(ai),ai=setTimeout(Qs,25)}function xt(){bt()&&di()}addEventListener("turbo:load",xt);addEventListener("turbo-frame:load",xt);addEventListener("turbo-reflex:success",xt);addEventListener("turbo-reflex:finish",xt);addEventListener("reflex-behaviors:devtools-close",gr);function ea(e,t){if(!!R)return De(`
167
+ `}};var _e=[],Js={LeaderLine:{src:"https://cdnjs.cloudflare.com/ajax/libs/leader-line/1.0.7/leader-line.min.js",integrity:"sha512-0dNdzMjpT6pJdFGF1DwybFCfm3K/lzHhxaMXC/92J9/DZujHlqYFqmhTOAoD0o+LkeEsVK2ar/ESs7/Q2B6wJg==",global:"LeaderLine"},PlainDraggable:{src:"https://cdn.jsdelivr.net/npm/plain-draggable@2.5.14/plain-draggable.min.js",global:"PlainDraggable"}};function Xs(e){return e.global&&self[e.global]||document.querySelector(`[src='${e.src}']`)?!0:_e.includes(e)}function Ys(e){if(Xs(e))return;_e.push(e);let{src:t,integrity:r}=e,n=document.createElement("script");n.setAttribute("src",t),n.setAttribute("crossorigin","anonymous"),n.setAttribute("referrerpolicy","no-referrer"),r&&n.setAttribute("integrity",r),document.head.appendChild(n)}function si(e){if(!_e.includes(e))return;_e.splice(_e.indexOf(e),1);let{src:t}=e,r=document.querySelector(`script[src='${t}']`);r&&r.remove(),e.global&&self[e.global]&&(self[e.global]=null)}function Zs(){[..._e].forEach(e=>si(e))}var ye={...Js,add:Ys,remove:si,removeAll:Zs};customElements.define("reflex-behaviors-devtool",Ie);customElements.define("reflex-behaviors-devtool-supervisor",He);customElements.define("reflex-behaviors-devools-tooltip",je);var L;function li(){if(L)try{new PlainDraggable(L)}catch{setTimeout(li,200)}}function mr(){ci()||(L.close(),L.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-stop",{bubbles:!0})),L=null,ye.removeAll())}function ui(){bt()||(ye.add(ye.LeaderLine),ye.add(ye.PlainDraggable),L=Pe("<reflex-behaviors-devtool-supervisor></reflex-behaviors-devtool-supervisor>"),setTimeout(li,200),L.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-start",{bubbles:!0})))}function Qs(){let e=L?Object.keys(L.enabledDevtools):[];mr(),ui(),L.devtoolElements.forEach(t=>{e.includes(t.name)&&t.check()})}function bt(){return!!L}function ci(){return!bt()}var ai;function di(){clearTimeout(ai),ai=setTimeout(Qs,25)}function xt(){bt()&&di()}addEventListener("turbo:load",xt);addEventListener("turbo-frame:load",xt);addEventListener("turbo-reflex:success",xt);addEventListener("turbo-reflex:finish",xt);addEventListener("reflex-behaviors:devtools-close",mr);function ea(e,t){if(L)return Pe(`
156
168
  <reflex-behaviors-devtool name="${e}" slot="devtool">
157
169
  <span slot="label">${t}</span>
158
170
  </reflex-behaviors-devtool>
159
- `,R)}function ta(e){return R?R.enabledDevtools[e]:!1}var Q={enabled:ta,register:ea,start:ui,stop:gr,restart:di,get started(){return bt()},get stopped(){return ci()}};var mr;document.addEventListener("reflex-behaviors:devtools-start",()=>Q.register("toggle","toggles<small>(trigger/target)</small>"));function vr(e,t,r={}){let{backgroundColor:n,color:i,position:o}=r;return i=i||"white",o=o||"top",De(`
160
- <reflex-behaviors-devools-tooltip position="${o}" background-color="${n}" color="${i}">
171
+ `,L)}function ta(e){return L?L.enabledDevtools[e]:!1}var Q={enabled:ta,register:ea,start:ui,stop:mr,restart:di,get started(){return bt()},get stopped(){return ci()}};var gr;document.addEventListener("reflex-behaviors:devtools-start",()=>Q.register("toggle","toggles<small>(trigger/target)</small>"));function vr(e,t,r,n={}){let{backgroundColor:i,color:o,position:s}=n;return o=o||"white",s=s||"top",Pe(`
172
+ <reflex-behaviors-devools-tooltip position="${s}" background-color="${i}" color="${o}">
161
173
  <div slot='title'>${e}</div>
162
- ${t}
174
+ <div slot='subtitle'>${t}</div>
175
+ ${r}
163
176
  </reflex-behaviors-devools-tooltip>
164
- `)}var Fe=class{constructor(t){this.name="toggle",this.reflex=t.dataset.turboReflex,this.trigger=t,this.target=t.target,document.addEventListener("reflex-behaviors:devtool-enable",i=>{let{name:o}=i.detail;o===this.name&&gt(this.trigger,{outline:"3px dashed blueviolet",outlineOffset:"2px"})}),document.addEventListener("reflex-behaviors:devtool-disable",i=>{let{name:o}=i.detail;o===this.name&&mt(this.trigger)});let r,n=()=>{clearTimeout(r),r=setTimeout(this.hide(!0),25)};addEventListener("click",i=>{i.target.closest("reflex-behaviors-devools-tooltip")||n()}),addEventListener("turbo:load",n),addEventListener("turbo-frame:load",n),addEventListener("turbo-reflex:success",n),addEventListener("turbo-reflex:finish",n)}get enabled(){return Q.enabled(this.name)}show(){if(!this.enabled||mr===this)return;mr=this,this.hide(),gt(this.target,{outline:"3px dashed darkcyan",outlineOffset:"-2px"}),gt(this.trigger.renderingElement,{outline:"3px dashed chocolate",outlineOffset:"3px"});let t=this.createRenderingTooltip(),r=this.createTargetTooltip();this.createTriggerTooltip(r,t),document.querySelectorAll(".leader-line").forEach(i=>i.style.zIndex=1e5);let n={rendering:{partial:this.trigger.renderingPartial,id:this.trigger.renderingInfo.id,status:this.trigger.renderingElement?"OK":"Not Found"},trigger:{partial:null,id:null,status:"Not Found"},target:{partial:null,id:null,status:"Not Found"}};this.trigger&&(n.trigger={partial:this.trigger.partial,id:this.trigger.id,status:"OK"}),this.target&&(n.target={partial:this.target.partial,id:this.target.id,status:"OK"}),console.table(n)}hide(t){document.querySelectorAll(".leader-line").forEach(r=>r.remove()),document.querySelectorAll("reflex-behaviors-devools-tooltip").forEach(r=>r.remove()),document.querySelectorAll("[data-reflex-behaviors-highlight]").forEach(r=>{r.tagName.match(/toggle-trigger/i)||mt(r)}),t&&(mr=null)}createRenderingTooltip(){if(!this.trigger.renderingElement)return console.debug(`Unable to create the rendering tooltip! No element matches the DOM id: '${this.trigger.renderingInfo.id}'`);let t=`RENDERING (id: ${this.trigger.renderingElement.id||"unknown"})`,r=`<div slot="content">partial: ${this.trigger.renderingPartial}</div>`,n=vr(t,r,{backgroundColor:"lightyellow",color:"chocolate"}),i=vt(this.trigger.renderingElement),o=Math.ceil(i.top+i.height/2-n.offsetHeight/2),s=Math.ceil(i.left+i.width+100);return n.style.top=`${o}px`,n.style.left=`${s}px`,n.line=new LeaderLine(n,this.trigger.renderingElement,{...this.leaderLineOptions,color:"chocolate"}),n.drag=new PlainDraggable(n),n}createTargetTooltip(){if(!this.target)return console.debug(`Unable to create the target tooltip! No element matches the DOM id: '${this.trigger.controls}'`);let t=`TARGET (id: ${this.target.id})`,r=this.target.viewStack.reverse().map((a,l)=>this.trigger.sharedViews.includes(a)?`<div slot="content-top">${l+1}. ${a}</div>`:`<div slot="content-bottom">${l+1}. ${a}</div>`,this).join(""),n=vr(t,r,{backgroundColor:"lightcyan",color:"darkcyan",position:"bottom"}),i=vt(this.target),o=Math.ceil(i.top+n.offsetHeight),s=Math.ceil(i.left+i.width+n.offsetWidth/3);return n.style.top=`${o}px`,n.style.left=`${s}px`,n.line=new LeaderLine(n,this.target,{...this.leaderLineOptions,color:"darkcyan"}),n.drag=new PlainDraggable(n),n}createTriggerTooltip(t,r){if(!this.trigger)return;let n=`TRIGGER (controls: ${this.trigger.controls})`,i=this.trigger.viewStack.reverse().map((u,d)=>this.trigger.sharedViews.includes(u)?`<div slot="content-top">${d+1}. ${u}</div>`:`<div slot="content-bottom">${d+1}. ${u}</div>`,this).join(""),o=vr(n,i,{backgroundColor:"lavender",color:"blueviolet"}),s=vt(this.trigger),a=Math.ceil(s.top-o.offsetHeight*2),l=Math.ceil(s.left+s.width+o.offsetWidth/3);return o.style.top=`${a}px`,o.style.left=`${l}px`,o.line=new LeaderLine(this.trigger,o,{...this.leaderLineOptions,color:"blueviolet"}),t&&(o.lineToTarget=new LeaderLine(o,t,{...this.leaderLineOptions,color:"blueviolet",middleLabel:"toggles",size:2.1}),t.drag.onMove=()=>{t.line.position(),o.lineToTarget.position(),o.lineToRendering.position()}),r&&(o.lineToRendering=new LeaderLine(o,r,{...this.leaderLineOptions,color:"blueviolet",middleLabel:"renders",size:2.1}),r.drag.onMove=()=>{r.line.position(),o.lineToTarget&&o.lineToTarget.position(),o.lineToRendering.position()}),o.drag=new PlainDraggable(o),o.drag.onMove=()=>{o.line.position(),o.lineToTarget&&o.lineToTarget.position(),o.lineToRendering&&o.lineToRendering.position()},o}get leaderLineOptions(){return{dash:{animation:!0},dropShadow:{opacity:.3},endPlug:"arrow3",endPlugSize:1.7,size:3,startPlug:"disc",startPlugSize:1}}};var Ke=class extends ue{connectedCallback(){super.connectedCallback();let t=()=>this.devtool.show();document.addEventListener("reflex-behaviors:devtools-start",()=>{this.devtool=new Fe(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",Pe);customElements.define("toggle-trigger",Ke);var{restart:ra,start:na,stop:ia}=Q,fi={restart:ra,start:na,stop:ia};self.ReflexBehaviors={devtools:fi};
177
+ `)}var Fe=class{constructor(t){this.name="toggle",this.reflex=t.dataset.turboReflex,this.triggerElement=t,this.targetElement=t.targetElement,this.morphElement=t.morphElement,document.addEventListener("reflex-behaviors:devtool-enable",i=>{let{name:o}=i.detail;o===this.name&&mt(this.triggerElement,{outline:"3px dashed blueviolet",outlineOffset:"2px"})}),document.addEventListener("reflex-behaviors:devtool-disable",i=>{let{name:o}=i.detail;o===this.name&&gt(this.triggerElement)});let r,n=()=>{clearTimeout(r),r=setTimeout(this.hide(!0),25)};addEventListener("click",i=>{i.target.closest("reflex-behaviors-devools-tooltip")||n()}),addEventListener("turbo:load",n),addEventListener("turbo-frame:load",n),addEventListener("turbo-reflex:success",n),addEventListener("turbo-reflex:finish",n)}get enabled(){return Q.enabled(this.name)}show(){if(!this.enabled||gr===this)return;gr=this,this.hide(),mt(this.targetElement,{outline:"3px dashed darkcyan",outlineOffset:"-2px"}),mt(this.triggerElement.morphElement,{outline:"3px dashed chocolate",outlineOffset:"3px"});let t=this.createMorphTooltip(),r=this.createTargetTooltip();this.createTriggerTooltip(r,t),document.querySelectorAll(".leader-line").forEach(i=>i.style.zIndex=1e5);let n={morph:{partial:this.triggerElement.renders,id:this.triggerElement.morphs,status:this.morphElement?"OK":"Not Found"},trigger:{partial:null,id:null,status:"Not Found"},target:{partial:null,id:null,status:"Not Found"}};this.triggerElement&&(n.trigger={partial:this.triggerElement.partial,id:this.triggerElement.id,status:"OK"},n.target.id=this.triggerElement.controls),this.targetElement&&(n.target={partial:this.targetElement.partial,id:this.targetElement.id,status:"OK"}),console.table(n)}hide(t){document.querySelectorAll(".leader-line").forEach(r=>r.remove()),document.querySelectorAll("reflex-behaviors-devools-tooltip").forEach(r=>r.remove()),document.querySelectorAll("[data-reflex-behaviors-highlight]").forEach(r=>{r.tagName.match(/toggle-trigger/i)||gt(r)}),t&&(gr=null)}createMorphTooltip(){if(!this.triggerElement.morphs)return console.debug(`Unable to create the morph tooltip! No element matches the DOM id: '${this.triggerElement.morphs}'`);let t="PARTIAL",r=`
178
+ id: ${this.triggerElement.morphs||"unknown"}<br>
179
+ partial: ${this.triggerElement.renders||"unknown"}
180
+ `,i=vr(t,r,'<div slot="content"></div>',{backgroundColor:"lightyellow",color:"chocolate"}),o=vt(this.morphElement),s=Math.ceil(o.top+o.height/2-i.offsetHeight/2),a=Math.ceil(o.left+o.width+100);return i.style.top=`${s}px`,i.style.left=`${a}px`,i.line=new LeaderLine(i,this.morphElement,{...this.leaderLineOptions,color:"chocolate"}),i.drag=new PlainDraggable(i),i}createTargetTooltip(){if(!this.targetElement)return console.debug(`Unable to create the target tooltip! No element matches the DOM id: '${this.triggerElement.controls}'`);let t="TARGET",r=`
181
+ id: ${this.targetElement.id}<br>
182
+ labeled by: ${this.targetElement.labeledBy}
183
+ `,n=this.targetElement.viewStack.reverse().map((l,u)=>this.triggerElement.sharedViews.includes(l)?`<div slot="content-top">${u+1}. ${l}</div>`:`<div slot="content-bottom">${u+1}. ${l}</div>`,this).join(""),i=vr(t,r,n,{backgroundColor:"lightcyan",color:"darkcyan",position:"bottom"}),o=vt(this.targetElement),s=Math.ceil(o.top+i.offsetHeight),a=Math.ceil(o.left+o.width+i.offsetWidth/3);return i.style.top=`${s}px`,i.style.left=`${a}px`,i.line=new LeaderLine(i,this.targetElement,{...this.leaderLineOptions,color:"darkcyan"}),i.drag=new PlainDraggable(i),i}createTriggerTooltip(t,r){if(!this.triggerElement)return;let n="TRIGGER",i=`
184
+ id: ${this.triggerElement.id}<br>
185
+ controls: ${this.triggerElement.controls}
186
+ `,o=this.triggerElement.viewStack.reverse().map((d,h)=>this.triggerElement.sharedViews.includes(d)?`<div slot="content-top">${h+1}. ${d}</div>`:`<div slot="content-bottom">${h+1}. ${d}</div>`,this).join(""),s=vr(n,i,o,{backgroundColor:"lavender",color:"blueviolet"}),a=vt(this.triggerElement),l=Math.ceil(a.top-s.offsetHeight*2),u=Math.ceil(a.left+a.width+s.offsetWidth/3);return s.style.top=`${l}px`,s.style.left=`${u}px`,s.line=new LeaderLine(this.triggerElement,s,{...this.leaderLineOptions,color:"blueviolet"}),t&&(s.lineToTarget=new LeaderLine(s,t,{...this.leaderLineOptions,color:"blueviolet",middleLabel:"toggles",size:2.1}),t.drag.onMove=()=>{t.line.position(),s.lineToTarget.position(),s.lineToRendering.position()}),r&&(s.lineToRendering=new LeaderLine(s,r,{...this.leaderLineOptions,color:"blueviolet",middleLabel:"renders and morphs",size:2.1}),r.drag.onMove=()=>{r.line.position(),s.lineToTarget&&s.lineToTarget.position(),s.lineToRendering.position()}),s.drag=new PlainDraggable(s),s.drag.onMove=()=>{console.log("nate",s.line),s.line.position(),s.lineToTarget&&s.lineToTarget.position(),s.lineToRendering&&s.lineToRendering.position()},s}get leaderLineOptions(){return{dash:{animation:!0},dropShadow:{opacity:.3},endPlug:"arrow3",endPlugSize:1.7,size:3,startPlug:"disc",startPlugSize:1}}};var Ke=class extends ue{connectedCallback(){super.connectedCallback(),this.targetElement&&this.targetElement.setAttribute("aria-labeledby",this.id),this.addEventListener(TurboReflex.events.start,()=>{this.busy=!0,this.targetElement.currentTriggerElement=this,this.targetElement.renderCachedHTML()}),this.addEventListener(TurboReflex.events.success,()=>{this.busy=!1,this.targetElement.focus(),this.targetElement.collapseMatches(),this.targetElement.cacheHTML()}),this.addEventListener(TurboReflex.events.finish,()=>this.busy=!1),this.initializeDevtool()}initializeDevtool(){let t=()=>this.devtool.show();addEventListener("reflex-behaviors:devtools-start",()=>{this.devtool=new Fe(this),this.addEventListener("mouseenter",t)}),addEventListener("reflex-behaviors:devtools-stop",()=>{this.removeEventListener("mouseenter",t),delete this.devtool}),Q.started&&Q.restart()}hideDevtool(){this.devtool&&this.devtool.hide(!0)}get sharedViews(){if(!this.targetElement)return[];if(!this.targetElement.viewStack)return[];let t=(r,n)=>(this.targetElement.viewStack.includes(n)&&r.push(n),r);return this.viewStack.reduce(t.bind(this),[])}get renders(){return this.getAttribute("renders")}get morphs(){return this.getAttribute("morphs")}get morphElement(){return this.morphs?document.getElementById(this.morphs):null}get controls(){return this.getAttribute("aria-controls")}get targetElement(){return this.controls?document.getElementById(this.controls):null}get collapseSelector(){return this.getAttribute("collapse-selector")}get focusSelector(){return this.getAttribute("focus-selector")}get expanded(){return this.getAttribute("aria-expanded")==="true"}set expanded(t){this.setAttribute("aria-expanded",!!t)}get collapsed(){return!this.expanded}get busy(){return this.getAttribute("busy")==="true"}set busy(t){this.setAttribute("busy",!!t)}};customElements.define("toggle-target",De);customElements.define("toggle-trigger",Ke);var{restart:ra,start:na,stop:ia}=Q,fi={restart:ra,start:na,stop:ia};self.ReflexBehaviors={devtools:fi};
165
187
  //# sourceMappingURL=reflex_behaviors.js.map