inline-style-editor 1.5.7 → 1.5.8
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.
|
@@ -6,4 +6,4 @@
|
|
|
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 kn=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Sn=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}}(),Cn=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=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){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}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 Mn={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 En(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 Ln=function(){function t(e,n,r,i){kn(this,t);var o=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=Cn(n,4),i=r[0],l=r[1],a=r[2],s=r[3];void 0===s&&(s=1),i/=360,l/=100,a/=100,o.hsla=[i,l,a,s]}else if(e.startsWith("rgb")){var u=e.match(/([\-\d\.e]+)/g).map(Number),c=Cn(u,4),f=c[0],d=c[1],h=c[2],v=c[3];void 0===v&&(v=1),o.rgba=[f,d,h,v]}else e.startsWith("#")?o.rgba=t.hexToRgb(e):o.rgba=t.nameToRgb(e)||t.hexToRgb(e)}(l.toLowerCase())}else this.rgba=[e,n,r,void 0===i?1:i]}return Sn(t,[{key:"printRGB",value:function(t){var e=(t?this.rgba:this.rgba.slice(0,3)).map((function(t,e){return En(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 En(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=Mn[n];return void 0===r?r:t.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var e=Cn(t,4),n=e[0],r=e[1],i=e[2],o=e[3];n/=255,r/=255,i/=255;var l=Math.max(n,r,i),a=Math.min(n,r,i),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-i)/f+(r<i?6:0);break;case r:s=(i-n)/f+2;break;case i:s=(n-r)/f+4}s/=6}return[s,u,c,o]}},{key:"hslToRgb",value:function(t){var e=Cn(t,4),n=e[0],r=e[1],i=e[2],o=e[3],l=void 0,a=void 0,s=void 0;if(0===r)l=a=s=i;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=i<.5?i*(1+r):i+r-i*r,f=2*i-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]=o,d}}]),t}(),Tn=function(){function t(){kn(this,t),this._events=[]}return Sn(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(i){var o=!0;return e&&e!==i.target&&(o=!1),n&&n!==i.type&&(o=!1),r&&r!==i.handler&&(o=!1),o&&t._doRemove(i.target,i.type,i.handler),!o}))}},{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 An(t,e,n){var r=!1;function i(t,e,n){return Math.max(e,Math.min(t,n))}function o(t,o,l){if(l&&(r=!0),r){t.preventDefault();var a=e.getBoundingClientRect(),s=a.width,u=a.height,c=o.clientX,f=o.clientY,d=i(c-a.left,0,s),h=i(f-a.top,0,u);n(d/s,h/u)}}function l(t,e){1===(void 0===t.buttons?t.which:t.buttons)?o(t,t,e):r=!1}function a(t,e){1===t.touches.length?o(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 Nn="keydown",$n="mousedown",On="focusin";function Bn(t,e){return(e||document).querySelector(t)}function Dn(t,e,n,r,i){t.add(e,Nn,(function(t){n.indexOf(t.key)>=0&&r(t)}))}var Pn=function(){function t(e){kn(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new Tn,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return Sn(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 i=n.parent;if(i&&n.popup&&!this._popupInited){var o=function(t){return e.openHandler(t)};this._events.add(i,"click",o),Dn(this._events,i,[" ","Spacebar","Enter"],o),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===Nn?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===$n||e===On){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!==$n&&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 Ln(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>',i=(e=r,(n=document.createElement("div")).innerHTML=e,n.firstElementChild);return this.domElement=i,this._domH=Bn(".picker_hue",i),this._domSL=Bn(".picker_sl",i),this._domA=Bn(".picker_alpha",i),this._domEdit=Bn(".picker_editor input",i),this._domSample=Bn(".picker_sample",i),this._domOkay=Bn(".picker_done button",i),this._domCancel=Bn(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup((function(){return i.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 i(t,e,n){r.add(t,e,n)}i(n,"click",(function(t){return t.preventDefault()})),An(r,this._domH,(function(t,n){return e._setHSLA(t)})),An(r,this._domSL,(function(t,n){return e._setHSLA(null,t,1-n)})),this.settings.alpha&&An(r,this._domA,(function(t,n){return e._setHSLA(null,null,null,1-n)}));var o=this._domEdit;i(o,"input",(function(t){e._setColor(this.value,{fromEditor:!0,failSilently:!0})})),i(o,"focus",(function(t){var e=this;e.selectionStart===e.selectionEnd&&e.select()})),this._ifPopup((function(){var e=function(e){return t.closeHandler(e)};i(window,$n,e),i(window,On,e),Dn(r,n,["Esc","Escape"],e);var o=function(e){t.__containedEvent=e.timeStamp};i(n,$n,o),i(n,On,o),i(t._domCancel,"click",e)}));var l=function(e){t._ifPopup((function(){return t.closeHandler(e)})),t.onDone&&t.onDone(t.colour)};i(this._domOkay,"click",l),Dn(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,i){i=i||{};var o=this.colour,l=o.hsla;[t,e,n,r].forEach((function(t,e){(t||0===t)&&(l[e]=t)})),o.hsla=l,this._updateUI(i),this.onChange&&!i.silent&&this.onChange(o)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var e=this.colour,n=e.hsla,r="hsl("+360*n[0]+", 100%, 50%)",i=e.hslString,o=e.hslaString,l=this._domH,a=this._domSL,s=this._domA,u=Bn(".picker_selector",l),c=Bn(".picker_selector",a),f=Bn(".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=i,b(0,f,1-n[3]);var d=i,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=o}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}(),Hn=_e('<div class="picker"></div>');function Rn(t,e){B(e,!0);let n=Xe(e,"value",15,"#AAAAAAFF"),r=Xe(e,"options",19,(()=>({}))),i=Xe(e,"onChange",3,(()=>{})),o=W(void 0),l=W(void 0);function a(t){var e;(e=t.hex)!==n()&&(i()(e,n()),n(e))}ut((()=>{ce(l)&&ce(l).setColor(n())})),Je((()=>{!function(t){if(!ce(o))return;ce(l)&&ce(l).destroy();t.onChange=a,Y(l,new Pn({parent:ce(o),color:n(),popup:!1,...t}),!0),ce(l).show(),ce(l).openHandler()}(r())})),Ke((()=>{ce(l)?.destroy()}));var s=Hn();return We(s,(t=>Y(o,t)),(()=>ce(o))),ke(t,s),D({setColor:function(t){ce(l).setColor(t)}})}const In=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"],i=document.getElementsByTagName("body")[0],o=document.createElement("span");o.style.fontSize="72px",o.innerHTML="mmmmmmmmmmlli",r.forEach((t=>{o.style.fontFamily=t,i.appendChild(o),e[t]=o.offsetWidth,n[t]=o.offsetHeight,i.removeChild(o)}));const l=[],a=t=>{let l=!1;for(const a of r){o.style.fontFamily=t+","+a,i.appendChild(o);const r=o.offsetWidth!=e[a]||o.offsetHeight!=n[a];i.removeChild(o),l=l||r}return l};for(const e of t.values())a(e)&&l.push(e);return l.sort()}();function jn(){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 Fn(t,e,n,r,i,o){ce(e)[ce(n)]=!1,ce(r).parentNode.appendChild(ce(r)),i(ce(r),ce(o),"bringtofront",null)}function qn(t,e,n){ce(e).remove(),n()}var Un=_e("<span> </span>"),Gn=_e('<div class="select-tab"><b>Element</b> <!></div>'),zn=(t,e)=>e(+t.target.value),Wn=_e("<option> </option>"),Vn=_e("<select></select>"),Yn=_e("<span> </span>"),Xn=_e('<div class="select-tab"><b>Applied to:</b> <!></div>'),Jn=_e("<span> </span>"),Kn=_e('<div class="select-tab"><b>Property type:</b> <!></div>'),Zn=_e("<button><!></button>"),Qn=_e('<div class="icon-selector"></div> <span class="selected-label"> </span>',1),tr=_e("<span> </span>"),er=(t,e,n)=>e(ce(n)),nr=(t,e,n,r)=>e(ce(n),t.target.value,ce(r)[ce(n)].suffix,t.target),rr=_e('<input type="range"/> <span class="current-value"> </span>',1),ir=(t,e,n)=>e(ce(n),t.target.value),or=_e('<option selected="true">---</option>'),lr=_e("<option> </option>"),ar=_e("<select><!><!></select>"),sr=_e('<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>'),ur=_e("<div>Bring to front</div>"),cr=_e('<div class="btn delete-elem">Delete element</div>'),fr=_e('<div class="editor"><!> <!> <!></div>'),dr=_e('<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 hr(t,e){B(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[...jn(),...In]}},"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:5,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"}},i={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>'},o=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=W(null),_=W(null),x=W(void 0),k=W(void 0),S=W(void 0),C=W(""),M=W(P({width:0,height:0})),E=W(P([[]])),L=W(P([])),T=W(P([])),A=W(0),N=W(0),$=W(0),O=W(void 0),H=W(P({})),R=W(P([])),I=W(!1),F=W(P(window.location.href.replace(/#.*$/,"")));const q=j((()=>ce(E)[ce(A)]?.[0])),U=j((()=>ce(L)[ce(A)]?.[ce(N)]));let G=W(void 0);function z(){const t={...r,...s},e=(n=t,y[ce(G)].reduce(((t,e)=>(t[e]=n[e],t)),{}));var n;d.forEach((t=>delete e[t]));const i=ce(q)?.tagName?.toLowerCase();ce(G)!==h||"text"!==i&&"tspan"!==i||delete e.color,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(ce(q));if(null===n)return void delete e[t];e[t].value=n,e[t].displayed=n}else if(e[t].displayed=ht(ce(q),t,"raw"),e[t].value=ht(ce(q),t,r),"fill"===t){const n=ce(q).getAttribute?.("fill")||e[t].displayed;n&&n.includes("url(")&&(e[t].originalUrl=n,e[t].value="#00000000")}}));const o=Object.entries(e).reduce(((t,[e,n])=>{const r=n.type,i=t.find((t=>t.type===r));return i?i.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)),l=o.find((t=>"color"===t.type));if(l){const t=l.props.indexOf("fill"),n=e.fill?.value;-1!==t&&n&&"#00000000"!==n&&(l.selected=t)}Y(O,o,!0),Y(H,e,!0),et()}function V(t){return t?t.map(((t,e)=>{if("inline"===t)return"inline";const n=t.selectorText;return`${t.parentStyleSheet.title||`${e}`}: ${n}`})):[]}ut((()=>{null!==ce(w)&&l&&ce(w).addEventListener("click",J)})),ut((()=>{ce(T)[ce(A)]?.[ce($)]!==ce(G)&&Y(G,ce(T)[ce(A)]?.[ce($)],!0)})),ut((()=>{(ce(G)||ce(N)||ce(A))&&z()})),Je((()=>{Z(),Y(w,ce(k).parentNode,!0),document.body.appendChild(ce(k)),document.body.appendChild(ce(S)),document.body.appendChild(ce(x)),st(),setTimeout((()=>{st()}),1e3),window.addEventListener("resize",st)})),Ke((()=>{window.removeEventListener("resize",st),l&&ce(w).removeEventListener("click",J)}));let X=new Set;function J(t){K(t.target,t.pageX,t.pageY)}async function K(t,e,r){if(Y(_,t,!0),Y(F,window.location.href.replace(/#.*$/,""),!0),st(),t.classList.contains("overlay-over"))return Q();if(!ce(k).contains(t)&&(Y(A,0),Y(N,0),Y($,0),Y(R,[],!0),Y(T,[],!0),Y(L,[],!0),Y(E,o?o(t):[[t,"Clicked"]],!0),Y(T,ce(E).reduce(((t,e)=>{const r=e[0],i=[];r.firstChild&&(!r.firstElementChild&&3===r.firstChild.nodeType||"tspan"===r.firstChild.tagName)&&i.push(h);const o=r.tagName.toLowerCase();let l=!1;return n.includes(o)?(i.push(p),"g"===r.parentElement.tagName.toLowerCase()&&r.previousElementSibling&&r.previousElementSibling.tagName.toLowerCase()==o&&(l=!0)):(i.push(v),i.push(g)),l?ce(R).push(!0):ce(R).push(null),t.push(i),t}),[]),!0),Y(I,!1),Y(L,function(t){const e=document.styleSheets;return t.reduce(((t,n)=>{const r=n[0],i=[];(null===c||c(r,"inline"))&&i.push("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;i.push(n[t])}}}catch(n){X.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."),X.add(t))}return t.push(i),t}),[])}(ce(E)),!0),!ce(L).every((t=>0===t.length)))){for(let e of Object.values(s))if(null!==e.getter(t)){Y(I,!0);break}if(Object.keys(s).length&&ce(T)[0].push(m),await ue(),z(),e&&r)tt(e,r);else{const e=rt(t,15);tt(e.left,e.top)}}}function Z(){ce(k).style.display="none",ce(S).style.display="none",Y(C,"")}function Q(){Z()}function tt(t,e){ce(k).style.display="block",ce(k).style.opacity=0;const n=ce(k).getBoundingClientRect();t=t+n.width+20>ce(M).width?t-n.width-20:t+20,e=e+n.height+20>ce(M).height?e-n.height-20:e+20,e=Math.max(e,0),ce(k).style.left=t+"px",ce(k).style.top=e+"px",ce(S).style.display="block",ce(k).style.opacity=1,et()}async function et(){if(await ue(),!ce(U))return;let t;if("inline"===ce(U))t=[ce(q)];else{const e=ce(U).selectorText.replace(/(:hover)|:focus/g,"");t=Array.from(document.querySelectorAll(e))}const e=t.map((t=>rt(t,10)));Y(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 i=t[r];for(let o=r+1;o<t.length;++o)if(e=i,n=t[o],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} ${xn(e)}`;return n}const r=Math.min(...t.map((t=>t.left))),i=Math.min(...t.map((t=>t.top))),o=t.map((t=>(t.left=t.left-r,t.right=t.right-r,t.top=t.top-i,t.bottom=t.bottom-i,t)));o.sort(((t,e)=>t.left>e.left?1:t.left<e.left?-1:0));const l=Math.ceil(Math.max(...o.map((t=>t.right)))),a=Math.ceil(Math.max(...o.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]=_n({x:n*s,y:t*s},o)?1:0;const v=pn().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],o=n[0]*f+r,l=n[1]*d+i;p+=t?`L ${o} ${l}`:`M${o} ${l}`}p+="Z"}return`${n} ${p}`}(e,ce(M)),!0)}function rt(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 at=function(t,e,n=!1){let r;return function(){const i=this,o=arguments,l=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(i,o)}),e),l&&t.apply(i,o)}}((function(t,e,n){const r=n?e+n:e;if("inline"===ce(U))if(ce(H)[t].setter)ce(H)[t].setter(ce(q),e);else{ce(q).style[t]=r}else ce(U).style.setProperty(t,r);ce(H)[t].value=e,ce(H)[t].displayed=r,a(ce(q),ce(U),t,r),et()}),100);function st(){const t=getComputedStyle(document.body),e=parseInt(t.marginLeft),n=parseInt(t.marginRight),r=parseInt(t.marginTop),i=parseInt(t.marginBottom);Y(M,{width:document.body.offsetWidth+e+n,height:document.body.offsetHeight+r+i},!0)}function dt(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 ht(t,e,n="number"){let r=ce(U)?.style?.[e];if(!r){r=getComputedStyle(t)[e]}return dt(r,n)}function vt(t){const e=ce(H)[t];if(t in s&&e&&"defaultValue"in s[t]){const n=s[t].defaultValue;e.setter&&e.setter(ce(q),n),e.value=n,e.displayed=n,a(ce(q),ce(U),t,n)}else if("fill"===t&&e?.originalUrl){const t=e.originalUrl;"inline"===ce(U)?ce(q).style.fill=t:ce(U).style.setProperty("fill",t),e.value="#00000000",e.displayed=t,a(ce(q),ce(U),"fill",t)}else if("inline"===ce(U)?ce(q).style.removeProperty(t):ce(U).style.removeProperty(t),a(ce(q),ce(U),t,null),e){const n=e.type;let r="number";"color"===n?r="rgb":"select"===n&&(r="raw"),e.displayed=ht(ce(q),t,"raw"),e.value=ht(ce(q),t,r)}et()}function pt(t){const e=ce(L)[ce(A)]?.[t];"inline"!==e&&ce($)===ce(T)[ce(A)].length-1&&Y($,0),Y(N,t,!0)}var gt=dr(),yt=ot(gt);We(yt,(t=>Y(x,t)),(()=>ce(x)));var bt=lt(yt,2);bt.__click=Q;var wt=it(bt),_t=it(wt),xt=lt(wt);We(bt,(t=>Y(S,t)),(()=>ce(S)));var kt=lt(bt,2),St=it(kt);St.__click=Z;var Ct=lt(St,2),Mt=t=>{var e=Gn();Ae(lt(it(e),2),17,(()=>ce(E)),Te,((t,e,n)=>{var r=j((()=>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}(ce(e),2)));var i=Un();let o;i.__click=()=>{Y(A,n,!0),Y(N,0)};var l=it(i);ft((t=>{o=Pe(i,0,"",null,o,t),Se(l,ce(r)[1])}),[()=>({selected:ce(A)===n})]),ke(t,i)})),ke(t,e)};Le(Ct,(t=>{ce(E).length>1&&t(Mt)}));var Et=lt(Ct,2),Lt=t=>{var e=Xn(),n=lt(it(e),2),r=t=>{var e,n=Vn();!function(t,e){let n=!0;ct((()=>{e&&Re(t,fe(e),n),n=!1;var r=new MutationObserver((()=>{var e=t.__value;Re(t,e)}));return r.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{r.disconnect()}}))}(n,(()=>ce(N))),n.__change=[zn,pt],Ae(n,21,(()=>V(ce(L)[ce(A)])),Te,((t,e,n)=>{var r=Wn();r.value=r.__value=n;var i=it(r);ft((t=>Se(i,t)),[()=>f(ce(e),ce(_))]),ke(t,r)})),ft((()=>{e!==(e=ce(N))&&(n.value=(n.__value=ce(N))??"",Re(n,ce(N)))})),ke(t,n)},i=t=>{var e=xe();Ae(ot(e),17,(()=>V(ce(L)[ce(A)])),Te,((t,e,n)=>{var r=Yn();let i;r.__click=()=>{pt(n)};var o=it(r);ft(((t,n)=>{qe(r,"title",ce(e)),i=Pe(r,0,"",null,i,t),Se(o,n)}),[()=>({selected:ce(N)===n}),()=>f(ce(e),ce(_))]),ke(t,r)})),ke(t,e)};Le(n,(t=>{var e,n;n=ce(L)[ce(A)],((e=V(n).map((t=>f(t,ce(_)))))?e.reduce(((t,e)=>t+e.length),0):0)>30?t(r):t(i,!1)})),ke(t,e)};Le(Et,(t=>{ce(L)[ce(A)]?.length>1&&t(Lt)}));var Tt=lt(Et,2),At=t=>{var e=Kn();Ae(lt(it(e),2),17,(()=>ce(T)[ce(A)]||[]),Te,((t,e,n)=>{var r=xe(),i=ot(r),o=t=>{var r=Jn();let i;r.__click=()=>{Y($,n,!0)};var o=it(r);ft(((t,e)=>{i=Pe(r,0,"",null,i,t),Se(o,e)}),[()=>({selected:ce($)===n}),()=>"stroke"===ce(e)?"SVG paint":Ze(ce(e))]),ke(t,r)};Le(i,(t=>{("custom"!==ce(e)||"inline"===ce(U)&&"custom"===ce(e)&&ce(I))&&t(o)})),ke(t,r)})),ke(t,e)};Le(Tt,(t=>{(ce(T)[ce(A)]||[]).filter((t=>"custom"!==t||"inline"===ce(U)&&ce(I))).length>1&&t(At)}));var Nt=lt(Tt,2),$t=t=>{var e=fr(),n=it(e);Ae(n,17,(()=>ce(O)),Te,((t,e,n)=>{var r=sr();const o=j((()=>ce(e).props[ce(e).selected]));var l=it(r),a=it(l),s=it(a),u=t=>{var n=Qn(),r=ot(n);Ae(r,21,(()=>ce(e).props),Te,((t,n,r)=>{var o=Zn();let l;o.__click=async()=>{ce(e).selected=r,await ue()},function(t,e,n=!1,r=!1){var i=t,o="";ft((()=>{var t=It;if(o!==(o=e()??"")&&(null!==t.nodes_start&&(mt(t.nodes_start,t.nodes_end),t.nodes_start=t.nodes_end=null),""!==o)){var l=o+"";n?l=`<svg>${l}</svg>`:r&&(l=`<math>${l}</math>`);var a=be(l);if((n||r)&&(a=nt(a)),we(nt(a),a.lastChild),n||r)for(;nt(a);)i.before(nt(a));else i.before(a)}}))}(it(o),(()=>i[ce(n)])),ft(((t,e)=>{l=Pe(o,0,"icon-btn",null,l,t),qe(o,"title",e)}),[()=>({selected:r===ce(e).selected}),()=>"color"===ce(e).type?`${Ze(ce(n))} color`:Qe(ce(n))]),ke(t,o)}));var l=it(lt(r,2));ft((t=>Se(l,t)),[()=>"color"===ce(e).type?`${Ze(ce(o))} color`:Qe(ce(o))]),ke(t,n)},c=t=>{var e=tr(),n=it(e);ft((t=>Se(n,t)),[()=>Qe(ce(o))]),ke(t,e)};Le(s,(t=>{ce(e).props.length>1?t(u):t(c,!1)})),lt(a,2).__click=[er,vt,o];var f=lt(l,2),d=t=>{var e=rr(),n=ot(e);n.__change=[nr,at,o,H];var r=it(lt(n,2));ft((()=>{var t,e,i;qe(n,"min",ce(H)[ce(o)].min),qe(n,"max",ce(H)[ce(o)].max),qe(n,"step",ce(H)[ce(o)].step||1),t=n,e=ce(H)[ce(o)].value,(i=Ue(t)).value!==(i.value=e??void 0)&&(t.value!==e||0===e&&"PROGRESS"===t.nodeName)&&(t.value=e??""),Se(r,ce(H)[ce(o)].displayed)})),ke(t,e)},h=(t,n)=>{var r=t=>{var e=ar();const n=j((()=>ce(H)[ce(o)].choices()));e.__change=[ir,at,o];var r=it(e),i=t=>{ke(t,or())};Le(r,(t=>{ce(n).includes(ce(H)[ce(o)].value)||t(i)})),Ae(lt(r),17,(()=>ce(n)),Te,((t,e)=>{var n=lr(),r=it(n);ft((()=>{var t;t=n,ce(e)==ce(H)[ce(o)].value||null?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected"),Se(r,ce(e))})),ke(t,n)})),ke(t,e)},i=(t,n)=>{var r=t=>{Rn(t,{get value(){return ce(H)[ce(o)].value},onChange:t=>at(ce(o),t)})};Le(t,(t=>{"color"==ce(e).type&&t(r)}),n)};Le(t,(t=>{"select"==ce(e).type?t(r):t(i,!1)}),n)};Le(f,(t=>{"slider"===ce(e).type?t(d):t(h,!1)})),ft((()=>Pe(r,0,`prop-section ${ce(e).type??""}`))),ke(t,r)}));var r=lt(n,2),o=t=>{var e=ur();let n;e.__click=[Fn,R,A,q,a,U],ft((t=>n=Pe(e,0,"btn",null,n,t)),[()=>({active:!0===ce(R)[ce(A)]})]),ke(t,e)};Le(r,(t=>{"inline"===ce(U)&&null!==ce(R)[ce(A)]&&t(o)}));var l=lt(r,2),s=t=>{var e=cr();e.__click=[qn,q,Z],ke(t,e)};Le(l,(t=>{"inline"===ce(U)&&u(ce(q))&&t(s)})),ke(t,e)};return Le(Nt,(t=>{ce(T)[ce(A)]&&t($t)})),We(kt,(t=>Y(k,t)),(()=>ce(k))),ft((()=>{qe(bt,"width",ce(M).width),qe(bt,"height",ce(M).height),qe(_t,"d",ce(C)),He(xt,`clip-path: url(${ce(F)??""}#overlay-clip)`)})),ke(t,gt),D({open:K,close:Z,isOpened:function(){return"block"===ce(k).style.display}})}!function(t){for(var e=0;e<t.length;e++)ge.add(t[e]);for(var n of me)n(t)}(["click","change"]);return class{constructor(t){const{target:e=document.body,...n}=t;return Ce(hr,{target:e,props:n})}}}));
|
|
9
|
+
var kn=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Sn=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}}(),Cn=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=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){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}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 Mn={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 En(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 Ln=function(){function t(e,n,r,i){kn(this,t);var o=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=Cn(n,4),i=r[0],l=r[1],a=r[2],s=r[3];void 0===s&&(s=1),i/=360,l/=100,a/=100,o.hsla=[i,l,a,s]}else if(e.startsWith("rgb")){var u=e.match(/([\-\d\.e]+)/g).map(Number),c=Cn(u,4),f=c[0],d=c[1],h=c[2],v=c[3];void 0===v&&(v=1),o.rgba=[f,d,h,v]}else e.startsWith("#")?o.rgba=t.hexToRgb(e):o.rgba=t.nameToRgb(e)||t.hexToRgb(e)}(l.toLowerCase())}else this.rgba=[e,n,r,void 0===i?1:i]}return Sn(t,[{key:"printRGB",value:function(t){var e=(t?this.rgba:this.rgba.slice(0,3)).map((function(t,e){return En(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 En(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=Mn[n];return void 0===r?r:t.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var e=Cn(t,4),n=e[0],r=e[1],i=e[2],o=e[3];n/=255,r/=255,i/=255;var l=Math.max(n,r,i),a=Math.min(n,r,i),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-i)/f+(r<i?6:0);break;case r:s=(i-n)/f+2;break;case i:s=(n-r)/f+4}s/=6}return[s,u,c,o]}},{key:"hslToRgb",value:function(t){var e=Cn(t,4),n=e[0],r=e[1],i=e[2],o=e[3],l=void 0,a=void 0,s=void 0;if(0===r)l=a=s=i;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=i<.5?i*(1+r):i+r-i*r,f=2*i-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]=o,d}}]),t}(),Tn=function(){function t(){kn(this,t),this._events=[]}return Sn(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(i){var o=!0;return e&&e!==i.target&&(o=!1),n&&n!==i.type&&(o=!1),r&&r!==i.handler&&(o=!1),o&&t._doRemove(i.target,i.type,i.handler),!o}))}},{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 An(t,e,n){var r=!1;function i(t,e,n){return Math.max(e,Math.min(t,n))}function o(t,o,l){if(l&&(r=!0),r){t.preventDefault();var a=e.getBoundingClientRect(),s=a.width,u=a.height,c=o.clientX,f=o.clientY,d=i(c-a.left,0,s),h=i(f-a.top,0,u);n(d/s,h/u)}}function l(t,e){1===(void 0===t.buttons?t.which:t.buttons)?o(t,t,e):r=!1}function a(t,e){1===t.touches.length?o(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 Nn="keydown",$n="mousedown",On="focusin";function Bn(t,e){return(e||document).querySelector(t)}function Dn(t,e,n,r,i){t.add(e,Nn,(function(t){n.indexOf(t.key)>=0&&r(t)}))}var Pn=function(){function t(e){kn(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new Tn,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return Sn(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 i=n.parent;if(i&&n.popup&&!this._popupInited){var o=function(t){return e.openHandler(t)};this._events.add(i,"click",o),Dn(this._events,i,[" ","Spacebar","Enter"],o),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===Nn?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===$n||e===On){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!==$n&&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 Ln(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>',i=(e=r,(n=document.createElement("div")).innerHTML=e,n.firstElementChild);return this.domElement=i,this._domH=Bn(".picker_hue",i),this._domSL=Bn(".picker_sl",i),this._domA=Bn(".picker_alpha",i),this._domEdit=Bn(".picker_editor input",i),this._domSample=Bn(".picker_sample",i),this._domOkay=Bn(".picker_done button",i),this._domCancel=Bn(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup((function(){return i.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 i(t,e,n){r.add(t,e,n)}i(n,"click",(function(t){return t.preventDefault()})),An(r,this._domH,(function(t,n){return e._setHSLA(t)})),An(r,this._domSL,(function(t,n){return e._setHSLA(null,t,1-n)})),this.settings.alpha&&An(r,this._domA,(function(t,n){return e._setHSLA(null,null,null,1-n)}));var o=this._domEdit;i(o,"input",(function(t){e._setColor(this.value,{fromEditor:!0,failSilently:!0})})),i(o,"focus",(function(t){var e=this;e.selectionStart===e.selectionEnd&&e.select()})),this._ifPopup((function(){var e=function(e){return t.closeHandler(e)};i(window,$n,e),i(window,On,e),Dn(r,n,["Esc","Escape"],e);var o=function(e){t.__containedEvent=e.timeStamp};i(n,$n,o),i(n,On,o),i(t._domCancel,"click",e)}));var l=function(e){t._ifPopup((function(){return t.closeHandler(e)})),t.onDone&&t.onDone(t.colour)};i(this._domOkay,"click",l),Dn(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,i){i=i||{};var o=this.colour,l=o.hsla;[t,e,n,r].forEach((function(t,e){(t||0===t)&&(l[e]=t)})),o.hsla=l,this._updateUI(i),this.onChange&&!i.silent&&this.onChange(o)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var e=this.colour,n=e.hsla,r="hsl("+360*n[0]+", 100%, 50%)",i=e.hslString,o=e.hslaString,l=this._domH,a=this._domSL,s=this._domA,u=Bn(".picker_selector",l),c=Bn(".picker_selector",a),f=Bn(".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=i,b(0,f,1-n[3]);var d=i,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=o}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}(),Hn=_e('<div class="picker"></div>');function Rn(t,e){B(e,!0);let n=Xe(e,"value",15,"#AAAAAAFF"),r=Xe(e,"options",19,(()=>({}))),i=Xe(e,"onChange",3,(()=>{})),o=W(void 0),l=W(void 0);function a(t){var e;(e=t.hex)!==n()&&(i()(e,n()),n(e))}ut((()=>{ce(l)&&ce(l).setColor(n())})),Je((()=>{!function(t){if(!ce(o))return;ce(l)&&ce(l).destroy();t.onChange=a,Y(l,new Pn({parent:ce(o),color:n(),popup:!1,...t}),!0),ce(l).show(),ce(l).openHandler()}(r())})),Ke((()=>{ce(l)?.destroy()}));var s=Hn();return We(s,(t=>Y(o,t)),(()=>ce(o))),ke(t,s),D({setColor:function(t){ce(l).setColor(t)}})}const In=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"],i=document.getElementsByTagName("body")[0],o=document.createElement("span");o.style.fontSize="72px",o.innerHTML="mmmmmmmmmmlli",r.forEach((t=>{o.style.fontFamily=t,i.appendChild(o),e[t]=o.offsetWidth,n[t]=o.offsetHeight,i.removeChild(o)}));const l=[],a=t=>{let l=!1;for(const a of r){o.style.fontFamily=t+","+a,i.appendChild(o);const r=o.offsetWidth!=e[a]||o.offsetHeight!=n[a];i.removeChild(o),l=l||r}return l};for(const e of t.values())a(e)&&l.push(e);return l.sort()}();function jn(){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 Fn(t,e,n,r,i,o){ce(e)[ce(n)]=!1,ce(r).parentNode.appendChild(ce(r)),i(ce(r),ce(o),"bringtofront",null)}function qn(t,e,n){ce(e).remove(),n()}var Un=_e("<span> </span>"),Gn=_e('<div class="select-tab"><b>Element</b> <!></div>'),zn=(t,e)=>e(+t.target.value),Wn=_e("<option> </option>"),Vn=_e("<select></select>"),Yn=_e("<span> </span>"),Xn=_e('<div class="select-tab"><b>Applied to:</b> <!></div>'),Jn=_e("<span> </span>"),Kn=_e('<div class="select-tab"><b>Property type:</b> <!></div>'),Zn=_e("<button><!></button>"),Qn=_e('<div class="icon-selector"></div> <span class="selected-label"> </span>',1),tr=_e("<span> </span>"),er=(t,e,n)=>e(ce(n)),nr=(t,e,n,r)=>e(ce(n),t.target.value,ce(r)[ce(n)].suffix,t.target),rr=_e('<input type="range"/> <span class="current-value"> </span>',1),ir=(t,e,n)=>e(ce(n),t.target.value),or=_e('<option selected="true">---</option>'),lr=_e("<option> </option>"),ar=_e("<select><!><!></select>"),sr=_e('<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>'),ur=_e("<div>Bring to front</div>"),cr=_e('<div class="btn delete-elem">Delete element</div>'),fr=_e('<div class="editor"><!> <!> <!></div>'),dr=_e('<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 hr(t,e){B(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[...jn(),...In]}},"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:5,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"}},i={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>'},o=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=W(null),_=W(null),x=W(void 0),k=W(void 0),S=W(void 0),C=W(""),M=W(P({width:0,height:0})),E=W(P([[]])),L=W(P([])),T=W(P([])),A=W(0),N=W(0),$=W(0),O=W(void 0),H=W(P({})),R=W(P([])),I=W(!1),F=W(P(window.location.href.replace(/#.*$/,"")));const q=j((()=>ce(E)[ce(A)]?.[0])),U=j((()=>ce(L)[ce(A)]?.[ce(N)]));let G=W(void 0);function z(){const t={...r,...s},e=(n=t,y[ce(G)].reduce(((t,e)=>(t[e]=n[e],t)),{}));var n;d.forEach((t=>delete e[t]));const i=ce(q)?.tagName?.toLowerCase();ce(G)!==h||"text"!==i&&"tspan"!==i||delete e.color,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(ce(q));if(null===n)return void delete e[t];e[t].value=n,e[t].displayed=n}else if(e[t].displayed=ht(ce(q),t,"raw"),e[t].value=ht(ce(q),t,r),"fill"===t){const n=ce(q).getAttribute?.("fill")||e[t].displayed;n&&n.includes("url(")&&(e[t].originalUrl=n,e[t].value="#00000000")}}));const o=Object.entries(e).reduce(((t,[e,n])=>{const r=n.type,i=t.find((t=>t.type===r));return i?i.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)),l=o.find((t=>"color"===t.type));if(l){const t=l.props.indexOf("fill"),n=e.fill?.value;-1!==t&&n&&"#00000000"!==n&&(l.selected=t)}Y(O,o,!0),Y(H,e,!0),et()}function V(t){return t?t.map(((t,e)=>{if("inline"===t)return"inline";const n=t.selectorText;return`${t.parentStyleSheet.title||`${e}`}: ${n}`})):[]}ut((()=>{null!==ce(w)&&l&&ce(w).addEventListener("click",J)})),ut((()=>{ce(T)[ce(A)]?.[ce($)]!==ce(G)&&Y(G,ce(T)[ce(A)]?.[ce($)],!0)})),ut((()=>{(ce(G)||ce(N)||ce(A))&&z()})),Je((()=>{Z(),Y(w,ce(k).parentNode,!0),document.body.appendChild(ce(k)),document.body.appendChild(ce(S)),document.body.appendChild(ce(x)),st(),setTimeout((()=>{st()}),1e3),window.addEventListener("resize",st)})),Ke((()=>{window.removeEventListener("resize",st),l&&ce(w).removeEventListener("click",J)}));let X=new Set;function J(t){K(t.target,t.pageX,t.pageY)}async function K(t,e,r){if(Y(_,t,!0),Y(F,window.location.href.replace(/#.*$/,""),!0),st(),t.classList.contains("overlay-over"))return Q();if(!ce(k).contains(t)&&(Y(A,0),Y(N,0),Y($,0),Y(R,[],!0),Y(T,[],!0),Y(L,[],!0),Y(E,o?o(t):[[t,"Clicked"]],!0),Y(T,ce(E).reduce(((t,e)=>{const r=e[0],i=[];r.firstChild&&(!r.firstElementChild&&3===r.firstChild.nodeType||"tspan"===r.firstChild.tagName)&&i.push(h);const o=r.tagName.toLowerCase();let l=!1;return n.includes(o)?(i.push(p),"g"===r.parentElement.tagName.toLowerCase()&&r.previousElementSibling&&r.previousElementSibling.tagName.toLowerCase()==o&&(l=!0)):(i.push(v),i.push(g)),l?ce(R).push(!0):ce(R).push(null),t.push(i),t}),[]),!0),Y(I,!1),Y(L,function(t){const e=document.styleSheets;return t.reduce(((t,n)=>{const r=n[0],i=[];(null===c||c(r,"inline"))&&i.push("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;i.push(n[t])}}}catch(n){X.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."),X.add(t))}return t.push(i),t}),[])}(ce(E)),!0),!ce(L).every((t=>0===t.length)))){for(let e of Object.values(s))if(null!==e.getter(t)){Y(I,!0);break}if(Object.keys(s).length&&ce(T)[0].push(m),await ue(),z(),e&&r)tt(e,r);else{const e=rt(t,15);tt(e.left,e.top)}}}function Z(){ce(k).style.display="none",ce(S).style.display="none",Y(C,"")}function Q(){Z()}function tt(t,e){ce(k).style.display="block",ce(k).style.opacity=0;const n=ce(k).getBoundingClientRect();t=t+n.width+20>ce(M).width?t-n.width-20:t+20,e=e+n.height+20>ce(M).height?e-n.height-20:e+20,e=Math.max(e,0),ce(k).style.left=t+"px",ce(k).style.top=e+"px",ce(S).style.display="block",ce(k).style.opacity=1,et()}async function et(){if(await ue(),!ce(U))return;let t;if("inline"===ce(U))t=[ce(q)];else{const e=ce(U).selectorText.replace(/(:hover)|:focus|\.hovered/g,"");t=Array.from(document.querySelectorAll(e))}const e=t.map((t=>rt(t,10)));Y(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 i=t[r];for(let o=r+1;o<t.length;++o)if(e=i,n=t[o],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} ${xn(e)}`;return n}const r=Math.min(...t.map((t=>t.left))),i=Math.min(...t.map((t=>t.top))),o=t.map((t=>(t.left=t.left-r,t.right=t.right-r,t.top=t.top-i,t.bottom=t.bottom-i,t)));o.sort(((t,e)=>t.left>e.left?1:t.left<e.left?-1:0));const l=Math.ceil(Math.max(...o.map((t=>t.right)))),a=Math.ceil(Math.max(...o.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]=_n({x:n*s,y:t*s},o)?1:0;const v=pn().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],o=n[0]*f+r,l=n[1]*d+i;p+=t?`L ${o} ${l}`:`M${o} ${l}`}p+="Z"}return`${n} ${p}`}(e,ce(M)),!0)}function rt(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 at=function(t,e,n=!1){let r;return function(){const i=this,o=arguments,l=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(i,o)}),e),l&&t.apply(i,o)}}((function(t,e,n){const r=n?e+n:e;if("inline"===ce(U))if(ce(H)[t].setter)ce(H)[t].setter(ce(q),e);else{ce(q).style[t]=r}else ce(U).style.setProperty(t,r);ce(H)[t].value=e,ce(H)[t].displayed=r,a(ce(q),ce(U),t,r),et()}),100);function st(){const t=getComputedStyle(document.body),e=parseInt(t.marginLeft),n=parseInt(t.marginRight),r=parseInt(t.marginTop),i=parseInt(t.marginBottom);Y(M,{width:document.body.offsetWidth+e+n,height:document.body.offsetHeight+r+i},!0)}function dt(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 ht(t,e,n="number"){let r=ce(U)?.style?.[e];if(!r){r=getComputedStyle(t)[e]}return dt(r,n)}function vt(t){const e=ce(H)[t];if(t in s&&e&&"defaultValue"in s[t]){const n=s[t].defaultValue;e.setter&&e.setter(ce(q),n),e.value=n,e.displayed=n,a(ce(q),ce(U),t,n)}else if("fill"===t&&e?.originalUrl){const t=e.originalUrl;"inline"===ce(U)?ce(q).style.fill=t:ce(U).style.setProperty("fill",t),e.value="#00000000",e.displayed=t,a(ce(q),ce(U),"fill",t)}else if("inline"===ce(U)?ce(q).style.removeProperty(t):ce(U).style.removeProperty(t),a(ce(q),ce(U),t,null),e){const n=e.type;let r="number";"color"===n?r="rgb":"select"===n&&(r="raw"),e.displayed=ht(ce(q),t,"raw"),e.value=ht(ce(q),t,r)}et()}function pt(t){const e=ce(L)[ce(A)]?.[t];"inline"!==e&&ce($)===ce(T)[ce(A)].length-1&&Y($,0),Y(N,t,!0)}var gt=dr(),yt=ot(gt);We(yt,(t=>Y(x,t)),(()=>ce(x)));var bt=lt(yt,2);bt.__click=Q;var wt=it(bt),_t=it(wt),xt=lt(wt);We(bt,(t=>Y(S,t)),(()=>ce(S)));var kt=lt(bt,2),St=it(kt);St.__click=Z;var Ct=lt(St,2),Mt=t=>{var e=Gn();Ae(lt(it(e),2),17,(()=>ce(E)),Te,((t,e,n)=>{var r=j((()=>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}(ce(e),2)));var i=Un();let o;i.__click=()=>{Y(A,n,!0),Y(N,0)};var l=it(i);ft((t=>{o=Pe(i,0,"",null,o,t),Se(l,ce(r)[1])}),[()=>({selected:ce(A)===n})]),ke(t,i)})),ke(t,e)};Le(Ct,(t=>{ce(E).length>1&&t(Mt)}));var Et=lt(Ct,2),Lt=t=>{var e=Xn(),n=lt(it(e),2),r=t=>{var e,n=Vn();!function(t,e){let n=!0;ct((()=>{e&&Re(t,fe(e),n),n=!1;var r=new MutationObserver((()=>{var e=t.__value;Re(t,e)}));return r.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{r.disconnect()}}))}(n,(()=>ce(N))),n.__change=[zn,pt],Ae(n,21,(()=>V(ce(L)[ce(A)])),Te,((t,e,n)=>{var r=Wn();r.value=r.__value=n;var i=it(r);ft((t=>Se(i,t)),[()=>f(ce(e),ce(_))]),ke(t,r)})),ft((()=>{e!==(e=ce(N))&&(n.value=(n.__value=ce(N))??"",Re(n,ce(N)))})),ke(t,n)},i=t=>{var e=xe();Ae(ot(e),17,(()=>V(ce(L)[ce(A)])),Te,((t,e,n)=>{var r=Yn();let i;r.__click=()=>{pt(n)};var o=it(r);ft(((t,n)=>{qe(r,"title",ce(e)),i=Pe(r,0,"",null,i,t),Se(o,n)}),[()=>({selected:ce(N)===n}),()=>f(ce(e),ce(_))]),ke(t,r)})),ke(t,e)};Le(n,(t=>{var e,n;n=ce(L)[ce(A)],((e=V(n).map((t=>f(t,ce(_)))))?e.reduce(((t,e)=>t+e.length),0):0)>30?t(r):t(i,!1)})),ke(t,e)};Le(Et,(t=>{ce(L)[ce(A)]?.length>1&&t(Lt)}));var Tt=lt(Et,2),At=t=>{var e=Kn();Ae(lt(it(e),2),17,(()=>ce(T)[ce(A)]||[]),Te,((t,e,n)=>{var r=xe(),i=ot(r),o=t=>{var r=Jn();let i;r.__click=()=>{Y($,n,!0)};var o=it(r);ft(((t,e)=>{i=Pe(r,0,"",null,i,t),Se(o,e)}),[()=>({selected:ce($)===n}),()=>"stroke"===ce(e)?"SVG paint":Ze(ce(e))]),ke(t,r)};Le(i,(t=>{("custom"!==ce(e)||"inline"===ce(U)&&"custom"===ce(e)&&ce(I))&&t(o)})),ke(t,r)})),ke(t,e)};Le(Tt,(t=>{(ce(T)[ce(A)]||[]).filter((t=>"custom"!==t||"inline"===ce(U)&&ce(I))).length>1&&t(At)}));var Nt=lt(Tt,2),$t=t=>{var e=fr(),n=it(e);Ae(n,17,(()=>ce(O)),Te,((t,e,n)=>{var r=sr();const o=j((()=>ce(e).props[ce(e).selected]));var l=it(r),a=it(l),s=it(a),u=t=>{var n=Qn(),r=ot(n);Ae(r,21,(()=>ce(e).props),Te,((t,n,r)=>{var o=Zn();let l;o.__click=async()=>{ce(e).selected=r,await ue()},function(t,e,n=!1,r=!1){var i=t,o="";ft((()=>{var t=It;if(o!==(o=e()??"")&&(null!==t.nodes_start&&(mt(t.nodes_start,t.nodes_end),t.nodes_start=t.nodes_end=null),""!==o)){var l=o+"";n?l=`<svg>${l}</svg>`:r&&(l=`<math>${l}</math>`);var a=be(l);if((n||r)&&(a=nt(a)),we(nt(a),a.lastChild),n||r)for(;nt(a);)i.before(nt(a));else i.before(a)}}))}(it(o),(()=>i[ce(n)])),ft(((t,e)=>{l=Pe(o,0,"icon-btn",null,l,t),qe(o,"title",e)}),[()=>({selected:r===ce(e).selected}),()=>"color"===ce(e).type?`${Ze(ce(n))} color`:Qe(ce(n))]),ke(t,o)}));var l=it(lt(r,2));ft((t=>Se(l,t)),[()=>"color"===ce(e).type?`${Ze(ce(o))} color`:Qe(ce(o))]),ke(t,n)},c=t=>{var e=tr(),n=it(e);ft((t=>Se(n,t)),[()=>Qe(ce(o))]),ke(t,e)};Le(s,(t=>{ce(e).props.length>1?t(u):t(c,!1)})),lt(a,2).__click=[er,vt,o];var f=lt(l,2),d=t=>{var e=rr(),n=ot(e);n.__change=[nr,at,o,H];var r=it(lt(n,2));ft((()=>{var t,e,i;qe(n,"min",ce(H)[ce(o)].min),qe(n,"max",ce(H)[ce(o)].max),qe(n,"step",ce(H)[ce(o)].step||1),t=n,e=ce(H)[ce(o)].value,(i=Ue(t)).value!==(i.value=e??void 0)&&(t.value!==e||0===e&&"PROGRESS"===t.nodeName)&&(t.value=e??""),Se(r,ce(H)[ce(o)].displayed)})),ke(t,e)},h=(t,n)=>{var r=t=>{var e=ar();const n=j((()=>ce(H)[ce(o)].choices()));e.__change=[ir,at,o];var r=it(e),i=t=>{ke(t,or())};Le(r,(t=>{ce(n).includes(ce(H)[ce(o)].value)||t(i)})),Ae(lt(r),17,(()=>ce(n)),Te,((t,e)=>{var n=lr(),r=it(n);ft((()=>{var t;t=n,ce(e)==ce(H)[ce(o)].value||null?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected"),Se(r,ce(e))})),ke(t,n)})),ke(t,e)},i=(t,n)=>{var r=t=>{Rn(t,{get value(){return ce(H)[ce(o)].value},onChange:t=>at(ce(o),t)})};Le(t,(t=>{"color"==ce(e).type&&t(r)}),n)};Le(t,(t=>{"select"==ce(e).type?t(r):t(i,!1)}),n)};Le(f,(t=>{"slider"===ce(e).type?t(d):t(h,!1)})),ft((()=>Pe(r,0,`prop-section ${ce(e).type??""}`))),ke(t,r)}));var r=lt(n,2),o=t=>{var e=ur();let n;e.__click=[Fn,R,A,q,a,U],ft((t=>n=Pe(e,0,"btn",null,n,t)),[()=>({active:!0===ce(R)[ce(A)]})]),ke(t,e)};Le(r,(t=>{"inline"===ce(U)&&null!==ce(R)[ce(A)]&&t(o)}));var l=lt(r,2),s=t=>{var e=cr();e.__click=[qn,q,Z],ke(t,e)};Le(l,(t=>{"inline"===ce(U)&&u(ce(q))&&t(s)})),ke(t,e)};return Le(Nt,(t=>{ce(T)[ce(A)]&&t($t)})),We(kt,(t=>Y(k,t)),(()=>ce(k))),ft((()=>{qe(bt,"width",ce(M).width),qe(bt,"height",ce(M).height),qe(_t,"d",ce(C)),He(xt,`clip-path: url(${ce(F)??""}#overlay-clip)`)})),ke(t,gt),D({open:K,close:Z,isOpened:function(){return"block"===ce(k).style.display}})}!function(t){for(var e=0;e<t.length;e++)ge.add(t[e]);for(var n of me)n(t)}(["click","change"]);return class{constructor(t){const{target:e=document.body,...n}=t;return Ce(hr,{target:e,props:n})}}}));
|
|
@@ -6179,7 +6179,7 @@ function InlineStyleEditor$1($$anchor, $$props) {
|
|
|
6179
6179
|
let matching;
|
|
6180
6180
|
|
|
6181
6181
|
if (get(currentRule) === "inline") matching = [get(currentElement)]; else {
|
|
6182
|
-
const selector = get(currentRule).selectorText.replace(/(:hover)|:focus/g, "");
|
|
6182
|
+
const selector = get(currentRule).selectorText.replace(/(:hover)|:focus|\.hovered/g, "");
|
|
6183
6183
|
|
|
6184
6184
|
matching = Array.from(document.querySelectorAll(selector));
|
|
6185
6185
|
}
|
package/package.json
CHANGED
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
let matching;
|
|
404
404
|
if (currentRule === "inline") matching = [currentElement];
|
|
405
405
|
else {
|
|
406
|
-
const selector = currentRule.selectorText.replace(/(:hover)|:focus/g, "");
|
|
406
|
+
const selector = currentRule.selectorText.replace(/(:hover)|:focus|\.hovered/g, "");
|
|
407
407
|
matching = Array.from(document.querySelectorAll(selector));
|
|
408
408
|
}
|
|
409
409
|
const boundingBoxes = matching.map((el) => getBoundingBoxInfos(el, 10));
|