inline-style-editor 1.5.3 → 1.5.4
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).InlineStyleEditor=e()}(this,(function(){"use strict";var t=!1,e=Array.isArray,n=Array.prototype.indexOf,r=Array.from,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,a=Object.prototype,s=Array.prototype,u=Object.getPrototypeOf,c=Object.isExtensible;function f(t){for(var e=0;e<t.length;e++)t[e]()}const d=32,h=64,v=128,p=256,g=512,m=1024,y=2048,b=4096,w=8192,_=16384,x=65536,k=1<<20,S=1<<21,C=Symbol("$state"),M=Symbol("legacy props"),E=Symbol("");function L(t){return t===this.v}function T(t){return e=t,n=this.v,!(e!=e?n==n:e!==n||null!==e&&"object"==typeof e||"function"==typeof e);var e,n}const A=Symbol();function N(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let $=null;function B(t){$=t}function O(t,e=!1,n){var r=$={p:$,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};!function(t){const e=at(8,null,!1);de(e,m),e.teardown=t}((()=>{r.d=!0}))}function D(t){const e=$;if(null!==e){void 0!==t&&(e.x=t);const l=e.e;if(null!==l){var n=Rt,r=Dt;e.e=null;try{for(var o=0;o<l.length;o++){var i=l[o];It(i.effect),Ht(i.reaction),ut(i.fn)}}finally{It(n),Ht(r)}}$=e.p,e.m=!0}return t||{}}function P(t){if("object"!=typeof t||null===t||C in t)return t;const n=u(t);if(n!==a&&n!==s)return t;var r=new Map,o=e(t),l=U(0),c=Dt,f=t=>{var e=Dt;Ht(c);var n=t();return Ht(e),n};return o&&r.set("length",U(t.length)),new Proxy(t,{defineProperty(t,e,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var o=r.get(e);return void 0===o?(o=f((()=>U(n.value))),r.set(e,o)):V(o,f((()=>P(n.value)))),!0},deleteProperty(t,e){var n=r.get(e);if(void 0===n)e in t&&(r.set(e,f((()=>U(A)))),H(l));else{if(o&&"string"==typeof e){var i=r.get("length"),a=Number(e);Number.isInteger(a)&&a<i.v&&V(i,a)}V(n,A),H(l)}return!0},get(e,n,o){if(n===C)return t;var l=r.get(n),a=n in e;if(void 0!==l||a&&!i(e,n)?.writable||(l=f((()=>U(P(a?e[n]:A)))),r.set(n,l)),void 0!==l){var s=ue(l);return s===A?void 0:s}return Reflect.get(e,n,o)},getOwnPropertyDescriptor(t,e){var n=Reflect.getOwnPropertyDescriptor(t,e);if(n&&"value"in n){var o=r.get(e);o&&(n.value=ue(o))}else if(void 0===n){var i=r.get(e),l=i?.v;if(void 0!==i&&l!==A)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return n},has(t,e){if(e===C)return!0;var n=r.get(e),o=void 0!==n&&n.v!==A||Reflect.has(t,e);if((void 0!==n||null!==Rt&&(!o||i(t,e)?.writable))&&(void 0===n&&(n=f((()=>U(o?P(t[e]):A))),r.set(e,n)),ue(n)===A))return!1;return o},set(t,e,n,a){var s=r.get(e),u=e in t;if(o&&"length"===e)for(var c=n;c<s.v;c+=1){var d=r.get(c+"");void 0!==d?V(d,A):c in t&&(d=f((()=>U(A))),r.set(c+"",d))}void 0===s?u&&!i(t,e)?.writable||(V(s=f((()=>U(void 0))),f((()=>P(n)))),r.set(e,s)):(u=s.v!==A,V(s,f((()=>P(n)))));var h=Reflect.getOwnPropertyDescriptor(t,e);if(h?.set&&h.set.call(a,n),!u){if(o&&"string"==typeof e){var v=r.get("length"),p=Number(e);Number.isInteger(p)&&p>=v.v&&V(v,p+1)}H(l)}return!0},ownKeys(t){ue(l);var e=Reflect.ownKeys(t).filter((t=>{var e=r.get(t);return void 0===e||e.v!==A}));for(var[n,o]of r)o.v===A||n in t||e.push(n);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function H(t,e=1){V(t,t.v+e)}function R(t){var e=2050,n=null!==Dt&&2&Dt.f?Dt:null;null===Rt||null!==n&&0!==(n.f&p)?e|=p:Rt.f|=k;return{ctx:$,deps:null,effects:null,equals:L,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:n??Rt}}function I(t){const e=R(t);return qt(e),e}function j(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)pt(e[n])}}function q(t){var e,n=Rt;It(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{j(t),e=Qt(t)}finally{It(n)}return e}function F(t){var e=q(t);(t.equals(e)||(t.v=e,t.wv=Yt()),$t)||de(t,!Vt&&0===(t.f&p)||null===t.deps?m:b)}const G=new Map;function z(t,e){return{f:0,v:t,reactions:null,equals:L,rv:0,wv:0}}function U(t,e){const n=z(t);return qt(n),n}function W(t,e=!1){const n=z(t);return e||(n.equals=T),n}function V(t,e,n=!1){return null!==Dt&&!Pt&&18&Dt.f&&!jt?.includes(t)&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),Y(t,n?P(e):e)}function Y(t,e){if(!t.equals(e)){var n=t.v;$t?G.set(t,e):G.set(t,n),t.v=e,2&t.f&&(0!==(t.f&y)&&q(t),de(t,0===(t.f&p)?m:b)),t.wv=Yt(),X(t,y),null===Rt||0===(Rt.f&m)||96&Rt.f||(null===zt?function(t){zt=t}([t]):zt.push(t))}return e}function X(t,e){var n=t.reactions;if(null!==n)for(var r=n.length,o=0;o<r;o++){var i=n[o],l=i.f;0===(l&y)&&(de(i,e),1280&l&&(2&l?X(i,b):le(i)))}}var J,K,Z,Q;function tt(t=""){return document.createTextNode(t)}function et(t){return Z.call(t)}function nt(t){return Q.call(t)}function rt(t,e){return et(t)}function ot(t,e){var n=et(t);return n instanceof Comment&&""===n.data?nt(n):n}function it(t,e=1,n=!1){let r=t;for(;e--;)r=nt(r);return r}function lt(t){null===Rt&&null===Dt&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==Dt&&0!==(Dt.f&p)&&null===Rt&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),$t&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function at(t,e,n,r=!0){var o=Rt,i={ctx:$,deps:null,nodes_start:null,nodes_end:null,f:t|y,first:null,fn:e,last:null,next:null,parent:o,prev:null,teardown:null,transitions:null,wv:0};if(n)try{ne(i),i.f|=32768}catch(t){throw pt(i),t}else null!==e&&le(i);if(!(n&&null===i.deps&&null===i.first&&null===i.nodes_start&&null===i.teardown&&!(1048704&i.f))&&r&&(null!==o&&function(t,e){var n=e.last;null===n?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}(i,o),null!==Dt&&2&Dt.f)){var l=Dt;(l.effects??=[]).push(i)}return i}function st(t){if(lt(),!(null!==Rt&&0!==(Rt.f&d)&&null!==$&&!$.m))return ut(t);var e=$;(e.e??=[]).push({fn:t,effect:Rt,reaction:Dt})}function ut(t){return at(4,t,!1)}function ct(t,e=[],n=R){const r=e.map(n);return ft((()=>t(...r.map(ue))))}function ft(t,e=0){return at(24|e,t,!0)}function dt(t,e=!0){return at(40,t,!0,e)}function ht(t){var e=t.teardown;if(null!==e){const t=$t,n=Dt;Bt(!0),Ht(null);try{e.call(null)}finally{Bt(t),Ht(n)}}}function vt(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){var r=n.next;0!==(n.f&h)?n.parent=null:pt(n,e),n=r}}function pt(t,e=!0){var n=!1;(e||524288&t.f)&&null!==t.nodes_start&&(gt(t.nodes_start,t.nodes_end),n=!0),vt(t,e&&!n),ee(t,0),de(t,_);var r=t.transitions;if(null!==r)for(const t of r)t.stop();ht(t);var o=t.parent;null!==o&&null!==o.first&&mt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function gt(t,e){for(;null!==t;){var n=t===e?null:nt(t);t.remove(),t=n}}function mt(t){var e=t.parent,n=t.prev,r=t.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==e&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function yt(t,e){var n=[];wt(t,n,!0),bt(n,(()=>{pt(t),e&&e()}))}function bt(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function wt(t,e,n){if(0===(t.f&w)){if(t.f^=w,null!==t.transitions)for(const r of t.transitions)(r.is_global||n)&&e.push(r);for(var r=t.first;null!==r;){var o=r.next;wt(r,e,!!(0!==(r.f&x)||0!==(r.f&d))&&n),r=o}}}function _t(t){xt(t,!0)}function xt(t,e){if(0!==(t.f&w)){t.f^=w,0===(t.f&m)&&(t.f^=m),Xt(t)&&(de(t,y),le(t));for(var n=t.first;null!==n;){var r=n.next;xt(n,!!(0!==(n.f&x)||0!==(n.f&d))&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}let kt=[],St=[];function Ct(){var t=kt;kt=[],f(t)}function Mt(t){0===kt.length&&queueMicrotask(Ct),kt.push(t)}function Et(){var t;kt.length>0&&Ct(),St.length>0&&(t=St,St=[],f(t))}let Lt=!1,Tt=!1,At=null,Nt=!1,$t=!1;function Bt(t){$t=t}let Ot=[],Dt=null,Pt=!1;function Ht(t){Dt=t}let Rt=null;function It(t){Rt=t}let jt=null;function qt(t){null!==Dt&&Dt.f&S&&(null===jt?jt=[t]:jt.push(t))}let Ft=null,Gt=0,zt=null;let Ut=1,Wt=0,Vt=!1;function Yt(){return++Ut}function Xt(t){var e=t.f;if(0!==(e&y))return!0;if(0!==(e&b)){var n=t.deps,r=0!==(e&p);if(null!==n){var o,i,l=0!==(e&g),a=r&&null!==Rt&&!Vt,s=n.length;if(l||a){var u=t,c=u.parent;for(o=0;o<s;o++)i=n[o],!l&&i?.reactions?.includes(u)||(i.reactions??=[]).push(u);l&&(u.f^=g),a&&null!==c&&0===(c.f&p)&&(u.f^=p)}for(o=0;o<s;o++)if(Xt(i=n[o])&&F(i),i.wv>t.wv)return!0}r&&(null===Rt||Vt)||de(t,m)}return!1}function Jt(t){return 0===(t.f&_)&&(null===t.parent||0===(t.parent.f&v))}function Kt(t,e,n,r){if(Lt){if(null===n&&(Lt=!1),Jt(e))throw t}else if(null!==n&&(Lt=!0),function(t,e){for(var n=e;null!==n;){if(0!==(n.f&v))try{return void n.fn(t)}catch{n.f^=v}n=n.parent}throw Lt=!1,t}(t,e),Jt(e))throw t}function Zt(t,e,n=!0){var r=t.reactions;if(null!==r)for(var o=0;o<r.length;o++){var i=r[o];jt?.includes(t)||(2&i.f?Zt(i,e,!1):e===i&&(n?de(i,y):0!==(i.f&m)&&de(i,b),le(i)))}}function Qt(t){var e=Ft,n=Gt,r=zt,o=Dt,i=Vt,l=jt,a=$,s=Pt,u=t.f;Ft=null,Gt=0,zt=null,Vt=0!==(u&p)&&(Pt||!Nt||null===Dt),Dt=96&u?null:t,jt=null,B(t.ctx),Pt=!1,Wt++,t.f|=S;try{var c=(0,t.fn)(),f=t.deps;if(null!==Ft){var d;if(ee(t,Gt),null!==f&&Gt>0)for(f.length=Gt+Ft.length,d=0;d<Ft.length;d++)f[Gt+d]=Ft[d];else t.deps=f=Ft;if(!Vt)for(d=Gt;d<f.length;d++)(f[d].reactions??=[]).push(t)}else null!==f&&Gt<f.length&&(ee(t,Gt),f.length=Gt);if(!(null===zt||Pt||null===f||6146&t.f))for(d=0;d<zt.length;d++)Zt(zt[d],t);return null!==o&&o!==t&&(Wt++,null!==zt&&(null===r?r=zt:r.push(...zt))),c}finally{Ft=e,Gt=n,zt=r,Dt=o,Vt=i,jt=l,B(a),Pt=s,t.f^=S}}function te(t,e){let r=e.reactions;if(null!==r){var o=n.call(r,t);if(-1!==o){var i=r.length-1;0===i?r=e.reactions=null:(r[o]=r[i],r.pop())}}null===r&&2&e.f&&(null===Ft||!Ft.includes(e))&&(de(e,b),768&e.f||(e.f^=g),j(e),ee(e,0))}function ee(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)te(t,n[r])}function ne(e){var n=e.f;if(0===(n&_)){de(e,m);var r=Rt,o=$,i=Nt;Rt=e,Nt=!0;try{16&n?function(t){for(var e=t.first;null!==e;){var n=e.next;0===(e.f&d)&&pt(e),e=n}}(e):vt(e),ht(e);var l=Qt(e);e.teardown="function"==typeof l?l:null,e.wv=Ut;e.deps;t}catch(t){Kt(t,e,r,o||e.ctx)}finally{Nt=i,Rt=r}}}function re(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){if(null===At)throw t;Kt(t,At,null)}}function oe(){var t=Nt;try{var e=0;for(Nt=!0;Ot.length>0;){e++>1e3&&re();var n=Ot,r=n.length;Ot=[];for(var o=0;o<r;o++){ie(ae(n[o]))}G.clear()}}finally{Tt=!1,Nt=t,At=null}}function ie(t){var e=t.length;if(0!==e)for(var n=0;n<e;n++){var r=t[n];if(!(24576&r.f))try{Xt(r)&&(ne(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown?mt(r):r.fn=null))}catch(t){Kt(t,r,null,r.ctx)}}}function le(t){Tt||(Tt=!0,queueMicrotask(oe));for(var e=At=t;null!==e.parent;){var n=(e=e.parent).f;if(96&n){if(0===(n&m))return;e.f^=m}}Ot.push(e)}function ae(t){for(var e=[],n=t;null!==n;){var r=n.f,o=!!(96&r);if(!(o&&0!==(r&m))&&0===(r&w)){if(4&r)e.push(n);else if(o)n.f^=m;else try{Xt(n)&&ne(n)}catch(t){Kt(t,n,null,n.ctx)}var i=n.first;if(null!==i){n=i;continue}}var l=n.parent;for(n=n.next;null===n&&null!==l;)n=l.next,l=l.parent}return e}async function se(){await Promise.resolve(),function(){for(;;){if(Et(),0===Ot.length)return;Tt=!0,oe()}}()}function ue(t){var e=!!(2&t.f);if(null===Dt||Pt){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null!==r&&0===(r.f&p)&&(n.f^=p)}}else if(!jt?.includes(t)){var o=Dt.deps;t.rv<Wt&&(t.rv=Wt,null===Ft&&null!==o&&o[Gt]===t?Gt++:null===Ft?Ft=[t]:Vt&&Ft.includes(t)||Ft.push(t))}return e&&Xt(n=t)&&F(n),$t&&G.has(t)?G.get(t):t.v}function ce(t){var e=Pt;try{return Pt=!0,t()}finally{Pt=e}}const fe=-7169;function de(t,e){t.f=t.f&fe|e}const he=["touchstart","touchmove"];function ve(t){return he.includes(t)}const pe=new Set,ge=new Set;function me(t){var n=this,r=n.ownerDocument,i=t.type,l=t.composedPath?.()||[],a=l[0]||t.target,s=0,u=t.__root;if(u){var c=l.indexOf(u);if(-1!==c&&(n===document||n===window))return void(t.__root=n);var f=l.indexOf(n);if(-1===f)return;c<=f&&(s=c)}if((a=l[s]||t.target)!==n){o(t,"currentTarget",{configurable:!0,get:()=>a||r});var d=Dt,h=Rt;Ht(null),It(null);try{for(var v,p=[];null!==a;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var m=a["__"+i];if(null!=m&&(!a.disabled||t.target===a))if(e(m)){var[y,...b]=m;y.apply(a,[t,...b])}else m.call(a,t)}catch(t){v?p.push(t):v=t}if(t.cancelBubble||g===n||null===g)break;a=g}if(v){for(let t of p)queueMicrotask((()=>{throw t}));throw v}}finally{t.__root=n,delete t.currentTarget,Ht(d),It(h)}}}function ye(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","\x3c!----\x3e"),e.content}function be(t,e){var n=Rt;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function we(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=ye(i?t:"<!>"+t),r||(n=et(n)));var e=o||K?document.importNode(n,!0):n.cloneNode(!0);r?be(et(e),e.lastChild):be(e,e);return e}}function _e(){var t=document.createDocumentFragment(),e=document.createComment(""),n=tt();return t.append(e,n),be(e,n),t}function xe(t,e){null!==t&&t.before(e)}function ke(t,e){var n=null==e?"":"object"==typeof e?e+"":e;n!==(t.__t??=t.nodeValue)&&(t.__t=n,t.nodeValue=n+"")}function Se(t,e){return function(t,{target:e,anchor:n,props:o={},events:l,context:a,intro:s=!0}){!function(){if(void 0===J){J=window,K=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;Z=i(e,"firstChild").get,Q=i(e,"nextSibling").get,c(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),c(n)&&(n.__t=void 0)}}();var u=new Set,f=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!u.has(r)){u.add(r);var o=ve(r);e.addEventListener(r,me,{passive:o});var i=Ce.get(r);void 0===i?(document.addEventListener(r,me,{passive:o}),Ce.set(r,1)):Ce.set(r,i+1)}}};f(r(pe)),ge.add(f);var d=void 0,v=function(t){const e=at(h,t,!0);return(t={})=>new Promise((n=>{t.outro?yt(e,(()=>{pt(e),n(void 0)})):(pt(e),n(void 0))}))}((()=>{var r=n??e.appendChild(tt());return dt((()=>{a&&(O({}),$.c=a);l&&(o.$$events=l),d=t(r,o)||{},a&&D()})),()=>{for(var t of u){e.removeEventListener(t,me);var o=Ce.get(t);0===--o?(document.removeEventListener(t,me),Ce.delete(t)):Ce.set(t,o)}ge.delete(f),r!==n&&r.parentNode?.removeChild(r)}}));return Me.set(d,v),d}(t,e)}const Ce=new Map;let Me=new WeakMap;function Ee(t,e,[n,r]=[0,0]){var o=t,i=null,l=null,a=A,s=!1;const u=(t,e=!0)=>{s=!0,c(e,t)},c=(t,e)=>{a!==(a=t)&&(a?(i?_t(i):e&&(i=dt((()=>e(o)))),l&&yt(l,(()=>{l=null}))):(l?_t(l):e&&(l=dt((()=>e(o,[n+1,r])))),i&&yt(i,(()=>{i=null}))))};ft((()=>{s=!1,e(u),s||c(null,null)}),n>0?x:0)}function Le(t,e){return e}function Te(t,n,o,i,l,a=null){var s=t,u={flags:n,items:new Map,first:null};!(4&n)||(s=t.appendChild(tt()));var c=null,f=!1,d=function(t){const e=R(t);return e.equals=T,e}((()=>{var t=o();return e(t)?t:null==t?[]:r(t)}));ft((()=>{var t=ue(d),e=t.length;f&&0===e||(f=0===e,function(t,e,n,o,i,l,a){var s,u,c,f,d,h,v=!!(8&i),p=!!(3&i),g=t.length,m=e.items,y=e.first,b=y,_=null,x=[],k=[];if(v)for(h=0;h<g;h+=1)f=l(c=t[h],h),void 0!==(d=m.get(f))&&(d.a?.measure(),(u??=new Set).add(d));for(h=0;h<g;h+=1)if(f=l(c=t[h],h),void 0!==(d=m.get(f))){if(p&&Ae(d,c,h,i),0!==(d.e.f&w)&&(_t(d.e),v&&(d.a?.unfix(),(u??=new Set).delete(d))),d!==b){if(void 0!==s&&s.has(d)){if(x.length<k.length){var S,C=k[0];_=C.prev;var M=x[0],E=x[x.length-1];for(S=0;S<x.length;S+=1)$e(x[S],C,n);for(S=0;S<k.length;S+=1)s.delete(k[S]);Be(e,M.prev,E.next),Be(e,_,M),Be(e,E,C),b=C,_=E,h-=1,x=[],k=[]}else s.delete(d),$e(d,b,n),Be(e,d.prev,d.next),Be(e,d,null===_?e.first:_.next),Be(e,_,d),_=d;continue}for(x=[],k=[];null!==b&&b.k!==f;)0===(b.e.f&w)&&(s??=new Set).add(b),k.push(b),b=b.next;if(null===b)continue;d=b}x.push(d),_=d,b=d.next}else{_=Ne(b?b.e.nodes_start:n,e,_,null===_?e.first:_.next,c,f,h,o,i,a),m.set(f,_),x=[],k=[],b=_.next}if(null!==b||void 0!==s){for(var L=void 0===s?[]:r(s);null!==b;)0===(b.e.f&w)&&L.push(b),b=b.next;var T=L.length;if(T>0){var A=4&i&&0===g?n:null;if(v){for(h=0;h<T;h+=1)L[h].a?.measure();for(h=0;h<T;h+=1)L[h].a?.fix()}!function(t,e,n,r){for(var o=[],i=e.length,l=0;l<i;l++)wt(e[l].e,o,!0);var a=i>0&&0===o.length&&null!==n;if(a){var s=n.parentNode;s.textContent="",s.append(n),r.clear(),Be(t,e[0].prev,e[i-1].next)}bt(o,(()=>{for(var n=0;n<i;n++){var o=e[n];a||(r.delete(o.k),Be(t,o.prev,o.next)),pt(o.e,!a)}}))}(e,L,A,m)}}v&&Mt((()=>{if(void 0!==u)for(d of u)d.a?.apply()}));Rt.first=e.first&&e.first.e,Rt.last=_&&_.e}(t,u,s,l,n,i,o),null!==a&&(0===e?c?_t(c):c=dt((()=>a(s))):null!==c&&yt(c,(()=>{c=null}))),ue(d))}))}function Ae(t,e,n,r){1&r&&Y(t.v,e),2&r?Y(t.i,n):t.i=n}function Ne(t,e,n,r,o,i,l,a,s,u){var c=!!(1&s)?!(16&s)?W(o):z(o):o,f=2&s?z(l):l,d={i:f,v:c,k:i,a:null,e:null,prev:n,next:r};try{return d.e=dt((()=>a(t,c,f,u)),false),d.e.prev=n&&n.e,d.e.next=r&&r.e,null===n?e.first=d:(n.next=d,n.e.next=d.e),null!==r&&(r.prev=d,r.e.prev=d.e),d}finally{}}function $e(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,o=e?e.e.nodes_start:n,i=t.e.nodes_start;i!==r;){var l=nt(i);o.before(i),i=l}}function Be(t,e,n){null===e?t.first=n:(e.next=n,e.e.next=n&&n.e),null!==n&&(n.prev=e,n.e.prev=e&&e.e)}const Oe=[..." \t\n\r\f \v\ufeff"];function De(t,e,n,r,o,i){var l=t.__className;if(l!==n||void 0===l){var a=function(t,e,n){var r=null==t?"":""+t;if(e&&(r=r?r+" "+e:e),n)for(var o in n)if(n[o])r=r?r+" "+o:o;else if(r.length)for(var i=o.length,l=0;(l=r.indexOf(o,l))>=0;){var a=l+i;0!==l&&!Oe.includes(r[l-1])||a!==r.length&&!Oe.includes(r[a])?l=a:r=(0===l?"":r.substring(0,l))+r.substring(a+1)}return""===r?null:r}(n,r,i);null==a?t.removeAttribute("class"):t.className=a,t.__className=n}else if(i&&o!==i)for(var s in i){var u=!!i[s];null!=o&&u===!!o[s]||t.classList.toggle(s,u)}return i}const Pe=Symbol("is custom element"),He=Symbol("is html");function Re(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ie(t,e,n,r){var o=je(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[E]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&function(t){var e,n=qe.get(t.nodeName);if(n)return n;qe.set(t.nodeName,n=[]);var r=t,o=Element.prototype;for(;o!==r;){for(var i in e=l(r))e[i].set&&n.push(i);r=u(r)}return n}(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function je(t){return t.__attributes??={[Pe]:t.nodeName.includes("-"),[He]:"http://www.w3.org/1999/xhtml"===t.namespaceURI}}var qe=new Map;function Fe(t,e){return t===e||t?.[C]===e}function Ge(t={},e,n,r){return ut((()=>{var r,o;return at(8,(()=>{r=o,o=[],ce((()=>{t!==n(...o)&&(e(t,...o),r&&Fe(n(...r),t)&&e(null,...r))}))}),!0),()=>{Mt((()=>{o&&Fe(n(...o),t)&&e(null,...o)}))}})),t}let ze=!1;function Ue(t){return t.ctx?.d??!1}function We(t,e,n,r){var o,l=!!(1&n),a=!!(8&n),s=!!(16&n),u=!1;a?[o,u]=function(t){var e=ze;try{return ze=!1,[t(),ze]}finally{ze=e}}((()=>t[e])):o=t[e];var c,f=C in t||M in t,d=a&&(i(t,e)?.set??(f&&e in t&&(n=>t[e]=n)))||void 0,h=r,v=!0,p=!1,g=()=>(p=!0,v&&(v=!1,h=s?ce(r):r),h);if(void 0===o&&void 0!==r&&(d&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),o=g(),d&&d(o)),c=()=>{var n=t[e];return void 0===n?g():(v=!0,p=!1,n)},!(4&n))return c;if(d){var m=t.$$legacy;return function(t,e){return arguments.length>0?((!e||m||u)&&d(e?c():t),t):c()}}var y=!1,b=W(o),w=R((()=>{var t=c(),e=ue(b);return y?(y=!1,e):b.v=t}));return a&&ue(w),l||(w.equals=T),function(t,e){if(arguments.length>0){const n=e?ue(w):a?P(t):t;if(!w.equals(n)){if(y=!0,V(b,n),p&&void 0!==h&&(h=n),Ue(w))return t;ce((()=>ue(w)))}return t}return Ue(w)?w.v:ue(w)}}function Ve(t){null===$&&N(),st((()=>{const e=ce(t);if("function"==typeof e)return e}))}function Ye(t){null===$&&N(),Ve((()=>()=>ce(t)))}function Xe(t){return t[0].toUpperCase()+t.slice(1)}function Je(t){return Xe(t.replace(/-/g," ").trim().toLowerCase())}"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");const Ke=Math.sqrt(50),Ze=Math.sqrt(10),Qe=Math.sqrt(2);function tn(t,e,n){const r=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),l=i>=Ke?10:i>=Ze?5:i>=Qe?2:1;let a,s,u;return o<0?(u=Math.pow(10,-o)/l,a=Math.round(t*u),s=Math.round(e*u),a/u<t&&++a,s/u>e&&--s,u=-u):(u=Math.pow(10,o)*l,a=Math.round(t/u),s=Math.round(e/u),a*u<t&&++a,s*u>e&&--s),s<a&&.5<=n&&n<2?tn(t,e,2*n):[a,s,u]}function en(t,e,n){return tn(t=+t,e=+e,n=+n)[2]}function nn(t){return Math.max(1,Math.ceil(Math.log(function(t){let e=0;for(let n of t)null!=n&&(n=+n)>=n&&++e;return e}(t))/Math.LN2)+1)}var rn=Array.prototype.slice;function on(t,e){return t-e}var ln=t=>()=>t;function an(t,e){for(var n,r=-1,o=e.length;++r<o;)if(n=sn(t,e[r]))return n;return 0}function sn(t,e){for(var n=e[0],r=e[1],o=-1,i=0,l=t.length,a=l-1;i<l;a=i++){var s=t[i],u=s[0],c=s[1],f=t[a],d=f[0],h=f[1];if(un(s,f,e))return 0;c>r!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(o=-o)}return o}function un(t,e,n){var r,o,i,l;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(o=t[r=+(t[0]===e[0])],i=n[r],l=e[r],o<=i&&i<=l||l<=i&&i<=o)}function cn(){}var fn=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function dn(){var t=1,e=1,n=nn,r=a;function o(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(on);else{const n=function(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let o=-1;for(let i of t)null!=(i=e(i,++o,t))&&(void 0===n?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}(t,hn);for(e=function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const r=e<t,[o,i,l]=r?tn(e,t,n):tn(t,e,n);if(!(i>=o))return[];const a=i-o+1,s=new Array(a);if(r)if(l<0)for(let t=0;t<a;++t)s[t]=(i-t)/-l;else for(let t=0;t<a;++t)s[t]=(i-t)*l;else if(l<0)for(let t=0;t<a;++t)s[t]=(o+t)/-l;else for(let t=0;t<a;++t)s[t]=(o+t)*l;return s}(...function(t,e,n){let r;for(;;){const o=en(t,e,n);if(o===r||0===o||!isFinite(o))return[t,e];o>0?(t=Math.floor(t/o)*o,e=Math.ceil(e/o)*o):o<0&&(t=Math.ceil(t*o)/o,e=Math.floor(e*o)/o),r=o}}(n[0],n[1],e),e);e[e.length-1]>=n[1];)e.pop();for(;e[1]<n[0];)e.shift()}return e.map((e=>i(t,e)))}function i(n,o){const i=null==o?NaN:+o;if(isNaN(i))throw new Error(`invalid value: ${o}`);var a=[],s=[];return function(n,r,o){var i,a,s,u,c,f,d=new Array,h=new Array;i=a=-1,u=vn(n[0],r),fn[u<<1].forEach(v);for(;++i<t-1;)s=u,u=vn(n[i+1],r),fn[s|u<<1].forEach(v);fn[u|0].forEach(v);for(;++a<e-1;){for(i=-1,u=vn(n[a*t+t],r),c=vn(n[a*t],r),fn[u<<1|c<<2].forEach(v);++i<t-1;)s=u,u=vn(n[a*t+t+i+1],r),f=c,c=vn(n[a*t+i+1],r),fn[s|u<<1|c<<2|f<<3].forEach(v);fn[u|c<<3].forEach(v)}i=-1,c=n[a*t]>=r,fn[c<<2].forEach(v);for(;++i<t-1;)f=c,c=vn(n[a*t+i+1],r),fn[c<<2|f<<3].forEach(v);function v(t){var e,n,r=[t[0][0]+i,t[0][1]+a],s=[t[1][0]+i,t[1][1]+a],u=l(r),c=l(s);(e=h[u])?(n=d[c])?(delete h[e.end],delete d[n.start],e===n?(e.ring.push(s),o(e.ring)):d[e.start]=h[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[e.end],e.ring.push(s),h[e.end=c]=e):(e=d[c])?(n=h[u])?(delete d[e.start],delete h[n.end],e===n?(e.ring.push(s),o(e.ring)):d[n.start]=h[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=u]=e):d[u]=h[c]={start:u,end:c,ring:[r,s]}}fn[c<<3].forEach(v)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==an((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:o,coordinates:a}}function l(e){return 2*e[0]+e[1]*(t+1)*4}function a(n,r,o){n.forEach((function(n){var i=n[0],l=n[1],a=0|i,s=0|l,u=pn(r[s*t+a]);i>0&&i<t&&a===i&&(n[0]=gn(i,pn(r[s*t+a-1]),u,o)),l>0&&l<e&&s===l&&(n[1]=gn(l,pn(r[(s-1)*t+a]),u,o))}))}return o.contour=i,o.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),i=Math.floor(n[1]);if(!(r>=0&&i>=0))throw new Error("invalid size");return t=r,e=i,o},o.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?ln(rn.call(t)):ln(t),o):n},o.smooth=function(t){return arguments.length?(r=t?a:cn,o):r===a},o}function hn(t){return isFinite(t)?t:NaN}function vn(t,e){return null!=t&&+t>=e}function pn(t){return null==t||isNaN(t=+t)?-1/0:t}function gn(t,e,n,r){const o=r-e,i=n-e,l=isFinite(o)||isFinite(i)?o/i:Math.sign(o)/Math.sign(i);return isNaN(l)?t:t+l-.5}function mn(t,e){return!(t.x<e.left||t.x>e.right||t.y>e.bottom||t.y<e.top)}function yn(t,e){for(const n of e)if(mn(t,n))return!0;return!1}function bn({width:t,height:e,top:n=0,left:r=0}){return`M${r} ${n} h${t} v${e} h-${t}z`}
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).InlineStyleEditor=e()}(this,(function(){"use strict";var t=!1,e=Array.isArray,n=Array.prototype.indexOf,r=Array.from,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,a=Object.prototype,s=Array.prototype,u=Object.getPrototypeOf,c=Object.isExtensible;function f(t){for(var e=0;e<t.length;e++)t[e]()}const d=32,h=64,v=128,p=256,g=512,m=1024,y=2048,b=4096,w=8192,_=16384,x=65536,k=1<<20,S=1<<21,C=Symbol("$state"),M=Symbol("legacy props"),E=Symbol("");function L(t){return t===this.v}function T(t){return e=t,n=this.v,!(e!=e?n==n:e!==n||null!==e&&"object"==typeof e||"function"==typeof e);var e,n}const A=Symbol();function N(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let $=null;function B(t){$=t}function O(t,e=!1,n){var r=$={p:$,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};!function(t){const e=at(8,null,!1);de(e,m),e.teardown=t}((()=>{r.d=!0}))}function D(t){const e=$;if(null!==e){void 0!==t&&(e.x=t);const l=e.e;if(null!==l){var n=Rt,r=Dt;e.e=null;try{for(var o=0;o<l.length;o++){var i=l[o];It(i.effect),Ht(i.reaction),ut(i.fn)}}finally{It(n),Ht(r)}}$=e.p,e.m=!0}return t||{}}function P(t){if("object"!=typeof t||null===t||C in t)return t;const n=u(t);if(n!==a&&n!==s)return t;var r=new Map,o=e(t),l=z(0),c=Dt,f=t=>{var e=Dt;Ht(c);var n=t();return Ht(e),n};return o&&r.set("length",z(t.length)),new Proxy(t,{defineProperty(t,e,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var o=r.get(e);return void 0===o?(o=f((()=>z(n.value))),r.set(e,o)):V(o,f((()=>P(n.value)))),!0},deleteProperty(t,e){var n=r.get(e);if(void 0===n)e in t&&(r.set(e,f((()=>z(A)))),H(l));else{if(o&&"string"==typeof e){var i=r.get("length"),a=Number(e);Number.isInteger(a)&&a<i.v&&V(i,a)}V(n,A),H(l)}return!0},get(e,n,o){if(n===C)return t;var l=r.get(n),a=n in e;if(void 0!==l||a&&!i(e,n)?.writable||(l=f((()=>z(P(a?e[n]:A)))),r.set(n,l)),void 0!==l){var s=ue(l);return s===A?void 0:s}return Reflect.get(e,n,o)},getOwnPropertyDescriptor(t,e){var n=Reflect.getOwnPropertyDescriptor(t,e);if(n&&"value"in n){var o=r.get(e);o&&(n.value=ue(o))}else if(void 0===n){var i=r.get(e),l=i?.v;if(void 0!==i&&l!==A)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return n},has(t,e){if(e===C)return!0;var n=r.get(e),o=void 0!==n&&n.v!==A||Reflect.has(t,e);if((void 0!==n||null!==Rt&&(!o||i(t,e)?.writable))&&(void 0===n&&(n=f((()=>z(o?P(t[e]):A))),r.set(e,n)),ue(n)===A))return!1;return o},set(t,e,n,a){var s=r.get(e),u=e in t;if(o&&"length"===e)for(var c=n;c<s.v;c+=1){var d=r.get(c+"");void 0!==d?V(d,A):c in t&&(d=f((()=>z(A))),r.set(c+"",d))}void 0===s?u&&!i(t,e)?.writable||(V(s=f((()=>z(void 0))),f((()=>P(n)))),r.set(e,s)):(u=s.v!==A,V(s,f((()=>P(n)))));var h=Reflect.getOwnPropertyDescriptor(t,e);if(h?.set&&h.set.call(a,n),!u){if(o&&"string"==typeof e){var v=r.get("length"),p=Number(e);Number.isInteger(p)&&p>=v.v&&V(v,p+1)}H(l)}return!0},ownKeys(t){ue(l);var e=Reflect.ownKeys(t).filter((t=>{var e=r.get(t);return void 0===e||e.v!==A}));for(var[n,o]of r)o.v===A||n in t||e.push(n);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function H(t,e=1){V(t,t.v+e)}function R(t){var e=2050,n=null!==Dt&&2&Dt.f?Dt:null;null===Rt||null!==n&&0!==(n.f&p)?e|=p:Rt.f|=k;return{ctx:$,deps:null,effects:null,equals:L,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:n??Rt}}function I(t){const e=R(t);return qt(e),e}function j(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)pt(e[n])}}function q(t){var e,n=Rt;It(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{j(t),e=Qt(t)}finally{It(n)}return e}function F(t){var e=q(t);(t.equals(e)||(t.v=e,t.wv=Yt()),$t)||de(t,!Vt&&0===(t.f&p)||null===t.deps?m:b)}const U=new Map;function G(t,e){return{f:0,v:t,reactions:null,equals:L,rv:0,wv:0}}function z(t,e){const n=G(t);return qt(n),n}function W(t,e=!1){const n=G(t);return e||(n.equals=T),n}function V(t,e,n=!1){return null!==Dt&&!Pt&&18&Dt.f&&!jt?.includes(t)&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),Y(t,n?P(e):e)}function Y(t,e){if(!t.equals(e)){var n=t.v;$t?U.set(t,e):U.set(t,n),t.v=e,2&t.f&&(0!==(t.f&y)&&q(t),de(t,0===(t.f&p)?m:b)),t.wv=Yt(),X(t,y),null===Rt||0===(Rt.f&m)||96&Rt.f||(null===Gt?function(t){Gt=t}([t]):Gt.push(t))}return e}function X(t,e){var n=t.reactions;if(null!==n)for(var r=n.length,o=0;o<r;o++){var i=n[o],l=i.f;0===(l&y)&&(de(i,e),1280&l&&(2&l?X(i,b):le(i)))}}var J,K,Z,Q;function tt(t=""){return document.createTextNode(t)}function et(t){return Z.call(t)}function nt(t){return Q.call(t)}function rt(t,e){return et(t)}function ot(t,e){var n=et(t);return n instanceof Comment&&""===n.data?nt(n):n}function it(t,e=1,n=!1){let r=t;for(;e--;)r=nt(r);return r}function lt(t){null===Rt&&null===Dt&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==Dt&&0!==(Dt.f&p)&&null===Rt&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),$t&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function at(t,e,n,r=!0){var o=Rt,i={ctx:$,deps:null,nodes_start:null,nodes_end:null,f:t|y,first:null,fn:e,last:null,next:null,parent:o,prev:null,teardown:null,transitions:null,wv:0};if(n)try{ne(i),i.f|=32768}catch(t){throw pt(i),t}else null!==e&&le(i);if(!(n&&null===i.deps&&null===i.first&&null===i.nodes_start&&null===i.teardown&&!(1048704&i.f))&&r&&(null!==o&&function(t,e){var n=e.last;null===n?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}(i,o),null!==Dt&&2&Dt.f)){var l=Dt;(l.effects??=[]).push(i)}return i}function st(t){if(lt(),!(null!==Rt&&0!==(Rt.f&d)&&null!==$&&!$.m))return ut(t);var e=$;(e.e??=[]).push({fn:t,effect:Rt,reaction:Dt})}function ut(t){return at(4,t,!1)}function ct(t,e=[],n=R){const r=e.map(n);return ft((()=>t(...r.map(ue))))}function ft(t,e=0){return at(24|e,t,!0)}function dt(t,e=!0){return at(40,t,!0,e)}function ht(t){var e=t.teardown;if(null!==e){const t=$t,n=Dt;Bt(!0),Ht(null);try{e.call(null)}finally{Bt(t),Ht(n)}}}function vt(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){var r=n.next;0!==(n.f&h)?n.parent=null:pt(n,e),n=r}}function pt(t,e=!0){var n=!1;(e||524288&t.f)&&null!==t.nodes_start&&(gt(t.nodes_start,t.nodes_end),n=!0),vt(t,e&&!n),ee(t,0),de(t,_);var r=t.transitions;if(null!==r)for(const t of r)t.stop();ht(t);var o=t.parent;null!==o&&null!==o.first&&mt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function gt(t,e){for(;null!==t;){var n=t===e?null:nt(t);t.remove(),t=n}}function mt(t){var e=t.parent,n=t.prev,r=t.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==e&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function yt(t,e){var n=[];wt(t,n,!0),bt(n,(()=>{pt(t),e&&e()}))}function bt(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function wt(t,e,n){if(0===(t.f&w)){if(t.f^=w,null!==t.transitions)for(const r of t.transitions)(r.is_global||n)&&e.push(r);for(var r=t.first;null!==r;){var o=r.next;wt(r,e,!!(0!==(r.f&x)||0!==(r.f&d))&&n),r=o}}}function _t(t){xt(t,!0)}function xt(t,e){if(0!==(t.f&w)){t.f^=w,0===(t.f&m)&&(t.f^=m),Xt(t)&&(de(t,y),le(t));for(var n=t.first;null!==n;){var r=n.next;xt(n,!!(0!==(n.f&x)||0!==(n.f&d))&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}let kt=[],St=[];function Ct(){var t=kt;kt=[],f(t)}function Mt(t){0===kt.length&&queueMicrotask(Ct),kt.push(t)}function Et(){var t;kt.length>0&&Ct(),St.length>0&&(t=St,St=[],f(t))}let Lt=!1,Tt=!1,At=null,Nt=!1,$t=!1;function Bt(t){$t=t}let Ot=[],Dt=null,Pt=!1;function Ht(t){Dt=t}let Rt=null;function It(t){Rt=t}let jt=null;function qt(t){null!==Dt&&Dt.f&S&&(null===jt?jt=[t]:jt.push(t))}let Ft=null,Ut=0,Gt=null;let zt=1,Wt=0,Vt=!1;function Yt(){return++zt}function Xt(t){var e=t.f;if(0!==(e&y))return!0;if(0!==(e&b)){var n=t.deps,r=0!==(e&p);if(null!==n){var o,i,l=0!==(e&g),a=r&&null!==Rt&&!Vt,s=n.length;if(l||a){var u=t,c=u.parent;for(o=0;o<s;o++)i=n[o],!l&&i?.reactions?.includes(u)||(i.reactions??=[]).push(u);l&&(u.f^=g),a&&null!==c&&0===(c.f&p)&&(u.f^=p)}for(o=0;o<s;o++)if(Xt(i=n[o])&&F(i),i.wv>t.wv)return!0}r&&(null===Rt||Vt)||de(t,m)}return!1}function Jt(t){return 0===(t.f&_)&&(null===t.parent||0===(t.parent.f&v))}function Kt(t,e,n,r){if(Lt){if(null===n&&(Lt=!1),Jt(e))throw t}else if(null!==n&&(Lt=!0),function(t,e){for(var n=e;null!==n;){if(0!==(n.f&v))try{return void n.fn(t)}catch{n.f^=v}n=n.parent}throw Lt=!1,t}(t,e),Jt(e))throw t}function Zt(t,e,n=!0){var r=t.reactions;if(null!==r)for(var o=0;o<r.length;o++){var i=r[o];jt?.includes(t)||(2&i.f?Zt(i,e,!1):e===i&&(n?de(i,y):0!==(i.f&m)&&de(i,b),le(i)))}}function Qt(t){var e=Ft,n=Ut,r=Gt,o=Dt,i=Vt,l=jt,a=$,s=Pt,u=t.f;Ft=null,Ut=0,Gt=null,Vt=0!==(u&p)&&(Pt||!Nt||null===Dt),Dt=96&u?null:t,jt=null,B(t.ctx),Pt=!1,Wt++,t.f|=S;try{var c=(0,t.fn)(),f=t.deps;if(null!==Ft){var d;if(ee(t,Ut),null!==f&&Ut>0)for(f.length=Ut+Ft.length,d=0;d<Ft.length;d++)f[Ut+d]=Ft[d];else t.deps=f=Ft;if(!Vt)for(d=Ut;d<f.length;d++)(f[d].reactions??=[]).push(t)}else null!==f&&Ut<f.length&&(ee(t,Ut),f.length=Ut);if(!(null===Gt||Pt||null===f||6146&t.f))for(d=0;d<Gt.length;d++)Zt(Gt[d],t);return null!==o&&o!==t&&(Wt++,null!==Gt&&(null===r?r=Gt:r.push(...Gt))),c}finally{Ft=e,Ut=n,Gt=r,Dt=o,Vt=i,jt=l,B(a),Pt=s,t.f^=S}}function te(t,e){let r=e.reactions;if(null!==r){var o=n.call(r,t);if(-1!==o){var i=r.length-1;0===i?r=e.reactions=null:(r[o]=r[i],r.pop())}}null===r&&2&e.f&&(null===Ft||!Ft.includes(e))&&(de(e,b),768&e.f||(e.f^=g),j(e),ee(e,0))}function ee(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)te(t,n[r])}function ne(e){var n=e.f;if(0===(n&_)){de(e,m);var r=Rt,o=$,i=Nt;Rt=e,Nt=!0;try{16&n?function(t){for(var e=t.first;null!==e;){var n=e.next;0===(e.f&d)&&pt(e),e=n}}(e):vt(e),ht(e);var l=Qt(e);e.teardown="function"==typeof l?l:null,e.wv=zt;e.deps;t}catch(t){Kt(t,e,r,o||e.ctx)}finally{Nt=i,Rt=r}}}function re(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){if(null===At)throw t;Kt(t,At,null)}}function oe(){var t=Nt;try{var e=0;for(Nt=!0;Ot.length>0;){e++>1e3&&re();var n=Ot,r=n.length;Ot=[];for(var o=0;o<r;o++){ie(ae(n[o]))}U.clear()}}finally{Tt=!1,Nt=t,At=null}}function ie(t){var e=t.length;if(0!==e)for(var n=0;n<e;n++){var r=t[n];if(!(24576&r.f))try{Xt(r)&&(ne(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown?mt(r):r.fn=null))}catch(t){Kt(t,r,null,r.ctx)}}}function le(t){Tt||(Tt=!0,queueMicrotask(oe));for(var e=At=t;null!==e.parent;){var n=(e=e.parent).f;if(96&n){if(0===(n&m))return;e.f^=m}}Ot.push(e)}function ae(t){for(var e=[],n=t;null!==n;){var r=n.f,o=!!(96&r);if(!(o&&0!==(r&m))&&0===(r&w)){if(4&r)e.push(n);else if(o)n.f^=m;else try{Xt(n)&&ne(n)}catch(t){Kt(t,n,null,n.ctx)}var i=n.first;if(null!==i){n=i;continue}}var l=n.parent;for(n=n.next;null===n&&null!==l;)n=l.next,l=l.parent}return e}async function se(){await Promise.resolve(),function(){for(;;){if(Et(),0===Ot.length)return;Tt=!0,oe()}}()}function ue(t){var e=!!(2&t.f);if(null===Dt||Pt){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null!==r&&0===(r.f&p)&&(n.f^=p)}}else if(!jt?.includes(t)){var o=Dt.deps;t.rv<Wt&&(t.rv=Wt,null===Ft&&null!==o&&o[Ut]===t?Ut++:null===Ft?Ft=[t]:Vt&&Ft.includes(t)||Ft.push(t))}return e&&Xt(n=t)&&F(n),$t&&U.has(t)?U.get(t):t.v}function ce(t){var e=Pt;try{return Pt=!0,t()}finally{Pt=e}}const fe=-7169;function de(t,e){t.f=t.f&fe|e}const he=["touchstart","touchmove"];function ve(t){return he.includes(t)}const pe=new Set,ge=new Set;function me(t){var n=this,r=n.ownerDocument,i=t.type,l=t.composedPath?.()||[],a=l[0]||t.target,s=0,u=t.__root;if(u){var c=l.indexOf(u);if(-1!==c&&(n===document||n===window))return void(t.__root=n);var f=l.indexOf(n);if(-1===f)return;c<=f&&(s=c)}if((a=l[s]||t.target)!==n){o(t,"currentTarget",{configurable:!0,get:()=>a||r});var d=Dt,h=Rt;Ht(null),It(null);try{for(var v,p=[];null!==a;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var m=a["__"+i];if(null!=m&&(!a.disabled||t.target===a))if(e(m)){var[y,...b]=m;y.apply(a,[t,...b])}else m.call(a,t)}catch(t){v?p.push(t):v=t}if(t.cancelBubble||g===n||null===g)break;a=g}if(v){for(let t of p)queueMicrotask((()=>{throw t}));throw v}}finally{t.__root=n,delete t.currentTarget,Ht(d),It(h)}}}function ye(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","\x3c!----\x3e"),e.content}function be(t,e){var n=Rt;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function we(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=ye(i?t:"<!>"+t),r||(n=et(n)));var e=o||K?document.importNode(n,!0):n.cloneNode(!0);r?be(et(e),e.lastChild):be(e,e);return e}}function _e(){var t=document.createDocumentFragment(),e=document.createComment(""),n=tt();return t.append(e,n),be(e,n),t}function xe(t,e){null!==t&&t.before(e)}function ke(t,e){var n=null==e?"":"object"==typeof e?e+"":e;n!==(t.__t??=t.nodeValue)&&(t.__t=n,t.nodeValue=n+"")}function Se(t,e){return function(t,{target:e,anchor:n,props:o={},events:l,context:a,intro:s=!0}){!function(){if(void 0===J){J=window,K=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;Z=i(e,"firstChild").get,Q=i(e,"nextSibling").get,c(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),c(n)&&(n.__t=void 0)}}();var u=new Set,f=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!u.has(r)){u.add(r);var o=ve(r);e.addEventListener(r,me,{passive:o});var i=Ce.get(r);void 0===i?(document.addEventListener(r,me,{passive:o}),Ce.set(r,1)):Ce.set(r,i+1)}}};f(r(pe)),ge.add(f);var d=void 0,v=function(t){const e=at(h,t,!0);return(t={})=>new Promise((n=>{t.outro?yt(e,(()=>{pt(e),n(void 0)})):(pt(e),n(void 0))}))}((()=>{var r=n??e.appendChild(tt());return dt((()=>{a&&(O({}),$.c=a);l&&(o.$$events=l),d=t(r,o)||{},a&&D()})),()=>{for(var t of u){e.removeEventListener(t,me);var o=Ce.get(t);0===--o?(document.removeEventListener(t,me),Ce.delete(t)):Ce.set(t,o)}ge.delete(f),r!==n&&r.parentNode?.removeChild(r)}}));return Me.set(d,v),d}(t,e)}const Ce=new Map;let Me=new WeakMap;function Ee(t,e,[n,r]=[0,0]){var o=t,i=null,l=null,a=A,s=!1;const u=(t,e=!0)=>{s=!0,c(e,t)},c=(t,e)=>{a!==(a=t)&&(a?(i?_t(i):e&&(i=dt((()=>e(o)))),l&&yt(l,(()=>{l=null}))):(l?_t(l):e&&(l=dt((()=>e(o,[n+1,r])))),i&&yt(i,(()=>{i=null}))))};ft((()=>{s=!1,e(u),s||c(null,null)}),n>0?x:0)}function Le(t,e){return e}function Te(t,n,o,i,l,a=null){var s=t,u={flags:n,items:new Map,first:null};!(4&n)||(s=t.appendChild(tt()));var c=null,f=!1,d=function(t){const e=R(t);return e.equals=T,e}((()=>{var t=o();return e(t)?t:null==t?[]:r(t)}));ft((()=>{var t=ue(d),e=t.length;f&&0===e||(f=0===e,function(t,e,n,o,i,l,a){var s,u,c,f,d,h,v=!!(8&i),p=!!(3&i),g=t.length,m=e.items,y=e.first,b=y,_=null,x=[],k=[];if(v)for(h=0;h<g;h+=1)f=l(c=t[h],h),void 0!==(d=m.get(f))&&(d.a?.measure(),(u??=new Set).add(d));for(h=0;h<g;h+=1)if(f=l(c=t[h],h),void 0!==(d=m.get(f))){if(p&&Ae(d,c,h,i),0!==(d.e.f&w)&&(_t(d.e),v&&(d.a?.unfix(),(u??=new Set).delete(d))),d!==b){if(void 0!==s&&s.has(d)){if(x.length<k.length){var S,C=k[0];_=C.prev;var M=x[0],E=x[x.length-1];for(S=0;S<x.length;S+=1)$e(x[S],C,n);for(S=0;S<k.length;S+=1)s.delete(k[S]);Be(e,M.prev,E.next),Be(e,_,M),Be(e,E,C),b=C,_=E,h-=1,x=[],k=[]}else s.delete(d),$e(d,b,n),Be(e,d.prev,d.next),Be(e,d,null===_?e.first:_.next),Be(e,_,d),_=d;continue}for(x=[],k=[];null!==b&&b.k!==f;)0===(b.e.f&w)&&(s??=new Set).add(b),k.push(b),b=b.next;if(null===b)continue;d=b}x.push(d),_=d,b=d.next}else{_=Ne(b?b.e.nodes_start:n,e,_,null===_?e.first:_.next,c,f,h,o,i,a),m.set(f,_),x=[],k=[],b=_.next}if(null!==b||void 0!==s){for(var L=void 0===s?[]:r(s);null!==b;)0===(b.e.f&w)&&L.push(b),b=b.next;var T=L.length;if(T>0){var A=4&i&&0===g?n:null;if(v){for(h=0;h<T;h+=1)L[h].a?.measure();for(h=0;h<T;h+=1)L[h].a?.fix()}!function(t,e,n,r){for(var o=[],i=e.length,l=0;l<i;l++)wt(e[l].e,o,!0);var a=i>0&&0===o.length&&null!==n;if(a){var s=n.parentNode;s.textContent="",s.append(n),r.clear(),Be(t,e[0].prev,e[i-1].next)}bt(o,(()=>{for(var n=0;n<i;n++){var o=e[n];a||(r.delete(o.k),Be(t,o.prev,o.next)),pt(o.e,!a)}}))}(e,L,A,m)}}v&&Mt((()=>{if(void 0!==u)for(d of u)d.a?.apply()}));Rt.first=e.first&&e.first.e,Rt.last=_&&_.e}(t,u,s,l,n,i,o),null!==a&&(0===e?c?_t(c):c=dt((()=>a(s))):null!==c&&yt(c,(()=>{c=null}))),ue(d))}))}function Ae(t,e,n,r){1&r&&Y(t.v,e),2&r?Y(t.i,n):t.i=n}function Ne(t,e,n,r,o,i,l,a,s,u){var c=!!(1&s)?!(16&s)?W(o):G(o):o,f=2&s?G(l):l,d={i:f,v:c,k:i,a:null,e:null,prev:n,next:r};try{return d.e=dt((()=>a(t,c,f,u)),false),d.e.prev=n&&n.e,d.e.next=r&&r.e,null===n?e.first=d:(n.next=d,n.e.next=d.e),null!==r&&(r.prev=d,r.e.prev=d.e),d}finally{}}function $e(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,o=e?e.e.nodes_start:n,i=t.e.nodes_start;i!==r;){var l=nt(i);o.before(i),i=l}}function Be(t,e,n){null===e?t.first=n:(e.next=n,e.e.next=n&&n.e),null!==n&&(n.prev=e,n.e.prev=e&&e.e)}const Oe=[..." \t\n\r\f \v\ufeff"];function De(t,e,n,r,o,i){var l=t.__className;if(l!==n||void 0===l){var a=function(t,e,n){var r=null==t?"":""+t;if(e&&(r=r?r+" "+e:e),n)for(var o in n)if(n[o])r=r?r+" "+o:o;else if(r.length)for(var i=o.length,l=0;(l=r.indexOf(o,l))>=0;){var a=l+i;0!==l&&!Oe.includes(r[l-1])||a!==r.length&&!Oe.includes(r[a])?l=a:r=(0===l?"":r.substring(0,l))+r.substring(a+1)}return""===r?null:r}(n,r,i);null==a?t.removeAttribute("class"):t.className=a,t.__className=n}else if(i&&o!==i)for(var s in i){var u=!!i[s];null!=o&&u===!!o[s]||t.classList.toggle(s,u)}return i}const Pe=Symbol("is custom element"),He=Symbol("is html");function Re(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ie(t,e,n,r){var o=je(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[E]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&function(t){var e,n=qe.get(t.nodeName);if(n)return n;qe.set(t.nodeName,n=[]);var r=t,o=Element.prototype;for(;o!==r;){for(var i in e=l(r))e[i].set&&n.push(i);r=u(r)}return n}(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function je(t){return t.__attributes??={[Pe]:t.nodeName.includes("-"),[He]:"http://www.w3.org/1999/xhtml"===t.namespaceURI}}var qe=new Map;function Fe(t,e){return t===e||t?.[C]===e}function Ue(t={},e,n,r){return ut((()=>{var r,o;return at(8,(()=>{r=o,o=[],ce((()=>{t!==n(...o)&&(e(t,...o),r&&Fe(n(...r),t)&&e(null,...r))}))}),!0),()=>{Mt((()=>{o&&Fe(n(...o),t)&&e(null,...o)}))}})),t}let Ge=!1;function ze(t){return t.ctx?.d??!1}function We(t,e,n,r){var o,l=!!(1&n),a=!!(8&n),s=!!(16&n),u=!1;a?[o,u]=function(t){var e=Ge;try{return Ge=!1,[t(),Ge]}finally{Ge=e}}((()=>t[e])):o=t[e];var c,f=C in t||M in t,d=a&&(i(t,e)?.set??(f&&e in t&&(n=>t[e]=n)))||void 0,h=r,v=!0,p=!1,g=()=>(p=!0,v&&(v=!1,h=s?ce(r):r),h);if(void 0===o&&void 0!==r&&(d&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),o=g(),d&&d(o)),c=()=>{var n=t[e];return void 0===n?g():(v=!0,p=!1,n)},!(4&n))return c;if(d){var m=t.$$legacy;return function(t,e){return arguments.length>0?((!e||m||u)&&d(e?c():t),t):c()}}var y=!1,b=W(o),w=R((()=>{var t=c(),e=ue(b);return y?(y=!1,e):b.v=t}));return a&&ue(w),l||(w.equals=T),function(t,e){if(arguments.length>0){const n=e?ue(w):a?P(t):t;if(!w.equals(n)){if(y=!0,V(b,n),p&&void 0!==h&&(h=n),ze(w))return t;ce((()=>ue(w)))}return t}return ze(w)?w.v:ue(w)}}function Ve(t){null===$&&N(),st((()=>{const e=ce(t);if("function"==typeof e)return e}))}function Ye(t){null===$&&N(),Ve((()=>()=>ce(t)))}function Xe(t){return t[0].toUpperCase()+t.slice(1)}function Je(t){return Xe(t.replace(/-/g," ").trim().toLowerCase())}"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");const Ke=Math.sqrt(50),Ze=Math.sqrt(10),Qe=Math.sqrt(2);function tn(t,e,n){const r=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),l=i>=Ke?10:i>=Ze?5:i>=Qe?2:1;let a,s,u;return o<0?(u=Math.pow(10,-o)/l,a=Math.round(t*u),s=Math.round(e*u),a/u<t&&++a,s/u>e&&--s,u=-u):(u=Math.pow(10,o)*l,a=Math.round(t/u),s=Math.round(e/u),a*u<t&&++a,s*u>e&&--s),s<a&&.5<=n&&n<2?tn(t,e,2*n):[a,s,u]}function en(t,e,n){return tn(t=+t,e=+e,n=+n)[2]}function nn(t){return Math.max(1,Math.ceil(Math.log(function(t){let e=0;for(let n of t)null!=n&&(n=+n)>=n&&++e;return e}(t))/Math.LN2)+1)}var rn=Array.prototype.slice;function on(t,e){return t-e}var ln=t=>()=>t;function an(t,e){for(var n,r=-1,o=e.length;++r<o;)if(n=sn(t,e[r]))return n;return 0}function sn(t,e){for(var n=e[0],r=e[1],o=-1,i=0,l=t.length,a=l-1;i<l;a=i++){var s=t[i],u=s[0],c=s[1],f=t[a],d=f[0],h=f[1];if(un(s,f,e))return 0;c>r!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(o=-o)}return o}function un(t,e,n){var r,o,i,l;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(o=t[r=+(t[0]===e[0])],i=n[r],l=e[r],o<=i&&i<=l||l<=i&&i<=o)}function cn(){}var fn=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function dn(){var t=1,e=1,n=nn,r=a;function o(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(on);else{const n=function(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let o=-1;for(let i of t)null!=(i=e(i,++o,t))&&(void 0===n?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}(t,hn);for(e=function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const r=e<t,[o,i,l]=r?tn(e,t,n):tn(t,e,n);if(!(i>=o))return[];const a=i-o+1,s=new Array(a);if(r)if(l<0)for(let t=0;t<a;++t)s[t]=(i-t)/-l;else for(let t=0;t<a;++t)s[t]=(i-t)*l;else if(l<0)for(let t=0;t<a;++t)s[t]=(o+t)/-l;else for(let t=0;t<a;++t)s[t]=(o+t)*l;return s}(...function(t,e,n){let r;for(;;){const o=en(t,e,n);if(o===r||0===o||!isFinite(o))return[t,e];o>0?(t=Math.floor(t/o)*o,e=Math.ceil(e/o)*o):o<0&&(t=Math.ceil(t*o)/o,e=Math.floor(e*o)/o),r=o}}(n[0],n[1],e),e);e[e.length-1]>=n[1];)e.pop();for(;e[1]<n[0];)e.shift()}return e.map((e=>i(t,e)))}function i(n,o){const i=null==o?NaN:+o;if(isNaN(i))throw new Error(`invalid value: ${o}`);var a=[],s=[];return function(n,r,o){var i,a,s,u,c,f,d=new Array,h=new Array;i=a=-1,u=vn(n[0],r),fn[u<<1].forEach(v);for(;++i<t-1;)s=u,u=vn(n[i+1],r),fn[s|u<<1].forEach(v);fn[u|0].forEach(v);for(;++a<e-1;){for(i=-1,u=vn(n[a*t+t],r),c=vn(n[a*t],r),fn[u<<1|c<<2].forEach(v);++i<t-1;)s=u,u=vn(n[a*t+t+i+1],r),f=c,c=vn(n[a*t+i+1],r),fn[s|u<<1|c<<2|f<<3].forEach(v);fn[u|c<<3].forEach(v)}i=-1,c=n[a*t]>=r,fn[c<<2].forEach(v);for(;++i<t-1;)f=c,c=vn(n[a*t+i+1],r),fn[c<<2|f<<3].forEach(v);function v(t){var e,n,r=[t[0][0]+i,t[0][1]+a],s=[t[1][0]+i,t[1][1]+a],u=l(r),c=l(s);(e=h[u])?(n=d[c])?(delete h[e.end],delete d[n.start],e===n?(e.ring.push(s),o(e.ring)):d[e.start]=h[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[e.end],e.ring.push(s),h[e.end=c]=e):(e=d[c])?(n=h[u])?(delete d[e.start],delete h[n.end],e===n?(e.ring.push(s),o(e.ring)):d[n.start]=h[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=u]=e):d[u]=h[c]={start:u,end:c,ring:[r,s]}}fn[c<<3].forEach(v)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==an((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:o,coordinates:a}}function l(e){return 2*e[0]+e[1]*(t+1)*4}function a(n,r,o){n.forEach((function(n){var i=n[0],l=n[1],a=0|i,s=0|l,u=pn(r[s*t+a]);i>0&&i<t&&a===i&&(n[0]=gn(i,pn(r[s*t+a-1]),u,o)),l>0&&l<e&&s===l&&(n[1]=gn(l,pn(r[(s-1)*t+a]),u,o))}))}return o.contour=i,o.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),i=Math.floor(n[1]);if(!(r>=0&&i>=0))throw new Error("invalid size");return t=r,e=i,o},o.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?ln(rn.call(t)):ln(t),o):n},o.smooth=function(t){return arguments.length?(r=t?a:cn,o):r===a},o}function hn(t){return isFinite(t)?t:NaN}function vn(t,e){return null!=t&&+t>=e}function pn(t){return null==t||isNaN(t=+t)?-1/0:t}function gn(t,e,n,r){const o=r-e,i=n-e,l=isFinite(o)||isFinite(i)?o/i:Math.sign(o)/Math.sign(i);return isNaN(l)?t:t+l-.5}function mn(t,e){return!(t.x<e.left||t.x>e.right||t.y>e.bottom||t.y<e.top)}function yn(t,e){for(const n of e)if(mn(t,n))return!0;return!1}function bn({width:t,height:e,top:n=0,left:r=0}){return`M${r} ${n} h${t} v${e} h-${t}z`}
|
|
2
2
|
/*!
|
|
3
3
|
* vanilla-picker v2.12.3
|
|
4
4
|
* https://vanilla-picker.js.org
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
|
|
7
7
|
* Released under the ISC license.
|
|
8
8
|
*/
|
|
9
|
-
var wn=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},_n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),xn=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(t){return 0===this.indexOf(t)},String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var kn={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function Sn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var Cn=function(){function t(e,n,r,o){wn(this,t);var i=this;if(void 0===e);else if(Array.isArray(e))this.rgba=e;else if(void 0===r){var l=e&&""+e;l&&function(e){if(e.startsWith("hsl")){var n=e.match(/([\-\d\.e]+)/g).map(Number),r=xn(n,4),o=r[0],l=r[1],a=r[2],s=r[3];void 0===s&&(s=1),o/=360,l/=100,a/=100,i.hsla=[o,l,a,s]}else if(e.startsWith("rgb")){var u=e.match(/([\-\d\.e]+)/g).map(Number),c=xn(u,4),f=c[0],d=c[1],h=c[2],v=c[3];void 0===v&&(v=1),i.rgba=[f,d,h,v]}else e.startsWith("#")?i.rgba=t.hexToRgb(e):i.rgba=t.nameToRgb(e)||t.hexToRgb(e)}(l.toLowerCase())}else this.rgba=[e,n,r,void 0===o?1:o]}return _n(t,[{key:"printRGB",value:function(t){var e=(t?this.rgba:this.rgba.slice(0,3)).map((function(t,e){return Sn(t,3===e?3:0)}));return t?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(t){var e=[360,100,100,1],n=["","%","%",""],r=(t?this.hsla:this.hsla.slice(0,3)).map((function(t,r){return Sn(t*e[r],3===r?3:1)+n[r]}));return t?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(t){var e=this.hex;return t?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(t){3===t.length&&(t[3]=1),this._rgba=t,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(t){3===t.length&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(t,e){return e<3?t.toString(16):Math.round(255*t).toString(16)})).map((function(t){return t.padStart(2,"0")})).join("")},set:function(e){this.rgba=t.hexToRgb(e)}}],[{key:"hexToRgb",value:function(t){var e=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var n=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(t){return parseInt(t,16)}));return n[3]=n[3]/255,n}},{key:"nameToRgb",value:function(e){var n=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=kn[n];return void 0===r?r:t.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var e=xn(t,4),n=e[0],r=e[1],o=e[2],i=e[3];n/=255,r/=255,o/=255;var l=Math.max(n,r,o),a=Math.min(n,r,o),s=void 0,u=void 0,c=(l+a)/2;if(l===a)s=u=0;else{var f=l-a;switch(u=c>.5?f/(2-l-a):f/(l+a),l){case n:s=(r-o)/f+(r<o?6:0);break;case r:s=(o-n)/f+2;break;case o:s=(n-r)/f+4}s/=6}return[s,u,c,i]}},{key:"hslToRgb",value:function(t){var e=xn(t,4),n=e[0],r=e[1],o=e[2],i=e[3],l=void 0,a=void 0,s=void 0;if(0===r)l=a=s=o;else{var u=function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},c=o<.5?o*(1+r):o+r-o*r,f=2*o-c;l=u(f,c,n+1/3),a=u(f,c,n),s=u(f,c,n-1/3)}var d=[255*l,255*a,255*s].map(Math.round);return d[3]=i,d}}]),t}(),Mn=function(){function t(){wn(this,t),this._events=[]}return _n(t,[{key:"add",value:function(t,e,n){t.addEventListener(e,n,!1),this._events.push({target:t,type:e,handler:n})}},{key:"remove",value:function(e,n,r){this._events=this._events.filter((function(o){var i=!0;return e&&e!==o.target&&(i=!1),n&&n!==o.type&&(i=!1),r&&r!==o.handler&&(i=!1),i&&t._doRemove(o.target,o.type,o.handler),!i}))}},{key:"destroy",value:function(){this._events.forEach((function(e){return t._doRemove(e.target,e.type,e.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(t,e,n){t.removeEventListener(e,n,!1)}}]),t}();function En(t,e,n){var r=!1;function o(t,e,n){return Math.max(e,Math.min(t,n))}function i(t,i,l){if(l&&(r=!0),r){t.preventDefault();var a=e.getBoundingClientRect(),s=a.width,u=a.height,c=i.clientX,f=i.clientY,d=o(c-a.left,0,s),h=o(f-a.top,0,u);n(d/s,h/u)}}function l(t,e){1===(void 0===t.buttons?t.which:t.buttons)?i(t,t,e):r=!1}function a(t,e){1===t.touches.length?i(t,t.touches[0],e):r=!1}t.add(e,"mousedown",(function(t){l(t,!0)})),t.add(e,"touchstart",(function(t){a(t,!0)})),t.add(window,"mousemove",l),t.add(e,"touchmove",a),t.add(window,"mouseup",(function(t){r=!1})),t.add(e,"touchend",(function(t){r=!1})),t.add(e,"touchcancel",(function(t){r=!1}))}var Ln="keydown",Tn="mousedown",An="focusin";function Nn(t,e){return(e||document).querySelector(t)}function $n(t,e,n,r,o){t.add(e,Ln,(function(t){n.indexOf(t.key)>=0&&r(t)}))}var Bn=function(){function t(e){wn(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new Mn,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return _n(t,[{key:"setOptions",value:function(t){var e=this;if(t){var n=this.settings;if(t instanceof HTMLElement)n.parent=t;else{n.parent&&t.parent&&n.parent!==t.parent&&(this._events.remove(n.parent),this._popupInited=!1),function(t,e){for(var n in t)e[n]=t[n]}(t,n),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var r=t.color||t.colour;r&&this._setColor(r)}var o=n.parent;if(o&&n.popup&&!this._popupInited){var i=function(t){return e.openHandler(t)};this._events.add(o,"click",i),$n(this._events,o,[" ","Spacebar","Enter"],i),this._popupInited=!0}else t.parent&&!n.popup&&this.show()}}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=t&&t.type===Ln?this._domEdit:this.domElement;setTimeout((function(){return e.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var e=t&&t.type,n=!1;if(t)if(e===Tn||e===An){var r=(this.__containedEvent||0)+100;t.timeStamp>r&&(n=!0)}else!function(t){t.preventDefault(),t.stopPropagation()}(t),n=!0;else n=!0;n&&this.hide()&&(this.settings.parent.style.pointerEvents="",e!==Tn&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}},{key:"setColor",value:function(t,e){this._setColor(t,{silent:e})}},{key:"_setColor",value:function(t,e){if("string"==typeof t&&(t=t.trim()),t){e=e||{};var n=void 0;try{n=new Cn(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){var r=n.hsla;r[3]=1,n.hsla=r}this.colour=this.color=n,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(t,e){this.setColor(t,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var t=this._toggleDOM(!0);return this._setPosition(),t}var e,n,r=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=(e=r,(n=document.createElement("div")).innerHTML=e,n.firstElementChild);return this.domElement=o,this._domH=Nn(".picker_hue",o),this._domSL=Nn(".picker_sl",o),this._domA=Nn(".picker_alpha",o),this._domEdit=Nn(".picker_editor input",o),this._domSample=Nn(".picker_sample",o),this._domOkay=Nn(".picker_done button",o),this._domCancel=Nn(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup((function(){return o.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var t=this,e=this,n=this.domElement,r=this._events;function o(t,e,n){r.add(t,e,n)}o(n,"click",(function(t){return t.preventDefault()})),En(r,this._domH,(function(t,n){return e._setHSLA(t)})),En(r,this._domSL,(function(t,n){return e._setHSLA(null,t,1-n)})),this.settings.alpha&&En(r,this._domA,(function(t,n){return e._setHSLA(null,null,null,1-n)}));var i=this._domEdit;o(i,"input",(function(t){e._setColor(this.value,{fromEditor:!0,failSilently:!0})})),o(i,"focus",(function(t){var e=this;e.selectionStart===e.selectionEnd&&e.select()})),this._ifPopup((function(){var e=function(e){return t.closeHandler(e)};o(window,Tn,e),o(window,An,e),$n(r,n,["Esc","Escape"],e);var i=function(e){t.__containedEvent=e.timeStamp};o(n,Tn,i),o(n,An,i),o(t._domCancel,"click",e)}));var l=function(e){t._ifPopup((function(){return t.closeHandler(e)})),t.onDone&&t.onDone(t.colour)};o(this._domOkay,"click",l),$n(r,n,["Enter"],l)}},{key:"_setPosition",value:function(){var t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup((function(n){"static"===getComputedStyle(t).position&&(t.style.position="relative");var r=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(t){t===r?e.classList.add(t):e.classList.remove(t)})),e.classList.add(r)}))}},{key:"_setHSLA",value:function(t,e,n,r,o){o=o||{};var i=this.colour,l=i.hsla;[t,e,n,r].forEach((function(t,e){(t||0===t)&&(l[e]=t)})),i.hsla=l,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(i)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var e=this.colour,n=e.hsla,r="hsl("+360*n[0]+", 100%, 50%)",o=e.hslString,i=e.hslaString,l=this._domH,a=this._domSL,s=this._domA,u=Nn(".picker_selector",l),c=Nn(".picker_selector",a),f=Nn(".picker_selector",s);y(0,u,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,y(0,c,n[1]),b(0,c,1-n[2]),a.style.color=o,b(0,f,1-n[3]);var d=o,h=d.replace("hsl","hsla").replace(")",", 0)"),v="linear-gradient("+[d,h]+")";if(this._domA.style.background=v+", linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!t.fromEditor){var p=this.settings.editorFormat,g=this.settings.alpha,m=void 0;switch(p){case"rgb":m=e.printRGB(g);break;case"hsl":m=e.printHSL(g);break;default:m=e.printHex(g)}this._domEdit.value=m}this._domSample.style.color=i}function y(t,e,n){e.style.left=100*n+"%"}function b(t,e,n){e.style.top=100*n+"%"}}},{key:"_ifPopup",value:function(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(t){var e=this.domElement;if(!e)return!1;var n=t?"":"none",r=e.style.display!==n;return r&&(e.style.display=n),r}}]),t}(),On=we('<div class="picker"></div>');function Dn(t,e){O(e,!0);let n=We(e,"value",15,"#AAAAAAFF"),r=We(e,"options",19,(()=>({}))),o=We(e,"onChange",3,(()=>{})),i=U(void 0),l=U(void 0);function a(t){var e;(e=t.hex)!==n()&&(o()(e,n()),n(e))}st((()=>{ue(l)&&ue(l).setColor(n())})),Ve((()=>{!function(t){if(!ue(i))return;ue(l)&&ue(l).destroy();t.onChange=a,V(l,new Bn({parent:ue(i),color:n(),popup:!1,...t}),!0),ue(l).show(),ue(l).openHandler()}(r())})),Ye((()=>{ue(l)?.destroy()}));var s=On();return Ge(s,(t=>V(i,t)),(()=>ue(i))),xe(t,s),D({setColor:function(t){ue(l).setColor(t)}})}const Pn=function(){const t=new Set(["Arial","Arial Black","Bahnschrift","Calibri","Cambria","Cambria Math","Candara","Comic Sans MS","Consolas","Constantia","Corbel","Courier New","Ebrima","Franklin Gothic Medium","Gabriola","Gadugi","Georgia","HoloLens MDL2 Assets","Impact","Ink Free","Javanese Text","Leelawadee UI","Lucida Console","Lucida Sans Unicode","Malgun Gothic","Marlett","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Sans Serif","Microsoft Tai Le","Microsoft YaHei","Microsoft Yi Baiti","MingLiU-ExtB","Mongolian Baiti","MS Gothic","MV Boli","Myanmar Text","Nirmala UI","Palatino Linotype","Segoe MDL2 Assets","Segoe Print","Segoe Script","Segoe UI","Segoe UI Historic","Segoe UI Emoji","Segoe UI Symbol","SimSun","Sitka","Sylfaen","Symbol","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","Yu Gothic","American Typewriter","Andale Mono","Arial","Arial Black","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Avenir","Avenir Next","Avenir Next Condensed","Baskerville","Big Caslon","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bradley Hand","Brush Script MT","Chalkboard","Chalkboard SE","Chalkduster","Charter","Cochin","Comic Sans MS","Copperplate","Courier","Courier New","Didot","DIN Alternate","DIN Condensed","Futura","Geneva","Georgia","Gill Sans","Helvetica","Helvetica Neue","Herculanum","Hoefler Text","Impact","Lucida Grande","Luminari","Marker Felt","Menlo","Microsoft Sans Serif","Monaco","Noteworthy","Optima","Palatino","Papyrus","Phosphate","Rockwell","Savoye LET","SignPainter","Skia","Snell Roundhand","Tahoma","Times","Times New Roman","Trattatello","Trebuchet MS","Verdana","Zapfino","Comic Sans MS","Comic Sans","Apple Chancery","Bradley Hand","Brush Script MT","Brush Script Std","Snell Roundhand","URW Chancery L"].sort()),e={},n={},r=["monospace","sans-serif","serif","cursive"],o=document.getElementsByTagName("body")[0],i=document.createElement("span");i.style.fontSize="72px",i.innerHTML="mmmmmmmmmmlli",r.forEach((t=>{i.style.fontFamily=t,o.appendChild(i),e[t]=i.offsetWidth,n[t]=i.offsetHeight,o.removeChild(i)}));const l=[],a=t=>{let l=!1;for(const a of r){i.style.fontFamily=t+","+a,o.appendChild(i);const r=i.offsetWidth!=e[a]||i.offsetHeight!=n[a];o.removeChild(i),l=l||r}return l};for(const e of t.values())a(e)&&l.push(e);return l.sort()}();function Hn(){let{fonts:t}=document;const e=t.entries();let n=[],r=!1;for(;!r;){const t=e.next();if(t.done)r=t.done;else{const e=t.value;let r;r=e.length?e[0].family:e.family,n.push(r)}}return[...new Set(n)]}function Rn(t,e,n,r,o,i){ue(e)[ue(n)]=!1,ue(r).parentNode.appendChild(ue(r)),o(ue(r),ue(i),"bringtofront",null)}function In(t,e,n){ue(e).remove(),n()}var jn=we("<span> </span>"),qn=we('<div class="select-tab"><b>Element</b> <!></div>'),Fn=(t,e)=>e(t.target.value),Gn=we("<option> </option>"),zn=we("<select></select>"),Un=we("<span> </span>"),Wn=we('<div class="select-tab"><b>Applied to:</b> <!></div>'),Vn=we("<span> </span>"),Yn=we('<div class="select-tab"><b>Property type:</b> <!></div>'),Xn=we("<button><!></button>"),Jn=we('<div class="icon-selector"></div> <span class="selected-label"> </span>',1),Kn=we("<span> </span>"),Zn=(t,e,n)=>e(ue(n)),Qn=(t,e,n,r)=>e(ue(n),t.target.value,ue(r)[ue(n)].suffix,t.target),tr=we('<input type="range"/> <span class="current-value"> </span>',1),er=(t,e,n)=>e(ue(n),t.target.value),nr=we('<option selected="true">---</option>'),rr=we("<option> </option>"),or=we("<select><!><!></select>"),ir=we('<div><div class="prop-header"><div class="prop-name"><!></div> <button class="delete-btn" title="Reset to default"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 4 L12 12 M12 4 L4 12"></path></svg></button></div> <!></div>'),lr=we("<div>Bring to front</div>"),ar=we('<div class="btn delete-elem">Delete element</div>'),sr=we('<div class="editor"><!> <!> <!></div>'),ur=we('<div style="position: absolute;"></div> <svg class="ise-helper-wrapper" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="overlay-clip" clip-rule="evenodd"><path></path></clipPath><rect y="0" x="0" height="100%" width="100%" class="overlay-over"></rect></svg> <div class="ise"><button class="close-button" title="Close"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M4 4 L12 12 M12 4 L4 12"></path></svg></button> <!> <!> <!> <!></div>',1);function cr(t,e){O(e,!0);const n=["altGlyph","circle","ellipse","line","path","polygon","polyline","rect","text","textPath","tref","tspan","g"],r={"border-radius":{type:"slider",min:0,max:30,suffix:"px"},"border-width":{type:"slider",min:0,max:30,suffix:"px"},"border-style":{type:"select",choices:()=>["none","dotted","dashed","solid","double","groove","ridge","inset","outset"]},"border-color":{type:"color"},"font-family":{type:"select",choices:function(){return[...Hn(),...Pn]}},"font-size":{type:"slider",min:0,max:40,suffix:"px"},"font-weight":{type:"slider",min:0,max:800},color:{type:"color"},"stroke-width":{type:"slider",min:0,max:20,step:.5,suffix:"px"},stroke:{type:"color"},"stroke-linejoin":{type:"select",choices:()=>["bevel","miter","round"]},fill:{type:"color"},"stroke-dasharray":{type:"slider",min:0,max:30,suffix:"px"},"background-color":{type:"color"}},o={stroke:'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><line x1="2" y1="14" x2="14" y2="2"/></svg>',fill:'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="2" y="2" width="12" height="12" rx="2"/></svg>',color:'<svg viewBox="0 0 16 16" fill="currentColor"><text x="3" y="11" font-size="10" font-weight="bold">A</text><rect x="2" y="13" width="12" height="2"/></svg>',"border-color":'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2" width="12" height="12" rx="1"/></svg>',"background-color":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="4" y="4" width="10" height="10" rx="1" opacity="0.5"/><rect x="2" y="2" width="10" height="10" rx="1"/></svg>',"border-radius":'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 10 L2 2 L10 2" stroke-linecap="round"/><path d="M2 10 Q2 14 6 14 L14 14" stroke-linecap="round"/></svg>',"border-width":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="2" y="2" width="12" height="2"/><rect x="2" y="7" width="12" height="3"/><rect x="2" y="13" width="12" height="1"/></svg>',"border-style":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="2" y="2" width="12" height="1.5"/><rect x="2" y="7" width="3" height="1.5"/><rect x="7" y="7" width="3" height="1.5"/><rect x="2" y="12" width="1.5" height="1.5"/><rect x="5" y="12" width="1.5" height="1.5"/><rect x="8" y="12" width="1.5" height="1.5"/><rect x="11" y="12" width="1.5" height="1.5"/></svg>',"font-size":'<svg viewBox="0 0 16 16" fill="currentColor"><text x="1" y="12" font-size="12" font-weight="bold">T</text><text x="9" y="12" font-size="8" font-weight="bold">T</text></svg>',"font-weight":'<svg viewBox="0 0 16 16" fill="currentColor"><text x="3" y="13" font-size="14" font-weight="bold">B</text></svg>',"font-family":'<svg viewBox="0 0 16 16" fill="currentColor"><text x="4" y="13" font-size="14" font-style="italic" font-family="serif">F</text></svg>',"stroke-width":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="2" y="2" width="12" height="2"/><rect x="2" y="7" width="12" height="3"/><rect x="2" y="13" width="12" height="1"/></svg>',"stroke-dasharray":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="1" y="7" width="4" height="2"/><rect x="7" y="7" width="4" height="2"/><rect x="13" y="7" width="2" height="2"/></svg>',"stroke-linejoin":'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"><polyline points="3,12 8,4 13,12"/></svg>'},i=e.getElems??null,l=e.listenOnClick??!1,a=e.onStyleChanged??(()=>{}),s=e.customProps??{},u=e.inlineDeletable??(()=>!0),c=e.cssRuleFilter??null,f=e.getCssRuleName??((t,e)=>"inline"===t?"Selected element":t),d=e.ignoredProps??[],h="text",v="border",p="stroke",g="background",m="custom",y={[h]:["font-family","font-size","font-weight","color"],[v]:["border-radius","border-width","border-color","border-style"],[p]:["stroke-width","stroke","stroke-dasharray","stroke-linejoin","fill"],[g]:["background-color"],[m]:Object.keys(s)},b={slider:0,select:1,color:2};let w=U(null),_=U(null),x=U(void 0),k=U(void 0),S=U(void 0),C=U(""),M=U(P({width:0,height:0})),E=U(P([[]])),L=U(P([])),T=U(P([])),A=U(0),N=U(0),$=U(0),B=U(void 0),H=U(P({})),R=U(P([])),j=U(!1);const q=I((()=>ue(E)[ue(A)]?.[0])),F=I((()=>ue(L)[ue(A)]?.[ue(N)]));let G=U(void 0);function z(){const t={...r,...s},e=(n=t,y[ue(G)].reduce(((t,e)=>(t[e]=n[e],t)),{}));var n;d.forEach((t=>delete e[t])),Object.keys(e).forEach((t=>{const n=e[t].type;let r="number";if("color"===n?r="rgb":"select"===n&&(r="raw"),e[t].getter){const n=e[t].getter(ue(q));if(null===n)return void delete e[t];e[t].value=n,e[t].displayed=n}else e[t].displayed=ft(ue(q),t,"raw"),e[t].value=ft(ue(q),t,r)}));const o=Object.entries(e).reduce(((t,[e,n])=>{const r=n.type,o=t.find((t=>t.type===r));return o?o.props.push(e):t.push({selected:0,props:[e],type:r}),t}),[]).sort(((t,e)=>b[t.type]<b[e.type]?-1:b[t.type]>b[e.type]?1:0)),i=o.find((t=>"color"===t.type));if(i){const t=i.props.indexOf("fill"),n=e.fill?.value;-1!==t&&n&&"#00000000"!==n&&(i.selected=t)}V(B,o,!0),V(H,e,!0),tt()}function W(t){return t?t.map(((t,e)=>{if("inline"===t)return"inline";const n=t.selectorText;return`${t.parentStyleSheet.title||`${e}`}: ${n}`})):[]}st((()=>{null!==ue(w)&&l&&ue(w).addEventListener("click",X)})),st((()=>{ue(T)[ue(A)]?.[ue($)]!==ue(G)&&V(G,ue(T)[ue(A)]?.[ue($)],!0)})),st((()=>{(ue(G)||ue(N)||ue(A))&&z()})),Ve((()=>{K(),V(w,ue(k).parentNode,!0),document.body.appendChild(ue(k)),document.body.appendChild(ue(S)),document.body.appendChild(ue(x)),at(),setTimeout((()=>{at()}),1e3),window.addEventListener("resize",at)})),Ye((()=>{window.removeEventListener("resize",at),l&&ue(w).removeEventListener("click",X)}));let Y=new Set;function X(t){J(t.target,t.pageX,t.pageY)}async function J(t,e,r){if(V(_,t,!0),at(),t.classList.contains("overlay-over"))return Z();if(!ue(k).contains(t)){V(A,0),V(N,0),V($,0),V(R,[],!0),V(T,[],!0),V(L,[],!0),V(E,i?i(t):[[t,"Clicked"]],!0),V(T,ue(E).reduce(((t,e)=>{const r=e[0],o=[];r.firstChild&&(!r.firstElementChild&&3===r.firstChild.nodeType||"tspan"===r.firstChild.tagName)&&o.push(h);const i=r.tagName.toLowerCase();let l=!1;return n.includes(i)?(o.push(p),"g"===r.parentElement.tagName.toLowerCase()&&r.previousElementSibling&&r.previousElementSibling.tagName.toLowerCase()==i&&(l=!0)):(o.push(v),o.push(g)),l?ue(R).push(!0):ue(R).push(null),t.push(o),t}),[]),!0),V(j,!1),V(L,function(t){const e=document.styleSheets;return t.reduce(((t,n)=>{const r=n[0],o=["inline"];for(let t in e)try{const n=e[t].cssRules;for(let t in n){let e=n[t].selectorText;if(e&&!(n[t].selectorText.length>50)&&!e.split(",").some((t=>"*"===t))&&(e.endsWith(":hover")&&(e=e.substring(0,e.length-6)),r.matches(e))){if(null!==c&&!c(r,n[t].selectorText))continue;o.push(n[t])}}}catch(n){Y.has(t)||(console.warn("Style editor: Not able to access",e[t].ownerNode,"sheet. Try CORS loading the sheet if you want to edit it."),Y.add(t))}return t.push(o),t}),[])}(ue(E)),!0);for(let e of Object.values(s))if(null!==e.getter(t)){V(j,!0);break}if(Object.keys(s).length&&ue(T)[0].push(m),await se(),z(),e&&r)Q(e,r);else{const e=nt(t,15);Q(e.left,e.top)}}}function K(){ue(k).style.display="none",ue(S).style.display="none",V(C,"")}function Z(){K()}function Q(t,e){ue(k).style.display="block",ue(k).style.opacity=0;const n=ue(k).getBoundingClientRect();t=t+n.width+20>ue(M).width?t-n.width-20:t+20,e=e+n.height+20>ue(M).height?e-n.height-20:e+20,e=Math.max(e,0),ue(k).style.left=t+"px",ue(k).style.top=e+"px",ue(S).style.display="block",ue(k).style.opacity=1,tt()}async function tt(){if(await se(),!ue(F))return;let t;if("inline"===ue(F))t=[ue(q)];else{const e=ue(F).selectorText.replace(/(:hover)|:focus/g,"");t=Array.from(document.querySelectorAll(e))}const e=t.map((t=>nt(t,10)));V(C,function(t,e){let n=function({width:t,height:e,top:n=0,left:r=0}){return`M${r} ${n} v${e} h${t} v-${e}z`}({width:e.width,height:e.height});if(t.length<10&&!function(t){for(let r=0;r<t.length-1;++r){const o=t[r];for(let i=r+1;i<t.length;++i)if(e=o,n=t[i],e.right>=n.left&&n.right>=e.left&&e.bottom>=n.top&&n.bottom>=e.top)return!0}var e,n;return!1}(t)){for(const e of t)n=`${n} ${bn(e)}`;return n}const r=Math.min(...t.map((t=>t.left))),o=Math.min(...t.map((t=>t.top))),i=t.map((t=>(t.left=t.left-r,t.right=t.right-r,t.top=t.top-o,t.bottom=t.bottom-o,t)));i.sort(((t,e)=>t.left>e.left?1:t.left<e.left?-1:0));const l=Math.ceil(Math.max(...i.map((t=>t.right)))),a=Math.ceil(Math.max(...i.map((t=>t.bottom)))),s=l*a/2e4,u=Math.ceil(l/s),c=Math.ceil(a/s),f=l/u,d=a/c,h=new Array(u*c);for(let t=0,e=0;t<c;++t)for(let n=0;n<u;++n,++e)h[e]=yn({x:n*s,y:t*s},i)?1:0;const v=dn().size([u,c]).thresholds([1])(h)[0];let p="";for(let t of v.coordinates)for(let e of t){for(let t=0;t<e.length;++t){const n=e[t],i=n[0]*f+r,l=n[1]*d+o;p+=t?`L ${i} ${l}`:`M${i} ${l}`}p+="Z"}return`${n} ${p}`}(e,ue(M)),!0)}function nt(t,e=0){const n=t.getBoundingClientRect();return{left:n.left+window.scrollX-e,top:n.top+window.scrollY-e,width:n.width+2*e,height:n.height+2*e,right:n.left+window.scrollX+n.width+e,bottom:n.top+window.scrollY+n.height+e}}const lt=function(t,e,n=!1){let r;return function(){const o=this,i=arguments,l=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(o,i)}),e),l&&t.apply(o,i)}}((function(t,e,n){const r=n?e+n:e;if("inline"===ue(F))if(ue(H)[t].setter)ue(H)[t].setter(ue(q),e);else{ue(q).style[t]=r}else ue(F).style.setProperty(t,r);ue(H)[t].value=e,ue(H)[t].displayed=r,a(ue(q),ue(F),t,r),tt()}),100);function at(){const t=getComputedStyle(document.body),e=parseInt(t.marginLeft),n=parseInt(t.marginRight),r=parseInt(t.marginTop),o=parseInt(t.marginBottom);V(M,{width:document.body.offsetWidth+e+n,height:document.body.offsetHeight+r+o},!0)}function ut(t,e="number"){if("raw"==e)return t;if("number"==e&&/[0-9]+(px)|(em)|(rem)/.test(t))return parseInt(t);if("rgb"==e){if("none"===t)return"#00000000";if(t.includes("rgb")||"#"==t[0])return function(t){const e=t.match(/[0-9\.]+/g).map((t=>parseFloat(t)));return 3===e.length&&e.push(1),e.reduce(((t,e,n)=>t+(3===n?Math.round(255*e).toString(16).padStart(2,"0"):e.toString(16).padStart(2,"0"))),"#")}(t)}return t}function ft(t,e,n="number"){let r=ue(F)?.style?.[e];if(!r){r=getComputedStyle(t)[e]}return ut(r,n)}function dt(t){const e=ue(H)[t];if(t in s&&e&&"defaultValue"in s[t]){const n=s[t].defaultValue;e.setter&&e.setter(ue(q),n),e.value=n,e.displayed=n,a(ue(q),ue(F),t,n)}else if("inline"===ue(F)?ue(q).style.removeProperty(t):ue(F).style.removeProperty(t),a(ue(q),ue(F),t,null),e){const n=e.type;let r="number";"color"===n?r="rgb":"select"===n&&(r="raw"),e.displayed=ft(ue(q),t,"raw"),e.value=ft(ue(q),t,r)}tt()}function ht(t){const e=ue(L)[ue(A)]?.[t];"inline"!==e&&ue($)===ue(T)[ue(A)].length-1&&V($,0),V(N,t,!0)}var vt=ur(),pt=ot(vt);Ge(pt,(t=>V(x,t)),(()=>ue(x)));var mt=it(pt,2);mt.__click=Z;var yt=rt(mt),bt=rt(yt);Ge(mt,(t=>V(S,t)),(()=>ue(S)));var wt=it(mt,2),_t=rt(wt);_t.__click=K;var xt=it(_t,2),kt=t=>{var e=qn();Te(it(rt(e),2),17,(()=>ue(E)),Le,((t,e,n)=>{var r=I((()=>function(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const n=[];for(const r of t)if(n.push(r),n.length===e)break;return n}(ue(e),2)));var o=jn();let i;o.__click=()=>{V(A,n,!0),V(N,0)};var l=rt(o);ct((t=>{i=De(o,0,"",null,i,t),ke(l,ue(r)[1])}),[()=>({selected:ue(A)===n})]),xe(t,o)})),xe(t,e)};Ee(xt,(t=>{ue(E).length>1&&t(kt)}));var St=it(xt,2),Ct=t=>{var e=Wn(),n=it(rt(e),2),r=t=>{var e=zn();e.__change=[Fn,ht],Te(e,21,(()=>W(ue(L)[ue(A)])),Le,((t,e,n)=>{var r=Gn();r.value=r.__value=n;var o=rt(r);ct((t=>{Re(r,ue(N)===n),ke(o,t)}),[()=>f(ue(e),ue(_))]),xe(t,r)})),xe(t,e)},o=t=>{var e=_e();Te(ot(e),17,(()=>W(ue(L)[ue(A)])),Le,((t,e,n)=>{var r=Un();let o;r.__click=()=>{ht(n)};var i=rt(r);ct(((t,n)=>{Ie(r,"title",ue(e)),o=De(r,0,"",null,o,t),ke(i,n)}),[()=>({selected:ue(N)===n}),()=>f(ue(e),ue(_))]),xe(t,r)})),xe(t,e)};Ee(n,(t=>{var e,n;n=ue(L)[ue(A)],((e=W(n).map((t=>f(t,ue(_)))))?e.reduce(((t,e)=>t+e.length),0):0)>30?t(r):t(o,!1)})),xe(t,e)};Ee(St,(t=>{ue(L)[ue(A)]?.length>1&&t(Ct)}));var Mt=it(St,2),Et=t=>{var e=Yn();Te(it(rt(e),2),17,(()=>ue(T)[ue(A)]||[]),Le,((t,e,n)=>{var r=_e(),o=ot(r),i=t=>{var r=Vn();let o;r.__click=()=>{V($,n,!0)};var i=rt(r);ct(((t,e)=>{o=De(r,0,"",null,o,t),ke(i,e)}),[()=>({selected:ue($)===n}),()=>"stroke"===ue(e)?"SVG paint":Xe(ue(e))]),xe(t,r)};Ee(o,(t=>{("custom"!==ue(e)||"inline"===ue(F)&&"custom"===ue(e)&&ue(j))&&t(i)})),xe(t,r)})),xe(t,e)};Ee(Mt,(t=>{(ue(T)[ue(A)]||[]).filter((t=>"custom"!==t||"inline"===ue(F)&&ue(j))).length>1&&t(Et)}));var Lt=it(Mt,2),Tt=t=>{var e=sr(),n=rt(e);Te(n,17,(()=>ue(B)),Le,((t,e,n)=>{var r=ir();const i=I((()=>ue(e).props[ue(e).selected]));var l=rt(r),a=rt(l),s=rt(a),u=t=>{var n=Jn(),r=ot(n);Te(r,21,(()=>ue(e).props),Le,((t,n,r)=>{var i=Xn();let l;i.__click=async()=>{ue(e).selected=r,await se()},function(t,e,n=!1,r=!1){var o=t,i="";ct((()=>{var t=Rt;if(i!==(i=e()??"")&&(null!==t.nodes_start&&(gt(t.nodes_start,t.nodes_end),t.nodes_start=t.nodes_end=null),""!==i)){var l=i+"";n?l=`<svg>${l}</svg>`:r&&(l=`<math>${l}</math>`);var a=ye(l);if((n||r)&&(a=et(a)),be(et(a),a.lastChild),n||r)for(;et(a);)o.before(et(a));else o.before(a)}}))}(rt(i),(()=>o[ue(n)])),ct(((t,e)=>{l=De(i,0,"icon-btn",null,l,t),Ie(i,"title",e)}),[()=>({selected:r===ue(e).selected}),()=>"color"===ue(e).type?`${Xe(ue(n))} color`:Je(ue(n))]),xe(t,i)}));var l=rt(it(r,2));ct((t=>ke(l,t)),[()=>"color"===ue(e).type?`${Xe(ue(i))} color`:Je(ue(i))]),xe(t,n)},c=t=>{var e=Kn(),n=rt(e);ct((t=>ke(n,t)),[()=>Je(ue(i))]),xe(t,e)};Ee(s,(t=>{ue(e).props.length>1?t(u):t(c,!1)})),it(a,2).__click=[Zn,dt,i];var f=it(l,2),d=t=>{var e=tr(),n=ot(e);n.__change=[Qn,lt,i,H];var r=rt(it(n,2));ct((()=>{var t,e,o;Ie(n,"min",ue(H)[ue(i)].min),Ie(n,"max",ue(H)[ue(i)].max),Ie(n,"step",ue(H)[ue(i)].step||1),t=n,e=ue(H)[ue(i)].value,(o=je(t)).value!==(o.value=e??void 0)&&(t.value!==e||0===e&&"PROGRESS"===t.nodeName)&&(t.value=e??""),ke(r,ue(H)[ue(i)].displayed)})),xe(t,e)},h=(t,n)=>{var r=t=>{var e=or();const n=I((()=>ue(H)[ue(i)].choices()));e.__change=[er,lt,i];var r=rt(e),o=t=>{xe(t,nr())};Ee(r,(t=>{ue(n).includes(ue(H)[ue(i)].value)||t(o)})),Te(it(r),17,(()=>ue(n)),Le,((t,e)=>{var n=rr(),r=rt(n);ct((()=>{Re(n,ue(e)==ue(H)[ue(i)].value||null),ke(r,ue(e))})),xe(t,n)})),xe(t,e)},o=(t,n)=>{var r=t=>{Dn(t,{get value(){return ue(H)[ue(i)].value},onChange:t=>lt(ue(i),t)})};Ee(t,(t=>{"color"==ue(e).type&&t(r)}),n)};Ee(t,(t=>{"select"==ue(e).type?t(r):t(o,!1)}),n)};Ee(f,(t=>{"slider"===ue(e).type?t(d):t(h,!1)})),ct((()=>De(r,0,`prop-section ${ue(e).type??""}`))),xe(t,r)}));var r=it(n,2),i=t=>{var e=lr();let n;e.__click=[Rn,R,A,q,a,F],ct((t=>n=De(e,0,"btn",null,n,t)),[()=>({active:!0===ue(R)[ue(A)]})]),xe(t,e)};Ee(r,(t=>{"inline"===ue(F)&&null!==ue(R)[ue(A)]&&t(i)}));var l=it(r,2),s=t=>{var e=ar();e.__click=[In,q,K],xe(t,e)};Ee(l,(t=>{"inline"===ue(F)&&u(ue(q))&&t(s)})),xe(t,e)};return Ee(Lt,(t=>{ue(T)[ue(A)]&&t(Tt)})),Ge(wt,(t=>V(k,t)),(()=>ue(k))),ct((()=>{Ie(mt,"width",ue(M).width),Ie(mt,"height",ue(M).height),Ie(bt,"d",ue(C))})),xe(t,vt),D({open:J,close:K,isOpened:function(){return"block"===ue(k).style.display}})}!function(t){for(var e=0;e<t.length;e++)pe.add(t[e]);for(var n of ge)n(t)}(["click","change"]);return class{constructor(t){const{target:e=document.body,...n}=t;return Se(cr,{target:e,props:n})}}}));
|
|
9
|
+
var wn=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},_n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),xn=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(t){return 0===this.indexOf(t)},String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var kn={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function Sn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var Cn=function(){function t(e,n,r,o){wn(this,t);var i=this;if(void 0===e);else if(Array.isArray(e))this.rgba=e;else if(void 0===r){var l=e&&""+e;l&&function(e){if(e.startsWith("hsl")){var n=e.match(/([\-\d\.e]+)/g).map(Number),r=xn(n,4),o=r[0],l=r[1],a=r[2],s=r[3];void 0===s&&(s=1),o/=360,l/=100,a/=100,i.hsla=[o,l,a,s]}else if(e.startsWith("rgb")){var u=e.match(/([\-\d\.e]+)/g).map(Number),c=xn(u,4),f=c[0],d=c[1],h=c[2],v=c[3];void 0===v&&(v=1),i.rgba=[f,d,h,v]}else e.startsWith("#")?i.rgba=t.hexToRgb(e):i.rgba=t.nameToRgb(e)||t.hexToRgb(e)}(l.toLowerCase())}else this.rgba=[e,n,r,void 0===o?1:o]}return _n(t,[{key:"printRGB",value:function(t){var e=(t?this.rgba:this.rgba.slice(0,3)).map((function(t,e){return Sn(t,3===e?3:0)}));return t?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(t){var e=[360,100,100,1],n=["","%","%",""],r=(t?this.hsla:this.hsla.slice(0,3)).map((function(t,r){return Sn(t*e[r],3===r?3:1)+n[r]}));return t?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(t){var e=this.hex;return t?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(t){3===t.length&&(t[3]=1),this._rgba=t,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(t){3===t.length&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(t,e){return e<3?t.toString(16):Math.round(255*t).toString(16)})).map((function(t){return t.padStart(2,"0")})).join("")},set:function(e){this.rgba=t.hexToRgb(e)}}],[{key:"hexToRgb",value:function(t){var e=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var n=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(t){return parseInt(t,16)}));return n[3]=n[3]/255,n}},{key:"nameToRgb",value:function(e){var n=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=kn[n];return void 0===r?r:t.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var e=xn(t,4),n=e[0],r=e[1],o=e[2],i=e[3];n/=255,r/=255,o/=255;var l=Math.max(n,r,o),a=Math.min(n,r,o),s=void 0,u=void 0,c=(l+a)/2;if(l===a)s=u=0;else{var f=l-a;switch(u=c>.5?f/(2-l-a):f/(l+a),l){case n:s=(r-o)/f+(r<o?6:0);break;case r:s=(o-n)/f+2;break;case o:s=(n-r)/f+4}s/=6}return[s,u,c,i]}},{key:"hslToRgb",value:function(t){var e=xn(t,4),n=e[0],r=e[1],o=e[2],i=e[3],l=void 0,a=void 0,s=void 0;if(0===r)l=a=s=o;else{var u=function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},c=o<.5?o*(1+r):o+r-o*r,f=2*o-c;l=u(f,c,n+1/3),a=u(f,c,n),s=u(f,c,n-1/3)}var d=[255*l,255*a,255*s].map(Math.round);return d[3]=i,d}}]),t}(),Mn=function(){function t(){wn(this,t),this._events=[]}return _n(t,[{key:"add",value:function(t,e,n){t.addEventListener(e,n,!1),this._events.push({target:t,type:e,handler:n})}},{key:"remove",value:function(e,n,r){this._events=this._events.filter((function(o){var i=!0;return e&&e!==o.target&&(i=!1),n&&n!==o.type&&(i=!1),r&&r!==o.handler&&(i=!1),i&&t._doRemove(o.target,o.type,o.handler),!i}))}},{key:"destroy",value:function(){this._events.forEach((function(e){return t._doRemove(e.target,e.type,e.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(t,e,n){t.removeEventListener(e,n,!1)}}]),t}();function En(t,e,n){var r=!1;function o(t,e,n){return Math.max(e,Math.min(t,n))}function i(t,i,l){if(l&&(r=!0),r){t.preventDefault();var a=e.getBoundingClientRect(),s=a.width,u=a.height,c=i.clientX,f=i.clientY,d=o(c-a.left,0,s),h=o(f-a.top,0,u);n(d/s,h/u)}}function l(t,e){1===(void 0===t.buttons?t.which:t.buttons)?i(t,t,e):r=!1}function a(t,e){1===t.touches.length?i(t,t.touches[0],e):r=!1}t.add(e,"mousedown",(function(t){l(t,!0)})),t.add(e,"touchstart",(function(t){a(t,!0)})),t.add(window,"mousemove",l),t.add(e,"touchmove",a),t.add(window,"mouseup",(function(t){r=!1})),t.add(e,"touchend",(function(t){r=!1})),t.add(e,"touchcancel",(function(t){r=!1}))}var Ln="keydown",Tn="mousedown",An="focusin";function Nn(t,e){return(e||document).querySelector(t)}function $n(t,e,n,r,o){t.add(e,Ln,(function(t){n.indexOf(t.key)>=0&&r(t)}))}var Bn=function(){function t(e){wn(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new Mn,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return _n(t,[{key:"setOptions",value:function(t){var e=this;if(t){var n=this.settings;if(t instanceof HTMLElement)n.parent=t;else{n.parent&&t.parent&&n.parent!==t.parent&&(this._events.remove(n.parent),this._popupInited=!1),function(t,e){for(var n in t)e[n]=t[n]}(t,n),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var r=t.color||t.colour;r&&this._setColor(r)}var o=n.parent;if(o&&n.popup&&!this._popupInited){var i=function(t){return e.openHandler(t)};this._events.add(o,"click",i),$n(this._events,o,[" ","Spacebar","Enter"],i),this._popupInited=!0}else t.parent&&!n.popup&&this.show()}}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=t&&t.type===Ln?this._domEdit:this.domElement;setTimeout((function(){return e.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var e=t&&t.type,n=!1;if(t)if(e===Tn||e===An){var r=(this.__containedEvent||0)+100;t.timeStamp>r&&(n=!0)}else!function(t){t.preventDefault(),t.stopPropagation()}(t),n=!0;else n=!0;n&&this.hide()&&(this.settings.parent.style.pointerEvents="",e!==Tn&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}},{key:"setColor",value:function(t,e){this._setColor(t,{silent:e})}},{key:"_setColor",value:function(t,e){if("string"==typeof t&&(t=t.trim()),t){e=e||{};var n=void 0;try{n=new Cn(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){var r=n.hsla;r[3]=1,n.hsla=r}this.colour=this.color=n,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(t,e){this.setColor(t,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var t=this._toggleDOM(!0);return this._setPosition(),t}var e,n,r=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=(e=r,(n=document.createElement("div")).innerHTML=e,n.firstElementChild);return this.domElement=o,this._domH=Nn(".picker_hue",o),this._domSL=Nn(".picker_sl",o),this._domA=Nn(".picker_alpha",o),this._domEdit=Nn(".picker_editor input",o),this._domSample=Nn(".picker_sample",o),this._domOkay=Nn(".picker_done button",o),this._domCancel=Nn(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup((function(){return o.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var t=this,e=this,n=this.domElement,r=this._events;function o(t,e,n){r.add(t,e,n)}o(n,"click",(function(t){return t.preventDefault()})),En(r,this._domH,(function(t,n){return e._setHSLA(t)})),En(r,this._domSL,(function(t,n){return e._setHSLA(null,t,1-n)})),this.settings.alpha&&En(r,this._domA,(function(t,n){return e._setHSLA(null,null,null,1-n)}));var i=this._domEdit;o(i,"input",(function(t){e._setColor(this.value,{fromEditor:!0,failSilently:!0})})),o(i,"focus",(function(t){var e=this;e.selectionStart===e.selectionEnd&&e.select()})),this._ifPopup((function(){var e=function(e){return t.closeHandler(e)};o(window,Tn,e),o(window,An,e),$n(r,n,["Esc","Escape"],e);var i=function(e){t.__containedEvent=e.timeStamp};o(n,Tn,i),o(n,An,i),o(t._domCancel,"click",e)}));var l=function(e){t._ifPopup((function(){return t.closeHandler(e)})),t.onDone&&t.onDone(t.colour)};o(this._domOkay,"click",l),$n(r,n,["Enter"],l)}},{key:"_setPosition",value:function(){var t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup((function(n){"static"===getComputedStyle(t).position&&(t.style.position="relative");var r=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(t){t===r?e.classList.add(t):e.classList.remove(t)})),e.classList.add(r)}))}},{key:"_setHSLA",value:function(t,e,n,r,o){o=o||{};var i=this.colour,l=i.hsla;[t,e,n,r].forEach((function(t,e){(t||0===t)&&(l[e]=t)})),i.hsla=l,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(i)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var e=this.colour,n=e.hsla,r="hsl("+360*n[0]+", 100%, 50%)",o=e.hslString,i=e.hslaString,l=this._domH,a=this._domSL,s=this._domA,u=Nn(".picker_selector",l),c=Nn(".picker_selector",a),f=Nn(".picker_selector",s);y(0,u,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,y(0,c,n[1]),b(0,c,1-n[2]),a.style.color=o,b(0,f,1-n[3]);var d=o,h=d.replace("hsl","hsla").replace(")",", 0)"),v="linear-gradient("+[d,h]+")";if(this._domA.style.background=v+", linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!t.fromEditor){var p=this.settings.editorFormat,g=this.settings.alpha,m=void 0;switch(p){case"rgb":m=e.printRGB(g);break;case"hsl":m=e.printHSL(g);break;default:m=e.printHex(g)}this._domEdit.value=m}this._domSample.style.color=i}function y(t,e,n){e.style.left=100*n+"%"}function b(t,e,n){e.style.top=100*n+"%"}}},{key:"_ifPopup",value:function(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(t){var e=this.domElement;if(!e)return!1;var n=t?"":"none",r=e.style.display!==n;return r&&(e.style.display=n),r}}]),t}(),On=we('<div class="picker"></div>');function Dn(t,e){O(e,!0);let n=We(e,"value",15,"#AAAAAAFF"),r=We(e,"options",19,(()=>({}))),o=We(e,"onChange",3,(()=>{})),i=z(void 0),l=z(void 0);function a(t){var e;(e=t.hex)!==n()&&(o()(e,n()),n(e))}st((()=>{ue(l)&&ue(l).setColor(n())})),Ve((()=>{!function(t){if(!ue(i))return;ue(l)&&ue(l).destroy();t.onChange=a,V(l,new Bn({parent:ue(i),color:n(),popup:!1,...t}),!0),ue(l).show(),ue(l).openHandler()}(r())})),Ye((()=>{ue(l)?.destroy()}));var s=On();return Ue(s,(t=>V(i,t)),(()=>ue(i))),xe(t,s),D({setColor:function(t){ue(l).setColor(t)}})}const Pn=function(){const t=new Set(["Arial","Arial Black","Bahnschrift","Calibri","Cambria","Cambria Math","Candara","Comic Sans MS","Consolas","Constantia","Corbel","Courier New","Ebrima","Franklin Gothic Medium","Gabriola","Gadugi","Georgia","HoloLens MDL2 Assets","Impact","Ink Free","Javanese Text","Leelawadee UI","Lucida Console","Lucida Sans Unicode","Malgun Gothic","Marlett","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Sans Serif","Microsoft Tai Le","Microsoft YaHei","Microsoft Yi Baiti","MingLiU-ExtB","Mongolian Baiti","MS Gothic","MV Boli","Myanmar Text","Nirmala UI","Palatino Linotype","Segoe MDL2 Assets","Segoe Print","Segoe Script","Segoe UI","Segoe UI Historic","Segoe UI Emoji","Segoe UI Symbol","SimSun","Sitka","Sylfaen","Symbol","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","Yu Gothic","American Typewriter","Andale Mono","Arial","Arial Black","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Avenir","Avenir Next","Avenir Next Condensed","Baskerville","Big Caslon","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bradley Hand","Brush Script MT","Chalkboard","Chalkboard SE","Chalkduster","Charter","Cochin","Comic Sans MS","Copperplate","Courier","Courier New","Didot","DIN Alternate","DIN Condensed","Futura","Geneva","Georgia","Gill Sans","Helvetica","Helvetica Neue","Herculanum","Hoefler Text","Impact","Lucida Grande","Luminari","Marker Felt","Menlo","Microsoft Sans Serif","Monaco","Noteworthy","Optima","Palatino","Papyrus","Phosphate","Rockwell","Savoye LET","SignPainter","Skia","Snell Roundhand","Tahoma","Times","Times New Roman","Trattatello","Trebuchet MS","Verdana","Zapfino","Comic Sans MS","Comic Sans","Apple Chancery","Bradley Hand","Brush Script MT","Brush Script Std","Snell Roundhand","URW Chancery L"].sort()),e={},n={},r=["monospace","sans-serif","serif","cursive"],o=document.getElementsByTagName("body")[0],i=document.createElement("span");i.style.fontSize="72px",i.innerHTML="mmmmmmmmmmlli",r.forEach((t=>{i.style.fontFamily=t,o.appendChild(i),e[t]=i.offsetWidth,n[t]=i.offsetHeight,o.removeChild(i)}));const l=[],a=t=>{let l=!1;for(const a of r){i.style.fontFamily=t+","+a,o.appendChild(i);const r=i.offsetWidth!=e[a]||i.offsetHeight!=n[a];o.removeChild(i),l=l||r}return l};for(const e of t.values())a(e)&&l.push(e);return l.sort()}();function Hn(){let{fonts:t}=document;const e=t.entries();let n=[],r=!1;for(;!r;){const t=e.next();if(t.done)r=t.done;else{const e=t.value;let r;r=e.length?e[0].family:e.family,n.push(r)}}return[...new Set(n)]}function Rn(t,e,n,r,o,i){ue(e)[ue(n)]=!1,ue(r).parentNode.appendChild(ue(r)),o(ue(r),ue(i),"bringtofront",null)}function In(t,e,n){ue(e).remove(),n()}var jn=we("<span> </span>"),qn=we('<div class="select-tab"><b>Element</b> <!></div>'),Fn=(t,e)=>e(t.target.value),Un=we("<option> </option>"),Gn=we("<select></select>"),zn=we("<span> </span>"),Wn=we('<div class="select-tab"><b>Applied to:</b> <!></div>'),Vn=we("<span> </span>"),Yn=we('<div class="select-tab"><b>Property type:</b> <!></div>'),Xn=we("<button><!></button>"),Jn=we('<div class="icon-selector"></div> <span class="selected-label"> </span>',1),Kn=we("<span> </span>"),Zn=(t,e,n)=>e(ue(n)),Qn=(t,e,n,r)=>e(ue(n),t.target.value,ue(r)[ue(n)].suffix,t.target),tr=we('<input type="range"/> <span class="current-value"> </span>',1),er=(t,e,n)=>e(ue(n),t.target.value),nr=we('<option selected="true">---</option>'),rr=we("<option> </option>"),or=we("<select><!><!></select>"),ir=we('<div><div class="prop-header"><div class="prop-name"><!></div> <button class="delete-btn" title="Reset to default"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 4 L12 12 M12 4 L4 12"></path></svg></button></div> <!></div>'),lr=we("<div>Bring to front</div>"),ar=we('<div class="btn delete-elem">Delete element</div>'),sr=we('<div class="editor"><!> <!> <!></div>'),ur=we('<div style="position: absolute;"></div> <svg class="ise-helper-wrapper" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="overlay-clip" clip-rule="evenodd"><path></path></clipPath><rect y="0" x="0" height="100%" width="100%" class="overlay-over"></rect></svg> <div class="ise"><button class="close-button" title="Close"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M4 4 L12 12 M12 4 L4 12"></path></svg></button> <!> <!> <!> <!></div>',1);function cr(t,e){O(e,!0);const n=["altGlyph","circle","ellipse","line","path","polygon","polyline","rect","text","textPath","tref","tspan","g"],r={"border-radius":{type:"slider",min:0,max:30,suffix:"px"},"border-width":{type:"slider",min:0,max:30,suffix:"px"},"border-style":{type:"select",choices:()=>["none","dotted","dashed","solid","double","groove","ridge","inset","outset"]},"border-color":{type:"color"},"font-family":{type:"select",choices:function(){return[...Hn(),...Pn]}},"font-size":{type:"slider",min:0,max:40,suffix:"px"},"font-weight":{type:"slider",min:0,max:800},color:{type:"color"},"stroke-width":{type:"slider",min:0,max:20,step:.5,suffix:"px"},stroke:{type:"color"},"stroke-linejoin":{type:"select",choices:()=>["bevel","miter","round"]},fill:{type:"color"},"stroke-dasharray":{type:"slider",min:0,max:30,suffix:"px"},"background-color":{type:"color"}},o={stroke:'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><line x1="2" y1="14" x2="14" y2="2"/></svg>',fill:'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="2" y="2" width="12" height="12" rx="2"/></svg>',color:'<svg viewBox="0 0 16 16" fill="currentColor"><text x="3" y="11" font-size="10" font-weight="bold">A</text><rect x="2" y="13" width="12" height="2"/></svg>',"border-color":'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2" width="12" height="12" rx="1"/></svg>',"background-color":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="4" y="4" width="10" height="10" rx="1" opacity="0.5"/><rect x="2" y="2" width="10" height="10" rx="1"/></svg>',"border-radius":'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 10 L2 2 L10 2" stroke-linecap="round"/><path d="M2 10 Q2 14 6 14 L14 14" stroke-linecap="round"/></svg>',"border-width":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="2" y="2" width="12" height="2"/><rect x="2" y="7" width="12" height="3"/><rect x="2" y="13" width="12" height="1"/></svg>',"border-style":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="2" y="2" width="12" height="1.5"/><rect x="2" y="7" width="3" height="1.5"/><rect x="7" y="7" width="3" height="1.5"/><rect x="2" y="12" width="1.5" height="1.5"/><rect x="5" y="12" width="1.5" height="1.5"/><rect x="8" y="12" width="1.5" height="1.5"/><rect x="11" y="12" width="1.5" height="1.5"/></svg>',"font-size":'<svg viewBox="0 0 16 16" fill="currentColor"><text x="1" y="12" font-size="12" font-weight="bold">T</text><text x="9" y="12" font-size="8" font-weight="bold">T</text></svg>',"font-weight":'<svg viewBox="0 0 16 16" fill="currentColor"><text x="3" y="13" font-size="14" font-weight="bold">B</text></svg>',"font-family":'<svg viewBox="0 0 16 16" fill="currentColor"><text x="4" y="13" font-size="14" font-style="italic" font-family="serif">F</text></svg>',"stroke-width":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="2" y="2" width="12" height="2"/><rect x="2" y="7" width="12" height="3"/><rect x="2" y="13" width="12" height="1"/></svg>',"stroke-dasharray":'<svg viewBox="0 0 16 16" fill="currentColor"><rect x="1" y="7" width="4" height="2"/><rect x="7" y="7" width="4" height="2"/><rect x="13" y="7" width="2" height="2"/></svg>',"stroke-linejoin":'<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"><polyline points="3,12 8,4 13,12"/></svg>'},i=e.getElems??null,l=e.listenOnClick??!1,a=e.onStyleChanged??(()=>{}),s=e.customProps??{},u=e.inlineDeletable??(()=>!0),c=e.cssRuleFilter??null,f=e.getCssRuleName??((t,e)=>"inline"===t?"Selected element":t),d=e.ignoredProps??[],h="text",v="border",p="stroke",g="background",m="custom",y={[h]:["font-family","font-size","font-weight","color"],[v]:["border-radius","border-width","border-color","border-style"],[p]:["stroke-width","stroke","stroke-dasharray","stroke-linejoin","fill"],[g]:["background-color"],[m]:Object.keys(s)},b={slider:0,select:1,color:2};let w=z(null),_=z(null),x=z(void 0),k=z(void 0),S=z(void 0),C=z(""),M=z(P({width:0,height:0})),E=z(P([[]])),L=z(P([])),T=z(P([])),A=z(0),N=z(0),$=z(0),B=z(void 0),H=z(P({})),R=z(P([])),j=z(!1);const q=I((()=>ue(E)[ue(A)]?.[0])),F=I((()=>ue(L)[ue(A)]?.[ue(N)]));let U=z(void 0);function G(){const t={...r,...s},e=(n=t,y[ue(U)].reduce(((t,e)=>(t[e]=n[e],t)),{}));var n;d.forEach((t=>delete e[t])),Object.keys(e).forEach((t=>{const n=e[t].type;let r="number";if("color"===n?r="rgb":"select"===n&&(r="raw"),e[t].getter){const n=e[t].getter(ue(q));if(null===n)return void delete e[t];e[t].value=n,e[t].displayed=n}else if(e[t].displayed=ft(ue(q),t,"raw"),e[t].value=ft(ue(q),t,r),"fill"===t){const n=ue(q).getAttribute?.("fill")||e[t].displayed;n&&n.includes("url(")&&(e[t].originalUrl=n,e[t].value="#00000000")}})),console.log(e);const o=Object.entries(e).reduce(((t,[e,n])=>{const r=n.type,o=t.find((t=>t.type===r));return o?o.props.push(e):t.push({selected:0,props:[e],type:r}),t}),[]).sort(((t,e)=>b[t.type]<b[e.type]?-1:b[t.type]>b[e.type]?1:0)),i=o.find((t=>"color"===t.type));if(i){const t=i.props.indexOf("fill"),n=e.fill?.value;-1!==t&&n&&"#00000000"!==n&&(i.selected=t)}V(B,o,!0),V(H,e,!0),tt()}function W(t){return t?t.map(((t,e)=>{if("inline"===t)return"inline";const n=t.selectorText;return`${t.parentStyleSheet.title||`${e}`}: ${n}`})):[]}st((()=>{null!==ue(w)&&l&&ue(w).addEventListener("click",X)})),st((()=>{ue(T)[ue(A)]?.[ue($)]!==ue(U)&&V(U,ue(T)[ue(A)]?.[ue($)],!0)})),st((()=>{(ue(U)||ue(N)||ue(A))&&G()})),Ve((()=>{K(),V(w,ue(k).parentNode,!0),document.body.appendChild(ue(k)),document.body.appendChild(ue(S)),document.body.appendChild(ue(x)),at(),setTimeout((()=>{at()}),1e3),window.addEventListener("resize",at)})),Ye((()=>{window.removeEventListener("resize",at),l&&ue(w).removeEventListener("click",X)}));let Y=new Set;function X(t){J(t.target,t.pageX,t.pageY)}async function J(t,e,r){if(V(_,t,!0),at(),t.classList.contains("overlay-over"))return Z();if(!ue(k).contains(t)){V(A,0),V(N,0),V($,0),V(R,[],!0),V(T,[],!0),V(L,[],!0),V(E,i?i(t):[[t,"Clicked"]],!0),V(T,ue(E).reduce(((t,e)=>{const r=e[0],o=[];r.firstChild&&(!r.firstElementChild&&3===r.firstChild.nodeType||"tspan"===r.firstChild.tagName)&&o.push(h);const i=r.tagName.toLowerCase();let l=!1;return n.includes(i)?(o.push(p),"g"===r.parentElement.tagName.toLowerCase()&&r.previousElementSibling&&r.previousElementSibling.tagName.toLowerCase()==i&&(l=!0)):(o.push(v),o.push(g)),l?ue(R).push(!0):ue(R).push(null),t.push(o),t}),[]),!0),V(j,!1),V(L,function(t){const e=document.styleSheets;return t.reduce(((t,n)=>{const r=n[0],o=["inline"];for(let t in e)try{const n=e[t].cssRules;for(let t in n){let e=n[t].selectorText;if(e&&!(n[t].selectorText.length>50)&&!e.split(",").some((t=>"*"===t))&&(e.endsWith(":hover")&&(e=e.substring(0,e.length-6)),r.matches(e))){if(null!==c&&!c(r,n[t].selectorText))continue;o.push(n[t])}}}catch(n){Y.has(t)||(console.warn("Style editor: Not able to access",e[t].ownerNode,"sheet. Try CORS loading the sheet if you want to edit it."),Y.add(t))}return t.push(o),t}),[])}(ue(E)),!0);for(let e of Object.values(s))if(null!==e.getter(t)){V(j,!0);break}if(Object.keys(s).length&&ue(T)[0].push(m),await se(),G(),e&&r)Q(e,r);else{const e=nt(t,15);Q(e.left,e.top)}}}function K(){ue(k).style.display="none",ue(S).style.display="none",V(C,"")}function Z(){K()}function Q(t,e){ue(k).style.display="block",ue(k).style.opacity=0;const n=ue(k).getBoundingClientRect();t=t+n.width+20>ue(M).width?t-n.width-20:t+20,e=e+n.height+20>ue(M).height?e-n.height-20:e+20,e=Math.max(e,0),ue(k).style.left=t+"px",ue(k).style.top=e+"px",ue(S).style.display="block",ue(k).style.opacity=1,tt()}async function tt(){if(await se(),!ue(F))return;let t;if("inline"===ue(F))t=[ue(q)];else{const e=ue(F).selectorText.replace(/(:hover)|:focus/g,"");t=Array.from(document.querySelectorAll(e))}const e=t.map((t=>nt(t,10)));V(C,function(t,e){let n=function({width:t,height:e,top:n=0,left:r=0}){return`M${r} ${n} v${e} h${t} v-${e}z`}({width:e.width,height:e.height});if(t.length<10&&!function(t){for(let r=0;r<t.length-1;++r){const o=t[r];for(let i=r+1;i<t.length;++i)if(e=o,n=t[i],e.right>=n.left&&n.right>=e.left&&e.bottom>=n.top&&n.bottom>=e.top)return!0}var e,n;return!1}(t)){for(const e of t)n=`${n} ${bn(e)}`;return n}const r=Math.min(...t.map((t=>t.left))),o=Math.min(...t.map((t=>t.top))),i=t.map((t=>(t.left=t.left-r,t.right=t.right-r,t.top=t.top-o,t.bottom=t.bottom-o,t)));i.sort(((t,e)=>t.left>e.left?1:t.left<e.left?-1:0));const l=Math.ceil(Math.max(...i.map((t=>t.right)))),a=Math.ceil(Math.max(...i.map((t=>t.bottom)))),s=l*a/2e4,u=Math.ceil(l/s),c=Math.ceil(a/s),f=l/u,d=a/c,h=new Array(u*c);for(let t=0,e=0;t<c;++t)for(let n=0;n<u;++n,++e)h[e]=yn({x:n*s,y:t*s},i)?1:0;const v=dn().size([u,c]).thresholds([1])(h)[0];let p="";for(let t of v.coordinates)for(let e of t){for(let t=0;t<e.length;++t){const n=e[t],i=n[0]*f+r,l=n[1]*d+o;p+=t?`L ${i} ${l}`:`M${i} ${l}`}p+="Z"}return`${n} ${p}`}(e,ue(M)),!0)}function nt(t,e=0){const n=t.getBoundingClientRect();return{left:n.left+window.scrollX-e,top:n.top+window.scrollY-e,width:n.width+2*e,height:n.height+2*e,right:n.left+window.scrollX+n.width+e,bottom:n.top+window.scrollY+n.height+e}}const lt=function(t,e,n=!1){let r;return function(){const o=this,i=arguments,l=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(o,i)}),e),l&&t.apply(o,i)}}((function(t,e,n){const r=n?e+n:e;if("inline"===ue(F))if(ue(H)[t].setter)ue(H)[t].setter(ue(q),e);else{ue(q).style[t]=r}else ue(F).style.setProperty(t,r);ue(H)[t].value=e,ue(H)[t].displayed=r,a(ue(q),ue(F),t,r),tt()}),100);function at(){const t=getComputedStyle(document.body),e=parseInt(t.marginLeft),n=parseInt(t.marginRight),r=parseInt(t.marginTop),o=parseInt(t.marginBottom);V(M,{width:document.body.offsetWidth+e+n,height:document.body.offsetHeight+r+o},!0)}function ut(t,e="number"){if("raw"==e)return t;if("number"==e&&/[0-9]+(px)|(em)|(rem)/.test(t))return parseInt(t);if("rgb"==e){if("none"===t)return"#00000000";if(t.includes("rgb")||"#"==t[0])return function(t){const e=t.match(/[0-9\.]+/g).map((t=>parseFloat(t)));return 3===e.length&&e.push(1),e.reduce(((t,e,n)=>t+(3===n?Math.round(255*e).toString(16).padStart(2,"0"):e.toString(16).padStart(2,"0"))),"#")}(t)}return t}function ft(t,e,n="number"){let r=ue(F)?.style?.[e];if(!r){r=getComputedStyle(t)[e]}return ut(r,n)}function dt(t){const e=ue(H)[t];if(t in s&&e&&"defaultValue"in s[t]){const n=s[t].defaultValue;e.setter&&e.setter(ue(q),n),e.value=n,e.displayed=n,a(ue(q),ue(F),t,n)}else if("fill"===t&&e?.originalUrl){const t=e.originalUrl;"inline"===ue(F)?ue(q).style.fill=t:ue(F).style.setProperty("fill",t),e.value="#00000000",e.displayed=t,a(ue(q),ue(F),"fill",t)}else if("inline"===ue(F)?ue(q).style.removeProperty(t):ue(F).style.removeProperty(t),a(ue(q),ue(F),t,null),e){const n=e.type;let r="number";"color"===n?r="rgb":"select"===n&&(r="raw"),e.displayed=ft(ue(q),t,"raw"),e.value=ft(ue(q),t,r)}tt()}function ht(t){const e=ue(L)[ue(A)]?.[t];"inline"!==e&&ue($)===ue(T)[ue(A)].length-1&&V($,0),V(N,t,!0)}var vt=ur(),pt=ot(vt);Ue(pt,(t=>V(x,t)),(()=>ue(x)));var mt=it(pt,2);mt.__click=Z;var yt=rt(mt),bt=rt(yt);Ue(mt,(t=>V(S,t)),(()=>ue(S)));var wt=it(mt,2),_t=rt(wt);_t.__click=K;var xt=it(_t,2),kt=t=>{var e=qn();Te(it(rt(e),2),17,(()=>ue(E)),Le,((t,e,n)=>{var r=I((()=>function(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const n=[];for(const r of t)if(n.push(r),n.length===e)break;return n}(ue(e),2)));var o=jn();let i;o.__click=()=>{V(A,n,!0),V(N,0)};var l=rt(o);ct((t=>{i=De(o,0,"",null,i,t),ke(l,ue(r)[1])}),[()=>({selected:ue(A)===n})]),xe(t,o)})),xe(t,e)};Ee(xt,(t=>{ue(E).length>1&&t(kt)}));var St=it(xt,2),Ct=t=>{var e=Wn(),n=it(rt(e),2),r=t=>{var e=Gn();e.__change=[Fn,ht],Te(e,21,(()=>W(ue(L)[ue(A)])),Le,((t,e,n)=>{var r=Un();r.value=r.__value=n;var o=rt(r);ct((t=>{Re(r,ue(N)===n),ke(o,t)}),[()=>f(ue(e),ue(_))]),xe(t,r)})),xe(t,e)},o=t=>{var e=_e();Te(ot(e),17,(()=>W(ue(L)[ue(A)])),Le,((t,e,n)=>{var r=zn();let o;r.__click=()=>{ht(n)};var i=rt(r);ct(((t,n)=>{Ie(r,"title",ue(e)),o=De(r,0,"",null,o,t),ke(i,n)}),[()=>({selected:ue(N)===n}),()=>f(ue(e),ue(_))]),xe(t,r)})),xe(t,e)};Ee(n,(t=>{var e,n;n=ue(L)[ue(A)],((e=W(n).map((t=>f(t,ue(_)))))?e.reduce(((t,e)=>t+e.length),0):0)>30?t(r):t(o,!1)})),xe(t,e)};Ee(St,(t=>{ue(L)[ue(A)]?.length>1&&t(Ct)}));var Mt=it(St,2),Et=t=>{var e=Yn();Te(it(rt(e),2),17,(()=>ue(T)[ue(A)]||[]),Le,((t,e,n)=>{var r=_e(),o=ot(r),i=t=>{var r=Vn();let o;r.__click=()=>{V($,n,!0)};var i=rt(r);ct(((t,e)=>{o=De(r,0,"",null,o,t),ke(i,e)}),[()=>({selected:ue($)===n}),()=>"stroke"===ue(e)?"SVG paint":Xe(ue(e))]),xe(t,r)};Ee(o,(t=>{("custom"!==ue(e)||"inline"===ue(F)&&"custom"===ue(e)&&ue(j))&&t(i)})),xe(t,r)})),xe(t,e)};Ee(Mt,(t=>{(ue(T)[ue(A)]||[]).filter((t=>"custom"!==t||"inline"===ue(F)&&ue(j))).length>1&&t(Et)}));var Lt=it(Mt,2),Tt=t=>{var e=sr(),n=rt(e);Te(n,17,(()=>ue(B)),Le,((t,e,n)=>{var r=ir();const i=I((()=>ue(e).props[ue(e).selected]));var l=rt(r),a=rt(l),s=rt(a),u=t=>{var n=Jn(),r=ot(n);Te(r,21,(()=>ue(e).props),Le,((t,n,r)=>{var i=Xn();let l;i.__click=async()=>{ue(e).selected=r,await se()},function(t,e,n=!1,r=!1){var o=t,i="";ct((()=>{var t=Rt;if(i!==(i=e()??"")&&(null!==t.nodes_start&&(gt(t.nodes_start,t.nodes_end),t.nodes_start=t.nodes_end=null),""!==i)){var l=i+"";n?l=`<svg>${l}</svg>`:r&&(l=`<math>${l}</math>`);var a=ye(l);if((n||r)&&(a=et(a)),be(et(a),a.lastChild),n||r)for(;et(a);)o.before(et(a));else o.before(a)}}))}(rt(i),(()=>o[ue(n)])),ct(((t,e)=>{l=De(i,0,"icon-btn",null,l,t),Ie(i,"title",e)}),[()=>({selected:r===ue(e).selected}),()=>"color"===ue(e).type?`${Xe(ue(n))} color`:Je(ue(n))]),xe(t,i)}));var l=rt(it(r,2));ct((t=>ke(l,t)),[()=>"color"===ue(e).type?`${Xe(ue(i))} color`:Je(ue(i))]),xe(t,n)},c=t=>{var e=Kn(),n=rt(e);ct((t=>ke(n,t)),[()=>Je(ue(i))]),xe(t,e)};Ee(s,(t=>{ue(e).props.length>1?t(u):t(c,!1)})),it(a,2).__click=[Zn,dt,i];var f=it(l,2),d=t=>{var e=tr(),n=ot(e);n.__change=[Qn,lt,i,H];var r=rt(it(n,2));ct((()=>{var t,e,o;Ie(n,"min",ue(H)[ue(i)].min),Ie(n,"max",ue(H)[ue(i)].max),Ie(n,"step",ue(H)[ue(i)].step||1),t=n,e=ue(H)[ue(i)].value,(o=je(t)).value!==(o.value=e??void 0)&&(t.value!==e||0===e&&"PROGRESS"===t.nodeName)&&(t.value=e??""),ke(r,ue(H)[ue(i)].displayed)})),xe(t,e)},h=(t,n)=>{var r=t=>{var e=or();const n=I((()=>ue(H)[ue(i)].choices()));e.__change=[er,lt,i];var r=rt(e),o=t=>{xe(t,nr())};Ee(r,(t=>{ue(n).includes(ue(H)[ue(i)].value)||t(o)})),Te(it(r),17,(()=>ue(n)),Le,((t,e)=>{var n=rr(),r=rt(n);ct((()=>{Re(n,ue(e)==ue(H)[ue(i)].value||null),ke(r,ue(e))})),xe(t,n)})),xe(t,e)},o=(t,n)=>{var r=t=>{Dn(t,{get value(){return ue(H)[ue(i)].value},onChange:t=>lt(ue(i),t)})};Ee(t,(t=>{"color"==ue(e).type&&t(r)}),n)};Ee(t,(t=>{"select"==ue(e).type?t(r):t(o,!1)}),n)};Ee(f,(t=>{"slider"===ue(e).type?t(d):t(h,!1)})),ct((()=>De(r,0,`prop-section ${ue(e).type??""}`))),xe(t,r)}));var r=it(n,2),i=t=>{var e=lr();let n;e.__click=[Rn,R,A,q,a,F],ct((t=>n=De(e,0,"btn",null,n,t)),[()=>({active:!0===ue(R)[ue(A)]})]),xe(t,e)};Ee(r,(t=>{"inline"===ue(F)&&null!==ue(R)[ue(A)]&&t(i)}));var l=it(r,2),s=t=>{var e=ar();e.__click=[In,q,K],xe(t,e)};Ee(l,(t=>{"inline"===ue(F)&&u(ue(q))&&t(s)})),xe(t,e)};return Ee(Lt,(t=>{ue(T)[ue(A)]&&t(Tt)})),Ue(wt,(t=>V(k,t)),(()=>ue(k))),ct((()=>{Ie(mt,"width",ue(M).width),Ie(mt,"height",ue(M).height),Ie(bt,"d",ue(C))})),xe(t,vt),D({open:J,close:K,isOpened:function(){return"block"===ue(k).style.display}})}!function(t){for(var e=0;e<t.length;e++)pe.add(t[e]);for(var n of ge)n(t)}(["click","change"]);return class{constructor(t){const{target:e=document.body,...n}=t;return Se(cr,{target:e,props:n})}}}));
|
|
10
10
|
//# sourceMappingURL=inline-style-editor.js.map
|