@htmlbricks/hb-stylus-notebook 0.66.1 → 0.66.3
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(Rt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Xn=2,Ct="[",Lt="[!",Dt="[?",Mt="]",Re={},k=Symbol(),Pt="http://www.w3.org/1999/xhtml",Zn=!1;var Qn=Array.isArray,er=Array.prototype.indexOf,Ee=Array.prototype.includes,tr=Array.from,qe=Object.keys,Ue=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyDescriptors,rr=Object.prototype,ir=Array.prototype,It=Object.getPrototypeOf,jt=Object.isExtensible;const sr=()=>{};function lr(e){for(var t=0;t<e.length;t++)e[t]()}function Ft(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const x=2,xe=4,Ve=8,Ht=1<<24,ne=16,G=32,re=64,tt=128,P=512,S=1024,O=2048,J=4096,ie=8192,q=16384,se=32768,Bt=1<<25,Ye=65536,qt=1<<17,or=1<<18,ve=1<<19,ar=1<<20,_e=65536,nt=1<<21,rt=1<<22,le=1<<23,it=Symbol("$state"),fr=Symbol("legacy props"),ur=Symbol(""),K=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},cr=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),st=3,lt=8;function dr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function hr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function vr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function _r(e){throw new Error("https://svelte.dev/e/effect_orphan")}function pr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function gr(){throw new Error("https://svelte.dev/e/hydration_failed")}function wr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function mr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function br(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function yr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ot(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function $r(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let $=!1;function Se(e){$=e}let b;function X(e){if(e===null)throw ot(),Re;return b=e}function Ut(){return X(Q(b))}function Vt(e){if($){if(Q(b)!==null)throw ot(),Re;b=e}}function Er(e=1){if($){for(var t=e,n=b;t--;)n=Q(n);b=n}}function Tr(e=!0){for(var t=0,n=b;;){if(n.nodeType===lt){var r=n.data;if(r===Mt){if(t===0)return n;t-=1}else(r===Ct||r===Lt||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Q(n);e&&n.remove(),n=i}}function Yt(e){return e===this.v}function xr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Sr(e){return!xr(e,this.v)}let Nr=!1,I=null;function Ne(e){I=e}function Jt(e,t=!1,n){I={p:I,i:!1,c:null,e:null,s:e,x:null,r:g,l:null}}function Wt(e){var t=I,n=t.e;if(n!==null){t.e=null;for(var r of n)mn(r)}return e!==void 0&&(t.x=e),t.i=!0,I=t.p,e??{}}function zt(){return!0}let pe=[];function Gt(){var e=pe;pe=[],lr(e)}function ge(e){if(pe.length===0&&!Ce){var t=pe;queueMicrotask(()=>{t===pe&&Gt()})}pe.push(e)}function kr(){for(;pe.length>0;)Gt()}function Kt(e){var t=g;if(t===null)return p.f|=le,e;if((t.f&se)===0&&(t.f&xe)===0)throw e;oe(e,t)}function oe(e,t){for(;t!==null;){if((t.f&tt)!==0){if((t.f&se)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Ar=-7169;function E(e,t){e.f=e.f&Ar|t}function at(e){(e.f&P)!==0||e.deps===null?E(e,S):E(e,J)}function Xt(e){if(e!==null)for(const t of e)(t.f&x)===0||(t.f&_e)===0||(t.f^=_e,Xt(t.deps))}function Zt(e,t,n){(e.f&O)!==0?t.add(e):(e.f&J)!==0&&n.add(e),Xt(e.deps),E(e,S)}const ae=new Set;let y=null,U=null,ft=null,Ce=!1,ut=!1,ke=null,Je=null;var Qt=0;let Or=1;class fe{id=Or++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#s=new Map;#a=new Map;#l=null;#t=[];#r=new Set;#i=new Set;#o=new Map;is_fork=!1;#c=!1;#f=new Set;#d(){return this.is_fork||this.#a.size>0}#v(){for(const r of this.#f)for(const i of r.#a.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#o.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#o.has(t)||this.#o.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#o.get(t);if(n){this.#o.delete(t);for(var r of n.d)E(r,O),this.schedule(r);for(r of n.m)E(r,J),this.schedule(r)}}#h(){if(Qt++>1e3&&(ae.delete(this),Rr()),!this.#d()){for(const o of this.#r)this.#i.delete(o),E(o,O),this.schedule(o);for(const o of this.#i)E(o,J),this.schedule(o)}const t=this.#t;this.#t=[],this.apply();var n=ke=[],r=[],i=Je=[];for(const o of t)try{this.#u(o,n,r)}catch(f){throw sn(o),f}if(y=null,i.length>0){var s=fe.ensure();for(const o of i)s.schedule(o)}if(ke=null,Je=null,this.#d()||this.#v()){this.#_(r),this.#_(n);for(const[o,f]of this.#o)rn(o,f)}else{this.#s.size===0&&ae.delete(this),this.#r.clear(),this.#i.clear();for(const o of this.#e)o(this);this.#e.clear(),en(r),en(n),this.#l?.resolve()}var l=y;if(this.#t.length>0){const o=l??=this;o.#t.push(...this.#t.filter(f=>!o.#t.includes(f)))}l!==null&&(ae.add(l),l.#h()),ae.has(this)||this.#p()}#u(t,n,r){t.f^=S;for(var i=t.first;i!==null;){var s=i.f,l=(s&(G|re))!==0,o=l&&(s&S)!==0,f=o||(s&ie)!==0||this.#o.has(i);if(!f&&i.fn!==null){l?i.f^=S:(s&xe)!==0?n.push(i):je(i)&&((s&ne)!==0&&this.#i.add(i),Ae(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}}}#_(t){for(var n=0;n<t.length;n+=1)Zt(t[n],this.#r,this.#i)}capture(t,n,r=!1){n!==k&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&le)===0&&(this.current.set(t,[t.v,r]),U?.set(t,t.v))}activate(){y=this}deactivate(){y=null,U=null}flush(){try{ut=!0,y=this,this.#h()}finally{Qt=0,ft=null,ke=null,Je=null,ut=!1,y=null,U=null,ue.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),ae.delete(this)}#p(){for(const a of ae){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)tn(o,i,s,l);if(a.#t.length>0){a.apply();for(var f of a.#t)a.#u(f,[],[]);a.#t=[]}a.deactivate()}}for(const a of ae)a.#f.has(this)&&(a.#f.delete(this),a.#f.size===0&&!a.#d()&&(a.activate(),a.#h()))}increment(t,n){let r=this.#s.get(n)??0;if(this.#s.set(n,r+1),t){let i=this.#a.get(n)??0;this.#a.set(n,i+1)}}decrement(t,n,r){let i=this.#s.get(n)??0;if(i===1?this.#s.delete(n):this.#s.set(n,i-1),t){let s=this.#a.get(n)??0;s===1?this.#a.delete(n):this.#a.set(n,s-1)}this.#c||r||(this.#c=!0,ge(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#r.add(r);for(const r of n)this.#i.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#l??=Ft()).promise}static ensure(){if(y===null){const t=y=new fe;ut||(ae.add(y),Ce||ge(()=>{y===t&&t.flush()}))}return y}apply(){{U=null;return}}schedule(t){if(ft=t,t.b?.is_pending&&(t.f&(xe|Ve|Ht))!==0&&(t.f&se)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(ke!==null&&n===g&&(p===null||(p.f&x)===0))return;if((r&(re|G))!==0){if((r&S)===0)return;n.f^=S}}this.#t.push(n)}}function ct(e){var t=Ce;Ce=!0;try{for(var n;;){if(kr(),y===null)return n;y.flush()}}finally{Ce=t}}function Rr(){try{pr()}catch(e){oe(e,ft)}}let Z=null;function en(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(q|ie))===0&&je(r)&&(Z=new Set,Ae(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&$n(r),Z?.size>0)){ue.clear();for(const i of Z){if((i.f&(q|ie))!==0)continue;const s=[i];let l=i.parent;for(;l!==null;)Z.has(l)&&(Z.delete(l),s.push(l)),l=l.parent;for(let o=s.length-1;o>=0;o--){const f=s[o];(f.f&(q|ie))===0&&Ae(f)}}Z.clear()}}Z=null}}function tn(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&x)!==0?tn(i,t,n,r):(s&(rt|ne))!==0&&(s&O)===0&&nn(i,t,r)&&(E(i,O),dt(i))}}function nn(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(Ee.call(t,i))return!0;if((i.f&x)!==0&&nn(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function dt(e){y.schedule(e)}function rn(e,t){if(!((e.f&G)!==0&&(e.f&S)!==0)){(e.f&O)!==0?t.d.push(e):(e.f&J)!==0&&t.m.push(e),E(e,S);for(var n=e.first;n!==null;)rn(n,t),n=n.next}}function sn(e){E(e,S);for(var t=e.first;t!==null;)sn(t),t=t.next}function Cr(e){let t=0,n=Le(0),r;return()=>{mt()&&(d(n),bn(()=>(t===0&&(r=li(()=>e(()=>De(n)))),t+=1,()=>{ge(()=>{t-=1,t===0&&(r?.(),r=void 0,De(n))})})))}}var Lr=Ye|ve;function Dr(e,t,n,r){new Mr(e,t,n,r)}class Mr{parent;is_pending=!1;transform_error;#e;#n=$?b:null;#s;#a;#l;#t=null;#r=null;#i=null;#o=null;#c=0;#f=0;#d=!1;#v=new Set;#h=new Set;#u=null;#_=Cr(()=>(this.#u=Le(this.#c),()=>{this.#u=null}));constructor(t,n,r,i){this.#e=t,this.#s=n,this.#a=s=>{var l=g;l.b=this,l.f|=tt,r(s)},this.parent=g.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#l=ei(()=>{if($){const s=this.#n;Ut();const l=s.data===Lt;if(s.data.startsWith(Dt)){const f=JSON.parse(s.data.slice(Dt.length));this.#y(f)}else l?this.#$():this.#p()}else this.#m()},Lr),$&&(this.#e=b)}#p(){try{this.#t=me(()=>this.#a(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#s.failed;n&&(this.#i=me(()=>{n(this.#e,()=>t,()=>()=>{})}))}#$(){const t=this.#s.pending;t&&(this.is_pending=!0,this.#r=me(()=>t(this.#e)),ge(()=>{var n=this.#o=document.createDocumentFragment(),r=Pe();n.append(r),this.#t=this.#w(()=>me(()=>this.#a(r))),this.#f===0&&(this.#e.before(n),this.#o=null,Ge(this.#r,()=>{this.#r=null}),this.#g(y))}))}#m(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#c=0,this.#t=me(()=>{this.#a(this.#e)}),this.#f>0){var t=this.#o=document.createDocumentFragment();ri(this.#t,t);const n=this.#s.pending;this.#r=me(()=>n(this.#e))}else this.#g(y)}catch(n){this.error(n)}}#g(t){this.is_pending=!1,t.transfer_effects(this.#v,this.#h)}defer_effect(t){Zt(t,this.#v,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#s.pending}#w(t){var n=g,r=p,i=I;j(this.#l),R(this.#l),Ne(this.#l.ctx);try{return fe.ensure(),t()}catch(s){return Kt(s),null}finally{j(n),R(r),Ne(i)}}#b(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t,n);return}this.#f+=t,this.#f===0&&(this.#g(n),this.#r&&Ge(this.#r,()=>{this.#r=null}),this.#o&&(this.#e.before(this.#o),this.#o=null))}update_pending_count(t,n){this.#b(t,n),this.#c+=t,!(!this.#u||this.#d)&&(this.#d=!0,ge(()=>{this.#d=!1,this.#u&&ze(this.#u,this.#c)}))}get_effect_pending(){return this.#_(),d(this.#u)}error(t){var n=this.#s.onerror;let r=this.#s.failed;if(!n&&!r)throw t;this.#t&&(V(this.#t),this.#t=null),this.#r&&(V(this.#r),this.#r=null),this.#i&&(V(this.#i),this.#i=null),$&&(X(this.#n),Er(),X(Tr()));var i=!1,s=!1;const l=()=>{if(i){$r();return}i=!0,s&&yr(),this.#i!==null&&Ge(this.#i,()=>{this.#i=null}),this.#w(()=>{this.#m()})},o=f=>{try{s=!0,n?.(f,l),s=!1}catch(a){oe(a,this.#l&&this.#l.parent)}r&&(this.#i=this.#w(()=>{try{return me(()=>{var a=g;a.b=this,a.f|=tt,r(this.#e,()=>f,()=>l)})}catch(a){return oe(a,this.#l.parent),null}}))};ge(()=>{var f;try{f=this.transform_error(t)}catch(a){oe(a,this.#l&&this.#l.parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(o,a=>oe(a,this.#l&&this.#l.parent)):o(f)})}}function Pr(e,t,n,r){const i=ht;var s=e.filter(c=>!c.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var l=g,o=Ir(),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(_){(l.f&q)===0&&oe(_,l)}We()}if(n.length===0){f.then(()=>a(t.map(i)));return}var u=ln();function h(){Promise.all(n.map(c=>jr(c))).then(c=>a([...t.map(i),...c])).catch(c=>oe(c,l)).finally(()=>u())}f?f.then(()=>{o(),h(),We()}):h()}function Ir(){var e=g,t=p,n=I,r=y;return function(s=!0){j(e),R(t),Ne(n),s&&(e.f&q)===0&&(r?.activate(),r?.apply())}}function We(e=!0){j(null),R(null),Ne(null),e&&y?.deactivate()}function ln(){var e=g,t=e.b,n=y,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 ht(e){var t=x|O,n=p!==null&&(p.f&x)!==0?p:null;return g!==null&&(g.f|=ve),{ctx:I,deps:null,effects:null,equals:Yt,f:t,fn:e,reactions:null,rv:0,v:k,wv:0,parent:n??g,ac:null}}function jr(e,t,n){let r=g;r===null&&dr();var i=void 0,s=Le(k),l=!p,o=new Map;return Qr(()=>{var f=g,a=Ft();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).finally(We)}catch(_){a.reject(_),We()}var u=y;if(l){if((f.f&se)!==0)var h=ln();if(r.b.is_rendered())o.get(u)?.reject(K),o.delete(u);else{for(const _ of o.values())_.reject(K);o.clear()}o.set(u,a)}const c=(_,v=void 0)=>{if(h){var m=v===K;h(m)}if(!(v===K||(f.f&q)!==0)){if(u.activate(),v)s.f|=le,ze(s,v);else{(s.f&le)!==0&&(s.f^=le),ze(s,_);for(const[N,D]of o){if(o.delete(N),N===u)break;D.reject(K)}}u.deactivate()}};a.promise.then(c,_=>c(null,_||"unknown"))}),wn(()=>{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 on(e){const t=ht(e);return xn(t),t}function Fr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)V(t[n])}}function Hr(e){for(var t=e.parent;t!==null;){if((t.f&x)===0)return(t.f&q)===0?t:null;t=t.parent}return null}function vt(e){var t,n=g;j(Hr(e));try{e.f&=~_e,Fr(e),t=On(e)}finally{j(n)}return t}function an(e){var t=e.v,n=vt(e);if(!e.equals(n)&&(e.wv=kn(),(!y?.is_fork||e.deps===null)&&(e.v=n,y?.capture(e,t,!0),e.deps===null))){E(e,S);return}ce||(U!==null?(mt()||y?.is_fork)&&U.set(e,n):at(e))}function Br(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(K),t.teardown=sr,t.ac=null,Fe(t,0),bt(t))}function fn(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Ae(t)}let _t=new Set;const ue=new Map;let un=!1;function Le(e,t){var n={f:0,v:e,reactions:null,equals:Yt,rv:0,wv:0};return n}function A(e,t){const n=Le(e);return xn(n),n}function qr(e,t=!1,n=!0){const r=Le(e);return t||(r.equals=Sr),r}function T(e,t,n=!1){p!==null&&(!Y||(p.f&qt)!==0)&&zt()&&(p.f&(x|ne|rt|qt))!==0&&(F===null||!Ee.call(F,e))&&br();let r=n?Me(t):t;return ze(e,r,Je)}function ze(e,t,n=null){if(!e.equals(t)){var r=e.v;ce?ue.set(e,t):ue.set(e,r),e.v=t;var i=fe.ensure();if(i.capture(e,r),(e.f&x)!==0){const s=e;(e.f&O)!==0&&vt(s),U===null&&at(s)}e.wv=kn(),cn(e,O,n),g!==null&&(g.f&S)!==0&&(g.f&(G|re))===0&&(H===null?ii([e]):H.push(e)),!i.is_fork&&_t.size>0&&!un&&Ur()}return t}function Ur(){un=!1;for(const e of _t)(e.f&S)!==0&&E(e,J),je(e)&&Ae(e);_t.clear()}function Vr(e,t=1){var n=d(e),r=t===1?n++:n--;return T(e,n),r}function De(e){T(e,e.v+1)}function cn(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&O)===0;if(f&&E(l,t),(o&x)!==0){var a=l;U?.delete(a),(o&_e)===0&&(o&P&&(l.f|=_e),cn(a,J,n))}else if(f){var u=l;(o&ne)!==0&&Z!==null&&Z.add(u),n!==null?n.push(u):dt(u)}}}function Me(e){if(typeof e!="object"||e===null||it in e)return e;const t=It(e);if(t!==rr&&t!==ir)return e;var n=new Map,r=Qn(e),i=A(0),s=ye,l=o=>{if(ye===s)return o();var f=p,a=ye;R(null),Nn(s);var u=o();return R(f),Nn(a),u};return r&&n.set("length",A(e.length)),new Proxy(e,{defineProperty(o,f,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&wr();var u=n.get(f);return u===void 0?l(()=>{var h=A(a.value);return n.set(f,h),h}):T(u,a.value,!0),!0},deleteProperty(o,f){var a=n.get(f);if(a===void 0){if(f in o){const u=l(()=>A(k));n.set(f,u),De(i)}}else T(a,k),De(i);return!0},get(o,f,a){if(f===it)return e;var u=n.get(f),h=f in o;if(u===void 0&&(!h||Te(o,f)?.writable)&&(u=l(()=>{var _=Me(h?o[f]:k),v=A(_);return v}),n.set(f,u)),u!==void 0){var c=d(u);return c===k?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=d(u))}else if(a===void 0){var h=n.get(f),c=h?.v;if(h!==void 0&&c!==k)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return a},has(o,f){if(f===it)return!0;var a=n.get(f),u=a!==void 0&&a.v!==k||Reflect.has(o,f);if(a!==void 0||g!==null&&(!u||Te(o,f)?.writable)){a===void 0&&(a=l(()=>{var c=u?Me(o[f]):k,_=A(c);return _}),n.set(f,a));var h=d(a);if(h===k)return!1}return u},set(o,f,a,u){var h=n.get(f),c=f in o;if(r&&f==="length")for(var _=a;_<h.v;_+=1){var v=n.get(_+"");v!==void 0?T(v,k):_ in o&&(v=l(()=>A(k)),n.set(_+"",v))}if(h===void 0)(!c||Te(o,f)?.writable)&&(h=l(()=>A(void 0)),T(h,Me(a)),n.set(f,h));else{c=h.v!==k;var m=l(()=>Me(a));T(h,m)}var N=Reflect.getOwnPropertyDescriptor(o,f);if(N?.set&&N.set.call(u,a),!c){if(r&&typeof f=="string"){var D=n.get("length"),de=Number(f);Number.isInteger(de)&&de>=D.v&&T(D,de+1)}De(i)}return!0},ownKeys(o){d(i);var f=Reflect.ownKeys(o).filter(h=>{var c=n.get(h);return c===void 0||c.v!==k});for(var[a,u]of n)u.v!==k&&!(a in o)&&f.push(a);return f},setPrototypeOf(){mr()}})}var dn,hn,vn,_n;function pt(){if(dn===void 0){dn=window,hn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;vn=Te(t,"firstChild").get,_n=Te(t,"nextSibling").get,jt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),jt(n)&&(n.__t=void 0)}}function Pe(e=""){return document.createTextNode(e)}function Ie(e){return vn.call(e)}function Q(e){return _n.call(e)}function pn(e,t){if(!$)return Ie(e);var n=Ie(b);return n===null&&(n=b.appendChild(Pe())),X(n),n}function Yr(e,t=!1){if(!$){var n=Ie(e);return n instanceof Comment&&n.data===""?Q(n):n}if(t){if(b?.nodeType!==st){var r=Pe();return b?.before(r),X(r),r}gn(b)}return b}function ee(e,t=1,n=!1){let r=$?b:e;for(var i;t--;)i=r,r=Q(r);if(!$)return r;if(n){if(r?.nodeType!==st){var s=Pe();return r===null?i?.after(s):r.before(s),X(s),s}gn(r)}return X(r),r}function Jr(e){e.textContent=""}function gt(e,t,n){return document.createElementNS(Pt,e,void 0)}function gn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===st;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function wt(e){var t=p,n=g;R(null),j(null);try{return e()}finally{R(t),j(n)}}function Wr(e){g===null&&(p===null&&_r(),vr()),ce&&hr()}function zr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function W(e,t){var n=g;n!==null&&(n.f&ie)!==0&&(e|=ie);var r={ctx:I,deps:null,nodes:null,f:e|O|P,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&xe)!==0)ke!==null?ke.push(r):fe.ensure().schedule(r);else if(t!==null){try{Ae(r)}catch(l){throw V(r),l}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&ve)===0&&(i=i.first,(e&ne)!==0&&(e&Ye)!==0&&i!==null&&(i.f|=Ye))}if(i!==null&&(i.parent=n,n!==null&&zr(i,n),p!==null&&(p.f&x)!==0&&(e&re)===0)){var s=p;(s.effects??=[]).push(i)}return r}function mt(){return p!==null&&!Y}function wn(e){const t=W(Ve,null);return E(t,S),t.teardown=e,t}function Gr(e){Wr();var t=g.f,n=!p&&(t&G)!==0&&(t&se)===0;if(n){var r=I;(r.e??=[]).push(e)}else return mn(e)}function mn(e){return W(xe|ar,e)}function Kr(e){fe.ensure();const t=W(re|ve,e);return()=>{V(t)}}function Xr(e){fe.ensure();const t=W(re|ve,e);return(n={})=>new Promise(r=>{n.outro?Ge(t,()=>{V(t),r(void 0)}):(V(t),r(void 0))})}function Zr(e){return W(xe,e)}function Qr(e){return W(rt|ve,e)}function bn(e,t=0){return W(Ve|t,e)}function we(e,t=[],n=[],r=[]){Pr(r,t,n,i=>{W(Ve,()=>e(...i.map(d)))})}function ei(e,t=0){var n=W(ne|t,e);return n}function me(e){return W(G|ve,e)}function yn(e){var t=e.teardown;if(t!==null){const n=ce,r=p;Tn(!0),R(null);try{t.call(null)}finally{Tn(n),R(r)}}}function bt(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&re)!==0?n.parent=null:V(n,t),n=r}}function ti(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&G)===0&&V(t),t=n}}function V(e,t=!0){var n=!1;(t||(e.f&or)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ni(e.nodes.start,e.nodes.end),n=!0),E(e,Bt),bt(e,t&&!n),Fe(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();yn(e),e.f^=Bt,e.f|=q;var i=e.parent;i!==null&&i.first!==null&&$n(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ni(e,t){for(;e!==null;){var n=e===t?null:Q(e);e.remove(),e=n}}function $n(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 Ge(e,t,n=!0){var r=[];En(e,r,!0);var i=()=>{n&&V(e),t&&t()},s=r.length;if(s>0){var l=()=>--s||i();for(var o of r)o.out(l)}else i()}function En(e,t,n){if((e.f&ie)===0){e.f^=ie;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&Ye)!==0||(i.f&G)!==0&&(e.f&ne)!==0;En(i,t,l?n:!1),i=s}}}function ri(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Q(n);t.append(n),n=i}}let Ke=!1,ce=!1;function Tn(e){ce=e}let p=null,Y=!1;function R(e){p=e}let g=null;function j(e){g=e}let F=null;function xn(e){p!==null&&(F===null?F=[e]:F.push(e))}let C=null,L=0,H=null;function ii(e){H=e}let Sn=1,be=0,ye=be;function Nn(e){ye=e}function kn(){return++Sn}function je(e){var t=e.f;if((t&O)!==0)return!0;if(t&x&&(e.f&=~_e),(t&J)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(je(s)&&an(s),s.wv>e.wv)return!0}(t&P)!==0&&U===null&&E(e,S)}return!1}function An(e,t,n=!0){var r=e.reactions;if(r!==null&&!(F!==null&&Ee.call(F,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&x)!==0?An(s,t,!1):t===s&&(n?E(s,O):(s.f&S)!==0&&E(s,J),dt(s))}}function On(e){var t=C,n=L,r=H,i=p,s=F,l=I,o=Y,f=ye,a=e.f;C=null,L=0,H=null,p=(a&(G|re))===0?e:null,F=null,Ne(e.ctx),Y=!1,ye=++be,e.ac!==null&&(wt(()=>{e.ac.abort(K)}),e.ac=null);try{e.f|=nt;var u=e.fn,h=u();e.f|=se;var c=e.deps,_=y?.is_fork;if(C!==null){var v;if(_||Fe(e,L),c!==null&&L>0)for(c.length=L+C.length,v=0;v<C.length;v++)c[L+v]=C[v];else e.deps=c=C;if(mt()&&(e.f&P)!==0)for(v=L;v<c.length;v++)(c[v].reactions??=[]).push(e)}else!_&&c!==null&&L<c.length&&(Fe(e,L),c.length=L);if(zt()&&H!==null&&!Y&&c!==null&&(e.f&(x|J|O))===0)for(v=0;v<H.length;v++)An(H[v],e);if(i!==null&&i!==e){if(be++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=be;if(t!==null)for(const m of t)m.rv=be;H!==null&&(r===null?r=H:r.push(...H))}return(e.f&le)!==0&&(e.f^=le),h}catch(m){return Kt(m)}finally{e.f^=nt,C=t,L=n,H=r,p=i,F=s,Ne(l),Y=o,ye=f}}function si(e,t){let n=t.reactions;if(n!==null){var r=er.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&x)!==0&&(C===null||!Ee.call(C,t))){var s=t;(s.f&P)!==0&&(s.f^=P,s.f&=~_e),at(s),Br(s),Fe(s,0)}}function Fe(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)si(e,n[r])}function Ae(e){var t=e.f;if((t&q)===0){E(e,S);var n=g,r=Ke;g=e,Ke=!0;try{(t&(ne|Ht))!==0?ti(e):bt(e),yn(e);var i=On(e);e.teardown=typeof i=="function"?i:null,e.wv=Sn;var s;Zn&&Nr&&(e.f&O)!==0&&e.deps}finally{Ke=r,g=n}}}function d(e){var t=e.f,n=(t&x)!==0;if(p!==null&&!Y){var r=g!==null&&(g.f&q)!==0;if(!r&&(F===null||!Ee.call(F,e))){var i=p.deps;if((p.f&nt)!==0)e.rv<be&&(e.rv=be,C===null&&i!==null&&i[L]===e?L++:C===null?C=[e]:C.push(e));else{(p.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[p]:Ee.call(s,p)||s.push(p)}}}if(ce&&ue.has(e))return ue.get(e);if(n){var l=e;if(ce){var o=l.v;return((l.f&S)===0&&l.reactions!==null||Cn(l))&&(o=vt(l)),ue.set(l,o),o}var f=(l.f&P)===0&&!Y&&p!==null&&(Ke||(p.f&P)!==0),a=(l.f&se)===0;je(l)&&(f&&(l.f|=P),an(l)),f&&!a&&(fn(l),Rn(l))}if(U?.has(e))return U.get(e);if((e.f&le)!==0)throw e.v;return e.v}function Rn(e){if(e.f|=P,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&x)!==0&&(t.f&P)===0&&(fn(t),Rn(t))}function Cn(e){if(e.v===k)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ue.has(t)||(t.f&x)!==0&&Cn(t))return!0;return!1}function li(e){var t=Y;try{return Y=!0,e()}finally{Y=t}}const He=Symbol("events"),Ln=new Set,yt=new Set;function oi(e,t,n,r={}){function i(s){if(r.capture||$t.call(t,s),!s.cancelBubble)return wt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ge(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Xe(e,t,n,r,i){var s={capture:r,passive:i},l=oi(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&wn(()=>{t.removeEventListener(e,l,s)})}function Oe(e,t,n){(t[He]??={})[e]=n}function ai(e){for(var t=0;t<e.length;t++)Ln.add(e[t]);for(var n of yt)n(e)}let Dn=null;function $t(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Dn=e;var l=0,o=Dn===e&&e[He];if(o){var f=i.indexOf(o);if(f!==-1&&(t===document||t===window)){e[He]=t;return}var a=i.indexOf(t);if(a===-1)return;f<=a&&(l=f)}if(s=i[l]||e.target,s!==t){Ue(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=p,h=g;R(null),j(null);try{for(var c,_=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var m=s[He]?.[r];m!=null&&(!s.disabled||e.target===s)&&m.call(s,e)}catch(N){c?_.push(N):c=N}if(e.cancelBubble||v===t||v===null)break;s=v}if(c){for(let N of _)queueMicrotask(()=>{throw N});throw c}}finally{e[He]=t,delete e.currentTarget,R(u),j(h)}}}const fi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function ui(e){return fi?.createHTML(e)??e}function ci(e){var t=gt("template");return t.innerHTML=ui(e.replaceAll("<!>","<!---->")),t.content}function Et(e,t){var n=g;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function di(e,t){var n=(t&Xn)!==0,r,i=!e.startsWith("<!>");return()=>{if($)return Et(b,null),b;r===void 0&&(r=ci(i?e:"<!>"+e));var s=n||hn?document.importNode(r,!0):r.cloneNode(!0);{var l=Ie(s),o=s.lastChild;Et(l,o)}return s}}function Mn(e,t){if($){var n=g;((n.f&se)===0||n.nodes.end===null)&&(n.nodes.end=b),Ut();return}e!==null&&e.before(t)}const hi=["touchstart","touchmove"];function vi(e){return hi.includes(e)}function Pn(e,t){return In(e,t)}function _i(e,t){pt(),t.intro=t.intro??!1;const n=t.target,r=$,i=b;try{for(var s=Ie(n);s&&(s.nodeType!==lt||s.data!==Ct);)s=Q(s);if(!s)throw Re;Se(!0),X(s);const l=In(e,{...t,anchor:s});return Se(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
|
|
2
|
-
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw l;return l!==Re&&console.warn("Failed to hydrate: ",l),t.recover===!1&&gr(),pt(),Jr(n),Se(!1),Pn(e,t)}finally{Se(r),X(i)}}const Ze=new Map;function In(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:l=!0,transformError:o}){pt();var f=void 0,a=Xr(()=>{var u=n??t.appendChild(Pe());Dr(u,{pending:()=>{}},_=>{Jt({});var v=I;if(s&&(v.c=s),i&&(r.$$events=i),$&&Et(_,null),f=e(_,r)||{},$&&(g.nodes.end=b,b===null||b.nodeType!==lt||b.data!==Mt))throw ot(),Re;Wt()},o);var h=new Set,c=_=>{for(var v=0;v<_.length;v++){var m=_[v];if(!h.has(m)){h.add(m);var N=vi(m);for(const Be of[t,document]){var D=Ze.get(Be);D===void 0&&(D=new Map,Ze.set(Be,D));var de=D.get(m);de===void 0?(Be.addEventListener(m,$t,{passive:N}),D.set(m,1)):D.set(m,de+1)}}}};return c(tr(Ln)),yt.add(c),()=>{for(var _ of h)for(const N of[t,document]){var v=Ze.get(N),m=v.get(_);--m==0?(N.removeEventListener(_,$t),v.delete(_),v.size===0&&Ze.delete(N)):v.set(_,m)}yt.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return Tt.set(f,a),f}let Tt=new WeakMap;function pi(e,t){const n=Tt.get(e);return n?(Tt.delete(e),n(t)):Promise.resolve()}function gi(e,t){Zr(()=>{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 wi=Symbol("is custom element"),mi=Symbol("is html"),bi=cr?"link":"LINK";function yi(e,t,n,r){var i=$i(e);$&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===bi)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[ur]=n),n==null?e.removeAttribute(t):typeof n!="string"&&jn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function B(e,t,n){var r=p,i=g;let s=$;$&&Se(!1),R(null),j(null);try{t!=="style"&&(xt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?jn(e).includes(t):n&&typeof n=="object")?e[t]=n:yi(e,t,n==null?n:String(n))}finally{R(r),j(i),s&&Se(!0)}}function $i(e){return e.__attributes??={[wi]:e.nodeName.includes("-"),[mi]:e.namespaceURI===Pt}}var xt=new Map;function jn(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=nr(i);for(var l in r)r[l].set&&n.push(l);i=It(i)}return n}function Fn(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=ht(()=>(a=!1,f())),h=g;return(function(c,_){if(arguments.length>0){const v=_?d(u):c;return T(u,v),a=!0,i!==void 0&&(i=v),c}return ce&&a||(h.f&q)!==0?u.v:d(u)})}function Ei(e){return new Ti(e)}class Ti{#e;#n;constructor(t){var n=new Map,r=(s,l)=>{var o=qr(l,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,l){return d(n.get(l)??r(l,Reflect.get(s,l)))},has(s,l){return l===fr?!0:(d(n.get(l)??r(l,Reflect.get(s,l))),Reflect.has(s,l))},set(s,l,o){return T(n.get(l)??r(l,o),o),Reflect.set(s,l,o)}});this.#n=(t.hydrate?_i:Pn)(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)&&ct(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||Ue(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=()=>{pi(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 Hn;typeof HTMLElement=="function"&&(Hn=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),Mn(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=xi(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]=Qe(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=Ei({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Kr(()=>{bn(()=>{this.$$r=!0;for(const r of qe(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Qe(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]=Qe(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 qe(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Qe(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 xi(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Si(e,t,n,r,i,s){let l=class extends Hn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return qe(t).map(o=>(t[o].attribute||o).toLowerCase())}};return qe(t).forEach(o=>{Ue(l.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){f=Qe(o,f,t),this.$$d[o]=f;var a=this.$$c;if(a){var u=Te(a,o)?.get;u?a[o]=f:a.$set({[o]:f})}}})}),r.forEach(o=>{Ue(l.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=l,l}const Bn={version:"0.66.1"};var $e={},qn;function Ni(){if(qn)return $e;qn=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.LanguageTranslator=void 0,$e.getChildStyleToPass=e,$e.addComponent=t;function e(r,i){var s,l,o="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((l=i?.filter(function(c){return Object.keys(r).includes(c.name)}))===null||l===void 0)&&l.length))for(var f=function(c){var _=i?.filter(function(v){return v.name===c&&v.defaultValue!==r[c]});_&&(o+="".concat(c,":").concat(r[c],";"))},a=0,u=Object.keys(r);a<u.length;a++){var h=u[a];f(h)}}catch(c){console.error("error getting child style to pass",c)}finally{return o}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var l=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var o=document.createElement("script");if(o.id=s+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(l),r?.local)o.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var f=s.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(s.replace(f+"-",""),"/").concat(l)}document.head.appendChild(o)}catch(a){console.warn(a)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,l){return r.formatDate(i,s,l||this.lang)},r.getDefaultLang=function(){var i,s,l,o="en";return navigator?.languages&&(!((l=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||l===void 0)&&l.length)&&(o=navigator.languages[0].split("-")[0].toLowerCase()),o},r.getDictionaryWord=function(i,s,l){var o;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(l&&(!((o=s[l])===null||o===void 0)&&o[i]))return s[l][i];var f="",a=r.getDefaultLang();if(!l||a!==l){var u=s?.[a];u?.[i]&&(f=u[i])}return f},r.formatDate=function(i,s,l){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(l||r.getDefaultLang(),s);return o.format(i)},r})();return $e.LanguageTranslator=n,$e}var Un=Ni(),ki=di('<div part="controller" id="controller" class="svelte-1swbd4i"><button>clear</button> <button>select</button> <button>draw</button> <button>undo</button> <button>redo</button> <button>save</button> <button>brush</button> <br/>load:<hb-input-file></hb-input-file> insert:<hb-input-file></hb-input-file></div> <div part="paper-container" id="paper-container" style="position:relative" class="svelte-1swbd4i"><hb-stylus-paper></hb-stylus-paper></div>',3);const Ai={hash:"svelte-1swbd4i",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;position:absolute;width:100%;height:100%;display:block;display:grid;grid-template-areas:"header" "paper";grid-template-columns:1fr;grid-template-rows:auto 1fr;}#controller.svelte-1swbd4i {grid-area:header;}#paper-container.svelte-1swbd4i {grid-area:paper;background:green;}'};function Vn(e,t){Jt(t,!0),gi(e,Ai);let n=Fn(t,"id",7,""),r=Fn(t,"load_draw"),i=A("draw"),s=A(0),l=A(void 0),o=A(!1),f=A(void 0),a=A(void 0),u=A(void 0),h=A(void 0),c=on(()=>(d(l)===0||d(l))&&d(l)<d(s)),_=on(()=>(d(s)||d(s)===0)&&d(o)&&(!d(l)||d(l)!==-1)&&(!d(h)||d(h)<d(s)&&(!d(l)||d(l)<d(h))));Gr(()=>{if(typeof r()=="string"&&r()?.length)try{r(JSON.parse(r()))}catch(w){console.error("error parsing json",w)}}),Un.addComponent({repoName:"@htmlbricks/hb-stylus-paper",version:Bn.version}),Un.addComponent({repoName:"@htmlbricks/hb-input-file",version:Bn.version});function v(w,he){var te="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(w)),M=document.createElement("a");M.setAttribute("href",te),M.setAttribute("download",he),document.body.appendChild(M),M.click(),M.remove()}function m(w){T(i,w,!0)}function N(){console.log("ch",d(s),d(l)),d(s)>=0&&(!d(l)||d(l)>-1)&&(T(l,d(l)||d(l)===0?d(l)-1:d(s)-1,!0),console.log("undo",d(s),d(l)))}function D(){console.log(d(s),d(l)),(d(l)||d(l)===0)&&d(l)<=d(s)&&(Vr(l),console.log("redo",d(s),d(l)))}function de(w){d(o)||T(o,!0),console.log("h",w),T(s,w.index-1),w.start_index&&T(h,w.start_index,!0),T(l,void 0)}function Be(){T(f,{name:"test",type:"json"},!0)}function Oi(w){const he=w.value?.name;if(he){const te=new FileReader;te.readAsDataURL(w.value),te.onload=function(M){try{if(console.log("insert file",M.target,M.target?.result),M.target?.result){const Mi=M.target.result.toString().split(";")[0].split("/")[1];T(a,{base64:M.target.result.toString(),type:Mi,name:he},!0)}}catch{console.error("error loading file")}},te.onerror=function(M){console.error("error reading file")}}}function Ri(w){console.log("save",w),T(f,void 0),v(w,w?.name+".json")}function Ci(w){if(console.log("file",w),w.value?.name){const he=new FileReader;he.readAsText(w.value,"UTF-8"),he.onload=function(te){if(te?.target?.result?.toString())try{r(JSON.parse(te.target.result.toString()))}catch{console.error("error loading file")}},he.onerror=function(te){console.error("error reading file")}}}var Li={get id(){return n()},set id(w=""){n(w),ct()},get load_draw(){return r()},set load_draw(w){r(w),ct()}},Yn=ki(),St=Yr(Yn),Jn=pn(St),Wn=ee(Jn,2),zn=ee(Wn,2),Nt=ee(zn,2),kt=ee(Nt,2),At=ee(kt,2),Gn=ee(At,2),et=ee(Gn,4);B(et,"id","loadfile"),B(et,"schemaentry",JSON.stringify({label:"ciao",id:"xxxxxxx"}));var Ot=ee(et,2);B(Ot,"id","insertfile"),B(Ot,"schemaentry",JSON.stringify({label:"ciao"})),Vt(St);var Kn=ee(St,2),z=pn(Kn);return B(z,"id","stylus-paper"),we(()=>B(z,"goto",d(l))),B(z,"background_color","green"),we(()=>B(z,"mode",d(i))),we(()=>B(z,"save_as",d(f)?JSON.stringify(d(f)):"")),we(()=>B(z,"load_draw",r()?JSON.stringify(r()):null)),we(()=>B(z,"insert_image",d(a)?JSON.stringify(d(a)):null)),we(()=>B(z,"insert_text",d(u)?JSON.stringify(d(u)):null)),Vt(Kn),we(()=>{Nt.disabled=!d(_),kt.disabled=!d(c),At.disabled=!d(_),Gn.disabled=d(i)!=="draw"}),Oe("click",Jn,()=>m("eraser")),Oe("click",Wn,()=>m("select")),Oe("click",zn,()=>m("draw")),Oe("click",Nt,()=>N()),Oe("click",kt,()=>D()),Oe("click",At,()=>Be()),Xe("setVal",et,w=>Ci(w.detail)),Xe("setVal",Ot,w=>Oi(w.detail)),Xe("historyIndex",z,w=>de(w.detail)),Xe("save",z,w=>Ri(w.detail)),Mn(e,Yn),Wt(Li)}ai(["click"]),customElements.define("hb-stylus-notebook",Si(Vn,{id:{},load_draw:{}},[],[],{mode:"open"})),Rt.Component=Vn,Object.defineProperty(Rt,Symbol.toStringTag,{value:"Module"})})(this["stylus-notebook"]=this["stylus-notebook"]||{});
|
|
2
|
+
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw l;return l!==Re&&console.warn("Failed to hydrate: ",l),t.recover===!1&&gr(),pt(),Jr(n),Se(!1),Pn(e,t)}finally{Se(r),X(i)}}const Ze=new Map;function In(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:l=!0,transformError:o}){pt();var f=void 0,a=Xr(()=>{var u=n??t.appendChild(Pe());Dr(u,{pending:()=>{}},_=>{Jt({});var v=I;if(s&&(v.c=s),i&&(r.$$events=i),$&&Et(_,null),f=e(_,r)||{},$&&(g.nodes.end=b,b===null||b.nodeType!==lt||b.data!==Mt))throw ot(),Re;Wt()},o);var h=new Set,c=_=>{for(var v=0;v<_.length;v++){var m=_[v];if(!h.has(m)){h.add(m);var N=vi(m);for(const Be of[t,document]){var D=Ze.get(Be);D===void 0&&(D=new Map,Ze.set(Be,D));var de=D.get(m);de===void 0?(Be.addEventListener(m,$t,{passive:N}),D.set(m,1)):D.set(m,de+1)}}}};return c(tr(Ln)),yt.add(c),()=>{for(var _ of h)for(const N of[t,document]){var v=Ze.get(N),m=v.get(_);--m==0?(N.removeEventListener(_,$t),v.delete(_),v.size===0&&Ze.delete(N)):v.set(_,m)}yt.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return Tt.set(f,a),f}let Tt=new WeakMap;function pi(e,t){const n=Tt.get(e);return n?(Tt.delete(e),n(t)):Promise.resolve()}function gi(e,t){Zr(()=>{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 wi=Symbol("is custom element"),mi=Symbol("is html"),bi=cr?"link":"LINK";function yi(e,t,n,r){var i=$i(e);$&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===bi)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[ur]=n),n==null?e.removeAttribute(t):typeof n!="string"&&jn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function B(e,t,n){var r=p,i=g;let s=$;$&&Se(!1),R(null),j(null);try{t!=="style"&&(xt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?jn(e).includes(t):n&&typeof n=="object")?e[t]=n:yi(e,t,n==null?n:String(n))}finally{R(r),j(i),s&&Se(!0)}}function $i(e){return e.__attributes??={[wi]:e.nodeName.includes("-"),[mi]:e.namespaceURI===Pt}}var xt=new Map;function jn(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=nr(i);for(var l in r)r[l].set&&n.push(l);i=It(i)}return n}function Fn(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=ht(()=>(a=!1,f())),h=g;return(function(c,_){if(arguments.length>0){const v=_?d(u):c;return T(u,v),a=!0,i!==void 0&&(i=v),c}return ce&&a||(h.f&q)!==0?u.v:d(u)})}function Ei(e){return new Ti(e)}class Ti{#e;#n;constructor(t){var n=new Map,r=(s,l)=>{var o=qr(l,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,l){return d(n.get(l)??r(l,Reflect.get(s,l)))},has(s,l){return l===fr?!0:(d(n.get(l)??r(l,Reflect.get(s,l))),Reflect.has(s,l))},set(s,l,o){return T(n.get(l)??r(l,o),o),Reflect.set(s,l,o)}});this.#n=(t.hydrate?_i:Pn)(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)&&ct(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||Ue(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=()=>{pi(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 Hn;typeof HTMLElement=="function"&&(Hn=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),Mn(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=xi(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]=Qe(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=Ei({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Kr(()=>{bn(()=>{this.$$r=!0;for(const r of qe(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Qe(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]=Qe(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 qe(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Qe(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 xi(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Si(e,t,n,r,i,s){let l=class extends Hn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return qe(t).map(o=>(t[o].attribute||o).toLowerCase())}};return qe(t).forEach(o=>{Ue(l.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){f=Qe(o,f,t),this.$$d[o]=f;var a=this.$$c;if(a){var u=Te(a,o)?.get;u?a[o]=f:a.$set({[o]:f})}}})}),r.forEach(o=>{Ue(l.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=l,l}const Bn={version:"0.66.3"};var $e={},qn;function Ni(){if(qn)return $e;qn=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.LanguageTranslator=void 0,$e.getChildStyleToPass=e,$e.addComponent=t;function e(r,i){var s,l,o="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((l=i?.filter(function(c){return Object.keys(r).includes(c.name)}))===null||l===void 0)&&l.length))for(var f=function(c){var _=i?.filter(function(v){return v.name===c&&v.defaultValue!==r[c]});_&&(o+="".concat(c,":").concat(r[c],";"))},a=0,u=Object.keys(r);a<u.length;a++){var h=u[a];f(h)}}catch(c){console.error("error getting child style to pass",c)}finally{return o}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var l=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var o=document.createElement("script");if(o.id=s+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(l),r?.local)o.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var f=s.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(s.replace(f+"-",""),"/").concat(l)}document.head.appendChild(o)}catch(a){console.warn(a)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,l){return r.formatDate(i,s,l||this.lang)},r.getDefaultLang=function(){var i,s,l,o="en";return navigator?.languages&&(!((l=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||l===void 0)&&l.length)&&(o=navigator.languages[0].split("-")[0].toLowerCase()),o},r.getDictionaryWord=function(i,s,l){var o;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(l&&(!((o=s[l])===null||o===void 0)&&o[i]))return s[l][i];var f="",a=r.getDefaultLang();if(!l||a!==l){var u=s?.[a];u?.[i]&&(f=u[i])}return f},r.formatDate=function(i,s,l){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(l||r.getDefaultLang(),s);return o.format(i)},r})();return $e.LanguageTranslator=n,$e}var Un=Ni(),ki=di('<div part="controller" id="controller" class="svelte-1swbd4i"><button>clear</button> <button>select</button> <button>draw</button> <button>undo</button> <button>redo</button> <button>save</button> <button>brush</button> <br/>load:<hb-input-file></hb-input-file> insert:<hb-input-file></hb-input-file></div> <div part="paper-container" id="paper-container" style="position:relative" class="svelte-1swbd4i"><hb-stylus-paper></hb-stylus-paper></div>',3);const Ai={hash:"svelte-1swbd4i",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;position:absolute;width:100%;height:100%;display:block;display:grid;grid-template-areas:"header" "paper";grid-template-columns:1fr;grid-template-rows:auto 1fr;}#controller.svelte-1swbd4i {grid-area:header;}#paper-container.svelte-1swbd4i {grid-area:paper;background:green;}'};function Vn(e,t){Jt(t,!0),gi(e,Ai);let n=Fn(t,"id",7,""),r=Fn(t,"load_draw"),i=A("draw"),s=A(0),l=A(void 0),o=A(!1),f=A(void 0),a=A(void 0),u=A(void 0),h=A(void 0),c=on(()=>(d(l)===0||d(l))&&d(l)<d(s)),_=on(()=>(d(s)||d(s)===0)&&d(o)&&(!d(l)||d(l)!==-1)&&(!d(h)||d(h)<d(s)&&(!d(l)||d(l)<d(h))));Gr(()=>{if(typeof r()=="string"&&r()?.length)try{r(JSON.parse(r()))}catch(w){console.error("error parsing json",w)}}),Un.addComponent({repoName:"@htmlbricks/hb-stylus-paper",version:Bn.version}),Un.addComponent({repoName:"@htmlbricks/hb-input-file",version:Bn.version});function v(w,he){var te="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(w)),M=document.createElement("a");M.setAttribute("href",te),M.setAttribute("download",he),document.body.appendChild(M),M.click(),M.remove()}function m(w){T(i,w,!0)}function N(){console.log("ch",d(s),d(l)),d(s)>=0&&(!d(l)||d(l)>-1)&&(T(l,d(l)||d(l)===0?d(l)-1:d(s)-1,!0),console.log("undo",d(s),d(l)))}function D(){console.log(d(s),d(l)),(d(l)||d(l)===0)&&d(l)<=d(s)&&(Vr(l),console.log("redo",d(s),d(l)))}function de(w){d(o)||T(o,!0),console.log("h",w),T(s,w.index-1),w.start_index&&T(h,w.start_index,!0),T(l,void 0)}function Be(){T(f,{name:"test",type:"json"},!0)}function Oi(w){const he=w.value?.name;if(he){const te=new FileReader;te.readAsDataURL(w.value),te.onload=function(M){try{if(console.log("insert file",M.target,M.target?.result),M.target?.result){const Mi=M.target.result.toString().split(";")[0].split("/")[1];T(a,{base64:M.target.result.toString(),type:Mi,name:he},!0)}}catch{console.error("error loading file")}},te.onerror=function(M){console.error("error reading file")}}}function Ri(w){console.log("save",w),T(f,void 0),v(w,w?.name+".json")}function Ci(w){if(console.log("file",w),w.value?.name){const he=new FileReader;he.readAsText(w.value,"UTF-8"),he.onload=function(te){if(te?.target?.result?.toString())try{r(JSON.parse(te.target.result.toString()))}catch{console.error("error loading file")}},he.onerror=function(te){console.error("error reading file")}}}var Li={get id(){return n()},set id(w=""){n(w),ct()},get load_draw(){return r()},set load_draw(w){r(w),ct()}},Yn=ki(),St=Yr(Yn),Jn=pn(St),Wn=ee(Jn,2),zn=ee(Wn,2),Nt=ee(zn,2),kt=ee(Nt,2),At=ee(kt,2),Gn=ee(At,2),et=ee(Gn,4);B(et,"id","loadfile"),B(et,"schemaentry",JSON.stringify({label:"ciao",id:"xxxxxxx"}));var Ot=ee(et,2);B(Ot,"id","insertfile"),B(Ot,"schemaentry",JSON.stringify({label:"ciao"})),Vt(St);var Kn=ee(St,2),z=pn(Kn);return B(z,"id","stylus-paper"),we(()=>B(z,"goto",d(l))),B(z,"background_color","green"),we(()=>B(z,"mode",d(i))),we(()=>B(z,"save_as",d(f)?JSON.stringify(d(f)):"")),we(()=>B(z,"load_draw",r()?JSON.stringify(r()):null)),we(()=>B(z,"insert_image",d(a)?JSON.stringify(d(a)):null)),we(()=>B(z,"insert_text",d(u)?JSON.stringify(d(u)):null)),Vt(Kn),we(()=>{Nt.disabled=!d(_),kt.disabled=!d(c),At.disabled=!d(_),Gn.disabled=d(i)!=="draw"}),Oe("click",Jn,()=>m("eraser")),Oe("click",Wn,()=>m("select")),Oe("click",zn,()=>m("draw")),Oe("click",Nt,()=>N()),Oe("click",kt,()=>D()),Oe("click",At,()=>Be()),Xe("setVal",et,w=>Ci(w.detail)),Xe("setVal",Ot,w=>Oi(w.detail)),Xe("historyIndex",z,w=>de(w.detail)),Xe("save",z,w=>Ri(w.detail)),Mn(e,Yn),Wt(Li)}ai(["click"]),customElements.define("hb-stylus-notebook",Si(Vn,{id:{},load_draw:{}},[],[],{mode:"open"})),Rt.Component=Vn,Object.defineProperty(Rt,Symbol.toStringTag,{value:"Module"})})(this["stylus-notebook"]=this["stylus-notebook"]||{});
|
|
3
3
|
//# sourceMappingURL=main.iife.js.map
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlbricks/hb-stylus-notebook",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.3",
|
|
4
4
|
"contributors": [],
|
|
5
5
|
"description": "Notebook-sized stylus canvas: optional `load_draw` restores saved stroke JSON; `save` configures persistence; `debug` toggles diagnostics. Same slot/part hooks as the skeleton dev component; emits `event` on user actions.",
|
|
6
6
|
"licenses": [
|