@livx.cc/bare-v3 0.1.0-alpha.77 → 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.
- package/dist/components/board.d.ts +17 -2
- package/dist/components/board.js +15 -14
- package/dist/manifest.json +1 -1
- package/dist/references/board.md +14 -2
- package/package.json +1 -1
|
@@ -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.
|
|
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. */
|
|
@@ -129,6 +130,20 @@ export declare class B3Board extends Base {
|
|
|
129
130
|
/** Active filter tokens (e.g. `#bug`, `@dana`); a card shows when it carries all of them. */
|
|
130
131
|
get filter(): string[];
|
|
131
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;
|
|
132
147
|
/** Pasting images into a card needs this hook: the host stores the file (see `BoardUpload`). */
|
|
133
148
|
get upload(): BoardUpload | null;
|
|
134
149
|
set upload(value: BoardUpload | null);
|
|
@@ -136,7 +151,7 @@ export declare class B3Board extends Base {
|
|
|
136
151
|
set readonly(value: boolean);
|
|
137
152
|
connectedCallback(): void;
|
|
138
153
|
disconnectedCallback(): void;
|
|
139
|
-
attributeChangedCallback():
|
|
154
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): undefined;
|
|
140
155
|
/**
|
|
141
156
|
* Move a card to `index` among ALL of a column's cards (filters do not shift positions). The
|
|
142
157
|
* index is kept within the card's group: a starred card stays among the starred ones at the top,
|
package/dist/components/board.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var{defineProperty:
|
|
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 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){$r=e}function qi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!V){ht(r,t,Y([n,...e]),i);return}let s=t.apply(Y([n,...e]),i);ht(r,s)}}function ht(e,t,r,n,i){if(V&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>ht(e,s,r,n)).catch((s)=>qe(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Fi(...e){return $r(...e)}function ce(e=""){return Rt+e}function Ki(e){Rt=e}function E(e,t){return $e[e]=t,{before(r){if(!$e[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($e).includes(e)}function Fe(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=Br(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(qr((o,s)=>n[o]=s)).filter(Kr).map(Yi(n,r)).sort(Gi).map((o)=>Ji(e,o))}function Br(e){return Array.from(e).map(qr()).filter((t)=>!Kr(t))}function Wi(e){bt=!0;let t=Symbol();Ur=t,he.set(t,[]);let r=()=>{while(he.get(t).length)he.get(t).shift()();he.delete(t)},n=()=>{bt=!1,r()};e(r),n()}function Hr(e){let t=[],r=(a)=>t.push(a),[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((a)=>a())]}function Ji(e,t){let r=()=>{},n=$e[t.type]||r,[i,o]=Hr(e);Tr(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),bt?he.get(Ur).push(n):n()};return s.runCleanups=o,s}function qr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Fr.reduce((o,s)=>s(o),{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()),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 Gi(e,t){let r=K.indexOf(e.type)===-1?mt:e.type,n=K.indexOf(t.type)===-1?mt: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,gt=!0,Jr(()=>{es(t)}),j=!1,gt=!1}function es(e){let t=!1;D(e,(n,i)=>{G(n,(o,s)=>{if(t&&os(o))return s();t=!0,i(o,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=C(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=C(r,(o)=>o._x_deferInit);if(n){Yr(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;Fe(r,i).forEach((o)=>o())})}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"),Dt(),Ci((t)=>D(t,G)),It((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 Bt.map((e)=>e())}function Zr(){return Bt.concat(Gr).map((e)=>e())}function Qr(e){Bt.push(e)}function en(e){Gr.push(e)}function Ve(e,t=!1){return C(e,(r)=>{if((t?Zr():Xr()).some((i)=>r.matches(i)))return!0})}function C(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return C(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return C(e.parentNode.host,t);if(!e.parentElement)return;return C(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(C(e,(n)=>n._x_ignore))return;Wi(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),tn.forEach((o)=>o(n,i)),Fe(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=ls++;n._x_ignore&&i()})})}function re(e,t=G){t(e,(r)=>{Oi(r),Cr(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 Ht(e=()=>{}){return queueMicrotask(()=>{Ut||setTimeout(()=>{vt()})}),new Promise((t)=>{xt.push(()=>{e(),t()})})}function vt(){Ut=!1;while(xt.length)xt.shift()()}function cs(){Ut=!0}function jt(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 jt(e,t());return cr(e,t)}function yt(e){return e.split(/\s/).filter(Boolean)}function cr(e,t){let r=(i)=>yt(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 us(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?yt(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?yt(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 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 _t(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,jt,""),{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),o=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((f,x)=>x<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((f,x)=>x>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?fe(t,"scale",95)/100:1,u=fe(t,"delay",0)/1000,p=fe(t,"origin","center"),g="opacity, transform",m=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:p,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${m}s`,transitionTimingFunction:b},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:p,transitionDelay:`${u}s`,transitionProperty:g,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=()=>{}){wt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){wt(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 wt(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;gs(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 gs(e,t){let r,n,i,o=_t(()=>{w(()=>{if(r=!0,!n)t.before();if(!i)t.end(),vt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:_t(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},w(()=>{t.start(),t.during()}),cs(),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;w(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;w(()=>{t.end()}),vt(),setTimeout(e._x_transitioning.finish,s+a),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:zt(e,t,r);break}}function xs(e,t){if(qt(e)){if(e.attributes.value===void 0)e.value=t}else if(Be(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")zt(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=jt(e,t)}function ys(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=We(e,t)}function _s(e,t,r){zt(e,t,r),Es(e,t,r)}function zt(e,t,r){if([null,void 0,!1].includes(r)&&Cs(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 Ts.has(e)}function Cs(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 Be(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function qt(e){return e.type==="radio"||e.localName==="ui-radio"}function ln(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 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,o,s,a=te(()=>{let l=e(),d=r();if(i)n(rt(l)),i=!1;else{let c=JSON.stringify(l),u=JSON.stringify(d);if(c!==o)n(rt(l));else if(c!==u)t(rt(d))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{Mt(a),de(a)}}function rt(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 Pt(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,a])=>({name:s,value:a})),o=Br(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}),Fe(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function $s(e,t){pn[e]=t}function Bs(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(),o=new qs;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 Fs(e,t,r={}){let n=mn(e),i=Y([r.scope??{},...n]),o=r.params??[],a=bn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&V)return a.apply(i,o);return a}function Ks(e,t){let r=mn(e);if(typeof t==="function")return qi(r,t);let n=Vs(e,t,r);return Bi.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:o=[]}={})=>{let s=Y([i,...r]),l=bn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(V&&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 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 Kt(){_n++}function Vt(){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;Wt(n),to(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function kt(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||!kt(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 Wt(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)Wt(o,!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 S(e,t,r){if(O&&v){let n=At.get(e);if(!n)At.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,o){let s=At.get(e);if(!s){Ue++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Kt(),t==="clear")s.forEach(a);else{let l=_e(e),d=l&&Ft(r);if(l&&r==="length"){let c=Number(n);s.forEach((u,p)=>{if(p==="length"||p===Ee||!Te(p)&&p>=c)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(d)a(s.get(Ee));switch(t){case"add":if(!l){if(a(s.get(J)),me(e))a(s.get(St))}else if(d)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(J)),me(e))a(s.get(St))}break;case"set":if(me(e))a(s.get(J));break}}}Vt()}function se(e){let t=y(e);if(t===e)return t;return S(t,"iterate",Ee),Q(e)?t:t.map(ee)}function Jt(e){return S(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 st(e,t,r){let n=Jt(e),i=n[t]();if(n!==e&&!Q(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function N(e,t,r,n,i,o){let s=Jt(e),a=s!==e&&!Q(e),l=s[t];if(l!==co[t]){let u=l.apply(e,o);return a?ee(u):u}let d=r;if(s!==e){if(a)d=function(u,p){return r.call(this,I(e,u),p,e)};else if(r.length>2)d=function(u,p){return r.call(this,u,p,e)}}let c=l.call(s,d,n);return a&&i?i(c):c}function br(e,t,r,n){let i=Jt(e),o=i!==e&&!Q(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 ot(e,t,r){let n=y(e);S(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(),Kt();let n=y(e)[t].apply(e,r);return Vt(),so(),n}function fo(e){if(!Te(e))e=String(e);let t=y(this);return S(t,"has",e),t.hasOwnProperty(e)}function go(e,t,r){return function(...n){let i=this.__v_raw,o=y(i),s=me(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,d=i[e](...n),c=r?Tt:t?ke:ee;return!t&&S(o,"iterate",l?St:J),ye(Object.create(d),{next(){let{value:u,done:p}=d.next();return p?{value:u,done:p}:{value:a?[c(u[0]),c(u[1])]:c(u),done:p}}})}}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 o=this.__v_raw,s=y(o),a=y(i);if(!e){if(F(i,a))S(s,"get",i);S(s,"get",a)}let{has:l}=Me(s),d=t?Tt:e?ke:ee;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(y(i),"iterate",J),i.size},has(i){let o=this.__v_raw,s=y(o),a=y(i);if(!e){if(F(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=y(a),d=t?Tt:e?ke:ee;return!e&&S(l,"iterate",J),a.forEach((c,u)=>i.call(o,d(c),d(u),s))}};return ye(r,e?{add:Ie("add"),set:Ie("set"),delete:Ie("delete"),clear:Ie("clear")}:{add(i){let o=y(this),s=Me(o),a=y(i),l=!t&&!Q(i)&&!Z(i)?a:i;if(!(s.has.call(o,l)||F(i,l)&&s.has.call(o,i)||F(a,l)&&s.has.call(o,a)))o.add(l),H(o,"add",l,l);return this},set(i,o){if(!t&&!Q(o)&&!Z(o))o=y(o);let s=y(this),{has:a,get:l}=Me(s),d=a.call(s,i);if(!d)i=y(i),d=a.call(s,i);else mr(s,a,i);let c=l.call(s,i);if(s.set(i,o),!d)H(s,"add",i,o);else if(F(o,c))H(s,"set",i,o,c);return this},delete(i){let o=y(this),{has:s,get:a}=Me(o),l=s.call(o,i);if(!l)i=y(i),l=s.call(o,i);else mr(o,s,i);let d=a?a.call(o,i):void 0,c=o.delete(i);if(l)H(o,"delete",i,void 0,d);return c},clear(){let i=y(this),o=i.size!==0,s=me(i)?new Map(i):new Set(i),a=i.clear();if(o)H(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=go(i,e,t)}),r}function Cn(e,t){let r=xo(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(Et(r,i)&&i in n?r:n,i,o)}}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 Yt(e){if(Z(e))return e;return In(e,!1,bo,vo,On)}function Ct(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 o=i.get(e);if(o)return o;let s=Eo(vn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}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 C(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Dn(e){if(!at[e])at[e]=0;return++at[e]}function So(e,t){return C(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function To(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Dn(t)}function Co(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,o=(l)=>n(l),s={},a=(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(o=Rn(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(Do(t)||$n(t))o=a(o,(l,d)=>{if(Po(d,r))return;l(d)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,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 $n(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Po(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!No.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,He((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,He((r[o+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((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($n(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(Be(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=lt(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((o)=>!Ro(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 lt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return De(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(qt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return lt(i);else if(t.includes("boolean"))return De(i);else if(t.includes("trim"))return i.trim();else return i}})}function lt(e){let t=e?parseFloat(e):null;return $o(t)?t:e}function Ro(e,t){return e==t}function $o(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 Bo(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(gt)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 o=e._x_lookup,s=new Map;e._x_lookup=s;let a=Vo(i),l=Object.entries(i).map(([d,c])=>{if(!a)d=parseInt(d);let u=Fo(t,c,d,i),p;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);p=g},{scope:{index:d,...u}}),[p,u]});w(()=>{o.forEach((u)=>{re(u),u.remove()});let d=new Set,c=e;if(l.forEach(([u,p])=>{if(s.has(u)){let h=s.get(u);if(h._x_refreshXForScope(p),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 g=document.importNode(e.content,!0).firstElementChild,m=le(p);Ae(g,m,e),g._x_refreshXForScope=jo(m),s.set(u,g),d.add(g),c.after(g),c=g}),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 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 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,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 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 dt=!1,ct=!1,R,ut=-1,Ne=!1,Ot=!1,le,te,de,_r,Ei=0,ft=!0,Er,kr,Ar,je,Lt=!1,q,Nt=!1,Pe,Ni,Dr,Nr,V=!0,Rr=()=>{},$r,Rt="x-",$e,bt=!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(`^${Rt}([^:^.]+)\\b`),mt="DEFAULT",K,j=!1,Wr,gt=!1,Ke=0,dr=!1,Bt,Gr,tn,ls=1,xt,Ut=!1,Ts,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]!==`
|
|
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
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 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 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 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((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}),f;if(e.callee.computed)f=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else f=e.callee.property.name;this.checkForDangerousKeywords(f);let x=b[f];if(typeof x!=="function")throw Error("Value is not a function");l=x.apply(b,a)}else if(e.callee.type==="Identifier"){let b=e.callee.name,f;if(b in t)f=t[b];else throw Error(`Undefined variable: ${b}`);if(typeof f!=="function")throw Error("Value is not a function");let x=r!==null?r:t;l=f.apply(x,a)}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,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 b=e.argument.name;if(!(b in t))throw Error(`Undefined variable: ${b}`);let f=t[b];if(e.operator==="++")t[b]=f+1;else if(e.operator==="--")t[b]=f-1;return e.prefix?t[b]:f}else if(e.argument.type==="MemberExpression"){let b=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=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(f);let x=b[f];if(e.operator==="++")b[f]=x+1;else if(e.operator==="--")b[f]=x-1;return e.prefix?b[f]: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 p=u();switch(e.operator){case"+":return c+p;case"-":return c-p;case"*":return c*p;case"/":return c/p;case"%":return c%p;case"==":return c==p;case"!=":return c!=p;case"===":return c===p;case"!==":return c!==p;case"<":return c<p;case">":return c>p;case"<=":return c<=p;case">=":return c>=p;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 b=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=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(f),b[f]=m,m}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 f=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[f]=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}},ua,fa,ye,Ws,Et=(e,t)=>Ws.call(e,t),_e,me=(e)=>xn(e)==="[object Map]",Js=(e)=>typeof e==="string",Te=(e)=>typeof e==="symbol",we=(e)=>e!==null&&typeof e==="object",Ys,xn=(e)=>Ys.call(e),vn=(e)=>xn(e).slice(8,-1),Ft=(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,pa,Xs,ha,yn,ba,F=(e,t)=>!Object.is(e,t),Zs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ma,nt,v,it,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,nt)if(nt.active)nt.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,it.has(this))it.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)Wt(e);this.deps=this.depsTail=void 0,hr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)it.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(kt(this))this.run()}get dirty(){return kt(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){Kt();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{Vt()}}},At,J,St,Ee,lo,co,uo,Sn,Tn=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 o=_e(e);if(!n){let a;if(o&&(a=lo[t]))return a;if(t==="hasOwnProperty")return fo}let s=Reflect.get(e,t,ve(e)?e:r);if(Te(t)?Sn.has(t):uo(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ve(s)){let a=o&&Ft(t)?s:s.value;return n&&we(a)?Ct(a):a}if(we(s))return n?Ct(s):Yt(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)?Yt(e):e,ke=(e)=>we(e)?Ct(e):e,at,Oo,Pn=()=>{},No,Bn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Rs(l),A(e,n)((c)=>{fn(e,c,i)},{scope:l});return}if(t==="key")return Bo(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="";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 o=Object.getOwnPropertyDescriptor(i,t);if(o?.set&&o?.get)return o.set.call(n,r)||!0;return Reflect.set(i,t,r)}};Dr={};Nr=Hi;$e={};he=new Map,Ur=Symbol();Fr=[];K=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",mt,"teleport"];Wr=[];Se((e,t)=>{if(Ke===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(C(e,(r)=>r._x_deferInit))t._x_ignore=!0});Bt=[],Gr=[];tn=[];xt=[];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,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=nn(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})})})};Ts=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 Ti},version:"3.17.4",flushAndStopDeferringMutations:Di,dontAutoEvaluateFunctions:Pr,disableEffectScheduling:ki,startObservingMutations:Dt,stopObservingMutations:Or,setReactivityEngine:Ai,onAttributeRemoved:Tr,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:Pt,injectMagics:Re,setEvaluator:ji,setRawEvaluator:zi,mergeProxies:Y,extractProp:Is,findClosest:C,onElRemoved:It,closestRoot:Ve,destroyTree:re,interceptor:Lr,transition:wt,setStyles:We,mutateDom:w,deferInit:ts,directive:E,entangle:cn,throttle:dn,debounce:ln,evaluate:W,evaluateRaw:Fi,initTree:D,nextTick:Ht,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:$s,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"];ua=Object.freeze({}),fa=Object.freeze([]),ye=Object.assign,Ws=Object.prototype.hasOwnProperty,_e=Array.isArray,Ys=Object.prototype.toString,Gs=/-\w/g,pa=Je((e)=>e.replace(Gs,(t)=>t.slice(1).toUpperCase())),Xs=/\B([A-Z])/g,ha=Je((e)=>e.replace(Xs,"-$1").toLowerCase()),yn=Je((e)=>e.charAt(0).toUpperCase()+e.slice(1)),ba=Je((e)=>e?`on${yn(e)}`:""),ma=gn(Zs+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");it=new WeakSet;kn=[];At=new WeakMap,J=Symbol("Object iterate"),St=Symbol("Map keys iterate"),Ee=Symbol("Array iterate");lo={__proto__:null,[Symbol.iterator](){return st(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>_e(t)?se(t):t))},entries(){return st(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 ot(this,"includes",e)},indexOf(...e){return ot(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return ot(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 st(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(Te));po=class extends Tn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=_e(e)&&Ft(t);if(!this._isShallow){let l=Z(i);if(!Q(r)&&!Z(r))i=y(i),r=y(r);if(!o&&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=o?Number(t)<e.length:Et(e,t),a=Reflect.set(e,t,r,ve(e)?e:n);if(e===y(n)&&a){if(!s)H(e,"add",t,r);else if(F(r,i))H(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=Et(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(!Te(t)||!Sn.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",_e(e)?"length":J),Reflect.ownKeys(e)}},ho=class extends Tn{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:Cn(!1,!1)},yo={get:Cn(!0,!1)};On=new WeakMap,_o=new WeakMap,Mn=new WeakMap,wo=new WeakMap;M("nextTick",()=>Ht);M("dispatch",(e)=>be.bind(be,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=wr(()=>{let l;return o((d)=>l=d),l},i);r(a)});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});at={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return Co(e,i,t,()=>{let o=So(e,r),s=o?o._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 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,p=cn({get(){return c()},set(g){u(g)}},{get(){return s()},set(g){l(g)}});i(p)})});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),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))})});Ae(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)};w(()=>{B(()=>{s(o,i,t),D(o)})()}),e._x_teleportPutBack=()=>{let a=gr(r);w(()=>{s(e._x_teleport,a,t)})},n(()=>w(()=>{o.remove(),re(o)}))});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 o=e;if(t.includes("parent"))o=C(e,(h)=>h!==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 h;return s((b)=>h=b),vr(h)?h.get():h},d=(h)=>{let b;if(s((f)=>b=f),vr(b))b.set(h);else a(()=>{},{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"),p=t.includes("enter"),g=c||u||p,m;if(j)m=()=>{};else if(g){let h=[],b=(f)=>d(Le(e,t,f,l()));if(c)h.push(oe(e,"change",t,b));if(u){if(h.push(oe(e,"blur",t,b)),e.form){let f=e.form,x=()=>b({target:e});if(!f._x_pendingModelUpdates)f._x_pendingModelUpdates=[];f._x_pendingModelUpdates.push(x),i(()=>{if(f._x_pendingModelUpdates)f._x_pendingModelUpdates.splice(f._x_pendingModelUpdates.indexOf(x),1)})}}if(p)h.push(oe(e,"keydown",t,(f)=>{if(f.key==="Enter")b(f)}));m=()=>h.forEach((f)=>f())}else{let h=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=oe(e,h,t,(b)=>{d(Le(e,t,b,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Be(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=m,i(()=>e._x_removeModelListeners.default()),e.form){let h=oe(e.form,"reset",[],(b)=>{Ht(()=>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(Be(e))if(Array.isArray(h))e.checked=h.some((b)=>b==e.value);else e.checked=!!h;else if(qt(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((o)=>{w(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{w(()=>{Array.from(e.children).forEach((s)=>re(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});$t(jr(":",zr(ce("bind:"))));Bn.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",Bn);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 o={};Bs(o,i);let s=W(e,t,{scope:o});if(s===void 0||s===!0)s={};Re(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Uo(a,s);let d={expression:t};e[z]=d,queueMicrotask(()=>{if(e[z]===d)delete e[z]})}else a=le(s);Pt(a,r);let l=Ae(e,a);B(()=>{a.init&&W(e,a.init)})(),r(()=>{a.destroy&&W(e,a.destroy),l();let d={reactiveData:a};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 o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=_t((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}))});E("for",B((e,{expression:t},{effect:r,cleanup:n})=>{let i=qo(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>zo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>w(()=>{re(a),a.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),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Ae(a,{},e),w(()=>{e.after(a),D(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{w(()=>{re(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())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>To(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 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=oe(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});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:Yt,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:
|
|
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 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,
|
|
23
|
-
`)
|
|
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));}
|
|
@@ -155,9 +156,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
155
156
|
:is(.b3-board-cards,.b3-board-subtasks)[data-b3-drop="end"]{box-shadow:inset 0 -3px 0 -1px var(--b3-color-accent);}
|
|
156
157
|
.b3-board-columns[data-b3-drop="end"]{box-shadow:inset -3px 0 0 -1px var(--b3-color-accent);}
|
|
157
158
|
@media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-ghost{rotate:none;}}
|
|
158
|
-
`,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"/>'),
|
|
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})">
|
|
159
160
|
<textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
|
|
160
|
-
b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,
|
|
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=`
|
|
161
162
|
<div class="b3-board-filters" b3x-bind:hidden="!tokens().length" role="group" aria-label="Filter">
|
|
162
163
|
<span class="b3-board-caption" aria-hidden="true">Filter</span>
|
|
163
164
|
<template b3x-for="token in tokens()" b3x-bind:key="token">
|
|
@@ -188,11 +189,11 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
188
189
|
b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
|
|
189
190
|
<span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
|
|
190
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)"
|
|
191
|
-
b3x-on:click="addDetails(card)">${
|
|
192
|
+
b3x-on:click="addDetails(card)">${aa}</button>
|
|
192
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)"
|
|
193
194
|
b3x-on:click="removeCard(column, card)">${Qt}</button>
|
|
194
195
|
<button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
|
|
195
|
-
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${
|
|
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>
|
|
196
197
|
</span>
|
|
197
198
|
</div>
|
|
198
199
|
<div class="b3-board-tags" b3x-show="tokensOf(card).length">
|
|
@@ -202,7 +203,7 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
202
203
|
</div>
|
|
203
204
|
<button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
|
|
204
205
|
b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
|
|
205
|
-
${
|
|
206
|
+
${sa}
|
|
206
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>
|
|
207
208
|
<span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
|
|
208
209
|
<span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length">Hide details</span>
|
|
@@ -238,8 +239,8 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
238
239
|
</template>
|
|
239
240
|
<button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${Ge}<span>Add column</span></button>
|
|
240
241
|
</div>
|
|
241
|
-
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class ri extends nr{static observedAttributes=["readonly"];#r=null;#e=null;#a=null;#l=null;#
|
|
242
|
-
`).map(Qn).find((
|
|
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]!==`
|
|
243
244
|
`?`
|
|
244
|
-
${
|
|
245
|
-
${c}`:c:f;let x=u(f);return x?f.slice(0,x[0])+x[2]+f.slice(x[1]):f},g=i();if(g){let f=this.querySelector("textarea.b3-board-editor"),x=f?.value===g.draft&&u(f.value);if(f&&x){let[U,ie,Qe]=x,{selectionStart:ni,selectionEnd:ii,selectionDirection:si}=f,tr=(Oe)=>Oe>=ie?Oe+Qe.length-(ie-U):Oe>U?U+Qe.length:Oe;f.setRangeText(Qe,U,ie),f.setSelectionRange(tr(ni),tr(ii),si??void 0),g.draft=f.value}else if(p(g.draft)!==g.draft)g.draft=p(g.draft);else if(c)this.#h("Image not added");return}let m=this.#i(e);if(s&&!String(m?.description??"").includes(o))m=n.columns.flatMap((f)=>f.cards).find((f)=>String(f.description??"").includes(o))??m;let h=String(m?.description??""),b=p(h).trim();if(!m||this.readonly||b===h.trim()){if(c)this.#h("Image not added");return}m.description=b,m.expanded=!0,this.#o({type:"edit",card:m.id,field:"description"})}#h(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((p)=>_(p.id,e))),o=n.columns.find((u)=>_(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>_(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.#o({type:"move",card:a.id,from:i.id,to:o.id,index:c}),this.#g(a.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),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.#o({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#m(e,t,r){let n=this.#e,i=T(e),o=i.findIndex((l)=>_(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.#o({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}#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)}#C(){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()}))}#g(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#x(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})})}#O(){this.#s?.abort(),this.#s=new AbortController;let e=this.#s.signal,t=this.ownerDocument.defaultView;this.addEventListener("pointerdown",(i)=>this.#I(i),{signal:e}),t.addEventListener("pointermove",(i)=>this.#L(i),{signal:e}),t.addEventListener("pointerup",(i)=>this.#D(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.#c)return;this.#c=!1,i.preventDefault(),i.stopImmediatePropagation()},{signal:e,capture:!0});let r=(i)=>this.#M(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.#v();this.addEventListener("compositionstart",()=>{this.#p=!0},{signal:e}),this.addEventListener("compositionend",n,{signal:e}),this.addEventListener("focusout",n,{signal:e})}#v(){this.#p=!1;for(let e of this.#b.splice(0))e()}#M(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)),o=i&&T(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(o)s.subtask=o.id;if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#I(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.#y(e.clientX,e.clientY)},Xo)}#y(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.#P(r.px,r.py),this.#N(this.#_(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#L(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.#y(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}#D(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#n();let r=this.#_(e.clientX,e.clientY);if(this.#n(),this.#c=!0,setTimeout(()=>{this.#c=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>_(l.id,r.column)),o=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,a=o.cards.findIndex((l)=>_(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.#i(t.card);if(!i)return;let o=T(i),s=r.before?o.findIndex((a)=>_(a.id,r.before)):o.length;if(o.findIndex((a)=>_(a.id,t.id))<s)s-=1;this.#m(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)}}#_(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.#w(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}),p=(g)=>!!(g!=null&&this.#i(g)?.starred);if(p(u?.dataset.card)!==p(r.id)&&(u||p(r.id)))u=c.find((g)=>!p(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 p=u.getBoundingClientRect();return t<p.top+p.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}}#N(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")}#w(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})}#P(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.#w(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")}}ir("b3-board",ri);export{ri as B3Board};
|
|
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?`.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};
|
package/dist/manifest.json
CHANGED
package/dist/references/board.md
CHANGED
|
@@ -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 `
|
|
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,
|
|
@@ -105,6 +116,7 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
105
116
|
|
|
106
117
|
## Attributes and styling
|
|
107
118
|
|
|
119
|
+
- `search`, `default-column`: see Search and Add above.
|
|
108
120
|
- `readonly`: no editing, adding, deleting, checking or dragging — enforced by the component, not
|
|
109
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.
|
|
110
122
|
- **Height**: unbounded, the board grows with its cards. Give it a height (e.g. `flex: 1;
|