@htmlbricks/hb-modal-video 0.66.4 → 0.66.5

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/main.iife.js CHANGED
@@ -1,3 +1,3 @@
1
1
  (function(Nt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Ln=1,In=2,kt="[",At="[!",Rt="[?",Ot="]",ye={},x=Symbol(),Ct="http://www.w3.org/1999/xhtml",Fn=!1;var jn=Array.isArray,Yn=Array.prototype.indexOf,$e=Array.prototype.includes,Hn=Array.from,Be=Object.keys,Ve=Object.defineProperty,be=Object.getOwnPropertyDescriptor,Bn=Object.getOwnPropertyDescriptors,Vn=Object.prototype,qn=Array.prototype,Mt=Object.getPrototypeOf,Pt=Object.isExtensible;const Un=()=>{};function zn(e){for(var t=0;t<e.length;t++)e[t]()}function Dt(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const S=2,Ee=4,qe=8,Lt=1<<24,ee=16,G=32,te=64,st=128,C=512,T=1024,N=2048,B=4096,V=8192,L=16384,ae=32768,It=1<<25,Te=65536,Ft=1<<17,Gn=1<<18,ue=1<<19,Kn=1<<20,ce=65536,lt=1<<21,ot=1<<22,ne=1<<23,ft=Symbol("$state"),Wn=Symbol("legacy props"),Jn=Symbol(""),K=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Xn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Ue=3,ze=8;function Zn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function er(){throw new Error("https://svelte.dev/e/hydration_failed")}function tr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function nr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function rr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ir(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Ge(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function sr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let y=!1;function re(e){y=e}let m;function I(e){if(e===null)throw Ge(),ye;return m=e}function Ke(){return I(Z(m))}function Se(e){if(y){if(Z(m)!==null)throw Ge(),ye;m=e}}function at(e=1){if(y){for(var t=e,n=m;t--;)n=Z(n);m=n}}function jt(e=!0){for(var t=0,n=m;;){if(n.nodeType===ze){var r=n.data;if(r===Ot){if(t===0)return n;t-=1}else(r===kt||r===At||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Z(n);e&&n.remove(),n=i}}function lr(e){if(!e||e.nodeType!==ze)throw Ge(),ye;return e.data}function Yt(e){return e===this.v}function or(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function fr(e){return!or(e,this.v)}let ar=!1,F=null;function xe(e){F=e}function Ht(e,t=!1,n){F={p:F,i:!1,c:null,e:null,s:e,x:null,r:g,l:null}}function Bt(e){var t=F,n=t.e;if(n!==null){t.e=null;for(var r of n)Rr(r)}return e!==void 0&&(t.x=e),t.i=!0,F=t.p,e??{}}function Vt(){return!0}let he=[];function qt(){var e=he;he=[],zn(e)}function de(e){if(he.length===0&&!Me){var t=he;queueMicrotask(()=>{t===he&&qt()})}he.push(e)}function ur(){for(;he.length>0;)qt()}function Ut(e){var t=g;if(t===null)return p.f|=ne,e;if((t.f&ae)===0&&(t.f&Ee)===0)throw e;ie(e,t)}function ie(e,t){for(;t!==null;){if((t.f&st)!==0){if((t.f&ae)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const cr=-7169;function b(e,t){e.f=e.f&cr|t}function ut(e){(e.f&C)!==0||e.deps===null?b(e,T):b(e,B)}function zt(e){if(e!==null)for(const t of e)(t.f&S)===0||(t.f&ce)===0||(t.f^=ce,zt(t.deps))}function Gt(e,t,n){(e.f&N)!==0?t.add(e):(e.f&B)!==0&&n.add(e),zt(e.deps),b(e,T)}const se=new Set;let $=null,j=null,ct=null,Me=!1,ht=!1,Ne=null,We=null;var Kt=0;let hr=1;class W{id=hr++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=new Map;#i=new Map;#s=null;#r=[];#l=new Set;#o=new Set;#f=new Map;is_fork=!1;#c=!1;#a=new Set;#h(){return this.is_fork||this.#i.size>0}#_(){for(const r of this.#a)for(const i of r.#i.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#f.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#f.get(t);if(n){this.#f.delete(t);for(var r of n.d)b(r,N),this.schedule(r);for(r of n.m)b(r,B),this.schedule(r)}}#d(){if(Kt++>1e3&&(se.delete(this),dr()),!this.#h()){for(const o of this.#l)this.#o.delete(o),b(o,N),this.schedule(o);for(const o of this.#o)b(o,B),this.schedule(o)}const t=this.#r;this.#r=[],this.apply();var n=Ne=[],r=[],i=We=[];for(const o of t)try{this.#u(o,n,r)}catch(f){throw Qt(o),f}if($=null,i.length>0){var s=W.ensure();for(const o of i)s.schedule(o)}if(Ne=null,We=null,this.#h()||this.#_()){this.#v(r),this.#v(n);for(const[o,f]of this.#f)Zt(o,f)}else{this.#t.size===0&&se.delete(this),this.#l.clear(),this.#o.clear();for(const o of this.#e)o(this);this.#e.clear(),Wt(r),Wt(n),this.#s?.resolve()}var l=$;if(this.#r.length>0){const o=l??=this;o.#r.push(...this.#r.filter(f=>!o.#r.includes(f)))}l!==null&&(se.add(l),l.#d()),se.has(this)||this.#p()}#u(t,n,r){t.f^=T;for(var i=t.first;i!==null;){var s=i.f,l=(s&(G|te))!==0,o=l&&(s&T)!==0,f=o||(s&V)!==0||this.#f.has(i);if(!f&&i.fn!==null){l?i.f^=T:(s&Ee)!==0?n.push(i):je(i)&&((s&ee)!==0&&this.#o.add(i),Oe(i));var a=i.first;if(a!==null){i=a;continue}}for(;i!==null;){var u=i.next;if(u!==null){i=u;break}i=i.parent}}}#v(t){for(var n=0;n<t.length;n+=1)Gt(t[n],this.#l,this.#o)}capture(t,n,r=!1){n!==x&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&ne)===0&&(this.current.set(t,[t.v,r]),j?.set(t,t.v))}activate(){$=this}deactivate(){$=null,j=null}flush(){try{ht=!0,$=this,this.#d()}finally{Kt=0,ct=null,Ne=null,We=null,ht=!1,$=null,j=null,le.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),se.delete(this)}#p(){for(const a of se){var t=a.id<this.id,n=[];for(const[u,[h,c]]of this.current){if(a.current.has(u)){var r=a.current.get(u)[0];if(t&&h!==r)a.current.set(u,[h,c]);else continue}n.push(u)}var i=[...a.current.keys()].filter(u=>!this.current.has(u));if(i.length===0)t&&a.discard();else if(n.length>0){a.activate();var s=new Set,l=new Map;for(var o of n)Jt(o,i,s,l);if(a.#r.length>0){a.apply();for(var f of a.#r)a.#u(f,[],[]);a.#r=[]}a.deactivate()}}for(const a of se)a.#a.has(this)&&(a.#a.delete(this),a.#a.size===0&&!a.#h()&&(a.activate(),a.#d()))}increment(t,n){let r=this.#t.get(n)??0;if(this.#t.set(n,r+1),t){let i=this.#i.get(n)??0;this.#i.set(n,i+1)}}decrement(t,n,r){let i=this.#t.get(n)??0;if(i===1?this.#t.delete(n):this.#t.set(n,i-1),t){let s=this.#i.get(n)??0;s===1?this.#i.delete(n):this.#i.set(n,s-1)}this.#c||r||(this.#c=!0,de(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#l.add(r);for(const r of n)this.#o.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#s??=Dt()).promise}static ensure(){if($===null){const t=$=new W;ht||(se.add($),Me||de(()=>{$===t&&t.flush()}))}return $}apply(){{j=null;return}}schedule(t){if(ct=t,t.b?.is_pending&&(t.f&(Ee|qe|Lt))!==0&&(t.f&ae)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Ne!==null&&n===g&&(p===null||(p.f&S)===0))return;if((r&(te|G))!==0){if((r&T)===0)return;n.f^=T}}this.#r.push(n)}}function ke(e){var t=Me;Me=!0;try{for(var n;;){if(ur(),$===null)return n;$.flush()}}finally{Me=t}}function dr(){try{Qn()}catch(e){ie(e,ct)}}let J=null;function Wt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(L|V))===0&&je(r)&&(J=new Set,Oe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&pn(r),J?.size>0)){le.clear();for(const i of J){if((i.f&(L|V))!==0)continue;const s=[i];let l=i.parent;for(;l!==null;)J.has(l)&&(J.delete(l),s.push(l)),l=l.parent;for(let o=s.length-1;o>=0;o--){const f=s[o];(f.f&(L|V))===0&&Oe(f)}}J.clear()}}J=null}}function Jt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&S)!==0?Jt(i,t,n,r):(s&(ot|ee))!==0&&(s&N)===0&&Xt(i,t,r)&&(b(i,N),dt(i))}}function Xt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if($e.call(t,i))return!0;if((i.f&S)!==0&&Xt(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function dt(e){$.schedule(e)}function Zt(e,t){if(!((e.f&G)!==0&&(e.f&T)!==0)){(e.f&N)!==0?t.d.push(e):(e.f&B)!==0&&t.m.push(e),b(e,T);for(var n=e.first;n!==null;)Zt(n,t),n=n.next}}function Qt(e){b(e,T);for(var t=e.first;t!==null;)Qt(t),t=t.next}function _r(e){let t=0,n=Pe(0),r;return()=>{yt()&&(H(n),dn(()=>(t===0&&(r=Hr(()=>e(()=>De(n)))),t+=1,()=>{de(()=>{t-=1,t===0&&(r?.(),r=void 0,De(n))})})))}}var vr=Te|ue;function pr(e,t,n,r){new gr(e,t,n,r)}class gr{parent;is_pending=!1;transform_error;#e;#n=y?m:null;#t;#i;#s;#r=null;#l=null;#o=null;#f=null;#c=0;#a=0;#h=!1;#_=new Set;#d=new Set;#u=null;#v=_r(()=>(this.#u=Pe(this.#c),()=>{this.#u=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#i=s=>{var l=g;l.b=this,l.f|=st,r(s)},this.parent=g.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#s=_n(()=>{if(y){const s=this.#n;Ke();const l=s.data===At;if(s.data.startsWith(Rt)){const f=JSON.parse(s.data.slice(Rt.length));this.#$(f)}else l?this.#b():this.#p()}else this.#w()},vr),y&&(this.#e=m)}#p(){try{this.#r=Q(()=>this.#i(this.#e))}catch(t){this.error(t)}}#$(t){const n=this.#t.failed;n&&(this.#o=Q(()=>{n(this.#e,()=>t,()=>()=>{})}))}#b(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#l=Q(()=>t(this.#e)),de(()=>{var n=this.#f=document.createDocumentFragment(),r=q();n.append(r),this.#r=this.#m(()=>Q(()=>this.#i(r))),this.#a===0&&(this.#e.before(n),this.#f=null,Fe(this.#l,()=>{this.#l=null}),this.#g($))}))}#w(){try{if(this.is_pending=this.has_pending_snippet(),this.#a=0,this.#c=0,this.#r=Q(()=>{this.#i(this.#e)}),this.#a>0){var t=this.#f=document.createDocumentFragment();wn(this.#r,t);const n=this.#t.pending;this.#l=Q(()=>n(this.#e))}else this.#g($)}catch(n){this.error(n)}}#g(t){this.is_pending=!1,t.transfer_effects(this.#_,this.#d)}defer_effect(t){Gt(t,this.#_,this.#d)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#m(t){var n=g,r=p,i=F;M(this.#s),A(this.#s),xe(this.#s.ctx);try{return W.ensure(),t()}catch(s){return Ut(s),null}finally{M(n),A(r),xe(i)}}#y(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(t,n);return}this.#a+=t,this.#a===0&&(this.#g(n),this.#l&&Fe(this.#l,()=>{this.#l=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t,n){this.#y(t,n),this.#c+=t,!(!this.#u||this.#h)&&(this.#h=!0,de(()=>{this.#h=!1,this.#u&&Xe(this.#u,this.#c)}))}get_effect_pending(){return this.#v(),H(this.#u)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#r&&(k(this.#r),this.#r=null),this.#l&&(k(this.#l),this.#l=null),this.#o&&(k(this.#o),this.#o=null),y&&(I(this.#n),at(),I(jt()));var i=!1,s=!1;const l=()=>{if(i){sr();return}i=!0,s&&ir(),this.#o!==null&&Fe(this.#o,()=>{this.#o=null}),this.#m(()=>{this.#w()})},o=f=>{try{s=!0,n?.(f,l),s=!1}catch(a){ie(a,this.#s&&this.#s.parent)}r&&(this.#o=this.#m(()=>{try{return Q(()=>{var a=g;a.b=this,a.f|=st,r(this.#e,()=>f,()=>l)})}catch(a){return ie(a,this.#s.parent),null}}))};de(()=>{var f;try{f=this.transform_error(t)}catch(a){ie(a,this.#s&&this.#s.parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(o,a=>ie(a,this.#s&&this.#s.parent)):o(f)})}}function mr(e,t,n,r){const i=tn;var s=e.filter(c=>!c.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var l=g,o=wr(),f=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(c=>c.promise)):null;function a(c){o();try{r(c)}catch(v){(l.f&L)===0&&ie(v,l)}Je()}if(n.length===0){f.then(()=>a(t.map(i)));return}var u=en();function h(){Promise.all(n.map(c=>yr(c))).then(c=>a([...t.map(i),...c])).catch(c=>ie(c,l)).finally(()=>u())}f?f.then(()=>{o(),h(),Je()}):h()}function wr(){var e=g,t=p,n=F,r=$;return function(s=!0){M(e),A(t),xe(n),s&&(e.f&L)===0&&(r?.activate(),r?.apply())}}function Je(e=!0){M(null),A(null),xe(null),e&&$?.deactivate()}function en(){var e=g,t=e.b,n=$,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function tn(e){var t=S|N,n=p!==null&&(p.f&S)!==0?p:null;return g!==null&&(g.f|=ue),{ctx:F,deps:null,effects:null,equals:Yt,f:t,fn:e,reactions:null,rv:0,v:x,wv:0,parent:n??g,ac:null}}function yr(e,t,n){let r=g;r===null&&Zn();var i=void 0,s=Pe(x),l=!p,o=new Map;return Pr(()=>{var f=g,a=Dt();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).finally(Je)}catch(v){a.reject(v),Je()}var u=$;if(l){if((f.f&ae)!==0)var h=en();if(r.b.is_rendered())o.get(u)?.reject(K),o.delete(u);else{for(const v of o.values())v.reject(K);o.clear()}o.set(u,a)}const c=(v,d=void 0)=>{if(h){var w=d===K;h(w)}if(!(d===K||(f.f&L)!==0)){if(u.activate(),d)s.f|=ne,Xe(s,d);else{(s.f&ne)!==0&&(s.f^=ne),Xe(s,v);for(const[_,E]of o){if(o.delete(_),_===u)break;E.reject(K)}}u.deactivate()}};a.promise.then(c,v=>c(null,v||"unknown"))}),hn(()=>{for(const f of o.values())f.reject(K)}),new Promise(f=>{function a(u){function h(){u===i?f(s):a(i)}u.then(h,h)}a(i)})}function $r(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)k(t[n])}}function br(e){for(var t=e.parent;t!==null;){if((t.f&S)===0)return(t.f&L)===0?t:null;t=t.parent}return null}function _t(e){var t,n=g;M(br(e));try{e.f&=~ce,$r(e),t=Sn(e)}finally{M(n)}return t}function nn(e){var t=e.v,n=_t(e);if(!e.equals(n)&&(e.wv=En(),(!$?.is_fork||e.deps===null)&&(e.v=n,$?.capture(e,t,!0),e.deps===null))){b(e,T);return}_e||(j!==null?(yt()||$?.is_fork)&&j.set(e,n):ut(e))}function Er(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(K),t.teardown=Un,t.ac=null,Ye(t,0),$t(t))}function rn(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Oe(t)}let vt=new Set;const le=new Map;let sn=!1;function Pe(e,t){var n={f:0,v:e,reactions:null,equals:Yt,rv:0,wv:0};return n}function oe(e,t){const n=Pe(e);return Fr(n),n}function Tr(e,t=!1,n=!0){const r=Pe(e);return t||(r.equals=fr),r}function X(e,t,n=!1){p!==null&&(!Y||(p.f&Ft)!==0)&&Vt()&&(p.f&(S|ee|ot|Ft))!==0&&(P===null||!$e.call(P,e))&&rr();let r=n?Le(t):t;return Xe(e,r,We)}function Xe(e,t,n=null){if(!e.equals(t)){var r=e.v;_e?le.set(e,t):le.set(e,r),e.v=t;var i=W.ensure();if(i.capture(e,r),(e.f&S)!==0){const s=e;(e.f&N)!==0&&_t(s),j===null&&ut(s)}e.wv=En(),ln(e,N,n),g!==null&&(g.f&T)!==0&&(g.f&(G|te))===0&&(D===null?jr([e]):D.push(e)),!i.is_fork&&vt.size>0&&!sn&&Sr()}return t}function Sr(){sn=!1;for(const e of vt)(e.f&T)!==0&&b(e,B),je(e)&&Oe(e);vt.clear()}function De(e){X(e,e.v+1)}function ln(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var l=r[s],o=l.f,f=(o&N)===0;if(f&&b(l,t),(o&S)!==0){var a=l;j?.delete(a),(o&ce)===0&&(o&C&&(l.f|=ce),ln(a,B,n))}else if(f){var u=l;(o&ee)!==0&&J!==null&&J.add(u),n!==null?n.push(u):dt(u)}}}function Le(e){if(typeof e!="object"||e===null||ft in e)return e;const t=Mt(e);if(t!==Vn&&t!==qn)return e;var n=new Map,r=jn(e),i=oe(0),s=pe,l=o=>{if(pe===s)return o();var f=p,a=pe;A(null),bn(s);var u=o();return A(f),bn(a),u};return r&&n.set("length",oe(e.length)),new Proxy(e,{defineProperty(o,f,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&tr();var u=n.get(f);return u===void 0?l(()=>{var h=oe(a.value);return n.set(f,h),h}):X(u,a.value,!0),!0},deleteProperty(o,f){var a=n.get(f);if(a===void 0){if(f in o){const u=l(()=>oe(x));n.set(f,u),De(i)}}else X(a,x),De(i);return!0},get(o,f,a){if(f===ft)return e;var u=n.get(f),h=f in o;if(u===void 0&&(!h||be(o,f)?.writable)&&(u=l(()=>{var v=Le(h?o[f]:x),d=oe(v);return d}),n.set(f,u)),u!==void 0){var c=H(u);return c===x?void 0:c}return Reflect.get(o,f,a)},getOwnPropertyDescriptor(o,f){var a=Reflect.getOwnPropertyDescriptor(o,f);if(a&&"value"in a){var u=n.get(f);u&&(a.value=H(u))}else if(a===void 0){var h=n.get(f),c=h?.v;if(h!==void 0&&c!==x)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return a},has(o,f){if(f===ft)return!0;var a=n.get(f),u=a!==void 0&&a.v!==x||Reflect.has(o,f);if(a!==void 0||g!==null&&(!u||be(o,f)?.writable)){a===void 0&&(a=l(()=>{var c=u?Le(o[f]):x,v=oe(c);return v}),n.set(f,a));var h=H(a);if(h===x)return!1}return u},set(o,f,a,u){var h=n.get(f),c=f in o;if(r&&f==="length")for(var v=a;v<h.v;v+=1){var d=n.get(v+"");d!==void 0?X(d,x):v in o&&(d=l(()=>oe(x)),n.set(v+"",d))}if(h===void 0)(!c||be(o,f)?.writable)&&(h=l(()=>oe(void 0)),X(h,Le(a)),n.set(f,h));else{c=h.v!==x;var w=l(()=>Le(a));X(h,w)}var _=Reflect.getOwnPropertyDescriptor(o,f);if(_?.set&&_.set.call(u,a),!c){if(r&&typeof f=="string"){var E=n.get("length"),z=Number(f);Number.isInteger(z)&&z>=E.v&&X(E,z+1)}De(i)}return!0},ownKeys(o){H(i);var f=Reflect.ownKeys(o).filter(h=>{var c=n.get(h);return c===void 0||c.v!==x});for(var[a,u]of n)u.v!==x&&!(a in o)&&f.push(a);return f},setPrototypeOf(){nr()}})}var on,fn,an,un;function pt(){if(on===void 0){on=window,fn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;an=be(t,"firstChild").get,un=be(t,"nextSibling").get,Pt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Pt(n)&&(n.__t=void 0)}}function q(e=""){return document.createTextNode(e)}function Ae(e){return an.call(e)}function Z(e){return un.call(e)}function Re(e,t){if(!y)return Ae(e);var n=Ae(m);return n===null&&(n=m.appendChild(q())),I(n),n}function xr(e,t=!1){if(!y){var n=Ae(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(m?.nodeType!==Ue){var r=q();return m?.before(r),I(r),r}mt(m)}return m}function cn(e,t=1,n=!1){let r=y?m:e;for(var i;t--;)i=r,r=Z(r);if(!y)return r;if(n){if(r?.nodeType!==Ue){var s=q();return r===null?i?.after(s):r.before(s),I(s),s}mt(r)}return I(r),r}function Nr(e){e.textContent=""}function kr(){return!1}function gt(e,t,n){return document.createElementNS(Ct,e,void 0)}function mt(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Ue;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function wt(e){var t=p,n=g;A(null),M(null);try{return e()}finally{A(t),M(n)}}function Ar(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function U(e,t){var n=g;n!==null&&(n.f&V)!==0&&(e|=V);var r={ctx:F,deps:null,nodes:null,f:e|N|C,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&Ee)!==0)Ne!==null?Ne.push(r):W.ensure().schedule(r);else if(t!==null){try{Oe(r)}catch(l){throw k(r),l}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&ue)===0&&(i=i.first,(e&ee)!==0&&(e&Te)!==0&&i!==null&&(i.f|=Te))}if(i!==null&&(i.parent=n,n!==null&&Ar(i,n),p!==null&&(p.f&S)!==0&&(e&te)===0)){var s=p;(s.effects??=[]).push(i)}return r}function yt(){return p!==null&&!Y}function hn(e){const t=U(qe,null);return b(t,T),t.teardown=e,t}function Rr(e){return U(Ee|Kn,e)}function Or(e){W.ensure();const t=U(te|ue,e);return()=>{k(t)}}function Cr(e){W.ensure();const t=U(te|ue,e);return(n={})=>new Promise(r=>{n.outro?Fe(t,()=>{k(t),r(void 0)}):(k(t),r(void 0))})}function Mr(e){return U(Ee,e)}function Pr(e){return U(ot|ue,e)}function dn(e,t=0){return U(qe|t,e)}function Ie(e,t=[],n=[],r=[]){mr(r,t,n,i=>{U(qe,()=>e(...i.map(H)))})}function _n(e,t=0){var n=U(ee|t,e);return n}function Q(e){return U(G|ue,e)}function vn(e){var t=e.teardown;if(t!==null){const n=_e,r=p;yn(!0),A(null);try{t.call(null)}finally{yn(n),A(r)}}}function $t(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&wt(()=>{i.abort(K)});var r=n.next;(n.f&te)!==0?n.parent=null:k(n,t),n=r}}function Dr(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&G)===0&&k(t),t=n}}function k(e,t=!0){var n=!1;(t||(e.f&Gn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Lr(e.nodes.start,e.nodes.end),n=!0),b(e,It),$t(e,t&&!n),Ye(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();vn(e),e.f^=It,e.f|=L;var i=e.parent;i!==null&&i.first!==null&&pn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Lr(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function pn(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 Fe(e,t,n=!0){var r=[];gn(e,r,!0);var i=()=>{n&&k(e),t&&t()},s=r.length;if(s>0){var l=()=>--s||i();for(var o of r)o.out(l)}else i()}function gn(e,t,n){if((e.f&V)===0){e.f^=V;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,l=(i.f&Te)!==0||(i.f&G)!==0&&(e.f&ee)!==0;gn(i,t,l?n:!1),i=s}}}function Ir(e){mn(e,!0)}function mn(e,t){if((e.f&V)!==0){e.f^=V,(e.f&T)===0&&(b(e,N),W.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Te)!==0||(n.f&G)!==0;mn(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const l of s)(l.is_global||t)&&l.in()}}function wn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Z(n);t.append(n),n=i}}let Ze=!1,_e=!1;function yn(e){_e=e}let p=null,Y=!1;function A(e){p=e}let g=null;function M(e){g=e}let P=null;function Fr(e){p!==null&&(P===null?P=[e]:P.push(e))}let R=null,O=0,D=null;function jr(e){D=e}let $n=1,ve=0,pe=ve;function bn(e){pe=e}function En(){return++$n}function je(e){var t=e.f;if((t&N)!==0)return!0;if(t&S&&(e.f&=~ce),(t&B)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(je(s)&&nn(s),s.wv>e.wv)return!0}(t&C)!==0&&j===null&&b(e,T)}return!1}function Tn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(P!==null&&$e.call(P,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&S)!==0?Tn(s,t,!1):t===s&&(n?b(s,N):(s.f&T)!==0&&b(s,B),dt(s))}}function Sn(e){var t=R,n=O,r=D,i=p,s=P,l=F,o=Y,f=pe,a=e.f;R=null,O=0,D=null,p=(a&(G|te))===0?e:null,P=null,xe(e.ctx),Y=!1,pe=++ve,e.ac!==null&&(wt(()=>{e.ac.abort(K)}),e.ac=null);try{e.f|=lt;var u=e.fn,h=u();e.f|=ae;var c=e.deps,v=$?.is_fork;if(R!==null){var d;if(v||Ye(e,O),c!==null&&O>0)for(c.length=O+R.length,d=0;d<R.length;d++)c[O+d]=R[d];else e.deps=c=R;if(yt()&&(e.f&C)!==0)for(d=O;d<c.length;d++)(c[d].reactions??=[]).push(e)}else!v&&c!==null&&O<c.length&&(Ye(e,O),c.length=O);if(Vt()&&D!==null&&!Y&&c!==null&&(e.f&(S|B|N))===0)for(d=0;d<D.length;d++)Tn(D[d],e);if(i!==null&&i!==e){if(ve++,i.deps!==null)for(let w=0;w<n;w+=1)i.deps[w].rv=ve;if(t!==null)for(const w of t)w.rv=ve;D!==null&&(r===null?r=D:r.push(...D))}return(e.f&ne)!==0&&(e.f^=ne),h}catch(w){return Ut(w)}finally{e.f^=lt,R=t,O=n,D=r,p=i,P=s,xe(l),Y=o,pe=f}}function Yr(e,t){let n=t.reactions;if(n!==null){var r=Yn.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&S)!==0&&(R===null||!$e.call(R,t))){var s=t;(s.f&C)!==0&&(s.f^=C,s.f&=~ce),ut(s),Er(s),Ye(s,0)}}function Ye(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Yr(e,n[r])}function Oe(e){var t=e.f;if((t&L)===0){b(e,T);var n=g,r=Ze;g=e,Ze=!0;try{(t&(ee|Lt))!==0?Dr(e):$t(e),vn(e);var i=Sn(e);e.teardown=typeof i=="function"?i:null,e.wv=$n;var s;Fn&&ar&&(e.f&N)!==0&&e.deps}finally{Ze=r,g=n}}}function H(e){var t=e.f,n=(t&S)!==0;if(p!==null&&!Y){var r=g!==null&&(g.f&L)!==0;if(!r&&(P===null||!$e.call(P,e))){var i=p.deps;if((p.f&lt)!==0)e.rv<ve&&(e.rv=ve,R===null&&i!==null&&i[O]===e?O++:R===null?R=[e]:R.push(e));else{(p.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[p]:$e.call(s,p)||s.push(p)}}}if(_e&&le.has(e))return le.get(e);if(n){var l=e;if(_e){var o=l.v;return((l.f&T)===0&&l.reactions!==null||Nn(l))&&(o=_t(l)),le.set(l,o),o}var f=(l.f&C)===0&&!Y&&p!==null&&(Ze||(p.f&C)!==0),a=(l.f&ae)===0;je(l)&&(f&&(l.f|=C),nn(l)),f&&!a&&(rn(l),xn(l))}if(j?.has(e))return j.get(e);if((e.f&ne)!==0)throw e.v;return e.v}function xn(e){if(e.f|=C,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&S)!==0&&(t.f&C)===0&&(rn(t),xn(t))}function Nn(e){if(e.v===x)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(le.has(t)||(t.f&S)!==0&&Nn(t))return!0;return!1}function Hr(e){var t=Y;try{return Y=!0,e()}finally{Y=t}}const Qe=Symbol("events"),Br=new Set,kn=new Set;function Vr(e,t,n,r={}){function i(s){if(r.capture||bt.call(t,s),!s.cancelBubble)return wt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?de(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function qr(e,t,n,r,i){var s={capture:r,passive:i},l=Vr(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&hn(()=>{t.removeEventListener(e,l,s)})}let An=null;function bt(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;An=e;var l=0,o=An===e&&e[Qe];if(o){var f=i.indexOf(o);if(f!==-1&&(t===document||t===window)){e[Qe]=t;return}var a=i.indexOf(t);if(a===-1)return;f<=a&&(l=f)}if(s=i[l]||e.target,s!==t){Ve(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=p,h=g;A(null),M(null);try{for(var c,v=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var w=s[Qe]?.[r];w!=null&&(!s.disabled||e.target===s)&&w.call(s,e)}catch(_){c?v.push(_):c=_}if(e.cancelBubble||d===t||d===null)break;s=d}if(c){for(let _ of v)queueMicrotask(()=>{throw _});throw c}}finally{e[Qe]=t,delete e.currentTarget,A(u),M(h)}}}const Ur=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function zr(e){return Ur?.createHTML(e)??e}function Gr(e){var t=gt("template");return t.innerHTML=zr(e.replaceAll("<!>","<!---->")),t.content}function fe(e,t){var n=g;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function et(e,t){var n=(t&Ln)!==0,r=(t&In)!==0,i,s=!e.startsWith("<!>");return()=>{if(y)return fe(m,null),m;i===void 0&&(i=Gr(s?e:"<!>"+e),n||(i=Ae(i)));var l=r||fn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Ae(l),f=l.lastChild;fe(o,f)}else fe(l,l);return l}}function Kr(e=""){if(!y){var t=q(e+"");return fe(t,t),t}var n=m;return n.nodeType!==Ue?(n.before(n=q()),I(n)):mt(n),fe(n,n),n}function Wr(){if(y)return fe(m,null),m;var e=document.createDocumentFragment(),t=document.createComment(""),n=q();return e.append(t,n),fe(t,n),e}function ge(e,t){if(y){var n=g;((n.f&ae)===0||n.nodes.end===null)&&(n.nodes.end=m),Ke();return}e!==null&&e.before(t)}const Jr=["touchstart","touchmove"];function Xr(e){return Jr.includes(e)}function Zr(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Rn(e,t){return On(e,t)}function Qr(e,t){pt(),t.intro=t.intro??!1;const n=t.target,r=y,i=m;try{for(var s=Ae(n);s&&(s.nodeType!==ze||s.data!==kt);)s=Z(s);if(!s)throw ye;re(!0),I(s);const l=On(e,{...t,anchor:s});return re(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
2
- `).some(o=>o.startsWith("https://svelte.dev/e/")))throw l;return l!==ye&&console.warn("Failed to hydrate: ",l),t.recover===!1&&er(),pt(),Nr(n),re(!1),Rn(e,t)}finally{re(r),I(i)}}const tt=new Map;function On(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:l=!0,transformError:o}){pt();var f=void 0,a=Cr(()=>{var u=n??t.appendChild(q());pr(u,{pending:()=>{}},v=>{Ht({});var d=F;if(s&&(d.c=s),i&&(r.$$events=i),y&&fe(v,null),f=e(v,r)||{},y&&(g.nodes.end=m,m===null||m.nodeType!==ze||m.data!==Ot))throw Ge(),ye;Bt()},o);var h=new Set,c=v=>{for(var d=0;d<v.length;d++){var w=v[d];if(!h.has(w)){h.add(w);var _=Xr(w);for(const me of[t,document]){var E=tt.get(me);E===void 0&&(E=new Map,tt.set(me,E));var z=E.get(w);z===void 0?(me.addEventListener(w,bt,{passive:_}),E.set(w,1)):E.set(w,z+1)}}}};return c(Hn(Br)),kn.add(c),()=>{for(var v of h)for(const _ of[t,document]){var d=tt.get(_),w=d.get(v);--w==0?(_.removeEventListener(v,bt),d.delete(v),d.size===0&&tt.delete(_)):d.set(v,w)}kn.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return Et.set(f,a),f}let Et=new WeakMap;function ei(e,t){const n=Et.get(e);return n?(Et.delete(e),n(t)):Promise.resolve()}class ti{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)Ir(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,l]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#t.get(l);o&&(k(o.effect),this.#t.delete(l))}for(const[s,l]of this.#n){if(s===n||this.#i.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var a=document.createDocumentFragment();wn(l,a),a.append(q()),this.#t.set(s,{effect:l,fragment:a})}else k(l);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),Fe(l,o,!1)):o()}}};#l=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(k(i.effect),this.#t.delete(r))};ensure(t,n){var r=$,i=kr();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),l=q();s.append(l),this.#t.set(t,{effect:Q(()=>n(l)),fragment:s})}else this.#n.set(t,Q(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,f]of this.#n)o===t?r.unskip_effect(f):r.skip_effect(f);for(const[o,f]of this.#t)o===t?r.unskip_effect(f.effect):r.skip_effect(f.effect);r.oncommit(this.#r),r.ondiscard(this.#l)}else y&&(this.anchor=m),this.#r(r)}}function Tt(e,t,n=!1){var r;y&&(r=m,Ke());var i=new ti(e),s=n?Te:0;function l(o,f){if(y){var a=lr(r);if(o!==parseInt(a.substring(1))){var u=jt();I(u),i.anchor=u,re(!1),i.ensure(o,f),re(!0);return}}i.ensure(o,f)}_n(()=>{var o=!1;t((f,a=0)=>{o=!0,l(a,f)}),o||l(-1,null)},s)}function ni(e,t,n,r,i){y&&Ke();var s=t.$$slots?.[n],l=!1;s===!0&&(s=t[n],l=!0),s===void 0?i!==null&&i(e):s(e,l?()=>r:r)}function ri(e,t){Mr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=gt("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const ii=Symbol("is custom element"),si=Symbol("is html"),li=Xn?"link":"LINK";function St(e,t,n,r){var i=oi(e);y&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===li)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Jn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Mn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Cn(e,t,n){var r=p,i=g;let s=y;y&&re(!1),A(null),M(null);try{t!=="style"&&(xt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Mn(e).includes(t):n&&typeof n=="object")?e[t]=n:St(e,t,n==null?n:String(n))}finally{A(r),M(i),s&&re(!0)}}function oi(e){return e.__attributes??={[ii]:e.nodeName.includes("-"),[si]:e.namespaceURI===Ct}}var xt=new Map;function Mn(e){var t=e.getAttribute("is")||e.nodeName,n=xt.get(t);if(n)return n;xt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Bn(i);for(var l in r)r[l].set&&n.push(l);i=Mt(i)}return n}function He(e,t,n,r){var i=r,s=!0,l=()=>(s&&(s=!1,i=r),i),o;o=e[t],o===void 0&&r!==void 0&&(o=l());var f;f=()=>{var c=e[t];return c===void 0?l():(s=!0,c)};var a=!1,u=tn(()=>(a=!1,f())),h=g;return(function(c,v){if(arguments.length>0){const d=v?H(u):c;return X(u,d),a=!0,i!==void 0&&(i=d),c}return _e&&a||(h.f&L)!==0?u.v:H(u)})}function fi(e){return new ai(e)}class ai{#e;#n;constructor(t){var n=new Map,r=(s,l)=>{var o=Tr(l,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,l){return H(n.get(l)??r(l,Reflect.get(s,l)))},has(s,l){return l===Wn?!0:(H(n.get(l)??r(l,Reflect.get(s,l))),Reflect.has(s,l))},set(s,l,o){return X(n.get(l)??r(l,o),o),Reflect.set(s,l,o)}});this.#n=(t.hydrate?Qr:Rn)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&ke(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||Ve(this,s,{get(){return this.#n[s]},set(l){this.#n[s]=l},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{ei(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let Pn;typeof HTMLElement=="function"&&(Pn=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),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){const 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){const 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=>{const s=gt("slot");r!=="default"&&(s.name=r),ge(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=ui(this);for(const 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(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=nt(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=fi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Or(()=>{dn(()=>{this.$$r=!0;for(const r of Be(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=nt(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(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=nt(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 Be(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function nt(e,t,n,r){const 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 ui(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function ci(e,t,n,r,i,s){let l=class extends Pn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Be(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Be(t).forEach(o=>{Ve(l.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){f=nt(o,f,t),this.$$d[o]=f;var a=this.$$c;if(a){var u=be(a,o)?.get;u?a[o]=f:a.$set({[o]:f})}}})}),r.forEach(o=>{Ve(l.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=l,l}function hi(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const n=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const r=document.createElement("script");if(r.id=t+"-script",r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];r.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${n}`}document.head.appendChild(r)}catch(r){console.warn(r)}}const di={version:"0.66.4"};var _i=et('<span slot="title"><!></span>'),vi=et('<div style="ratio:16/9;width:100%;text-align: center;"><iframe style="border:0;aspect-ratio: 16 / 9;width:100%" title="YouTube video" allowfullscreen=""></iframe></div>'),pi=et('<div style="aspect-ratio: 16 / 9;width:100%;text-align: center;background-color: black;"><video controls="" style="aspect-ratio: 16 / 9;width:100%"><track kind="captions"/> <source type="video/mp4"/> Your browser does not support the video tag.</video></div>',2),gi=et('<hb-dialog><!> <div slot="body-content"><!></div> <span slot="modal-footer"></span></hb-dialog>',2);const mi={hash:"svelte-18hhnm9",code:'@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;}'};function Dn(e,t){Ht(t,!0),ri(e,mi);function n(_,E){t.$$host.dispatchEvent(new CustomEvent(_,{detail:E}))}hi({repoName:"@htmlbricks/hb-dialog",version:di.version});let r=He(t,"id",7,""),i=He(t,"item",7,"defaultItem"),s=He(t,"uri",7,""),l=He(t,"title",7,""),o=He(t,"provider",7,"");function f(_){_.show?i(_.id):(i(""),s(""),l("")),n("videoModalEvent",{id:i(),show:_.show})}var a={get id(){return r()},set id(_=""){r(_),ke()},get item(){return i()},set item(_="defaultItem"){i(_),ke()},get uri(){return s()},set uri(_=""){s(_),ke()},get title(){return l()},set title(_=""){l(_),ke()},get provider(){return o()},set provider(_=""){o(_),ke()}},u=gi();Ie(()=>Cn(u,"id",i())),Ie(()=>Cn(u,"show",s()?"yes":"no"));var h=Re(u);{var c=_=>{var E=_i(),z=Re(E);ni(z,t,"title",{},me=>{var rt=Kr();Ie(()=>Zr(rt,`Video: ${l()??""}`)),ge(me,rt)}),Se(E),ge(_,E)};Tt(h,_=>{l()&&_(c)})}var v=cn(h,2),d=Re(v);{var w=_=>{var E=Wr(),z=xr(E);{var me=Ce=>{var we=vi(),it=Re(we);Se(we),Ie(()=>St(it,"src",s())),ge(Ce,we)},rt=Ce=>{var we=pi(),it=Re(we),wi=cn(Re(it),2);at(),Se(it),Se(we),Ie(()=>St(wi,"src",s())),ge(Ce,we)};Tt(z,Ce=>{o()==="youtube"?Ce(me):Ce(rt,-1)})}ge(_,E)};Tt(d,_=>{s()&&_(w)})}return Se(v),at(2),Se(u),qr("modalShow",u,_=>f(_.detail)),ge(e,u),Bt(a)}customElements.define("hb-modal-video",ci(Dn,{id:{},item:{},uri:{},title:{},provider:{}},["title"],[],{mode:"open"})),Nt.Component=Dn,Object.defineProperty(Nt,Symbol.toStringTag,{value:"Module"})})(this["modal-video"]=this["modal-video"]||{});
2
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw l;return l!==ye&&console.warn("Failed to hydrate: ",l),t.recover===!1&&er(),pt(),Nr(n),re(!1),Rn(e,t)}finally{re(r),I(i)}}const tt=new Map;function On(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:l=!0,transformError:o}){pt();var f=void 0,a=Cr(()=>{var u=n??t.appendChild(q());pr(u,{pending:()=>{}},v=>{Ht({});var d=F;if(s&&(d.c=s),i&&(r.$$events=i),y&&fe(v,null),f=e(v,r)||{},y&&(g.nodes.end=m,m===null||m.nodeType!==ze||m.data!==Ot))throw Ge(),ye;Bt()},o);var h=new Set,c=v=>{for(var d=0;d<v.length;d++){var w=v[d];if(!h.has(w)){h.add(w);var _=Xr(w);for(const me of[t,document]){var E=tt.get(me);E===void 0&&(E=new Map,tt.set(me,E));var z=E.get(w);z===void 0?(me.addEventListener(w,bt,{passive:_}),E.set(w,1)):E.set(w,z+1)}}}};return c(Hn(Br)),kn.add(c),()=>{for(var v of h)for(const _ of[t,document]){var d=tt.get(_),w=d.get(v);--w==0?(_.removeEventListener(v,bt),d.delete(v),d.size===0&&tt.delete(_)):d.set(v,w)}kn.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return Et.set(f,a),f}let Et=new WeakMap;function ei(e,t){const n=Et.get(e);return n?(Et.delete(e),n(t)):Promise.resolve()}class ti{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)Ir(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,l]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#t.get(l);o&&(k(o.effect),this.#t.delete(l))}for(const[s,l]of this.#n){if(s===n||this.#i.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var a=document.createDocumentFragment();wn(l,a),a.append(q()),this.#t.set(s,{effect:l,fragment:a})}else k(l);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),Fe(l,o,!1)):o()}}};#l=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(k(i.effect),this.#t.delete(r))};ensure(t,n){var r=$,i=kr();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),l=q();s.append(l),this.#t.set(t,{effect:Q(()=>n(l)),fragment:s})}else this.#n.set(t,Q(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,f]of this.#n)o===t?r.unskip_effect(f):r.skip_effect(f);for(const[o,f]of this.#t)o===t?r.unskip_effect(f.effect):r.skip_effect(f.effect);r.oncommit(this.#r),r.ondiscard(this.#l)}else y&&(this.anchor=m),this.#r(r)}}function Tt(e,t,n=!1){var r;y&&(r=m,Ke());var i=new ti(e),s=n?Te:0;function l(o,f){if(y){var a=lr(r);if(o!==parseInt(a.substring(1))){var u=jt();I(u),i.anchor=u,re(!1),i.ensure(o,f),re(!0);return}}i.ensure(o,f)}_n(()=>{var o=!1;t((f,a=0)=>{o=!0,l(a,f)}),o||l(-1,null)},s)}function ni(e,t,n,r,i){y&&Ke();var s=t.$$slots?.[n],l=!1;s===!0&&(s=t[n],l=!0),s===void 0?i!==null&&i(e):s(e,l?()=>r:r)}function ri(e,t){Mr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=gt("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const ii=Symbol("is custom element"),si=Symbol("is html"),li=Xn?"link":"LINK";function St(e,t,n,r){var i=oi(e);y&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===li)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Jn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Mn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Cn(e,t,n){var r=p,i=g;let s=y;y&&re(!1),A(null),M(null);try{t!=="style"&&(xt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Mn(e).includes(t):n&&typeof n=="object")?e[t]=n:St(e,t,n==null?n:String(n))}finally{A(r),M(i),s&&re(!0)}}function oi(e){return e.__attributes??={[ii]:e.nodeName.includes("-"),[si]:e.namespaceURI===Ct}}var xt=new Map;function Mn(e){var t=e.getAttribute("is")||e.nodeName,n=xt.get(t);if(n)return n;xt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Bn(i);for(var l in r)r[l].set&&n.push(l);i=Mt(i)}return n}function He(e,t,n,r){var i=r,s=!0,l=()=>(s&&(s=!1,i=r),i),o;o=e[t],o===void 0&&r!==void 0&&(o=l());var f;f=()=>{var c=e[t];return c===void 0?l():(s=!0,c)};var a=!1,u=tn(()=>(a=!1,f())),h=g;return(function(c,v){if(arguments.length>0){const d=v?H(u):c;return X(u,d),a=!0,i!==void 0&&(i=d),c}return _e&&a||(h.f&L)!==0?u.v:H(u)})}function fi(e){return new ai(e)}class ai{#e;#n;constructor(t){var n=new Map,r=(s,l)=>{var o=Tr(l,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,l){return H(n.get(l)??r(l,Reflect.get(s,l)))},has(s,l){return l===Wn?!0:(H(n.get(l)??r(l,Reflect.get(s,l))),Reflect.has(s,l))},set(s,l,o){return X(n.get(l)??r(l,o),o),Reflect.set(s,l,o)}});this.#n=(t.hydrate?Qr:Rn)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&ke(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||Ve(this,s,{get(){return this.#n[s]},set(l){this.#n[s]=l},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{ei(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let Pn;typeof HTMLElement=="function"&&(Pn=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),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){const 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){const 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=>{const s=gt("slot");r!=="default"&&(s.name=r),ge(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=ui(this);for(const 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(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=nt(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=fi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Or(()=>{dn(()=>{this.$$r=!0;for(const r of Be(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=nt(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(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=nt(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 Be(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function nt(e,t,n,r){const 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 ui(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function ci(e,t,n,r,i,s){let l=class extends Pn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Be(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Be(t).forEach(o=>{Ve(l.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){f=nt(o,f,t),this.$$d[o]=f;var a=this.$$c;if(a){var u=be(a,o)?.get;u?a[o]=f:a.$set({[o]:f})}}})}),r.forEach(o=>{Ve(l.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=l,l}function hi(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const n=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const r=document.createElement("script");if(r.id=t+"-script",r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];r.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${n}`}document.head.appendChild(r)}catch(r){console.warn(r)}}const di={version:"0.66.5"};var _i=et('<span slot="title"><!></span>'),vi=et('<div style="ratio:16/9;width:100%;text-align: center;"><iframe style="border:0;aspect-ratio: 16 / 9;width:100%" title="YouTube video" allowfullscreen=""></iframe></div>'),pi=et('<div style="aspect-ratio: 16 / 9;width:100%;text-align: center;background-color: black;"><video controls="" style="aspect-ratio: 16 / 9;width:100%"><track kind="captions"/> <source type="video/mp4"/> Your browser does not support the video tag.</video></div>',2),gi=et('<hb-dialog><!> <div slot="body-content"><!></div> <span slot="modal-footer"></span></hb-dialog>',2);const mi={hash:"svelte-18hhnm9",code:'@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;}'};function Dn(e,t){Ht(t,!0),ri(e,mi);function n(_,E){t.$$host.dispatchEvent(new CustomEvent(_,{detail:E}))}hi({repoName:"@htmlbricks/hb-dialog",version:di.version});let r=He(t,"id",7,""),i=He(t,"item",7,"defaultItem"),s=He(t,"uri",7,""),l=He(t,"title",7,""),o=He(t,"provider",7,"");function f(_){_.show?i(_.id):(i(""),s(""),l("")),n("videoModalEvent",{id:i(),show:_.show})}var a={get id(){return r()},set id(_=""){r(_),ke()},get item(){return i()},set item(_="defaultItem"){i(_),ke()},get uri(){return s()},set uri(_=""){s(_),ke()},get title(){return l()},set title(_=""){l(_),ke()},get provider(){return o()},set provider(_=""){o(_),ke()}},u=gi();Ie(()=>Cn(u,"id",i())),Ie(()=>Cn(u,"show",s()?"yes":"no"));var h=Re(u);{var c=_=>{var E=_i(),z=Re(E);ni(z,t,"title",{},me=>{var rt=Kr();Ie(()=>Zr(rt,`Video: ${l()??""}`)),ge(me,rt)}),Se(E),ge(_,E)};Tt(h,_=>{l()&&_(c)})}var v=cn(h,2),d=Re(v);{var w=_=>{var E=Wr(),z=xr(E);{var me=Ce=>{var we=vi(),it=Re(we);Se(we),Ie(()=>St(it,"src",s())),ge(Ce,we)},rt=Ce=>{var we=pi(),it=Re(we),wi=cn(Re(it),2);at(),Se(it),Se(we),Ie(()=>St(wi,"src",s())),ge(Ce,we)};Tt(z,Ce=>{o()==="youtube"?Ce(me):Ce(rt,-1)})}ge(_,E)};Tt(d,_=>{s()&&_(w)})}return Se(v),at(2),Se(u),qr("modalShow",u,_=>f(_.detail)),ge(e,u),Bt(a)}customElements.define("hb-modal-video",ci(Dn,{id:{},item:{},uri:{},title:{},provider:{}},["title"],[],{mode:"open"})),Nt.Component=Dn,Object.defineProperty(Nt,Symbol.toStringTag,{value:"Module"})})(this["modal-video"]=this["modal-video"]||{});
3
3
  //# sourceMappingURL=main.iife.js.map
package/manifest.json CHANGED
@@ -108,8 +108,7 @@
108
108
  }
109
109
  }
110
110
  ],
111
- "iifeIntegrity": "sha384-CbcilKBYMxyMWvB36BRZDX1GNXg070UC1BEgs4TnJhZS7h1rL7Exj0OkO1Yqt5sa",
112
- "iifeIntegrityType": "sha384",
111
+ "iifeIntegrity": "sha384-8unS6j2YTxBlZTCPoK9ZMxx0sSfDS+YommJDVjidwfvoJoy/t5NG5jWwqNXMuBMq",
113
112
  "screenshots": [],
114
113
  "licenses": [
115
114
  {
@@ -130,5 +129,5 @@
130
129
  "size": {},
131
130
  "iifePath": "main.iife.js",
132
131
  "repoName": "@htmlbricks/hb-modal-video",
133
- "version": "0.66.4"
132
+ "version": "0.66.5"
134
133
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-modal-video",
3
- "version": "0.66.4",
3
+ "version": "0.66.5",
4
4
  "contributors": [],
5
5
  "description": "Video modal built on hb-dialog: when uri is set the dialog opens with either a YouTube iframe (provider youtube) or an HTML5 video element, optional title slot, and videoModalEvent when visibility changes.",
6
6
  "licenses": [