@pie-players/pie-section-player 1.0.0-beta.0 → 1.0.0-beta.2
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/README.md +16 -3
- package/dist/browser/assets/{evaluation-worker-0xRDVTJx.js → evaluation-worker-B336Lsun.js} +48398 -46681
- package/dist/browser/chunks/calculator-element-271c142f.js +4 -4
- package/dist/browser/chunks/dist-41b39e7f.js +1 -1
- package/dist/browser/chunks/dist-ca9b9622.js +1 -1
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
- package/dist/browser/chunks/mathjax-BKrHE4xs-3ca05bf6.js +1 -1
- package/dist/browser/chunks/{runtime-YFqnU6ic-d5c0cb49.js → runtime-BCz9m_IT-7b48a036.js} +305 -292
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +5 -5
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +5 -5
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +5 -5
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +3 -3
- package/dist/browser/chunks/tool-graph-cb0338e8.js +4 -4
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +3 -3
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +4 -4
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +3 -3
- package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +6 -6
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +4 -4
- package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -1
- package/dist/browser/pie-section-player.js +57 -44
- package/dist/components/shared/card-title.d.ts +18 -0
- package/dist/contracts/card-title-formatters.d.ts +8 -1
- package/dist/pie-section-player.js +10123 -9887
- package/package.json +10 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{t as K}from"./defineProperty-a20a667d.js";import{i as M,n as x,r as W,t as a}from"./classPrivateFieldGet2-338e0179.js";import{t as Ii}from"./classPrivateMethodInitSpec-563cd0a5.js";import{t as cl}from"./attribute-coercion-b93b482c.js";import{r as ul,t as fl}from"./logger-8b07fb72.js";import{i as hl,n as dl,r as pl}from"./tool-host-contract-fae1c415.js";import{i as vl}from"./provider-4c704118.js";import{o as gl}from"./toolbar-registration-helpers-a7ab1ad4.js";import{i as _i,o as ml,r as bl,t as wl}from"./catalog-context-46d3e50e.js";var ki,xi,Kn,yt,pn,vn,on,vt,it,Lt,Ae,kr,_t,Be,Qe,Dn,ln,V,Cr,we,Vn,Ee,qt,le,ye,ae,_e,Xe,gt,ot,sn,Un,Jn,tt,xr,U,Ie,Ge,ge,Wt,Pn,jn,$r,nt,Te;typeof window<"u"&&((ki=(xi=window).__svelte??(xi.__svelte={})).v??(ki.v=new Set)).add("5");var Bt={},G=Symbol("uninitialized"),yl="http://www.w3.org/1999/xhtml",qi=Array.isArray,_l=Array.prototype.indexOf,Rr=Array.prototype.includes,ar=Array.from,Xn=Object.keys,wn=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,Hi=Object.getOwnPropertyDescriptors,kl=Object.prototype,xl=Array.prototype,Ur=Object.getPrototypeOf,$i=Object.isExtensible,$l=()=>{};function Sl(e){for(var t=0;t<e.length;t++)e[t]()}function Bi(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var xe=1024,Re=2048,Mt=4096,Jr=8192,Ml=16384,Ki=32768,Si=1<<25,Gr=65536,Jt=1<<19,Tl=1<<20,gn=1<<25,Mi=1<<21,Al=1<<22,Zn=1<<23,xt=Symbol("$state"),Vi=Symbol("component"),Ui=Symbol("legacy props"),El=Symbol(""),zr=Symbol("attributes"),Lr=Symbol("class"),Dr=Symbol("style"),Gn=Symbol("text"),xn=new class extends Error{constructor(...e){super(...e),K(this,"name","StaleReactionError"),K(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ol=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Nl(){console.warn("https://svelte.dev/e/derived_inert")}function cr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Wl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var z=!1;function Oe(e){z=e}var P;function ce(e){if(e===null)throw cr(),Bt;return P=e}function ur(){return ce(Ue(P))}function Dt(e){if(z){if(Ue(P)!==null)throw cr(),Bt;P=e}}function Cl(e=1){if(z){for(var t=e,n=P;t--;)n=Ue(n);P=n}}function er(e=!0){for(var t=0,n=P;;){if(n.nodeType===8){var r=n.data;if(r==="]"){if(t===0)return n;--t}else(r==="["||r==="[!"||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Ue(n);e&&n.remove(),n=i}}function Ji(e){if(!e||e.nodeType!==8)throw cr(),Bt;return e.data}function Gi(e){return e===this.v}function Yi(e,t){return e==e?e!==t||typeof e=="object"&&!!e||typeof e=="function":t==t}function Qi(e){return!Yi(e,this.v)}function Rl(){throw Error("https://svelte.dev/e/async_derived_orphan")}function zl(e,t,n){throw Error("https://svelte.dev/e/each_key_duplicate")}function Ll(e){throw Error("https://svelte.dev/e/effect_in_teardown")}function Dl(){throw Error("https://svelte.dev/e/effect_in_unowned_derived")}function Pl(e){throw Error("https://svelte.dev/e/effect_orphan")}function jl(){throw Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Fl(){throw Error("https://svelte.dev/e/hydration_failed")}function Il(e){throw Error("https://svelte.dev/e/props_invalid_value")}function ql(){throw Error("https://svelte.dev/e/state_descriptors_fixed")}function Hl(){throw Error("https://svelte.dev/e/state_prototype_fixed")}function Bl(){throw Error("https://svelte.dev/e/state_unsafe_mutation")}function Kl(){throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var re=null;function Kt(e){re=e}function Xi(e,t=!1,n){re={p:re,i:!1,c:null,e:null,s:e,x:null,r:A,l:null}}function Zi(e){var t=re,n=t.e;if(n!==null){t.e=null;for(var r of n)wo(r)}return e!==void 0&&(t.x=e),t.i=!0,re=t.p,Yr(e)}function Yr(e={}){return wn(e,Vi,{value:!0}),e}function $n(){return!0}var bt=[];function eo(){var e=bt;bt=[],Sl(e)}function lt(e){if(bt.length===0&&!mn){var t=bt;queueMicrotask(()=>{t===bt&&eo()})}bt.push(e)}function Vl(){for(;bt.length>0;)eo()}var Ul=~(Re|Mt|xe);function J(e,t){e.f=e.f&Ul|t}function Qr(e){e.f&512||e.deps===null?J(e,xe):J(e,Mt)}function to(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),J(e,xe)}function fr(e){var t=C,n=A;ue(null),Se(null);try{return e()}finally{ue(t),Se(n)}}function Jl(e,t,n,r){let i=$n()?yn:Xr;var o=e.filter(g=>!g.settled),s=t.map(i);if(n.length===0&&o.length===0){r(s);return}var c=A,f=Gl(),h=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(g=>g.promise)):null;function p(g){if(!(c.f&16384)){f();try{r([...s,...g])}catch(k){Ve(k,c)}tr()}}var v=no();if(n.length===0){h.then(()=>p([])).finally(v);return}function m(){Promise.all(n.map(g=>Yl(g))).then(p).catch(g=>Ve(g,c)).finally(v)}h?h.then(()=>{f(),m(),tr()}):m()}function Gl(){var e=A,t=C,n=re,r=T;return function(i=!0){Se(e),ue(t),Kt(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function tr(e=!0){Se(null),ue(null),Kt(null),e&&T?.deactivate()}function no(){var e=A,t=e.b,n=T,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function yn(e){var t=2|Re;return A!==null&&(A.f|=Jt),{ctx:re,deps:null,effects:null,equals:Gi,f:t,fn:e,reactions:null,rv:0,v:G,wv:0,parent:A,ac:null}}var fn=Symbol("obsolete");function Yl(e,t,n){let r=A;r===null&&Rl();var i=void 0,o=St(G),s=!C,c=new Set;return hs(()=>{var f=A,h=Bi();i=h.promise;try{Promise.resolve(e()).then(h.resolve,g=>{g!==xn&&h.reject(g)}).finally(tr)}catch(g){h.reject(g),tr()}var p=T;if(s){if(f.f&32768)var v=no();if(r.b?.is_rendered())p.async_deriveds.get(f)?.reject(fn);else for(let g of c.values())g.reject(fn);c.add(h),p.async_deriveds.set(f,h)}let m=(g,k=void 0)=>{v?.(),c.delete(h),k!==fn&&(p.activate(),k?(o.f|=Zn,Vt(o,k)):(o.f&8388608&&(o.f^=Zn),Vt(o,g)),p.deactivate())};h.promise.then(m,g=>m(null,g||"unknown"))}),cs(()=>{for(let f of c)f.reject(fn)}),new Promise(f=>{function h(p){function v(){p===i?f(o):h(i)}p.then(v,v)}h(i)})}function ne(e){let t=yn(e);return $o(t),t}function Xr(e){let t=yn(e);return t.equals=Qi,t}function Ql(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ie(t[n])}}function Zr(e){var t,n=A,r=e.parent;if(!Ze&&r!==null&&e.v!==G&&r.f&24576)return Nl(),e.v;Se(r);try{Ql(e),t=Ao(e)}finally{Se(n)}return t}function ro(e){var t=Zr(e);if(!e.equals(t)&&(e.wv=Mo(),(!T?.is_fork||e.deps===null)&&(T===null?e.v=t:(T.capture(e,t,!0),Pr?.capture(e,t,!0)),e.deps===null))){J(e,xe);return}Ze||(Ne===null?Qr(e):(ni()||T?.is_fork)&&Ne.set(e,t))}function Xl(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&fr(()=>{t.ac.abort(xn),t.ac=null}),t.fn!==null&&(t.teardown=$l),kn(t,0),oi(t))}function io(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Ut(t)}var Pt=null,T=null,Pr=null,Ne=null,jr=null,mn=!1,Sr=!1,_n=null,nr=null,oo=0,Zl=1,Gt=(Kn=new WeakMap,yt=new WeakMap,pn=new WeakMap,vn=new WeakMap,on=new WeakMap,vt=new WeakMap,it=new WeakMap,Lt=new WeakMap,Ae=new WeakMap,kr=new WeakMap,_t=new WeakMap,Be=new WeakMap,Qe=new WeakMap,Dn=new WeakMap,ln=new WeakMap,V=new WeakSet,Cr=class lo{constructor(){Ii(this,V),K(this,"id",Zl++),M(this,Kn,!1),K(this,"linked",!0),M(this,yt,null),M(this,pn,null),K(this,"async_deriveds",new Map),K(this,"current",new Map),K(this,"previous",new Map),M(this,vn,new Set),M(this,on,new Set),M(this,vt,0),M(this,it,new Map),M(this,Lt,null),M(this,Ae,[]),M(this,kr,[]),M(this,_t,new Set),M(this,Be,new Set),M(this,Qe,new Map),M(this,Dn,new Set),K(this,"is_fork",!1),M(this,ln,!1),Pt===null?Pt=this:(x(pn,Pt,this),x(yt,this,Pt)),Pt=this}skip_effect(t){a(Qe,this).has(t)||a(Qe,this).set(t,{d:[],m:[]}),a(Dn,this).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=a(Qe,this).get(t);if(r){a(Qe,this).delete(t);for(var i of r.d)J(i,Re),n(i);for(i of r.m)J(i,Mt),n(i)}a(Dn,this).add(t)}capture(t,n,r=!1){t.v!==G&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&8388608||(this.current.set(t,[n,r]),Ne?.set(t,n)),this.is_fork||(t.v=n)}activate(){T=this}deactivate(){T=null,Ne=null}flush(){try{Sr=!0,T=this,W(V,this,rr).call(this)}finally{oo=0,jr=null,_n=null,nr=null,Sr=!1,T=null,Ne=null,Ke.clear()}}discard(){for(let t of a(on,this))t(this);a(on,this).clear();for(let t of this.async_deriveds.values())t.reject(fn);W(V,this,ir).call(this),a(Lt,this)?.resolve()}register_created_effect(t){a(kr,this).push(t)}increment(t,n){if(x(vt,this,a(vt,this)+1),t){let r=a(it,this).get(n)??0;a(it,this).set(n,r+1)}}decrement(t,n){var r;if(x(vt,this,(r=a(vt,this),--r)),t){let i=a(it,this).get(n)??0;i===1?a(it,this).delete(n):a(it,this).set(n,i-1)}a(ln,this)||(x(ln,this,!0),lt(()=>{x(ln,this,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(let r of t)a(_t,this).add(r);for(let r of n)a(Be,this).add(r);t.clear(),n.clear()}oncommit(t){a(vn,this).add(t)}ondiscard(t){a(on,this).add(t)}settled(){return(a(Lt,this)??x(Lt,this,Bi())).promise}static ensure(){if(T===null){let t=T=new lo;!Sr&&!mn&<(()=>{a(Kn,t)||t.flush()})}return T}apply(){Ne=null}schedule(t){if(jr=t,t.b?.is_pending&&t.f&16777228&&!(t.f&32768)){t.b.defer_effect(t);return}a(Ae,this).push(t)}},Cr);function Ti(){if(this.is_fork)return!0;for(let n of a(it,this).keys()){for(var e=n,t=!1;e.parent!==null;){if(a(Qe,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function es(){var e=[];for(let i of a(Ae,this))if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=xe}}n||e.push(t)}return x(Ae,this,[]),e}function rr(){x(Kn,this,!0);for(let s of a(_t,this))a(Be,this).delete(s),J(s,Re),this.schedule(s);for(let s of a(Be,this))J(s,Mt),this.schedule(s);this.apply();for(var e=_n=[],t=[],n=nr=[];a(Ae,this).length>0;){oo++>1e3&&(W(V,this,ir).call(this),is());for(let s of W(V,this,es).call(this))try{W(V,this,ts).call(this,s,e,t)}catch(c){throw co(s),W(V,this,Ti).call(this)||this.discard(),c}}if(T=null,n.length>0){var r=Cr.ensure();for(let s of n)r.schedule(s)}if(_n=null,nr=null,W(V,this,Ti).call(this)){W(V,this,Fn).call(this,t),W(V,this,Fn).call(this,e);for(let[s,c]of a(Qe,this))ao(s,c);n.length>0&&W(V,T,rr).call(T);return}let i=W(V,this,ns).call(this);if(i){W(V,this,Fn).call(this,t),W(V,this,Fn).call(this,e),W(V,i,rs).call(i,this);return}a(_t,this).clear(),a(Be,this).clear();for(let s of a(vn,this))s(this);a(vn,this).clear(),Pr=this,Ai(t),Ai(e),Pr=null,a(Lt,this)?.resolve();var o=T;if(a(vt,this)===0&&(a(Ae,this).length===0||o!==null)&&W(V,this,ir).call(this),a(Ae,this).length>0)if(o!==null){for(let s of a(Ae,this))a(Ae,o).push(s);x(Ae,this,[])}else o=this;o!==null&&(Ke.clear(),W(V,o,rr).call(o))}function ts(e,t,n){e.f^=xe;for(var r=e.first;r!==null;){var i=r.f,o=!!(i&96);if(!(o&&i&1024||i&8192||a(Qe,this).has(r))&&r.fn!==null){o?r.f^=xe:i&4?t.push(r):Sn(r)&&(i&16&&a(Be,this).add(r),Ut(r));var s=r.first;if(s!==null){r=s;continue}}for(;r!==null;){var c=r.next;if(c!==null){r=c;break}r=r.parent}}}function ns(){for(var e=a(yt,this);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=a(yt,e)}return null}function rs(e){for(let[n,r]of e.current)!this.previous.has(n)&&e.previous.has(n)&&this.previous.set(n,e.previous.get(n)),this.current.set(n,r);for(let[n,r]of e.async_deriveds){let i=this.async_deriveds.get(n);i&&r.promise.then(i.resolve).catch(i.reject)}e.async_deriveds.clear(),this.transfer_effects(a(_t,e),a(Be,e));let t=n=>{var r=n.reactions;if(r!==null&&!(n.f&2&&!(n.f&6144)))for(let s of r){var i=s.f;if(i&2)t(s);else{var o=s;i&4194320&&!this.async_deriveds.has(o)&&(a(Be,this).delete(o),J(o,Re),this.schedule(o))}}};for(let n of this.current.keys())t(n);this.oncommit(()=>e.discard()),W(V,e,ir).call(e),T=this,W(V,this,rr).call(this)}function Fn(e){for(var t=0;t<e.length;t+=1)to(e[t],a(_t,this),a(Be,this))}function ir(){if(this.linked){var e=a(yt,this),t=a(pn,this);e===null||x(pn,e,t),t===null?Pt=e:x(yt,t,e),this.linked=!1}}function jt(e){var t=mn;mn=!0;try{var n;for(e&&(T!==null&&!T.is_fork&&T.flush(),n=e());;){if(Vl(),T===null)return n;T.flush()}}finally{mn=t}}function is(){try{jl()}catch(e){Ve(e,jr)}}var Ye=null;function Ai(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Sn(r)&&(Ye=new Set,Ut(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&_o(r),Ye?.size>0)){Ke.clear();for(let i of Ye){if(i.f&24576)continue;let o=[i],s=i.parent;for(;s!==null;)Ye.has(s)&&(Ye.delete(s),o.push(s)),s=s.parent;for(let c=o.length-1;c>=0;c--){let f=o[c];f.f&24576||Ut(f)}}Ye.clear()}}Ye=null}}function so(e){T.schedule(e)}function ao(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),J(e,xe);for(var n=e.first;n!==null;)ao(n,t),n=n.next}}function co(e){J(e,xe);for(var t=e.first;t!==null;)co(t),t=t.next}var or=new Set,Ke=new Map,uo=!1;function St(e,t){return{f:0,v:e,reactions:null,equals:Gi,rv:0,wv:0}}function H(e,t){let n=St(e,t);return $o(n),n}function fo(e,t=!1,n=!0){let r=St(e);return t||(r.equals=Qi),r}function _(e,t,n=!1){return C!==null&&(!We||C.f&131072)&&$n()&&C.f&4325394&&(Ce===null||!Ce.has(e))&&Bl(),Vt(e,n?Ft(t):t,nr)}var mt=null,Fr=0;function Vt(e,t,n=null){if(!e.equals(t)){Ze?Ke.set(e,t):Ke.has(e)||Ke.set(e,e.v);var r=Gt.ensure();if(r.capture(e,t),e.f&2){let i=e;e.f&2048&&Zr(i),Ne===null&&Qr(i)}e.wv=Mo(),mt=null,Fr=0,ho(e,Re,n),mt=null,$n()&&A!==null&&A.f&1024&&!(A.f&96)&&(be===null?gs([e]):be.push(e)),!r.is_fork&&or.size>0&&!uo&&os()}return t}function os(){uo=!1;for(let e of or){e.f&1024&&J(e,Mt);let t;try{t=Sn(e)}catch{t=!0}t&&Ut(e)}or.clear()}function bn(e){_(e,e.v+1)}function ho(e,t,n){var r=e.reactions;if(r!==null){var i=$n(),o=r.length;if(Fr+=o,Fr>1e5&&mt===null&&(mt=new Set),mt!==null){if(mt.has(e))return;mt.add(e)}for(var s=0;s<o;s++){var c=r[s],f=c.f;if(i||c!==A){var h=(f&Re)===0;if(h&&J(c,t),f&131072)or.add(c);else if(f&2){var p=c;Ne?.delete(p),ho(p,Mt,n)}else if(h){var v=c;f&16&&Ye!==null&&Ye.add(v),n===null?so(v):n.push(v)}}}}}function Ft(e){if(typeof e!="object"||!e||xt in e||Vi in e)return e;let t=Ur(e);if(t!==kl&&t!==xl)return e;var n=new Map,r=qi(e),i=H(0),o=null,s=$t,c=f=>{if($t===s)return f();var h=C,p=$t;ue(null),Ni(s);var v=f();return ue(h),Ni(p),v};return r&&n.set("length",H(e.length,o)),new Proxy(e,{defineProperty(f,h,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&ql();var v=n.get(h);return v===void 0?c(()=>{var m=H(p.value,o);return n.set(h,m),m}):_(v,p.value,!0),!0},deleteProperty(f,h){var p=n.get(h);if(p===void 0){if(h in f){let v=c(()=>H(G,o));n.set(h,v),bn(i)}}else _(p,G),bn(i);return!0},get(f,h,p){if(h===xt)return e;var v=n.get(h),m=h in f;if(v===void 0&&(!m||kt(f,h)?.writable)&&(v=c(()=>H(Ft(m?f[h]:G),o)),n.set(h,v)),v!==void 0){var g=l(v);return g===G?void 0:g}return Reflect.get(f,h,p)},getOwnPropertyDescriptor(f,h){this.has?.(f,h);var p=Reflect.getOwnPropertyDescriptor(f,h),v=n.get(h);if(v!==void 0){var m=l(v);if(m===G)return;if(p&&"value"in p)p.value=m;else return{enumerable:!0,configurable:!0,value:m,writable:!0}}return p},has(f,h){if(h===xt)return!0;var p=n.get(h),v=p!==void 0&&p.v!==G||Reflect.has(f,h);return(p!==void 0||A!==null&&(!v||kt(f,h)?.writable))&&(p===void 0&&(p=c(()=>H(v?Ft(f[h]):G,o)),n.set(h,p)),l(p)===G)?!1:v},set(f,h,p,v){var m=n.get(h),g=h in f;if(r&&h==="length")for(var k=p;k<m.v;k+=1){var E=n.get(k+"");E===void 0?k in f&&(E=c(()=>H(G,o)),n.set(k+"",E)):_(E,G)}if(m===void 0)(!g||kt(f,h)?.writable)&&(m=c(()=>H(void 0,o)),_(m,Ft(p)),n.set(h,m));else{g=m.v!==G;var b=c(()=>Ft(p));_(m,b)}var w=Reflect.getOwnPropertyDescriptor(f,h);if(w?.set&&w.set.call(v,p),!g){if(r&&typeof h=="string"){var O=n.get("length"),j=Number(h);Number.isInteger(j)&&j>=O.v&&_(O,j+1)}bn(i)}return!0},ownKeys(f){l(i);var h=Reflect.ownKeys(f).filter(m=>{var g=n.get(m);return g===void 0||g.v!==G});for(var[p,v]of n)v.v!==G&&!(p in f)&&h.push(p);return h},setPrototypeOf(){Hl()}})}var Ei,po,vo,go;function Ir(){if(Ei===void 0){Ei=window,po=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;vo=kt(t,"firstChild").get,go=kt(t,"nextSibling").get,$i(e)&&(e[Lr]=void 0,e[zr]=null,e[Dr]=void 0,e.__e=void 0),$i(n)&&(n[Gn]=void 0)}}function ke(e=""){return document.createTextNode(e)}function st(e){return vo.call(e)}function Ue(e){return go.call(e)}function hn(e,t){if(!z)return st(e);var n=st(P);if(n===null)n=P.appendChild(ke());else if(t&&n.nodeType!==3){var r=ke();return n?.before(r),ce(r),r}return t&&ti(n),ce(n),n}function In(e,t=!1){if(!z){var n=st(e);return n instanceof Comment&&n.data===""?Ue(n):n}if(t){if(P?.nodeType!==3){var r=ke();return P?.before(r),ce(r),r}ti(P)}return P}function Mr(e,t=!1){if(!z)return st(e);var n=hn(e,t);return Dt(e),n}function Ct(e,t=1,n=!1){let r=z?P:e;for(var i;t--;)i=r,r=Ue(r);if(!z)return r;if(n){if(r?.nodeType!==3){var o=ke();return r===null?i?.after(o):r.before(o),ce(o),o}ti(r)}return ce(r),r}function mo(e){e.textContent=""}function bo(){return!1}function ei(e,t,n){return t==null||t==="http://www.w3.org/1999/xhtml"?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function ti(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function ls(e){var t=A;if(t===null)return C.f|=Zn,e;if(!(t.f&32768)&&!(t.f&4))throw e;Ve(e,t)}function Ve(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}function ss(e){A===null&&(C===null&&Pl(e),Dl()),Ze&&Ll(e)}function as(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Je(e,t){var n=A;n!==null&&n.f&8192&&(e|=Jr);var r={ctx:re,deps:null,nodes:null,f:e|Re|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};T?.register_created_effect(r);var i=r;if(e&4)_n===null?Gt.ensure().schedule(r):_n.push(r);else if(t!==null){try{Ut(r)}catch(s){throw ie(r),s}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=Gr))}if(i!==null&&(i.parent=n,n!==null&&as(i,n),C!==null&&C.f&2&&!(e&64))){var o=C;(o.effects??(o.effects=[])).push(i)}return r}function ni(){return C!==null&&!We}function cs(e){let t=Je(8,null);return J(t,xe),t.teardown=e,t}function pt(e){ss("$effect");var t=A.f;if(!C&&t&32&&re!==null&&!re.i){var n=re;(n.e??(n.e=[])).push(e)}else return wo(e)}function wo(e){return Je(4|Tl,e)}function us(e){Gt.ensure();let t=Je(64|Jt,e);return()=>{ie(t)}}function fs(e){Gt.ensure();let t=Je(64|Jt,e);return(n={})=>new Promise(r=>{n.outro?Tt(t,()=>{ie(t),r(void 0)}):(ie(t),r(void 0))})}function ri(e){return Je(4,e)}function hs(e){return Je(Al|Jt,e)}function hr(e,t=0){return Je(8|t,e)}function qe(e,t=[],n=[],r=[]){Jl(r,t,n,i=>{Je(8,()=>{e(...i.map(l))})})}function ii(e,t=0){return Je(16|t,e)}function $e(e){return Je(32|Jt,e)}function yo(e){var t=e.teardown;if(t!==null){let n=Ze,r=C;Oi(!0),ue(null);try{t.call(null)}catch(i){Ve(i,e.parent)}finally{Oi(n),ue(r)}}}function oi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let i=n.ac;i!==null&&fr(()=>{i.abort(xn)});var r=n.next;n.f&64?n.parent=null:ie(n,t),n=r}}function ds(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||ie(t),t=n}}function ie(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(ps(e.nodes.start,e.nodes.end),n=!0),e.f|=Si,oi(e,t&&!n),kn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let o of r)o.stop();yo(e),e.f^=Si,e.f|=Ml;var i=e.parent;i!==null&&i.first!==null&&_o(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ps(e,t){for(;e!==null;){var n=e===t?null:Ue(e);e.remove(),e=n}}function _o(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Tt(e,t,n=!0){var r=[];e.f|=256,ko(e,r,!0);var i=()=>{n&&ie(e),t&&t()},o=r.length;if(o>0){var s=()=>--o||i();for(var c of r)c.out(s)}else i()}function ko(e,t,n){if(!(e.f&8192)){e.f^=Jr;var r=e.nodes&&e.nodes.t;if(r!==null)for(let c of r)(c.is_global||n)&&t.push(c);for(var i=e.first;i!==null;){var o=i.next;if(!(i.f&64)){var s=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);ko(i,t,s?n:!1)}i=o}}}function lr(e){e.f&=-257,xo(e,!0)}function xo(e,t){if(!(e.f&256)&&e.f&8192){e.f^=Jr,e.f&1024||(J(e,Re),Gt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);xo(n,i?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(let s of o)(s.is_global||t)&&s.in()}}function li(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Ue(n);t.append(n),n=i}}var vs=null,Yn=!1,Ze=!1;function Oi(e){Ze=e}var C=null,We=!1;function ue(e){C=e}var A=null;function Se(e){A=e}var Ce=null;function $o(e){C!==null&&(C.f&2097152||C.f&2)&&(Ce??(Ce=new Set)).add(e)}var se=null,pe=0,be=null;function gs(e){be=e}var So=1,wt=0,$t=wt;function Ni(e){$t=e}function Mo(){return++So}function Sn(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(Sn(o)&&ro(o),o.wv>e.wv)return!0}t&512&&Ne===null&&J(e,xe)}return!1}function To(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ce!==null&&Ce.has(e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&2?To(o,t,!1):t===o&&(n?J(o,Re):o.f&1024&&J(o,Mt),so(o))}}function Ao(e){var t=se,n=pe,r=be,i=C,o=Ce,s=re,c=We,f=$t,h=e.f;se=null,pe=0,be=null,C=h&96?null:e,Ce=null,Kt(e.ctx),We=!1,$t=++wt,e.ac!==null&&(fr(()=>{e.ac.abort(xn)}),e.ac=null);try{e.f|=Mi;var p=e.fn,v=p();e.f|=Ki;var m=Wi(e);if($n()&&be!==null&&!We&&m!==null&&!(e.f&6146))for(var g=0;g<be.length;g++)To(be[g],e);if(i!==null&&i!==e){if(wt++,i.deps!==null)for(let k=0;k<n;k+=1)i.deps[k].rv=wt;if(t!==null)for(let k of t)k.rv=wt;be!==null&&(r===null?r=be:r.push(...be))}return e.f&8388608&&(e.f^=Zn),v}catch(k){return Wi(e),ls(k)}finally{e.f^=Mi,se=t,pe=n,be=r,C=i,Ce=o,Kt(s),We=c,$t=f}}function Wi(e){var t=e.deps,n=T?.is_fork;if(se!==null){var r,i;if(n||kn(e,pe),t!==null&&pe>0)for(t.length=pe+se.length,i=0;i<se.length;i++)t[pe+i]=se[i];else e.deps=t=se;if(ni()&&e.f&512)for(i=pe;i<t.length;i++)((r=t[i]).reactions??(r.reactions=[])).push(e)}else!n&&t!==null&&pe<t.length&&(kn(e,pe),t.length=pe);return t}function ms(e,t){let n=t.reactions;if(n!==null){var r=_l.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(se===null||!Rr.call(se,t))){var o=t;o.f&512&&(o.f^=512),o.v!==G&&Qr(o),o.ac!==null&&fr(()=>{o.ac.abort(xn),o.ac=null,J(o,Re)}),Xl(o),kn(o,0)}}function kn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ms(e,n[r])}function Ut(e){var t=e.f;if(!(t&16384)){J(e,xe);var n=A,r=Yn;A=e,Yn=!(t&96);try{t&16777232?ds(e):oi(e),yo(e);var i=Ao(e);e.teardown=typeof i=="function"?i:null,e.wv=So}finally{Yn=r,A=n}}}function l(e){var t=!!(e.f&2);if(vs?.add(e),C!==null&&!We&&!(A!==null&&A.f&16384)&&(Ce===null||!Ce.has(e))){var n=C.deps;if(C.f&2097152)e.rv<wt&&(e.rv=wt,se===null&&n!==null&&n[pe]===e?pe++:se===null?se=[e]:se.push(e));else{var r;(r=C).deps??(r.deps=[]),Rr.call(C.deps,e)||C.deps.push(e);var i=e.reactions;i===null?e.reactions=[C]:Rr.call(i,C)||i.push(C)}}if(Ze&&Ke.has(e))return Ke.get(e);if(t){var o=e;if(Ze){var s=o.v;return(!(o.f&1024)&&o.reactions!==null||Oo(o))&&(s=Zr(o)),Ke.set(o,s),s}var c=!(o.f&512)&&!We&&C!==null&&(Yn||!!(C.f&512)),f=(o.f&Ki)===0;Sn(o)&&(c&&(o.f|=512),ro(o)),c&&!f&&(io(o),Eo(o))}if(Ne?.has(e))return Ne.get(e);if(e.f&8388608)throw e.v;return e.v}function Eo(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&2&&!(t.f&512)&&(io(t),Eo(t))}function Oo(e){if(e.v===G)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Ke.has(t)||t.f&2&&Oo(t))return!0;return!1}function dr(e){var t=We;try{return We=!0,e()}finally{We=t}}function bs(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(xt in e)qr(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n=="object"&&n&&xt in n&&qr(n)}}}function qr(e,t=new Set){if(typeof e=="object"&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{qr(e[r],t)}catch{}let n=Ur(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let r=Hi(n);for(let i in r){let o=r[i].get;if(o)try{o.call(e)}catch{}}}}}var It=Symbol("events"),No=new Set,Hr=new Set;function He(e,t,n){(t[It]??(t[It]={}))[e]=n}function ws(e){for(var t=0;t<e.length;t++)No.add(e[t]);for(var n of Hr)n(e)}var Tr=null,Ar=!1;function Ci(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;Tr=e,Ar||(Ar=!0,setTimeout(()=>{Ar=!1,Tr=null}));var s=0,c=Tr===e&&e[It];if(c){var f=i.indexOf(c);if(f!==-1&&(t===document||t===window)){e[It]=t;return}var h=i.indexOf(t);if(h===-1)return;f<=h&&(s=f)}if(o=i[s]||e.target,o!==t){wn(e,"currentTarget",{configurable:!0,get(){return o||n}});var p=C,v=A;ue(null),Se(null);try{for(var m,g=[];o!==null&&o!==t;){try{var k=o[It]?.[r];k!=null&&(!o.disabled||e.target===o)&&k.call(o,e)}catch(E){m?g.push(E):m=E}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(m){for(let E of g)queueMicrotask(()=>{throw E});throw m}}finally{e[It]=t,delete e.currentTarget,ue(p),Se(v)}}}var ys=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function _s(e){return ys?.createHTML(e)??e}function ks(e){var t=ei("template");return t.innerHTML=_s(e.replaceAll("<!>","<!---->")),t.content}function Ht(e,t){var n=A;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function at(e,t){var n=!!(t&1),r=!!(t&2),i,o=!e.startsWith("<!>");return()=>{if(z)return Ht(P,null),P;i===void 0&&(i=ks(o?e:"<!>"+e),n||(i=st(i)));var s=r||po?document.importNode(i,!0):i.cloneNode(!0);if(n){var c=st(s),f=s.lastChild;Ht(c,f)}else Ht(s,s);return s}}function Ri(){if(z)return Ht(P,null),P;var e=document.createDocumentFragment(),t=document.createComment(""),n=ke();return e.append(t,n),Ht(t,n),e}function me(e,t){if(z){var n=A;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=P),ur();return}e!==null&&e.before(t)}[..."allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback".split(".")];var xs=["touchstart","touchmove"];function $s(e){return xs.includes(e)}function Ss(e){let t=0,n=St(0),r;return()=>{ni()&&(l(n),hr(()=>(t===0&&(r=dr(()=>e(()=>bn(n)))),t+=1,()=>{lt(()=>{--t,t===0&&(r?.(),r=void 0,bn(n))})})))}}var Ms=Gr|Jt;function Ts(e,t,n,r){new As(e,t,n,r)}var As=(we=new WeakMap,Vn=new WeakMap,Ee=new WeakMap,qt=new WeakMap,le=new WeakMap,ye=new WeakMap,ae=new WeakMap,_e=new WeakMap,Xe=new WeakMap,gt=new WeakMap,ot=new WeakMap,sn=new WeakMap,Un=new WeakMap,Jn=new WeakMap,tt=new WeakMap,xr=new WeakMap,U=new WeakSet,class{constructor(e,t,n,r){Ii(this,U),K(this,"parent",void 0),K(this,"is_pending",!1),K(this,"transform_error",void 0),M(this,we,void 0),M(this,Vn,z?P:null),M(this,Ee,void 0),M(this,qt,void 0),M(this,le,void 0),M(this,ye,null),M(this,ae,null),M(this,_e,null),M(this,Xe,null),M(this,gt,0),M(this,ot,0),M(this,sn,!1),M(this,Un,new Set),M(this,Jn,new Set),M(this,tt,null),M(this,xr,Ss(()=>(x(tt,this,St(a(gt,this))),()=>{x(tt,this,null)}))),x(we,this,e),x(Ee,this,t),x(qt,this,i=>{var o=A;o.b=this,o.f|=128,n(i)}),this.parent=A.b,this.transform_error=r??this.parent?.transform_error??(i=>i),x(le,this,ii(()=>{if(z){let i=a(Vn,this);ur();let o=i.data==="[!";if(i.data.startsWith("[?")){let s=JSON.parse(i.data.slice(2));W(U,this,Os).call(this,s)}else o?W(U,this,Ns).call(this):W(U,this,Es).call(this)}else W(U,this,Co).call(this)},Ms)),z&&x(we,this,P)}defer_effect(e){to(e,a(Un,this),a(Jn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!a(Ee,this).pending}update_pending_count(e,t){W(U,this,Ro).call(this,e,t),x(gt,this,a(gt,this)+e),a(tt,this)&&!a(sn,this)&&(x(sn,this,!0),lt(()=>{x(sn,this,!1),a(tt,this)&&Vt(a(tt,this),a(gt,this))}))}get_effect_pending(){return a(xr,this).call(this),l(a(tt,this))}error(e){if(!a(Ee,this).onerror&&!a(Ee,this).failed)throw e;T?.is_fork?(a(ye,this)&&T.skip_effect(a(ye,this)),a(ae,this)&&T.skip_effect(a(ae,this)),a(_e,this)&&T.skip_effect(a(_e,this)),T.oncommit(()=>{W(U,this,zi).call(this,e)})):W(U,this,zi).call(this,e)}});function Es(){try{x(ye,this,$e(()=>a(qt,this).call(this,a(we,this))))}catch(e){this.error(e)}}function Os(e){let t=a(Ee,this).failed,{reset:n,invoke_onerror:r}=W(U,this,Wo).call(this,e);lt(r),t&&x(_e,this,$e(()=>{t(a(we,this),()=>e,()=>n)}))}function Wo(e){var t=!1,n=!1;let r=()=>{if(t){Wl();return}t=!0,n&&Kl(),a(_e,this)!==null&&Tt(a(_e,this),()=>{x(_e,this,null)}),W(U,this,si).call(this,()=>{W(U,this,Co).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,a(Ee,this).onerror?.(e,r),n=!1}catch(i){Ve(i,a(le,this)&&a(le,this).parent)}}}}function Ns(){let e=a(Ee,this).pending;e&&(this.is_pending=!0,x(ae,this,$e(()=>e(a(we,this)))),lt(()=>{var t=x(Xe,this,document.createDocumentFragment()),n=ke(),r=!1;if(t.append(n),x(ye,this,W(U,this,si).call(this,()=>{try{return $e(()=>a(qt,this).call(this,n))}catch(i){try{this.error(i),r=!0}catch(o){Ve(o,a(le,this).parent)}return null}})),a(ye,this)===null){x(Xe,this,null),r&&W(U,this,sr).call(this,T);return}a(ot,this)===0&&(a(we,this).before(t),x(Xe,this,null),Tt(a(ae,this),()=>{x(ae,this,null)}),W(U,this,sr).call(this,T))}))}function Co(){try{if(this.is_pending=this.has_pending_snippet(),x(ot,this,0),x(gt,this,0),x(ye,this,$e(()=>{a(qt,this).call(this,a(we,this))})),a(ot,this)>0){var e=x(Xe,this,document.createDocumentFragment());li(a(ye,this),e);let t=a(Ee,this).pending;x(ae,this,$e(()=>t(a(we,this))))}else W(U,this,sr).call(this,T)}catch(t){this.error(t)}}function sr(e){this.is_pending=!1,e.transfer_effects(a(Un,this),a(Jn,this))}function si(e){var t=A,n=C,r=re;Se(a(le,this)),ue(a(le,this)),Kt(a(le,this).ctx);try{return Gt.ensure(),e()}finally{Se(t),ue(n),Kt(r)}}function Ro(e,t){if(!this.has_pending_snippet()){var n;this.parent&&W(U,n=this.parent,Ro).call(n,e,t);return}x(ot,this,a(ot,this)+e),a(ot,this)===0&&(W(U,this,sr).call(this,t),a(ae,this)&&Tt(a(ae,this),()=>{x(ae,this,null)}),a(Xe,this)&&x(Xe,this,(a(we,this).before(a(Xe,this)),null)))}function zi(e){a(ye,this)&&x(ye,this,(ie(a(ye,this)),null)),a(ae,this)&&x(ae,this,(ie(a(ae,this)),null)),a(_e,this)&&x(_e,this,(ie(a(_e,this)),null)),z&&(ce(a(Vn,this)),Cl(),ce(er()));let t=a(Ee,this).failed,n=r=>{let{reset:i,invoke_onerror:o}=W(U,this,Wo).call(this,r);o(),t&&x(_e,this,W(U,this,si).call(this,()=>{try{return $e(()=>{var s=A;s.b=this,s.f|=128,t(a(we,this),()=>r,()=>i)})}catch(s){return Ve(s,a(le,this).parent),null}}))};lt(()=>{var r;try{r=this.transform_error(e)}catch(i){Ve(i,a(le,this)&&a(le,this).parent);return}typeof r=="object"&&r&&typeof r.then=="function"?r.then(n,i=>Ve(i,a(le,this)&&a(le,this).parent)):n(r)})}function Li(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[Gn]??(e[Gn]=e.nodeValue))&&(e[Gn]=n,e.nodeValue=`${n}`)}function zo(e,t){return Lo(e,t)}function Ws(e,t){Ir(),t.intro=t.intro??!1;let n=t.target,r=z,i=P;try{for(var o=st(n);o&&(o.nodeType!==8||o.data!=="[");)o=Ue(o);if(!o)throw Bt;Oe(!0),ce(o);let s=Lo(e,{...t,anchor:o});return Oe(!1),s}catch(s){if(s instanceof Error&&s.message.split(`
|
|
2
|
-
`).some(
|
|
3
|
-
\r\f \v\uFEFF`];function
|
|
1
|
+
import{t as H}from"./defineProperty-a20a667d.js";import{i as E,n as k,r as M,t as a}from"./classPrivateFieldGet2-338e0179.js";import{t as Ji}from"./classPrivateMethodInitSpec-563cd0a5.js";import{t as wl}from"./attribute-coercion-b93b482c.js";import{r as yl,t as _l}from"./logger-8b07fb72.js";import{i as kl,n as xl,r as $l}from"./tool-host-contract-fae1c415.js";import{i as Sl}from"./provider-4c704118.js";import{o as Ml}from"./toolbar-registration-helpers-a7ab1ad4.js";import{i as Ni,o as Tl,r as Al,t as El}from"./catalog-context-46d3e50e.js";var Oi,Ri,Gn,$t,vn,gn,sn,wt,st,It,Ee,Ar,St,Ve,Ze,Fn,an,Y,Dr,_e,Jn,Ne,Vt,ne,ke,ae,xe,et,yt,at,cn,Yn,Qn,rt,Er,F,qe,Qe,be,Pt,In,qn,Nr,it,Ae;typeof window<"u"&&((Oi=(Ri=window).__svelte??(Ri.__svelte={})).v??(Oi.v=new Set)).add("5");var ct={},X=Symbol("uninitialized"),Nl="http://www.w3.org/1999/xhtml",Yi=Array.isArray,Ol=Array.prototype.indexOf,er=Array.prototype.includes,fr=Array.from,tr=Object.keys,yn=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Qi=Object.getOwnPropertyDescriptors,Rl=Object.prototype,Wl=Array.prototype,Xr=Object.getPrototypeOf,Wi=Object.isExtensible,Cl=()=>{};function zl(e){for(var t=0;t<e.length;t++)e[t]()}function Xi(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Se=1024,ze=2048,Ot=4096,Zr=8192,Zi=16384,eo=32768,Fr=1<<25,ei=65536,Xt=1<<19,Ll=1<<20,mn=1<<25,Ci=1<<21,Pl=1<<22,nr=1<<23,Tt=Symbol("$state"),to=Symbol("component"),no=Symbol("legacy props"),jl=Symbol(""),Ir=Symbol("attributes"),qr=Symbol("class"),Hr=Symbol("style"),Xn=Symbol("text"),$n=new class extends Error{constructor(...e){super(...e),H(this,"name","StaleReactionError"),H(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Dl=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Fl(){console.warn("https://svelte.dev/e/derived_inert")}function hr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Il(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var C=!1;function Oe(e){C=e}var P;function ce(e){if(e===null)throw hr(),ct;return P=e}function dr(){return ce(Je(P))}function qt(e){if(C){if(Je(P)!==null)throw hr(),ct;P=e}}function ql(e=1){if(C){for(var t=e,n=P;t--;)n=Je(n);P=n}}function rr(e=!0){for(var t=0,n=P;;){if(n.nodeType===8){var r=n.data;if(r==="]"){if(t===0)return n;--t}else(r==="["||r==="[!"||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Je(n);e&&n.remove(),n=i}}function ti(e){if(!e||e.nodeType!==8)throw hr(),ct;return e.data}function ro(e){return e===this.v}function io(e,t){return e==e?e!==t||typeof e=="object"&&!!e||typeof e=="function":t==t}function oo(e){return!io(e,this.v)}function Hl(){throw Error("https://svelte.dev/e/async_derived_orphan")}function Bl(e,t,n){throw Error("https://svelte.dev/e/each_key_duplicate")}function Kl(e){throw Error("https://svelte.dev/e/effect_in_teardown")}function Vl(){throw Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ul(e){throw Error("https://svelte.dev/e/effect_orphan")}function Gl(){throw Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Jl(){throw Error("https://svelte.dev/e/hydration_failed")}function Yl(e){throw Error("https://svelte.dev/e/props_invalid_value")}function Ql(){throw Error("https://svelte.dev/e/state_descriptors_fixed")}function Xl(){throw Error("https://svelte.dev/e/state_prototype_fixed")}function Zl(){throw Error("https://svelte.dev/e/state_unsafe_mutation")}function es(){throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var re=null;function Jt(e){re=e}function lo(e,t=!1,n){re={p:re,i:!1,c:null,e:null,s:e,x:null,r:N,l:null}}function so(e){var t=re,n=t.e;if(n!==null){t.e=null;for(var r of n)To(r)}return e!==void 0&&(t.x=e),t.i=!0,re=t.p,ni(e)}function ni(e={}){return yn(e,to,{value:!0}),e}function Sn(){return!0}var kt=[];function ao(){var e=kt;kt=[],zl(e)}function ut(e){if(kt.length===0&&!bn){var t=kt;queueMicrotask(()=>{t===kt&&ao()})}kt.push(e)}function ts(){for(;kt.length>0;)ao()}var ns=~(ze|Ot|Se);function Q(e,t){e.f=e.f&ns|t}function ri(e){e.f&512||e.deps===null?Q(e,Se):Q(e,Ot)}function co(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),Q(e,Se)}function pr(e){var t=R,n=N;ue(null),Te(null);try{return e()}finally{ue(t),Te(n)}}function rs(e,t,n,r){let i=Sn()?_n:ii;var o=e.filter(b=>!b.settled),s=t.map(i);if(n.length===0&&o.length===0){r(s);return}var u=N,f=is(),h=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(b=>b.promise)):null;function p(b){if(!(u.f&16384)){f();try{r([...s,...b])}catch(_){Ge(_,u)}ir()}}var v=uo();if(n.length===0){h.then(()=>p([])).finally(v);return}function g(){Promise.all(n.map(b=>os(b))).then(p).catch(b=>Ge(b,u)).finally(v)}h?h.then(()=>{if(u.f&16384){v();return}f(),g(),ir()}):g()}function is(){var e=N,t=R,n=re,r=W;return function(i=!0){Te(e),ue(t),Jt(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function ir(e=!0){Te(null),ue(null),Jt(null),e&&W?.deactivate()}function uo(){var e=N,t=e.b,n=W,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function _n(e){var t=2|ze;return N!==null&&(N.f|=Xt),{ctx:re,deps:null,effects:null,equals:ro,f:t,fn:e,reactions:null,rv:0,v:X,wv:0,parent:N,ac:null}}var hn=Symbol("obsolete");function os(e,t,n){let r=N;r===null&&Hl();var i=void 0,o=Nt(X),s=!R,u=new Set;return _s(()=>{var f=N,h=Xi();i=h.promise;try{Promise.resolve(e()).then(h.resolve,b=>{b!==$n&&h.reject(b)}).finally(ir)}catch(b){h.reject(b),ir()}var p=W;if(s){if(f.f&32768)var v=uo();if(r.b?.is_rendered())p.async_deriveds.get(f)?.reject(hn);else for(let b of u.values())b.reject(hn);u.add(h),p.async_deriveds.set(f,h)}let g=(b,_=void 0)=>{v?.(),u.delete(h),_!==hn&&(p.activate(),_?(o.f|=nr,Yt(o,_)):(o.f&8388608&&(o.f^=nr),Yt(o,b)),p.deactivate())};h.promise.then(g,b=>g(null,b||"unknown"))}),bs(()=>{for(let f of u)f.reject(hn)}),new Promise(f=>{function h(p){function v(){p===i?f(o):h(i)}p.then(v,v)}h(i)})}function J(e){let t=_n(e);return Ro(t),t}function ii(e){let t=_n(e);return t.equals=oo,t}function ls(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ie(t[n])}}function oi(e){var t,n=N,r=e.parent;if(!tt&&r!==null&&e.v!==X&&r.f&24576)return Fl(),e.v;Te(r);try{ls(e),t=Lo(e)}finally{Te(n)}return t}function fo(e){var t=oi(e);if(!e.equals(t)&&(e.wv=Co(),(!W?.is_fork||e.deps===null)&&(W===null?e.v=t:(W.capture(e,t,!0),Ut?.capture(e,t,!0)),e.deps===null))){Q(e,Se);return}tt||(Re===null?ri(e):(ai()||W?.is_fork)&&Re.set(e,t))}function ss(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&pr(()=>{t.ac.abort($n),t.ac=null}),t.fn!==null&&(t.teardown=Cl),xn(t,0),fi(t))}function ho(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Qt(t)}var Ht=null,W=null,Ut=null,Re=null,Br=null,bn=!1,Or=!1,kn=null,or=null,po=0,as=1,Zt=(Gn=new WeakMap,$t=new WeakMap,vn=new WeakMap,gn=new WeakMap,sn=new WeakMap,wt=new WeakMap,st=new WeakMap,It=new WeakMap,Ee=new WeakMap,Ar=new WeakMap,St=new WeakMap,Ve=new WeakMap,Ze=new WeakMap,Fn=new WeakMap,an=new WeakMap,Y=new WeakSet,Dr=class vo{constructor(){Ji(this,Y),H(this,"id",as++),E(this,Gn,!1),H(this,"linked",!0),E(this,$t,null),E(this,vn,null),H(this,"async_deriveds",new Map),H(this,"current",new Map),H(this,"previous",new Map),E(this,gn,new Set),E(this,sn,new Set),E(this,wt,0),E(this,st,new Map),E(this,It,null),E(this,Ee,[]),E(this,Ar,[]),E(this,St,new Set),E(this,Ve,new Set),E(this,Ze,new Map),E(this,Fn,new Set),H(this,"is_fork",!1),E(this,an,!1),Ht===null?Ht=this:(k(vn,Ht,this),k($t,this,Ht)),Ht=this}skip_effect(t){a(Ze,this).has(t)||a(Ze,this).set(t,{d:[],m:[]}),a(Fn,this).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=a(Ze,this).get(t);if(r){a(Ze,this).delete(t);for(var i of r.d)Q(i,ze),n(i);for(i of r.m)Q(i,Ot),n(i)}a(Fn,this).add(t)}capture(t,n,r=!1){t.v!==X&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&8388608||(this.current.set(t,[n,r]),Re?.set(t,n)),this.is_fork||(t.v=n)}activate(){W=this}deactivate(){W=null,Re=null}flush(){try{Or=!0,W=this,M(Y,this,lr).call(this)}finally{po=0,Br=null,kn=null,or=null,Or=!1,W=null,Re=null,Ue.clear()}}discard(){for(let t of a(sn,this))t(this);a(sn,this).clear();for(let t of this.async_deriveds.values())t.reject(hn);M(Y,this,sr).call(this),a(It,this)?.resolve()}register_created_effect(t){a(Ar,this).push(t)}increment(t,n){if(k(wt,this,a(wt,this)+1),t){let r=a(st,this).get(n)??0;a(st,this).set(n,r+1)}}decrement(t,n){var r;if(k(wt,this,(r=a(wt,this),--r)),t){let i=a(st,this).get(n)??0;i===1?a(st,this).delete(n):a(st,this).set(n,i-1)}a(an,this)||(k(an,this,!0),ut(()=>{k(an,this,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(let r of t)a(St,this).add(r);for(let r of n)a(Ve,this).add(r);t.clear(),n.clear()}oncommit(t){a(gn,this).add(t)}ondiscard(t){a(sn,this).add(t)}settled(){return(a(It,this)??k(It,this,Xi())).promise}static ensure(){if(W===null){let t=W=new vo;!Or&&!bn&&ut(()=>{a(Gn,t)||t.flush()})}return W}apply(){Re=null}schedule(t){if(Br=t,t.b?.is_pending&&t.f&16777228&&!(t.f&32768)){t.b.defer_effect(t);return}a(Ee,this).push(t)}},Dr);function zi(){if(this.is_fork)return!0;for(let n of a(st,this).keys()){for(var e=n,t=!1;e.parent!==null;){if(a(Ze,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function cs(){var e=[];for(let i of a(Ee,this))if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=Se}}n||e.push(t)}return k(Ee,this,[]),e}function lr(){k(Gn,this,!0);for(let s of a(St,this))a(Ve,this).delete(s),Q(s,ze),this.schedule(s);for(let s of a(Ve,this))Q(s,Ot),this.schedule(s);this.apply();for(var e=kn=[],t=[],n=or=[];a(Ee,this).length>0;){po++>1e3&&(M(Y,this,sr).call(this),ds());for(let s of M(Y,this,cs).call(this))try{M(Y,this,us).call(this,s,e,t)}catch(u){throw bo(s),M(Y,this,zi).call(this)||this.discard(),u}}if(W=null,n.length>0){var r=Dr.ensure();for(let s of n)r.schedule(s)}if(kn=null,or=null,M(Y,this,zi).call(this)){M(Y,this,Hn).call(this,t),M(Y,this,Hn).call(this,e);for(let[s,u]of a(Ze,this))mo(s,u);n.length>0&&M(Y,W,lr).call(W);return}let i=M(Y,this,fs).call(this);if(i){M(Y,this,Hn).call(this,t),M(Y,this,Hn).call(this,e),M(Y,i,hs).call(i,this);return}a(St,this).clear(),a(Ve,this).clear();for(let s of a(gn,this))s(this);a(gn,this).clear(),Ut=this,Li(t),Li(e),Ut=null,a(It,this)?.resolve();var o=W;if(a(wt,this)===0&&(a(Ee,this).length===0||o!==null)&&M(Y,this,sr).call(this),a(Ee,this).length>0)if(o!==null){for(let s of a(Ee,this))a(Ee,o).push(s);k(Ee,this,[])}else o=this;o!==null&&(Ue.clear(),M(Y,o,lr).call(o))}function us(e,t,n){e.f^=Se;for(var r=e.first;r!==null;){var i=r.f,o=!!(i&96);if(!(o&&i&1024||i&8192||a(Ze,this).has(r))&&r.fn!==null){o?r.f^=Se:i&4?t.push(r):Mn(r)&&(i&16&&a(Ve,this).add(r),Qt(r));var s=r.first;if(s!==null){r=s;continue}}for(;r!==null;){var u=r.next;if(u!==null){r=u;break}r=r.parent}}}function fs(){for(var e=a($t,this);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=a($t,e)}return null}function hs(e){for(let[n,r]of e.current)!this.previous.has(n)&&e.previous.has(n)&&this.previous.set(n,e.previous.get(n)),this.current.set(n,r);for(let[n,r]of e.async_deriveds){let i=this.async_deriveds.get(n);i&&r.promise.then(i.resolve).catch(i.reject)}e.async_deriveds.clear(),this.transfer_effects(a(St,e),a(Ve,e));let t=n=>{var r=n.reactions;if(r!==null&&!(n.f&2&&!(n.f&6144)))for(let s of r){var i=s.f;if(i&2)t(s);else{var o=s;i&4194320&&!this.async_deriveds.has(o)&&(a(Ve,this).delete(o),Q(o,ze),this.schedule(o))}}};for(let n of this.current.keys())t(n);this.oncommit(()=>e.discard()),M(Y,e,sr).call(e),W=this,M(Y,this,lr).call(this)}function Hn(e){for(var t=0;t<e.length;t+=1)co(e[t],a(St,this),a(Ve,this))}function sr(){if(this.linked){var e=a($t,this),t=a(vn,this);e===null||k(vn,e,t),t===null?Ht=e:k($t,t,e),this.linked=!1}}function Ke(e){var t=bn,n=Ut;Ut=null,bn=!0;try{var r;for(e&&(Ke(),r=e());;){if(ts(),W===null)return r;W.flush()}}finally{bn=t,Ut=n}}function ds(){try{Gl()}catch(e){Ge(e,Br)}}var Xe=null;function Li(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Mn(r)&&(Xe=new Set,Qt(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Eo(r),Xe?.size>0)){Ue.clear();for(let i of Xe){if(i.f&24576)continue;let o=[i],s=i.parent;for(;s!==null;)Xe.has(s)&&(Xe.delete(s),o.push(s)),s=s.parent;for(let u=o.length-1;u>=0;u--){let f=o[u];f.f&24576||Qt(f)}}Xe.clear()}}Xe=null}}function go(e){W.schedule(e)}function mo(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),Q(e,Se);for(var n=e.first;n!==null;)mo(n,t),n=n.next}}function bo(e){Q(e,Se);for(var t=e.first;t!==null;)bo(t),t=t.next}var ar=new Set,Ue=new Map,wo=!1;function Nt(e,t){return{f:0,v:e,reactions:null,equals:ro,rv:0,wv:0}}function q(e,t){let n=Nt(e,t);return Ro(n),n}function yo(e,t=!1,n=!0){let r=Nt(e);return t||(r.equals=oo),r}function y(e,t,n=!1){return R!==null&&(!We||R.f&131072)&&Sn()&&R.f&4325394&&(Ce===null||!Ce.has(e))&&Zl(),Yt(e,n?Bt(t):t,or)}var _t=null,Kr=0;function Yt(e,t,n=null){if(!e.equals(t)){tt?Ue.set(e,t):Ue.has(e)||Ue.set(e,e.v);var r=Zt.ensure();if(r.capture(e,t),e.f&2){let i=e;e.f&2048&&oi(i),Re===null&&ri(i)}e.wv=Co(),_t=null,Kr=0,_o(e,ze,n),_t=null,Sn()&&N!==null&&N.f&1024&&!(N.f&96)&&(ye===null?Ss([e]):ye.push(e)),!r.is_fork&&ar.size>0&&!wo&&ps()}return t}function ps(){wo=!1;for(let e of ar){e.f&1024&&Q(e,Ot);let t;try{t=Mn(e)}catch{t=!0}t&&Qt(e)}ar.clear()}function wn(e){y(e,e.v+1)}function _o(e,t,n){var r=e.reactions;if(r!==null){var i=Sn(),o=r.length;if(Kr+=o,Kr>1e5&&_t===null&&(_t=new Set),_t!==null){if(_t.has(e))return;_t.add(e)}for(var s=0;s<o;s++){var u=r[s],f=u.f;if(i||u!==N){var h=(f&ze)===0;if(h&&Q(u,t),f&131072)ar.add(u);else if(f&2){var p=u;Re?.delete(p),_o(p,Ot,n)}else if(h){var v=u;f&16&&Xe!==null&&Xe.add(v),n===null?go(v):n.push(v)}}}}}function Bt(e){if(typeof e!="object"||!e||Tt in e||to in e)return e;let t=Xr(e);if(t!==Rl&&t!==Wl)return e;var n=new Map,r=Yi(e),i=q(0),o=null,s=At,u=f=>{if(At===s)return f();var h=R,p=At;ue(null),Di(s);var v=f();return ue(h),Di(p),v};return r&&n.set("length",q(e.length,o)),new Proxy(e,{defineProperty(f,h,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&Ql();var v=n.get(h);return v===void 0?u(()=>{var g=q(p.value,o);return n.set(h,g),g}):y(v,p.value,!0),!0},deleteProperty(f,h){var p=n.get(h);if(p===void 0){if(h in f){let v=u(()=>q(X,o));n.set(h,v),wn(i)}}else y(p,X),wn(i);return!0},get(f,h,p){if(h===Tt)return e;var v=n.get(h),g=h in f;if(v===void 0&&(!g||Mt(f,h)?.writable)&&(v=u(()=>q(Bt(g?f[h]:X),o)),n.set(h,v)),v!==void 0){var b=l(v);return b===X?void 0:b}return Reflect.get(f,h,p)},getOwnPropertyDescriptor(f,h){this.has?.(f,h);var p=Reflect.getOwnPropertyDescriptor(f,h),v=n.get(h);if(v!==void 0){var g=l(v);if(g===X)return;if(p&&"value"in p)p.value=g;else return{enumerable:!0,configurable:!0,value:g,writable:!0}}return p},has(f,h){if(h===Tt)return!0;var p=n.get(h),v=p!==void 0&&p.v!==X||Reflect.has(f,h);return(p!==void 0||N!==null&&(!v||Mt(f,h)?.writable))&&(p===void 0&&(p=u(()=>q(v?Bt(f[h]):X,o)),n.set(h,p)),l(p)===X)?!1:v},set(f,h,p,v){var g=n.get(h),b=h in f;if(r&&h==="length")for(var _=p;_<g.v;_+=1){var T=n.get(_+"");T===void 0?_ in f&&(T=u(()=>q(X,o)),n.set(_+"",T)):y(T,X)}if(g===void 0)(!b||Mt(f,h)?.writable)&&(g=u(()=>q(void 0,o)),y(g,Bt(p)),n.set(h,g));else{b=g.v!==X;var m=u(()=>Bt(p));y(g,m)}var x=Reflect.getOwnPropertyDescriptor(f,h);if(x?.set&&x.set.call(v,p),!b){if(r&&typeof h=="string"){var U=n.get("length"),K=Number(h);Number.isInteger(K)&&K>=U.v&&y(U,K+1)}wn(i)}return!0},ownKeys(f){l(i);var h=Reflect.ownKeys(f).filter(g=>{var b=n.get(g);return b===void 0||b.v!==X});for(var[p,v]of n)v.v!==X&&!(p in f)&&h.push(p);return h},setPrototypeOf(){Xl()}})}var Pi,ko,xo,$o;function Vr(){if(Pi===void 0){Pi=window,ko=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;xo=Mt(t,"firstChild").get,$o=Mt(t,"nextSibling").get,Wi(e)&&(e[qr]=void 0,e[Ir]=null,e[Hr]=void 0,e.__e=void 0),Wi(n)&&(n[Xn]=void 0)}}function $e(e=""){return document.createTextNode(e)}function ft(e){return xo.call(e)}function Je(e){return $o.call(e)}function dn(e,t){if(!C)return ft(e);var n=ft(P);if(n===null)n=P.appendChild($e());else if(t&&n.nodeType!==3){var r=$e();return n?.before(r),ce(r),r}return t&&si(n),ce(n),n}function Bn(e,t=!1){if(!C){var n=ft(e);return n instanceof Comment&&n.data===""?Je(n):n}if(t){if(P?.nodeType!==3){var r=$e();return P?.before(r),ce(r),r}si(P)}return P}function Rr(e,t=!1){if(!C)return ft(e);var n=dn(e,t);return qt(e),n}function jt(e,t=1,n=!1){let r=C?P:e;for(var i;t--;)i=r,r=Je(r);if(!C)return r;if(n){if(r?.nodeType!==3){var o=$e();return r===null?i?.after(o):r.before(o),ce(o),o}si(r)}return ce(r),r}function So(e){e.textContent=""}function Mo(){return!1}function li(e,t,n){return t==null||t==="http://www.w3.org/1999/xhtml"?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function si(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function vs(e){var t=N;if(t===null)return R.f|=nr,e;if(!(t.f&32768)&&!(t.f&4))throw e;Ge(e,t)}function Ge(e,t){if(e===ct)throw e;if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}function gs(e){N===null&&(R===null&&Ul(e),Vl()),tt&&Kl(e)}function ms(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Ye(e,t){var n=N;n!==null&&n.f&8192&&(e|=Zr);var r={ctx:re,deps:null,nodes:null,f:e|ze|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};W?.register_created_effect(r);var i=r;if(e&4)kn===null?Zt.ensure().schedule(r):kn.push(r);else if(t!==null){try{Qt(r)}catch(s){throw ie(r),s}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ei))}if(i!==null&&(i.parent=n,n!==null&&ms(i,n),R!==null&&R.f&2&&!(e&64))){var o=R;(o.effects??(o.effects=[])).push(i)}return r}function ai(){return R!==null&&!We}function bs(e){let t=Ye(8,null);return Q(t,Se),t.teardown=e,t}function bt(e){gs("$effect");var t=N.f;if(!R&&t&32&&re!==null&&!re.i){var n=re;(n.e??(n.e=[])).push(e)}else return To(e)}function To(e){return Ye(4|Ll,e)}function ws(e){Zt.ensure();let t=Ye(64|Xt,e);return()=>{ie(t)}}function ys(e){Zt.ensure();let t=Ye(64|Xt,e);return(n={})=>new Promise(r=>{n.outro?Rt(t,()=>{ie(t),r(void 0)}):(ie(t),r(void 0))})}function ci(e){return Ye(4,e)}function _s(e){return Ye(Pl|Xt,e)}function vr(e,t=0){return Ye(8|t,e)}function He(e,t=[],n=[],r=[]){rs(r,t,n,i=>{Ye(8,()=>{e(...i.map(l))})})}function ui(e,t=0){return Ye(16|t,e)}function Me(e){return Ye(32|Xt,e)}function Ao(e){var t=e.teardown;if(t!==null){let n=tt,r=R;ji(!0),ue(null);try{t.call(null)}catch(i){Ge(i,e.parent)}finally{ji(n),ue(r)}}}function fi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let i=n.ac;i!==null&&pr(()=>{i.abort($n)});var r=n.next;n.f&64?n.parent=null:ie(n,t),n=r}}function ks(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||ie(t),t=n}}function ie(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(xs(e.nodes.start,e.nodes.end),n=!0),e.f|=Fr,fi(e,t&&!n),xn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let o of r)o.stop();Ao(e),e.f^=Fr,e.f|=Zi;var i=e.parent;i!==null&&i.first!==null&&Eo(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function xs(e,t){for(;e!==null;){var n=e===t?null:Je(e);e.remove(),e=n}}function Eo(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Rt(e,t,n=!0){var r=[];e.f|=256,No(e,r,!0);var i=()=>{n&&ie(e),t&&t()},o=r.length;if(o>0){var s=()=>--o||i();for(var u of r)u.out(s)}else i()}function No(e,t,n){if(!(e.f&8192)){e.f^=Zr;var r=e.nodes&&e.nodes.t;if(r!==null)for(let u of r)(u.is_global||n)&&t.push(u);for(var i=e.first;i!==null;){var o=i.next;if(!(i.f&64)){var s=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);No(i,t,s?n:!1)}i=o}}}function cr(e){e.f&=-257,Oo(e,!0)}function Oo(e,t){if(!(e.f&256)&&e.f&8192){e.f^=Zr,e.f&1024||(Q(e,ze),Zt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);Oo(n,i?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(let s of o)(s.is_global||t)&&s.in()}}function hi(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Je(n);t.append(n),n=i}}var $s=null,tt=!1;function ji(e){tt=e}var R=null,We=!1;function ue(e){R=e}var N=null;function Te(e){N=e}var Ce=null;function Ro(e){R!==null&&(R.f&2097152||R.f&2)&&(Ce??(Ce=new Set)).add(e)}var se=null,ve=0,ye=null;function Ss(e){ye=e}var Wo=1,xt=0,At=xt;function Di(e){At=e}function Co(){return++Wo}function Mn(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(Mn(o)&&fo(o),o.wv>e.wv)return!0}t&512&&Re===null&&Q(e,Se)}return!1}function zo(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ce!==null&&Ce.has(e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&2?zo(o,t,!1):t===o&&(n?Q(o,ze):o.f&1024&&Q(o,Ot),go(o))}}function Lo(e){var t=se,n=ve,r=ye,i=R,o=Ce,s=re,u=We,f=At,h=e.f;se=null,ve=0,ye=null,R=h&96?null:e,Ce=null,Jt(e.ctx),We=!1,At=++xt,e.ac!==null&&(pr(()=>{e.ac.abort($n)}),e.ac=null);try{e.f|=Ci;var p=e.fn,v=p();e.f|=eo;var g=Fi(e);if(Sn()&&ye!==null&&!We&&g!==null&&!(e.f&6146))for(var b=0;b<ye.length;b++)zo(ye[b],e);if(i!==null&&i!==e){if(xt++,i.deps!==null)for(let _=0;_<n;_+=1)i.deps[_].rv=xt;if(t!==null)for(let _ of t)_.rv=xt;ye!==null&&(r===null?r=ye:r.push(...ye))}return e.f&8388608&&(e.f^=nr),v}catch(_){return Fi(e),vs(_)}finally{e.f^=Ci,se=t,ve=n,ye=r,R=i,Ce=o,Jt(s),We=u,At=f}}function Fi(e){var t=e.deps,n=W?.is_fork;if(se!==null){var r,i;if(n||xn(e,ve),t!==null&&ve>0)for(t.length=ve+se.length,i=0;i<se.length;i++)t[ve+i]=se[i];else e.deps=t=se;if(ai()&&e.f&512)for(i=ve;i<t.length;i++)((r=t[i]).reactions??(r.reactions=[])).push(e)}else!n&&t!==null&&ve<t.length&&(xn(e,ve),t.length=ve);return t}function Ms(e,t){let n=t.reactions;if(n!==null){var r=Ol.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(se===null||!er.call(se,t))){var o=t;o.f&512&&(o.f^=512),o.v!==X&&ri(o),o.ac!==null&&pr(()=>{o.ac.abort($n),o.ac=null,Q(o,ze)}),ss(o),xn(o,0)}}function xn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ms(e,n[r])}function Qt(e){var t=e.f;if(!(t&16384)){Q(e,Se);var n=N;N=e;try{t&16777232?ks(e):fi(e),Ao(e);var r=Lo(e);e.teardown=typeof r=="function"?r:null,e.wv=Wo}finally{N=n}}}function l(e){var t=!!(e.f&2);if($s?.add(e),R!==null&&!We&&!(N!==null&&N.f&16384)&&(Ce===null||!Ce.has(e))){var n=R.deps;if(R.f&2097152)e.rv<xt&&(e.rv=xt,se===null&&n!==null&&n[ve]===e?ve++:se===null?se=[e]:se.push(e));else{var r;(r=R).deps??(r.deps=[]),er.call(R.deps,e)||R.deps.push(e);var i=e.reactions;i===null?e.reactions=[R]:er.call(i,R)||i.push(R)}}if(tt&&Ue.has(e))return Ue.get(e);if(t){var o=e;if(tt){var s=o.v;return(!(o.f&1024)&&o.reactions!==null||jo(o))&&(s=oi(o)),Ue.set(o,s),s}var u=!(o.f&512)&&!We&&R!==null&&!!(R.f&512),f=(o.f&eo)===0;Mn(o)&&(u&&(o.f|=512),fo(o)),u&&!f&&(ho(o),Po(o))}if(Re?.has(e))return Re.get(e);if(e.f&8388608)throw e.v;return e.v}function Po(e){if(e.f|=512,e.deps!==null)for(let n of e.deps){var t=n.reactions;t===null?n.reactions=[e]:er.call(t,e)||t.push(e),n.f&2&&!(n.f&512)&&(ho(n),Po(n))}}function jo(e){if(e.v===X)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Ue.has(t)||t.f&2&&jo(t))return!0;return!1}function gr(e){var t=We;try{return We=!0,e()}finally{We=t}}function Ts(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Tt in e)Ur(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n=="object"&&n&&Tt in n&&Ur(n)}}}function Ur(e,t=new Set){if(typeof e=="object"&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ur(e[r],t)}catch{}let n=Xr(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let r=Qi(n);for(let i in r){let o=r[i].get;if(o)try{o.call(e)}catch{}}}}}var Kt=Symbol("events"),Do=new Set,Gr=new Set;function Be(e,t,n){(t[Kt]??(t[Kt]={}))[e]=n}function As(e){for(var t=0;t<e.length;t++)Do.add(e[t]);for(var n of Gr)n(e)}var Wr=null,Cr=!1;function Ii(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;Wr=e,Cr||(Cr=!0,setTimeout(()=>{Cr=!1,Wr=null}));var s=0,u=Wr===e&&e[Kt];if(u){var f=i.indexOf(u);if(f!==-1&&(t===document||t===window)){e[Kt]=t;return}var h=i.indexOf(t);if(h===-1)return;f<=h&&(s=f)}if(o=i[s]||e.target,o!==t){yn(e,"currentTarget",{configurable:!0,get(){return o||n}});var p=R,v=N;ue(null),Te(null);try{for(var g,b=[];o!==null&&o!==t;){try{var _=o[Kt]?.[r];_!=null&&(!o.disabled||e.target===o)&&_.call(o,e)}catch(T){g?b.push(T):g=T}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(g){for(let T of b)queueMicrotask(()=>{throw T});throw g}}finally{e[Kt]=t,delete e.currentTarget,ue(p),Te(v)}}}var Es=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ns(e){return Es?.createHTML(e)??e}function Os(e){var t=li("template");return t.innerHTML=Ns(e.replaceAll("<!>","<!---->")),t.content}function Gt(e,t){var n=N;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function ht(e,t){var n=!!(t&1),r=!!(t&2),i,o=!e.startsWith("<!>");return()=>{if(C)return Gt(P,null),P;i===void 0&&(i=Os(o?e:"<!>"+e),n||(i=ft(i)));var s=r||ko?document.importNode(i,!0):i.cloneNode(!0);if(n){var u=ft(s),f=s.lastChild;Gt(u,f)}else Gt(s,s);return s}}function qi(){if(C)return Gt(P,null),P;var e=document.createDocumentFragment(),t=document.createComment(""),n=$e();return e.append(t,n),Gt(t,n),e}function we(e,t){if(C){var n=N;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=P),dr();return}e!==null&&e.before(t)}[..."allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback".split(".")];var Rs=["touchstart","touchmove"];function Ws(e){return Rs.includes(e)}function Cs(e){let t=0,n=Nt(0),r;return()=>{ai()&&(l(n),vr(()=>(t===0&&(r=gr(()=>e(()=>wn(n)))),t+=1,()=>{ut(()=>{--t,t===0&&(r?.(),r=void 0,wn(n))})})))}}var zs=ei|Xt;function Ls(e,t,n,r){new Ps(e,t,n,r)}var Ps=(_e=new WeakMap,Jn=new WeakMap,Ne=new WeakMap,Vt=new WeakMap,ne=new WeakMap,ke=new WeakMap,ae=new WeakMap,xe=new WeakMap,et=new WeakMap,yt=new WeakMap,at=new WeakMap,cn=new WeakMap,Yn=new WeakMap,Qn=new WeakMap,rt=new WeakMap,Er=new WeakMap,F=new WeakSet,class{constructor(e,t,n,r){Ji(this,F),H(this,"parent",void 0),H(this,"is_pending",!1),H(this,"transform_error",void 0),E(this,_e,void 0),E(this,Jn,C?P:null),E(this,Ne,void 0),E(this,Vt,void 0),E(this,ne,void 0),E(this,ke,null),E(this,ae,null),E(this,xe,null),E(this,et,null),E(this,yt,0),E(this,at,0),E(this,cn,!1),E(this,Yn,new Set),E(this,Qn,new Set),E(this,rt,null),E(this,Er,Cs(()=>(k(rt,this,Nt(a(yt,this))),()=>{k(rt,this,null)}))),k(_e,this,e),k(Ne,this,t),k(Vt,this,i=>{var o=N;o.b=this,o.f|=128,n(i)}),this.parent=N.b,this.transform_error=r??this.parent?.transform_error??(i=>i),k(ne,this,ui(()=>{if(C){let i=ti(a(Jn,this));dr();let o=i==="[!";if(i.startsWith("[?")){let s=JSON.parse(i.slice(2));M(F,this,Ds).call(this,s)}else o?M(F,this,Fs).call(this):M(F,this,js).call(this)}else M(F,this,Io).call(this)},zs)),C&&k(_e,this,P)}defer_effect(e){co(e,a(Yn,this),a(Qn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!a(Ne,this).pending}update_pending_count(e,t){M(F,this,qo).call(this,e,t),k(yt,this,a(yt,this)+e),a(rt,this)&&!a(cn,this)&&(k(cn,this,!0),ut(()=>{k(cn,this,!1),a(rt,this)&&Yt(a(rt,this),a(yt,this))}))}get_effect_pending(){return a(Er,this).call(this),l(a(rt,this))}error(e){if(e===ct||!a(Ne,this).onerror&&!a(Ne,this).failed)throw e;W?.is_fork?(a(ke,this)&&W.skip_effect(a(ke,this)),a(ae,this)&&W.skip_effect(a(ae,this)),a(xe,this)&&W.skip_effect(a(xe,this)),W.oncommit(()=>{M(F,this,Et).call(this)||M(F,this,Hi).call(this,e)})):M(F,this,Hi).call(this,e)}});function js(){try{k(ke,this,Me(()=>a(Vt,this).call(this,a(_e,this))))}catch(e){this.error(e)}}function Ds(e){let t=a(Ne,this).failed,{reset:n,invoke_onerror:r}=M(F,this,Fo).call(this,e);ut(r),t&&k(xe,this,Me(()=>{t(a(_e,this),()=>e,()=>n)}))}function Fo(e){var t=!1,n=!1;let r=()=>{if(!M(F,this,Et).call(this)){if(t){Il();return}t=!0,n&&es(),a(xe,this)!==null&&Rt(a(xe,this),()=>{k(xe,this,null)}),M(F,this,di).call(this,()=>{M(F,this,Io).call(this)})}};return{reset:r,invoke_onerror:()=>{if(!M(F,this,Et).call(this))try{n=!0,a(Ne,this).onerror?.(e,r),n=!1}catch(i){Ge(i,a(ne,this)&&a(ne,this).parent)}}}}function Et(){return(a(ne,this).f&(Zi|Fr))!==0}function Fs(){let e=a(Ne,this).pending;e&&(this.is_pending=!0,k(ae,this,Me(()=>e(a(_e,this)))),ut(()=>{if(!M(F,this,Et).call(this)){var t=k(et,this,document.createDocumentFragment()),n=$e(),r=!1;if(t.append(n),k(ke,this,M(F,this,di).call(this,()=>{try{return Me(()=>a(Vt,this).call(this,n))}catch(i){try{this.error(i),r=!0}catch(o){Ge(o,a(ne,this).parent)}return null}})),a(ke,this)===null){k(et,this,null),r&&M(F,this,ur).call(this,W);return}a(at,this)===0&&(a(_e,this).before(t),k(et,this,null),Rt(a(ae,this),()=>{k(ae,this,null)}),M(F,this,ur).call(this,W))}}))}function Io(){try{if(this.is_pending=this.has_pending_snippet(),k(at,this,0),k(yt,this,0),k(ke,this,Me(()=>{a(Vt,this).call(this,a(_e,this))})),a(at,this)>0){var e=k(et,this,document.createDocumentFragment());hi(a(ke,this),e);let t=a(Ne,this).pending;k(ae,this,Me(()=>t(a(_e,this))))}else M(F,this,ur).call(this,W)}catch(t){this.error(t)}}function ur(e){this.is_pending=!1,e.transfer_effects(a(Yn,this),a(Qn,this))}function di(e){var t=N,n=R,r=re;Te(a(ne,this)),ue(a(ne,this)),Jt(a(ne,this).ctx);try{return Zt.ensure(),e()}finally{Te(t),ue(n),Jt(r)}}function qo(e,t){if(!this.has_pending_snippet()){var n;this.parent&&M(F,n=this.parent,qo).call(n,e,t);return}k(at,this,a(at,this)+e),a(at,this)===0&&(M(F,this,ur).call(this,t),a(ae,this)&&Rt(a(ae,this),()=>{k(ae,this,null)}),a(et,this)&&k(et,this,(a(_e,this).before(a(et,this)),null)))}function Hi(e){a(ke,this)&&k(ke,this,(ie(a(ke,this)),null)),a(ae,this)&&k(ae,this,(ie(a(ae,this)),null)),a(xe,this)&&k(xe,this,(ie(a(xe,this)),null)),C&&(ce(a(Jn,this)),ql(),ce(rr()));let t=a(Ne,this).failed,n=r=>{if(M(F,this,Et).call(this))return;let{reset:i,invoke_onerror:o}=M(F,this,Fo).call(this,r);o(),t&&!M(F,this,Et).call(this)&&k(xe,this,M(F,this,di).call(this,()=>{try{return Me(()=>{var s=N;s.b=this,s.f|=128,t(a(_e,this),()=>r,()=>i)})}catch(s){return Ge(s,a(ne,this).parent),null}}))};ut(()=>{if(!M(F,this,Et).call(this)){var r;try{r=this.transform_error(e)}catch(i){Ge(i,a(ne,this)&&a(ne,this).parent);return}typeof r=="object"&&r&&typeof r.then=="function"?r.then(n,i=>Ge(i,a(ne,this)&&a(ne,this).parent)):n(r)}})}function Bi(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[Xn]??(e[Xn]=e.nodeValue))&&(e[Xn]=n,e.nodeValue=`${n}`)}function Ho(e,t){return Bo(e,t)}function Is(e,t){Vr(),t.intro=t.intro??!1;let n=t.target,r=C,i=P;try{for(var o=ft(n);o&&(o.nodeType!==8||o.data!=="[");)o=Je(o);if(!o)throw ct;Oe(!0),ce(o);let s=Bo(e,{...t,anchor:o});return Oe(!1),s}catch(s){if(s instanceof Error&&s.message.split(`
|
|
2
|
+
`).some(u=>u.startsWith("https://svelte.dev/e/")))throw s;return s!==ct&&console.warn("Failed to hydrate: ",s),t.recover===!1&&Jl(),Vr(),So(n),Oe(!1),Ho(e,t)}finally{Oe(r),ce(i)}}var Kn=new Map;function Bo(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0,transformError:u}){Vr();var f=void 0,h=ys(()=>{var p=n??t.appendChild($e());Ls(p,{pending:()=>{}},b=>{lo({});var _=re;if(o&&(_.c=o),i&&(r.$$events=i),C&&Gt(b,null),f=e(b,r)||ni(),C&&(N.nodes.end=P,P===null||P.nodeType!==8||P.data!=="]"))throw hr(),ct;so()},u);var v=new Set,g=b=>{for(var _=0;_<b.length;_++){var T=b[_];if(!v.has(T)){v.add(T);var m=Ws(T);for(let K of[t,document]){var x=Kn.get(K);x===void 0&&(x=new Map,Kn.set(K,x));var U=x.get(T);U===void 0?(K.addEventListener(T,Ii,{passive:m}),x.set(T,1)):x.set(T,U+1)}}}};return g(fr(Do)),Gr.add(g),()=>{for(var b of v)for(let m of[t,document]){var _=Kn.get(m),T=_.get(b);--T==0?(m.removeEventListener(b,Ii),_.delete(b),_.size===0&&Kn.delete(m)):_.set(b,T)}Gr.delete(g),p!==n&&p.parentNode?.removeChild(p)}});return Jr.set(f,h),f}var Jr=new WeakMap;function qs(e,t){let n=Jr.get(e);return n?(Jr.delete(e),n(t)):Promise.resolve()}var Hs=(qe=new WeakMap,Qe=new WeakMap,be=new WeakMap,Pt=new WeakMap,In=new WeakMap,qn=new WeakMap,Nr=new WeakMap,class{constructor(e,t=!0){H(this,"anchor",void 0),E(this,qe,new Map),E(this,Qe,new Map),E(this,be,new Map),E(this,Pt,new Set),E(this,In,!0),E(this,qn,n=>{if(a(qe,this).has(n)){var r=a(qe,this).get(n),i=a(Qe,this).get(r);if(i)cr(i),a(Pt,this).delete(r);else{var o=a(be,this).get(r);o&&(cr(o.effect),a(Qe,this).set(r,o.effect),a(be,this).delete(r),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),i=o.effect)}for(let[s,u]of a(qe,this)){if(a(qe,this).delete(s),s===n)break;let f=a(be,this).get(u);f&&(ie(f.effect),a(be,this).delete(u))}for(let[s,u]of a(Qe,this)){if(s===r||a(Pt,this).has(s))continue;let f=()=>{if(Array.from(a(qe,this).values()).includes(s)){var h=document.createDocumentFragment();hi(u,h),h.append($e()),a(be,this).set(s,{effect:u,fragment:h})}else ie(u);a(Pt,this).delete(s),a(Qe,this).delete(s)};a(In,this)||!i?(a(Pt,this).add(s),Rt(u,f,!1)):f()}}}),E(this,Nr,n=>{a(qe,this).delete(n);let r=Array.from(a(qe,this).values());for(let[i,o]of a(be,this))r.includes(i)||(ie(o.effect),a(be,this).delete(i))}),this.anchor=e,k(In,this,t)}ensure(e,t){var n=W,r=Mo();if(t&&!a(Qe,this).has(e)&&!a(be,this).has(e))if(r){var i=document.createDocumentFragment(),o=$e();i.append(o),a(be,this).set(e,{effect:Me(()=>t(o)),fragment:i})}else a(Qe,this).set(e,Me(()=>t(this.anchor)));if(a(qe,this).set(n,e),r){for(let[s,u]of a(Qe,this))s===e?n.unskip_effect(u):n.skip_effect(u);for(let[s,u]of a(be,this))s===e?n.unskip_effect(u.effect):n.skip_effect(u.effect);n.oncommit(a(qn,this)),n.ondiscard(a(Nr,this))}else C&&(this.anchor=P),a(qn,this).call(this,n)}});function un(e,t,n=!1){var r;C&&(r=P,dr());var i=new Hs(e),o=n?ei:0;function s(u,f){if(C){var h=ti(r);if(u!==parseInt(h.substring(1))){var p=rr();ce(p),i.anchor=p,Oe(!1),i.ensure(u,f),Oe(!0);return}}i.ensure(u,f)}ui(()=>{var u=!1;t((f,h=0)=>{u=!0,s(h,f)}),u||s(-1,null)},o)}function Bs(e,t,n){for(var r=[],i=t.length,o,s=t.length,u=0;u<i;u++){let v=t[u];Rt(v,()=>{if(o){if(o.pending.delete(v),o.done.add(v),o.pending.size===0){var g=e.outrogroups;Yr(e,fr(o.done)),g.delete(o),g.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var f=r.length===0&&n!==null&&e.pending.size===0;if(f){var h=n,p=h.parentNode;So(p),p.append(h),e.items.clear()}Yr(e,t,!f)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function Yr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let s of e.pending.values())for(let u of s)r.add(e.items.get(u).e)}for(var i=0;i<t.length;i++){var o=t[i];r?.has(o)?(o.f|=mn,hi(o,document.createDocumentFragment())):ie(t[i],n)}}var Vn;function Ks(e,t,n,r,i,o=null){var s=e,u=new Map;if(t&4){var f=e;s=C?ce(ft(f)):f.appendChild($e())}C&&dr();var h=null,p=ii(()=>{var m=n();return Yi(m)?m:m==null?[]:fr(m)}),v=new Map,g=!0;function b(m){if(!(T.effect.f&16384)){T.pending.delete(m);var x=l(p);T.fallback=h,Vs(T,x,s,t,r),h!==null&&(x.length===0?h.f&33554432?(h.f^=mn,pn(h,null,s)):cr(h):Rt(h,()=>{h=null}))}}function _(m){T.pending.delete(m)}var T={effect:ui(()=>{var m=l(p),x=m.length;let U=!1;C&&ti(s)==="[!"!=(x===0)&&(s=rr(),ce(s),Oe(!1),U=!0);for(var K=new Set,$=W,j=Mo(),B=0;B<x;B+=1){C&&P.nodeType===8&&P.data==="]"&&(s=P,U=!0,Oe(!1));var ge=m[B],L=r(ge,B),V=g?null:u.get(L);V?(V.v&&Yt(V.v,ge),V.i&&Yt(V.i,B),j&&$.unskip_effect(V.e)):(V=Us(u,g?s:Vn??(Vn=$e()),ge,L,B,i,t,n),g||(V.e.f|=mn),u.set(L,V)),K.add(L)}if(x===0&&o&&!h&&(g?h=Me(()=>o(s)):(h=Me(()=>o(Vn??(Vn=$e()))),h.f|=mn)),x>K.size&&Bl("","",""),C&&x>0&&ce(rr()),!g)if(v.set($,K),j){for(let[fe,G]of u)K.has(fe)||$.skip_effect(G.e);$.oncommit(b),$.ondiscard(_)}else b($);U&&Oe(!0),l(p)}),flags:t,items:u,pending:v,outrogroups:null,fallback:h};g=!1,C&&(s=P)}function fn(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Vs(e,t,n,r,i){var o=!!(r&8),s=t.length,u=e.items,f=fn(e.effect.first),h,p=null,v,g=[],b=[],_,T,m,x;if(o)for(x=0;x<s;x+=1)_=t[x],T=i(_,x),m=u.get(T).e,m.f&33554432||(m.nodes?.a?.measure(),(v??(v=new Set)).add(m));for(x=0;x<s;x+=1){if(_=t[x],T=i(_,x),m=u.get(T).e,e.outrogroups!==null)for(let fe of e.outrogroups)fe.pending.delete(m),fe.done.delete(m);if(m.f&8192&&(cr(m),o&&(m.nodes?.a?.unfix(),(v??(v=new Set)).delete(m))),m.f&33554432)if(m.f^=mn,m===f)pn(m,null,n);else{var U=p?p.next:f;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),ot(e,p,m),ot(e,m,U),pn(m,U,n),p=m,g=[],b=[],f=fn(p.next);continue}if(m!==f){if(h!==void 0&&h.has(m)){if(g.length<b.length){var K=b[0],$;p=K.prev;var j=g[0],B=g[g.length-1];for($=0;$<g.length;$+=1)pn(g[$],K,n);for($=0;$<b.length;$+=1)h.delete(b[$]);ot(e,j.prev,B.next),ot(e,p,j),ot(e,B,K),f=K,p=B,--x,g=[],b=[]}else h.delete(m),pn(m,f,n),ot(e,m.prev,m.next),ot(e,m,p===null?e.effect.first:p.next),ot(e,p,m),p=m;continue}for(g=[],b=[];f!==null&&f!==m;)(h??(h=new Set)).add(f),b.push(f),f=fn(f.next);if(f===null)continue}m.f&33554432||g.push(m),p=m,f=fn(m.next)}if(e.outrogroups!==null){for(let fe of e.outrogroups)fe.pending.size===0&&(Yr(e,fr(fe.done)),e.outrogroups?.delete(fe));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||h!==void 0){var ge=[];if(h!==void 0)for(m of h)m.f&8192||ge.push(m);for(;f!==null;)!(f.f&8192)&&f!==e.fallback&&ge.push(f),f=fn(f.next);var L=ge.length;if(L>0){var V=r&4&&s===0?n:null;if(o){for(x=0;x<L;x+=1)ge[x].nodes?.a?.measure();for(x=0;x<L;x+=1)ge[x].nodes?.a?.fix()}Bs(e,ge,V)}}o&&ut(()=>{if(v!==void 0)for(m of v)m.nodes?.a?.apply()})}function Us(e,t,n,r,i,o,s,u){var f=s&1?s&16?Nt(n):yo(n,!1,!1):null,h=s&2?Nt(i):null;return{v:f,i:h,e:Me(()=>(o(t,f??n,h??i,u),()=>{e.delete(r)}))}}function pn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,o=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var s=Je(r);if(o.before(r),r===i)return;r=s}}function ot(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Gs(e,t){ci(()=>{e=N?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){let i=li("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function zr(e,t,n){ci(()=>{var r=gr(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,o={};vr(()=>{var s=n();Ts(s),i&&io(o,s)&&(o=s,r.update(s))}),i=!0}if(r?.destroy)return()=>r.destroy()})}var Ki=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function Js(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,s=0;(s=r.indexOf(i,s))>=0;){var u=s+o;(s===0||Ki.includes(r[s-1]))&&(u===r.length||Ki.includes(r[u]))?r=(s===0?"":r.substring(0,s))+r.substring(u+1):s=u}}return r===""?null:r}function Vi(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var o=e[i];o!=null&&o!==""&&(r+=" "+i+": "+o+n)}return r}function Lr(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Ys(e,t){if(t){var n="",r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var o=!1,s=0,u=!1,f=[];r&&f.push(...Object.keys(r).map(Lr)),i&&f.push(...Object.keys(i).map(Lr));var h=0,p=-1;let T=e.length;for(var v=0;v<T;v++){var g=e[v];if(u?g==="/"&&e[v-1]==="*"&&(u=!1):o?o===g&&(o=!1):g==="/"&&e[v+1]==="*"?u=!0:g==='"'||g==="'"?o=g:g==="("?s++:g===")"&&s--,!u&&o===!1&&s===0){if(g===":"&&p===-1)p=v;else if(g===";"||v===T-1){if(p!==-1){var b=Lr(e.substring(h,p).trim());if(!f.includes(b)){g!==";"&&v++;var _=e.substring(h,v).trim();n+=" "+_+";"}}h=v+1,p=-1}}}}return r&&(n+=Vi(r)),i&&(n+=Vi(i,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function Dt(e,t,n,r,i,o){var s=e[qr];if(C||s!==n||s===void 0){var u=Js(n,r,o);(!C||u!==e.getAttribute("class"))&&(u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u)),e[qr]=n}else if(o&&i!==o)for(var f in o){var h=!!o[f];(i==null||h!==!!i[f])&&e.classList.toggle(f,h)}return o}function Pr(e,t={},n,r){for(var i in n){var o=n[i];t[i]!==o&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,o,r))}}function Qs(e,t,n,r){var i=e[Hr];if(C||i!==t){var o=Ys(t,r);(!C||o!==e.getAttribute("style"))&&(o==null?e.removeAttribute("style"):e.style.cssText=o),e[Hr]=t}else r&&(Array.isArray(r)?(Pr(e,n?.[0],r[0]),Pr(e,n?.[1],r[1],"important")):Pr(e,n,r));return r}var Xs=Symbol("is custom element"),Zs=Symbol("is html"),ea=Dl?"link":"LINK";function te(e,t,n,r){var i=ta(e);C&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===ea)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[jl]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Ko(e).has(t)?e[t]=n:e.setAttribute(t,n))}function Ft(e,t,n){var r=R,i=N;let o=C;C&&Oe(!1),ue(null),Te(null);try{t!=="style"&&(Qr.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Ko(e).has(t):n&&typeof n=="object")?e[t]=n:te(e,t,n==null?n:String(n))}finally{ue(r),Te(i),o&&Oe(!0)}}function ta(e){return e[Ir]??(e[Ir]={[Xs]:e.nodeName.includes("-"),[Zs]:e.namespaceURI===Nl})}var Qr=new Map;function Ko(e){var t=e.getAttribute("is")||e.nodeName,n=Qr.get(t);if(n)return n;Qr.set(t,n=new Set);for(var r,i=e,o=Element.prototype;o!==i;){for(var s in r=Qi(i),r)r[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&n.add(s);i=Xr(i)}return n}function jr(e,t){return e===t||e?.[Tt]===t}function Ui(e=ni(),t,n,r){var i=re.r,o=N;return ci(()=>{var s,u;return vr(()=>{s=u,u=r?.()||[],gr(()=>{jr(n(...u),e)||(t(e,...u),s&&jr(n(...s),e)&&t(null,...s))})}),()=>{let f=o;for(;f!==i&&f.parent!==null&&f.parent.f&33554432;)f=f.parent;let h=()=>{u&&jr(n(...u),e)&&t(null,...u)},p=f.teardown;f.teardown=()=>{h(),p?.()}}}),e}var Un=!1;function na(e){var t=Un;try{return Un=!1,[e(),Un]}finally{Un=t}}function lt(e,t,n,r){var i=!0,o=!!(n&8),s=!!(n&16),u=r,f=!0,h=void 0,p=()=>s&&i?(h??(h=_n(r)),l(h)):(f&&(f=!1,u=s?gr(r):r),u);let v;if(o){var g=Tt in e||no in e;v=Mt(e,t)?.set??(g&&t in e?$=>e[t]=$:void 0)}var b,_=!1;o?[b,_]=na(()=>e[t]):b=e[t],b===void 0&&r!==void 0&&(b=p(),v&&(i&&Yl(t),v(b)));var T=i?()=>{var $=e[t];return $===void 0?p():(f=!0,$)}:()=>{var $=e[t];return $!==void 0&&(u=void 0),$===void 0?u:$};if(i&&!(n&4))return T;if(v){var m=e.$$legacy;return(function($,j){return arguments.length>0?((!i||!j||m||_)&&v(j?T():$),$):T()})}var x=!1,U=(n&1?_n:ii)(()=>(x=!1,T()));o&&l(U);var K=N;return(function($,j){if(arguments.length>0){let B=j?l(U):i&&o?Bt($):$;return y(U,B),x=!0,u!==void 0&&(u=B),$}return tt&&x||K.f&16384?U.v:l(U)})}function ra(e){return new ia(e)}var ia=(it=new WeakMap,Ae=new WeakMap,class{constructor(e){E(this,it,void 0),E(this,Ae,void 0);var t=new Map,n=(i,o)=>{var s=yo(o,!1,!1);return t.set(i,s),s};let r=new Proxy({...e.props||{},$$events:{}},{get(i,o){return l(t.get(o)??n(o,Reflect.get(i,o)))},has(i,o){return o===no||(l(t.get(o)??n(o,Reflect.get(i,o))),Reflect.has(i,o))},set(i,o,s){return y(t.get(o)??n(o,s),s),Reflect.set(i,o,s)}});k(Ae,this,(e.hydrate?Is:Ho)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError})),(!e?.props?.$$host||e.sync===!1)&&Ke(),k(it,this,r.$$events);for(let i of Object.keys(a(Ae,this)))i!=="$set"&&i!=="$destroy"&&i!=="$on"&&yn(this,i,{get(){return a(Ae,this)[i]},set(o){a(Ae,this)[i]=o},enumerable:!0});a(Ae,this).$set=i=>{Object.assign(r,i)},a(Ae,this).$destroy=()=>{qs(a(Ae,this))}}$set(e){a(Ae,this).$set(e)}$on(e,t){a(it,this)[e]=a(it,this)[e]||[];let n=(...r)=>t.call(this,...r);return a(it,this)[e].push(n),()=>{a(it,this)[e]=a(it,this)[e].filter(r=>r!==n)}}$destroy(){a(Ae,this).$destroy()}}),Vo;typeof HTMLElement=="function"&&(Vo=class extends HTMLElement{constructor(e,t,n){var r=(...i)=>(super(...i),H(this,"$$ctor",void 0),H(this,"$$s",void 0),H(this,"$$c",void 0),H(this,"$$cn",!1),H(this,"$$d",{}),H(this,"$$r",!1),H(this,"$$p_d",{}),H(this,"$$l",{}),H(this,"$$l_u",new Map),H(this,"$$me",void 0),H(this,"$$shadowRoot",null),this);r(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{let o=li("slot");r!=="default"&&(o.name=r),we(i,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let t={},n=oa(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let r of this.attributes){let i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Zn(i,r.value,this.$$p_d,"toProp"))}for(let r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=ra({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ws(()=>{vr(()=>{this.$$r=!0;for(let r of tr(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];let i=Zn(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(let r in this.$$l)for(let i of this.$$l[r]){let o=this.$$c.$on(r,i);this.$$l_u.set(i,o)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Zn(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return tr(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Zn(e,t,n,r){let i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t==null?t:+t;default:return t}}function oa(e){let t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function la(e,t,n,r,i,o){let s=class extends Vo{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return tr(t).map(u=>(t[u].attribute||u).toLowerCase())}};return tr(t).forEach(u=>{yn(s.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(f){f=Zn(u,f,t),this.$$d[u]=f;var h=this.$$c;h&&(Mt(h,u)?.get?h[u]=f:h.$set({[u]:f}))}})}),r.forEach(u=>{yn(s.prototype,u,{get(){return this.$$c?.[u]}})}),o&&(s=o(s)),e.element=s,s}var sa=ht("<nds-icon-button></nds-icon-button>",2),aa=ht('<button type="button"><i aria-hidden="true"></i></button>'),ca=ht('<span class="pie-tool-tts-inline__trigger-zoom svelte-9msc39"><!></span>'),ua=ht('<button type="button" role="radio" data-pie-tts-control="" class="pie-tool-tts-inline__control pie-tool-tts-inline__control--speed svelte-9msc39"><span class="pie-tool-tts-inline__speed-label svelte-9msc39"> </span></button>'),fa=ht('<div role="radiogroup"></div>'),ha=ht('<div role="toolbar" tabindex="-1"><!> <button type="button" data-pie-tts-control="" data-pie-tts-media="" data-pie-tts-seek="" class="pie-tool-tts-inline__control pie-tool-tts-inline__control--secondary svelte-9msc39"><i class="fa-solid fa-backward pie-tool-tts-inline__icon svelte-9msc39" aria-hidden="true"></i></button> <button type="button" data-pie-tts-control="" data-pie-tts-media="" data-pie-tts-seek="" class="pie-tool-tts-inline__control pie-tool-tts-inline__control--secondary svelte-9msc39"><i class="fa-solid fa-forward pie-tool-tts-inline__icon svelte-9msc39" aria-hidden="true"></i></button> <button type="button" data-pie-tts-control="" data-pie-tts-media="" data-pie-tts-stop="" class="pie-tool-tts-inline__control pie-tool-tts-inline__control--secondary svelte-9msc39"><i class="fa-solid fa-stop pie-tool-tts-inline__icon svelte-9msc39" aria-hidden="true"></i></button></div>'),Gi=ht("<!> <!>",1),da=ht('<div><!> <div class="pie-sr-only svelte-9msc39" role="status" aria-live="polite" aria-atomic="true"> </div></div>'),pa={hash:"svelte-9msc39",code:`
|
|
4
4
|
/* Lay the component out as a flex box, not the default inline custom element.
|
|
5
5
|
As \`display: inline\` the host is blockified into a block flex item that
|
|
6
6
|
wraps its content in a line box, so the inline-flex root sits on the text
|
|
@@ -170,4 +170,4 @@ import{t as K}from"./defineProperty-a20a667d.js";import{i as M,n as x,r as W,t a
|
|
|
170
170
|
}.pie-sr-only.svelte-9msc39 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
|
|
171
171
|
|
|
172
172
|
@media (prefers-reduced-motion: reduce) {.pie-tool-tts-inline__control.svelte-9msc39 {transition:none !important;}
|
|
173
|
-
}`};function la(e,t){Xi(t,!0),js(e,oa);let n=fl("tts-inline",ul),r=un(t,"catalogId",7,""),i=un(t,"size",7,"md"),o=un(t,"speedOptions",7,void 0),s=un(t,"showSingleSpeedOption",7,!1),c=un(t,"layoutMode",7,"left-aligned"),f=typeof window<"u",h=/font.?awesome|fa-?pro/i,p=u=>{if(document.querySelector(`link[href="${u}"]`))return;let d=document.createElement("link");d.rel="stylesheet",d.href=u,d.addEventListener("error",()=>{d.dataset.pieLoadFailed=""},{once:!0}),document.head.appendChild(d)},v=()=>{f&&(Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).some(u=>h.test(u.href))||p("https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css"))},m="__pieFaTtsShadowInstalled",g=u=>{let d=u.getRootNode();if(!(d instanceof ShadowRoot))return;let y=d;if(y[m])return;y[m]=!0;let $=new Set,S=N=>{if(!N||$.has(N))return;$.add(N);let q=document.createElement("link");q.rel="stylesheet",q.href=N,d.appendChild(q)},D=Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).filter(N=>h.test(N.href));for(let N of D){if("pieLoadFailed"in N.dataset)continue;if(N.sheet){S(N.href);continue}let q=Nt=>{N.removeEventListener("load",q),N.removeEventListener("error",q),Nt.type==="load"&&S(N.href)};N.addEventListener("load",q),N.addEventListener("error",q)}},k=u=>{v(),g(u);let d=()=>{for(let $ of u.querySelectorAll("i.fa-light"))$.classList.remove("fa-light"),$.classList.add("fa-solid")};d();let y=new MutationObserver(d);return y.observe(u,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),{destroy(){y.disconnect()}}},E=(u,d)=>{let y=d,$=()=>{let D=u.querySelector("button");if(D)for(let[N,q]of Object.entries(y))q==null?D.removeAttribute(N):D.setAttribute(N,q)};$();let S=new MutationObserver($);return S.observe(u,{childList:!0,subtree:!0}),{update(D){y=D,$()},destroy(){S.disconnect()}}},b=u=>(v(),g(u),{}),w=H(void 0),O=H(void 0),j=H(null),L=ne(()=>l(j)?.ndsIcons===!0),R=ne(()=>vl(l(j))),B=H(null),ee=H(null),I=ne(()=>l(j)?.ttsService),Z=ne(()=>l(j)?.highlightCoordinator),Me=ne(()=>l(ee)?.scopeElement||l(B)?.scopeElement||null),te=H(!1),ct=H(!1),fe=H(!1),ze=H(!1),he=H(""),At=H(null),Mn=H(null),et=H(!1),pr=H(!1),Tn=!1,Yt=0,An=null,Le=null,Qt=ne(()=>gl(o())),Xt=ne(()=>jo(l(Qt))),vr=ne(()=>l(Qt).length>1||s()?l(Qt):[]),Zt=ne(()=>l(At)!==null&&l(Mn)===l(Xt)&&l(Qt).some(u=>u.rate===l(At))?l(At):Fo(l(Qt))),En=`pie-tts-inline-instance-${Math.random().toString(36).slice(2)}`,gr=`${En}-controls`;function en(){return l(I)?.getRunOwner()===En}function On(u="",d=!1){_(et,!1),_(fe,!1),_(ze,!1),_(te,d,!0),_(he,u,!0)}function jo(u){return u.map(d=>`${d.rate}:${d.label}:${d.ariaLabel}:${d.isDefault?"1":"0"}`).join("|")}function Fo(u){return u.find(d=>d.isDefault)?.rate??u.find(d=>d.rate===1)?.rate??u[0]?.rate??1}function mr(){if(!l(w)||!l(O))return!1;let u=l(w).getRootNode();if(!(u instanceof ShadowRoot))return!1;let d=u.activeElement;return!!(d&&l(O).contains(d))}function Io(){if(!l(O))return!1;let u=l(O).getRootNode();if(!(u instanceof ShadowRoot))return!1;let d=u.activeElement;return!d||!l(O).contains(d)?!1:d.matches(Ho)}function qo(){let u=l(O)?.querySelector(Bo);if(u&&!u.disabled){u.focus();return}Nn(!0)}function Nn(u){if(!u)return;let d=_r();(d?.querySelector("button")??d)?.focus()}function ai(u=l(R).t("tools.textToSpeech.inline.switchedSection"),d=!1){if(!l(pr)&&l(te)){_(pr,!0);try{let y=mr();Yt+=1,On(u),Et(),d&&queueMicrotask(()=>{Nn(y)})}finally{_(pr,!1)}}}pt(()=>{if(l(w))return pl(l(w),u=>{_(j,u,!0)})}),pt(()=>{if(!l(w))return;let u=hl(l(w),y=>{_(B,y,!0)}),d=dl(l(w),y=>{_(ee,y,!0)});return()=>{d(),u()}}),pt(()=>{let u=l(I);if(!u)return;let d=$=>{if(!l(te)||!en()){_(fe,!1),_(ze,!1);return}_(fe,$==="playing"||$==="paused",!0),_(ze,$==="paused")},y=u.onStateChange($=>{let S=String($),D=Io();(S==="loading"||S==="playing"||S==="paused")&&!Tn&&!en()&&ai(),S==="idle"&&!Tn&&u.getRunOwner()===null&&ai(l(R).t("tools.textToSpeech.inline.stopped"),!0),d(S),S==="playing"&&(l(et)&&en()&&_(he,l(R).t("tools.textToSpeech.inline.started"),!0),_(et,!1)),(S==="error"||S==="idle")&&_(et,!1),D&&!l(fe)&&queueMicrotask(qo)});return d(u.getState()),y}),pt(()=>()=>{Et()});let ci="[data-pie-tts-speed-rate]",br="[data-pie-tts-media]",Ho="[data-pie-tts-seek]",Bo="[data-pie-tts-stop]";function ui(u){return l(O)?Array.from(l(O).querySelectorAll(u)).filter(d=>!d.disabled&&window.getComputedStyle(d).display!=="none"):[]}function wr(u,d){let y=ui(u);if(!y.length)return;let $=y[(d+y.length)%y.length];if($.focus(),u!==ci)return;let S=Number($.dataset.pieTtsSpeedRate),D=l(vr).find(N=>N.rate===S);D&&di(D)}function fi(u,d){let y=ui(u);if(!y.length)return;let $=l(O)?.getRootNode(),S=$ instanceof ShadowRoot?$.activeElement:null,D=S?y.indexOf(S):-1;wr(u,D===-1?0:D+d)}function Wn(u,d){switch(d.key){case"ArrowDown":case"ArrowRight":d.preventDefault(),fi(u,1);break;case"ArrowUp":case"ArrowLeft":d.preventDefault(),fi(u,-1);break;case"Home":d.preventDefault(),wr(u,0);break;case"End":d.preventDefault(),wr(u,-1)}}function Ko(){return l(Me)?ml(l(Me)):null}function Vo(){return l(B)?wl(l(B),l(j)):void 0}function Uo(u,d){Et();let y=u.setHighlightTargetResolverProvider(()=>({context:{scopeElement:l(ee)?.scopeElement||d||null,kind:l(B)?.kind,itemId:l(B)?.itemId,canonicalItemId:l(B)?.canonicalItemId,contentKind:l(B)?.contentKind,regionPolicy:l(B)?.regionPolicy},resolver:l(ee)?.ttsHighlightTargetResolver||null}));return An=y,y}function Et(u=An){u?.(),u===An&&(An=null)}function Jo(u){if(u.getRunOwner()!==En)return!1;let d=String(u.getState());return d==="playing"||d==="paused"||d==="loading"}function Go(u,d){let y=mr();On(l(R).t(_i(u)?"tools.textToSpeech.initFailed":"tools.textToSpeech.inline.startFailed")),l(Z)&&l(Z).clearTTS(),Et(d),y&&queueMicrotask(()=>{Nn(!0)})}function tn(u){_i(u)||bl(l(j)?.toolkitCoordinator,"textToSpeech","tool-playback",u)}function Yo(){let u=l(I);if(!u)return;let d=Ko();if(!d){n.debug("No target container found from shell scope context");return}let y=++Yt,$=!1,S=u.onStateChange(q=>{String(q)==="playing"&&($=!0)});_(te,!0),_(et,!0),_(he,l(R).t("tools.textToSpeech.inline.starting"),!0);let D=Uo(u,d),N;try{N=u.speak(d,{ownerId:En,rate:l(Zt),catalogId:r()||void 0,catalogContext:Vo(),language:l(j)?.contentLanguage||void 0})}catch(q){N=Promise.reject(q)}Le={service:u,choicesKey:l(Xt)},N.then(()=>{y!==Yt||$||String(u.getState())==="idle"&&On(l(R).t("tools.textToSpeech.inline.nothingToRead"))}).catch(q=>{y===Yt&&(tn(q),Go(q,D))}).finally(()=>{S(),Jo(u)||Et(D)})}function hi(){let u=l(I);if(!u)return;let d=en();if(!(l(et)||d&&String(u.getState())==="loading")){if(d&&l(ze)){u.resume(),_(he,l(R).t("tools.textToSpeech.inline.resumed"),!0);return}if(d&&l(fe)&&!l(ze)){u.pause(),_(he,l(R).t("tools.textToSpeech.inline.pausedAnnouncement"),!0);return}Tn=!0;try{Yo()}finally{Tn=!1}}}function Qo(){if(!l(I))return;let u=mr();Yt+=1,l(I).stop(),On(l(R).t("tools.textToSpeech.inline.stopped")),l(Z)&&l(Z).clearTTS(),Et(),u&&queueMicrotask(()=>{Nn(!0)})}async function Xo(){if(l(I)&&l(fe))try{await l(I).seekForward(1),_(he,l(R).t("tools.textToSpeech.inline.skippedForward"),!0)}catch(u){tn(u),_(he,l(R).t("tools.textToSpeech.inline.skipForwardFailed"),!0)}}async function Zo(){if(l(I)&&l(fe))try{await l(I).seekBackward(1),_(he,l(R).t("tools.textToSpeech.inline.skippedBackward"),!0)}catch(u){tn(u),_(he,l(R).t("tools.textToSpeech.inline.skipBackwardFailed"),!0)}}async function di(u){let d=l(I);if(!d)return;if(l(Zt)===u.rate){_(he,l(R).t("tools.textToSpeech.inline.speedAnnounce",{label:u.label}),!0);return}let y=l(At),$=l(Mn);_(At,u.rate,!0),_(Mn,l(Xt),!0),_(he,l(R).t("tools.textToSpeech.inline.speedAnnounce",{label:u.label}),!0);let S={service:d,choicesKey:l(Xt)};Le=S;try{await d.setPlaybackRate(u.rate)}catch(D){Le===S&&(Le=null),tn(D),_(At,y,!0),_(Mn,$,!0),_(he,l(R).t("tools.textToSpeech.inline.speedChangeFailed"),!0)}}let pi=ne(()=>i()==="sm"?"pie-tool-tts-inline__trigger--sm":i()==="lg"?"pie-tool-tts-inline__trigger--lg":"pie-tool-tts-inline__trigger--md"),vi=ne(()=>l(fe)&&!l(ze)?"tools.textToSpeech.inline.pauseA11y":l(ze)?"tools.textToSpeech.inline.resumeA11y":"tools.textToSpeech.inline.playA11y"),gi=ne(()=>c()==="reserved-row"||c()==="expanding-row"),yr=ne(()=>c()==="floating-overlay"),Ot=ne(()=>c()==="left-aligned"),el=ne(()=>l(yr)||l(Ot)),mi="[data-pie-tool-overlay-boundary]",Cn=H(""),Rn=H(0);pt(()=>{let u=l(I),d=l(Xt),y=l(fe)||l(ze);if(!u||!y||!en()||Le?.service===u&&Le.choicesKey===d)return;let $={service:u,choicesKey:d};Le=$;let S=!1;return queueMicrotask(()=>{if(S||Le!==$)return;let D=l(Zt);u.setPlaybackRate(D).catch(N=>{Le===$&&(Le=null),tn(N)})}),()=>{S=!0}});function bi(u,d){let y=u;for(;y;){if(y.matches?.(d))return y;y=y.parentElement??(y.getRootNode()instanceof ShadowRoot?y.getRootNode().host:null)}return null}function _r(){let u=l(w)?.getRootNode();return u instanceof ShadowRoot?u.querySelector(".pie-tool-tts-inline__trigger"):null}function tl(u){let d=window.getComputedStyle(u),y=parseFloat(d.columnGap||d.gap)||0,$=(parseFloat(d.paddingLeft)||0)+(parseFloat(d.paddingRight)||0)+(parseFloat(d.borderLeftWidth)||0)+(parseFloat(d.borderRightWidth)||0),S=Array.from(u.children).filter(D=>window.getComputedStyle(D).display!=="none");return S.length?S.reduce((D,N)=>D+N.offsetWidth,0)+(S.length-1)*y+$:0}function nl(){let u=_r();if(!u||!l(O))return;let d=u.getBoundingClientRect(),y=bi(u,mi),$=y?.getBoundingClientRect().left??0,S=Math.max(0,d.left-$-16);if(!l(ct)){let Y=tl(l(O));Y>0&&_(Rn,Y,!0)}_(ct,l(Rn)>0&&S<l(Rn),!0);let D=parseFloat(window.getComputedStyle(l(O)).minWidth)||0;if(l(ct)&&S<D){let Y=y?.getBoundingClientRect(),ve=Math.max(0,Y?.left??0)+8,De=Math.min(window.innerWidth,Y?.right??window.innerWidth)-8,Pe=Math.max(0,De-ve),Q=Math.min(l(O).offsetWidth,Pe),F=Math.max(ve,Math.min(d.right-Q,De-Q));_(Cn,`top: ${d.bottom+8}px; left: ${F}px; right: auto; min-width: min(7.5rem, ${Pe}px); max-width: min(${Pe}px, var(--pie-tts-left-aligned-panel-width, ${Pe}px));`);return}let N=l(O).offsetHeight||d.height,q=l(ct)?d.top:d.top+d.height/2-N/2,Nt=d.bottom>0&&d.top<window.innerHeight?Math.max(8,Math.min(q,window.innerHeight-N-8)):q,oe=window.innerWidth-d.left+8;_(Cn,`top: ${Nt}px; right: ${oe}px; left: auto; max-width: min(${S}px, var(--pie-tts-left-aligned-panel-width, ${S}px));`)}pt(()=>{if(!(l(Ot)&&l(te))){let N=!1;return queueMicrotask(()=>{N||(_(Cn,""),_(ct,!1),_(Rn,0))}),()=>{N=!0}}if(typeof window>"u")return;let u=0,d=()=>{u||(u=window.requestAnimationFrame(()=>{u=0,nl()}))};d(),window.addEventListener("resize",d),window.addEventListener("scroll",d,!0);let y=_r(),$=new ResizeObserver(d);y&&$.observe(y),l(O)&&$.observe(l(O));let S=y?bi(y,mi):null;S&&$.observe(S);let D=S?.querySelector("[data-pie-tool-overlay-protect]");return D&&$.observe(D),()=>{u&&window.cancelAnimationFrame(u),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0),$.disconnect()}});function rl(){if(!l(w))return null;let u=l(w).getRootNode();return u instanceof ShadowRoot?u.host:null}pt(()=>{let u=rl();if(!u)return;let d=l(te)===!0;if(u.getAttribute("data-active")==="true"===d)return;let y=!1;return queueMicrotask(()=>{y||(u.setAttribute("data-active",d?"true":"false"),u.dispatchEvent(new CustomEvent("pie-tool-active-change",{detail:{active:d},bubbles:!0,composed:!0})))}),()=>{y=!0}});var il={get catalogId(){return r()},set catalogId(u=""){r(u),jt()},get size(){return i()},set size(u="md"){i(u),jt()},get speedOptions(){return o()},set speedOptions(u=void 0){o(u),jt()},get showSingleSpeedOption(){return s()},set showSingleSpeedOption(u=!1){s(u),jt()},get layoutMode(){return c()},set layoutMode(u="left-aligned"){c(u),jt()}},wi=Ri(),ol=In(wi),ll=u=>{var d=ia();let y;{let q=oe=>{var Y=ea(),ve=hn(Y),De=Q=>{var F=Xs();zt(F,"type","circle"),zt(F,"size","small"),zt(F,"variant","tertiary"),qe(()=>zt(F,"icon-name",l(fe)&&!l(ze)?"pause":"play")),qe(je=>zt(F,"button-aria-label",je),[()=>l(R).t(l(vi))]),qe(()=>zt(F,"disabled",!l(I))),Er(F,je=>k?.(je)),Er(F,(je,ut)=>E?.(je,ut),()=>({"aria-expanded":l(te)?"true":"false","aria-controls":l(te)?gr:null,"aria-pressed":l(te)?"true":"false","aria-busy":l(et)?"true":null})),qe(()=>Rt(F,1,`pie-tool-tts-inline__trigger ${l(pi)??""}`,"svelte-9msc39")),He("click",F,hi),me(Q,F)},Pe=Q=>{var F=Zs(),je=Mr(F);Er(F,ut=>b?.(ut)),qe(ut=>{Rt(F,1,`pie-tool-tts-inline__control pie-tool-tts-inline__trigger pie-tool-tts-inline__trigger--plain ${l(pi)??""}`,"svelte-9msc39"),X(F,"aria-expanded",l(te)?"true":"false"),X(F,"aria-controls",l(te)?gr:void 0),X(F,"aria-pressed",l(te)?"true":"false"),X(F,"aria-label",ut),X(F,"aria-busy",l(et)?"true":void 0),F.disabled=!l(I),Rt(je,1,`fa-solid ${l(fe)&&!l(ze)?"fa-pause":"fa-play"} pie-tool-tts-inline__icon`,"svelte-9msc39")},[()=>l(R).t(l(vi))]),He("click",F,hi),me(Q,F)};an(ve,Q=>{l(L)?Q(De):Q(Pe,-1)}),Dt(Y),me(oe,Y)},Nt=oe=>{var Y=Ri(),ve=In(Y),De=Pe=>{var Q=ra();let F;var je=hn(Q),ut=de=>{var ft=na();let Ln;Ls(ft,21,()=>l(vr),ht=>ht.rate,(ht,dt)=>{var Fe=ta(),yi=hn(Fe),sl=Mr(yi,!0);Dt(Fe),qe(()=>{X(Fe,"data-pie-tts-speed-rate",l(dt).rate),X(Fe,"tabindex",l(Zt)===l(dt).rate?0:-1),X(Fe,"aria-label",l(dt).ariaLabel),X(Fe,"aria-checked",l(Zt)===l(dt).rate),Fe.disabled=!l(I),X(yi,"data-label",l(dt).label),Li(sl,l(dt).label)}),He("click",Fe,()=>di(l(dt))),He("keydown",Fe,al=>Wn(ci,al)),me(ht,Fe)}),Dt(ft),qe(ht=>{Ln=Rt(ft,1,"pie-tool-tts-inline__speed-group svelte-9msc39",null,Ln,{"pie-tool-tts-inline__speed-group--stacked":l(ct)}),X(ft,"aria-label",ht)},[()=>l(R).t("tools.textToSpeech.inline.playbackSpeedA11y")]),me(de,ft)};an(je,de=>{l(vr).length>0&&de(ut)});var nn=Ct(je,2),rn=Ct(nn,2),zn=Ct(rn,2);Dt(Q),ji(Q,de=>_(O,de),()=>l(O)),qe((de,ft,Ln,ht)=>{X(Q,"id",gr),F=Rt(Q,1,"pie-tool-tts-inline__panel svelte-9msc39",null,F,{"pie-tool-tts-inline__panel--floating":l(yr),"pie-tool-tts-inline__panel--row":l(gi),"pie-tool-tts-inline__panel--left-aligned-inline":l(Ot),"pie-tool-tts-inline__panel--compact":l(Ot)&&l(ct)}),qs(Q,l(Ot)?l(Cn):""),X(Q,"aria-label",de),X(nn,"aria-label",ft),nn.disabled=!l(I)||!l(fe),X(rn,"aria-label",Ln),rn.disabled=!l(I)||!l(fe),X(zn,"aria-label",ht),zn.disabled=!l(I)},[()=>l(R).t("tools.textToSpeech.inline.controlsA11y"),()=>l(R).t("tools.textToSpeech.inline.rewindA11y"),()=>l(R).t("tools.textToSpeech.inline.fastForwardA11y"),()=>l(R).t("tools.textToSpeech.inline.stopA11y")]),He("click",nn,Zo),He("keydown",nn,de=>Wn(br,de)),He("click",rn,Xo),He("keydown",rn,de=>Wn(br,de)),He("click",zn,Qo),He("keydown",zn,de=>Wn(br,de)),me(Pe,Q)};an(ve,Pe=>{l(te)&&Pe(De)}),me(oe,Y)};var $=hn(d),S=oe=>{var Y=Fi(),ve=In(Y);Nt(ve);var De=Ct(ve,2);q(De),me(oe,Y)},D=oe=>{var Y=Fi(),ve=In(Y);q(ve);var De=Ct(ve,2);Nt(De),me(oe,Y)};an($,oe=>{l(el)?oe(S):oe(D,-1)});var N=Mr(Ct($,2),!0);Dt(d),ji(d,oe=>_(w,oe),()=>l(w)),qe(()=>Li(N,l(he)))}qe(()=>y=Rt(d,1,"pie-tool-tts-inline svelte-9msc39",null,y,{"pie-tool-tts-inline--controls-row":l(gi),"pie-tool-tts-inline--floating":l(yr),"pie-tool-tts-inline--left-aligned":l(Ot)})),me(u,d)};return an(ol,u=>{f&&u(ll)}),me(e,wi),Zi(il)}ws(["click","keydown"]),sa("pie-tool-tts-inline",Qs(la,{catalogId:{attribute:"catalog-id",type:"String"},size:{attribute:"size",type:"String"},speedOptions:{attribute:"speed-options",type:"Array"},showSingleSpeedOption:{attribute:"show-single-speed-option",type:"Boolean"},layoutMode:{attribute:"layout-mode",type:"String"}},[],[],{mode:"open"},cl));function sa(e,t){customElements.get(e)||customElements.define(e,t)}export{la as default};
|
|
173
|
+
}`};function va(e,t){lo(t,!0),Gs(e,pa);let n=_l("tts-inline",yl),r=lt(t,"catalogId",7,""),i=lt(t,"size",7,"md"),o=lt(t,"speedOptions",7,void 0),s=lt(t,"showSingleSpeedOption",7,!1),u=lt(t,"layoutMode",7,"left-aligned"),f=lt(t,"baseRate",7,1),h=lt(t,"pitch",7,void 0),p=lt(t,"volume",7,void 0),v=typeof window<"u",g=/font.?awesome|fa-?pro/i,b=c=>{if(document.querySelector(`link[href="${c}"]`))return;let d=document.createElement("link");d.rel="stylesheet",d.href=c,d.addEventListener("error",()=>{d.dataset.pieLoadFailed=""},{once:!0}),document.head.appendChild(d)},_=()=>{v&&(Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).some(c=>g.test(c.href))||b("https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css"))},T="__pieFaTtsShadowInstalled",m=c=>{let d=c.getRootNode();if(!(d instanceof ShadowRoot))return;let w=d;if(w[T])return;w[T]=!0;let S=new Set,A=O=>{if(!O||S.has(O))return;S.add(O);let I=document.createElement("link");I.rel="stylesheet",I.href=O,d.appendChild(I)},z=Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).filter(O=>g.test(O.href));for(let O of z){if("pieLoadFailed"in O.dataset)continue;if(O.sheet){A(O.href);continue}let I=Lt=>{O.removeEventListener("load",I),O.removeEventListener("error",I),Lt.type==="load"&&A(O.href)};O.addEventListener("load",I),O.addEventListener("error",I)}},x=c=>{_(),m(c);let d=()=>{for(let S of c.querySelectorAll("i.fa-light"))S.classList.remove("fa-light"),S.classList.add("fa-solid")};d();let w=new MutationObserver(d);return w.observe(c,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),{destroy(){w.disconnect()}}},U=(c,d)=>{let w=d,S=()=>{let z=c.querySelector("button");if(z)for(let[O,I]of Object.entries(w))I==null?z.removeAttribute(O):z.setAttribute(O,I)};S();let A=new MutationObserver(S);return A.observe(c,{childList:!0,subtree:!0}),{update(z){w=z,S()},destroy(){A.disconnect()}}},K=c=>(_(),m(c),{}),$=q(void 0),j=q(void 0),B=q(null),ge=J(()=>l(B)?.ndsIcons===!0),L=J(()=>Sl(l(B))),V=q(null),fe=q(null),G=J(()=>l(B)?.ttsService),Tn=J(()=>l(B)?.highlightCoordinator),pi=J(()=>l(fe)?.scopeElement||l(V)?.scopeElement||null),he=q(!1),dt=q(!1),oe=q(!1),Le=q(!1),de=q(""),Wt=q(null),An=q(null),nt=q(!1),mr=q(!1),En=!1,en=0,Nn=null,Pe=null,tn=J(()=>Ml(o())),br=J(()=>Jo(l(tn))),wr=J(()=>l(tn).length>1||s()?l(tn):[]),On=J(()=>l(Wt)!==null&&l(An)===l(br)&&l(tn).some(c=>c.rate===l(Wt))?l(Wt):Yo(l(tn))),yr=J(()=>typeof f()=="number"&&Number.isFinite(f())&&f()>0?f():1),vi=J(()=>l(On)*l(yr)),_r=J(()=>`${l(br)}@${l(yr)}`),Uo=J(()=>gi(h(),0,2)),Go=J(()=>gi(p(),0,1)),Rn=`pie-tts-inline-instance-${Math.random().toString(36).slice(2)}`,kr=`${Rn}-controls`;function nn(){return l(G)?.getRunOwner()===Rn}function Wn(c="",d=!1){y(nt,!1),y(oe,!1),y(Le,!1),y(he,d,!0),y(de,c,!0)}function Jo(c){return c.map(d=>`${d.rate}:${d.label}:${d.ariaLabel}:${d.isDefault?"1":"0"}`).join("|")}function gi(c,d,w){return typeof c=="number"&&Number.isFinite(c)?Math.min(w,Math.max(d,c)):void 0}function Yo(c){return c.find(d=>d.isDefault)?.rate??c.find(d=>d.rate===1)?.rate??c[0]?.rate??1}function xr(){if(!l($)||!l(j))return!1;let c=l($).getRootNode();if(!(c instanceof ShadowRoot))return!1;let d=c.activeElement;return!!(d&&l(j).contains(d))}function Qo(){if(!l(j))return!1;let c=l(j).getRootNode();if(!(c instanceof ShadowRoot))return!1;let d=c.activeElement;return!d||!l(j).contains(d)?!1:d.matches(Zo)}function Xo(){let c=l(j)?.querySelector(el);if(c&&!c.disabled){c.focus();return}Cn(!0)}function Cn(c){if(!c)return;let d=Tr();(d?.querySelector("button")??d)?.focus()}function mi(c=l(L).t("tools.textToSpeech.inline.switchedSection"),d=!1){if(!l(mr)&&l(he)){y(mr,!0);try{let w=xr();en+=1,Wn(c),Ct(),d&&queueMicrotask(()=>{Cn(w)})}finally{y(mr,!1)}}}bt(()=>{if(l($))return $l(l($),c=>{y(B,c,!0)})}),bt(()=>{if(!l($))return;let c=kl(l($),w=>{y(V,w,!0)}),d=xl(l($),w=>{y(fe,w,!0)});return()=>{d(),c()}}),bt(()=>{let c=l(G);if(!c)return;let d=S=>{if(!l(he)||!nn()){y(oe,!1),y(Le,!1);return}y(oe,S==="playing"||S==="paused"||S==="loading"&&l(oe),!0),y(Le,S==="paused")},w=c.onStateChange(S=>{let A=String(S),z=Qo();(A==="loading"||A==="playing"||A==="paused")&&!En&&!nn()&&mi(),A==="idle"&&!En&&c.getRunOwner()===null&&mi(l(L).t("tools.textToSpeech.inline.stopped"),!0),d(A),A==="playing"&&(l(nt)&&nn()&&y(de,l(L).t("tools.textToSpeech.inline.started"),!0),y(nt,!1)),(A==="error"||A==="idle")&&y(nt,!1),z&&!l(oe)&&queueMicrotask(Xo)});return d(c.getState()),w}),bt(()=>()=>{Ct()});let bi="[data-pie-tts-speed-rate]",$r="[data-pie-tts-media]",Zo="[data-pie-tts-seek]",el="[data-pie-tts-stop]";function wi(c){return l(j)?Array.from(l(j).querySelectorAll(c)).filter(d=>!d.disabled&&window.getComputedStyle(d).display!=="none"):[]}function Sr(c,d){let w=wi(c);if(!w.length)return;let S=w[(d+w.length)%w.length];if(S.focus(),c!==bi)return;let A=Number(S.dataset.pieTtsSpeedRate),z=l(wr).find(O=>O.rate===A);z&&ki(z)}function yi(c,d){let w=wi(c);if(!w.length)return;let S=l(j)?.getRootNode(),A=S instanceof ShadowRoot?S.activeElement:null,z=A?w.indexOf(A):-1;Sr(c,z===-1?0:z+d)}function zn(c,d){switch(d.key){case"ArrowDown":case"ArrowRight":d.preventDefault(),yi(c,1);break;case"ArrowUp":case"ArrowLeft":d.preventDefault(),yi(c,-1);break;case"Home":d.preventDefault(),Sr(c,0);break;case"End":d.preventDefault(),Sr(c,-1)}}function tl(){return l(pi)?Tl(l(pi)):null}function nl(){return l(V)?El(l(V),l(B)):void 0}function rl(c,d){Ct();let w=c.setHighlightTargetResolverProvider(()=>({context:{scopeElement:l(fe)?.scopeElement||d||null,kind:l(V)?.kind,itemId:l(V)?.itemId,canonicalItemId:l(V)?.canonicalItemId,contentKind:l(V)?.contentKind,regionPolicy:l(V)?.regionPolicy},resolver:l(fe)?.ttsHighlightTargetResolver||null}));return Nn=w,w}function Ct(c=Nn){c?.(),c===Nn&&(Nn=null)}function il(c){if(c.getRunOwner()!==Rn)return!1;let d=String(c.getState());return d==="playing"||d==="paused"||d==="loading"}function ol(c,d){let w=xr();Wn(l(L).t(Ni(c)?"tools.textToSpeech.initFailed":"tools.textToSpeech.inline.startFailed")),l(Tn)&&l(Tn).clearTTS(),Ct(d),w&&queueMicrotask(()=>{Cn(!0)})}function rn(c){Ni(c)||Al(l(B)?.toolkitCoordinator,"textToSpeech","tool-playback",c)}function ll(){let c=l(G);if(!c)return;let d=tl();if(!d){n.debug("No target container found from shell scope context");return}let w=++en,S=!1,A=c.onStateChange(I=>{String(I)==="playing"&&(S=!0)});y(he,!0),y(nt,!0),y(de,l(L).t("tools.textToSpeech.inline.starting"),!0);let z=rl(c,d),O;try{O=c.speak(d,{ownerId:Rn,rate:l(vi),pitch:l(Uo),volume:l(Go),catalogId:r()||void 0,catalogContext:nl(),language:l(B)?.contentLanguage||void 0})}catch(I){O=Promise.reject(I)}Pe={service:c,choicesKey:l(_r)},O.then(()=>{w!==en||S||String(c.getState())==="idle"&&Wn(l(L).t("tools.textToSpeech.inline.nothingToRead"))}).catch(I=>{w===en&&(rn(I),ol(I,z))}).finally(()=>{A(),il(c)||Ct(z)})}function _i(){let c=l(G);if(!c)return;let d=nn();if(!(l(nt)||d&&String(c.getState())==="loading")){if(d&&l(Le)){c.resume(),y(de,l(L).t("tools.textToSpeech.inline.resumed"),!0);return}if(d&&l(oe)&&!l(Le)){c.pause(),y(de,l(L).t("tools.textToSpeech.inline.pausedAnnouncement"),!0);return}En=!0;try{ll()}finally{En=!1}}}function sl(){if(!l(G))return;let c=xr();en+=1,l(G).stop(),Wn(l(L).t("tools.textToSpeech.inline.stopped")),l(Tn)&&l(Tn).clearTTS(),Ct(),c&&queueMicrotask(()=>{Cn(!0)})}async function al(){if(l(G)&&l(oe))try{await l(G).seekForward(1),y(de,l(L).t("tools.textToSpeech.inline.skippedForward"),!0)}catch(c){rn(c),y(de,l(L).t("tools.textToSpeech.inline.skipForwardFailed"),!0)}}async function cl(){if(l(G)&&l(oe))try{await l(G).seekBackward(1),y(de,l(L).t("tools.textToSpeech.inline.skippedBackward"),!0)}catch(c){rn(c),y(de,l(L).t("tools.textToSpeech.inline.skipBackwardFailed"),!0)}}async function ki(c){let d=l(G);if(!d)return;if(l(On)===c.rate){y(de,l(L).t("tools.textToSpeech.inline.speedAnnounce",{label:c.label}),!0);return}let w=l(Wt),S=l(An);y(Wt,c.rate,!0),y(An,l(br),!0),y(de,l(L).t("tools.textToSpeech.inline.speedAnnounce",{label:c.label}),!0);let A={service:d,choicesKey:l(_r)};Pe=A;try{await d.setPlaybackRate(c.rate*l(yr))}catch(z){Pe===A&&(Pe=null),rn(z),y(Wt,w,!0),y(An,S,!0),y(de,l(L).t("tools.textToSpeech.inline.speedChangeFailed"),!0)}}let xi=J(()=>i()==="sm"?"pie-tool-tts-inline__trigger--sm":i()==="lg"?"pie-tool-tts-inline__trigger--lg":"pie-tool-tts-inline__trigger--md"),$i=J(()=>l(oe)&&!l(Le)?"tools.textToSpeech.inline.pauseA11y":l(Le)?"tools.textToSpeech.inline.resumeA11y":"tools.textToSpeech.inline.playA11y"),Si=J(()=>u()==="reserved-row"||u()==="expanding-row"),Mr=J(()=>u()==="floating-overlay"),zt=J(()=>u()==="left-aligned"),ul=J(()=>l(Mr)||l(zt)),Mi="[data-pie-tool-overlay-boundary]",Ln=q(""),Pn=q(0);bt(()=>{let c=l(G),d=l(_r),w=l(oe)||l(Le);if(!c||!w||!nn()||Pe?.service===c&&Pe.choicesKey===d)return;let S={service:c,choicesKey:d};Pe=S;let A=!1;return queueMicrotask(()=>{if(A||Pe!==S)return;let z=l(vi);c.setPlaybackRate(z).catch(O=>{Pe===S&&(Pe=null),rn(O)})}),()=>{A=!0}});function Ti(c,d){let w=c;for(;w;){if(w.matches?.(d))return w;w=w.parentElement??(w.getRootNode()instanceof ShadowRoot?w.getRootNode().host:null)}return null}function Tr(){let c=l($)?.getRootNode();return c instanceof ShadowRoot?c.querySelector(".pie-tool-tts-inline__trigger"):null}function fl(c){let d=window.getComputedStyle(c),w=parseFloat(d.columnGap||d.gap)||0,S=(parseFloat(d.paddingLeft)||0)+(parseFloat(d.paddingRight)||0)+(parseFloat(d.borderLeftWidth)||0)+(parseFloat(d.borderRightWidth)||0),A=Array.from(c.children).filter(z=>window.getComputedStyle(z).display!=="none");return A.length?A.reduce((z,O)=>z+O.offsetWidth,0)+(A.length-1)*w+S:0}function hl(){let c=Tr();if(!c||!l(j))return;let d=c.getBoundingClientRect(),w=Ti(c,Mi),S=w?.getBoundingClientRect().left??0,A=Math.max(0,d.left-S-16);if(!l(dt)){let Z=fl(l(j));Z>0&&y(Pn,Z,!0)}y(dt,l(Pn)>0&&A<l(Pn),!0);let z=parseFloat(window.getComputedStyle(l(j)).minWidth)||0;if(l(dt)&&A<z){let Z=w?.getBoundingClientRect(),me=Math.max(0,Z?.left??0)+8,je=Math.min(window.innerWidth,Z?.right??window.innerWidth)-8,De=Math.max(0,je-me),ee=Math.min(l(j).offsetWidth,De),D=Math.max(me,Math.min(d.right-ee,je-ee));y(Ln,`top: ${d.bottom+8}px; left: ${D}px; right: auto; min-width: min(7.5rem, ${De}px); max-width: min(${De}px, var(--pie-tts-left-aligned-panel-width, ${De}px));`);return}let O=l(j).offsetHeight||d.height,I=l(dt)?d.top:d.top+d.height/2-O/2,Lt=d.bottom>0&&d.top<window.innerHeight?Math.max(8,Math.min(I,window.innerHeight-O-8)):I,le=window.innerWidth-d.left+8;y(Ln,`top: ${Lt}px; right: ${le}px; left: auto; max-width: min(${A}px, var(--pie-tts-left-aligned-panel-width, ${A}px));`)}bt(()=>{if(!(l(zt)&&l(he))){let O=!1;return queueMicrotask(()=>{O||(y(Ln,""),y(dt,!1),y(Pn,0))}),()=>{O=!0}}if(typeof window>"u")return;let c=0,d=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,hl()}))};d(),window.addEventListener("resize",d),window.addEventListener("scroll",d,!0);let w=Tr(),S=new ResizeObserver(d);w&&S.observe(w),l(j)&&S.observe(l(j));let A=w?Ti(w,Mi):null;A&&S.observe(A);let z=A?.querySelector("[data-pie-tool-overlay-protect]");return z&&S.observe(z),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0),S.disconnect()}});function dl(){if(!l($))return null;let c=l($).getRootNode();return c instanceof ShadowRoot?c.host:null}bt(()=>{let c=dl();if(!c)return;let d=l(he)===!0;if(c.getAttribute("data-active")==="true"===d)return;let w=!1;return queueMicrotask(()=>{w||(c.setAttribute("data-active",d?"true":"false"),c.dispatchEvent(new CustomEvent("pie-tool-active-change",{detail:{active:d},bubbles:!0,composed:!0})))}),()=>{w=!0}});var pl={get catalogId(){return r()},set catalogId(c=""){r(c),Ke()},get size(){return i()},set size(c="md"){i(c),Ke()},get speedOptions(){return o()},set speedOptions(c=void 0){o(c),Ke()},get showSingleSpeedOption(){return s()},set showSingleSpeedOption(c=!1){s(c),Ke()},get layoutMode(){return u()},set layoutMode(c="left-aligned"){u(c),Ke()},get baseRate(){return f()},set baseRate(c=1){f(c),Ke()},get pitch(){return h()},set pitch(c=void 0){h(c),Ke()},get volume(){return p()},set volume(c=void 0){p(c),Ke()}},Ai=qi(),vl=Bn(Ai),gl=c=>{var d=da();let w;{let I=le=>{var Z=ca(),me=dn(Z),je=ee=>{var D=sa();Ft(D,"type","circle"),Ft(D,"size","small"),Ft(D,"variant","tertiary"),He(()=>Ft(D,"icon-name",l(oe)&&!l(Le)?"pause":"play")),He(Fe=>Ft(D,"button-aria-label",Fe),[()=>l(L).t(l($i))]),He(()=>Ft(D,"disabled",!l(G))),zr(D,Fe=>x?.(Fe)),zr(D,(Fe,pt)=>U?.(Fe,pt),()=>({"aria-expanded":l(he)?"true":"false","aria-controls":l(he)?kr:null,"aria-pressed":l(he)?"true":"false","aria-busy":l(nt)?"true":null})),He(()=>Dt(D,1,`pie-tool-tts-inline__trigger ${l(xi)??""}`,"svelte-9msc39")),Be("click",D,_i),we(ee,D)},De=ee=>{var D=aa(),Fe=Rr(D);zr(D,pt=>K?.(pt)),He(pt=>{Dt(D,1,`pie-tool-tts-inline__control pie-tool-tts-inline__trigger pie-tool-tts-inline__trigger--plain ${l(xi)??""}`,"svelte-9msc39"),te(D,"aria-expanded",l(he)?"true":"false"),te(D,"aria-controls",l(he)?kr:void 0),te(D,"aria-pressed",l(he)?"true":"false"),te(D,"aria-label",pt),te(D,"aria-busy",l(nt)?"true":void 0),D.disabled=!l(G),Dt(Fe,1,`fa-solid ${l(oe)&&!l(Le)?"fa-pause":"fa-play"} pie-tool-tts-inline__icon`,"svelte-9msc39")},[()=>l(L).t(l($i))]),Be("click",D,_i),we(ee,D)};un(me,ee=>{l(ge)?ee(je):ee(De,-1)}),qt(Z),we(le,Z)},Lt=le=>{var Z=qi(),me=Bn(Z),je=De=>{var ee=ha();let D;var Fe=dn(ee),pt=pe=>{var vt=fa();let Dn;Ks(vt,21,()=>l(wr),gt=>gt.rate,(gt,mt)=>{var Ie=ua(),Ei=dn(Ie),ml=Rr(Ei,!0);qt(Ie),He(()=>{te(Ie,"data-pie-tts-speed-rate",l(mt).rate),te(Ie,"tabindex",l(On)===l(mt).rate?0:-1),te(Ie,"aria-label",l(mt).ariaLabel),te(Ie,"aria-checked",l(On)===l(mt).rate),Ie.disabled=!l(G),te(Ei,"data-label",l(mt).label),Bi(ml,l(mt).label)}),Be("click",Ie,()=>ki(l(mt))),Be("keydown",Ie,bl=>zn(bi,bl)),we(gt,Ie)}),qt(vt),He(gt=>{Dn=Dt(vt,1,"pie-tool-tts-inline__speed-group svelte-9msc39",null,Dn,{"pie-tool-tts-inline__speed-group--stacked":l(dt)}),te(vt,"aria-label",gt)},[()=>l(L).t("tools.textToSpeech.inline.playbackSpeedA11y")]),we(pe,vt)};un(Fe,pe=>{l(wr).length>0&&pe(pt)});var on=jt(Fe,2),ln=jt(on,2),jn=jt(ln,2);qt(ee),Ui(ee,pe=>y(j,pe),()=>l(j)),He((pe,vt,Dn,gt)=>{te(ee,"id",kr),D=Dt(ee,1,"pie-tool-tts-inline__panel svelte-9msc39",null,D,{"pie-tool-tts-inline__panel--floating":l(Mr),"pie-tool-tts-inline__panel--row":l(Si),"pie-tool-tts-inline__panel--left-aligned-inline":l(zt),"pie-tool-tts-inline__panel--compact":l(zt)&&l(dt)}),Qs(ee,l(zt)?l(Ln):""),te(ee,"aria-label",pe),te(on,"aria-label",vt),on.disabled=!l(G)||!l(oe),te(ln,"aria-label",Dn),ln.disabled=!l(G)||!l(oe),te(jn,"aria-label",gt),jn.disabled=!l(G)},[()=>l(L).t("tools.textToSpeech.inline.controlsA11y"),()=>l(L).t("tools.textToSpeech.inline.rewindA11y"),()=>l(L).t("tools.textToSpeech.inline.fastForwardA11y"),()=>l(L).t("tools.textToSpeech.inline.stopA11y")]),Be("click",on,cl),Be("keydown",on,pe=>zn($r,pe)),Be("click",ln,al),Be("keydown",ln,pe=>zn($r,pe)),Be("click",jn,sl),Be("keydown",jn,pe=>zn($r,pe)),we(De,ee)};un(me,De=>{l(he)&&De(je)}),we(le,Z)};var S=dn(d),A=le=>{var Z=Gi(),me=Bn(Z);Lt(me);var je=jt(me,2);I(je),we(le,Z)},z=le=>{var Z=Gi(),me=Bn(Z);I(me);var je=jt(me,2);Lt(je),we(le,Z)};un(S,le=>{l(ul)?le(A):le(z,-1)});var O=Rr(jt(S,2),!0);qt(d),Ui(d,le=>y($,le),()=>l($)),He(()=>Bi(O,l(de)))}He(()=>w=Dt(d,1,"pie-tool-tts-inline svelte-9msc39",null,w,{"pie-tool-tts-inline--controls-row":l(Si),"pie-tool-tts-inline--floating":l(Mr),"pie-tool-tts-inline--left-aligned":l(zt)})),we(c,d)};return un(vl,c=>{v&&c(gl)}),we(e,Ai),so(pl)}As(["click","keydown"]),ga("pie-tool-tts-inline",la(va,{catalogId:{attribute:"catalog-id",type:"String"},size:{attribute:"size",type:"String"},speedOptions:{attribute:"speed-options",type:"Array"},showSingleSpeedOption:{attribute:"show-single-speed-option",type:"Boolean"},layoutMode:{attribute:"layout-mode",type:"String"},baseRate:{attribute:"base-rate",type:"Number"},pitch:{attribute:"pitch",type:"Number"},volume:{attribute:"volume",type:"Number"}},[],[],{mode:"open"},wl));function ga(e,t){customElements.get(e)||customElements.define(e,t)}export{va as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var l=/[^A-Za-z0-9\-._~@/]/gu,E=new Set([".",".."]),v=e=>{const r=e.replace(l,t=>encodeURIComponent(t)),n=r.split("/");return n.some(t=>E.has(t))?n.join("%2F"):r},P=e=>Array.from(e,v).join("+"),d=e=>{if(!e)throw new Error("Parameter is required: input");const r=e.charAt(0)==="@"?e.match(/^(@[^/]+\/[^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/):e.match(/^([^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/);if(!r)throw new Error(`[parse-package-name] "${e}" is not a valid string`);return{name:r[1],path:r[2]||"",version:r[3]||""}},A=e=>e.split("+").map(r=>d(r).name).join("+");function p(e,r=f()){const n=e?.elements;if(!r||!n||typeof n!="object")return e;let t=!1;const s={};for(const[o,a]of Object.entries(n)){const i=String(a),c=m(i,r);s[o]=c??i,c!==void 0&&c!==i&&(t=!0)}return t?{...e,elements:s}:e}function m(e,r){let n;try{n=d(e).name}catch{return}const t=r[n];return typeof t=="string"&&t.length>0?t:void 0}function f(){if(typeof window>"u")return;const e=window.PIE_PRELOADED_ELEMENTS;return e&&typeof e=="object"?e:void 0}var u="--version-",g="[0-9A-Za-z-]+",h=e=>e.trim().replace(/[.+]/g,"-").replace(/[^0-9A-Za-z-]/g,"-").replace(/-{2,}/g,"-");function T(e){const r=e.match(new RegExp(`${u}(${g})$`));return!r||r.index===void 0?{baseName:e}:{baseName:e.slice(0,r.index),existingEncodedVersion:r[1]}}function S(e,r,n={}){const{version:t}=d(r);if(!t.trim()&&n.preserveUnversionedTag)return e;const s=h(t),{baseName:o,existingEncodedVersion:a}=T(e);return a===s?e:`${o}${u}${s}`}function w(e,r){if(!r)return[e];let n;try{const{elements:t}=p({elements:{[e]:r}});n=S(e,t[e],{preserveUnversionedTag:!0})}catch{return[e]}return n===e?[e]:[n,e]}export{P as a,p as i,w as n,A as o,S as r,d as s,T as t};
|