@livx.cc/bare-v3 0.1.0-alpha.76 → 0.1.0-alpha.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,8 @@
5
5
  * <script type="application/json"> child holding the array) and listen for `b3-change`, whose
6
6
  * detail carries the full, plain `columns` after every user edit plus the `action` that made it.
7
7
  * `#tag` and `@mention` words in a title or description become filter labels; a trailing run of
8
- * them is shown as labels instead of title text. Starred cards stay above the rest of their column. Opt-in entry: `@livx.cc/bare-v3/components/board`.
8
+ * them is shown as labels instead of title text. `search` narrows the cards to those whose text holds every word typed;
9
+ * `addCard()` starts a new card in the `default-column`. Starred cards stay above the rest of their column. Opt-in entry: `@livx.cc/bare-v3/components/board`.
9
10
  */
10
11
  import { Base } from './base';
11
12
  /** Ids are kept as given (a number stays a number); missing ones are generated as strings. */
@@ -94,6 +95,15 @@ export type BoardLinkDetail = {
94
95
  column?: BoardId;
95
96
  subtask?: BoardId;
96
97
  };
98
+ /**
99
+ * `board.upload`: stores an image pasted into a card's title or description editor and returns the target to
100
+ * reference it by (a URL, or a path the page resolves); nothing (or a throw) drops it. The board writes it into the
101
+ * description as `![](target)` and reports an `edit` of `description`.
102
+ */
103
+ export type BoardUpload = (file: File, detail: {
104
+ card: BoardId;
105
+ column?: BoardId;
106
+ }) => Promise<string | null | undefined> | string | null | undefined;
97
107
  /** `b3-change` detail: the full board as plain JSON, and the edit that produced it. */
98
108
  export type BoardChangeDetail = {
99
109
  columns: BoardColumn[];
@@ -120,11 +130,28 @@ export declare class B3Board extends Base {
120
130
  /** Active filter tokens (e.g. `#bug`, `@dana`); a card shows when it carries all of them. */
121
131
  get filter(): string[];
122
132
  set filter(value: string[]);
133
+ /**
134
+ * Text search: only cards whose title, description, subtasks or tags hold every word (case-insensitive, any order)
135
+ * are shown; counts read shown/total. Works with `filter`. The `search` attribute sets it too.
136
+ */
137
+ get search(): string;
138
+ set search(value: string);
139
+ /** The column `addCard()` adds to when given none (`default-column`): an id, or a name (case-insensitive); else the first. */
140
+ get defaultColumn(): string;
141
+ set defaultColumn(value: string);
142
+ /**
143
+ * Start a new card, its title editor focused and in view, at the end of `column` (an id or name) or the default
144
+ * column. Reported by `b3-change` once it has a title. False when readonly or there is no such column.
145
+ */
146
+ addCard(column?: BoardId): boolean;
147
+ /** Pasting images into a card needs this hook: the host stores the file (see `BoardUpload`). */
148
+ get upload(): BoardUpload | null;
149
+ set upload(value: BoardUpload | null);
123
150
  get readonly(): boolean;
124
151
  set readonly(value: boolean);
125
152
  connectedCallback(): void;
126
153
  disconnectedCallback(): void;
127
- attributeChangedCallback(): void;
154
+ attributeChangedCallback(name: string, _old: string | null, value: string | null): undefined;
128
155
  /**
129
156
  * Move a card to `index` among ALL of a column's cards (filters do not shift positions). The
130
157
  * index is kept within the card's group: a starred card stays among the starred ones at the top,
@@ -1,10 +1,10 @@
1
- var{defineProperty:Ge,getOwnPropertyNames:Xn,getOwnPropertyDescriptor:Zn}=Object,Qn=Object.prototype.hasOwnProperty;function ei(e){return this[e]}var ti=(e)=>{var t=(Gt??=new WeakMap).get(e),r;if(t)return t;if(t=Ge({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of Xn(e))if(!Qn.call(t,n))Ge(t,n,{get:ei.bind(e,n),enumerable:!(r=Zn(e,n))||r.enumerable})}return Gt.set(e,t),t},Gt;var ri=(e)=>e;function ni(e,t){this[e]=ri.bind(null,t)}var ii=(e,t)=>{for(var r in t)Ge(e,r,{get:t[r],enumerable:!0,configurable:!0,set:ni.bind(t,r)})};var si=(e,t)=>()=>(e&&(t=e(e=0)),t);var Pn={};ii(Pn,{Alpine:()=>Dn,default:()=>$o});function ai(e){ci(e)}function li(){At=!0}function di(){At=!1,hr()}function ci(e){if(!R.includes(e)){if(R.push(e),e._x_schedulerPriority!==void 0)Ie=!0}hr()}function St(e){let t=R.indexOf(e);if(t!==-1&&t>at)R.splice(t,1)}function hr(){if(!ot&&!st){if(At)return;st=!0,queueMicrotask(ui)}}function ui(){st=!1,ot=!0;for(let e=0;e<R.length;e++){if(Ie)fi(e);R[e](),at=e}R.length=0,at=-1,Ie=!1,ot=!1}function fi(e){let t=new Map,r=R.slice(e).sort((n,i)=>pi(n,i,t));for(let n=0;n<r.length;n++)R[e+n]=r[n];Ie=!1}function pi(e,t,r){if(!Xe(e))return Xe(t)?1:0;if(!Xe(t))return-1;return tr(e._x_schedulerPriority.el,r)-tr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function Xe(e){return e._x_schedulerPriority!==void 0}function tr(e,t){if(t.has(e))return t.get(e);let r=0,n=e;while(e)if(r++,e._x_teleportBack)e=e._x_teleportBack;else if(typeof ShadowRoot==="function"&&e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else e=e.parentElement;return t.set(n,r),r}function bi(e){lt=!1,e(),lt=!0}function mi(e){oe=e.reactive,ae=e.release,ee=(t)=>e.effect(t,{scheduler:(r)=>{if(lt)ai(r);else r()}}),br=e.raw}function rr(e){ee=e}function gi(e){let t=()=>{};return[(n,i)=>{let o=i?.priority==="structural"?hi++:void 0,s=ee(n);if(o!==void 0&&s!==void 0)s._x_schedulerPriority={el:e,order:o};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((a)=>a())};return e._x_effects.add(s),t=()=>{if(s===void 0)return;e._x_effects.delete(s),ae(s)},s},()=>{t()}]}function mr(e,t){let r=!0,n,i,o=ee(()=>{let s=e(),a=JSON.stringify(s);if(!r){if(typeof s==="object"||s!==n){let l=typeof n==="object"?JSON.parse(i):n;queueMicrotask(()=>{t(s,l)})}}n=s,i=a,r=!1});return()=>{St(o),ae(o)}}async function xi(e){li();try{await e(),await Promise.resolve()}finally{di()}}function vi(e){vr.push(e)}function Ct(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,xr.push(t)}function yr(e){gr.push(e)}function _r(e,t,r){if(!e._x_attributeCleanups)e._x_attributeCleanups={};if(!e._x_attributeCleanups[t])e._x_attributeCleanups[t]=[];e._x_attributeCleanups[t].push(r)}function wr(e,t){if(!e._x_attributeCleanups)return;Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{if(t===void 0||t.includes(r))n.forEach((i)=>i()),delete e._x_attributeCleanups[r]})}function yi(e){e._x_effects?.forEach(St);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Tt(){$e.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Ot=!0}function Er(){_i(),$e.disconnect(),Ot=!1}function _i(){let e=$e.takeRecords();z.push(()=>e.length>0&&Ue(e));let t=z.length;queueMicrotask(()=>{if(z.length===t)while(z.length>0)z.shift()()})}function wi(){while(z.length>0)z.shift()();let e=$e.takeRecords();if(e.length>0)Ue(e)}function _(e){if(!Ot)return e();Er();try{return e()}finally{Tt()}}function Ei(){Mt=!0}function ki(){Mt=!1,Ue(Le),Le=[]}function Ue(e){if(Mt){Le=Le.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let o=0;o<e.length;o++){if(e[o].target._x_ignoreMutationObserver)continue;if(e[o].type==="childList")e[o].removedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(!s._x_marker)return;r.add(s)}),e[o].addedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(r.has(s)){r.delete(s);return}if(s._x_marker)return;t.push(s)});if(e[o].type==="attributes"){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,d=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:a,value:s.getAttribute(a)})},c=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(a)};if(s.hasAttribute(a)&&l===null)d();else if(s.hasAttribute(a))c(),d();else c()}}i.forEach((o,s)=>{wr(s,o)}),n.forEach((o,s)=>{gr.forEach((a)=>a(s,o))});for(let o of r){if(t.some((s)=>s.contains(o)))continue;xr.forEach((s)=>s(o))}for(let o of t){if(!o.isConnected)continue;vr.forEach((s)=>s(o))}t=null,r=null,n=null,i=null}function kr(e){return J(se(e))}function Ee(e,t,r){return e._x_dataStack=[t,...se(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function se(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return se(e.host);if(!e.parentNode)return[];return se(e.parentNode)}function J(e){return new Proxy({objects:e},Ai)}function Ar(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Ar(Object.getPrototypeOf(e),t)}function Si(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function It(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,o="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:a,enumerable:l}])=>{if(l===!1||a===void 0)return;if(typeof a==="object"&&a!==null&&a.__v_skip)return;let d=o===""?s:`${o}.${s}`;if(typeof a==="object"&&a!==null&&a._x_interceptor)i[s]=a.initialize(e,d,s,t);else if(r(a)&&a!==i&&!(a instanceof Element))n(a,d)})};return n(e)}function Sr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o,s){return e(this.initialValue,()=>Ci(n,i),(a)=>dt(n,i,a),i,o,s)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a,l)=>{let d=n.initialize(o,s,a,l);return r.initialValue=d,i(o,s,a,l)}}else r.initialValue=n;return r}}function Ci(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function dt(e,t,r){if(typeof t==="string")t=t.split(".");if(t.length===1)e[t[0]]=r;else if(t.length===0)throw error;else if(e[t[0]])return dt(e[t[0]],t.slice(1),r);else return e[t[0]]={},dt(e[t[0]],t.slice(1),r)}function M(e,t){Cr[e]=t}function Ne(e,t){let r=Oi(t);return Object.entries(Cr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Oi(e){let[t,r]=Dr(e),n={interceptor:Sr,...t};return Ct(e,r),n}function Ti(e,t,r,...n){try{return r(...n)}catch(i){je(i,e,t)}}function je(...e){return Or(...e)}function Mi(e){Or=e}function Ii(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
1
+ var{defineProperty:tt,getOwnPropertyNames:oi,getOwnPropertyDescriptor:ai}=Object,li=Object.prototype.hasOwnProperty;function di(e){return this[e]}var ci=(e)=>{var t=(rr??=new WeakMap).get(e),r;if(t)return t;if(t=tt({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of oi(e))if(!li.call(t,n))tt(t,n,{get:di.bind(e,n),enumerable:!(r=ai(e,n))||r.enumerable})}return rr.set(e,t),t},rr;var ui=(e)=>e;function fi(e,t){this[e]=ui.bind(null,t)}var pi=(e,t)=>{for(var r in t)tt(e,r,{get:t[r],enumerable:!0,configurable:!0,set:fi.bind(t,r)})};var hi=(e,t)=>()=>(e&&(t=e(e=0)),t);var jn={};pi(jn,{Alpine:()=>Hn,default:()=>Wo});function mi(e){vi(e)}function gi(){Mt=!0}function xi(){Mt=!1,yr()}function vi(e){if(!R.includes(e)){if(R.push(e),e._x_schedulerPriority!==void 0)Ne=!0}yr()}function It(e){let t=R.indexOf(e);if(t!==-1&&t>ft)R.splice(t,1)}function yr(){if(!ut&&!ct){if(Mt)return;ct=!0,queueMicrotask(yi)}}function yi(){ct=!1,ut=!0;for(let e=0;e<R.length;e++){if(Ne)_i(e);R[e](),ft=e}R.length=0,ft=-1,Ne=!1,ut=!1}function _i(e){let t=new Map,r=R.slice(e).sort((n,i)=>wi(n,i,t));for(let n=0;n<r.length;n++)R[e+n]=r[n];Ne=!1}function wi(e,t,r){if(!rt(e))return rt(t)?1:0;if(!rt(t))return-1;return ar(e._x_schedulerPriority.el,r)-ar(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function rt(e){return e._x_schedulerPriority!==void 0}function ar(e,t){if(t.has(e))return t.get(e);let r=0,n=e;while(e)if(r++,e._x_teleportBack)e=e._x_teleportBack;else if(typeof ShadowRoot==="function"&&e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else e=e.parentElement;return t.set(n,r),r}function ki(e){pt=!1,e(),pt=!0}function Ai(e){le=e.reactive,de=e.release,te=(t)=>e.effect(t,{scheduler:(r)=>{if(pt)mi(r);else r()}}),_r=e.raw}function lr(e){te=e}function Si(e){let t=()=>{};return[(n,i)=>{let a=i?.priority==="structural"?Ei++:void 0,s=te(n);if(a!==void 0&&s!==void 0)s._x_schedulerPriority={el:e,order:a};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((o)=>o())};return e._x_effects.add(s),t=()=>{if(s===void 0)return;e._x_effects.delete(s),de(s)},s},()=>{t()}]}function wr(e,t){let r=!0,n,i,a=te(()=>{let s=e(),o=JSON.stringify(s);if(!r){if(typeof s==="object"||s!==n){let l=typeof n==="object"?JSON.parse(i):n;queueMicrotask(()=>{t(s,l)})}}n=s,i=o,r=!1});return()=>{It(a),de(a)}}async function Ci(e){gi();try{await e(),await Promise.resolve()}finally{xi()}}function Ti(e){Ar.push(e)}function Lt(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,kr.push(t)}function Sr(e){Er.push(e)}function Cr(e,t,r){if(!e._x_attributeCleanups)e._x_attributeCleanups={};if(!e._x_attributeCleanups[t])e._x_attributeCleanups[t]=[];e._x_attributeCleanups[t].push(r)}function Tr(e,t){if(!e._x_attributeCleanups)return;Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{if(t===void 0||t.includes(r))n.forEach((i)=>i()),delete e._x_attributeCleanups[r]})}function Oi(e){e._x_effects?.forEach(It);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Nt(){je.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Dt=!0}function Or(){Mi(),je.disconnect(),Dt=!1}function Mi(){let e=je.takeRecords();q.push(()=>e.length>0&&ze(e));let t=q.length;queueMicrotask(()=>{if(q.length===t)while(q.length>0)q.shift()()})}function Ii(){while(q.length>0)q.shift()();let e=je.takeRecords();if(e.length>0)ze(e)}function w(e){if(!Dt)return e();Or();try{return e()}finally{Nt()}}function Li(){Pt=!0}function Di(){Pt=!1,ze(Pe),Pe=[]}function ze(e){if(Pt){Pe=Pe.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let a=0;a<e.length;a++){if(e[a].target._x_ignoreMutationObserver)continue;if(e[a].type==="childList")e[a].removedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(!s._x_marker)return;r.add(s)}),e[a].addedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(r.has(s)){r.delete(s);return}if(s._x_marker)return;t.push(s)});if(e[a].type==="attributes"){let s=e[a].target,o=e[a].attributeName,l=e[a].oldValue,d=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:o,value:s.getAttribute(o)})},c=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(o)};if(s.hasAttribute(o)&&l===null)d();else if(s.hasAttribute(o))c(),d();else c()}}i.forEach((a,s)=>{Tr(s,a)}),n.forEach((a,s)=>{Er.forEach((o)=>o(s,a))});for(let a of r){if(t.some((s)=>s.contains(a)))continue;kr.forEach((s)=>s(a))}for(let a of t){if(!a.isConnected)continue;Ar.forEach((s)=>s(a))}t=null,r=null,n=null,i=null}function Mr(e){return Y(ae(e))}function Ae(e,t,r){return e._x_dataStack=[t,...ae(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function ae(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return ae(e.host);if(!e.parentNode)return[];return ae(e.parentNode)}function Y(e){return new Proxy({objects:e},Ni)}function Ir(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Ir(Object.getPrototypeOf(e),t)}function Pi(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function Rt(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,a="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:o,enumerable:l}])=>{if(l===!1||o===void 0)return;if(typeof o==="object"&&o!==null&&o.__v_skip)return;let d=a===""?s:`${a}.${s}`;if(typeof o==="object"&&o!==null&&o._x_interceptor)i[s]=o.initialize(e,d,s,t);else if(r(o)&&o!==i&&!(o instanceof Element))n(o,d)})};return n(e)}function Lr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,a,s){return e(this.initialValue,()=>Ri(n,i),(o)=>ht(n,i,o),i,a,s)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(a,s,o,l)=>{let d=n.initialize(a,s,o,l);return r.initialValue=d,i(a,s,o,l)}}else r.initialValue=n;return r}}function Ri(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function ht(e,t,r){if(typeof t==="string")t=t.split(".");if(t.length===1)e[t[0]]=r;else if(t.length===0)throw error;else if(e[t[0]])return ht(e[t[0]],t.slice(1),r);else return e[t[0]]={},ht(e[t[0]],t.slice(1),r)}function M(e,t){Dr[e]=t}function Re(e,t){let r=Bi(t);return Object.entries(Dr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Bi(e){let[t,r]=Hr(e),n={interceptor:Lr,...t};return Lt(e,r),n}function $i(e,t,r,...n){try{return r(...n)}catch(i){qe(i,e,t)}}function qe(...e){return Nr(...e)}function Ui(e){Nr=e}function Hi(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{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)}function Tr(e){let t=K;K=!1;let r=e();return K=t,r}function V(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return Mr(...e)}function Li(e){Mr=e}function Ni(e){Ir=e}function Di(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!K){ct(r,t,J([n,...e]),i);return}let s=t.apply(J([n,...e]),i);ct(r,s)}}function ct(e,t,r,n,i){if(K&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>ct(e,s,r,n)).catch((s)=>je(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Pi(...e){return Ir(...e)}function le(e=""){return Lt+e}function Ri(e){Lt=e}function w(e,t){return De[e]=t,{before(r){if(!De[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=F.indexOf(r);F.splice(n>=0?n:F.indexOf("DEFAULT"),0,e)}}}function Bi(e){return Object.keys(De).includes(e)}function He(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=Lr(o);o=o.map((a)=>{if(s.find((l)=>l.name===a.name))return{name:`x-bind:${a.name}`,value:`"${a.value}"`};return a}),t=t.concat(o)}let n={};return t.map(Br((o,s)=>n[o]=s)).filter(Ur).map(ji(n,r)).sort(Hi).map((o)=>Ui(e,o))}function Lr(e){return Array.from(e).map(Br()).filter((t)=>!Ur(t))}function $i(e){ut=!0;let t=Symbol();Nr=t,fe.set(t,[]);let r=()=>{while(fe.get(t).length)fe.get(t).shift()();fe.delete(t)},n=()=>{ut=!1,r()};e(r),n()}function Dr(e){let t=[],r=(a)=>t.push(a),[n,i]=gi(e);return t.push(i),[{Alpine:de,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:V.bind(V,e)},()=>t.forEach((a)=>a())]}function Ui(e,t){let r=()=>{},n=De[t.type]||r,[i,o]=Dr(e);_r(e,t.original,o);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),ut?fe.get(Nr).push(n):n()};return s.runCleanups=o,s}function Br(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=$r.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Nt(e){$r.push(e)}function Ur({name:e}){return jr().test(e)}function ji(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(jr()),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}}}function Hi(e,t){let r=F.indexOf(e.type)===-1?ft:e.type,n=F.indexOf(t.type)===-1?ft:t.type;return F.indexOf(r)-F.indexOf(n)}function Y(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>Y(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)Y(n,t,!1),n=n.nextElementSibling}function B(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function zi(e){return(...t)=>j&&e(...t)}function ke(e){Hr.push(e)}function qi(e,t){Hr.forEach((r)=>r(e,t)),j=!0,zr(()=>{N(t,(r,n)=>{n(r,()=>{})})}),j=!1}function Fi(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,pt=!0,zr(()=>{Ki(t)}),j=!1,pt=!1}function Ki(e){let t=!1;N(e,(n,i)=>{Y(n,(o,s)=>{if(t&&Xi(o))return s();t=!0,i(o,s)})})}function zr(e){let t=ee;rr((r,n)=>{let i=t(r);return ae(i),()=>{}}),e(),rr(t)}function Vi(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;ze++}r.pending++,Promise.resolve(t).catch((n)=>{try{je(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>Wi(e,r))}function Wi(e,t){if(t.pending--,t.pending>0)return;if(wi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(ze--,!e.isConnected)return;Yi(t),N(e)}function Ji(e,t){if(ze===0)return!1;let r=O(e,(n)=>n._x_deferInit);if(!r)return!1;return qr(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function qr(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function Yi(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=O(r,(o)=>o._x_deferInit);if(n){qr(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((o)=>r.hasAttribute(o)).map((o)=>({name:o,value:r.getAttribute(o)}));if(i.length===0)return;He(r,i).forEach((o)=>o())})}function pe(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function Gi(){if(nr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(nr=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");pe(document,"alpine:init"),pe(document,"alpine:initializing"),Tt(),vi((t)=>N(t,Y)),Ct((t)=>te(t)),yr((t,r)=>{if(Ji(t,r))return;He(t,r).forEach((n)=>n())});let e=(t)=>!qe(t.parentElement,!0);Array.from(document.querySelectorAll(Vr().join(","))).filter(e).forEach((t)=>{N(t)}),pe(document,"alpine:initialized"),setTimeout(()=>{es()})}function Kr(){return Dt.map((e)=>e())}function Vr(){return Dt.concat(Fr).map((e)=>e())}function Wr(e){Dt.push(e)}function Jr(e){Fr.push(e)}function qe(e,t=!1){return O(e,(r)=>{if((t?Vr():Kr()).some((i)=>r.matches(i)))return!0})}function O(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return O(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return O(e.parentNode.host,t);if(!e.parentElement)return;return O(e.parentElement,t)}function Xi(e){return Kr().some((t)=>e.matches(t))}function Zi(e){Yr.push(e)}function N(e,t=Y,r=()=>{}){if(O(e,(n)=>n._x_ignore))return;$i(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),Yr.forEach((o)=>o(n,i)),He(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=Qi++;n._x_ignore&&i()})})}function te(e,t=Y){t(e,(r)=>{yi(r),wr(r),delete r._x_marker})}function es(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Bi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Rt(e=()=>{}){return queueMicrotask(()=>{Pt||setTimeout(()=>{bt()})}),new Promise((t)=>{ht.push(()=>{e(),t()})})}function bt(){Pt=!1;while(ht.length)ht.shift()()}function ts(){Pt=!0}function Bt(e,t){if(Array.isArray(t))return ir(e,t.join(" "));else if(typeof t==="object"&&t!==null)return rs(e,t);else if(typeof t==="function")return Bt(e,t());return ir(e,t)}function mt(e){return e.split(/\s/).filter(Boolean)}function ir(e,t){let r=(i)=>mt(i).filter((o)=>!e.classList.contains(o)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function rs(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?mt(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?mt(s):!1).filter(Boolean),i=[],o=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),o.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{o.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function Fe(e,t){if(typeof t==="object"&&t!==null)return ns(e,t);return is(e,t)}function ns(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=ss(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Fe(e,r)}}function is(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function ss(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function gt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function os(e,t,r){Gr(e,Bt,""),{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 as(e,t,r){Gr(e,Fe);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);if(t.includes("in")&&!n)t=t.filter((b,k)=>k<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((b,k)=>k>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),d=a?0:1,c=l?ce(t,"scale",95)/100:1,u=ce(t,"delay",0)/1000,f=ce(t,"origin","center"),g="opacity, transform",m=ce(t,"duration",150)/1000,p=ce(t,"duration",75)/1000,h="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${m}s`,transitionTimingFunction:h},e._x_transition.enter.start={opacity:d,transform:`scale(${c})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${p}s`,transitionTimingFunction:h},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:d,transform:`scale(${c})`}}function Gr(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){xt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){xt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function Xr(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:Xr(t)}function xt(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,d;ls(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),d=t(e,i)},after:s,cleanup(){l(),d()}})}function ls(e,t){let r,n,i,o=gt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),bt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:gt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),ts(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;_(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;_(()=>{t.end()}),bt(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function ce(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function Zr(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=oe({});switch(e._x_bindings[t]=r,t=n.includes("camel")?ms(t):t,t){case"value":ds(e,r);break;case"style":us(e,r);break;case"class":cs(e,r);break;case"selected":case"checked":fs(e,t,r);break;default:$t(e,t,r);break}}function ds(e,t){if(Ut(e)){if(e.attributes.value===void 0)e.value=t}else if(Pe(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>gs(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")bs(e,t);else if(e.tagName==="OPTION")$t(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function cs(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Bt(e,t)}function us(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Fe(e,t)}function fs(e,t,r){$t(e,t,r),hs(e,t,r)}function $t(e,t,r){if([null,void 0,!1].includes(r)&&vs(t))e.removeAttribute(t);else{if(Qr(t))r=t;if(ys(r))r=JSON.stringify(r);ps(e,t,r)}}function ps(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function hs(e,t,r){if(e[t]!==r)e[t]=r}function bs(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function ms(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function gs(e,t){return e==t}function Me(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function Qr(e){return xs.has(e)}function vs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function ys(e){return typeof e==="object"&&e!==null}function _s(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return en(e,t,r)}function ws(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,Tr(()=>V(e,i.expression))}return en(e,t,r)}function en(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(Qr(t))return!![t,"true"].includes(n);return n}function Pe(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Ut(e){return e.type==="radio"||e.localName==="ui-radio"}function tn(e,t){let r;return function(){let n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function rn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function nn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=ee(()=>{let l=e(),d=r();if(i)n(Ze(l)),i=!1;else{let c=JSON.stringify(l),u=JSON.stringify(d);if(c!==o)n(Ze(l));else if(c!==u)t(Ze(d))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{St(a),ae(a)}}function Ze(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Es(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(de))}function ks(e,t){if(!sr)P=oe(P),sr=!0;if(t===void 0)return P[e];if(P[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)P[e]=t.initialize(P,e,e,()=>{});else It(P[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")P[e].init()}function As(){return P}function Ss(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return on(e,r());else sn[e]=r;return()=>{}}function Cs(e){return Object.entries(sn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function on(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Lr(i);return i=i.map((s)=>{if(o.find((a)=>a.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),He(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Os(e,t){an[e]=t}function Ts(e,t){return Object.entries(an).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function dn(e){try{let r=new Ls(e).tokenize(),i=new Ns(r).parse(),o=new Ds;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:d=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:d})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Ps(e,t,r={}){let n=cn(e),i=J([r.scope??{},...n]),o=r.params??[],a=dn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&K)return a.apply(i,o);return a}function Rs(e,t){let r=cn(e);if(typeof t==="function")return Di(r,t);let n=Bs(e,t,r);return Ti.bind(null,e,t,n)}function cn(e){let t={};return Ne(t,e),[t,...se(e)]}function Bs(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:o=[]}={})=>{let s=J([i,...r]),l=dn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(K&&typeof l==="function"){let d=l.apply(l,o);if(d instanceof Promise)d.then((c)=>n(c));else n(d)}else if(typeof l==="object"&&l instanceof Promise)l.then((d)=>n(d));else n(l)}}function un(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function G(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function Fs(e,t=!1){if(e.flags|=8,t){e.next=me,me=e;return}e.next=be,be=e}function Ht(){bn++}function zt(){if(--bn>0)return;if(me){let t=me;me=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(be){let t=be;be=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function mn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function gn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;qt(n),Vs(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function yt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ks(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Ks(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Re)return;if(e.globalVersion=Re,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!yt(e)))return;e.flags|=2;let t=e.dep,r=x,n=T;x=e,T=!0;try{mn(e);let i=e.fn(e._value);if(t.version===0||q(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{x=r,T=n,gn(e),e.flags&=-3}}function qt(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let o=r.computed.deps;o;o=o.nextDep)qt(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function Vs(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function Ws(e,t){if(e.effect instanceof ar)e=e.effect.fn;let r=new ar(e);if(t)xe(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function Js(e){e.effect.stop()}function Ys(){xn.push(T),T=!1}function Gs(){let e=xn.pop();T=e===void 0?!0:e}function lr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=x;x=void 0;try{t()}finally{x=r}}}function vn(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)vn(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function S(e,t,r){if(T&&x){let n=_t.get(e);if(!n)_t.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new Zs),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function U(e,t,r,n,i,o){let s=_t.get(e);if(!s){Re++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Ht(),t==="clear")s.forEach(a);else{let l=ve(e),d=l&&jt(r);if(l&&r==="length"){let c=Number(n);s.forEach((u,f)=>{if(f==="length"||f===_e||!Ae(f)&&f>=c)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(d)a(s.get(_e));switch(t){case"add":if(!l){if(a(s.get(W)),he(e))a(s.get(wt))}else if(d)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(W)),he(e))a(s.get(wt))}break;case"set":if(he(e))a(s.get(W));break}}}zt()}function ne(e){let t=v(e);if(t===e)return t;return S(t,"iterate",_e),Z(e)?t:t.map(Q)}function Ft(e){return S(e=v(e),"iterate",_e),e}function I(e,t){if(X(e))return Sn(e)?we(Q(t)):we(t);return Q(t)}function tt(e,t,r){let n=Ft(e),i=n[t]();if(n!==e&&!Z(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function D(e,t,r,n,i,o){let s=Ft(e),a=s!==e&&!Z(e),l=s[t];if(l!==eo[t]){let u=l.apply(e,o);return a?Q(u):u}let d=r;if(s!==e){if(a)d=function(u,f){return r.call(this,I(e,u),f,e)};else if(r.length>2)d=function(u,f){return r.call(this,u,f,e)}}let c=l.call(s,d,n);return a&&i?i(c):c}function dr(e,t,r,n){let i=Ft(e),o=i!==e&&!Z(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(d,c,u){if(a)a=!1,d=I(e,d);return r.call(this,d,I(e,c),u,e)};else if(r.length>3)s=function(d,c,u){return r.call(this,d,c,u,e)}}let l=i[t](s,...n);return a?I(e,l):l}function rt(e,t,r){let n=v(e);S(n,"iterate",_e);let i=n[t](...r);if((i===-1||i===!1)&&bo(r[0]))return r[0]=v(r[0]),n[t](...r);return i}function ue(e,t,r=[]){Ys(),Ht();let n=v(e)[t].apply(e,r);return zt(),Gs(),n}function ro(e){if(!Ae(e))e=String(e);let t=v(this);return S(t,"has",e),t.hasOwnProperty(e)}function ao(e,t,r){return function(...n){let i=this.__v_raw,o=v(i),s=he(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,d=i[e](...n),c=r?Et:t?we:Q;return!t&&S(o,"iterate",l?wt:W),xe(Object.create(d),{next(){let{value:u,done:f}=d.next();return f?{value:u,done:f}:{value:a?[c(u[0]),c(u[1])]:c(u),done:f}}})}}function Oe(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";G(`${hn(e)} operation ${r}failed: target is readonly.`,v(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function lo(e,t){let r={get(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(q(i,a))S(s,"get",i);S(s,"get",a)}let{has:l}=Ce(s),d=t?Et:e?we:Q;if(l.call(s,i))return d(o.get(i));else if(l.call(s,a))return d(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&S(v(i),"iterate",W),i.size},has(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(q(i,a))S(s,"has",i);S(s,"has",a)}return i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){let s=this,a=s.__v_raw,l=v(a),d=t?Et:e?we:Q;return!e&&S(l,"iterate",W),a.forEach((c,u)=>i.call(o,d(c),d(u),s))}};return xe(r,e?{add:Oe("add"),set:Oe("set"),delete:Oe("delete"),clear:Oe("clear")}:{add(i){let o=v(this),s=Ce(o),a=v(i),l=!t&&!Z(i)&&!X(i)?a:i;if(!(s.has.call(o,l)||q(i,l)&&s.has.call(o,i)||q(a,l)&&s.has.call(o,a)))o.add(l),U(o,"add",l,l);return this},set(i,o){if(!t&&!Z(o)&&!X(o))o=v(o);let s=v(this),{has:a,get:l}=Ce(s),d=a.call(s,i);if(!d)i=v(i),d=a.call(s,i);else cr(s,a,i);let c=l.call(s,i);if(s.set(i,o),!d)U(s,"add",i,o);else if(q(o,c))U(s,"set",i,o,c);return this},delete(i){let o=v(this),{has:s,get:a}=Ce(o),l=s.call(o,i);if(!l)i=v(i),l=s.call(o,i);else cr(o,s,i);let d=a?a.call(o,i):void 0,c=o.delete(i);if(l)U(o,"delete",i,void 0,d);return c},clear(){let i=v(this),o=i.size!==0,s=he(i)?new Map(i):new Set(i),a=i.clear();if(o)U(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=ao(i,e,t)}),r}function wn(e,t){let r=lo(e,t);return(n,i,o)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(vt(r,i)&&i in n?r:n,i,o)}}function cr(e,t,r){let n=v(r);if(n!==r&&t.call(e,n)){let i=pn(e);G(`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.`)}}function ho(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Kt(e){if(X(e))return e;return An(e,!1,so,co,En)}function kt(e){return An(e,!0,oo,uo,kn)}function An(e,t,r,n,i){if(!ye(e))return G(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let o=i.get(e);if(o)return o;let s=ho(pn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Sn(e){if(X(e))return Sn(e.__v_raw);return!!(e&&e.__v_isReactive)}function X(e){return!!(e&&e.__v_isReadonly)}function Z(e){return!!(e&&e.__v_isShallow)}function bo(e){return e?!!e.__v_raw:!1}function v(e){let t=e&&e.__v_raw;return t?v(t):e}function ge(e){return e?e.__v_isRef===!0:!1}function mo(e){let t=[];return O(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Cn(e){if(!nt[e])nt[e]=0;return++nt[e]}function go(e,t){return O(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function xo(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Cn(t)}function vo(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function On(e,t,r){M(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function ur(e){let t=B(()=>document.querySelector(e),()=>yo)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function ie(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,d)=>(c)=>d(l,c);if(r.includes("dot"))t=_o(t);if(r.includes("camel"))t=wo(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(o=Mn(r,o),r.includes("prevent"))o=a(o,(l,d)=>{d.preventDefault(),l(d)});if(r.includes("stop"))o=a(o,(l,d)=>{d.stopPropagation(),l(d)});if(r.includes("once"))o=a(o,(l,d)=>{l(d),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,d)=>{if(e.contains(d.target))return;if(d.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(d)});if(r.includes("self"))o=a(o,(l,d)=>{d.target===e&&l(d)});if(t==="submit")o=a(o,(l,d)=>{if(d.target._x_pendingModelUpdates)d.target._x_pendingModelUpdates.forEach((c)=>c());l(d)});if(ko(t)||In(t))o=a(o,(l,d)=>{if(So(d,r))return;l(d)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Mn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Be(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=tn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Be(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=rn(t,n)}return t}function _o(e){return e.replace(/-/g,".")}function wo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Be(e){return!Array.isArray(e)&&!isNaN(e)}function Eo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function ko(e){return["keydown","keyup"].includes(e)}function In(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function So(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!Ao.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Be((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Be((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&fr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((o)=>r.includes(o));if(r=r.filter((o)=>!i.includes(o)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(In(e.type))return!1;if(fr(e.key).includes(r[0]))return!1}}return!0}function fr(e){if(!e)return[];e=Eo(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:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function Te(e,t,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Pe(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=it(r.target.value);else if(t.includes("boolean"))i=Me(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!Co(o,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return it(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return Me(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Ut(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return it(i);else if(t.includes("boolean"))return Me(i);else if(t.includes("trim"))return i.trim();else return i}})}function it(e){let t=e?parseFloat(e):null;return Oo(t)?t:e}function Co(e,t){return e==t}function Oo(e){return!Array.isArray(e)&&!isNaN(e)}function pr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function To(e,t){e._x_keyExpression=t}function Mo(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function Io(e){if(!j)return!1;if(pt)return!0;return e.hasAttribute("data-has-alpine-state")}function Lo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function No(e,t,r,n){r((i)=>{if(Ro(i))i=Array.from({length:i},(d,c)=>c+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let o=e._x_lookup,s=new Map;e._x_lookup=s;let a=Bo(i),l=Object.entries(i).map(([d,c])=>{if(!a)d=parseInt(d);let u=Po(t,c,d,i),f;return n((g)=>{if(typeof g==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(g))s.set(g,o.get(g)),o.delete(g);f=g},{scope:{index:d,...u}}),[f,u]});_(()=>{o.forEach((u)=>{te(u),u.remove()});let d=new Set,c=e;if(l.forEach(([u,f])=>{if(s.has(u)){let p=s.get(u);if(p._x_refreshXForScope(f),c.nextElementSibling!==p){if(c.nextElementSibling)p.replaceWith(c.nextElementSibling);c.after(p)}if(c=p,p._x_currentIfEl){if(p.nextElementSibling!==p._x_currentIfEl)c.after(p._x_currentIfEl);c=p._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let g=document.importNode(e.content,!0).firstElementChild,m=oe(f);Ee(g,m,e),g._x_refreshXForScope=Lo(m),s.set(u,g),d.add(g),c.after(g),c=g}),d.forEach((u)=>N(u)),c!==e)e._x_lastRenderedEl=c;else delete e._x_lastRenderedEl})})}function Do(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\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);if(a){if(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2])o.collection=a[2].trim()}else o.item=s;return o}function Po(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,a)=>{i[s]=t[a]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function Ro(e){return typeof e!=="object"&&!isNaN(e)}function Bo(e){return typeof e==="object"&&!Array.isArray(e)}function Nn(){}function Ve(e,t,r){w(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var st=!1,ot=!1,R,at=-1,Ie=!1,At=!1,oe,ee,ae,br,hi=0,lt=!0,gr,xr,vr,$e,Ot=!1,z,Mt=!1,Le,Ai,Cr,Or,K=!0,Mr=()=>{},Ir,Lt="x-",De,ut=!1,fe,Nr,Pr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Rr=(e)=>e,$r,jr=()=>new RegExp(`^${Lt}([^:^.]+)\\b`),ft="DEFAULT",F,j=!1,Hr,pt=!1,ze=0,nr=!1,Dt,Fr,Yr,Qi=1,ht,Pt=!1,xs,P,sr=!1,sn,an,Ms,de,or,ln,E=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Is,Ls=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new E("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
6
- `)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){let e=this.position,t=!1;while(this.position<this.input.length){let n=this.input[this.position];if(this.isDigit(n))this.position++;else if(n==="."&&!t)t=!0,this.position++;else break}let r=this.input.slice(e,this.position);this.tokens.push(new E("NUMBER",parseFloat(r),e,this.position))}readIdentifierOrKeyword(){let e=this.position;while(this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]))this.position++;let t=this.input.slice(e,this.position);if(["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(t))if(t==="true"||t==="false")this.tokens.push(new E("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new E("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new E("UNDEFINED",void 0,e,this.position));else this.tokens.push(new E("KEYWORD",t,e,this.position));else this.tokens.push(new E("IDENTIFIER",t,e,this.position))}readString(){let e=this.position,t=this.input[this.position];this.position++;let r="",n=!1;while(this.position<this.input.length){let i=this.input[this.position];if(n){switch(i){case"n":r+=`
7
- `;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let o=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(o))r+=String.fromCharCode(parseInt(o,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new E("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new E("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new E("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new E("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new E("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new E("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new E("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new E(i,t,e,this.position))}}},Ns=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return Is.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},Ds=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let h=t[e.name];if(this.checkForDangerousValues(h),typeof h==="function")return h.bind(t);return h}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let o;if(e.computed)o=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else o=e.property.name;this.checkForDangerousKeywords(o);let s=i[o];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let a=e.arguments.map((h)=>this.evaluate({node:h,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let h=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),b;if(e.callee.computed)b=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else b=e.callee.property.name;this.checkForDangerousKeywords(b);let k=h[b];if(typeof k!=="function")throw Error("Value is not a function");l=k.apply(h,a)}else if(e.callee.type==="Identifier"){let h=e.callee.name,b;if(h in t)b=t[h];else throw Error(`Undefined variable: ${h}`);if(typeof b!=="function")throw Error("Value is not a function");let k=r!==null?r:t;l=b.apply(k,a)}else{let h=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof h!=="function")throw Error("Value is not a function");l=h.apply(r,a)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let d=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!d;case"-":return-d;case"+":return+d;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let h=e.argument.name;if(!(h in t))throw Error(`Undefined variable: ${h}`);let b=t[h];if(e.operator==="++")t[h]=b+1;else if(e.operator==="--")t[h]=b-1;return e.prefix?t[h]:b}else if(e.argument.type==="MemberExpression"){let h=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),b=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(h))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(b);let k=h[b];if(e.operator==="++")h[b]=k+1;else if(e.operator==="--")h[b]=k-1;return e.prefix?h[b]:k}throw Error("Invalid update expression target");case"BinaryExpression":let c=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return c&&u();if(e.operator==="||")return c||u();let f=u();switch(e.operator){case"+":return c+f;case"-":return c-f;case"*":return c*f;case"/":return c/f;case"%":return c%f;case"==":return c==f;case"!=":return c!=f;case"===":return c===f;case"!==":return c!==f;case"<":return c<f;case">":return c>f;case"<=":return c<=f;case">=":return c>=f;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let m=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=m,m;else if(e.left.type==="MemberExpression"){let h=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),b=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(h))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(b),h[b]=m,m}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((h)=>this.evaluate({node:h,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let h of e.properties){let b=h.computed?this.evaluate({node:h.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):h.key.type==="Identifier"?h.key.name:this.evaluate({node:h.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),k=this.evaluate({node:h.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[b]=k}return p;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(or.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(ln.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return or.set(e,!0),!0}},ra,na,xe,$s,vt=(e,t)=>$s.call(e,t),ve,he=(e)=>fn(e)==="[object Map]",Us=(e)=>typeof e==="string",Ae=(e)=>typeof e==="symbol",ye=(e)=>e!==null&&typeof e==="object",js,fn=(e)=>js.call(e),pn=(e)=>fn(e).slice(8,-1),jt=(e)=>Us(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ke=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},Hs,ia,zs,sa,hn,oa,q=(e,t)=>!Object.is(e,t),qs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",aa,Qe,x,et,ar=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Qe)if(Qe.active)Qe.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,et.has(this))et.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Fs(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,lr(this),mn(this);let e=x,t=T;x=this,T=!0;try{return this.fn()}finally{if(x!==this)G("Active effect was not restored correctly - this is likely a Vue internal bug.");gn(this),x=e,T=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)qt(e);this.deps=this.depsTail=void 0,lr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)et.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(yt(this))this.run()}get dirty(){return yt(this)}},bn=0,be,me,T=!0,xn,Re=0,Xs=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Zs=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!x||!T||x===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==x){if(t=this.activeLink=new Xs(x,this),!x.deps)x.deps=x.depsTail=t;else t.prevDep=x.depsTail,x.depsTail.nextDep=t,x.depsTail=t;vn(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=x.depsTail,t.nextDep=void 0,x.depsTail.nextDep=t,x.depsTail=t,x.deps===t)x.deps=r}}if(x.onTrack)x.onTrack(xe({effect:x},e));return t}trigger(e){this.version++,Re++,this.notify(e)}notify(e){Ht();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(xe({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{zt()}}},_t,W,wt,_e,Qs,eo,to,yn,_n=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?po:kn:i?fo:En).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=ve(e);if(!n){let a;if(o&&(a=Qs[t]))return a;if(t==="hasOwnProperty")return ro}let s=Reflect.get(e,t,ge(e)?e:r);if(Ae(t)?yn.has(t):to(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ge(s)){let a=o&&jt(t)?s:s.value;return n&&ye(a)?kt(a):a}if(ye(s))return n?kt(s):Kt(s);return s}},no,io,so,oo,Et=(e)=>e,Ce=(e)=>Reflect.getPrototypeOf(e),co,uo,En,fo,kn,po,Q=(e)=>ye(e)?Kt(e):e,we=(e)=>ye(e)?kt(e):e,nt,yo,Tn=()=>{},Ao,Ln=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Cs(l),A(e,n)((c)=>{on(e,c,i)},{scope:l});return}if(t==="key")return To(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=A(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>Zr(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},H,Dn,$o;var Rn=si(()=>{R=[];gr=[],xr=[],vr=[];$e=new MutationObserver(Ue);z=[];Le=[];Ai={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return Si;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=Ar(s,t),i)break;if(!i)i=e[e.length-1];let o=Object.getOwnPropertyDescriptor(i,t);if(o?.set&&o?.get)return o.set.call(n,r)||!0;return Reflect.set(i,t,r)}};Cr={};Or=Ii;De={};fe=new Map,Nr=Symbol();$r=[];F=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",ft,"teleport"];Hr=[];ke((e,t)=>{if(ze===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(O(e,(r)=>r._x_deferInit))t._x_ignore=!0});Dt=[],Fr=[];Yr=[];ht=[];w("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")as(e,r,t);else os(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(t){if(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();else 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&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=Xr(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let d=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([c])=>c?.());return delete l._x_hidePromise,delete l._x_hideChildren,d};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};xs=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);P={};sn={};an={};Ms={get reactive(){return oe},get release(){return ae},get effect(){return ee},get raw(){return br},get transaction(){return xi},version:"3.17.4",flushAndStopDeferringMutations:ki,dontAutoEvaluateFunctions:Tr,disableEffectScheduling:bi,startObservingMutations:Tt,stopObservingMutations:Er,setReactivityEngine:mi,onAttributeRemoved:_r,onAttributesAdded:yr,closestDataStack:se,skipDuringClone:B,onlyDuringClone:zi,addRootSelector:Wr,addInitSelector:Jr,setErrorHandler:Mi,interceptClone:ke,addScopeToNode:Ee,deferMutations:Ei,mapAttributes:Nt,evaluateLater:A,interceptInit:Zi,initInterceptors:It,injectMagics:Ne,setEvaluator:Li,setRawEvaluator:Ni,mergeProxies:J,extractProp:ws,findClosest:O,onElRemoved:Ct,closestRoot:qe,destroyTree:te,interceptor:Sr,transition:xt,setStyles:Fe,mutateDom:_,deferInit:Vi,directive:w,entangle:nn,throttle:rn,debounce:tn,evaluate:V,evaluateRaw:Pi,initTree:N,nextTick:Rt,prefixed:le,prefix:Ri,plugin:Es,magic:M,store:ks,start:Gi,clone:Fi,cloneNode:qi,bound:_s,$data:kr,watch:mr,walk:Y,data:Os,bind:Ss},de=Ms,or=new WeakMap,ln=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}ln.add(t)});Is=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];ra=Object.freeze({}),na=Object.freeze([]),xe=Object.assign,$s=Object.prototype.hasOwnProperty,ve=Array.isArray,js=Object.prototype.toString,Hs=/-\w/g,ia=Ke((e)=>e.replace(Hs,(t)=>t.slice(1).toUpperCase())),zs=/\B([A-Z])/g,sa=Ke((e)=>e.replace(zs,"-$1").toLowerCase()),hn=Ke((e)=>e.charAt(0).toUpperCase()+e.slice(1)),oa=Ke((e)=>e?`on${hn(e)}`:""),aa=un(qs+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");et=new WeakSet;xn=[];_t=new WeakMap,W=Symbol("Object iterate"),wt=Symbol("Map keys iterate"),_e=Symbol("Array iterate");Qs={__proto__:null,[Symbol.iterator](){return tt(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return ne(this).concat(...e.map((t)=>ve(t)?ne(t):t))},entries(){return tt(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return D(this,"every",e,t,void 0,arguments)},filter(e,t){return D(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return D(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return D(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return D(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return D(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return D(this,"forEach",e,t,void 0,arguments)},includes(...e){return rt(this,"includes",e)},indexOf(...e){return rt(this,"indexOf",e)},join(e){return ne(this).join(e)},lastIndexOf(...e){return rt(this,"lastIndexOf",e)},map(e,t){return D(this,"map",e,t,void 0,arguments)},pop(){return ue(this,"pop")},push(...e){return ue(this,"push",e)},reduce(e,...t){return dr(this,"reduce",e,t)},reduceRight(e,...t){return dr(this,"reduceRight",e,t)},shift(){return ue(this,"shift")},some(e,t){return D(this,"some",e,t,void 0,arguments)},splice(...e){return ue(this,"splice",e)},toReversed(){return ne(this).toReversed()},toSorted(e){return ne(this).toSorted(e)},toSpliced(...e){return ne(this).toSpliced(...e)},unshift(...e){return ue(this,"unshift",e)},values(){return tt(this,"values",(e)=>I(this,e))}};eo=Array.prototype;to=un("__proto__,__v_isRef,__isVue"),yn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Ae));no=class extends _n{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=ve(e)&&jt(t);if(!this._isShallow){let l=X(i);if(!Z(r)&&!X(r))i=v(i),r=v(r);if(!o&&ge(i)&&!ge(r))if(l)return G(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=o?Number(t)<e.length:vt(e,t),a=Reflect.set(e,t,r,ge(e)?e:n);if(e===v(n)&&a){if(!s)U(e,"add",t,r);else if(q(r,i))U(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=vt(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)U(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Ae(t)||!yn.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",ve(e)?"length":W),Reflect.ownKeys(e)}},io=class extends _n{constructor(e=!1){super(!0,e)}set(e,t){return G(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return G(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},so=new no,oo=new io;co={get:wn(!1,!1)},uo={get:wn(!0,!1)};En=new WeakMap,fo=new WeakMap,kn=new WeakMap,po=new WeakMap;M("nextTick",()=>Rt);M("dispatch",(e)=>pe.bind(pe,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=mr(()=>{let l;return o((d)=>l=d),l},i);r(a)});M("store",As);M("data",(e)=>kr(e));M("root",(e)=>qe(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=J(mo(e)),e._x_refs_proxy});nt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return vo(e,i,t,()=>{let o=go(e,r),s=o?o._x_ids[r]:Cn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});ke((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);On("Focus","focus","focus");On("Persist","persist","persist");w("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let c;return o((u)=>c=u),c},a=n(`${t} = __placeholder`),l=(c)=>a(()=>{},{scope:{__placeholder:c}}),d=s();l(d),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let c=e._x_model.get,u=e._x_model.setWithModifiers,f=nn({get(){return c()},set(g){u(g)}},{get(){return s()},set(g){l(g)}});i(f)})});w("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=ur(r),o=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((a)=>{o.addEventListener(a,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Ee(o,{},e);let s=(a,l,d)=>{if(d.includes("prepend"))l.parentNode.insertBefore(a,l);else if(d.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};_(()=>{B(()=>{s(o,i,t),N(o)})()}),e._x_teleportPutBack=()=>{let a=ur(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),te(o)}))});yo=document.createElement("div");Tn.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",Tn);w("effect",B((e,{expression:t},{effect:r})=>{r(A(e,t))}));Ao=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];w("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=O(e,(p)=>p!==e);let s=A(o,r),a;if(typeof r==="string")a=A(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=A(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let p;return s((h)=>p=h),pr(p)?p.get():p},d=(p)=>{let h;if(s((b)=>h=b),pr(h))h.set(p);else a(()=>{},{scope:{__placeholder:p}})};if(typeof r==="string"&&e.type==="radio")_(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let c=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),f=t.includes("enter"),g=c||u||f,m;if(j)m=()=>{};else if(g){let p=[],h=(b)=>d(Te(e,t,b,l()));if(c)p.push(ie(e,"change",t,h));if(u){if(p.push(ie(e,"blur",t,h)),e.form){let b=e.form,k=()=>h({target:e});if(!b._x_pendingModelUpdates)b._x_pendingModelUpdates=[];b._x_pendingModelUpdates.push(k),i(()=>{if(b._x_pendingModelUpdates)b._x_pendingModelUpdates.splice(b._x_pendingModelUpdates.indexOf(k),1)})}}if(f)p.push(ie(e,"keydown",t,(b)=>{if(b.key==="Enter")h(b)}));m=()=>p.forEach((b)=>b())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=ie(e,p,t,(h)=>{d(Te(e,t,h,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Pe(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)d(Te(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=m,i(()=>e._x_removeModelListeners.default()),e.form){let p=ie(e.form,"reset",[],(h)=>{Rt(()=>e._x_model&&e._x_model.set(Te(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){d(p)},setWithModifiers:Mn(t,d)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";_(()=>{if(Pe(e))if(Array.isArray(p))e.checked=p.some((h)=>h==e.value);else e.checked=!!p;else if(Ut(e))if(typeof p==="boolean")e.checked=Me(e.value)===p;else e.checked=e.value==p;else Zr(e,"value",p)})},e.tagName==="SELECT"){let p=new MutationObserver(()=>{e._x_forceModelUpdate(l())});p.observe(e,{childList:!0}),i(()=>p.disconnect())}n(()=>{let p=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(p)})});w("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(le("cloak")))));Jr(()=>`[${le("init")}]`);w("init",B((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));w("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{e.textContent=o})})})});w("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>te(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,N(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Nt(Pr(":",Rr(le("bind:"))));Ln.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};w("bind",Ln);Wr(()=>`[${le("data")}]`);H=Symbol();w("data",(e,{expression:t},{cleanup:r})=>{if(Io(e))return;let n=e[H];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Ne(i,e);let o={};Ts(o,i);let s=V(e,t,{scope:o});if(s===void 0||s===!0)s={};Ne(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Mo(a,s);let d={expression:t};e[H]=d,queueMicrotask(()=>{if(e[H]===d)delete e[H]})}else a=oe(s);It(a,r);let l=Ee(e,a);B(()=>{a.init&&V(e,a.init)})(),r(()=>{a.destroy&&V(e,a.destroy),l();let d={reactiveData:a};e[H]=d,queueMicrotask(()=>{if(e[H]===d)delete e[H]})})});ke((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});w("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=A(e,r);if(!e._x_doHide)e._x_doHide=()=>{_(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{_(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else 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=gt((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),d,c=!0;n(()=>i((u)=>{if(!c&&u===d)return;if(t.includes("immediate"))u?a():o();l(u),d=u,c=!1}))});w("for",B((e,{expression:t},{effect:r,cleanup:n})=>{let i=Do(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>No(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{te(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Nn.inline=(e,{expression:t},{cleanup:r})=>{let n=qe(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",Nn);w("if",B((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=A(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Ee(a,{},e),_(()=>{e.after(a),N(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{te(a),a.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},a},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((a)=>{a?o():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));w("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>xo(e,i))});ke((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Nt(Pr("@",Rr(le("on:"))));w("on",B((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?A(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let s=ie(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));Ve("Collapse","collapse","collapse");Ve("Intersect","intersect","intersect");Ve("Focus","trap","focus");Ve("Mask","mask","mask");w("html",(e,{expression:t})=>{je(Error("Using the x-html directive is prohibited in the CSP build"),e)});de.setEvaluator(Rs);de.setRawEvaluator(Ps);de.setReactivityEngine({reactive:Kt,effect:(e,t={})=>{let r;return r=Ws(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:Js,raw:v});Dn=de,$o=Dn;/*! Bundled license information:
5
+ `:""}`,t),setTimeout(()=>{throw e},0)}function Pr(e){let t=V;V=!1;let r=e();return V=t,r}function W(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return Rr(...e)}function ji(e){Rr=e}function zi(e){Br=e}function qi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:a}={})=>{if(!V){bt(r,t,Y([n,...e]),i);return}let s=t.apply(Y([n,...e]),i);bt(r,s)}}function bt(e,t,r,n,i){if(V&&typeof t==="function"){let a=t.apply(r,n);if(a instanceof Promise)a.then((s)=>bt(e,s,r,n)).catch((s)=>qe(s,i,t));else e(a)}else if(typeof t==="object"&&t instanceof Promise)t.then((a)=>e(a));else e(t)}function Fi(...e){return Br(...e)}function ce(e=""){return Bt+e}function Ki(e){Bt=e}function E(e,t){return Be[e]=t,{before(r){if(!Be[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=K.indexOf(r);K.splice(n>=0?n:K.indexOf("DEFAULT"),0,e)}}}function Vi(e){return Object.keys(Be).includes(e)}function Fe(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let a=Object.entries(e._x_virtualDirectives).map(([o,l])=>({name:o,value:l})),s=$r(a);a=a.map((o)=>{if(s.find((l)=>l.name===o.name))return{name:`x-bind:${o.name}`,value:`"${o.value}"`};return o}),t=t.concat(a)}let n={};return t.map(qr((a,s)=>n[a]=s)).filter(Kr).map(Yi(n,r)).sort(Gi).map((a)=>Ji(e,a))}function $r(e){return Array.from(e).map(qr()).filter((t)=>!Kr(t))}function Wi(e){mt=!0;let t=Symbol();Ur=t,he.set(t,[]);let r=()=>{while(he.get(t).length)he.get(t).shift()();he.delete(t)},n=()=>{mt=!1,r()};e(r),n()}function Hr(e){let t=[],r=(o)=>t.push(o),[n,i]=Si(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:W.bind(W,e)},()=>t.forEach((o)=>o())]}function Ji(e,t){let r=()=>{},n=Be[t.type]||r,[i,a]=Hr(e);Cr(e,t.original,a);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),mt?he.get(Ur).push(n):n()};return s.runCleanups=a,s}function qr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Fr.reduce((a,s)=>s(a),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function $t(e){Fr.push(e)}function Kr({name:e}){return Vr().test(e)}function Yi(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Vr()),a=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],o=t||e[r]||r;return{type:i?i[1]:null,value:a?a[1]:null,modifiers:s.map((l)=>l.replace(".","")),expression:n,original:o}}}function Gi(e,t){let r=K.indexOf(e.type)===-1?gt:e.type,n=K.indexOf(t.type)===-1?gt:t.type;return K.indexOf(r)-K.indexOf(n)}function G(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>G(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)G(n,t,!1),n=n.nextElementSibling}function B(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function Xi(e){return(...t)=>j&&e(...t)}function Se(e){Wr.push(e)}function Zi(e,t){Wr.forEach((r)=>r(e,t)),j=!0,Jr(()=>{D(t,(r,n)=>{n(r,()=>{})})}),j=!1}function Qi(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,xt=!0,Jr(()=>{es(t)}),j=!1,xt=!1}function es(e){let t=!1;D(e,(n,i)=>{G(n,(a,s)=>{if(t&&os(a))return s();t=!0,i(a,s)})})}function Jr(e){let t=te;lr((r,n)=>{let i=t(r);return de(i),()=>{}}),e(),lr(t)}function ts(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Ke++}r.pending++,Promise.resolve(t).catch((n)=>{try{qe(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>rs(e,r))}function rs(e,t){if(t.pending--,t.pending>0)return;if(Ii(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Ke--,!e.isConnected)return;is(t),D(e)}function ns(e,t){if(Ke===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return Yr(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function Yr(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function is(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=T(r,(a)=>a._x_deferInit);if(n){Yr(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((a)=>r.hasAttribute(a)).map((a)=>({name:a,value:r.getAttribute(a)}));if(i.length===0)return;Fe(r,i).forEach((a)=>a())})}function be(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function ss(){if(dr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(dr=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");be(document,"alpine:init"),be(document,"alpine:initializing"),Nt(),Ti((t)=>D(t,G)),Lt((t)=>re(t)),Sr((t,r)=>{if(ns(t,r))return;Fe(t,r).forEach((n)=>n())});let e=(t)=>!Ve(t.parentElement,!0);Array.from(document.querySelectorAll(Zr().join(","))).filter(e).forEach((t)=>{D(t)}),be(document,"alpine:initialized"),setTimeout(()=>{ds()})}function Xr(){return Ut.map((e)=>e())}function Zr(){return Ut.concat(Gr).map((e)=>e())}function Qr(e){Ut.push(e)}function en(e){Gr.push(e)}function Ve(e,t=!1){return T(e,(r)=>{if((t?Zr():Xr()).some((i)=>r.matches(i)))return!0})}function T(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return T(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return T(e.parentNode.host,t);if(!e.parentElement)return;return T(e.parentElement,t)}function os(e){return Xr().some((t)=>e.matches(t))}function as(e){tn.push(e)}function D(e,t=G,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;Wi(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),tn.forEach((a)=>a(n,i)),Fe(n,n.attributes).forEach((a)=>a()),!n._x_ignore)n._x_marker=ls++;n._x_ignore&&i()})})}function re(e,t=G){t(e,(r)=>{Oi(r),Tr(r),delete r._x_marker})}function ds(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Vi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function jt(e=()=>{}){return queueMicrotask(()=>{Ht||setTimeout(()=>{yt()})}),new Promise((t)=>{vt.push(()=>{e(),t()})})}function yt(){Ht=!1;while(vt.length)vt.shift()()}function cs(){Ht=!0}function zt(e,t){if(Array.isArray(t))return cr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return us(e,t);else if(typeof t==="function")return zt(e,t());return cr(e,t)}function _t(e){return e.split(/\s/).filter(Boolean)}function cr(e,t){let r=(i)=>_t(i).filter((a)=>!e.classList.contains(a)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function us(e,t){let r=Object.entries(t).flatMap(([s,o])=>o?_t(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,o])=>!o?_t(s):!1).filter(Boolean),i=[],a=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),a.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{a.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function We(e,t){if(typeof t==="object"&&t!==null)return fs(e,t);return ps(e,t)}function fs(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=hs(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{We(e,r)}}function ps(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function hs(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function wt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function bs(e,t,r){rn(e,zt,""),{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 ms(e,t,r){rn(e,We);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),a=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((p,x)=>x<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((p,x)=>x>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),o=s||t.includes("opacity"),l=s||t.includes("scale"),d=o?0:1,c=l?fe(t,"scale",95)/100:1,u=fe(t,"delay",0)/1000,f=fe(t,"origin","center"),m="opacity, transform",g=fe(t,"duration",150)/1000,h=fe(t,"duration",75)/1000,b="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${g}s`,transitionTimingFunction:b},e._x_transition.enter.start={opacity:d,transform:`scale(${c})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(a)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${h}s`,transitionTimingFunction:b},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:d,transform:`scale(${c})`}}function rn(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Et(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Et(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function nn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:nn(t)}function Et(e,t,{during:r,start:n,end:i}={},a=()=>{},s=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){a(),s();return}let o,l,d;gs(e,{start(){o=t(e,n)},during(){l=t(e,r)},before:a,end(){o(),d=t(e,i)},after:s,cleanup(){l(),d()}})}function gs(e,t){let r,n,i,a=wt(()=>{w(()=>{if(r=!0,!n)t.before();if(!i)t.end(),yt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:wt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();a()}),finish:a},w(()=>{t.start(),t.during()}),cs(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,o=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;w(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;w(()=>{t.end()}),yt(),setTimeout(e._x_transitioning.finish,s+o),i=!0})})}function fe(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function sn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?As(t):t,t){case"value":xs(e,r);break;case"style":ys(e,r);break;case"class":vs(e,r);break;case"selected":case"checked":_s(e,t,r);break;default:qt(e,t,r);break}}function xs(e,t){if(Ft(e)){if(e.attributes.value===void 0)e.value=t}else if($e(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>Ss(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")ks(e,t);else if(e.tagName==="OPTION")qt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function vs(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=zt(e,t)}function ys(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=We(e,t)}function _s(e,t,r){qt(e,t,r),Es(e,t,r)}function qt(e,t,r){if([null,void 0,!1].includes(r)&&Ts(t))e.removeAttribute(t);else{if(on(t))r=t;if(Os(r))r=JSON.stringify(r);ws(e,t,r)}}function ws(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Es(e,t,r){if(e[t]!==r)e[t]=r}function ks(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function As(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ss(e,t){return e==t}function De(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function on(e){return Cs.has(e)}function Ts(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Os(e){return typeof e==="object"&&e!==null}function Ms(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return an(e,t,r)}function Is(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,Pr(()=>W(e,i.expression))}return an(e,t,r)}function an(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(on(t))return!![t,"true"].includes(n);return n}function $e(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Ft(e){return e.type==="radio"||e.localName==="ui-radio"}function ln(e,t){let r;return function(){let n=this,i=arguments,a=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(a,t)}}function dn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function cn({get:e,set:t},{get:r,set:n}){let i=!0,a,s,o=te(()=>{let l=e(),d=r();if(i)n(nt(l)),i=!1;else{let c=JSON.stringify(l),u=JSON.stringify(d);if(c!==a)n(nt(l));else if(c!==u)t(nt(d))}a=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{It(o),de(o)}}function nt(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Ls(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function Ds(e,t){if(!ur)P=le(P),ur=!0;if(t===void 0)return P[e];if(P[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)P[e]=t.initialize(P,e,e,()=>{});else Rt(P[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")P[e].init()}function Ns(){return P}function Ps(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return fn(e,r());else un[e]=r;return()=>{}}function Rs(e){return Object.entries(un).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function fn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,o])=>({name:s,value:o})),a=$r(i);return i=i.map((s)=>{if(a.find((o)=>o.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),Fe(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Bs(e,t){pn[e]=t}function $s(e,t){return Object.entries(pn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function bn(e){try{let r=new js(e).tokenize(),i=new zs(r).parse(),a=new qs;return function(s={}){let{scope:o={},context:l=null,forceBindingRootScopeToFunctions:d=!1}=s;return a.evaluate({node:i,scope:o,context:l,forceBindingRootScopeToFunctions:d})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Fs(e,t,r={}){let n=mn(e),i=Y([r.scope??{},...n]),a=r.params??[],o=bn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof o==="function"&&V)return o.apply(i,a);return o}function Ks(e,t){let r=mn(e);if(typeof t==="function")return qi(r,t);let n=Vs(e,t,r);return $i.bind(null,e,t,n)}function mn(e){let t={};return Re(t,e),[t,...ae(e)]}function Vs(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:a=[]}={})=>{let s=Y([i,...r]),l=bn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(V&&typeof l==="function"){let d=l.apply(l,a);if(d instanceof Promise)d.then((c)=>n(c));else n(d)}else if(typeof l==="object"&&l instanceof Promise)l.then((d)=>n(d));else n(l)}}function gn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function X(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function Qs(e,t=!1){if(e.flags|=8,t){e.next=xe,xe=e;return}e.next=ge,ge=e}function Vt(){_n++}function Wt(){if(--_n>0)return;if(xe){let t=xe;xe=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(ge){let t=ge;ge=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function wn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function En(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;Jt(n),to(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function At(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function eo(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Ue)return;if(e.globalVersion=Ue,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!At(e)))return;e.flags|=2;let t=e.dep,r=v,n=O;v=e,O=!0;try{wn(e);let i=e.fn(e._value);if(t.version===0||F(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{v=r,O=n,En(e),e.flags&=-3}}function Jt(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let a=r.computed.deps;a;a=a.nextDep)Jt(a,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function to(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function ro(e,t){if(e.effect instanceof pr)e=e.effect.fn;let r=new pr(e);if(t)ye(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function no(e){e.effect.stop()}function io(){kn.push(O),O=!1}function so(){let e=kn.pop();O=e===void 0?!0:e}function hr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=v;v=void 0;try{t()}finally{v=r}}}function An(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)An(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function C(e,t,r){if(O&&v){let n=St.get(e);if(!n)St.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new ao),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function H(e,t,r,n,i,a){let s=St.get(e);if(!s){Ue++;return}let o=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:a})};if(Vt(),t==="clear")s.forEach(o);else{let l=_e(e),d=l&&Kt(r);if(l&&r==="length"){let c=Number(n);s.forEach((u,f)=>{if(f==="length"||f===Ee||!Ce(f)&&f>=c)o(u)})}else{if(r!==void 0||s.has(void 0))o(s.get(r));if(d)o(s.get(Ee));switch(t){case"add":if(!l){if(o(s.get(J)),me(e))o(s.get(Ct))}else if(d)o(s.get("length"));break;case"delete":if(!l){if(o(s.get(J)),me(e))o(s.get(Ct))}break;case"set":if(me(e))o(s.get(J));break}}}Wt()}function se(e){let t=y(e);if(t===e)return t;return C(t,"iterate",Ee),Q(e)?t:t.map(ee)}function Yt(e){return C(e=y(e),"iterate",Ee),e}function I(e,t){if(Z(e))return Ln(e)?ke(ee(t)):ke(t);return ee(t)}function ot(e,t,r){let n=Yt(e),i=n[t]();if(n!==e&&!Q(e))i._next=i.next,i.next=()=>{let a=i._next();if(!a.done)a.value=r(a.value);return a};return i}function N(e,t,r,n,i,a){let s=Yt(e),o=s!==e&&!Q(e),l=s[t];if(l!==co[t]){let u=l.apply(e,a);return o?ee(u):u}let d=r;if(s!==e){if(o)d=function(u,f){return r.call(this,I(e,u),f,e)};else if(r.length>2)d=function(u,f){return r.call(this,u,f,e)}}let c=l.call(s,d,n);return o&&i?i(c):c}function br(e,t,r,n){let i=Yt(e),a=i!==e&&!Q(e),s=r,o=!1;if(i!==e){if(a)o=n.length===0,s=function(d,c,u){if(o)o=!1,d=I(e,d);return r.call(this,d,I(e,c),u,e)};else if(r.length>3)s=function(d,c,u){return r.call(this,d,c,u,e)}}let l=i[t](s,...n);return o?I(e,l):l}function at(e,t,r){let n=y(e);C(n,"iterate",Ee);let i=n[t](...r);if((i===-1||i===!1)&&ko(r[0]))return r[0]=y(r[0]),n[t](...r);return i}function pe(e,t,r=[]){io(),Vt();let n=y(e)[t].apply(e,r);return Wt(),so(),n}function fo(e){if(!Ce(e))e=String(e);let t=y(this);return C(t,"has",e),t.hasOwnProperty(e)}function go(e,t,r){return function(...n){let i=this.__v_raw,a=y(i),s=me(a),o=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,d=i[e](...n),c=r?Tt:t?ke:ee;return!t&&C(a,"iterate",l?Ct:J),ye(Object.create(d),{next(){let{value:u,done:f}=d.next();return f?{value:u,done:f}:{value:o?[c(u[0]),c(u[1])]:c(u),done:f}}})}}function Ie(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";X(`${yn(e)} operation ${r}failed: target is readonly.`,y(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function xo(e,t){let r={get(i){let a=this.__v_raw,s=y(a),o=y(i);if(!e){if(F(i,o))C(s,"get",i);C(s,"get",o)}let{has:l}=Me(s),d=t?Tt:e?ke:ee;if(l.call(s,i))return d(a.get(i));else if(l.call(s,o))return d(a.get(o));else if(a!==s)a.get(i)},get size(){let i=this.__v_raw;return!e&&C(y(i),"iterate",J),i.size},has(i){let a=this.__v_raw,s=y(a),o=y(i);if(!e){if(F(i,o))C(s,"has",i);C(s,"has",o)}return i===o?a.has(i):a.has(i)||a.has(o)},forEach(i,a){let s=this,o=s.__v_raw,l=y(o),d=t?Tt:e?ke:ee;return!e&&C(l,"iterate",J),o.forEach((c,u)=>i.call(a,d(c),d(u),s))}};return ye(r,e?{add:Ie("add"),set:Ie("set"),delete:Ie("delete"),clear:Ie("clear")}:{add(i){let a=y(this),s=Me(a),o=y(i),l=!t&&!Q(i)&&!Z(i)?o:i;if(!(s.has.call(a,l)||F(i,l)&&s.has.call(a,i)||F(o,l)&&s.has.call(a,o)))a.add(l),H(a,"add",l,l);return this},set(i,a){if(!t&&!Q(a)&&!Z(a))a=y(a);let s=y(this),{has:o,get:l}=Me(s),d=o.call(s,i);if(!d)i=y(i),d=o.call(s,i);else mr(s,o,i);let c=l.call(s,i);if(s.set(i,a),!d)H(s,"add",i,a);else if(F(a,c))H(s,"set",i,a,c);return this},delete(i){let a=y(this),{has:s,get:o}=Me(a),l=s.call(a,i);if(!l)i=y(i),l=s.call(a,i);else mr(a,s,i);let d=o?o.call(a,i):void 0,c=a.delete(i);if(l)H(a,"delete",i,void 0,d);return c},clear(){let i=y(this),a=i.size!==0,s=me(i)?new Map(i):new Set(i),o=i.clear();if(a)H(i,"clear",void 0,void 0,s);return o}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=go(i,e,t)}),r}function Tn(e,t){let r=xo(e,t);return(n,i,a)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(kt(r,i)&&i in n?r:n,i,a)}}function mr(e,t,r){let n=y(r);if(n!==r&&t.call(e,n)){let i=vn(e);X(`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.`)}}function Eo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Gt(e){if(Z(e))return e;return In(e,!1,bo,vo,On)}function Ot(e){return In(e,!0,mo,yo,Mn)}function In(e,t,r,n,i){if(!we(e))return X(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let s=Eo(vn(e));if(s===0)return e;let o=new Proxy(e,s===2?n:r);return i.set(e,o),o}function Ln(e){if(Z(e))return Ln(e.__v_raw);return!!(e&&e.__v_isReactive)}function Z(e){return!!(e&&e.__v_isReadonly)}function Q(e){return!!(e&&e.__v_isShallow)}function ko(e){return e?!!e.__v_raw:!1}function y(e){let t=e&&e.__v_raw;return t?y(t):e}function ve(e){return e?e.__v_isRef===!0:!1}function Ao(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Dn(e){if(!lt[e])lt[e]=0;return++lt[e]}function So(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Co(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Dn(t)}function To(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function Nn(e,t,r){M(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function gr(e){let t=B(()=>document.querySelector(e),()=>Oo)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,a=(l)=>n(l),s={},o=(l,d)=>(c)=>d(l,c);if(r.includes("dot"))t=Mo(t);if(r.includes("camel"))t=Io(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(a=Rn(r,a),r.includes("prevent"))a=o(a,(l,d)=>{d.preventDefault(),l(d)});if(r.includes("stop"))a=o(a,(l,d)=>{d.stopPropagation(),l(d)});if(r.includes("once"))a=o(a,(l,d)=>{l(d),i.removeEventListener(t,a,s)});if(r.includes("away")||r.includes("outside"))i=document,a=o(a,(l,d)=>{if(e.contains(d.target))return;if(d.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(d)});if(r.includes("self"))a=o(a,(l,d)=>{d.target===e&&l(d)});if(t==="submit")a=o(a,(l,d)=>{if(d.target._x_pendingModelUpdates)d.target._x_pendingModelUpdates.forEach((c)=>c());l(d)});if(Do(t)||Bn(t))a=o(a,(l,d)=>{if(Po(d,r))return;l(d)});return i.addEventListener(t,a,s),()=>{i.removeEventListener(t,a,s)}}function Rn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=He(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=ln(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=He(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=dn(t,n)}return t}function Mo(e){return e.replace(/-/g,".")}function Io(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function He(e){return!Array.isArray(e)&&!isNaN(e)}function Lo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Do(e){return["keydown","keyup"].includes(e)}function Bn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Po(e,t){let r=t.filter((a,s)=>{if(a==="false"&&t[s-1]==="passive")return!1;return!No.includes(a)});if(r.includes("debounce")){let a=r.indexOf("debounce");r.splice(a,He((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let a=r.indexOf("throttle");r.splice(a,He((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&xr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((a)=>r.includes(a));if(r=r.filter((a)=>!i.includes(a)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(Bn(e.type))return!1;if(xr(e.key).includes(r[0]))return!1}}return!0}function xr(e){if(!e)return[];e=Lo(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:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function Le(e,t,r,n){return w(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if($e(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=dt(r.target.value);else if(t.includes("boolean"))i=De(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((a)=>!Ro(a,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return dt(a)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return De(a)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Ft(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return dt(i);else if(t.includes("boolean"))return De(i);else if(t.includes("trim"))return i.trim();else return i}})}function dt(e){let t=e?parseFloat(e):null;return Bo(t)?t:e}function Ro(e,t){return e==t}function Bo(e){return!Array.isArray(e)&&!isNaN(e)}function vr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function $o(e,t){e._x_keyExpression=t}function Uo(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function Ho(e){if(!j)return!1;if(xt)return!0;return e.hasAttribute("data-has-alpine-state")}function jo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function zo(e,t,r,n){r((i)=>{if(Ko(i))i=Array.from({length:i},(d,c)=>c+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let a=e._x_lookup,s=new Map;e._x_lookup=s;let o=Vo(i),l=Object.entries(i).map(([d,c])=>{if(!o)d=parseInt(d);let u=Fo(t,c,d,i),f;return n((m)=>{if(typeof m==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(a.has(m))s.set(m,a.get(m)),a.delete(m);f=m},{scope:{index:d,...u}}),[f,u]});w(()=>{a.forEach((u)=>{re(u),u.remove()});let d=new Set,c=e;if(l.forEach(([u,f])=>{if(s.has(u)){let h=s.get(u);if(h._x_refreshXForScope(f),c.nextElementSibling!==h){if(c.nextElementSibling)h.replaceWith(c.nextElementSibling);c.after(h)}if(c=h,h._x_currentIfEl){if(h.nextElementSibling!==h._x_currentIfEl)c.after(h._x_currentIfEl);c=h._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let m=document.importNode(e.content,!0).firstElementChild,g=le(f);Ae(m,g,e),m._x_refreshXForScope=jo(g),s.set(u,m),d.add(m),c.after(m),c=m}),d.forEach((u)=>D(u)),c!==e)e._x_lastRenderedEl=c;else delete e._x_lastRenderedEl})})}function qo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\s\S]*)/,i=e.match(n);if(!i)return;let a={};a.items=i[2].trim();let s=i[1].replace(r,"").trim(),o=s.match(t);if(o){if(a.item=s.replace(t,"").trim(),a.index=o[1].trim(),o[2])a.collection=o[2].trim()}else a.item=s;return a}function Fo(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,o)=>{i[s]=t[o]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function Ko(e){return typeof e!=="object"&&!isNaN(e)}function Vo(e){return typeof e==="object"&&!Array.isArray(e)}function Un(){}function Ye(e,t,r){E(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var ct=!1,ut=!1,R,ft=-1,Ne=!1,Mt=!1,le,te,de,_r,Ei=0,pt=!0,Er,kr,Ar,je,Dt=!1,q,Pt=!1,Pe,Ni,Dr,Nr,V=!0,Rr=()=>{},Br,Bt="x-",Be,mt=!1,he,Ur,jr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},zr=(e)=>e,Fr,Vr=()=>new RegExp(`^${Bt}([^:^.]+)\\b`),gt="DEFAULT",K,j=!1,Wr,xt=!1,Ke=0,dr=!1,Ut,Gr,tn,ls=1,vt,Ht=!1,Cs,P,ur=!1,un,pn,Us,ue,fr,hn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Hs,js=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new k("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
6
+ `)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){let e=this.position,t=!1;while(this.position<this.input.length){let n=this.input[this.position];if(this.isDigit(n))this.position++;else if(n==="."&&!t)t=!0,this.position++;else break}let r=this.input.slice(e,this.position);this.tokens.push(new k("NUMBER",parseFloat(r),e,this.position))}readIdentifierOrKeyword(){let e=this.position;while(this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]))this.position++;let t=this.input.slice(e,this.position);if(["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(t))if(t==="true"||t==="false")this.tokens.push(new k("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new k("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new k("UNDEFINED",void 0,e,this.position));else this.tokens.push(new k("KEYWORD",t,e,this.position));else this.tokens.push(new k("IDENTIFIER",t,e,this.position))}readString(){let e=this.position,t=this.input[this.position];this.position++;let r="",n=!1;while(this.position<this.input.length){let i=this.input[this.position];if(n){switch(i){case"n":r+=`
7
+ `;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let a=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(a))r+=String.fromCharCode(parseInt(a,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new k("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},zs=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return Hs.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},qs=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let b=t[e.name];if(this.checkForDangerousValues(b),typeof b==="function")return b.bind(t);return b}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let a;if(e.computed)a=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else a=e.property.name;this.checkForDangerousKeywords(a);let s=i[a];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let o=e.arguments.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let b=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),p;if(e.callee.computed)p=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else p=e.callee.property.name;this.checkForDangerousKeywords(p);let x=b[p];if(typeof x!=="function")throw Error("Value is not a function");l=x.apply(b,o)}else if(e.callee.type==="Identifier"){let b=e.callee.name,p;if(b in t)p=t[b];else throw Error(`Undefined variable: ${b}`);if(typeof p!=="function")throw Error("Value is not a function");let x=r!==null?r:t;l=p.apply(x,o)}else{let b=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof b!=="function")throw Error("Value is not a function");l=b.apply(r,o)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let d=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!d;case"-":return-d;case"+":return+d;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let b=e.argument.name;if(!(b in t))throw Error(`Undefined variable: ${b}`);let p=t[b];if(e.operator==="++")t[b]=p+1;else if(e.operator==="--")t[b]=p-1;return e.prefix?t[b]:p}else if(e.argument.type==="MemberExpression"){let b=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),p=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(p);let x=b[p];if(e.operator==="++")b[p]=x+1;else if(e.operator==="--")b[p]=x-1;return e.prefix?b[p]:x}throw Error("Invalid update expression target");case"BinaryExpression":let c=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return c&&u();if(e.operator==="||")return c||u();let f=u();switch(e.operator){case"+":return c+f;case"-":return c-f;case"*":return c*f;case"/":return c/f;case"%":return c%f;case"==":return c==f;case"!=":return c!=f;case"===":return c===f;case"!==":return c!==f;case"<":return c<f;case">":return c>f;case"<=":return c<=f;case">=":return c>=f;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let g=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=g,g;else if(e.left.type==="MemberExpression"){let b=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),p=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(p),b[p]=g,g}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let h={};for(let b of e.properties){let p=b.computed?this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):b.key.type==="Identifier"?b.key.name:this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),x=this.evaluate({node:b.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});h[p]=x}return h;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(fr.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(hn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return fr.set(e,!0),!0}},pa,ha,ye,Ws,kt=(e,t)=>Ws.call(e,t),_e,me=(e)=>xn(e)==="[object Map]",Js=(e)=>typeof e==="string",Ce=(e)=>typeof e==="symbol",we=(e)=>e!==null&&typeof e==="object",Ys,xn=(e)=>Ys.call(e),vn=(e)=>xn(e).slice(8,-1),Kt=(e)=>Js(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Je=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},Gs,ba,Xs,ma,yn,ga,F=(e,t)=>!Object.is(e,t),Zs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",xa,it,v,st,pr=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,it)if(it.active)it.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,st.has(this))st.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Qs(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,hr(this),wn(this);let e=v,t=O;v=this,O=!0;try{return this.fn()}finally{if(v!==this)X("Active effect was not restored correctly - this is likely a Vue internal bug.");En(this),v=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Jt(e);this.deps=this.depsTail=void 0,hr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)st.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(At(this))this.run()}get dirty(){return At(this)}},_n=0,ge,xe,O=!0,kn,Ue=0,oo=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},ao=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!v||!O||v===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==v){if(t=this.activeLink=new oo(v,this),!v.deps)v.deps=v.depsTail=t;else t.prevDep=v.depsTail,v.depsTail.nextDep=t,v.depsTail=t;An(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=v.depsTail,t.nextDep=void 0,v.depsTail.nextDep=t,v.depsTail=t,v.deps===t)v.deps=r}}if(v.onTrack)v.onTrack(ye({effect:v},e));return t}trigger(e){this.version++,Ue++,this.notify(e)}notify(e){Vt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(ye({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Wt()}}},St,J,Ct,Ee,lo,co,uo,Sn,Cn=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?wo:Mn:i?_o:On).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let a=_e(e);if(!n){let o;if(a&&(o=lo[t]))return o;if(t==="hasOwnProperty")return fo}let s=Reflect.get(e,t,ve(e)?e:r);if(Ce(t)?Sn.has(t):uo(t))return s;if(!n)C(e,"get",t);if(i)return s;if(ve(s)){let o=a&&Kt(t)?s:s.value;return n&&we(o)?Ot(o):o}if(we(s))return n?Ot(s):Gt(s);return s}},po,ho,bo,mo,Tt=(e)=>e,Me=(e)=>Reflect.getPrototypeOf(e),vo,yo,On,_o,Mn,wo,ee=(e)=>we(e)?Gt(e):e,ke=(e)=>we(e)?Ot(e):e,lt,Oo,Pn=()=>{},No,$n=(e,{value:t,modifiers:r,expression:n,original:i},{effect:a,cleanup:s})=>{if(!t){let l={};Rs(l),A(e,n)((c)=>{fn(e,c,i)},{scope:l});return}if(t==="key")return $o(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let o=A(e,n);a(()=>o((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";w(()=>sn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},z,Hn,Wo;var zn=hi(()=>{R=[];Er=[],kr=[],Ar=[];je=new MutationObserver(ze);q=[];Pe=[];Ni={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return Pi;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=Ir(s,t),i)break;if(!i)i=e[e.length-1];let a=Object.getOwnPropertyDescriptor(i,t);if(a?.set&&a?.get)return a.set.call(n,r)||!0;return Reflect.set(i,t,r)}};Dr={};Nr=Hi;Be={};he=new Map,Ur=Symbol();Fr=[];K=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",gt,"teleport"];Wr=[];Se((e,t)=>{if(Ke===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(T(e,(r)=>r._x_deferInit))t._x_ignore=!0});Ut=[],Gr=[];tn=[];vt=[];E("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")ms(e,r,t);else bs(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,a=()=>i(r);if(t){if(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):a();else e._x_transition?e._x_transition.in(r):a();return}e._x_hidePromise=e._x_transition?new Promise((s,o)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>o({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=nn(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let o=(l)=>{let d=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(o)]).then(([c])=>c?.());return delete l._x_hidePromise,delete l._x_hideChildren,d};o(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Cs=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);P={};un={};pn={};Us={get reactive(){return le},get release(){return de},get effect(){return te},get raw(){return _r},get transaction(){return Ci},version:"3.17.4",flushAndStopDeferringMutations:Di,dontAutoEvaluateFunctions:Pr,disableEffectScheduling:ki,startObservingMutations:Nt,stopObservingMutations:Or,setReactivityEngine:Ai,onAttributeRemoved:Cr,onAttributesAdded:Sr,closestDataStack:ae,skipDuringClone:B,onlyDuringClone:Xi,addRootSelector:Qr,addInitSelector:en,setErrorHandler:Ui,interceptClone:Se,addScopeToNode:Ae,deferMutations:Li,mapAttributes:$t,evaluateLater:A,interceptInit:as,initInterceptors:Rt,injectMagics:Re,setEvaluator:ji,setRawEvaluator:zi,mergeProxies:Y,extractProp:Is,findClosest:T,onElRemoved:Lt,closestRoot:Ve,destroyTree:re,interceptor:Lr,transition:Et,setStyles:We,mutateDom:w,deferInit:ts,directive:E,entangle:cn,throttle:dn,debounce:ln,evaluate:W,evaluateRaw:Fi,initTree:D,nextTick:jt,prefixed:ce,prefix:Ki,plugin:Ls,magic:M,store:Ds,start:ss,clone:Qi,cloneNode:Zi,bound:Ms,$data:Mr,watch:wr,walk:G,data:Bs,bind:Ps},ue=Us,fr=new WeakMap,hn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}hn.add(t)});Hs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];pa=Object.freeze({}),ha=Object.freeze([]),ye=Object.assign,Ws=Object.prototype.hasOwnProperty,_e=Array.isArray,Ys=Object.prototype.toString,Gs=/-\w/g,ba=Je((e)=>e.replace(Gs,(t)=>t.slice(1).toUpperCase())),Xs=/\B([A-Z])/g,ma=Je((e)=>e.replace(Xs,"-$1").toLowerCase()),yn=Je((e)=>e.charAt(0).toUpperCase()+e.slice(1)),ga=Je((e)=>e?`on${yn(e)}`:""),xa=gn(Zs+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");st=new WeakSet;kn=[];St=new WeakMap,J=Symbol("Object iterate"),Ct=Symbol("Map keys iterate"),Ee=Symbol("Array iterate");lo={__proto__:null,[Symbol.iterator](){return ot(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>_e(t)?se(t):t))},entries(){return ot(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return N(this,"every",e,t,void 0,arguments)},filter(e,t){return N(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return N(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return N(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return N(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return N(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return N(this,"forEach",e,t,void 0,arguments)},includes(...e){return at(this,"includes",e)},indexOf(...e){return at(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return at(this,"lastIndexOf",e)},map(e,t){return N(this,"map",e,t,void 0,arguments)},pop(){return pe(this,"pop")},push(...e){return pe(this,"push",e)},reduce(e,...t){return br(this,"reduce",e,t)},reduceRight(e,...t){return br(this,"reduceRight",e,t)},shift(){return pe(this,"shift")},some(e,t){return N(this,"some",e,t,void 0,arguments)},splice(...e){return pe(this,"splice",e)},toReversed(){return se(this).toReversed()},toSorted(e){return se(this).toSorted(e)},toSpliced(...e){return se(this).toSpliced(...e)},unshift(...e){return pe(this,"unshift",e)},values(){return ot(this,"values",(e)=>I(this,e))}};co=Array.prototype;uo=gn("__proto__,__v_isRef,__isVue"),Sn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Ce));po=class extends Cn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],a=_e(e)&&Kt(t);if(!this._isShallow){let l=Z(i);if(!Q(r)&&!Z(r))i=y(i),r=y(r);if(!a&&ve(i)&&!ve(r))if(l)return X(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=a?Number(t)<e.length:kt(e,t),o=Reflect.set(e,t,r,ve(e)?e:n);if(e===y(n)&&o){if(!s)H(e,"add",t,r);else if(F(r,i))H(e,"set",t,r,i)}return o}deleteProperty(e,t){let r=kt(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)H(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Ce(t)||!Sn.has(t))C(e,"has",t);return r}ownKeys(e){return C(e,"iterate",_e(e)?"length":J),Reflect.ownKeys(e)}},ho=class extends Cn{constructor(e=!1){super(!0,e)}set(e,t){return X(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return X(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},bo=new po,mo=new ho;vo={get:Tn(!1,!1)},yo={get:Tn(!0,!1)};On=new WeakMap,_o=new WeakMap,Mn=new WeakMap,wo=new WeakMap;M("nextTick",()=>jt);M("dispatch",(e)=>be.bind(be,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let a=t(n),o=wr(()=>{let l;return a((d)=>l=d),l},i);r(o)});M("store",Ns);M("data",(e)=>Mr(e));M("root",(e)=>Ve(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=Y(Ao(e)),e._x_refs_proxy});lt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return To(e,i,t,()=>{let a=So(e,r),s=a?a._x_ids[r]:Dn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Se((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Nn("Focus","focus","focus");Nn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let a=n(t),s=()=>{let c;return a((u)=>c=u),c},o=n(`${t} = __placeholder`),l=(c)=>o(()=>{},{scope:{__placeholder:c}}),d=s();l(d),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let c=e._x_model.get,u=e._x_model.setWithModifiers,f=cn({get(){return c()},set(m){u(m)}},{get(){return s()},set(m){l(m)}});i(f)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=gr(r),a=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=a,a._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),a.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((o)=>{a.addEventListener(o,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Ae(a,{},e);let s=(o,l,d)=>{if(d.includes("prepend"))l.parentNode.insertBefore(o,l);else if(d.includes("append"))l.parentNode.insertBefore(o,l.nextSibling);else l.appendChild(o)};w(()=>{B(()=>{s(a,i,t),D(a)})()}),e._x_teleportPutBack=()=>{let o=gr(r);w(()=>{s(e._x_teleport,o,t)})},n(()=>w(()=>{a.remove(),re(a)}))});Oo=document.createElement("div");Pn.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})};E("ignore",Pn);E("effect",B((e,{expression:t},{effect:r})=>{r(A(e,t))}));No=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];E("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let a=e;if(t.includes("parent"))a=T(e,(h)=>h!==e);let s=A(a,r),o;if(typeof r==="string")o=A(a,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")o=A(a,`${r()} = __placeholder`);else o=()=>{};let l=()=>{let h;return s((b)=>h=b),vr(h)?h.get():h},d=(h)=>{let b;if(s((p)=>b=p),vr(b))b.set(h);else o(()=>{},{scope:{__placeholder:h}})};if(typeof r==="string"&&e.type==="radio")w(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let c=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),f=t.includes("enter"),m=c||u||f,g;if(j)g=()=>{};else if(m){let h=[],b=(p)=>d(Le(e,t,p,l()));if(c)h.push(oe(e,"change",t,b));if(u){if(h.push(oe(e,"blur",t,b)),e.form){let p=e.form,x=()=>b({target:e});if(!p._x_pendingModelUpdates)p._x_pendingModelUpdates=[];p._x_pendingModelUpdates.push(x),i(()=>{if(p._x_pendingModelUpdates)p._x_pendingModelUpdates.splice(p._x_pendingModelUpdates.indexOf(x),1)})}}if(f)h.push(oe(e,"keydown",t,(p)=>{if(p.key==="Enter")b(p)}));g=()=>h.forEach((p)=>p())}else{let h=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";g=oe(e,h,t,(b)=>{d(Le(e,t,b,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||$e(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)d(Le(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=g,i(()=>e._x_removeModelListeners.default()),e.form){let h=oe(e.form,"reset",[],(b)=>{jt(()=>e._x_model&&e._x_model.set(Le(e,t,{target:e},l())))});i(()=>h())}if(e._x_model={get(){return l()},set(h){d(h)},setWithModifiers:Rn(t,d)},e._x_forceModelUpdate=(h)=>{if(h===void 0&&typeof r==="string"&&r.match(/\./))h="";w(()=>{if($e(e))if(Array.isArray(h))e.checked=h.some((b)=>b==e.value);else e.checked=!!h;else if(Ft(e))if(typeof h==="boolean")e.checked=De(e.value)===h;else e.checked=e.value==h;else sn(e,"value",h)})},e.tagName==="SELECT"){let h=new MutationObserver(()=>{e._x_forceModelUpdate(l())});h.observe(e,{childList:!0}),i(()=>h.disconnect())}n(()=>{let h=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(h)})});E("cloak",(e)=>queueMicrotask(()=>w(()=>e.removeAttribute(ce("cloak")))));en(()=>`[${ce("init")}]`);E("init",B((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));E("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((a)=>{w(()=>{e.textContent=a})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((a)=>{w(()=>{Array.from(e.children).forEach((s)=>re(s)),e.innerHTML=a??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});$t(jr(":",zr(ce("bind:"))));$n.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};E("bind",$n);Qr(()=>`[${ce("data")}]`);z=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Ho(e))return;let n=e[z];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Re(i,e);let a={};$s(a,i);let s=W(e,t,{scope:a});if(s===void 0||s===!0)s={};Re(s,e);let o;if(n?.reactiveData){o=n.reactiveData,Uo(o,s);let d={expression:t};e[z]=d,queueMicrotask(()=>{if(e[z]===d)delete e[z]})}else o=le(s);Rt(o,r);let l=Ae(e,o);B(()=>{o.init&&W(e,o.init)})(),r(()=>{o.destroy&&W(e,o.destroy),l();let d={reactiveData:o};e[z]=d,queueMicrotask(()=>{if(e[z]===d)delete e[z]})})});Se((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});E("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=A(e,r);if(!e._x_doHide)e._x_doHide=()=>{w(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{w(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else e.style.removeProperty("display")})};let a=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},o=()=>setTimeout(s),l=wt((u)=>u?s():a(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,a);else u?o():a()}),d,c=!0;n(()=>i((u)=>{if(!c&&u===d)return;if(t.includes("immediate"))u?o():a();l(u),d=u,c=!1}))});E("for",B((e,{expression:t},{effect:r,cleanup:n})=>{let i=qo(t),a=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>zo(e,i,a,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((o)=>w(()=>{re(o),o.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Un.inline=(e,{expression:t},{cleanup:r})=>{let n=Ve(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Un);E("if",B((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=A(e,t),a=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let o=e.content.cloneNode(!0).firstElementChild;return Ae(o,{},e),w(()=>{e.after(o),D(o)}),e._x_currentIfEl=o,e._x_lastRenderedEl=o,e._x_undoIf=()=>{w(()=>{re(o),o.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},o},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((o)=>{o?a():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>Co(e,i))});Se((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});$t(jr("@",zr(ce("on:"))));E("on",B((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let a=n?A(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let s=oe(e,t,r,(o)=>{a(()=>{},{scope:{$event:o},params:[o]})});i(()=>s())}));Ye("Collapse","collapse","collapse");Ye("Intersect","intersect","intersect");Ye("Focus","trap","focus");Ye("Mask","mask","mask");E("html",(e,{expression:t})=>{qe(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(Ks);ue.setRawEvaluator(Fs);ue.setReactivityEngine({reactive:Gt,effect:(e,t={})=>{let r;return r=ro(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:no,raw:y});Hn=ue,Wo=Hn;/*! Bundled license information:
8
8
 
9
9
  @vue/shared/dist/shared.esm-bundler.js:
10
10
  (**
@@ -19,8 +19,9 @@ ${r?'Expression: "'+r+`"
19
19
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
20
20
  * @license MIT
21
21
  **)
22
- */});var Xt=typeof HTMLElement==="function"?HTMLElement:class{};function Zt(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function Qt(e,t,r={},n=[]){let i=()=>{for(let s of n)if(!e.classList.contains(s))e.classList.add(s);for(let[s,a]of Object.entries(r))if(!e.hasAttribute(s))e.setAttribute(s,a)};i();let o=new MutationObserver(i);o.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>o.disconnect(),{once:!0})}var oi=Symbol.for("bare-v3.styles");function er(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[oi]??=new Set;if(n.has(t))return;let i=e.defaultView;if(i&&"adoptedStyleSheets"in e&&"replaceSync"in i.CSSStyleSheet.prototype){let s=new i.CSSStyleSheet;s.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,s],n.add(t);return}let o=e.createElement("style");o.id=t,o.textContent=r,e.head.append(o)}var Se=null;function Bn(){if(Se)return Se;let e=(Rn(),ti(Pn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Se=e}var $n=(e)=>Bn().reactive(e),Un=(e)=>Se?Se.raw(e):e;function jn(e,t,r){let n=Bn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function Uo(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},o=null,s=null,a=0,l=null,d=0,c=null,u=new n.MutationObserver((m)=>{if(!o.isConnected||m.some(({target:p})=>s.contains(p)&&!c.contains(p)))f()});function f(){if(!o)return;n.clearTimeout(d),u.disconnect();let m=o.dataset.b3Confirm;if(l&&m&&o.textContent===m)o.replaceChildren(...l);o.removeAttribute("data-b3-armed"),o=s=l=null,c.textContent=""}function g(m){if(!c?.isConnected)c=r.createElement("span"),c.className="b3-visually-hidden",c.setAttribute("role","status"),r.body.append(c);let p=c;o=m,a=n.performance.now(),s=m.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||m.parentElement;let h=m.dataset.b3Confirm;if(h)l=[...m.childNodes],m.replaceChildren(h);m.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),d=n.setTimeout(f,4000),n.requestAnimationFrame(()=>{if(o===m)p.textContent=h||"Press again to confirm"})}e.addEventListener("click",(m)=>{let p=m.target.closest?.("[data-b3-confirm]");if(o&&p!==o)f();if(!p||p.disabled||!e.contains(p))return;if(p===o&&n.performance.now()-a>=350)return f();if(m.preventDefault(),m.stopImmediatePropagation(),p!==o)g(p)},{...i,capture:!0}),e.addEventListener("focusout",({target:m})=>{if(m===o)n.queueMicrotask(()=>m===o&&f())},i),e.addEventListener("keydown",(m)=>{let p=m;if(p.key==="Escape")f();else if(p.repeat&&(p.key==="Enter"||p.key===" ")&&p.target.closest?.("[data-b3-confirm]"))p.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{f(),c?.remove()},{once:!0})}var Hn=Symbol.for("bare-v3.confirm");function zn(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Hn])return;e[Hn]=!0,Uo(document)}var jo=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,Ho=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,zo=350,Ye=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),qn=(e)=>JSON.parse(JSON.stringify(Un(e))),y=(e,t)=>e!=null&&String(e)===String(t),Vt=(e)=>!!e&&typeof e==="object",C=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],Jn=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function Fn(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Ye();t.add(String(n.id))};return e.filter(Vt).map((n)=>{r(n),n.cards=Jn(Array.isArray(n.cards)?n.cards.filter(Vt):[]);for(let i of n.cards)if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(Vt(o))r(o)}return n})}function Kn(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>y(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>y(o.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let o of n.cards){let s=C(o),a=s.findIndex((l)=>y(l.id,r));if(a>=0)return void s.splice(a,1)}}}function Wt(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...C(e).map((n)=>n.title??"")].join(`
23
- `);for(let[,,n]of r.matchAll(jo))t.add(n.toLowerCase());return[...t]}var qo=/\[([^\]\n]+)\]\(((?:[^()\s]|\([^()\s]*\))+)\)|\bhttps?:\/\/[^\s<>]+/giu;function Fo(e){if(/[\u0000- \u007f\\]/.test(e))return null;if(/^(https?:|mailto:)/i.test(e))return{href:e,file:!1};if(/^[a-z][a-z\d+.-]*:/i.test(e)||e.startsWith("//"))return null;return{href:e,file:!0}}function Yn(e){let t=[],r=0;for(let n of e.matchAll(qo)){let[i,o,s]=n,a=n.index+i.length;if(!s){let d=i;for(;;){if(d=d.replace(/[.,;:!?'"\]]+$/u,""),!d.endsWith(")")||d.split("(").length>=d.split(")").length)break;d=d.slice(0,-1)}a-=i.length-d.length,i=o=s=d}let l=Fo(s);if(!l)continue;if(n.index>r)t.push(e.slice(r,n.index));t.push({text:o,...l}),r=a}if(r<e.length)t.push(e.slice(r));return t}var Vn=(e)=>Yn(e).map((t)=>typeof t==="string"?t:t.text).join(""),Jt=null;function Ko(e,t){let r=e.ownerDocument;e.replaceChildren(...Yn(t).map((n)=>{if(typeof n==="string")return r.createTextNode(n);let i=r.createElement("a");if(i.className="b3-board-ref",i.href=n.href,i.dataset.href=n.href,i.draggable=!1,n.file){if(i.dataset.file="",!Jt){let o=r.createElement("template");o.innerHTML=Yo,Jt=o.content.firstElementChild}i.append(Jt.cloneNode(!0))}else if(!/^mailto:/i.test(n.href))i.target="_blank",i.rel="noopener noreferrer";return i.append(n.text),i}))}var Vo="b3-board-style",Wo=`
22
+ */});var nr=typeof HTMLElement==="function"?HTMLElement:class{};function ir(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function sr(e,t,r={},n=[]){let i=()=>{for(let s of n)if(!e.classList.contains(s))e.classList.add(s);for(let[s,o]of Object.entries(r))if(!e.hasAttribute(s))e.setAttribute(s,o)};i();let a=new MutationObserver(i);a.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>a.disconnect(),{once:!0})}var bi=Symbol.for("bare-v3.styles");function or(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[bi]??=new Set;if(n.has(t))return;let i=e.defaultView;if(i&&"adoptedStyleSheets"in e&&"replaceSync"in i.CSSStyleSheet.prototype){let s=new i.CSSStyleSheet;s.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,s],n.add(t);return}let a=e.createElement("style");a.id=t,a.textContent=r,e.head.append(a)}var Te=null;function qn(){if(Te)return Te;let e=(zn(),ci(jn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Te=e}var Fn=(e)=>qn().reactive(e),Kn=(e)=>Te?Te.raw(e):e;function Vn(e,t,r){let n=qn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function Jo(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},a=null,s=null,o=0,l=null,d=0,c=null,u=new n.MutationObserver((g)=>{if(!a.isConnected||g.some(({target:h})=>s.contains(h)&&!c.contains(h)))f()});function f(){if(!a)return;n.clearTimeout(d),u.disconnect();let g=a.dataset.b3Confirm;if(l&&g&&a.textContent===g)a.replaceChildren(...l);a.removeAttribute("data-b3-armed"),a=s=l=null,c.textContent=""}function m(g){if(!c?.isConnected)c=r.createElement("span"),c.className="b3-visually-hidden",c.setAttribute("role","status"),r.body.append(c);let h=c;a=g,o=n.performance.now(),s=g.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||g.parentElement;let b=g.dataset.b3Confirm;if(b)l=[...g.childNodes],g.replaceChildren(b);g.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),d=n.setTimeout(f,4000),n.requestAnimationFrame(()=>{if(a===g)h.textContent=b||"Press again to confirm"})}e.addEventListener("click",(g)=>{let h=g.target.closest?.("[data-b3-confirm]");if(a&&h!==a)f();if(!h||h.disabled||!e.contains(h))return;if(h===a&&n.performance.now()-o>=350)return f();if(g.preventDefault(),g.stopImmediatePropagation(),h!==a)m(h)},{...i,capture:!0}),e.addEventListener("focusout",({target:g})=>{if(g===a)n.queueMicrotask(()=>g===a&&f())},i),e.addEventListener("keydown",(g)=>{let h=g;if(h.key==="Escape")f();else if(h.repeat&&(h.key==="Enter"||h.key===" ")&&h.target.closest?.("[data-b3-confirm]"))h.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{f(),c?.remove()},{once:!0})}var Wn=Symbol.for("bare-v3.confirm");function Jn(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Wn])return;e[Wn]=!0,Jo(document)}var Yo=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,Go=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,Xo=350,Ze=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),Yn=(e)=>JSON.parse(JSON.stringify(Kn(e))),_=(e,t)=>e!=null&&String(e)===String(t),Xt=(e)=>!!e&&typeof e==="object",S=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],ti=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function Gn(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Ze();t.add(String(n.id))};return e.filter(Xt).map((n)=>{r(n),n.cards=ti(Array.isArray(n.cards)?n.cards.filter(Xt):[]);for(let i of n.cards)if(r(i),Array.isArray(i.subtasks)){for(let a of i.subtasks)if(Xt(a))r(a)}return n})}function Xn(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>_(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((a)=>_(a.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let a of n.cards){let s=S(a),o=s.findIndex((l)=>_(l.id,r));if(o>=0)return void s.splice(o,1)}}}var Zo=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function Qo(e){return[e.title??"",e.description??"",...S(e).map((t)=>t.title??""),...Qe(e)].join(`
23
+ `).toLowerCase()}function Qe(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...S(e).map((n)=>n.title??"")].join(`
24
+ `);for(let[,,n]of r.matchAll(Yo))t.add(n.toLowerCase());return[...t]}var Zn=String.raw`((?:[^()\s]|\([^()\s]*\))+)`,ea=new RegExp(String.raw`!\[([^\]\n]*)\]\(${Zn}\)|\[([^\]\n]+)\]\(${Zn}\)|\bhttps?:\/\/[^\s<>]+`,"giu");function ta(e){if(/[\u0000- \u007f\\]/.test(e))return null;if(/^(https?:|mailto:)/i.test(e))return{href:e,file:!1};if(/^[a-z][a-z\d+.-]*:/i.test(e)||e.startsWith("//"))return null;return{href:e,file:!0}}function er(e){let t=[],r=0;for(let n of e.matchAll(ea)){let i=n[2]!==void 0,[a]=n,s=i?n[1]:n[3],o=i?n[2]:n[4],l=n.index+a.length;if(!o){let c=a;for(;;){if(c=c.replace(/[.,;:!?'"\]]+$/u,""),!c.endsWith(")")||c.split("(").length>=c.split(")").length)break;c=c.slice(0,-1)}l-=a.length-c.length,a=s=o=c}let d=ta(o);if(!d||i&&!d.file&&!/^https?:/i.test(d.href))continue;if(n.index>r)t.push(e.slice(r,n.index));t.push({text:s,...d,...i?{image:i}:{}}),r=l}if(r<e.length)t.push(e.slice(r));return t}var Qn=(e)=>er(e).map((t)=>typeof t==="string"?t:t.text).join(""),Zt=null;function ra(e,t){let r=e.ownerDocument;e.replaceChildren(...er(t).map((n)=>{if(typeof n==="string")return r.createTextNode(n);let i=r.createElement("a");if(i.className="b3-board-ref",i.href=n.href,i.dataset.href=n.href,i.draggable=!1,n.image){let a=r.createElement("img");if(a.src=n.href,a.alt=n.text,a.loading="lazy",a.draggable=!1,i.classList.add("b3-board-image"),i.append(a),n.file)i.dataset.file="";else i.target="_blank",i.rel="noopener noreferrer";return i}if(n.file){if(i.dataset.file="",!Zt){let a=r.createElement("template");a.innerHTML=oa,Zt=a.content.firstElementChild}i.append(Zt.cloneNode(!0))}else if(!/^mailto:/i.test(n.href))i.target="_blank",i.rel="noopener noreferrer";return i.append(n.text),i}))}var na="b3-board-style",ia=`
24
25
  :where(b3-board){--b3-board-hit:var(--b3-d-control,var(--b3-touch,2.75rem));--b3-board-chip:var(--b3-d-control-small,2rem);
25
26
  --b3-board-tag:var(--b3-color-accent);--b3-board-mention:var(--b3-color-info);--b3-board-star:var(--b3-color-warning);
26
27
  --b3-board-line:color-mix(in srgb,var(--b3-color-border) 70%,transparent);--b3-board-soft:color-mix(in srgb,var(--b3-color-text) 5%,var(--b3-color-surface));}
@@ -43,6 +44,8 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
43
44
  /* Quiet text actions: Clear, Add details/subtask/column. */
44
45
  .b3-board-ref{color:var(--b3-color-accent);text-decoration:none;text-underline-offset:.15em;overflow-wrap:anywhere;}
45
46
  .b3-board-ref:hover{text-decoration:underline;}
47
+ .b3-board-image{display:inline-block;max-inline-size:100%;margin-block:.125rem;vertical-align:top;line-height:0;}
48
+ .b3-board-image>img{max-inline-size:100%;max-block-size:10rem;border-radius:var(--b3-radius-small,.375rem);background:var(--b3-board-soft);}
46
49
  .b3-board-ref>.b3-board-icon{display:inline;inline-size:.875em;block-size:.875em;margin-inline-end:.2em;vertical-align:-.125em;}
47
50
  .b3-board-link{display:inline-flex;align-items:center;gap:.375rem;min-block-size:var(--b3-board-chip);padding:0 .375rem;border:0;
48
51
  border-radius:var(--b3-radius-small,.375rem);background:none;color:var(--b3-color-muted);font:inherit;font-size:.8125rem;white-space:nowrap;}
@@ -153,9 +156,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
153
156
  :is(.b3-board-cards,.b3-board-subtasks)[data-b3-drop="end"]{box-shadow:inset 0 -3px 0 -1px var(--b3-color-accent);}
154
157
  .b3-board-columns[data-b3-drop="end"]{box-shadow:inset -3px 0 0 -1px var(--b3-color-accent);}
155
158
  @media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-ghost{rotate:none;}}
156
- `,re=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,Wn=re('<circle cx="9" cy="5" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="19" r="1"/>'),We=re('<path d="M5 12h14M12 5v14"/>'),Yt=re('<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"/>'),Jo=re('<path d="m9 18 6-6-6-6"/>'),Yo=re('<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4M10 9H8M16 13H8M16 17H8"/>'),Go=re('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),Xo=re('<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>'),Je=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
159
+ `,ne=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,ei=ne('<circle cx="9" cy="5" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="19" r="1"/>'),Ge=ne('<path d="M5 12h14M12 5v14"/>'),Qt=ne('<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"/>'),sa=ne('<path d="m9 18 6-6-6-6"/>'),oa=ne('<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4M10 9H8M16 13H8M16 17H8"/>'),aa=ne('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),la=ne('<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>'),Xe=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
157
160
  <textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
158
- b3x-on:keydown="keyEditor($event, ${r})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,Zo=`
161
+ b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,da=`
159
162
  <div class="b3-board-filters" b3x-bind:hidden="!tokens().length" role="group" aria-label="Filter">
160
163
  <span class="b3-board-caption" aria-hidden="true">Filter</span>
161
164
  <template b3x-for="token in tokens()" b3x-bind:key="token">
@@ -167,30 +170,30 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
167
170
  <template b3x-for="column in columns" b3x-bind:key="column.id">
168
171
  <section class="b3-board-column" b3x-bind:data-column="column.id" b3x-bind:data-kind="column.kind || null" b3x-bind:aria-label="column.name">
169
172
  <header class="b3-board-column-header">
170
- ${Je("name","column.id",!1)}
173
+ ${Xe("name","column.id",!1)}
171
174
  <button type="button" class="b3-board-column-name" b3x-show="!isEditing('name', column.id)"
172
175
  b3x-on:click="edit('name', column.id, column.name)" b3x-on:keydown="keyColumn($event, column)" b3x-text="column.name || 'Untitled'"></button>
173
176
  <span class="b3-board-count" b3x-text="count(column)"></span>
174
177
  <button type="button" class="b3-board-quiet b3-board-add-card" b3x-show="!readonly" b3x-bind:aria-label="'Add card to ' + (column.name || 'Untitled')"
175
- b3x-on:click="addCard(column)">${We}</button>
178
+ b3x-on:click="addCard(column)">${Ge}</button>
176
179
  <button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" b3x-bind:aria-label="'Delete column ' + (column.name || 'Untitled')"
177
- b3x-on:click="removeColumn(column)">${Yt}</button>
180
+ b3x-on:click="removeColumn(column)">${Qt}</button>
178
181
  </header>
179
182
  <ol class="b3-board-cards">
180
183
  <template b3x-for="card in visible(column)" b3x-bind:key="card.id">
181
184
  <li class="b3-board-card" tabindex="0" b3x-bind:data-card="card.id" b3x-bind:data-starred="card.starred ? '' : null" b3x-on:keydown="keyCard($event, card)">
182
- <span class="b3-board-grip" b3x-show="!readonly">${Wn}</span>
185
+ <span class="b3-board-grip" b3x-show="!readonly">${ei}</span>
183
186
  <div class="b3-board-card-head">
184
- ${Je("title","card.id")}
187
+ ${Xe("title","card.id")}
185
188
  <span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('title', card.id)" b3x-on:click="edit('title', card.id, card.title)"
186
189
  b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
187
190
  <span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
188
191
  <button type="button" class="b3-board-quiet b3-board-details" b3x-show="!readonly && !hasDetails(card) && !isOpen(card)" b3x-bind:aria-label="'Add details to ' + plain(card.title)"
189
- b3x-on:click="addDetails(card)">${Go}</button>
192
+ b3x-on:click="addDetails(card)">${aa}</button>
190
193
  <button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(card.title)"
191
- b3x-on:click="removeCard(column, card)">${Yt}</button>
194
+ b3x-on:click="removeCard(column, card)">${Qt}</button>
192
195
  <button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
193
- b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${Xo}</button>
196
+ b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${la}</button>
194
197
  </span>
195
198
  </div>
196
199
  <div class="b3-board-tags" b3x-show="tokensOf(card).length">
@@ -200,32 +203,32 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
200
203
  </div>
201
204
  <button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
202
205
  b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
203
- ${Jo}
206
+ ${sa}
204
207
  <span class="b3-board-progress" b3x-show="subtasksOf(card).length" b3x-bind:data-complete="complete(card) ? '' : null" b3x-text="done(card) + '/' + subtasksOf(card).length"></span>
205
208
  <span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
206
209
  <span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length">Hide details</span>
207
210
  </button>
208
211
  <template b3x-if="isOpen(card)">
209
212
  <div class="b3-board-body">
210
- ${Je("description","card.id")}
213
+ ${Xe("description","card.id")}
211
214
  <div class="b3-board-description" role="button" tabindex="0" b3x-show="card.description && !isEditing('description', card.id)"
212
215
  b3x-on:click="edit('description', card.id, card.description)" b3x-on:keydown="keyText($event, 'description', card.id, card.description)"
213
216
  b3x-effect="rich($el, card.description)"></div>
214
217
  <ul class="b3-board-subtasks" b3x-show="subtasksOf(card).length">
215
218
  <template b3x-for="sub in subtasksOf(card)" b3x-bind:key="sub.id">
216
219
  <li class="b3-board-subtask" b3x-bind:data-subtask="sub.id" b3x-bind:data-done="sub.done ? '' : null">
217
- <span class="b3-board-subtask-grip" b3x-show="!readonly">${Wn}</span>
220
+ <span class="b3-board-subtask-grip" b3x-show="!readonly">${ei}</span>
218
221
  <input type="checkbox" b3x-bind:checked="!!sub.done" b3x-bind:disabled="readonly" b3x-on:change="check(card, sub, $event.target.checked)" b3x-bind:aria-label="plain(sub.title)">
219
- ${Je("subtask","sub.id",!1)}
222
+ ${Xe("subtask","sub.id",!1)}
220
223
  <span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('subtask', sub.id)"
221
224
  b3x-on:click="edit('subtask', sub.id, sub.title)" b3x-on:keydown="keySubtask($event, card, sub)" b3x-effect="rich($el, sub.title)"></span>
222
- <button type="button" class="b3-board-quiet b3-board-remove" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(sub.title)" b3x-on:click="removeSubtask(card, sub)">${Yt}</button>
225
+ <button type="button" class="b3-board-quiet b3-board-remove" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(sub.title)" b3x-on:click="removeSubtask(card, sub)">${Qt}</button>
223
226
  </li>
224
227
  </template>
225
228
  </ul>
226
229
  <div class="b3-board-actions" b3x-show="!readonly">
227
- <button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${We}<span>Add details</span></button>
228
- <button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${We}<span>Add subtask</span></button>
230
+ <button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${Ge}<span>Add details</span></button>
231
+ <button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${Ge}<span>Add subtask</span></button>
229
232
  </div>
230
233
  </div>
231
234
  </template>
@@ -234,7 +237,10 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
234
237
  </ol>
235
238
  </section>
236
239
  </template>
237
- <button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${We}<span>Add column</span></button>
240
+ <button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${Ge}<span>Add column</span></button>
238
241
  </div>
239
- <span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class Gn extends Xt{static observedAttributes=["readonly"];#r=null;#e=null;#o=null;#a=null;#u=!1;#i=null;#l=null;#t=null;#d=!1;get columns(){let e=qn(this.#e?.columns??this.#o??[]),t=this.#e?.editing;if(t?.fresh)Kn(e,t);return e}set columns(e){let t=Fn(qn(e));if(!this.#e){this.#o=t;return}this.#n();let r=this.#e;if(r.columns=t,r.editing&&!this.#s(r.editing.id))r.editing=null}get filter(){return[...this.#e?.filter??this.#a??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e)this.#e.filter=t;else this.#a=t}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","readonly"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#r&&e.readyState==="loading"){if(!this.#u)this.#u=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#u=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(er(e,Vo,Wo),zn(),!this.#r){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#o;if(!r&&t)try{r=Fn(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#r=e.createElement("div"),this.#r.className="b3-board-ui",this.append(this.#r),this.#e=jn(this.#r,Zo,this.#x(r??[],this.#a??[])),this.#o=this.#a=null}else if(this.#r.parentNode!==this)this.append(this.#r);this.#l=new MutationObserver(()=>{if(this.#r&&this.#r.parentNode!==this)this.append(this.#r)}),this.#l.observe(this,{childList:!0}),this.#_(),Qt(this,this.#i.signal,{role:"region"})}disconnectedCallback(){this.#n(),this.#i?.abort(),this.#i=null,this.#l?.disconnect(),this.#l=null}attributeChangedCallback(){if(!this.#e)return;if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#n(),this.#e.editing=null}#s(e){for(let t of this.#e?.columns??[]){if(y(t.id,e))return t;for(let r of t.cards)if(y(r.id,e)||C(r).some((n)=>y(n.id,e)))return r}return null}#c(e){this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}#x(e,t){let r=this,n=(s)=>this.#c(s),i=(s)=>{for(let a of o.columns){let l=a.cards.findIndex((d)=>y(d.id,s));if(l>=0)return{column:a,index:l,card:a.cards[l]}}return null},o=$n({columns:e,filter:t,editing:null,announcement:"",readonly:r.readonly,viewed:{},tokensOf:Wt,subtasksOf:C,label(s){let a=String(s??"");return a.replace(Ho,"").trim()||a},pressed(s){return String(o.filter.includes(s))},mention(s){return s.startsWith("@")?"":null},starred(s){return String(!!s.starred)},hasDetails(s){return!!(s.description||C(s).length)},complete(s){let a=C(s).length;return a>0&&o.done(s)===a},preview(s){return Vn(String(s.description??"").split(`
240
- `).find((a)=>a.trim())?.trim()??"")},plain(s){return Vn(o.label(s))},rich(s,a){Ko(s,String(a??""))},keyText(s,a,l,d){if(s.target!==s.currentTarget||s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),o.edit(a,l,d)},isOpen(s){let a=o.viewed[String(s.id)];return o.readonly&&a!==void 0?a:!!s.expanded},expanded(s){return String(o.isOpen(s))},isEditing(s,a){return!!o.editing&&o.editing.field===s&&o.editing.id===a},focusEditor(s){queueMicrotask(()=>r.#v(s))},blurEditor(s,a){if(o.isEditing(s,a))o.commit()},tokens(){let s=new Set;for(let a of o.columns)for(let l of a.cards)for(let d of Wt(l))s.add(d);return[...s].sort()},visible(s){if(!o.filter.length)return s.cards;let a=o.editing&&r.#s(o.editing.id);return s.cards.filter((l)=>{if(l===a)return!0;let d=Wt(l);return o.filter.every((c)=>d.includes(c))})},count(s){let a=o.visible(s).length;return a===s.cards.length?String(a):`${a}/${s.cards.length}`},done(s){return C(s).filter((a)=>a.done).length},disclosable(s){return!!(s.description||C(s).length||!o.readonly)},toggleFilter(s){o.filter=o.filter.includes(s)?o.filter.filter((a)=>a!==s):[...o.filter,s]},setFilter(s){o.filter=s},toggleStar(s){let a=i(s.id);if(o.readonly||!a)return;if(s.starred)delete s.starred;else s.starred=!0;a.column.cards=Jn(a.column.cards);let l=!!s.starred;o.announcement=`${s.title??""} ${l?"starred":"unstarred"}`,n({type:"star",card:s.id,starred:l}),r.#p(s.id)},toggle(s){if(o.readonly){o.viewed={...o.viewed,[String(s.id)]:!o.isOpen(s)};return}s.expanded=!s.expanded,n({type:"toggle",card:s.id,expanded:s.expanded})},edit(s,a,l,d=!1,c=!1){if(o.readonly||r.#t?.started)return;if(o.editing&&!o.isEditing(s,a))o.commit();o.editing={field:s,id:a,draft:l??"",fresh:d,opened:c},r.#y()},addDetails(s){if(o.readonly)return;let a=!s.expanded;s.expanded=!0,o.edit("description",s.id,String(s.description??""),!1,a)},keyEditor(s,a){if(s.stopPropagation(),s.key==="Escape")s.preventDefault(),o.cancel();else if(s.key==="Enter"&&!(a&&s.shiftKey)&&!s.isComposing)s.preventDefault(),o.commit(!0)},cancel(){let s=o.editing;if(o.editing=null,s?.fresh)o.discard(s);if(s?.opened)o.close(s);r.#h(s)},close(s){let a=r.#s(s.id);if(a&&!o.hasDetails(a))a.expanded=!1},commit(s=!1){let a=o.editing;if(!a)return;if(o.editing=null,o.readonly)return;let l=a.field==="description"?a.draft.trim():a.draft.replace(/\s+/g," ").trim(),d=r.#s(a.id);if(!d)return;if(!l&&a.fresh)return o.discard(a);if(!l&&a.opened)o.close(a);let c=null;if(a.field==="name"){let u=d;if(l&&l!==u.name)u.name=l,c={type:"edit",column:u.id,field:"name"};if(a.fresh)c={type:"add",column:u.id}}else if(a.field==="subtask"){let u=d,f=C(u).find((g)=>y(g.id,a.id));if(!l)return o.removeSubtask(u,f);if(l!==f.title)f.title=l,c={type:"edit",card:u.id,field:"subtask",subtask:f.id};if(a.fresh)c={type:"subtask",card:u.id,subtask:f.id,op:"add"}}else{let u=d,f=a.field;if((l||f==="description")&&l!==(u[f]??""))u[f]=l,c={type:"edit",card:u.id,field:f};if(a.fresh)c={type:"add",card:u.id,column:i(u.id).column.id}}if(c)n(c);if(a.fresh&&a.field==="subtask"&&s)o.addSubtask(d);else if(a.fresh&&a.field==="title"&&s&&!r.hasAttribute("compact"))o.addDetails(d);else r.#h(a)},discard(s){Kn(o.columns,s)},settle(){if(o.editing)o.commit()},addCard(s){if(o.readonly)return;o.settle();let a={id:Ye(),title:""};s.cards.push(a),o.edit("title",a.id,"",!0)},addColumn(){if(o.readonly)return;o.settle();let s={id:Ye(),name:"",cards:[]};o.columns.push(s),o.edit("name",s.id,"",!0)},addSubtask(s){if(o.readonly)return;o.settle();let a={id:Ye(),title:"",done:!1};if(s.expanded=!0,!Array.isArray(s.subtasks))s.subtasks=[];s.subtasks.push(a),o.edit("subtask",a.id,"",!0)},removeCard(s,a){if(o.readonly)return;s.cards=s.cards.filter((l)=>l!==a),n({type:"remove",card:a.id,column:s.id})},removeColumn(s){if(o.readonly)return;o.columns=o.columns.filter((a)=>a!==s),n({type:"remove",column:s.id})},removeSubtask(s,a){if(o.readonly)return;s.subtasks=C(s).filter((l)=>l!==a),n({type:"subtask",card:s.id,subtask:a.id,op:"remove"})},check(s,a,l){if(o.readonly)return;a.done=l,n({type:"check",card:s.id,subtask:a.id,done:l})},keyCard(s,a){if(s.target!==s.currentTarget)return;if(s.key==="Enter")return s.preventDefault(),o.edit("title",a.id,a.title);if(!s.altKey||o.readonly)return;let l=i(a.id);if(!l)return;let d=getComputedStyle(r).direction==="rtl",c={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[s.key];if(!c)return;if(s.preventDefault(),s.key==="ArrowUp"||s.key==="ArrowDown"){let f=o.visible(l.column),g=f[f.indexOf(l.card)+c];if(g&&!g.starred===!a.starred)r.moveCard(a.id,l.column.id,l.column.cards.indexOf(g));return}let u=o.columns[o.columns.indexOf(l.column)+c];if(u)r.moveCard(a.id,u.id,Math.min(l.index,u.cards.length))},keySubtask(s,a,l){o.keyText(s,"subtask",l.id,l.title);let d=s.key==="ArrowUp"?-1:s.key==="ArrowDown"?1:0;if(!s.altKey||!d||o.readonly)return;s.preventDefault(),s.stopPropagation(),r.#f(a,l.id,C(a).indexOf(l)+d)},keyColumn(s,a){if(!s.altKey||o.readonly)return;let l=getComputedStyle(r).direction==="rtl",d=s.key==="ArrowLeft"?l?1:-1:s.key==="ArrowRight"?l?-1:1:0;if(!d)return;s.preventDefault();let c=o.columns.indexOf(a)+d;if(c>=0&&c<o.columns.length)r.moveColumn(a.id,c)}});return o}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>y(f.id,e))),o=n.columns.find((u)=>y(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>y(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,d=Math.max(0,Math.min(o.cards.length,r)),c=a.starred?Math.min(d,l):Math.max(d,l);if(o.cards.splice(c,0,a),i===o&&s===c)return!1;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${c+1} of ${o.cards.length}`,this.#c({type:"move",card:a.id,from:i.id,to:o.id,index:c}),this.#p(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>y(s.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),o=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(o,0,i),n===o)return!1;return r.announcement=`${i.name??""} moved to position ${o+1} of ${r.columns.length}`,this.#c({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#f(e,t,r){let n=this.#e,i=C(e),o=i.findIndex((l)=>y(l.id,t));if(!n||this.readonly||o<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(o===s)return!1;let[a]=i.splice(o,1);return i.splice(s,0,a),n.announcement=`${a.title??""} moved to position ${s+1} of ${i.length}`,this.#c({type:"subtask",card:e.id,subtask:a.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(a.id))}"] .b3-board-title`)?.focus()),!0}#v(e){if(!e.isConnected)return;e.focus({preventScroll:!0}),e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView?.visualViewport;if(!n)return;let i=new AbortController;n.addEventListener("resize",()=>{if(i.abort(),this.ownerDocument.activeElement===e)r()},{signal:i.signal}),setTimeout(()=>i.abort(),1000)}#y(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#r?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#r?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#p(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#h(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#_(){this.#i?.abort(),this.#i=new AbortController;let e=this.#i.signal,t=this.ownerDocument.defaultView;this.addEventListener("pointerdown",(n)=>this.#E(n),{signal:e}),t.addEventListener("pointermove",(n)=>this.#k(n),{signal:e}),t.addEventListener("pointerup",(n)=>this.#A(n),{signal:e}),t.addEventListener("pointercancel",(n)=>{if(n.pointerId===this.#t?.pointerId)this.#n()},{signal:e}),t.addEventListener("keydown",(n)=>{if(n.key==="Escape"&&this.#t?.started)n.preventDefault(),this.#n()},{signal:e}),this.addEventListener("touchmove",(n)=>{if(this.#t?.started)n.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(n)=>{if(this.#t)n.preventDefault()},{signal:e}),this.addEventListener("click",(n)=>{if(!this.#d)return;this.#d=!1,n.preventDefault(),n.stopImmediatePropagation()},{signal:e,capture:!0});let r=(n)=>this.#w(n);this.addEventListener("click",r,{signal:e,capture:!0}),this.addEventListener("auxclick",(n)=>{if(n.button===1)r(n)},{signal:e,capture:!0})}#w(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(l)=>t.closest(l),n=this.#e?.columns.find((l)=>y(l.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((l)=>y(l.id,r("[data-card]")?.dataset.card)),o=i&&C(i).find((l)=>y(l.id,r("[data-subtask]")?.dataset.subtask)),s={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(o)s.subtask=o.id;if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#E(e){if(this.readonly||this.#t||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#t=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#t===n)this.#b(e.clientX,e.clientY)},zo)}#b(e,t){let r=this.#t;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let s of[i,...i.querySelectorAll("[id]")])s.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#r.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#t!==r)return;this.#C(r.px,r.py),this.#S(this.#m(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#k(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#n();return}if(r<5)return;this.#b(e.clientX,e.clientY)}e.preventDefault(),t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#A(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#n();let r=this.#m(e.clientX,e.clientY);if(this.#n(),this.#d=!0,setTimeout(()=>{this.#d=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>y(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((d)=>y(d.id,t.id))),s=r.before?i.cards.findIndex((l)=>y(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>y(l.id,t.id));if(o===i&&a<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#s(t.card);if(!i)return;let o=C(i),s=r.before?o.findIndex((a)=>y(a.id,r.before)):o.length;if(o.findIndex((a)=>y(a.id,t.id))<s)s-=1;this.#f(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>y(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>y(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#m(e,t){let r=this.#t,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#g(e,n);if(!l)return null;let d=l.querySelector(".b3-board-cards"),c=[...d.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=c.find((g)=>{let m=g.getBoundingClientRect();return t<m.top+m.height/2}),f=(g)=>!!(g!=null&&this.#s(g)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=c.find((g)=>!f(g.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:d}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let f=u.getBoundingClientRect();return t<f.top+f.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.find((l)=>{let d=l.getBoundingClientRect();return s?e>d.left+d.width/2:e<d.left+d.width/2})?.dataset.column??null,list:i}}#S(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#t.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#g(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#C(e,t){let r=(s,a,l)=>s<a+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#t?.kind==="card"?this.#g(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let o=this.ownerDocument.defaultView;o.scrollBy(0,r(t,0,o.innerHeight))}#n(){let e=this.#t;if(!e)return;this.#t=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}Zt("b3-board",Gn);export{Gn as B3Board};
242
+ <span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class ri extends nr{static observedAttributes=["readonly","search"];#r=null;#e=null;#a=null;#l=null;#d=null;#f=!1;#s=null;#c=null;#t=null;#u=!1;#p=null;#k=0;#A=Math.random().toString(36).slice(2,8);#h=!1;#m=[];get columns(){let e=Yn(this.#e?.columns??this.#a??[]),t=this.#e?.editing;if(t?.fresh)Xn(e,t);return e}set columns(e){let t=Gn(Yn(e));if(!this.#e){this.#a=t;return}this.#n();let r=this.#e;if(r.columns=t,r.editing&&!this.#i(r.editing.id))r.editing=null}get filter(){return[...this.#e?.filter??this.#l??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e){if(t.join(" ")!==this.#e.filter.join(" "))this.#e.kept=[];this.#e.filter=t}else this.#l=t}get search(){return this.#e?.search??this.#d??""}set search(e){let t=String(e??"");if(this.#e){if(t!==this.#e.search)this.#e.kept=[];this.#e.search=t}else this.#d=t}get defaultColumn(){return this.getAttribute("default-column")??""}set defaultColumn(e){if(e)this.setAttribute("default-column",String(e));else this.removeAttribute("default-column")}addCard(e){let t=this.#e;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((a)=>_(a.id,r))??t.columns.find((a)=>String(a.name??"").trim().toLowerCase()===n))||(e===void 0?t.columns[0]:void 0);if(!i)return!1;return t.addCard(i),!0}get upload(){return this.#p}set upload(e){this.#p=typeof e==="function"?e:null}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","search","defaultColumn","readonly","upload"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#r&&e.readyState==="loading"){if(!this.#f)this.#f=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#f=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(or(e,na,ia),Jn(),!this.#r){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#a;if(!r&&t)try{r=Gn(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#r=e.createElement("div"),this.#r.className="b3-board-ui",this.append(this.#r),this.#e=Vn(this.#r,da,this.#S(r??[],this.#l??[],this.#d??this.getAttribute("search")??"")),this.#a=this.#l=this.#d=null}else if(this.#r.parentNode!==this)this.append(this.#r);this.#c=new MutationObserver(()=>{if(this.#r&&this.#r.parentNode!==this)this.append(this.#r)}),this.#c.observe(this,{childList:!0}),this.#M(),sr(this,this.#s.signal,{role:"region"})}disconnectedCallback(){this.#n(),this.#s?.abort(),this.#s=null,this.#y(),this.#c?.disconnect(),this.#c=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#e)return;if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#n(),this.#e.editing=null}#i(e){for(let t of this.#e?.columns??[]){if(_(t.id,e))return t;for(let r of t.cards)if(_(r.id,e)||S(r).some((n)=>_(n.id,e)))return r}return null}#o(e){this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}#S(e,t,r){let n=this,i=(o)=>this.#o(o),a=(o)=>{for(let l of s.columns){let d=l.cards.findIndex((c)=>_(c.id,o));if(d>=0)return{column:l,index:d,card:l.cards[d]}}return null},s=Fn({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,viewed:{},tokensOf:Qe,subtasksOf:S,label(o){let l=String(o??"");return l.replace(Go,"").trim()||l},pressed(o){return String(s.filter.includes(o))},mention(o){return o.startsWith("@")?"":null},starred(o){return String(!!o.starred)},hasDetails(o){return!!(o.description||S(o).length)},complete(o){let l=S(o).length;return l>0&&s.done(o)===l},preview(o){let l=String(o.description??"");return l.split(`
243
+ `).map(Qn).find((c)=>c.trim())?.trim()??(er(l).some((c)=>typeof c!=="string"&&c.image)?"Image":"")},plain(o){return Qn(s.label(o))},rich(o,l){ra(o,String(l??""))},keyText(o,l,d,c){if(o.target!==o.currentTarget||o.key!=="Enter"&&o.key!==" ")return;o.preventDefault(),o.stopPropagation(),s.edit(l,d,c)},isOpen(o){let l=s.viewed[String(o.id)];return s.readonly&&l!==void 0?l:!!o.expanded},expanded(o){return String(s.isOpen(o))},isEditing(o,l){return!!s.editing&&s.editing.field===o&&s.editing.id===l},focusEditor(o){queueMicrotask(()=>n.#T(o))},blurEditor(o,l){if(s.isEditing(o,l))s.commit()},tokens(){let o=new Set;for(let l of s.columns)for(let d of l.cards)for(let c of Qe(d))o.add(c);return[...o].sort()},visible(o){let l=Zo(s.search);if(!s.filter.length&&!l.length)return o.cards;let d=s.editing&&n.#i(s.editing.id);return o.cards.filter((c)=>{if(c===d||s.kept.some((m)=>_(c.id,m)))return!0;let u=Qe(c),f=l.length?Qo(c):"";return s.filter.every((m)=>u.includes(m))&&l.every((m)=>f.includes(m))})},count(o){let l=s.visible(o).length;return l===o.cards.length?String(l):`${l}/${o.cards.length}`},done(o){return S(o).filter((l)=>l.done).length},disclosable(o){return!!(o.description||S(o).length||!s.readonly)},toggleFilter(o){s.kept=[],s.filter=s.filter.includes(o)?s.filter.filter((l)=>l!==o):[...s.filter,o]},setFilter(o){s.kept=[],s.filter=o},toggleStar(o){let l=a(o.id);if(s.readonly||!l)return;if(o.starred)delete o.starred;else o.starred=!0;l.column.cards=ti(l.column.cards);let d=!!o.starred;s.announcement=`${o.title??""} ${d?"starred":"unstarred"}`,i({type:"star",card:o.id,starred:d}),n.#x(o.id)},toggle(o){if(s.readonly){s.viewed={...s.viewed,[String(o.id)]:!s.isOpen(o)};return}o.expanded=!o.expanded,i({type:"toggle",card:o.id,expanded:o.expanded})},edit(o,l,d,c=!1,u=!1){if(s.readonly||n.#t?.started)return;if(s.editing&&!s.isEditing(o,l))s.commit();s.editing={field:o,id:l,draft:d??"",fresh:c,opened:u},n.#O()},addDetails(o){if(s.readonly)return;let l=!o.expanded;o.expanded=!0,s.edit("description",o.id,String(o.description??""),!1,l)},keyEditor(o,l){if(o.stopPropagation(),o.key==="Escape")o.preventDefault(),s.cancel();else if(o.key==="Enter"&&!(l&&o.shiftKey)&&!o.isComposing)o.preventDefault(),s.commit(!0)},pasteEditor(o,l,d){let c=[...o.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(s.readonly||!n.upload||l!=="title"&&l!=="description"||!c.length)return;if(o.clipboardData?.getData("text/plain").trim())return;o.preventDefault();for(let u of c)n.#C(d,u,l==="description"?o.target:null)},cancel(){let o=s.editing;if(s.editing=null,o?.fresh)s.discard(o);if(o?.opened)s.close(o);n.#v(o)},close(o){let l=n.#i(o.id);if(l&&!s.hasDetails(l))l.expanded=!1},commit(o=!1){let l=s.editing;if(!l)return;if(s.editing=null,s.readonly)return;let d=l.field==="description"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),c=n.#i(l.id);if(!c)return;if(!d&&l.fresh)return s.discard(l);if(!d&&l.opened)s.close(l);let u=null;if(l.field==="name"){let f=c;if(d&&d!==f.name)f.name=d,u={type:"edit",column:f.id,field:"name"};if(l.fresh)u={type:"add",column:f.id}}else if(l.field==="subtask"){let f=c,m=S(f).find((g)=>_(g.id,l.id));if(!d)return s.removeSubtask(f,m);if(d!==m.title)m.title=d,u={type:"edit",card:f.id,field:"subtask",subtask:m.id};if(l.fresh)u={type:"subtask",card:f.id,subtask:m.id,op:"add"}}else{let f=c,m=l.field;if((d||m==="description")&&d!==(f[m]??""))f[m]=d,u={type:"edit",card:f.id,field:m};if(l.fresh)u={type:"add",card:f.id,column:a(f.id).column.id},s.kept=[...s.kept,f.id]}if(u)i(u);if(l.fresh&&l.field==="subtask"&&o)s.addSubtask(c);else if(l.fresh&&l.field==="title"&&o&&!n.hasAttribute("compact"))s.addDetails(c);else n.#v(l)},discard(o){Xn(s.columns,o)},settle(){if(s.editing)s.commit()},addCard(o){if(s.readonly)return;s.settle();let l={id:Ze(),title:""};o.cards.push(l),s.edit("title",l.id,"",!0)},addColumn(){if(s.readonly)return;s.settle();let o={id:Ze(),name:"",cards:[]};s.columns.push(o),s.edit("name",o.id,"",!0)},addSubtask(o){if(s.readonly)return;s.settle();let l={id:Ze(),title:"",done:!1};if(o.expanded=!0,!Array.isArray(o.subtasks))o.subtasks=[];o.subtasks.push(l),s.edit("subtask",l.id,"",!0)},removeCard(o,l){if(s.readonly)return;o.cards=o.cards.filter((d)=>d!==l),i({type:"remove",card:l.id,column:o.id})},removeColumn(o){if(s.readonly)return;s.columns=s.columns.filter((l)=>l!==o),i({type:"remove",column:o.id})},removeSubtask(o,l){if(s.readonly)return;o.subtasks=S(o).filter((d)=>d!==l),i({type:"subtask",card:o.id,subtask:l.id,op:"remove"})},check(o,l,d){if(s.readonly)return;l.done=d,i({type:"check",card:o.id,subtask:l.id,done:d})},keyCard(o,l){if(o.target!==o.currentTarget)return;if(o.key==="Enter")return o.preventDefault(),s.edit("title",l.id,l.title);if(!o.altKey||s.readonly)return;let d=a(l.id);if(!d)return;let c=getComputedStyle(n).direction==="rtl",u={ArrowUp:-1,ArrowDown:1,ArrowLeft:c?1:-1,ArrowRight:c?-1:1}[o.key];if(!u)return;if(o.preventDefault(),o.key==="ArrowUp"||o.key==="ArrowDown"){let m=s.visible(d.column),g=m[m.indexOf(d.card)+u];if(g&&!g.starred===!l.starred)n.moveCard(l.id,d.column.id,d.column.cards.indexOf(g));return}let f=s.columns[s.columns.indexOf(d.column)+u];if(f)n.moveCard(l.id,f.id,Math.min(d.index,f.cards.length))},keySubtask(o,l,d){s.keyText(o,"subtask",d.id,d.title);let c=o.key==="ArrowUp"?-1:o.key==="ArrowDown"?1:0;if(!o.altKey||!c||s.readonly)return;o.preventDefault(),o.stopPropagation(),n.#g(l,d.id,S(l).indexOf(d)+c)},keyColumn(o,l){if(!o.altKey||s.readonly)return;let d=getComputedStyle(n).direction==="rtl",c=o.key==="ArrowLeft"?d?1:-1:o.key==="ArrowRight"?d?-1:1:0;if(!c)return;o.preventDefault();let u=s.columns.indexOf(l)+c;if(u>=0&&u<s.columns.length)n.moveColumn(l.id,u)}});return s}async#C(e,t,r){let n=this.#e,i=()=>n.editing?.field==="description"&&_(n.editing.id,e)?n.editing:null,a=`![Uploading image ${this.#A}-${++this.#k}…]()`,s="",o=i();if(o&&r){let{selectionStart:p,selectionEnd:x}=r;s=p&&r.value[p-1]!==`
244
+ `?`
245
+ ${a}`:a,o.draft=r.value=r.value.slice(0,p)+s+r.value.slice(x),r.setSelectionRange(p+s.length,p+s.length)}let l=n.columns.find((p)=>p.cards.some((x)=>_(x.id,e))),d=null;try{d=await this.#p?.(t,{card:e,column:l?.id})}catch(p){console.warn("b3-board: image upload failed",p)}let c=d?`![](${String(d).replace(/[\s()]/g,(p)=>`%${p.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!c)this.#b("Image not added");while(this.#h)await new Promise((p)=>this.#m.push(p));let u=(p)=>{if(!s)return null;let x=p.indexOf(s),U=x>=0?x:p.indexOf(a);if(U<0)return null;let ie=x>=0?s:a;return[U,U+ie.length,c?ie.replace(a,c):""]},f=(p)=>{if(!s)return c?p.trim()?`${p.replace(/\s+$/,"")}
246
+ ${c}`:c:p;let x=u(p);return x?p.slice(0,x[0])+x[2]+p.slice(x[1]):p},m=i();if(m){let p=this.querySelector("textarea.b3-board-editor"),x=p?.value===m.draft&&u(p.value);if(p&&x){let[U,ie,et]=x,{selectionStart:ni,selectionEnd:ii,selectionDirection:si}=p,tr=(Oe)=>Oe>=ie?Oe+et.length-(ie-U):Oe>U?U+et.length:Oe;p.setRangeText(et,U,ie),p.setSelectionRange(tr(ni),tr(ii),si??void 0),m.draft=p.value}else if(f(m.draft)!==m.draft)m.draft=f(m.draft);else if(c)this.#b("Image not added");return}let g=this.#i(e);if(s&&!String(g?.description??"").includes(a))g=n.columns.flatMap((p)=>p.cards).find((p)=>String(p.description??"").includes(a))??g;let h=String(g?.description??""),b=f(h).trim();if(!g||this.readonly||b===h.trim()){if(c)this.#b("Image not added");return}g.description=b,g.expanded=!0,this.#o({type:"edit",card:g.id,field:"description"})}#b(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>_(f.id,e))),a=n.columns.find((u)=>_(u.id,t));if(!i||!a)return!1;let s=i.cards.findIndex((u)=>_(u.id,e)),[o]=i.cards.splice(s,1),l=a.cards.filter((u)=>u.starred).length,d=Math.max(0,Math.min(a.cards.length,r)),c=o.starred?Math.min(d,l):Math.max(d,l);if(a.cards.splice(c,0,o),i===a&&s===c)return!1;return n.announcement=`${o.title??""} moved to ${a.name??""}, position ${c+1} of ${a.cards.length}`,this.#o({type:"move",card:o.id,from:i.id,to:a.id,index:c}),this.#x(o.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>_(s.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),a=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(a,0,i),n===a)return!1;return r.announcement=`${i.name??""} moved to position ${a+1} of ${r.columns.length}`,this.#o({type:"reorder",column:i.id,index:a}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#g(e,t,r){let n=this.#e,i=S(e),a=i.findIndex((l)=>_(l.id,t));if(!n||this.readonly||a<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(a===s)return!1;let[o]=i.splice(a,1);return i.splice(s,0,o),n.announcement=`${o.title??""} moved to position ${s+1} of ${i.length}`,this.#o({type:"subtask",card:e.id,subtask:o.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(o.id))}"] .b3-board-title`)?.focus()),!0}#T(e){if(!e.isConnected)return;e.focus({preventScroll:!0}),e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView?.visualViewport;if(!n)return;let i=new AbortController;n.addEventListener("resize",()=>{if(i.abort(),this.ownerDocument.activeElement===e)r()},{signal:i.signal}),setTimeout(()=>i.abort(),1000)}#O(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#r?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#r?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#x(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#v(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#M(){this.#s?.abort(),this.#s=new AbortController;let e=this.#s.signal,t=this.ownerDocument.defaultView;this.addEventListener("pointerdown",(i)=>this.#L(i),{signal:e}),t.addEventListener("pointermove",(i)=>this.#D(i),{signal:e}),t.addEventListener("pointerup",(i)=>this.#N(i),{signal:e}),t.addEventListener("pointercancel",(i)=>{if(i.pointerId===this.#t?.pointerId)this.#n()},{signal:e}),t.addEventListener("keydown",(i)=>{if(i.key==="Escape"&&this.#t?.started)i.preventDefault(),this.#n()},{signal:e}),this.addEventListener("touchmove",(i)=>{if(this.#t?.started)i.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(i)=>{if(this.#t)i.preventDefault()},{signal:e}),this.addEventListener("click",(i)=>{if(!this.#u)return;this.#u=!1,i.preventDefault(),i.stopImmediatePropagation()},{signal:e,capture:!0});let r=(i)=>this.#I(i);this.addEventListener("click",r,{signal:e,capture:!0}),this.addEventListener("auxclick",(i)=>{if(i.button===1)r(i)},{signal:e,capture:!0});let n=()=>this.#y();this.addEventListener("compositionstart",()=>{this.#h=!0},{signal:e}),this.addEventListener("compositionend",n,{signal:e}),this.addEventListener("focusout",n,{signal:e})}#y(){this.#h=!1;for(let e of this.#m.splice(0))e()}#I(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(l)=>t.closest(l),n=this.#e?.columns.find((l)=>_(l.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((l)=>_(l.id,r("[data-card]")?.dataset.card)),a=i&&S(i).find((l)=>_(l.id,r("[data-subtask]")?.dataset.subtask)),s={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(a)s.subtask=a.id;if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#L(e){if(this.readonly||this.#t||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),a=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??a;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:a.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#t=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#t===n)this.#_(e.clientX,e.clientY)},Xo)}#_(e,t){let r=this.#t;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let s of[i,...i.querySelectorAll("[id]")])s.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#r.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let a=()=>{if(this.#t!==r)return;this.#R(r.px,r.py),this.#P(this.#w(r.px,r.py)),r.frame=requestAnimationFrame(a)};r.frame=requestAnimationFrame(a)}#D(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#n();return}if(r<5)return;this.#_(e.clientX,e.clientY)}e.preventDefault(),t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#N(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#n();let r=this.#w(e.clientX,e.clientY);if(this.#n(),this.#u=!0,setTimeout(()=>{this.#u=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>_(l.id,r.column)),a=n.columns.find((l)=>l.cards.some((d)=>_(d.id,t.id))),s=r.before?i.cards.findIndex((l)=>_(l.id,r.before)):i.cards.length,o=a.cards.findIndex((l)=>_(l.id,t.id));if(a===i&&o<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#i(t.card);if(!i)return;let a=S(i),s=r.before?a.findIndex((o)=>_(o.id,r.before)):a.length;if(a.findIndex((o)=>_(o.id,t.id))<s)s-=1;this.#g(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>_(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>_(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#w(e,t){let r=this.#t,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#E(e,n);if(!l)return null;let d=l.querySelector(".b3-board-cards"),c=[...d.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=c.find((m)=>{let g=m.getBoundingClientRect();return t<g.top+g.height/2}),f=(m)=>!!(m!=null&&this.#i(m)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=c.find((m)=>!f(m.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:d}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let f=u.getBoundingClientRect();return t<f.top+f.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),a=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:a.find((l)=>{let d=l.getBoundingClientRect();return s?e>d.left+d.width/2:e<d.left+d.width/2})?.dataset.column??null,list:i}}#P(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#t.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#E(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#R(e,t){let r=(s,o,l)=>s<o+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#t?.kind==="card"?this.#E(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let a=this.ownerDocument.defaultView;a.scrollBy(0,r(t,0,a.innerHeight))}#n(){let e=this.#t;if(!e)return;this.#t=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}ir("b3-board",ri);export{ri as B3Board};
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0-alpha.76",
2
+ "version": "0.1.0-alpha.78",
3
3
  "cssSha256": "b4ef2075f9d6f79f0acd5bb9a529670ef18c036bc9e9c9e901dc27a6a65e91c7",
4
4
  "classes": [
5
5
  "b3-accordion",
@@ -1,7 +1,7 @@
1
1
  # Board component
2
2
 
3
3
  `<b3-board>` is an opt-in component for a kanban-style board: columns of cards that the person can
4
- drag to reorder, edit inline, star to the top, filter by tag and open for details. It renders from data you give it
4
+ drag to reorder, edit inline, star to the top, filter by tag or search and open for details. It renders from data you give it
5
5
  and reports every change; the app owns loading and saving. It is not part of the core
6
6
  `components` bundle; import it only on pages that show a board.
7
7
 
@@ -38,7 +38,7 @@ their column (each group keeps its order), so `columns` always lists a column's
38
38
  they are shown. Everything else is kept exactly as given (a numeric id stays a number, a card without `subtasks`
39
39
  gets none), so `b3-change` echoes untouched cards unchanged and a card can carry your own data
40
40
  through edits. Reading `board.columns` returns a copy; assign a new array to change it. Setting it
41
- while the person edits a card that no longer exists closes that editor. `columns` and `filter` can
41
+ while the person edits a card that no longer exists closes that editor. `columns`, `filter` and `search` can
42
42
  be set before the element is connected or the module has loaded.
43
43
 
44
44
  `action.type` is `move`, `reorder` (a column), `add`, `remove`, `edit` (`field`: title,
@@ -74,6 +74,17 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
74
74
  a filter active moves past the next visible card; hidden cards keep their places (and a visible
75
75
  neighbour across the starred boundary stops the move). The card being
76
76
  edited stays shown, so Add card works with chips chosen.
77
+ - **Search**: `board.search` (or the `search` attribute) shows only cards whose title, description,
78
+ subtasks or tags hold every word of it — case-insensitive, any order (`#web` matches the tag). It
79
+ combines with the chosen labels, and counts show shown/total. The board has no search box: the host
80
+ puts one where it fits (e.g. a toolbar input setting `board.search` on `input`, cleared on Escape).
81
+ A card added while filtered or searched stays shown, even if it does not match, until the filter or
82
+ search changes — a new card never vanishes as it is committed.
83
+ - **Add to the default column**: `board.addCard(column?)` starts a new card at the end of `column` (an
84
+ id, or a name matched case-insensitively), its title editor focused and in view — as the column's +
85
+ does; it is reported once named. With no argument it uses `default-column` (`board.defaultColumn`, an
86
+ id or name), else the first column. Returns false when readonly or the column does not exist. Wire it
87
+ to the host's own shortcut, e.g. `default-column="TODO"` and N.
77
88
  - **Links**: `[text](target)` and bare `http(s)://` URLs in a title, description or subtask render as
78
89
  links, built as DOM nodes (never as HTML). Only http, https, mailto and paths link; any other
79
90
  scheme (`javascript:`, `data:`…), and any target with a control character, whitespace or a backslash,
@@ -84,6 +95,18 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
84
95
  for a Cmd/Ctrl/Shift or middle click). Not prevented, a URL opens as a normal link (a new tab for
85
96
  http/https) and a path does nothing: resolving and opening a file is the host's job. Editing the
86
97
  text shows its raw source.
98
+ - **Images**: `![alt](target)` renders the image (at most 10rem tall), with the same target rules as a
99
+ link (http/https or a path; a path resolves like any relative URL on the page, so a host can serve a
100
+ file's images beside it). An image is a link to itself: clicking it fires `b3-link` with its `href`.
101
+ A closed card whose description is only images previews as "Image".
102
+ - **Paste an image**: set `board.upload = async (file, { card, column }) => target` and an image pasted
103
+ into a card's description editor is stored by the host and written at the caret as `![](target)`, starting a new
104
+ line when the caret follows text (an "Uploading image…" placeholder holds the spot and the caret stays where the
105
+ user puts it; committed first, it is replaced in the saved description, even if `columns` was set meanwhile);
106
+ pasted into its title, it is appended to the description and the card opens. Whitespace and
107
+ parentheses in `target` are percent-encoded. Each lands as an `edit` of `description`. Returning
108
+ nothing (or throwing) drops the image and its placeholder, and the board announces "Image not added".
109
+ A clipboard that also holds text (a spreadsheet copy) pastes the text. Without `upload`, pasting is left to the browser.
87
110
  - **Details**: the chevron row under the title opens and closes a card's description and subtasks; it
88
111
  shows subtask progress and, closed, the description's first line (open with no subtasks, it reads
89
112
  "Hide details"). A card with neither gets an
@@ -93,6 +116,7 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
93
116
 
94
117
  ## Attributes and styling
95
118
 
119
+ - `search`, `default-column`: see Search and Add above.
96
120
  - `readonly`: no editing, adding, deleting, checking or dragging — enforced by the component, not
97
121
  only hidden; a starred card still shows its star. `compact`: hides card details and the chevron, narrows columns (two side by side on a phone) and shrinks card tools to the chip size; on touch it also hides the delete buttons and unstarred stars so column names and titles keep the width (they are back out of compact). `aria-label` names the board region.
98
122
  - **Height**: unbounded, the board grows with its cards. Give it a height (e.g. `flex: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/bare-v3",
3
- "version": "0.1.0-alpha.76",
3
+ "version": "0.1.0-alpha.78",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",