@silexlabs/grapesjs-advanced-selector 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @silexlabs/grapesjs-advanced-selector - 1.5.1 */
1
+ /*! @silexlabs/grapesjs-advanced-selector - 1.5.2 */
2
2
  !function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports["@silexlabs/grapesjs-advanced-selector"]=t():e["@silexlabs/grapesjs-advanced-selector"]=t()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var s in o)e.o(o,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:o[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})}},t={};e.r(t),e.d(t,{complexSelectorFromString:()=>Je,complexSelectorToString:()=>qe,default:()=>go,editStyle:()=>tt,getComponentSelector:()=>it,getSelectors:()=>et,matchSelectorAll:()=>ot,name:()=>So,setComponentSelector:()=>rt});const o=globalThis,s=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),i=new WeakMap;class l{constructor(e,t,o){if(this._$cssResult$=!0,o!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(s&&void 0===e){const o=void 0!==t&&1===t.length;o&&(e=i.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&i.set(t,e))}return e}toString(){return this.cssText}}const n=e=>new l("string"==typeof e?e:e+"",void 0,r),a=(e,...t)=>{const o=1===e.length?e[0]:t.reduce(((t,o,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[s+1]),e[0]);return new l(o,e,r)},c=s?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const o of e.cssRules)t+=o.cssText;return n(t)})(e):e,{is:d,defineProperty:h,getOwnPropertyDescriptor:p,getOwnPropertyNames:u,getOwnPropertySymbols:v,getPrototypeOf:m}=Object,S=globalThis,g=S.trustedTypes,f=g?g.emptyScript:"",y=S.reactiveElementPolyfillSupport,b=(e,t)=>e,C={toAttribute(e,t){switch(t){case Boolean:e=e?f:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=null!==e;break;case Number:o=null===e?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch(e){o=null}}return o}},$=(e,t)=>!d(e,t),_={attribute:!0,type:String,converter:C,reflect:!1,useDefault:!1,hasChanged:$};Symbol.metadata??=Symbol("metadata"),S.litPropertyMetadata??=new WeakMap;class A extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const o=Symbol(),s=this.getPropertyDescriptor(e,o,t);void 0!==s&&h(this.prototype,e,s)}}static getPropertyDescriptor(e,t,o){const{get:s,set:r}=p(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:s,set(t){const i=s?.call(this);r?.call(this,t),this.requestUpdate(e,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const e=m(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const e=this.properties,t=[...u(e),...v(e)];for(const o of t)this.createProperty(o,e[o])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,o]of t)this.elementProperties.set(e,o)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const o=this._$Eu(e,t);void 0!==o&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const e of o)t.unshift(c(e))}else void 0!==e&&t.push(c(e));return t}static _$Eu(e,t){const o=t.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(s)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const s of t){const t=document.createElement("style"),r=o.litNonce;void 0!==r&&t.setAttribute("nonce",r),t.textContent=s.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){const o=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,o);if(void 0!==s&&!0===o.reflect){const r=(void 0!==o.converter?.toAttribute?o.converter:C).toAttribute(t,o.type);this._$Em=e,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){const o=this.constructor,s=o._$Eh.get(e);if(void 0!==s&&this._$Em!==s){const e=o.getPropertyOptions(s),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:C;this._$Em=s;const i=r.fromAttribute(t,e.type);this[s]=i??this._$Ej?.get(s)??i,this._$Em=null}}requestUpdate(e,t,o,s=!1,r){if(void 0!==e){const i=this.constructor;if(!1===s&&(r=this[e]),o??=i.getPropertyOptions(e),!((o.hasChanged??$)(r,t)||o.useDefault&&o.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,o))))return;this.C(e,t,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:s,wrapped:r},i){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),!0!==r||void 0!==i)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),!0===s&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,o]of e){const{wrapped:e}=o,s=this[t];!0!==e||this._$AL.has(t)||void 0===s||this.C(t,void 0,o,s)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}}A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[b("elementProperties")]=new Map,A[b("finalized")]=new Map,y?.({ReactiveElement:A}),(S.reactiveElementVersions??=[]).push("2.1.2");const E=globalThis,w=E.trustedTypes,W=w?w.createPolicy("lit-html",{createHTML:e=>e}):void 0,U="$lit$",z=`lit$${Math.random().toFixed(9).slice(2)}$`,T="?"+z,R=`<${T}>`,P=document,k=()=>P.createComment(""),L=e=>null===e||"object"!=typeof e&&"function"!=typeof e,x=Array.isArray,I=e=>x(e)||"function"==typeof e?.[Symbol.iterator],N="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,D=/>/g,M=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,F=/"/g,B=/^(?:script|style|textarea|title)$/i,V=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),G=V(1),q=V(2),Y=(V(3),Symbol.for("lit-noChange")),Z=Symbol.for("lit-nothing"),J=new WeakMap,K=P.createTreeWalker(P,129);function Q(e,t){if(!x(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==W?W.createHTML(t):t}const X=(e,t)=>{const o=e.length-1,s=[];let r,i=2===t?"<svg>":3===t?"<math>":"",l=O;for(let t=0;t<o;t++){const o=e[t];let n,a,c=-1,d=0;for(;d<o.length&&(l.lastIndex=d,a=l.exec(o),null!==a);)d=l.lastIndex,l===O?"!--"===a[1]?l=j:void 0!==a[1]?l=D:void 0!==a[2]?(B.test(a[2])&&(r=RegExp("</"+a[2],"g")),l=M):void 0!==a[3]&&(l=M):l===M?">"===a[0]?(l=r??O,c=-1):void 0===a[1]?c=-2:(c=l.lastIndex-a[2].length,n=a[1],l=void 0===a[3]?M:'"'===a[3]?F:H):l===F||l===H?l=M:l===j||l===D?l=O:(l=M,r=void 0);const h=l===M&&e[t+1].startsWith("/>")?" ":"";i+=l===O?o+R:c>=0?(s.push(n),o.slice(0,c)+U+o.slice(c)+z+h):o+z+(-2===c?t:h)}return[Q(e,i+(e[o]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),s]};class ee{constructor({strings:e,_$litType$:t},o){let s;this.parts=[];let r=0,i=0;const l=e.length-1,n=this.parts,[a,c]=X(e,t);if(this.el=ee.createElement(a,o),K.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=K.nextNode())&&n.length<l;){if(1===s.nodeType){if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(U)){const t=c[i++],o=s.getAttribute(e).split(z),l=/([.?@])?(.*)/.exec(t);n.push({type:1,index:r,name:l[2],strings:o,ctor:"."===l[1]?ie:"?"===l[1]?le:"@"===l[1]?ne:re}),s.removeAttribute(e)}else e.startsWith(z)&&(n.push({type:6,index:r}),s.removeAttribute(e));if(B.test(s.tagName)){const e=s.textContent.split(z),t=e.length-1;if(t>0){s.textContent=w?w.emptyScript:"";for(let o=0;o<t;o++)s.append(e[o],k()),K.nextNode(),n.push({type:2,index:++r});s.append(e[t],k())}}}else if(8===s.nodeType)if(s.data===T)n.push({type:2,index:r});else{let e=-1;for(;-1!==(e=s.data.indexOf(z,e+1));)n.push({type:7,index:r}),e+=z.length-1}r++}}static createElement(e,t){const o=P.createElement("template");return o.innerHTML=e,o}}function te(e,t,o=e,s){if(t===Y)return t;let r=void 0!==s?o._$Co?.[s]:o._$Cl;const i=L(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),void 0===i?r=void 0:(r=new i(e),r._$AT(e,o,s)),void 0!==s?(o._$Co??=[])[s]=r:o._$Cl=r),void 0!==r&&(t=te(e,r._$AS(e,t.values),r,s)),t}class oe{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:o}=this._$AD,s=(e?.creationScope??P).importNode(t,!0);K.currentNode=s;let r=K.nextNode(),i=0,l=0,n=o[0];for(;void 0!==n;){if(i===n.index){let t;2===n.type?t=new se(r,r.nextSibling,this,e):1===n.type?t=new n.ctor(r,n.name,n.strings,this,e):6===n.type&&(t=new ae(r,this,e)),this._$AV.push(t),n=o[++l]}i!==n?.index&&(r=K.nextNode(),i++)}return K.currentNode=P,s}p(e){let t=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}}class se{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,s){this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=te(this,e,t),L(e)?e===Z||null==e||""===e?(this._$AH!==Z&&this._$AR(),this._$AH=Z):e!==this._$AH&&e!==Y&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):I(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Z&&L(this._$AH)?this._$AA.nextSibling.data=e:this.T(P.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:o}=e,s="number"==typeof o?this._$AC(e):(void 0===o.el&&(o.el=ee.createElement(Q(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===s)this._$AH.p(t);else{const e=new oe(s,this),o=e.u(this.options);e.p(t),this.T(o),this._$AH=e}}_$AC(e){let t=J.get(e.strings);return void 0===t&&J.set(e.strings,t=new ee(e)),t}k(e){x(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let o,s=0;for(const r of e)s===t.length?t.push(o=new se(this.O(k()),this.O(k()),this,this.options)):o=t[s],o._$AI(r),s++;s<t.length&&(this._$AR(o&&o._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,s,r){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Z}_$AI(e,t=this,o,s){const r=this.strings;let i=!1;if(void 0===r)e=te(this,e,t,0),i=!L(e)||e!==this._$AH&&e!==Y,i&&(this._$AH=e);else{const s=e;let l,n;for(e=r[0],l=0;l<r.length-1;l++)n=te(this,s[o+l],t,l),n===Y&&(n=this._$AH[l]),i||=!L(n)||n!==this._$AH[l],n===Z?e=Z:e!==Z&&(e+=(n??"")+r[l+1]),this._$AH[l]=n}i&&!s&&this.j(e)}j(e){e===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ie extends re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Z?void 0:e}}class le extends re{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Z)}}class ne extends re{constructor(e,t,o,s,r){super(e,t,o,s,r),this.type=5}_$AI(e,t=this){if((e=te(this,e,t,0)??Z)===Y)return;const o=this._$AH,s=e===Z&&o!==Z||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,r=e!==Z&&(o===Z||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ae{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){te(this,e)}}const ce={M:U,P:z,A:T,C:1,L:X,R:oe,D:I,V:te,I:se,H:re,N:le,U:ne,B:ie,F:ae},de=E.litHtmlPolyfillSupport;de?.(ee,se),(E.litHtmlVersions??=[]).push("3.3.0");const he=(e,t,o)=>{const s=o?.renderBefore??t;let r=s._$litPart$;if(void 0===r){const e=o?.renderBefore??null;s._$litPart$=r=new se(t.insertBefore(k(),e),e,void 0,o??{})}return r._$AI(e),r},pe=globalThis;class ue extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=he(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Y}}ue._$litElement$=!0,ue["finalized"]=!0,pe.litElementHydrateSupport?.({LitElement:ue});const ve=pe.litElementPolyfillSupport;ve?.({LitElement:ue});var me;(pe.litElementVersions??=[]).push("4.2.2"),function(e){e["HOVER"]="hover",e["ACTIVE"]="active",e["FOCUS"]="focus",e["FOCUS_WITHIN"]="focus-within",e["FOCUS_VISIBLE"]="focus-visible",e["VISITED"]="visited",e["LINK"]="link",e["ANY_LINK"]="any-link",e["FIRST_CHILD"]="first-child",e["LAST_CHILD"]="last-child",e["NTH_CHILD"]="nth-child",e["NTH_LAST_CHILD"]="nth-last-child",e["ONLY_CHILD"]="only-child",e["FIRST_OF_TYPE"]="first-of-type",e["LAST_OF_TYPE"]="last-of-type",e["NTH_OF_TYPE"]="nth-of-type",e["NTH_LAST_OF_TYPE"]="nth-last-of-type",e["ONLY_OF_TYPE"]="only-of-type",e["EMPTY"]="empty",e["ROOT"]="root",e["SCOPE"]="scope",e["TARGET"]="target",e["BEFORE"]="before",e["AFTER"]="after",e["FIRST_LINE"]="first-line",e["FIRST_LETTER"]="first-letter",e["ENABLED"]="enabled",e["DISABLED"]="disabled",e["CHECKED"]="checked",e["INDETERMINATE"]="indeterminate",e["DEFAULT"]="default",e["VALID"]="valid",e["INVALID"]="invalid",e["IN_RANGE"]="in-range",e["OUT_OF_RANGE"]="out-of-range",e["REQUIRED"]="required",e["OPTIONAL"]="optional",e["READ_ONLY"]="read-only",e["READ_WRITE"]="read-write",e["LANG"]="lang",e["DIR"]="dir"}(me||(me={}));const Se=[{type:me.HOVER,hasParam:!1,sentencePre:'On mouse',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:hover'},{type:me.ACTIVE,hasParam:!1,sentencePre:'When',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:active'},{type:me.FOCUS,hasParam:!1,sentencePre:'When it has the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:focus'},{type:me.FOCUS_WITHIN,hasParam:!1,sentencePre:'When the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-within'},{type:me.FOCUS_VISIBLE,hasParam:!1,sentencePre:'When the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible'},{type:me.VISITED,hasParam:!1,sentencePre:'When',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:visited'},{type:me.LINK,hasParam:!1,sentencePre:'When it is a',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:link'},{type:me.ANY_LINK,hasParam:!1,sentencePre:'When it is a',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:any-link'},{type:me.FIRST_CHILD,hasParam:!1,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:first-child'},{type:me.LAST_CHILD,hasParam:!1,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:last-child'},{type:me.NTH_CHILD,hasParam:!0,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child'},{type:me.NTH_LAST_CHILD,hasParam:!0,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-last-child'},{type:me.ONLY_CHILD,hasParam:!1,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:only-child'},{type:me.FIRST_OF_TYPE,hasParam:!1,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:first-of-type'},{type:me.LAST_OF_TYPE,hasParam:!1,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:last-of-type'},{type:me.NTH_OF_TYPE,hasParam:!0,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type'},{type:me.NTH_LAST_OF_TYPE,hasParam:!0,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-last-of-type'},{type:me.ONLY_OF_TYPE,hasParam:!1,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:only-of-type'},{type:me.EMPTY,hasParam:!1,sentencePre:'When it is',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:empty'},{type:me.ROOT,hasParam:!1,sentencePre:'When it is the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:root'},{type:me.SCOPE,hasParam:!1,sentencePre:'When it is within',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:scope'},{type:me.TARGET,hasParam:!1,sentencePre:'When URL matches',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:target'},{type:me.BEFORE,hasParam:!1,sentencePre:'Style the',sentencePost:'pseudo-element',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/::before'},{type:me.AFTER,hasParam:!1,sentencePre:'Style the',sentencePost:'pseudo-element',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/::after'},{type:me.FIRST_LINE,hasParam:!1,sentencePre:'Style the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/::first-line'},{type:me.FIRST_LETTER,hasParam:!1,sentencePre:'Style the',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/::first-letter'},{type:me.ENABLED,hasParam:!1,sentencePre:'When it is',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:enabled'},{type:me.DISABLED,hasParam:!1,sentencePre:'When it is',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:disabled'},{type:me.CHECKED,hasParam:!1,sentencePre:'When it is',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:checked'},{type:me.INDETERMINATE,hasParam:!1,sentencePre:'When it is',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate'},{type:me.REQUIRED,hasParam:!1,sentencePre:'When it is',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:required'},{type:me.OPTIONAL,hasParam:!1,sentencePre:'When it is',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:optional'},{type:me.LANG,hasParam:!0,sentencePre:'When it matches',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:lang'},{type:me.DIR,hasParam:!0,sentencePre:'When the text direction is',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:dir'}];function ge(e){var t;return e.hasParam?`:${e.type}(${null!==(t=e.param)&&void 0!==t?t:''})`:`:${e.type}`}var fe,ye;!function(e){e["TAG"]="tag",e["CUSTOM_TAG"]="custom-tag",e["CLASS"]="class",e["ID"]="id",e["ATTRIBUTE"]="attribute",e["UNIVERSAL"]="universal",e["UNKNOWN"]="unknown"}(fe||(fe={})),function(e){e["EQUALS"]="=",e["INCLUDES"]="~=",e["DASH_MATCH"]="|=",e["PREFIX_MATCH"]="^=",e["SUFFIX_MATCH"]="$=",e["SUBSTRING_MATCH"]="*="}(ye||(ye={}));const be=['id','class','style','name','type','value','placeholder','href','src','alt','title','width','height','disabled','checked','selected','hidden','readonly','multiple','required','min','max','step','pattern','autocomplete','autofocus','spellcheck','contenteditable','dir','lang','tabindex','accesskey','role'],Ce=['a','abbr','address','area','article','aside','audio','b','base','bdi','bdo','blockquote','body','br','button','canvas','caption','cite','code','col','colgroup','data','datalist','dd','del','details','dfn','dialog','div','dl','dt','em','embed','fieldset','figcaption','figure','footer','form','h1','h2','h3','h4','h5','h6','head','header','hgroup','hr','html','i','iframe','img','input','ins','kbd','label','legend','li','link','main','map','mark','meta','meter','nav','noscript','object','ol','optgroup','option','output','p','param','picture','pre','progress','q','rb','rp','rt','rtc','ruby','s','samp','script','section','select','slot','small','source','span','strong','style','sub','summary','sup','table','tbody','td','template','textarea','tfoot','th','thead','time','title','tr','track','u','ul','var','video','wbr'],$e=[' '],_e={[fe.TAG]:{color:'var(--gjs-color-blue, #3b97e3)'},[fe.CUSTOM_TAG]:{color:'var(--gjs-color-blue, #3b97e3)'},[fe.CLASS]:{color:'var(--gjs-color-green, #62c462)'},[fe.ID]:{color:'var(--gjs-color-yellow, #ffca6f)'},[fe.ATTRIBUTE]:{color:'var(--gjs-color-yellow, #ffca6f)'},[fe.UNIVERSAL]:{color:'var(--gjs-color-red, #dd3636)'},[fe.UNKNOWN]:{color:'var(--gjs-color-red, #dd3636)'}},Ae='•',Ee='#',we='[ ]',We='',Ue='⚛',ze='⚛',Te='?';function Re(e,t,o=!0){if(e.type!==t.type)return!1;if(!o&&e.active!==t.active)return!1;switch(e.type){case fe.TAG:case fe.CUSTOM_TAG:case fe.CLASS:case fe.ID:{const o=t;return e.value===o.value}case fe.ATTRIBUTE:{const o=e,s=t;return o.operator===s.operator&&((!o.operator||o.attributeValue===s.attributeValue)&&o.value===s.value)}case fe.UNIVERSAL:return!0;default:return!1}}function Pe(e){var t;switch(e.type){case fe.ATTRIBUTE:{const o=e;return`[${o.value||''}${o.operator?`${o.operator}"${null!==(t=o.attributeValue)&&void 0!==t?t:''}"`:''}]`}case fe.CLASS:return`.${e.value||''}`;case fe.ID:return`#${e.value||''}`;case fe.TAG:case fe.CUSTOM_TAG:return e.value||'';case fe.UNIVERSAL:return'*';default:return''}}function ke(e){if(e.type===fe.ATTRIBUTE){return`[${e.value||''}]`}return Pe(e)}function Le(e){if(''===e)return e;if('*'===e)return e;const t=$e.map((e=>`\\${e}`)).join('|'),o=e.toLowerCase().replace(new RegExp(t,'g'),'-'),s=e.replace(new RegExp(t,'g'),'-');if(o.match(/^[0-9-]/))return!1;if(o.startsWith('-'))return!1;if(o.match(/^\[[a-z-]*\]?$/)&&be.includes(o.replace('[','').replace(']','')))return o.replace(']','')+']';const r=e.match(/^\[([\w-]+)\s*=\s*"([^"]*)"?\]?$/);if(r){const[,e,t]=r;if(be.includes(e))return`[${e}="${t}"]`}return o.match(/^\[data-[_a-zA-Z]+[_a-zA-Z0-9]*\]?$/)?o.replace(']','')+']':o.match(/^[a-z-]*[a-z]$/)&&o.includes('-')&&window.customElements.get(o)||o.match(/^[a-z]*$/)&&Ce.includes(o)?o:s.match(/^\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/)||s.match(/^#-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/)?s:!!s.match(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*[_a-zA-Z0-9]$/)&&'.'+s}function xe(e,t=!1){if(!t&&!e.active)return 0;switch(e.type){case fe.TAG:return 1;case fe.CLASS:case fe.ATTRIBUTE:case fe.CUSTOM_TAG:return 10;case fe.ID:return 100;case fe.UNIVERSAL:return 0;default:return console.warn(`Unknown selector type: ${e.type}`),0}}function Ie(e){switch(e.type){case fe.TAG:case fe.CUSTOM_TAG:return 1;case fe.ID:return 2;case fe.CLASS:return 3;case fe.ATTRIBUTE:return 4;case fe.UNIVERSAL:return 5;default:return 6}}function Ne(e,t=!1){var o;if(e.selectors.length>1&&(null===(o=e.selectors.find((e=>'universal'===e.type)))||void 0===o?void 0:o.active))return console.warn('The universal selector can only be used alone'),`*${e.pseudoClass?ge(e.pseudoClass):''}`;const s=e.selectors.filter((e=>e.active)).sort(((e,t)=>Ie(e)-Ie(t))).map(Pe).join('');if(!s)return'';return`${s}${!t&&e.pseudoClass?ge(e.pseudoClass):''}`}function Oe(e){return e.selectors.filter((e=>e.active)).reduce(((e,t)=>e+xe(t)),0)+(e.pseudoClass?10:0)}function je(e){const t=e.match(/(#[-\w]+)|(\.[-\w]+)|(\*)|([a-zA-Z][-a-zA-Z0-9]*)|(\[([a-zA-Z][-a-zA-Z0-9]*)\s*([~|^$*]?=)?\s*"?([^"\]]*)"?\])|(:[-\w]+(\([^)]*\))?)/g);if(!t)throw new Error(`Invalid selector: ${e}`);const o=[];let s;return t.forEach((e=>{if(e.startsWith('#'))o.push({type:fe.ID,value:e.slice(1),active:!0});else if(e.startsWith('.'))o.push({type:fe.CLASS,value:e.slice(1),active:!0});else if(e.startsWith('[')){const t=e.match(/^\[([a-zA-Z][-a-zA-Z0-9]*)\s*([~|^$*]?=)?\s*"?([^"\]]*)"?\]$/);if(t){const e={type:fe.ATTRIBUTE,value:t[1],attributeValue:t[3]||'',active:!0};t[2]&&(e.operator=t[2]),o.push(e)}}else if('*'===e)o.push({type:fe.UNIVERSAL,active:!0});else if(e.match(/^[a-zA-Z][-a-zA-Z0-9]*$/))o.push({type:fe.TAG,value:e,active:!0});else if(e.startsWith(':')){const t=e.match(/:([-\w]+)(\([^)]*\))?/);if(t){if(s={...Se.find((e=>e.type===t[1]))},!s)throw new Error(`Pseudo-class not found: ${t[1]}`);s.hasParam&&t[2]&&(s={...s,param:t[2].slice(1,-1)})}}})),s?{selectors:o,pseudoClass:s}:{selectors:o}}function De(e,t){const o=[...e.selectors];return t.selectors.forEach((e=>{o.some((t=>t.type===e.type&&t.value===e.value))||o.push(e)})),{selectors:o,pseudoClass:e.pseudoClass||t.pseudoClass||null}}function Me(e,t){return e.map((e=>{const o=t.find((t=>t.type===e.type&&t.value===e.value));return{...e,active:!!o&&o.active}}))}var He;!function(e){e["HAS"]="has",e["NOT"]="not",e["IS"]="is",e["WHERE"]="where",e["CHILD"]=">",e["DESCENDANT"]=" ",e["ADJACENT"]="+",e["GENERAL_SIBLING"]="~"}(He||(He={}));const Fe=[{type:He.DESCENDANT,hasParam:!1,sentencePre:'When it is',displayName:'inside of',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_combinator',isCombinator:!0,stringRepresentation:' '},{type:He.CHILD,hasParam:!1,sentencePre:'When it is a',displayName:'direct child of',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/Child_combinator',isCombinator:!0,stringRepresentation:' > '},{type:He.ADJACENT,hasParam:!1,sentencePre:'When it is',displayName:'adjacent to',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_combinator',isCombinator:!0,stringRepresentation:' + '},{type:He.GENERAL_SIBLING,hasParam:!1,sentencePre:'When it is',displayName:'after',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/General_sibling_combinator',isCombinator:!0,stringRepresentation:' ~ '},{type:He.HAS,hasParam:!1,sentencePre:'When it',displayName:'contains',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:has',isCombinator:!1,stringRepresentation:':has'},{type:He.NOT,hasParam:!1,sentencePre:'When it',displayName:'does not match',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:not',isCombinator:!1,stringRepresentation:':not'},{type:He.IS,hasParam:!1,sentencePre:'When it',displayName:'matches',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:is',isCombinator:!1,stringRepresentation:':is'},{type:He.WHERE,hasParam:!1,sentencePre:'When it',displayName:'matches (no spec)',helpLink:'https://developer.mozilla.org/en-US/docs/Web/CSS/:where',isCombinator:!1,stringRepresentation:':where'}];function Be(e,t){const o=t?Ne(t):'';if(!o)return'';switch(e.type){case He.HAS:case He.NOT:case He.IS:case He.WHERE:return`${e.stringRepresentation}(${o})`;case He.CHILD:case He.ADJACENT:case He.GENERAL_SIBLING:case He.DESCENDANT:return`${e.stringRepresentation}${o}`;default:throw new Error(`Unknown operator type: ${e.type}`)}}function Ve(e){const t=Fe.find((t=>e===t.stringRepresentation));if(!t)throw new Error(`Operator not found: ${e}`);return{...t}}const Ge={mainSelector:{selectors:[]}};function qe(e,t=!1){var o;return(e.operator?Be(e.operator,e.relatedSelector):'')?!0===(null===(o=e.operator)||void 0===o?void 0:o.isCombinator)?`${e.relatedSelector?Ne(e.relatedSelector,t):''}${Be(e.operator,e.mainSelector)}`:`${Ne(e.mainSelector,t)}${Be(e.operator,e.relatedSelector)}`:Ne(e.mainSelector,t)}function Ye(e){return{...e,mainSelector:{...e.mainSelector,pseudoClass:void 0},relatedSelector:e.relatedSelector?{...e.relatedSelector,pseudoClass:void 0}:void 0}}function Ze(e){let t=0;return e.mainSelector&&(t+=Oe(e.mainSelector)),e.relatedSelector&&(t+=Oe(e.relatedSelector)),t}function Je(e,t){const o=t?{atRule:t}:{},s=e.match(/:(\w+)\((.+)\)$/);if(s){const[,t,r]=s,i=e.replace(s[0],'');return{mainSelector:i?je(i):{selectors:[]},operator:Ve(`:${t}`),relatedSelector:je(r),...o}}const r=e.replace(/ ([>+~]) /,'$1').split(/([>+~ ])/),i=r.shift(),l=r.shift(),n=l&&' '!==l?` ${l} `:l;if(n&&i){const e=r.join('');return{mainSelector:e?je(e):{selectors:[]},operator:Ve(n),relatedSelector:je(i),...o}}return{mainSelector:i?je(i):{selectors:[]},...o}}function Ke(e,t){return{mainSelector:De(e.mainSelector,t.mainSelector),relatedSelector:e.relatedSelector&&t.relatedSelector?De(e.relatedSelector,t.relatedSelector):e.relatedSelector||t.relatedSelector,operator:e.operator||t.operator,atRule:e.atRule||t.atRule}}const Qe=new Set;function Xe(e,t){var o;if(!t)return'';const s=null===(o=null==e?void 0:e.I18n)||void 0===o?void 0:o.t(t);return s||(Qe.add(t),console.info(`Untranslated key "${t}", call editor.runCommand("i18n:info") to see all untranslated keys`)),s||t}function et(e){return e.getSelectedAll().flatMap((t=>e.CssComposer.getRules().reduce(((e,o)=>{var s;const r=o.clone();if(0===Object.keys(r.getStyle()).length)return e;const i=r.getSelectorsString();if(!i)return console.warn('Empty selector for rule',r.get('state'),{rule:r}),e;try{const o=Je(i,r.getAtRule()),l=qe(Ye(o));((null===(s=t.view)||void 0===s?void 0:s.el.matches(l))||'body'===t.tagName.toLowerCase()&&(l.toLowerCase().startsWith('body')||l.toLowerCase().startsWith('html')))&&e.push(o)}catch(e){console.warn('Error matching selector',i,e)}return e}),[])))}function tt(e,t){var o;const s=null===(o=e.DeviceManager.getSelected())||void 0===o?void 0:o.get('widthMedia'),r={atRuleType:s?'media':'',atRuleParams:s?`(max-width: ${s})`:''},i=e.CssComposer.getRule(t,r),l=e.CssComposer.setRule(t,null==i?void 0:i.getStyle(),{addStyles:!!(null==i?void 0:i.getStyle()),...r});e.StyleManager.select(l)}function ot(e,t){try{return t.some((t=>{var o,s;return!('body'!==(null===(o=t.tagName)||void 0===o?void 0:o.toLowerCase())||!e.toLowerCase().startsWith('body')&&!e.toLowerCase().startsWith('html'))||(null===(s=t.view)||void 0===s?void 0:s.el.matches(e))}))}catch{return!1}}function st(e,t,o){if(t.type===o.type)if(Re(t,o))console.warn('No change',t,o);else switch(t.type){case fe.ID:throw new Error('Cannot rename ID selector');case fe.CLASS:!function(e,t,o){if(!t||!o||t===o)return void console.warn('Invalid class names or same names provided.');const s=e.SelectorManager,r=s.get(t);if(!r)return void console.warn(`Class "${t}" not found.`);const i=(e,t)=>{var o;const s=[],r=e.get('selector');if(null===(o=null==r?void 0:r.mainSelector)||void 0===o?void 0:o.selectors){r.mainSelector.selectors.some((e=>e.type===fe.CLASS&&e.value===t))&&s.push(e)}return e.components().forEach((e=>{s.push(...i(e,t))})),s},l=e.Pages.getAll().flatMap((e=>i(e.getMainComponent(),t)));r.set('name',o),l.forEach((e=>{const s=it(e);rt(e,{...s,mainSelector:{...s.mainSelector,selectors:s.mainSelector.selectors.filter((e=>e.type!==fe.CLASS||e.value!==o)).map((e=>e.type===fe.CLASS&&e.value===t?{...e,value:o}:e))}})}))}(e,t.value,o.value);break;case fe.TAG:throw new Error('Cannot rename ID selector');default:console.error('Cannot rename selector: Unknown Type',{oldSelector:t,newSelector:o})}else console.warn('Cannot rename to a different types',t,o)}function rt(e,t){e.set('selector',{...t});const o=[];t.mainSelector.selectors.forEach((t=>{switch(t.type){case'id':e.setId(t.value);break;case'class':o.push(t.value);break;case'tag':break;default:console.warn('Unhandled selector type',t)}}));const s=[...e.getClasses().filter((e=>!o.includes(e))),...o];e.setClass(s)}function it(e){var t;const o=e.getClasses();return{...null!==(t=e.get('selector'))&&void 0!==t?t:{mainSelector:{selectors:o.map((e=>({type:fe.CLASS,value:e,active:!1})))}}}}function lt(e,t,o){var s;if(!o.operator)return[];const r=[];switch(null===(s=o.operator)||void 0===s?void 0:s.type){case He.HAS:t.forEach((e=>{r.push(...nt(dt(e),o.relatedSelector||{selectors:[]}))}));break;case He.NOT:r.push(...Ce.map((e=>({type:fe.TAG,value:e,active:!0})))),t.forEach((t=>{const s=t.getClasses();e.CssComposer.getAll().forEach((e=>{e.getSelectors().forEach((e=>{if(!e.get('private'))if(1!==e.get('type')||s.includes(e.get('name'))){if(2===e.get('type')){const t={type:fe.ID,value:e.get('name'),active:!0};ct(t,o.relatedSelector,r)&&r.push(t)}}else{const t={type:fe.CLASS,value:e.get('name'),active:!0};ct(t,o.relatedSelector,r)&&r.push(t)}}))}))}));break;case He.IS:case He.WHERE:r.push(...nt(t,o.relatedSelector||{selectors:[]}));break;case He.CHILD:t.forEach((e=>{const t=e.parent();t&&r.push(...nt([t],o.relatedSelector||{selectors:[]}))}));break;case He.DESCENDANT:t.forEach((e=>{r.push(...nt(function(e){const t=[];let o=e.parent();for(;o;)t.push(o),o=o.parent();return t}(e),o.relatedSelector||{selectors:[]}))}));break;case He.ADJACENT:const s=t.map((e=>ht(e)[0])).filter((e=>!!e));r.push(...nt(s,o.relatedSelector||{selectors:[]}));break;case He.GENERAL_SIBLING:const i=t.flatMap(ht).filter((e=>!!e));r.push(...nt(i,o.relatedSelector||{selectors:[]}));break;default:throw console.error('Unhandled operator',o.operator),new Error(`Unhandled operator: ${o.operator}`)}return r}function nt(e,t){const o=[];return e.forEach((e=>{at(e,o,t)})),e.flatMap((e=>e.getClasses())).forEach((e=>{o.some((t=>t.type===fe.CLASS&&t.value===e))||t.selectors.some((t=>t.active&&t.type===fe.CLASS&&t.value===e))||o.push({type:fe.CLASS,value:e,active:!0})})),e.forEach((e=>{if('function'==typeof e.getAttributes){const s=e.getAttributes({noStyle:!0,noClass:!0});Object.keys(s).forEach((e=>{if('id'===e)return;if(o.some((t=>t.type===fe.ATTRIBUTE&&t.value===e)))return;if(t.selectors.some((t=>t.active&&t.type===fe.ATTRIBUTE&&t.value===e)))return;const r={type:fe.ATTRIBUTE,value:e,active:!0};s[e]&&(r.operator=ye.EQUALS,r.attributeValue=s[e]),o.push(r)}))}})),o}function at(e,t,o){const s=e.tagName.toLowerCase(),r={type:fe.TAG,value:s,active:!0};if(ct(r,o,t)&&t.push(r),'body'===s){const e={type:fe.TAG,value:'html',active:!0};ct(e,o,t)&&t.push(e)}}function ct(e,t,o){return!t.selectors.some((t=>Re(t,e)))&&!o.some((t=>Re(t,e)))}function dt(e){return e.components().reduce(((e,t)=>[...e,t,...dt(t)]),[])}function ht(e){var t,o;return null!==(o=null===(t=e.parent())||void 0===t?void 0:t.components().filter((t=>t!==e)))&&void 0!==o?o:[]}const pt='silex-page-body';function ut(e){try{for(const t of Array.from(e.cssRules)){const e=t;'selectorText'in t&&e.selectorText?e.selectorText.includes(pt)||(e.selectorText=e.selectorText.replace(/(^|[,\s>+~])body(?![a-zA-Z0-9_-])/g,`$1.${pt}`)):'cssRules'in t&&ut(t)}}catch{}}const vt={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:$},mt=(e=vt,t,o)=>{const{kind:s,metadata:r}=o;let i=globalThis.litPropertyMetadata.get(r);if(void 0===i&&globalThis.litPropertyMetadata.set(r,i=new Map),"setter"===s&&((e=Object.create(e)).wrapped=!0),i.set(o.name,e),"accessor"===s){const{name:s}=o;return{set(o){const r=t.get.call(this);t.set.call(this,o),this.requestUpdate(s,r,e,!0,o)},init(t){return void 0!==t&&this.C(s,void 0,e,t),t}}}if("setter"===s){const{name:s}=o;return function(o){const r=this[s];t.call(this,o),this.requestUpdate(s,r,e,!0,o)}}throw Error("Unsupported decorator location: "+s)};function St(e){return(t,o)=>"object"==typeof o?mt(e,t,o):((e,t,o)=>{const s=t.hasOwnProperty(o);return t.constructor.createProperty(o,e),s?Object.getOwnPropertyDescriptor(t,o):void 0})(e,t,o)}var gt=void 0&&(void 0).__decorate||function(e,t,o,s){var r,i=arguments.length,l=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,s);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(l=(i<3?r(l):i>3?r(t,o,l):r(t,o))||l);return i>3&&l&&Object.defineProperty(t,o,l),l};class ft extends ue{constructor(){super(...arguments),this.t=e=>e}connectedCallback(){super.connectedCallback();document.querySelectorAll('style, link[rel="stylesheet"]').forEach((e=>{var t;null===(t=this.shadowRoot)||void 0===t||t.appendChild(e.cloneNode(!0))}))}}gt([St()],ft.prototype,"t",void 0);const yt=5;class bt extends HTMLInputElement{constructor(){super(),this.addEventListener('input',(()=>this.adjustWidth())),this.adjustWidth(),requestAnimationFrame((()=>this.adjustWidth()))}adjustWidth(){var e;this.style.width=`${Math.max(null===(e=this.value)||void 0===e?void 0:e.length,yt)}ch`}}function Ct(e){return a`
3
3
  ${n(e)} {
4
4
  border: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexlabs/grapesjs-advanced-selector",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "A GrapesJS plugin for managing advanced CSS selectors with a visual interface",
5
5
  "keywords": [
6
6
  "silex",
@@ -69,7 +69,7 @@
69
69
  "typescript-eslint": "^8.31.0"
70
70
  },
71
71
  "dependencies": {
72
- "@silexlabs/expression-input": "0.4.4",
72
+ "@silexlabs/expression-input": "0.4.5",
73
73
  "specificity": "^1.0.0"
74
74
  }
75
75
  }