/*!
 * Tiny Page Embed plugin
 *
 * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
 * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
 *
 * Version: 8.3.0-112
 */

/*!
 * This resource uses the code from the following libraries:
 *
 * specificity
 *  Copyright (c) 2022 Bramus Van Damme - https://www.bram.us/
 *  https://github.com/keeganstreet/specificity
 *
 */

!function(){"use strict";const e=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||r.constructor?.name===o.name)?"string":t;var n,r,o})(t)===e,t=e=>t=>typeof t===e,n=e("string"),r=e("array"),o=t("boolean"),i=e=>undefined===e;const s=e=>null==e,a=e=>!s(e),l=t("function"),c=t("number"),u=()=>{};class h{tag;value;static singletonNone=new h(!1);constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(e??"Called getOrDie on None")}static from(e){return a(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}const d=Array.prototype.slice,p=Array.prototype.indexOf,f=Array.prototype.push,m=(e,t)=>((e,t)=>p.call(e,t))(e,t)>-1,g=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},y=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r},k=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},S=(e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=e[r];t(o,r)&&n.push(o)}return n},v=(e,t,n)=>(k(e,((e,r)=>{n=t(n,e,r)})),n),b=e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!r(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);f.apply(t,e[n])}return t},C=(e,t)=>b(y(e,t)),w=Object.keys,x=Object.hasOwnProperty,A=(e,t)=>{const n=w(e);for(let r=0,o=n.length;r<o;r++){const o=n[r];t(e[o],o)}},L=(e,t)=>E(e,((e,n)=>({k:n,v:t(e,n)}))),E=(e,t)=>{const n={};return A(e,((e,r)=>{const o=t(e,r);n[o.k]=o.v})),n},T=(e,t)=>{const{type:n,message:r}=t;e.notificationManager.open({type:n,text:r})},P=e=>{(e=>{switch(e){case"error":return console.error;case"info":return console.info;case"warn":return console.warn;default:return console.log}})(e.type)(e.message)},_=(e,t)=>{const{protect:n,allowList:r=[],blockList:o=[]}=null!=e?e:{};let i;return i=a(n)?n:r.length>0||o.length>0||t,{protect:i,allowList:r,blockList:o}},O=e=>{const{protect:t,allowList:n,blockList:r}=null!=e?e:{};return e=>{const o=e.toLowerCase();return n.length>0?!g(n,(e=>e.toLowerCase()===o)):r.length>0?g(r,(e=>e.toLowerCase()===o)):t}},I=e=>{const t=O(e);return(e,n)=>{const r=((e,t)=>`${e}:${t}`)(n,e.toLowerCase());return t(r)}},R=(e,t,n,r)=>{const o=Reflect.get(e,"on"),i={protectedEventHandlers:[],cleanupScheduled:!1},s=(e,t)=>{r&&console.log(`[EventsProxy] ${e}`,t||"")},a=t=>{"invalid"===t&&i.protectedEventHandlers.length>0&&(s("Removing event handlers",i.protectedEventHandlers),k(i.protectedEventHandlers,(t=>{e.off(t.name,t.callback)})),i.protectedEventHandlers=[])},l=t.onStatusChange(a);return e.on("remove",l),(r,l,c)=>{s(`Adding event listener: ${r}`,{shouldProtect:n(r)});const h=((e,r)=>{const o=n(e),s=t.getStatus(),a=o&&"invalid"===s?u:r;return o&&i.protectedEventHandlers.push({name:e,callback:a}),a})(r,l);return i.cleanupScheduled||(i.cleanupScheduled=!0,window.setTimeout((()=>{a(t.getStatus()),i.cleanupScheduled=!1}),0)),Reflect.apply(o,e,[r,h,c])}},N=(e,t,n)=>r=>{const o="invalid"!==t.getStatus()&&a(n)?n(r):u,i=((e,t,n)=>{const r=e=>{"invalid"===e&&n.setEnabled(!1)},o=()=>r(t.getStatus());r(t.getStatus()),e.on("NodeChange",o);const i=t.onStatusChange(r);return()=>{e.off("NodeChange",o),i()}})(e,t,r);return e=>{null==o||o(e),i()}},M=(e,t,n)=>(...r)=>{var o;return"invalid"===e.getStatus()?n:null!==(o=null==t?void 0:t(...r))&&void 0!==o?o:n},$=(e,t)=>M(e,t,Promise.resolve([])),j=(e,t)=>M(e,t,[]),D=(e,t)=>M(e,t,!1),B=(e,t,r,o)=>{const i=t=>{const{command:i,value:s}=t,a=h.from(s).filter(n).map((e=>e.toLowerCase())),l=i.toLowerCase()===o.toLowerCase(),c=a.exists((e=>r.has(e))),u=a.exists((t=>t===e.queryCommandValue(o)));l&&c&&!u&&t.preventDefault()},s=t.onStatusChange((t=>{if("invalid"===t){e.on("BeforeExecCommand",i);const t=()=>{const t=e.queryCommandValue(o);r.has(t.toLowerCase())&&e.execCommand(o,!1,t)};e.initialized?t():e.on("init",t)}}));e.on("remove",(()=>{s(),e.off("BeforeExecCommand",i)}))},z=(e,t,r,o,i,s=!1)=>{const a=new Set,l=new Set,c=(e,t)=>{s&&console.log(`[UiProxy] ${e}`,t||"")};((e,t,n)=>{B(e,t,n,"ToggleView")})(e,r,a),((e,t,n)=>{B(e,t,n,"ToggleSidebar")})(e,r,l);const u=(t,n,s,a)=>{const l=i(t,s);return c(`${a}: ${t}`,{spec:n,context:o,shouldProtect:l}),l?{...n,onSetup:N(e,r,n.onSetup)}:n};return new Proxy(t,{get:(e,t,s)=>{const h=Reflect.get(e,t,s);if(!n(t))return h;switch(t){case"addButton":case"addGroupToolbarButton":case"addToggleButton":case"addMenuButton":case"addSplitButton":return(...n)=>{const[r,o,...i]=n,s=u(r,o,"button",String(t));return Reflect.apply(h,e,[r,s,...i])};case"addMenuItem":case"addToggleMenuItem":case"addNestedMenuItem":return(...n)=>{const[r,o,...i]=n,s=u(r,o,"menuitem",String(t));return Reflect.apply(h,e,[r,s,...i])};case"addAutocompleter":return(...n)=>{const[s,a,...l]=n,u=i(s,"autocompleter");if(c(`${String(t)}: ${s}`,{spec:a,context:o,shouldProtect:u}),u){const t={...a,fetch:$(r,a.fetch)};return Reflect.apply(h,e,[s,t,...l])}return Reflect.apply(h,e,[s,a,...l])};case"addSidebar":return(...n)=>{const[r,s,...a]=n,u=i(r,"sidebar");if(c(`${String(t)}: ${r}`,{spec:s,context:o,shouldProtect:u}),u){l.add(r.toLowerCase());const t={...s};return Reflect.apply(h,e,[r,t,...a])}return Reflect.apply(h,e,[r,s,...a])};case"addView":return(...n)=>{const[r,s,...l]=n,u=i(r,"view");if(c(`${String(t)}: ${r}`,{spec:s,context:o,shouldProtect:u}),u){a.add(r.toLowerCase());const t={...s};return Reflect.apply(h,e,[r,t,...l])}return Reflect.apply(h,e,[r,s,...l])};case"addContextMenu":return(...n)=>{const[s,a,...l]=n,u=i(s,"contextmenu");if(c(`${String(t)}: ${s}`,{spec:a,context:o,shouldProtect:u}),u){const t={...a,update:j(r,a.update)};return Reflect.apply(h,e,[s,t,...l])}return Reflect.apply(h,e,[s,a,...l])};case"addContextToolbar":case"addContextForm":return(...n)=>{const[s,a,...l]=n,u=i(s,"contexttoolbar");if(c(`${String(t)}: ${s}`,{spec:a,context:o,shouldProtect:u}),u){const t={...a,predicate:D(r,a.predicate)};return Reflect.apply(h,e,[s,t,...l])}return Reflect.apply(h,e,[s,a,...l])};case"addIcon":case"getAll":case"addContext":return h}}})},U=new Set(["addCommand","addCommands","addQueryStateHandler","addQueryValueHandler"]),V=e=>(t,n)=>{e&&console.log(`[EditorProxy] ${t}`,n||"")},F=(e,t)=>{const{statusProvider:n,uiContext:r,protection:o,debug:i=!1}=t,{events:s,commands:a,ui:c}=o;V(i)("Creating enhanced editor with options:",{hasStatusProvider:!!n,uiContext:r,debug:i,protection:o});const{editorUiProxy:h,editorCommandsProxy:d,editorEventListenerProxy:p}=((e,t,n,r,o,i,s)=>{const a=i.protect?{...e.ui,registry:z(e,e.ui.registry,t,n,I(i),s)}:e.ui,l=r.protect?((e,t,n,r,o)=>{const i={protectedCommands:[],cleanupScheduled:!1},s=(e,t)=>{o&&console.log(`[CommandsProxy] ${e}`,t||"")},a=(e,t)=>{const o=r(e),s=n.getStatus();return o&&i.protectedCommands.push(e),o&&"invalid"===s?u:t},l=t=>{"invalid"===t&&i.protectedCommands.length>0&&(s("Removing commands",i.protectedCommands),k(i.protectedCommands,(t=>{e.editorCommands.removeCommand(t)})),i.protectedCommands=[])},c=()=>{i.cleanupScheduled||(i.cleanupScheduled=!0,window.setTimeout((()=>{l(n.getStatus()),i.cleanupScheduled=!1}),0))},h=n.onStatusChange(l);return e.on("remove",h),new Proxy(t,{get:(e,n,o)=>{if(s(`Accessing property: ${String(n)}`),"addCommand"===n){const i=Reflect.get(e,n,o);return(e,n,...o)=>{s(`Adding command: ${e}`,{shouldProtect:r(e)});const l=a(e,n);return c(),Reflect.apply(i,t,[e,l,...o])}}if("addCommands"===n){const r=Reflect.get(e,n,o);return(e,n="exec")=>{s(`Adding commands (${n})`,{commandCount:Object.keys(e).length,willApplyEnforcement:"exec"===n});const o="exec"!==n?e:L(e,((e,t)=>a(t,e)));return c(),Reflect.apply(r,t,[o,n])}}return Reflect.get(e,n,o)}})})(e,e.editorCommands,t,O(r),s):e.editorCommands;return{editorUiProxy:a,editorCommandsProxy:l,editorEventListenerProxy:o.protect?R(e,t,O(o),s):e.on.bind(e)}})(e,n,r||"",a,s,c,i),f=((e,t,n,r)=>(o,i,s)=>{const a=String(i);if("on"===i)return V(r)("on intercepted"),n;if(U.has(a))return V(r)(`${a} intercepted`),t[a].bind(t);if("editorCommands"===i)return V(r)("editorCommands accessed"),t;if("ui"===i)return V(r)("ui accessed"),e;const c=Reflect.get(o,i,s);return l(c)?c.bind(o):c})(h,d,p,i);return new Proxy(e,{get:f,set:(e,t,n,r)=>Reflect.set(e,t,n,r),has:(e,t)=>Reflect.has(e,t),ownKeys:e=>Reflect.ownKeys(e),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e,t),defineProperty:(e,t,n)=>Reflect.defineProperty(e,t,n),deleteProperty:(e,t)=>Reflect.deleteProperty(e,t),isExtensible:e=>Reflect.isExtensible(e),preventExtensions:e=>Reflect.preventExtensions(e),getPrototypeOf:e=>Reflect.getPrototypeOf(e),setPrototypeOf:(e,t)=>Reflect.setPrototypeOf(e,t)})},q=e=>parseInt(e,10),G=(e,t)=>{const n=e-t;return 0===n?0:n>0?1:-1},H=(e,t,n)=>({major:e,minor:t,patch:n}),W=e=>{const t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(e);return t?H(q(t[1]),q(t[2]),q(t[3])):H(0,0,0)},J=(e,t)=>!!e&&-1===((e,t)=>{const n=G(e.major,t.major);if(0!==n)return n;const r=G(e.minor,t.minor);if(0!==r)return r;const o=G(e.patch,t.patch);return 0!==o?o:0})((e=>W((e=>[e.majorVersion,e.minorVersion].join(".").split(".").slice(0,3).join("."))(e)))(e),W(t)),K=W("8.3.0"),Q=`${K.major}.${K.minor}.0`,Y=`${K.major+1}.0.0`,X=(e,t)=>{const{setup:n,protection:r}=t;return(o,i)=>{if(!((e,t)=>J(e,Q)?(console.error(`The "${t}" plugin requires at least version ${Q} of TinyMCE.`),!1):!!J(e,Y)||(console.error(`The "${t}" plugin requires at least version ${Q} of TinyMCE but less than ${Y}.`),!1))(tinymce,e)||((e,t)=>!!(e=>{var t;const n=null===(t=e.options.get("license_key"))||void 0===t?void 0:t.toLowerCase(),r=e.options.get("online_license_key");return s(r)&&"gpl"===n})(e)&&(((e,t)=>{const{console:n,editor:r}=t;a(r)&&(e._skinLoaded?T(e,r):e.on("SkinLoaded",(()=>{T(e,r)}))),a(n)&&P(n)})(e,{console:{type:"error",message:[`The "${t}" plugin requires a valid TinyMCE license key.`,"Read more: https://www.tiny.cloud/docs/tinymce/latest/license-key/"].join(" ")}}),!0))(o,e))return{};const c=(e=>{const{protect:t=!0,events:n,commands:r,ui:o,api:i}=null!=e?e:{};return{protect:t,events:_(n,false),commands:_(r,true),ui:_(o,true),api:_(i,true)}})(r),u=((e="pre-validation")=>{const t=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(e),n=new Set;let r=!1;const{enableLogging:o=!1}={},i=(e,...t)=>{o&&console.log(`[StatusProvider] ${e}`,...t)};return{setStatus:e=>{const r=t.get();if(r===e)return i("Status unchanged:",e),!1;t.set(e),i("Status changed:",r,"->",e);const o={currentStatus:e,previousStatus:r},s=Array.from(n);return k(s,(e=>{e(o.currentStatus,o.previousStatus)})),!0},onStatusChange:e=>(n.add(e),i("Callback registered, total listeners:",n.size),()=>{n.delete(e)&&i("Callback unregistered, remaining listeners:",n.size)}),getStatus:t.get,hasListeners:()=>n.size>0,destroy:()=>{r||(i("Destroying StatusProvider, clearing",n.size,"listeners"),n.clear(),r=!0)}}})(),h=((e,t,n)=>{const r=`commercial-license-${t}`;return e.ui.registry.addContext(r,(()=>"invalid"!==n.getStatus()&&!e.mode.isReadOnly())),e.licenseKeyManager.validate({plugin:t}).then((e=>{n.setStatus(e?"valid":"invalid")}),(e=>{console.error(e),console.error(`An unknown error occurred when trying to validate "${t}" plugin.`),n.setStatus("invalid")})),{ui:{context:r}}})(o,e,u),d=c.protect?F(o,{statusProvider:u,uiContext:h.ui.context,debug:t.debug||!1,protection:c}):o,p=((e,t)=>({pluginCode:e,enforcer:{isInvalid:()=>"invalid"===t.getStatus(),onInvalid:e=>t.onStatusChange(((t,n)=>{"invalid"===t&&e(t,n)}))}}))(e,u);return((e,t,n,r)=>{if(t.protect&&t.api.protect&&a(e)){const i=O(t.api);return(o=e=>"invalid"===n.getStatus()&&i(e),(e,t)=>L(e,((e,n)=>l(e)?(...r)=>{if(o(n.toLowerCase())){const e=`Method "${a(t)?`${t}.`:""}${n}" is not available due to license key restrictions.`,r=new Error(e);throw console.error(e),r}return e(...r)}:e)))(e,r)}var o;return e})(n(d,i,p),c,u,e)}},Z=[{text:"Responsive - 21x9",value:"tiny-pageembed--21by9"},{text:"Responsive - 16x9",value:"tiny-pageembed--16by9"},{text:"Responsive - 4x3",value:"tiny-pageembed--4by3"},{text:"Responsive - 1x1",value:"tiny-pageembed--1by1"}],ee=e=>t=>t.options.get(e),te=ee("tiny_pageembed_classes"),ne=ee("tiny_pageembed_inline_styles"),re=ee("tiny_pageembed_css_url"),oe=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},ie=(e,t)=>{const n=(t||document).createElement(e);return oe(n)},se=oe,ae=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},le=e=>1===(e=>e.dom.nodeType)(e),ce=e=>(e=>{const t=e.dom.childNodes;return h.from(t[0]).map(se)})(e),ue=(e,t)=>{e.dom.appendChild(t.dom)},he=(e,t,r)=>{((e,t,r)=>{if(!(n(r)||o(r)||c(r)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,r+"")})(e.dom,t,r)},de=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},pe=(e,t)=>h.from(de(e,t)),fe=(e,t)=>{const r=e.dom;A(t,((e,t)=>{((e,t,r)=>{if(!n(r))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",r,":: Element ",e),new Error("CSS value must be a string: "+r);(e=>void 0!==e.style&&l(e.style.getPropertyValue))(e)&&e.style.setProperty(t,r)})(r,t,e)}))},me=e=>void 0!==e.dom.classList,ge=(e,t)=>{me(e)?e.dom.classList.add(t):((e,t)=>{((e,t,n)=>{const r=((e,t)=>{const n=de(e,t);return void 0===n||""===n?[]:n.split(" ")})(e,t),o=r.concat([n]);he(e,t,o.join(" "))})(e,"class",t)})(e,t)},ye=(e,t)=>me(e)&&e.dom.classList.contains(t),ke="tiny-pageembed",Se=e=>ye(e,ke),ve=e=>{const t=e.attr("class");return a(t)&&((e,t,n=0,r)=>{const o=e.indexOf(t,n);return-1!==o&&(!!i(r)||o+t.length<=r)})(" "+t+" "," "+ke+" ")},be=e=>{k(e,(e=>{if(ve(e)){const t=new tinymce.html.Node("span",1);t.attr("class","mce-shim"),t.attr("data-mce-bogus","1"),e.append(t),e.attr("contenteditable","false")}}))},Ce=e=>{k(e,(e=>{ve(e)&&e.attr("contenteditable",null)}))};var we=Object.create,xe=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,Le=Object.getOwnPropertyNames,Ee=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,Pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),_e=(e,t)=>{for(var n in t)xe(e,n,{get:t[n],enumerable:!0})},Oe=Pe((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},e.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}})),Ie=Pe((e=>{var t=Oe();e.encode=function(e){var n,r,o="",i=(r=e)<0?1+(-r<<1):0+(r<<1);do{n=31&i,(i>>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},e.decode=function(e,n,r){var o,i,s=e.length,a=0,l=0;do{if(n>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));o=!!(32&i),a+=(i&=31)<<l,l+=5}while(o);r.value=function(e){var t=e>>1;return 1&~e?t:-t}(a),r.rest=n}})),Re=Pe((e=>{e.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function r(e){var n=e.match(t);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}e.urlParse=r,e.urlGenerate=o;var i=function(){var t=[];return function(n){for(var i=0;i<t.length;i++)if(t[i].input===n){var s=t[0];return t[0]=t[i],t[i]=s,t[0].result}var a=function(t){var n=t,i=r(t);if(i){if(!i.path)return t;n=i.path}for(var s=e.isAbsolute(n),a=[],l=0,c=0;;){if(l=c,-1===(c=n.indexOf("/",l))){a.push(n.slice(l));break}for(a.push(n.slice(l,c));c<n.length&&"/"===n[c];)c++}var u,h=0;for(c=a.length-1;c>=0;c--)"."===(u=a[c])?a.splice(c,1):".."===u?h++:h>0&&(""===u?(a.splice(c+1,h),h=0):(a.splice(c,2),h--));return""===(n=a.join("/"))&&(n=s?"/":"."),i?(i.path=n,o(i)):n}(n);return t.unshift({input:n,result:a}),t.length>32&&t.pop(),a}}();function s(e,t){""===e&&(e="."),""===t&&(t=".");var s=r(t),a=r(e);if(a&&(e=a.path||"/"),s&&!s.scheme)return a&&(s.scheme=a.scheme),o(s);if(s||t.match(n))return t;if(a&&!a.host&&!a.path)return a.host=t,o(a);var l="/"===t.charAt(0)?t:i(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,o(a)):l}e.normalize=i,e.join=s,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0||(e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var a=!("__proto__"in Object.create(null));function l(e){return e}function c(e){if(!e)return!1;var t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=a?l:function(e){return c(e)?"$"+e:e},e.fromSetString=a?l:function(e){return c(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,n){var r=u(e.source,t.source);return 0!==r||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,n){var r;return 0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!=(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=u(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,n){var r=e.generatedColumn-t.generatedColumn;return 0!==r||n||0!==(r=u(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||0!==(n=u(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var a=r(n);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var l=a.path.lastIndexOf("/");l>=0&&(a.path=a.path.substring(0,l+1))}t=s(o(a),t)}return i(t)}})),Ne=Pe((e=>{var t=Re(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function o(){this._array=[],this._set=r?new Map:Object.create(null)}o.fromArray=function(e,t){for(var n=new o,r=0,i=e.length;r<i;r++)n.add(e[r],t);return n},o.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(e,o){var i=r?e:t.toSetString(e),s=r?this.has(e):n.call(this._set,i),a=this._array.length;(!s||o)&&this._array.push(e),s||(r?this._set.set(e,a):this._set[i]=a)},o.prototype.has=function(e){if(r)return this._set.has(e);var o=t.toSetString(e);return n.call(this._set,o)},o.prototype.indexOf=function(e){if(r){var o=this._set.get(e);if(o>=0)return o}else{var i=t.toSetString(e);if(n.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o})),Me=Pe((e=>{var t=Re();function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}n.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},n.prototype.add=function(e){!function(e,n){var r=e.generatedLine,o=n.generatedLine,i=e.generatedColumn,s=n.generatedColumn;return o>r||o==r&&s>=i||t.compareByGeneratedPositionsInflated(e,n)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=n})),$e=Pe((e=>{var t=Ie(),n=Re(),r=Ne().ArraySet,o=Me().MappingList;function i(e){e||(e={}),this._file=n.getArg(e,"file",null),this._sourceRoot=n.getArg(e,"sourceRoot",null),this._skipValidation=n.getArg(e,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(e){var t=e.sourceRoot,r=new i({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var o={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(o.source=e.source,null!=t&&(o.source=n.relative(t,o.source)),o.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(o.name=e.name)),r.addMapping(o)})),e.sources.forEach((function(o){var i=o;null!==t&&(i=n.relative(t,o)),r._sources.has(i)||r._sources.add(i);var s=e.sourceContentFor(o);null!=s&&r.setSourceContent(o,s)})),r},i.prototype.addMapping=function(e){var t=n.getArg(e,"generated"),r=n.getArg(e,"original",null),o=n.getArg(e,"source",null),i=n.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,o,i),null!=o&&(o=String(o),this._sources.has(o)||this._sources.add(o)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:o,name:i})},i.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=n.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,t,o){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=e.file}var s=this._sourceRoot;null!=s&&(i=n.relative(s,i));var a=new r,l=new r;this._mappings.unsortedForEach((function(t){if(t.source===i&&null!=t.originalLine){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=r.source&&(t.source=r.source,null!=o&&(t.source=n.join(o,t.source)),null!=s&&(t.source=n.relative(s,t.source)),t.originalLine=r.line,t.originalColumn=r.column,null!=r.name&&(t.name=r.name))}var c=t.source;null!=c&&!a.has(c)&&a.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)}),this),this._sources=a,this._names=l,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=o&&(t=n.join(o,t)),null!=s&&(t=n.relative(s,t)),this.setSourceContent(t,r))}),this)},i.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))}},i.prototype._serializeMappings=function(){for(var e,r,o,i,s=0,a=1,l=0,c=0,u=0,h=0,d="",p=this._mappings.toArray(),f=0,m=p.length;f<m;f++){if(e="",(r=p[f]).generatedLine!==a)for(s=0;r.generatedLine!==a;)e+=";",a++;else if(f>0){if(!n.compareByGeneratedPositionsInflated(r,p[f-1]))continue;e+=","}e+=t.encode(r.generatedColumn-s),s=r.generatedColumn,null!=r.source&&(i=this._sources.indexOf(r.source),e+=t.encode(i-h),h=i,e+=t.encode(r.originalLine-1-c),c=r.originalLine-1,e+=t.encode(r.originalColumn-l),l=r.originalColumn,null!=r.name&&(o=this._names.indexOf(r.name),e+=t.encode(o-u),u=o)),d+=e}return d},i.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},i.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i}));function je(e){return e>=48&&e<=57}function De(e){return je(e)||e>=65&&e<=70||e>=97&&e<=102}function Be(e){return e>=65&&e<=90}function ze(e){return function(e){return Be(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function Ue(e){return ze(e)||je(e)||45===e}function Ve(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function Fe(e){return 10===e||13===e||12===e}function qe(e){return Fe(e)||32===e||9===e}function Ge(e,t){return!(92!==e||Fe(t)||0===t)}function He(e,t,n){return 45===e?ze(t)||45===t||Ge(t,n):!!ze(e)||92===e&&Ge(e,t)}function We(e,t,n){return 43===e||45===e?je(t)?2:46===t&&je(n)?3:0:46===e?je(t)?2:0:je(e)?1:0}function Je(e){return 65279===e||65534===e?1:0}var Ke=new Array(128),Qe=130;for(let e=0;e<Ke.length;e++)Ke[e]=(qe(e)?Qe:je(e)&&131)||ze(e)&&132||Ve(e)&&133||e||128;function Ye(e){return e<128?Ke[e]:132}function Xe(e,t){return t<e.length?e.charCodeAt(t):0}function Ze(e,t,n){return 13===n&&10===Xe(e,t+1)?2:1}function et(e,t,n){let r=e.charCodeAt(t);return Be(r)&&(r|=32),r===n}function tt(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let o=t;o<n;o++){let n=r.charCodeAt(o-t),i=e.charCodeAt(o);if(Be(i)&&(i|=32),i!==n)return!1}return!0}function nt(e,t){for(;t<e.length&&qe(e.charCodeAt(t));t++);return t}function rt(e,t){for(;t<e.length&&je(e.charCodeAt(t));t++);return t}function ot(e,t){if(De(Xe(e,(t+=2)-1))){for(let n=Math.min(e.length,t+5);t<n&&De(Xe(e,t));t++);let n=Xe(e,t);qe(n)&&(t+=Ze(e,t,n))}return t}function it(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!Ue(n)){if(Ge(n,Xe(e,t+1))){t=ot(e,t)-1;continue}break}}return t}function st(e,t){let n=e.charCodeAt(t);if((43===n||45===n)&&(n=e.charCodeAt(t+=1)),je(n)&&(t=rt(e,t+1),n=e.charCodeAt(t)),46===n&&je(e.charCodeAt(t+1))&&(t=rt(e,t+=2)),et(e,t,101)){let r=0;n=e.charCodeAt(t+1),(45===n||43===n)&&(r=1,n=e.charCodeAt(t+2)),je(n)&&(t=rt(e,t+1+r+1))}return t}function at(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(41===n){t++;break}Ge(n,Xe(e,t+1))&&(t=ot(e,t))}return t}function lt(e){if(1===e.length&&!De(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(0===t||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var ct=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function ut(e=null,t){return null===e||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function ht(e){let t=e.source,n=t.length,r=t.length>0?Je(t.charCodeAt(0)):0,o=ut(e.lines,n),i=ut(e.columns,n),s=e.startLine,a=e.startColumn;for(let e=r;e<n;e++){let r=t.charCodeAt(e);o[e]=s,i[e]=a++,(10===r||13===r||12===r)&&(13===r&&e+1<n&&10===t.charCodeAt(e+1)&&(e++,o[e]=s,i[e]=a),s++,a=1)}o[n]=s,i[n]=a,e.lines=o,e.columns=i,e.computed=!0}var dt=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||ht(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||ht(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},pt=16777215,ft=24,mt=new Map([[2,22],[21,22],[19,20],[23,24]]),gt=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){let n=(e=String(e||"")).length,r=ut(this.offsetAndType,e.length+1),o=ut(this.balance,e.length+1),i=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:o[i]=n;break;case s:{let e=a&pt;for(a=o[e],s=a>>ft,o[i]=e,o[e++]=i;e<i;e++)o[e]===n&&(o[e]=i);break}case 21:case 2:case 19:case 23:o[i]=a,s=mt.get(e),a=s<<ft|i}r[i++]=e<<ft|c,-1===l&&(l=t)})),r[i]=0|n,o[i]=n,o[n]=n;0!==a;){let e=a&pt;a=o[e],o[e]=n}this.source=e,this.firstCharOffset=-1===l?0:l,this.tokenCount=i,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>ft:0}lookupOffset(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&pt:this.source.length}lookupValue(e,t){return(e+=this.tokenIndex)<this.tokenCount&&tt(this.source,this.offsetAndType[e-1]&pt,this.offsetAndType[e]&pt,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&pt:this.offsetAndType[this.tokenCount]&pt:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?9===this.lookupType(t)&&this.source.charCodeAt(this.lookupOffset(t))===e:9===this.tokenType&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&pt,t=this.offsetAndType[t],this.tokenType=t>>ft,this.tokenEnd=t&pt):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>ft,this.tokenEnd=e&pt):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(e,t){let n,r,o=e;e:for(;o<this.tokenCount&&(n=this.balance[o],!(n<e));o++)switch(r=o>0?this.offsetAndType[o-1]&pt:this.firstCharOffset,t(this.source.charCodeAt(r))){case 1:break e;case 2:o++;break e;default:this.balance[n]===o&&(o=n)}this.skip(o-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,o=this.offsetAndType[t],i=o&pt;n=i,e(o>>ft,r,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,o)=>{e[o]={idx:o,type:ct[t],chunk:this.source.substring(n,r),balance:this.balance[o]}})),e}};function yt(e,t){function n(t){return t<a?e.charCodeAt(t):0}function r(){return c=st(e,c),He(n(c),n(c+1),n(c+2))?(s=12,void(c=it(e,c))):37===n(c)?(s=11,void c++):void(s=10)}function o(){let t=c;return c=it(e,c),tt(e,t,c,"url")&&40===n(c)?(c=nt(e,c+1),34===n(c)||39===n(c)?(s=2,void(c=t+4)):void function(){for(s=7,c=nt(e,c);c<e.length;c++){let t=e.charCodeAt(c);switch(Ye(t)){case 41:return void c++;case Qe:return c=nt(e,c),41===n(c)||c>=e.length?void(c<e.length&&c++):(c=at(e,c),void(s=8));case 34:case 39:case 40:case 133:return c=at(e,c),void(s=8);case 92:if(Ge(t,n(c+1))){c=ot(e,c)-1;break}return c=at(e,c),void(s=8)}}}()):40===n(c)?(s=2,void c++):void(s=1)}function i(t){for(t||(t=n(c++)),s=5;c<e.length;c++){let r=e.charCodeAt(c);switch(Ye(r)){case t:return void c++;case Qe:if(Fe(r))return c+=Ze(e,c,r),void(s=6);break;case 92:if(c===e.length-1)break;let o=n(c+1);Fe(o)?c+=Ze(e,c+1,o):Ge(r,o)&&(c=ot(e,c)-1)}}}let s,a=(e=String(e||"")).length,l=Je(n(0)),c=l;for(;c<a;){let a=e.charCodeAt(c);switch(Ye(a)){case Qe:s=13,c=nt(e,c+1);break;case 34:i();break;case 35:Ue(n(c+1))||Ge(n(c+1),n(c+2))?(s=4,c=it(e,c+1)):(s=9,c++);break;case 39:i();break;case 40:s=21,c++;break;case 41:s=22,c++;break;case 43:We(a,n(c+1),n(c+2))?r():(s=9,c++);break;case 44:s=18,c++;break;case 45:We(a,n(c+1),n(c+2))?r():45===n(c+1)&&62===n(c+2)?(s=15,c+=3):He(a,n(c+1),n(c+2))?o():(s=9,c++);break;case 46:We(a,n(c+1),n(c+2))?r():(s=9,c++);break;case 47:42===n(c+1)?(s=25,c=e.indexOf("*/",c+2),c=-1===c?e.length:c+2):(s=9,c++);break;case 58:s=16,c++;break;case 59:s=17,c++;break;case 60:33===n(c+1)&&45===n(c+2)&&45===n(c+3)?(s=14,c+=4):(s=9,c++);break;case 64:He(n(c+1),n(c+2),n(c+3))?(s=3,c=it(e,c+1)):(s=9,c++);break;case 91:s=19,c++;break;case 92:Ge(a,n(c+1))?o():(s=9,c++);break;case 93:s=20,c++;break;case 123:s=23,c++;break;case 125:s=24,c++;break;case 131:r();break;case 132:o();break;default:s=9,c++}t(s,l,l=c)}}var kt,St=(kt=$e(),((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of Le(t))!Te.call(e,n)&&"default"!==n&&xe(e,n,{get:()=>t[n],enumerable:!(r=Ae(t,n))||r.enumerable});return e})((e=>xe(e,"__esModule",{value:!0}))(xe(null!=kt?we(Ee(kt)):{},"default",{value:kt,enumerable:!0})),kt)),vt=new Set(["Atrule","Selector","Declaration"]),bt={};_e(bt,{safe:()=>Et,spec:()=>Lt});var Ct=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},wt=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],xt=wt.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function At(e){let t=new Set(e.map((([e,t])=>Ct(e)<<16|Ct(t))));return function(e,n,r){let o=Ct(n,r),i=r.charCodeAt(0);return(45===i&&1!==n&&2!==n&&15!==n||43===i?t.has(e<<16|i<<8):t.has(e<<16|o))&&this.emit(" ",13,!0),o}}var Lt=At(wt),Et=At(xt);function Tt(e,t){if("function"!=typeof t)e.children.forEach(this.node,this);else{let n=null;e.children.forEach((e=>{null!==n&&t.call(this,n),this.node(e),n=e}))}}function Pt(e){yt(e,((t,n,r)=>{this.token(t,e.slice(n,r))}))}var _t={};_e(_t,{AnPlusB:()=>zt,Atrule:()=>Ut,AtrulePrelude:()=>Vt,AttributeSelector:()=>Ht,Block:()=>Wt,Brackets:()=>Jt,CDC:()=>Kt,CDO:()=>Qt,ClassSelector:()=>Xt,Combinator:()=>en,Comment:()=>tn,Declaration:()=>nn,DeclarationList:()=>rn,Dimension:()=>on,Function:()=>sn,Hash:()=>an,IdSelector:()=>hn,Identifier:()=>cn,MediaFeature:()=>dn,MediaQuery:()=>pn,MediaQueryList:()=>fn,NestingSelector:()=>gn,Nth:()=>kn,Number:()=>Sn,Operator:()=>vn,Parentheses:()=>bn,Percentage:()=>wn,PseudoClassSelector:()=>An,PseudoElementSelector:()=>En,Ratio:()=>Tn,Raw:()=>On,Rule:()=>In,Selector:()=>Nn,SelectorList:()=>$n,String:()=>Un,StyleSheet:()=>Vn,TypeSelector:()=>Gn,UnicodeRange:()=>Hn,Url:()=>Zn,Value:()=>er,WhiteSpace:()=>tr});var Ot=43,It=45,Rt=110,Nt=!0;function Mt(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===Ot||r===It)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)je(this.charCodeAt(n))||this.error("Integer is expected",n)}function $t(e){return Mt.call(this,0,e)}function jt(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case Rt:n="N is expected";break;case It:n="HyphenMinus is expected"}this.error(n,this.tokenStart+e)}}function Dt(){let e=0,t=0,n=this.tokenType;for(;13===n||25===n;)n=this.lookupType(++e);if(10!==n){if(!this.isDelim(Ot,e)&&!this.isDelim(It,e))return null;t=this.isDelim(Ot,e)?Ot:It;do{n=this.lookupType(++e)}while(13===n||25===n);10!==n&&(this.skip(e),$t.call(this,Nt))}return e>0&&this.skip(e),0===t&&(n=this.charCodeAt(this.tokenStart),n!==Ot&&n!==It&&this.error("Number sign is expected")),$t.call(this,0!==t),t===It?"-"+this.consume(10):this.consume(10)}function Bt(){let e=this.tokenStart,t=null,n=null;if(10===this.tokenType)$t.call(this,!1),n=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,It))switch(t="-1",jt.call(this,1,Rt),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Dt.call(this);break;case 3:jt.call(this,2,It),this.next(),this.skipSC(),$t.call(this,Nt),n="-"+this.consume(10);break;default:jt.call(this,2,It),Mt.call(this,3,Nt),this.next(),n=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(Ot)&&1===this.lookupType(1)){let r=0;switch(t="1",this.isDelim(Ot)&&(r=1,this.next()),jt.call(this,0,Rt),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Dt.call(this);break;case 2:jt.call(this,1,It),this.next(),this.skipSC(),$t.call(this,Nt),n="-"+this.consume(10);break;default:jt.call(this,1,It),Mt.call(this,2,Nt),this.next(),n=this.substrToCursor(e+r+1)}}else if(12===this.tokenType){let r=this.charCodeAt(this.tokenStart),o=r===Ot||r===It,i=this.tokenStart+o;for(;i<this.tokenEnd&&je(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),jt.call(this,i-this.tokenStart,Rt),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=Dt.call(this)):(jt.call(this,i-this.tokenStart+1,It),i+2===this.tokenEnd?(this.next(),this.skipSC(),$t.call(this,Nt),n="-"+this.consume(10)):(Mt.call(this,i-this.tokenStart+2,Nt),this.next(),n=this.substrToCursor(i+1)))}else this.error();return null!==t&&t.charCodeAt(0)===Ot&&(t=t.substr(1)),null!==n&&n.charCodeAt(0)===Ot&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function zt(e){if(e.a){let t=("+1"===e.a||"1"===e.a?"n":"-1"===e.a&&"-n")||e.a+"n";if(e.b){let n="-"===e.b[0]||"+"===e.b[0]?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}function Ut(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}function Vt(e){this.children(e)}function Ft(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?61!==this.charCodeAt(this.tokenStart+1)?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function qt(){let e=this.tokenStart,t=this.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),61!==t&&(this.isDelim(61)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}function Gt(){let e,t=this.tokenStart,n=null,r=null,o=null;return this.eat(19),this.skipSC(),e=Ft.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(n=qt.call(this),this.skipSC(),r=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:n,value:r,flags:o}}function Ht(e){this.token(9,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(1,e.flags),this.token(9,"]")}function Wt(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}function Jt(e){this.token(9,"["),this.children(e),this.token(9,"]")}function Kt(){this.token(15,"--\x3e")}function Qt(){this.token(14,"\x3c!--")}function Yt(){return this.eatDelim(46),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function Xt(e){this.token(9,"."),this.token(1,e.name)}function Zt(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent("deep"),this.eatDelim(47);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function en(e){this.tokenize(e.name)}function tn(e){this.token(25,"/*"+e.value+"*/")}function nn(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function rn(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}function on(e){this.token(12,e.value+e.unit)}function sn(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}function an(e){this.token(4,"#"+e.value)}function ln(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function cn(e){this.token(1,e.name)}function un(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function hn(e){this.token(9,"#"+e.name)}function dn(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}function pn(e){this.children(e)}function fn(e){this.children(e,(()=>this.token(18,",")))}function mn(){let e=this.tokenStart;return this.eatDelim(38),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function gn(){this.token(9,"&")}function yn(){this.skipSC();let e,t=this.tokenStart,n=t,r=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(t,n),nth:e,selector:r}}function kn(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}function Sn(e){this.token(10,e.value)}function vn(e){this.tokenize(e.value)}function bn(e){this.token(21,"("),this.children(e),this.token(22,")")}function Cn(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function wn(e){this.token(11,e.value+"%")}function xn(){let e,t,n=this.tokenStart,r=null;return this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function An(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function Ln(){let e,t,n=this.tokenStart,r=null;return this.eat(16),this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function En(e){this.token(16,":"),this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function Tn(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}function Pn(){return this.tokenIndex>0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function _n(e,t,n){let r,o=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),r=n&&this.tokenStart>o?Pn.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(o,r),value:this.substring(o,r)}}function On(e){this.tokenize(e.value)}function In(e){this.node(e.prelude),this.node(e.block)}function Rn(){let e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function Nn(e){this.children(e)}function Mn(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function $n(e){this.children(e,(()=>this.token(18,",")))}var jn=92,Dn=34;function Bn(e){let t=e.length,n=e.charCodeAt(0),r=n===Dn||39===n?1:0,o=1===r&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let n=r;n<=o;n++){let r=e.charCodeAt(n);if(r===jn){if(n===o){n!==t-1&&(i=e.substr(n+1));break}if(r=e.charCodeAt(++n),Ge(jn,r)){let t=n-1,r=ot(e,t);n=r-1,i+=lt(e.substring(t+1,r))}else 13===r&&10===e.charCodeAt(n+1)&&n++}else i+=e[n]}return i}function zn(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Bn(this.consume(5))}}function Un(e){this.token(5,function(e){let t=Dn,n="",r=!1;for(let o=0;o<e.length;o++){let i=e.charCodeAt(o);0!==i?i<=31||127===i?(n+="\\"+i.toString(16),r=!0):i===t||i===jn?(n+="\\"+e.charAt(o),r=!1):(r&&(De(i)||qe(i))&&(n+=" "),n+=e.charAt(o),r=!1):n+="\ufffd"}return'"'+n+'"'}(e.value))}function Vn(e){this.children(e)}function Fn(){1!==this.tokenType&&!1===this.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.next()}function qn(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),Fn.call(this)):(Fn.call(this),this.isDelim(124)&&(this.next(),Fn.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Gn(e){this.tokenize(e.name)}function Hn(e){this.tokenize(e.value)}var Wn=32,Jn=92,Kn=34,Qn=39,Yn=40,Xn=41;function Zn(e){this.token(7,function(e){let t="",n=!1;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);0!==o?o<=31||127===o?(t+="\\"+o.toString(16),n=!0):o===Wn||o===Jn||o===Kn||o===Qn||o===Yn||o===Xn?(t+="\\"+e.charAt(r),n=!1):(n&&De(o)&&(t+=" "),t+=e.charAt(r),n=!1):t+="\ufffd"}return"url("+t+")"}(e.value))}function er(e){this.children(e)}function tr(e){this.token(13,e.value)}var nr=function(e){let t=new Map;for(let n in e.node){let r=e.node[n];"function"==typeof(r.generate||r)&&t.set(n,r.generate||r)}return function(e,n){let r="",o=0,i={node(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(s,e)},tokenBefore:Et,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&92===t.charCodeAt(0)&&this.emit("\n",13,!0)},emit(e){r+=e},result:()=>r};n&&("function"==typeof n.decorator&&(i=n.decorator(i)),n.sourceMap&&(i=function(e){let t=new St.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},o={line:1,column:0},i={generated:o},s=1,a=0,l=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&vt.has(e.type)){let c=e.loc.start.line,u=e.loc.start.column-1;(r.line!==c||r.column!==u)&&(r.line=c,r.column=u,n.line=s,n.column=a,l&&(l=!1,(n.line!==o.line||n.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}c.call(this,e),l&&vt.has(e.type)&&(o.line=s,o.column=a)};let u=e.emit;e.emit=function(e,t,n){for(let t=0;t<e.length;t++)10===e.charCodeAt(t)?(s++,a=0):a++;u(e,t,n)};let h=e.result;return e.result=function(){return l&&t.addMapping(i),{css:h(),map:t}},e}(i)),n.mode in bt&&(i.tokenBefore=bt[n.mode]));let s={node:e=>i.node(e),children:Tt,token:(e,t)=>i.token(e,t),tokenize:Pt};return i.node(e),i.result()}}({node:_t}),rr=null,or=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return or.createItem(e)}allocateCursor(e,t){let n;return null!==rr?(n=rr,rr=rr.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=rr,rr=e}updateCursors(e,t,n,r){let{cursor:o}=this;for(;null!==o;)o.prev===e&&(o.prev=t),o.next===n&&(o.next=r),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;null!==e;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;null!==t;t=t.next)e++;return e}get isEmpty(){return null===this.head}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let n of e){let e=or.createItem(n);null!==t?t.next=e:this.head=e,e.prev=t,t=e}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;null!==n.next;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;null!==n.prev;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r,o=this.allocateCursor(null,this.head),i=t;for(;null!==o.next;)r=o.next,o.next=r.next,i=e.call(n,i,r.data,r,this);return this.releaseCursor(),i}reduceRight(e,t,n=this){let r,o=this.allocateCursor(this.tail,null),i=t;for(;null!==o.prev;)r=o.prev,o.prev=r.prev,i=e.call(n,i,r.data,r,this);return this.releaseCursor(),i}some(e,t=this){for(let n=this.head;null!==n;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e,t=this){let n=new or;for(let r=this.head;null!==r;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e,t=this){let n=new or;for(let r=this.head;null!==r;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t,n=this){if(null===e)return;let r=this.allocateCursor(null,e);for(;null!==r.next;){let e=r.next;if(r.next=e.next,t.call(n,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(null===e)return;let r=this.allocateCursor(e,null);for(;null!==r.prev;){let e=r.prev;if(r.prev=e.prev,t.call(n,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new or;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(or.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(or.createItem(e))}insert(e,t=null){if(null!==t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(or.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(or.createItem(e))}pop(){return null!==this.tail?this.remove(this.tail):null}unshift(e){this.prepend(or.createItem(e))}shift(){return null!==this.head?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function ir({source:e,line:t,column:n},r){function o(e,t){return i.slice(e,t).map(((t,n)=>String(e+n+1).padStart(l)+" |"+t)).join("\n")}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-r)-1,a=Math.min(t+r,i.length+1),l=Math.max(4,String(a).length)+1,c=0;(n+=3*(i[t-1].substr(0,n-1).match(/\t/g)||[]).length)>100&&(c=n-60+3,n=58);for(let e=s;e<=a;e++)e>=0&&e<i.length&&(i[e]=i[e].replace(/\t/g,"    "),i[e]=(c>0&&i[e].length>c?"\u2026":"")+i[e].substr(c,98)+(i[e].length>c+100-1?"\u2026":""));return[o(s,t),new Array(n+l+2).join("-")+"^",o(t,a)].filter(Boolean).join("\n")}function sr(e,t,n,r,o){return Object.assign(function(e,t){let n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}\n`)}})}("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment:e=>ir({source:t,line:r,column:o},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+ir({source:t,line:r,column:o},2)}})}function ar(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let o=e.getNode.call(this,r);if(void 0===o)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,r),n=!1),t.push(o)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var lr=()=>{};function cr(e){return function(){return this[e]()}}function ur(e){let t=Object.create(null);for(let n in e){let r=e[n],o=r.parse||r;o&&(t[n]=o)}return t}var hr={parse(){return this.createSingleNodeList(this.SelectorList())}},dr={parse(){return this.createSingleNodeList(this.Selector())}},pr={parse(){return this.createSingleNodeList(this.Identifier())}},fr={parse(){return this.createSingleNodeList(this.Nth())}},mr={dir:pr,has:hr,lang:pr,matches:hr,is:hr,"-moz-any":hr,"-webkit-any":hr,where:hr,not:hr,"nth-child":fr,"nth-last-child":fr,"nth-last-of-type":fr,"nth-of-type":fr,slotted:dr,host:dr,"host-context":dr},gr={};_e(gr,{AnPlusB:()=>Bt,AttributeSelector:()=>Gt,ClassSelector:()=>Yt,Combinator:()=>Zt,IdSelector:()=>un,Identifier:()=>ln,NestingSelector:()=>mn,Nth:()=>yn,Percentage:()=>Cn,PseudoClassSelector:()=>xn,PseudoElementSelector:()=>Ln,Raw:()=>_n,Selector:()=>Rn,SelectorList:()=>Mn,String:()=>zn,TypeSelector:()=>qn});var yr=function(e){let t="",n="<unknown>",r=!1,o=lr,i=!1,s=new dt,a=Object.assign(new gt,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:ur(e.atrule),pseudo:ur(e.pseudo),node:ur(e.node)};for(let n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=cr(e.parseContext[n])}return{config:t,...t,...t.node}}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:ar,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>123===e?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>123===e||59===e?1:0,consumeUntilExclamationMarkOrSemicolon:e=>33===e||59===e?1:0,consumeUntilSemicolonIncluded:e=>59===e?2:0,createList:()=>new or,createSingleNodeList:e=>(new or).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){let n=this.tokenIndex;try{return e.call(this)}catch(e){if(i)throw e;let r=t.call(this,n);return i=!0,o(e,r),i=!1,r}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),13!==t)return t}while(0!==t);return 0},charCodeAt:e=>e>=0&&e<t.length?t.charCodeAt(e):0,substring:(e,n)=>t.substring(e,n),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,n)=>et(t,e,n),cmpStr:(e,n,r)=>tt(t,e,n,r),consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let n=t.substring(this.tokenStart,st(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){let t=ct[e].slice(0,-6).replace(/-/g," ").replace(/^./,(e=>e.toUpperCase())),n=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,r=this.tokenStart;switch(e){case 1:2===this.tokenType||7===this.tokenType?(r=this.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case 4:this.isDelim(35)&&(this.next(),r++,n="Name is expected");break;case 11:10===this.tokenType&&(r=this.tokenEnd,n="Percent sign is expected")}this.error(n,r)}this.next()},eatIdent(e){(1!==this.tokenType||!1===this.lookupValue(0,e))&&this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation:(e,t)=>r?s.getLocationRange(e,t,n):null,getLocationFromList(e){if(r){let t=this.getFirstListNode(e),r=this.getLastListNode(e);return s.getLocationRange(null!==t?t.loc.start.offset-s.startOffset:this.tokenStart,null!==r?r.loc.end.offset-s.startOffset:this.tokenStart,n)}return null},error(e,n){let r=typeof n<"u"&&n<t.length?s.getLocation(n):this.eof?s.getLocation(function(e,t){for(;t>=0&&qe(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):s.getLocation(this.tokenStart);throw new sr(e||"Unexpected input",t,r.offset,r.line,r.column)}});return Object.assign((function(e,l){t=e,l=l||{},a.setSource(t,yt),s.setSource(t,l.offset,l.line,l.column),n=l.filename||"<unknown>",r=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:lr,i=!1,a.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),a.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),a.parseValue=!("parseValue"in l)||Boolean(l.parseValue),a.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);let{context:c="default",onComment:u}=l;if(!(c in a.context))throw new Error("Unknown context `"+c+"`");"function"==typeof u&&a.forEachToken(((e,n,r)=>{if(25===e){let e=a.getLocation(n,r),o=tt(t,r-2,r,"*/")?t.slice(n+2,r-2):t.slice(n+2,r);u(o,e)}}));let h=a.context[c].call(a,l);return a.eof||a.error(),h}),{SyntaxError:sr,config:a.config})}({parseContext:{default:"SelectorList",selectorList:"SelectorList",selector:"Selector"},scope:{Selector:{onWhiteSpace:function(e,t){null!==t.last&&"Combinator"!==t.last.type&&null!==e&&"Combinator"!==e.type&&t.push({type:"Combinator",loc:null,name:" "})},getNode:function(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return 16===this.lookupType(1)?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:46===this.charCodeAt(this.tokenStart)&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case 43:case 62:case 126:case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector();case 38:return this.NestingSelector()}}}}},atrule:{},pseudo:mr,node:gr}),kr=(e,t)=>e.a===t.a?e.b===t.b?e.c-t.c:e.b-t.b:e.a-t.a,Sr=(e,t)=>0===kr(e,t),vr=(e,t)=>kr(e,t)>0,br=(e,t)=>kr(e,t)<0,Cr=(e,t="ASC")=>{let n=e.sort(kr);return"DESC"===t?n.reverse():n},wr=(...e)=>Cr(e,"ASC"),xr=(...e)=>Cr(e,"DESC"),Ar=(...e)=>xr(...e)[0],Lr=e=>{let t={a:0,b:0,c:0};return e.children.forEach((e=>{switch(e.type){case"IdSelector":t.a+=1;break;case"AttributeSelector":case"ClassSelector":t.b+=1;break;case"PseudoClassSelector":switch(e.name.toLowerCase()){case"where":break;case"is":case"matches":case"-webkit-any":case"-moz-any":case"any":case"not":case"has":if(e.children){let n=Ar(...Er(e.children.first));t.a+=n.a,t.b+=n.b,t.c+=n.c}break;case"nth-child":case"nth-last-child":if(t.b+=1,e.children.first.selector){let n=Ar(...Er(e.children.first.selector));t.a+=n.a,t.b+=n.b,t.c+=n.c}break;case"host-context":case"host":if(t.b+=1,e.children){let n={type:"Selector",children:[]},r=!1;e.children.first.children.forEach((e=>!r&&("Combinator"===e.type?(r=!0,!1):void n.children.push(e))));let o=Er(n)[0];t.a+=o.a,t.b+=o.b,t.c+=o.c}break;case"after":case"before":case"first-letter":case"first-line":t.c+=1;break;default:t.b+=1}break;case"PseudoElementSelector":switch(e.name){case"slotted":if(t.c+=1,e.children){let n={type:"Selector",children:[]},r=!1;e.children.first.children.forEach((e=>!r&&("Combinator"===e.type?(r=!0,!1):void n.children.push(e))));let o=Er(n)[0];t.a+=o.a,t.b+=o.b,t.c+=o.c}break;case"view-transition-group":case"view-transition-image-pair":case"view-transition-old":case"view-transition-new":if(e.children&&"*"===e.children.first.value)break;t.c+=1;break;default:t.c+=1}break;case"TypeSelector":let n=e.name;n.includes("|")&&(n=n.split("|")[1]),"*"!==n&&(t.c+=1)}})),new Tr(t,e)},Er=e=>{if(!e)return[];let t=(e=>{if("string"==typeof e||e instanceof String)try{return yr(e,{context:"selectorList"})}catch(t){throw new TypeError(`Could not convert passed in source '${e}' to SelectorList: ${t.message}`)}if(e instanceof Object){if(e.type&&["Selector","SelectorList"].includes(e.type))return e;if(e.type&&"Raw"===e.type)try{return yr(e.value,{context:"selectorList"})}catch(e){throw new TypeError(`Could not convert passed in source to SelectorList: ${e.message}`)}throw new TypeError("Passed in source is an Object but no AST / AST of the type Selector or SelectorList")}throw new TypeError("Passed in source is not a String nor an Object. I don't know what to do with it.")})(e);if("Selector"===t.type)return[Lr(e)];if("SelectorList"===t.type){let e=[];return t.children.forEach((t=>{let n=Lr(t);e.push(n)})),e}},Tr=class{constructor(e,t=null){this.value=e,this.selector=t}get a(){return this.value.a}set a(e){throw new Error("Manipulating the port of the specificity directly is not allowed. Instead, directly set a new value")}get b(){return this.value.b}set b(e){throw new Error("Manipulating the port of the specificity directly is not allowed. Instead, directly set a new value")}get c(){return this.value.c}set c(e){throw new Error("Manipulating the port of the specificity directly is not allowed. Instead, directly set a new value")}selectorString(){return"string"==typeof this.selector||this.selector instanceof String?this.selector:this.selector instanceof Object&&"Selector"===this.selector.type?nr(this.selector):""}toObject(){return this.value}toArray(){return[this.value.a,this.value.b,this.value.c]}toString(){return`(${this.value.a},${this.value.b},${this.value.c})`}toJSON(){return{selector:this.selectorString(),asObject:this.toObject(),asArray:this.toArray(),asString:this.toString()}}isEqualTo(e){return Sr(this,e)}isGreaterThan(e){return vr(this,e)}isLessThan(e){return br(this,e)}static calculate(e){return Er(e)}static compare(e,t){return kr(e,t)}static equals(e,t){return Sr(e,t)}static lessThan(e,t){return br(e,t)}static greaterThan(e,t){return vr(e,t)}static min(...e){return((...e)=>wr(...e)[0])(...e)}static max(...e){return Ar(...e)}static sortAsc(...e){return wr(...e)}static sortDesc(...e){return xr(...e)}};const Pr=e=>{const t=new Map,n=e=>{const n=t.get(e);if(a(n))return n;{const n=Tr.calculate(e)[0];return t.set(e,n),n}};return(e=>{const t=d.call(e,0);return t.sort(((e,t)=>{const r=n(e.selector),o=n(t.selector);return Tr.compare(r,o)})),t})(e)},_r=e=>{const t={};return k(e,(r=>{const o=e.getPropertyValue(r);n(o)&&(t[r]=o)})),t},Or=e=>({selector:e.selectorText,styles:_r(e.style)}),Ir=e=>{const t=e.cssRules;return C(t,(e=>(e=>e.type===window.CSSRule.IMPORT_RULE)(e)&&a(e.styleSheet)?Ir(e.styleSheet):(e=>e.type===window.CSSRule.STYLE_RULE)(e)?[Or(e)]:[]))},Rr=(e,t)=>((e,t)=>{const n={};var r;return((e,t,n,r)=>{A(e,((e,o)=>{(t(e,o)?n:r)(e,o)}))})(e,t,(r=n,(e,t)=>{r[t]=e}),u),n})(v(t,((e,t)=>({...e,...t.styles})),{}),((t,n)=>!m(e.dom.style,n))),Nr=(e,t,n)=>{const r=(e=>{const t=(e=>C(e,(e=>(e=>-1!==e.selector.indexOf(","))(e)?(e=>{const t=e.selector.split(/,(?![^(]*\))/g);return y(t,(t=>{const n=t.trim();return{...e,selector:n}}))})(e):[e])))(e);return Pr(t)})(e);((e,t)=>{const n=document.createTreeWalker(e.dom,NodeFilter.SHOW_ELEMENT);for(;a(n.nextNode());){const e=se(n.currentNode),r=S(t,(t=>ae(e,t.selector)));if(r.length>0){const t=Rr(e,r);fe(e,t)}}})(t,r)},Mr=e=>{return t=(e=>{const t=e.dom.styleSheets;return Array.prototype.slice.call(t)})(e),C(t,Ir);var t},$r=(e,t,n,r)=>{const o=e(Mr(t));Nr(o,n)},jr=(e,t,n)=>{n.trim().length>0&&he(e,t,n)},Dr=(e,t,n,r)=>{const o=(e=>{const t=ie("div");return he(t,"contentEditable","false"),ge(t,ke),"inline"!==e.size&&ge(t,e.size),t})(e),i=ie("iframe");var s,a;return jr(i,"src",e.source.value),jr(i,"title",e.title),jr(i,"name",e.name),jr(i,"longdesc",e.descriptionUrl.value),(s=e,a="dimensions",((e,t)=>x.call(e,t))(s,a)?h.from(s[a]):h.none()).each((e=>{jr(i,"width",e.width),jr(i,"height",e.height)})),e.showBorder||he(i,"frameborder","0"),he(i,"scrolling",e.scrollbar?"yes":"no"),ue(o,i),t()&&((e,t,n)=>{const r=ie("div");ue(r,t);const o=e();n().fold((()=>{((e,t,n)=>{$r((e=>((e,t)=>S(e,(e=>((e,t)=>((e,t)=>""===t||e.length>=t.length&&e.substr(0,0+t.length)===t)(e,t))(e.selector,t))))(e,n)),e,t)})(o,r,".tiny-pageembed")}),(e=>{const t=y(e,(e=>`.${e}`));((e,t,n)=>{$r((e=>((e,t)=>S(e,(e=>m(t,e.selector))))(e,n)),e,t)})(o,r,t)}));const i=((e,t)=>{const n=void 0===t?document:t.dom;return 1!==(r=n).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:y(n.querySelectorAll(e),se);var r})("*[style]",r);k(i,(e=>{pe(e,"style").each((t=>he(e,"data-mce-style",t)))}))})(n,o,r),(e=>{const t=ie("div"),n=se(e.dom.cloneNode(!0));return ue(t,n),(e=>e.dom.innerHTML)(t)})(o)},Br=e=>{const t=[{text:"Inline Value",value:"inline"}].concat(te(e)),n=r=>({title:"Insert/Edit Iframe",body:{type:"tabpanel",tabs:[{title:"General",items:b([[{name:"source",type:"urlinput",filetype:"file",label:"Source"}],t.length>1?[{label:"Size",type:"listbox",name:"size",items:t}]:[],"inline"===r.size?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},{title:"Advanced",items:[{name:"name",type:"input",label:"Name"},{name:"title",type:"input",label:"Title"},{name:"descriptionUrl",type:"urlinput",label:"Long description URL"},{type:"label",label:"Border",items:[{type:"checkbox",name:"showBorder",label:"Show iframe border"}]},{type:"label",label:"Scrollbar",items:[{type:"checkbox",name:"scrollbar",label:"Enable scrollbar"}]}]}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"submit",text:"Save",primary:!0}],onChange:(e,{name:t})=>{"size"===t&&(e.redial(n(e.getData())),e.focus("size"))},onSubmit:t=>{const n=t.getData();if(n.source.value.length>0){const t=()=>{if((e=>e.options.isSet("tiny_pageembed_classes"))(e)){const t=te(e);return h.some(y(t,(e=>e.value)))}return h.none()},r=Dr(n,(()=>ne(e)),(()=>se(e.getDoc())),t);e.insertContent(r),e.nodeChanged()}t.close()},initialData:r}),r=e.selection.getNode(),o=(i=r,s={source:{value:""},size:"inline",dimensions:{width:"350px",height:"260px"},name:"",title:"",descriptionUrl:{value:""},showBorder:!0,scrollbar:!1},a=t,h.from(i).map(se).filter(Se).bind(ce).filter((e=>le(e)&&"iframe"===e.dom.nodeName.toLowerCase())).fold((()=>s),(e=>{const t=(e,t,n)=>pe(e,t).getOr(n);return{source:{value:t(e,"src",s.source.value)},size:(e=>{const t=se(e);return v(a,((e,n)=>ye(t,n.value)?n.value:e),"inline")})(i),dimensions:{width:t(e,"width",s.dimensions.width),height:t(e,"height",s.dimensions.height)},name:t(e,"name",s.name),title:t(e,"title",s.title),descriptionUrl:{value:t(e,"longdesc",s.descriptionUrl.value)},showBorder:pe(e,"frameborder").map((e=>"0"!==e.toLowerCase())).getOr(s.showBorder),scrollbar:pe(e,"scrolling").map((e=>"yes"===e.toLowerCase())).getOr(s.scrollbar)}})));var i,s,a;e.windowManager.open(n(o))};((e,t)=>{const{i18n:n=!0}=t;n&&tinymce.PluginManager.requireLangPack(e,"ar,bg-BG,ca,cs,da,de,el,es,eu,fa,fi,fr-FR,he-IL,hi,hr,hu-HU,id,it,ja,kk,ko-KR,ms,nb-NO,nl,pl,pt-BR,pt-PT,ro,ru,sk,sl-SI,sv-SE,th-TH,tr,uk,vi,zh-CN,zh-TW"),tinymce.PluginManager.add(e,X(e,t))})("pageembed",{setup:(e,t)=>(((e,t)=>{const n=e.options.register;n("tiny_pageembed_css_url",{processor:"string",default:t+"/css/empa30.css"}),n("tiny_pageembed_classes",{processor:"object[]",default:Z}),n("tiny_pageembed_inline_styles",{processor:"boolean",default:!1})})(e,t),(e=>{e.on("click keyup touchend",(()=>{h.from(e.selection.getNode()).map(se).each((e=>{Se(e)&&(e=>{const t=e.dom;return!(!t||!t.hasAttribute)&&t.hasAttribute("data-mce-selected")})(e)&&he(e,"data-mce-selected","2")}))})),e.on("PreInit",(()=>{e.parser.addNodeFilter("div",be),e.serializer.addNodeFilter("div",Ce)}))})(e),(e=>{e.ui.registry.addToggleButton("pageembed",{icon:"embed-page",tooltip:"Embed iframe",onAction:t=>{Br(e)},onSetup:t=>{const n=n=>{t.setEnabled(e.selection.isEditable()),t.setActive(!e.readonly&&n.element.classList.contains(ke))};return e.on("nodechange",n),()=>e.off("nodechange",n)}}),e.ui.registry.addMenuItem("pageembed",{text:"Insert/edit iframe",icon:"embed-page",onAction:t=>{Br(e)},onSetup:t=>{const n=()=>{t.setEnabled(e.selection.isEditable())};return e.on("nodechange",n),n(),()=>e.off("nodechange",n)}})})(e),((e,t)=>{const n=re(e)||t+"/css/empa30.css";e.on("PreInit",(()=>{const t="pageembed/css/empa30.css";if(tinymce.Resource.has(t)){const n=tinymce.Resource.get(t);(e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader)(e).loadRawCss(t,n)}else e.contentCSS.push(e.documentBaseURI.toAbsolute(n))}))})(e,t),{})})}();