/*! For license information please see editor.js.LICENSE.txt */ !function(){var e={626:function(e,t){"use strict";t.T=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e}},924:function(e,t,r){"use strict";var n=r(210),o=r(559),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},559:function(e,t,r){"use strict";var n=r(612),o=r(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),s=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var t=c(n,a,arguments);if(u&&s){var r=u(t,"length");r.configurable&&s(t,"length",{value:1+l(0,e.length-(arguments.length-1))})}return t};var p=function(){return c(n,i,arguments)};s?s(e.exports,"apply",{value:p}):e.exports.apply=p},29:function(e,t,r){"use strict";var n=r(320),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,r){for(var n=0,o=e.length;n=3&&(i=r),"[object Array]"===o.call(e)?a(e,t,i):"string"==typeof e?c(e,t,i):u(e,t,i)}},648:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||n.call(i)!==o)throw new TypeError(t+i);for(var a,c=r.call(arguments,1),u=function(){if(this instanceof a){var t=i.apply(this,c.concat(r.call(arguments)));return Object(t)===t?t:this}return i.apply(e,c.concat(r.call(arguments)))},s=Math.max(0,i.length-c.length),l=[],p=0;p1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var r=P(e),n=r.length>0?r[0]:"",i=x("%"+n+"%",t),c=i.name,s=i.value,l=!1,p=i.alias;p&&(n=p[0],w(r,_([0,1],p)));for(var y=1,f=!0;y=r.length){var h=u(s,d);s=(f=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:s[d]}else f=v(s,d),s=s[d];f&&!l&&(b[c]=s)}}return s}},405:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},419:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},410:function(e,t,r){"use strict";var n=r(419);e.exports=function(){return n()&&!!Symbol.toStringTag}},642:function(e,t,r){"use strict";var n=r(612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},717:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},584:function(e,t,r){"use strict";var n=r(410)(),o=r(924)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},c=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=c?i:a},320:function(e){"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,s="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{};e.exports=o?function(e){if(e===s)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)}:function(e){if(e===s)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(u)return function(e){try{return!a(e)&&(n.call(e),!0)}catch(e){return!1}}(e);if(a(e))return!1;var t=c.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},662:function(e,t,r){"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,c=r(410)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!c)return"[object GeneratorFunction]"===o.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!c)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},692:function(e,t,r){"use strict";var n=r(29),o=r(83),i=r(924),a=i("Object.prototype.toString"),c=r(410)(),u="undefined"==typeof globalThis?r.g:globalThis,s=o(),l=i("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1}return!!f&&function(e){var t=!1;return n(y,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},155:function(e){var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var c,u=[],s=!1,l=-1;function p(){s&&c&&(s=!1,c.length?u=c.concat(u):l=-1,u.length&&y())}function y(){if(!s){var e=a(p);s=!0;for(var t=u.length;t;){for(c=u,u=[];++l1)for(var r=1;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),c=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),y(n,e,n.depth)}function l(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function p(e,t){return e}function y(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return v(o)||(o=y(e,o,n)),o}var i=function(e,t){if(_(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return h(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var a=Object.keys(r),c=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),O(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(k(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(O(r))return f(r)}var s,l="",p=!1,T=["{","}"];return b(r)&&(p=!0,T=["[","]"]),k(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(l=" "+RegExp.prototype.toString.call(r)),S(r)&&(l=" "+Date.prototype.toUTCString.call(r)),O(r)&&(l=" "+f(r)),0!==a.length||p&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),s=p?function(e,t,r,n,o){for(var i=[],a=0,c=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(s,l,T)):T[0]+l+T[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var a,c,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?c=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(c=e.stylize("[Setter]","special")),E(n,o)||(a="["+o+"]"),c||(e.seen.indexOf(u.value)<0?(c=m(r)?y(e,u.value,null):y(e,u.value,r-1)).indexOf("\n")>-1&&(c=i?c.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+c.split("\n").map((function(e){return" "+e})).join("\n")):c=e.stylize("[Circular]","special")),_(a)){if(i&&o.match(/^\d+$/))return c;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+c}function b(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function h(e){return"number"==typeof e}function v(e){return"string"==typeof e}function _(e){return void 0===e}function w(e){return T(e)&&"[object RegExp]"===P(e)}function T(e){return"object"==typeof e&&null!==e}function S(e){return T(e)&&"[object Date]"===P(e)}function O(e){return T(e)&&("[object Error]"===P(e)||e instanceof Error)}function k(e){return"function"==typeof e}function P(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!a[e])if(c.test(e)){var r=n.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(955),t.isArray=b,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=h,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=_,t.isRegExp=w,t.types.isRegExp=w,t.isObject=T,t.isDate=S,t.types.isDate=S,t.isError=O,t.types.isNativeError=O,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(384);var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",A(),t.format.apply(t,arguments))},t.inherits=r(717),t._extend=function(e,t){if(!t||!T(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var R="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(R&&e[R]){var t;if("function"!=typeof(t=e[R]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,R,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e},v={},_={},w={};g=w,Object.defineProperty(g,"__esModule",{value:!0}),g.matcher={whitespace:/\s/,whitespaceGreedy:/(\s+)/g,commentGreedy:/(\*\/)/g,boundary:/[\(\)\{\}'"@;:\s]/,stringBoundary:/['"]/},(m=g.nodeType||(g.nodeType={})).stylesheet="stylesheet",m.comment="comment",m.atRule="atRule",m.ruleset="ruleset",m.expression="expression",m.declaration="declaration",m.rulelist="rulelist",m.discarded="discarded",Object.defineProperty(_,"__esModule",{value:!0});const T=l(),S=w;_.iterateOverAst=function*e(t){switch(yield t,t.type){case S.nodeType.stylesheet:for(const r of t.rules)yield*e(r);return;case S.nodeType.ruleset:return yield*e(t.rulelist);case S.nodeType.rulelist:for(const r of t.rules)yield*e(r);return;case S.nodeType.declaration:return void(void 0!==t.value&&(yield*e(t.value)));case S.nodeType.atRule:return void(t.rulelist&&(yield*e(t.rulelist)));case S.nodeType.expression:case S.nodeType.comment:case S.nodeType.discarded:return;default:const r=t;console.error(`Got a node of unknown type: ${T.inspect(r)}`)}};var O={};Object.defineProperty(O,"__esModule",{value:!0});const k=w;O.NodeFactory=class{stylesheet(e,t){return{type:k.nodeType.stylesheet,rules:e,range:t}}atRule(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;return{type:k.nodeType.atRule,name:e,parameters:t,rulelist:r,nameRange:n,parametersRange:o,range:i}}comment(e,t){return{type:k.nodeType.comment,value:e,range:t}}rulelist(e,t){return{type:k.nodeType.rulelist,rules:e,range:t}}ruleset(e,t,r,n){return{type:k.nodeType.ruleset,selector:e,rulelist:t,selectorRange:r,range:n}}declaration(e,t,r,n){return{type:k.nodeType.declaration,name:e,value:t,nameRange:r,range:n}}expression(e,t){return{type:k.nodeType.expression,text:e,range:t}}discarded(e,t){return{type:k.nodeType.discarded,text:e,range:t}}};var P={};Object.defineProperty(P,"__esModule",{value:!0}),P.NodeVisitor=class{constructor(){this.path_=[]}get path(){return this.path_}visit(e){let t;return this[e.type]&&(this.path_.push(e),t=this[e.type](e),this.path_.pop()),t}};var x={},j={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),function(e){e[e.none=0]="none",e[e.whitespace=Math.pow(2,0)]="whitespace",e[e.string=Math.pow(2,1)]="string",e[e.comment=Math.pow(2,2)]="comment",e[e.word=Math.pow(2,3)]="word",e[e.boundary=Math.pow(2,4)]="boundary",e[e.propertyBoundary=Math.pow(2,5)]="propertyBoundary",e[e.openParenthesis=Math.pow(2,6)|e.boundary]="openParenthesis",e[e.closeParenthesis=Math.pow(2,7)|e.boundary]="closeParenthesis",e[e.at=Math.pow(2,8)|e.boundary]="at",e[e.openBrace=Math.pow(2,9)|e.boundary]="openBrace",e[e.closeBrace=Math.pow(2,10)|e.propertyBoundary|e.boundary]="closeBrace",e[e.semicolon=Math.pow(2,11)|e.propertyBoundary|e.boundary]="semicolon",e[e.colon=Math.pow(2,12)|e.boundary|e.word]="colon",e[e.hyphen=Math.pow(2,13)]="hyphen",e[e.underscore=Math.pow(2,14)]="underscore"}(t=e.TokenType||(e.TokenType={}));class r{constructor(e,t,r){this.type=e,this.start=t,this.end=r,this.previous=null,this.next=null}is(e){return(this.type&e)===e}}r.type=t,e.Token=r;const n={"(":r.type.openParenthesis,")":r.type.closeParenthesis,":":r.type.colon,"@":r.type.at,"{":r.type.openBrace,"}":r.type.closeBrace,";":r.type.semicolon,"-":r.type.hyphen,_:r.type.underscore};e.boundaryTokenTypes=n}(j);var A={};Object.defineProperty(A,"__esModule",{value:!0});const E=w,R=j;A.Tokenizer=class{constructor(e){this.cursorToken_=new R.Token(R.Token.type.none,0,0),this.currentToken_=null,this.cssText=e}get offset(){return this.cursorToken_.end}get currentToken(){return null==this.currentToken_&&(this.currentToken_=this.getNextToken_()),this.currentToken_}advance(){let e;return null!=this.currentToken_?(e=this.currentToken_,this.currentToken_=null):e=this.getNextToken_(),e}slice(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const{start:r,end:n}=this.getRange(e,t);return this.cssText.substring(r,n)}getRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{start:e.start,end:(t||e).end}}trimRange(e){let{start:t,end:r}=e;for(;t<=r&&/\s/.test(this.cssText.charAt(t));)t++;for(;t<=r&&r>0&&/\s/.test(this.cssText.charAt(r-1));)r--;return{start:t,end:r}}flush(){const e=[];for(;this.currentToken;)e.push(this.advance());return e}getNextToken_(){const e=this.cssText[this.offset];let t;return this.currentToken_=null,this.offset>=this.cssText.length?null:(t=E.matcher.whitespace.test(e)?this.tokenizeWhitespace(this.offset):E.matcher.stringBoundary.test(e)?this.tokenizeString(this.offset):"/"===e&&"*"===this.cssText[this.offset+1]?this.tokenizeComment(this.offset):E.matcher.boundary.test(e)?this.tokenizeBoundary(this.offset):this.tokenizeWord(this.offset),t.previous=this.cursorToken_,this.cursorToken_.next=t,this.cursorToken_=t,t)}tokenizeString(e){const t=this.cssText[e];let r=!1;const n=e;let o;for(;o=this.cssText[++e];)if(r)r=!1;else{if(o===t){++e;break}"\\"===o&&(r=!0)}return new R.Token(R.Token.type.string,n,e)}tokenizeWord(e){const t=e;let r;for(;(r=this.cssText[e])&&!E.matcher.boundary.test(r);)e++;return new R.Token(R.Token.type.word,t,e)}tokenizeWhitespace(e){const t=e;E.matcher.whitespaceGreedy.lastIndex=e;const r=E.matcher.whitespaceGreedy.exec(this.cssText);return null!=r&&r.index===e&&(e=E.matcher.whitespaceGreedy.lastIndex),new R.Token(R.Token.type.whitespace,t,e)}tokenizeComment(e){const t=e;return E.matcher.commentGreedy.lastIndex=e,e=null==E.matcher.commentGreedy.exec(this.cssText)?this.cssText.length:E.matcher.commentGreedy.lastIndex,new R.Token(R.Token.type.comment,t,e)}tokenizeBoundary(e){const t=R.boundaryTokenTypes[this.cssText[e]]||R.Token.type.boundary;return new R.Token(t,e,e+1)}},Object.defineProperty(x,"__esModule",{value:!0});const C=O,I=j,F=A;x.Parser=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new C.NodeFactory;this.nodeFactory=e}parse(e){return this.parseStylesheet(new F.Tokenizer(e))}parseStylesheet(e){return this.nodeFactory.stylesheet(this.parseRules(e),{start:0,end:e.cssText.length})}parseRules(e){const t=[];for(;e.currentToken;){const r=this.parseRule(e);r&&t.push(r)}return t}parseRule(e){const t=e.currentToken;return null===t?null:t.is(I.Token.type.whitespace)?(e.advance(),null):t.is(I.Token.type.comment)?this.parseComment(e):t.is(I.Token.type.word)?this.parseDeclarationOrRuleset(e):t.is(I.Token.type.propertyBoundary)?this.parseUnknown(e):t.is(I.Token.type.at)?this.parseAtRule(e):this.parseUnknown(e)}parseComment(e){const t=e.advance();return null===t?null:this.nodeFactory.comment(e.slice(t),{start:t.start,end:t.end})}parseUnknown(e){const t=e.advance();let r;if(null===t)return null;for(;e.currentToken&&e.currentToken.is(I.Token.type.boundary);)r=e.advance();return this.nodeFactory.discarded(e.slice(t,r),e.getRange(t,r))}parseAtRule(e){let t,r,n,o,i;if(!e.currentToken)return null;const a=e.currentToken.start;for(;e.currentToken;)if(e.currentToken.is(I.Token.type.whitespace))e.advance();else if(!t&&e.currentToken.is(I.Token.type.at)){e.advance();const n=e.currentToken;let o;for(;e.currentToken&&e.currentToken.is(I.Token.type.word);)o=e.advance();r=e.getRange(n,o),t=e.cssText.slice(r.start,r.end)}else{if(e.currentToken.is(I.Token.type.openBrace)){n=this.parseRulelist(e);break}if(e.currentToken.is(I.Token.type.propertyBoundary)){e.advance();break}null==o?o=e.advance():i=e.advance()}if(void 0===t||void 0===r)return null;let c,u="";o&&(c=e.trimRange(e.getRange(o,i)),u=e.cssText.slice(c.start,c.end));const s=e.currentToken?e.currentToken.previous.end:e.cssText.length;return this.nodeFactory.atRule(t,u,n,r,c,{start:a,end:s})}parseRulelist(e){const t=[],r=e.currentToken.start;let n;for(e.advance();e.currentToken;){if(e.currentToken.is(I.Token.type.closeBrace)){n=e.currentToken,e.advance();break}{const r=this.parseRule(e);r&&t.push(r)}}const o=n?n.end:e.cssText.length;return this.nodeFactory.rulelist(t,{start:r,end:o})}parseDeclarationOrRuleset(e){let t=null,r=null,n=null;for(;e.currentToken;)if(e.currentToken.is(I.Token.type.whitespace))e.advance();else if(e.currentToken.is(I.Token.type.openParenthesis))for(;e.currentToken&&!e.currentToken.is(I.Token.type.closeParenthesis);)e.advance();else{if(e.currentToken.is(I.Token.type.openBrace)||e.currentToken.is(I.Token.type.propertyBoundary))break;e.currentToken.is(I.Token.type.colon)&&(n=e.currentToken),null===t?(t=e.advance(),r=t):r=e.advance()}if(null===e.currentToken)return null;if(e.currentToken.is(I.Token.type.propertyBoundary)){const o=e.getRange(t,n?n.previous:r),i=e.cssText.slice(o.start,o.end);let a;if(n&&n.next){const t=e.getRange(n.next,r),o=e.trimRange(t),i=e.cssText.slice(o.start,o.end);a=this.nodeFactory.expression(i,o)}e.currentToken.is(I.Token.type.semicolon)&&e.advance();const c=e.trimRange(e.getRange(t,e.currentToken&&e.currentToken.previous||r));return this.nodeFactory.declaration(i,a,o,c)}if(n&&n===r){const n=this.parseRulelist(e);e.currentToken.is(I.Token.type.semicolon)&&e.advance();const o=e.getRange(t,r.previous),i=e.cssText.slice(o.start,o.end),a=e.trimRange(e.getRange(t,e.currentToken&&e.currentToken.previous||r));return this.nodeFactory.declaration(i,n,o,a)}{const n=e.getRange(t,r),o=e.cssText.slice(n.start,n.end),i=this.parseRulelist(e),a=t.start;let c;return c=e.currentToken?e.currentToken.previous?e.currentToken.previous.end:t.end:e.cssText.length,this.nodeFactory.ruleset(o,i,n,{start:a,end:c})}}};var D={};Object.defineProperty(D,"__esModule",{value:!0});const M=w,U=P;class B extends U.NodeVisitor{stringify(e){return this.visit(e)||""}[M.nodeType.stylesheet](e){let t="";for(let r=0;r-1})),r=q();return r&&(t=[].concat(d(t),d(d(r.contentDocument.querySelectorAll("style")).filter((function(e){return e.innerText&&e.innerText.indexOf("narrow-container-max-width")>-1}))))),Q=t.map((function(t){return{style:t,ast:e.parse(t.innerText.replace(new RegExp("\n","g"),""))}}))},Y=function(e){Q=e;var t=new K;Q.map((function(e){e.style?e.style.innerText=t.stringify(e.ast):console.error("No ast for style",e)}))},X=function(){Q&&Y(Q.map((function(e){if(e.style.id)return e;var t=d(document.querySelectorAll("style")).filter((function(e){return e.innerText&&e.innerText.indexOf("narrow-container-max-width")>-1})),r=q();return r&&(t=[].concat(d(t),d(d(r.contentDocument.querySelectorAll("style")).filter((function(e){return e.innerText&&e.innerText.indexOf("narrow-container-max-width")>-1}))))),e.style=t.find((function(e){return!e.id})),y({},e)})))},ee=function(e){if("string"==typeof e&&-1!==e.indexOf("CT_CSS_SKIP_RULE"))return"CT_CSS_SKIP_RULE";if([e.top,e.right,e.bottom,e.left].reduce((function(e,t){return!(!e||"auto"!==t&&""!==t.trim())}),!0))return"CT_CSS_SKIP_RULE";var t=["auto"===e.top||""===e.top.trim()||"0"===e.top[0]?0:e.top,"auto"===e.right||""===e.right.trim()||"0"===e.right[0]?0:e.right,"auto"===e.bottom||""===e.bottom.trim()||"0"===e.bottom[0]?0:e.bottom,"auto"===e.left||""===e.left.trim()||"0"===e.left[0]?0:e.left];return t[0]===t[1]&&t[0]===t[2]&&t[0]===t[3]?t[0]:t[0]===t[2]&&t[1]===t[3]?"".concat(t[0]," ").concat(t[3]):t.join(" ")},te=function(e,t){var r=t.forcedOutput,n=void 0!==r&&r;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return"none";if(0===parseFloat(e.blur)&&0===parseFloat(e.spread)&&0===parseFloat(e.v_offset)&&0===parseFloat(e.h_offset))return n?"none":"CT_CSS_SKIP_RULE";var o=[];return e.inset&&o.push("inset"),o.push("".concat(e.h_offset,"px")),o.push("".concat(e.v_offset,"px")),0!==parseFloat(e.blur)&&(o.push("".concat(e.blur,"px")),0!==parseFloat(e.spread)&&o.push("".concat(e.spread,"px"))),0===parseFloat(e.blur)&&0!==parseFloat(e.spread)&&(o.push("".concat(e.blur,"px")),o.push("".concat(e.spread,"px"))),o.push(e.color.color),o.join(" ")},re=function(e){return e&&"[object Function]"==={}.toString.call(e)},ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e=y({variableDescriptor:{},value:"",ast:{}},e),r=t.variableDescriptor,n=t.value,o=t.ast,i=r.selector||":root",a="--";"property"===r.variableType&&(a="");var c="".concat(a).concat(re(r.variable)?r.variable():r.variable),u=o.rules.find((function(e){return e.selector===i})),s={type:"ruleset",selector:":root",rulelist:{type:"rulelist",rules:[{type:"declaration",name:"--container-max-width",value:{type:"expression",text:"1290px"}}]}},l=JSON.parse(JSON.stringify(o));return u&&(l.rules=l.rules.map((function(e){if(e.selector!==i)return e;if(n.indexOf("CT_CSS_SKIP_RULE")>-1||n.indexOf(c)>-1)return y(y({},e),{},{rulelist:y(y({},e.rulelist),{},{rules:e.rulelist.rules.filter((function(e){return e.name!==c}))})});var t=e.rulelist.rules.find((function(e){return e.name===c}));return y(y({},e),{},t?{rulelist:y(y({},e.rulelist),{},{rules:e.rulelist.rules.map((function(e){return e.name===c?y(y({},e),{},{value:y(y({},e.value),{},{text:n})}):e}))})}:{rulelist:y(y({},e.rulelist),{},{rules:[].concat(d(e.rulelist.rules),[y(y({},s.rulelist.rules[0]),{},{name:c,value:y(y({},s.rulelist.rules[0].value),{},{text:n})})])})})}))),u||-1!==n.indexOf("CT_CSS_SKIP_RULE")||(l.rules=[].concat(d(l.rules),[y(y({},s),{},{selector:i,rulelist:y(y({},s.rulelist),{},{rules:[y(y({},s.rulelist.rules[0]),{},{name:c,value:y(y({},s.rulelist.rules[0].value),{},{text:n})})]})})])),l},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(e=y({variableDescriptor:{},value:{},ast:{}},e)).value;return(e.variableDescriptor.type||"").indexOf("color")>-1&&"CT_CSS_SKIP_RULE"!==e.value&&(t=e.value["color"===e.variableDescriptor.type?"default":e.variableDescriptor.type.split(":")[1]].color),"border"===(e.variableDescriptor.type||"")&&(t=e.value&&"none"!==e.value.style?"".concat(e.value.width,"px ").concat(e.value.style," ").concat(e.value.color.color):"none",e.variableDescriptor.skip_none&&"none"===t&&(t="CT_CSS_SKIP_RULE")),"spacing"===(e.variableDescriptor.type||"")&&(t=ee(e.value)),"box-shadow"===(e.variableDescriptor.type||"")&&(t=te(e.value,e.variableDescriptor)),ne({variableDescriptor:e.variableDescriptor,value:"".concat(t).concat(e.variableDescriptor.unit||"").concat(e.variableDescriptor.important?" !important":""),ast:e.ast})},ie=window.blocksyOptions,ae=r(626);function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};if("color"===e)return c?"none":"CT_CSS_SKIP_RULE";const u=function(e,t,r){return(r+"").split(e).join(t)};if("image"===e)return r.url?`${"CT_CSS_SKIP_RULE"!==a.default.color?`linear-gradient(${a.default.color}, ${a.default.color}), `:""}url(${r.url})`:"CT_CSS_SKIP_RULE";if("gradient"===e)return t;let s=1,l=o?o.default.color:"";if(l.indexOf("paletteColor1")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor1")),l.indexOf("paletteColor2")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor2")),l.indexOf("paletteColor3")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor3")),l.indexOf("paletteColor4")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor4")),l.indexOf("paletteColor5")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor5")),l.indexOf("paletteColor6")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor6")),l.indexOf("paletteColor7")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor7")),l.indexOf("paletteColor8")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor8")),l.indexOf("rgb")>-1){const e=u("rgb(","",u(")","",u("rgba(","",u(" ","",l)))).split(",");l=`#${le(parseInt(e[0],10))}${le(parseInt(e[1],10))}${le(parseInt(e[2],10))}`,e.length>3&&(s=e[3])}return l=u("#","",l),`url("${u("OPACITY",s,u("COLOR",l,ct_localizations.customizer_sync.svg_patterns[n]||ct_localizations.customizer_sync.svg_patterns["type-1"]))}")`}})}},i),ue(ue({variable:"background-position",variableType:"property",selector:r,responsive:n},i),{},{extractValue:function(e){return pe({value:o(e),responsive:n,cb:function(){let{background_type:e,background_image:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"image"!==e?"CT_CSS_SKIP_RULE":`${Math.round(100*parseFloat(t.x||0))}% ${Math.round(100*parseFloat(t.y||0))}%`}})}}),ue(ue({variable:"background-size",variableType:"property",selector:r,responsive:n},i),{},{extractValue:function(e){return pe({value:o(e),responsive:n,cb:function(){let{background_type:e,background_size:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"image"!==e?"CT_CSS_SKIP_RULE":t}})}}),ue(ue({variable:"background-attachment",variableType:"property",selector:r,responsive:n},i),{},{extractValue:function(e){return pe({value:o(e),responsive:n,cb:function(){let{background_type:e,background_attachment:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"image"!==e?"CT_CSS_SKIP_RULE":t}})}}),ue(ue({selector:r,variable:"background-repeat",variableType:"property",responsive:n},i),{},{extractValue:function(e){return pe({value:o(e),responsive:n,cb:function(){let{background_type:e,background_repeat:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"image"!==e||"repeat"===t?"CT_CSS_SKIP_RULE":t}})}})]}};function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t div",responsive:!0,addToDescriptors:{fullValue:!0,important:!0},valueExtractor:function(e){let{background:t}=e;return!t.desktop&&!ve&&"color"===t.background_type&&t.backgroundColor.default.color&&t.backgroundColor.default.color.indexOf("CT_CSS_SKIP_RULE")>-1?ct_editor_localizations.default_background:t}})),(we=["content_style_source","content_style","content_background","content_boxed_shadow","boxed_content_spacing","content_boxed_radius",...ve?["has_content_block_structure","template_subtype","template_editor_width_source","template_editor_width"]:[]],Te=[{selector:".editor-styles-wrapper",variable:"block-max-width",extractValue:function(e){let{template_subtype:t,template_editor_width_source:r="small",template_editor_width:n=1290}=e;return t?"card"!==t?"CT_CSS_SKIP_RULE":"small"===r?500:"medium"===r?900:n:"CT_CSS_SKIP_RULE"},fullValue:!0,unit:"px",important:!0},{selector:".editor-styles-wrapper",variable:"has-boxed",responsive:!0,extractValue:function(e){let{template_subtype:t,content_style_source:r="inherit",has_content_block_structure:n="yes",content_style:o="wide"}=e;return ve||"inherit"!==r||(o=ct_editor_localizations.default_content_style),o=(0,ae.T)(o),!ve||"yes"===n&&"card"!==t&&"content"!==t||(o={desktop:"wide",tablet:"wide",mobile:"wide"}),{desktop:"boxed"===o.desktop?"var(--true)":"var(--false)",tablet:"boxed"===o.tablet?"var(--true)":"var(--false)",mobile:"boxed"===o.mobile?"var(--true)":"var(--false)"}},fullValue:!0,unit:""},{selector:".editor-styles-wrapper",variable:"has-wide",responsive:!0,extractValue:function(e){let{template_subtype:t,has_content_block_structure:r="yes",content_style_source:n="inherit",content_style:o="wide"}=e;return ve||"inherit"!==n||(o=ct_editor_localizations.default_content_style),o=(0,ae.T)(o),!ve||"yes"===r&&"card"!==t&&"content"!==t||(o={desktop:"wide",tablet:"wide",mobile:"wide"}),{desktop:"wide"===o.desktop?"var(--true)":"var(--false)",tablet:"wide"===o.tablet?"var(--true)":"var(--false)",mobile:"wide"===o.mobile?"var(--true)":"var(--false)"}},fullValue:!0,unit:""},...ye({id:"background",selector:".editor-styles-wrapper",responsive:!0,conditional_var:"--has-boxed",addToDescriptors:{fullValue:!0},valueExtractor:function(e){let{template_subtype:t,has_content_block_structure:r="yes",content_style_source:n="inherit",content_background:o}=e;return ve||"inherit"!==n||(o=ct_editor_localizations.default_content_background),!ve||"yes"===r&&"card"!==t&&"content"!==t||(o=JSON.parse(JSON.stringify((0,ae.T)(o))),o.desktop.background_type="color",o.desktop.backgroundColor.default.color="CT_CSS_SKIP_RULE",o.tablet.background_type="color",o.tablet.backgroundColor.default.color="CT_CSS_SKIP_RULE",o.mobile.background_type="color",o.mobile.backgroundColor.default.color="CT_CSS_SKIP_RULE"),o}}).background,{selector:".editor-styles-wrapper",type:"spacing",variable:"boxed-content-spacing",responsive:!0,unit:"",fullValue:!0,extractValue:function(e){let{template_subtype:t,content_style_source:r="inherit",boxed_content_spacing:n,has_content_block_structure:o="yes"}=e;return ve||"inherit"!==r||(n=ct_editor_localizations.default_boxed_content_spacing),!ve||"yes"===o&&"card"!==t&&"content"!==t?n:"CT_CSS_SKIP_RULE"}},{selector:".editor-styles-wrapper",type:"spacing",variable:"border-radius",responsive:!0,fullValue:!0,extractValue:function(e){let{template_subtype:t,content_style_source:r="inherit",content_boxed_radius:n,has_content_block_structure:o="yes"}=e;return ve||"inherit"!==r||(n=ct_editor_localizations.default_content_boxed_radius),!ve||"yes"===o&&"card"!==t&&"content"!==t?n:"CT_CSS_SKIP_RULE"}},{selector:".editor-styles-wrapper",type:"box-shadow",variable:"box-shadow",responsive:!0,fullValue:!0,extractValue:function(e){let{template_subtype:t,content_style_source:r="inherit",content_boxed_shadow:n,has_content_block_structure:o="yes"}=e;return ve||"inherit"!==r||(n=ct_editor_localizations.default_content_boxed_shadow),!ve||"yes"===o&&"card"!==t&&"content"!==t?n:"CT_CSS_SKIP_RULE"}}],we.reduce((function(e,t){return de(de({},e),{},{[t]:Te})}),{})));var we,Te;function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t-1){let r=t.innerText.split("display=swap");e=r[0].trim().replace("@import url('","")+"display=swap"}[...document.querySelectorAll("style")].map((function(e){e.innerText&&-1!==e.innerText.indexOf("narrow-container-max-width")&&(e.innerText=e.innerText.replace(/\.editor-styles-wrapper \.edit-post-visual-editor__content-area \> div/g,".edit-post-visual-editor__content-area > div"),e.innerText=e.innerText.replace(".editor-styles-wrapperroot",":root"))}));const r=document.querySelector('.edit-post-visual-editor__content-area iframe[name="editor-canvas"]');r&&[...r.contentDocument.querySelectorAll("style")].map((function(t){t.innerText&&-1===t.innerText.indexOf("narrow-container-max-width")||(e&&-1===t.innerHTML.indexOf(e)&&(t.innerHTML=`@import url('${e}');${t.innerHTML}`),t.innerHTML=t.innerHTML.replace(/\.editor-styles-wrapper \.edit-post-visual-editor__content-area \> div/g,":root"),t.innerHTML=t.innerHTML.replace(/\.edit-post-visual-editor__content-area \> div/g,":root"),t.innerHTML=t.innerHTML.replace(".editor-styles-wrapperroot",":root"))}))},Ae=function(){setTimeout((function(){const e=(0,o.select)("core/edit-post").isFeatureActive("themeStyles");document.body.classList.remove("ct-theme-editor-styles"),e&&document.body.classList.add("ct-theme-editor-styles")}))};Pe&&(setTimeout((function(){je(),Ae()}),1e3),wp.data.dispatch("core/edit-post").__experimentalSetPreviewDeviceType=function(){Pe(...arguments);const e=function(){X(),je()};[0,200,300,400,500].map((function(t){return setTimeout(e,t)}))},wp.data.dispatch("core/edit-post").toggleFeature=function(){xe(...arguments),Ae()});const Ee=wp.data.subscribe((function(){const e=(0,o.select)("core/edit-post").isFeatureActive("themeStyles");document.body.classList.remove("ct-theme-editor-styles"),e&&document.body.classList.add("ct-theme-editor-styles"),Ee()})),Re=function(e){let{atts:t}=e,r=t.content_block_structure||"type-4";document.body.classList.remove("ct-structure-narrow","ct-structure-normal"),t.has_content_block_structure&&"yes"!==t.has_content_block_structure||"content"===t.template_subtype?document.body.classList.add("ct-structure-normal"):document.body.classList.add("ct-structure-"+("type-4"===r?"normal":"narrow"))},Ce=function(e,t){"page_structure_type"!==e&&"has_content_block_structure"!==e&&"content_block_structure"!==e&&"template_subtype"!==e||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e=Oe(Oe({},(0,o.select)("core/editor").getEditedPostAttribute("blocksy_meta")||{}),e),document.body.classList.contains("post-type-ct_content_block"))return void Re({atts:e});let t=e.page_structure_type||"default";"default"===t&&(t=ct_editor_localizations.default_page_structure),document.body.classList.remove("ct-structure-narrow","ct-structure-normal"),document.body.classList.add("ct-structure-"+("type-4"===t?"normal":"narrow"))}({[e]:t});const r=Oe(Oe({},(0,ie.getValueFromInput)(ct_editor_localizations.post_options,wp.data.select("core/editor").getEditedPostAttribute("blocksy_meta")||{})),{},{[e]:t});_e[e]&&(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(e=y({variableDescriptor:{},value:"",fullValue:{},tabletMQ:"(max-width: 999.98px)",mobileMQ:"(max-width: 689.98px)"},e)).variableDescriptor;re(t)&&(t=t(e.value)),Array.isArray(t)||(t=[t]),Y(Z().map((function(r){return y(y({},r),{},{ast:t.reduce((function(t,r){var n=r.fullValue?e.fullValue:e.value;if(n=r.extractValue?r.extractValue(n):n,r.whenDone&&r.whenDone(n,e.value),n=h(n,!!r.responsive),!r.responsive)return oe({variableDescriptor:r,value:n,ast:t});var o=oe({variableDescriptor:r,value:n.desktop,ast:t});o.rules.find((function(t){var r=t.type,n=t.parameters;return"atRule"===r&&n===e.tabletMQ}))||(o=y(y({},o),{},{rules:[].concat(d(o.rules),[{type:"atRule",name:"media",parameters:e.tabletMQ,rulelist:{type:"rulelist",rules:[]}}])}));var i=o=y(y({},o),{},{rules:o.rules.map((function(t){return"atRule"!==t.type||t.parameters!==e.tabletMQ?t:y(y({},t),{},{rulelist:oe({variableDescriptor:y(y({},r),{},{selector:".edit-post-visual-editor__content-area > div"===r.selector?":root":r.selector}),value:n.tablet,ast:t.rulelist})})}))});return i.rules.find((function(t){var r=t.type,n=t.parameters;return"atRule"===r&&n===e.mobileMQ}))||(i=y(y({},i),{},{rules:[].concat(d(i.rules),[{type:"atRule",name:"media",parameters:e.mobileMQ,rulelist:{type:"rulelist",rules:[]}}])})),y(y({},i),{},{rules:i.rules.map((function(t){return"atRule"!==t.type||t.parameters!==e.mobileMQ?t:y(y({},t),{},{rulelist:oe({variableDescriptor:y(y({},r),{},{selector:".edit-post-visual-editor__content-area > div"===r.selector?":root":r.selector}),value:n.mobile,ast:t.rulelist})})}))})}),r.ast)})})))}({variableDescriptor:Array.isArray(_e[e])?_e[e]:[_e[e]],value:t,fullValue:r,tabletMQ:"(max-width: 800px)",mobileMQ:"(max-width: 370px)"}),je())};var Ie=window.wp.i18n,Fe=window.wp.primitives;function De(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t