@brainfish-ai/web-tracker 0.0.27 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tracker.js CHANGED
@@ -1,2 +1,2 @@
1
- var __defProp=Object.defineProperty,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__publicField=(e,t,s)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,s);!function(){"use strict";const e=Object.create(null);e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);Object.keys(e).forEach(s=>{t[e[s]]=s});const s={type:"error",data:"parser error"},r="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),n="function"==typeof ArrayBuffer,i=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,o=({type:t,data:s},o,l)=>r&&s instanceof Blob?o?l(s):a(s,l):n&&(s instanceof ArrayBuffer||i(s))?o?l(s):a(new Blob([s]),l):l(e[t]+(s||"")),a=(e,t)=>{const s=new FileReader;return s.onload=function(){const e=s.result.split(",")[1];t("b"+(e||""))},s.readAsDataURL(e)};function l(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let c;const h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let $b=0;$b<64;$b++)u[h.charCodeAt($b)]=$b;const p="function"==typeof ArrayBuffer,d=(e,r)=>{if("string"!=typeof e)return{type:"message",data:m(e,r)};const n=e.charAt(0);if("b"===n)return{type:"message",data:f(e.substring(1),r)};return t[n]?e.length>1?{type:t[n],data:e.substring(1)}:{type:t[n]}:s},f=(e,t)=>{if(p){const s=(e=>{let t,s,r,n,i,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);const c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)s=u[e.charCodeAt(t)],r=u[e.charCodeAt(t+1)],n=u[e.charCodeAt(t+2)],i=u[e.charCodeAt(t+3)],h[l++]=s<<2|r>>4,h[l++]=(15&r)<<4|n>>2,h[l++]=(3&n)<<6|63&i;return c})(e);return m(s,t)}return{base64:!0,data:e}},m=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,g=String.fromCharCode(30);function y(){return new TransformStream({transform(e,t){!function(e,t){r&&e.data instanceof Blob?e.data.arrayBuffer().then(l).then(t):n&&(e.data instanceof ArrayBuffer||i(e.data))?t(l(e.data)):o(e,!1,e=>{c||(c=new TextEncoder),t(c.encode(e))})}(e,s=>{const r=s.length;let n;if(r<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,r);else if(r<65536){n=new Uint8Array(3);const e=new DataView(n.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{n=new Uint8Array(9);const e=new DataView(n.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(n[0]|=128),t.enqueue(n),t.enqueue(s)})}})}let w;function b(e){return e.reduce((e,t)=>e+t.length,0)}function v(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let r=0;for(let n=0;n<t;n++)s[n]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),s}function C(e){if(e)return function(e){for(var t in C.prototype)e[t]=C.prototype[t];return e}(e)}C.prototype.on=C.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},C.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<r.length;n++)if((s=r[n])===t||s.fn===t){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},C.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,t)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},C.prototype.hasListeners=function(e){return!!this.listeners(e).length};const S="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),k="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function I(e,...t){return t.reduce((t,s)=>(e.hasOwnProperty(s)&&(t[s]=e[s]),t),{})}const x=k.setTimeout,O=k.clearTimeout;function A(e,t){t.useNativeTimers?(e.setTimeoutFn=x.bind(k),e.clearTimeoutFn=O.bind(k)):(e.setTimeoutFn=k.setTimeout.bind(k),e.clearTimeoutFn=k.clearTimeout.bind(k))}function E(e){return"string"==typeof e?function(e){let t=0,s=0;for(let r=0,n=e.length;r<n;r++)t=e.charCodeAt(r),t<128?s+=1:t<2048?s+=2:t<55296||t>=57344?s+=3:(r++,s+=4);return s}(e):Math.ceil(1.33*(e.byteLength||e.size))}function R(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class M extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class N extends C{constructor(e){super(),this.writable=!1,A(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new M(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=d(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}(e);return t.length?"?"+t:""}}class _ extends N{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const s=e.split(g),r=[];for(let n=0;n<s.length;n++){const e=d(s[n],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const s=e.length,r=new Array(s);let n=0;e.forEach((e,i)=>{o(e,!1,e=>{r[i]=e,++n===s&&t(r.join(g))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=R()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let T=!1;try{T="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Kb){}const P=T;function L(){}class F extends _{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let s=location.port;s||(s=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class D extends C{constructor(e,t,s){super(),this.createRequest=e,A(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=void 0!==s.data?s.data:null,this._create()}_create(){var e;const t=I(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&s.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(r){}if("POST"===this._method)try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{s.setRequestHeader("Accept","*/*")}catch(r){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var e;3===s.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(s.getResponseHeader("set-cookie"))),4===s.readyState&&(200===s.status||1223===s.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof s.status?s.status:0)},0))},s.send(this._data)}catch(r){return void this.setTimeoutFn(()=>{this._onError(r)},0)}"undefined"!=typeof document&&(this._index=D.requestsCount++,D.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=L,e)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete D.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(D.requestsCount=0,D.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",B);else if("function"==typeof addEventListener){addEventListener("onpagehide"in k?"pagehide":"unload",B,!1)}function B(){for(let e in D.requests)D.requests.hasOwnProperty(e)&&D.requests[e].abort()}const U=function(){const e=j({xdomain:!1});return e&&null!==e.responseType}();function j(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||P))return new XMLHttpRequest}catch(s){}if(!t)try{return new(k[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(s){}}const z="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class V extends N{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=z?{}:I(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(Kb){return this.emitReserved("error",Kb)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;o(s,this.supportsBinary,e=>{try{this.doWrite(s,e)}catch(t){}r&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=R()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const W=k.WebSocket||k.MozWebSocket;const Y={websocket:class extends V{createSocket(e,t,s){return z?new W(e,t,s):t?new W(e,t):new W(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends N{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Kb){return this.emitReserved("error",Kb)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){w||(w=new TextDecoder);const r=[];let n=0,i=-1,o=!1;return new TransformStream({transform(a,l){for(r.push(a);;){if(0===n){if(b(r)<1)break;const e=v(r,1);o=!(128&~e[0]),i=127&e[0],n=i<126?3:126===i?1:2}else if(1===n){if(b(r)<2)break;const e=v(r,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),n=3}else if(2===n){if(b(r)<8)break;const e=v(r,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){l.enqueue(s);break}i=o*Math.pow(2,32)+t.getUint32(4),n=3}else{if(b(r)<i)break;const e=v(r,i);l.enqueue(d(o?e:w.decode(e),t)),n=0}if(0===i||i>e){l.enqueue(s);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),n=y();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();const i=()=>{r.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;this._writer.write(s).then(()=>{r&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends F{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=U&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new D(j,this.uri(),e)}}},G=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function J(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),r=e.indexOf("]");-1!=s&&-1!=r&&(e=e.substring(0,s)+e.substring(s,r).replace(/:/g,";")+e.substring(r,e.length));let n=G.exec(e||""),i={},o=14;for(;o--;)i[Z[o]]=n[o]||"";return-1!=s&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const s=/\/{2,9}/g,r=t.replace(s,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(s[t]=r)}),s}(0,i.query),i}const X="function"==typeof addEventListener&&"function"==typeof removeEventListener,H=[];X&&addEventListener("offline",()=>{H.forEach(e=>e())},!1);class K extends C{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const s=J(e);t.hostname=s.host,t.secure="https"===s.protocol||"wss"===s.protocol,t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=J(t.host).host);A(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},s=e.split("&");for(let r=0,n=s.length;r<n;r++){let e=s[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),X&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},H.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&K.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",K.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const s=this.writeBuffer[t].data;if(s&&(e+=E(s)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,S(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:e,data:t,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(K.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),X&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=H.indexOf(this._offlineEventListener);-1!==e&&H.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}K.protocol=4;class $ extends K{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;K.priorWebsocketSuccess=!1;const r=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!s)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;K.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{s||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function n(){s||(s=!0,c(),t.close(),t=null)}const i=e=>{const s=new Error("probe error: "+e);s.transport=t.name,n(),this.emitReserved("upgradeError",s)};function o(){i("transport closed")}function a(){i("socket closed")}function l(e){t&&e.name!==t.name&&n()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",o),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let q=class extends ${constructor(e,t={}){const s="object"==typeof e?e:t;(!s.transports||s.transports&&"string"==typeof s.transports[0])&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(e=>Y[e]).filter(e=>!!e)),super(e,s)}};const Q="function"==typeof ArrayBuffer,ee=Object.prototype.toString,te="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===ee.call(Blob),se="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===ee.call(File);function re(e){return Q&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||te&&e instanceof Blob||se&&e instanceof File}function ne(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,s=e.length;t<s;t++)if(ne(e[t]))return!0;return!1}if(re(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return ne(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&ne(e[s]))return!0;return!1}function ie(e){const t=[],s=e.data,r=e;return r.data=oe(s,t),r.attachments=t.length,{packet:r,buffers:t}}function oe(e,t){if(!e)return e;if(re(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}if(Array.isArray(e)){const s=new Array(e.length);for(let r=0;r<e.length;r++)s[r]=oe(e[r],t);return s}if("object"==typeof e&&!(e instanceof Date)){const s={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=oe(e[r],t));return s}return e}function ae(e,t){return e.data=le(e.data,t),delete e.attachments,e}function le(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=le(e[s],t);else if("object"==typeof e)for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=le(e[s],t));return e}const ce=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var he,ue;(ue=he||(he={}))[ue.CONNECT=0]="CONNECT",ue[ue.DISCONNECT=1]="DISCONNECT",ue[ue.EVENT=2]="EVENT",ue[ue.ACK=3]="ACK",ue[ue.CONNECT_ERROR=4]="CONNECT_ERROR",ue[ue.BINARY_EVENT=5]="BINARY_EVENT",ue[ue.BINARY_ACK=6]="BINARY_ACK";function pe(e){return"[object Object]"===Object.prototype.toString.call(e)}class de extends C{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===he.BINARY_EVENT;s||t.type===he.BINARY_ACK?(t.type=s?he.EVENT:he.ACK,this.reconstructor=new fe(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!re(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(void 0===he[s.type])throw new Error("unknown packet type "+s.type);if(s.type===he.BINARY_EVENT||s.type===he.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const n=e.substring(r,t);if(n!=Number(n)||"-"!==e.charAt(t))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}s.nsp=e.substring(r,t)}else s.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const s=e.charAt(t);if(null==s||Number(s)!=s){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!de.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case he.CONNECT:return pe(t);case he.DISCONNECT:return void 0===t;case he.CONNECT_ERROR:return"string"==typeof t||pe(t);case he.EVENT:case he.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ce.indexOf(t[0]));case he.ACK:case he.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class fe{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ae(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const me=Object.freeze(Object.defineProperty({__proto__:null,Decoder:de,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==he.EVENT&&e.type!==he.ACK||!ne(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===he.EVENT?he.BINARY_EVENT:he.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==he.BINARY_EVENT&&e.type!==he.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=ie(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}},get PacketType(){return he},protocol:5},Symbol.toStringTag,{value:"Module"}));function ge(e,t,s){return e.on(t,s),function(){e.off(t,s)}}const ye=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class we extends C{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[ge(e,"open",this.onopen.bind(this)),ge(e,"packet",this.onpacket.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,r,n;if(ye.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:he.EVENT,data:t,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,s=t.pop();this._registerAckCallback(e,s),i.id=e}const o=null===(r=null===(s=this.io.engine)||void 0===s?void 0:s.transport)||void 0===r?void 0:r.writable,a=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n._hasPingExpired());return this.flags.volatile&&!o||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var s;const r=null!==(s=this.flags.timeout)&&void 0!==s?s:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),i=(...e)=>{this.io.clearTimeoutFn(n),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((s,r)=>{const n=(e,t)=>e?r(e):s(t);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(s!==this._queue[0])return;return null!==e?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),s.pending=!1,this._drainQueue()}),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:he.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case he.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case he.EVENT:case he.BINARY_EVENT:this.onevent(e);break;case he.ACK:case he.BINARY_ACK:this.onack(e);break;case he.DISCONNECT:this.ondisconnect();break;case he.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,t.packet({type:he.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:he.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function be(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}be.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+s:e-s}return 0|Math.min(e,this.max)},be.prototype.reset=function(){this.attempts=0},be.prototype.setMin=function(e){this.ms=e},be.prototype.setMax=function(e){this.max=e},be.prototype.setJitter=function(e){this.jitter=e};class ve extends C{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,A(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=t.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new be({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||me;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new q(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=ge(t,"open",function(){s.onopen(),e&&e()}),n=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=ge(t,"error",n);if(!1!==this._timeout){const e=this._timeout,s=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),t.close()},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ge(e,"ping",this.onping.bind(this)),ge(e,"data",this.ondata.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this)),ge(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){S(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new we(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t){if(this.nsps[s].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),null===(s=this.engine)||void 0===s||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Ce={};function Se(e,t){"object"==typeof e&&(t=e,e=void 0);const s=function(e,t="",s){let r=e;s=s||"undefined"!=typeof location&&location,null==e&&(e=s.protocol+"//"+s.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?s.protocol+e:s.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==s?s.protocol+"//"+e:"https://"+e),r=J(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const n=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+n+":"+r.port+t,r.href=r.protocol+"://"+n+(s&&s.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=s.source,n=s.id,i=s.path,o=Ce[n]&&i in Ce[n].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?a=new ve(r,t):(Ce[n]||(Ce[n]=new ve(r,t)),a=Ce[n]),s.query&&!t.query&&(t.query=s.queryKey),a.socket(s.path,t)}Object.assign(Se,{Manager:ve,Socket:we,io:Se,connect:Se});class ke{constructor(e){__publicField(this,"socket"),__publicField(this,"encode"),__publicField(this,"decode"),this.socket=Se(e.baseUrl,{transports:["websocket"],path:"/analytics/ws",auth:{token:e.authToken},query:e.query}),this.encode=e.encoder??(e=>function(e){const t=(new TextEncoder).encode(e);if("undefined"!=typeof window&&"function"==typeof window.btoa){const e=Array.from(t,e=>String.fromCharCode(e)).join("");return btoa(e)}if("undefined"!=typeof Buffer)return Buffer.from(t).toString("base64");throw new Error("[utils.base64Encode]: Unsupported environment")}(JSON.stringify(e))),this.decode=e.decoder??(e=>JSON.parse((e=>{if("undefined"!=typeof window&&"function"==typeof window.atob){const t=atob(e),s=t.length,r=new Uint8Array(s);for(let e=0;e<s;e++)r[e]=t.charCodeAt(e);return(new TextDecoder).decode(r)}if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");throw new Error("[utils.base64Decode]: Unsupported environment")})(e)))}send(e,t,s){"function"==typeof s?this.socket.emit(e,this.encode(t),s):this.socket.emit(e,this.encode(t))}on(e,t){this.socket.on(e,e=>t(this.decode(e)))}}class Ie{constructor(e){__publicField(this,"baseUrl"),__publicField(this,"authToken"),__publicField(this,"sdkMetadata"),this.baseUrl=e.baseUrl,this.authToken=e.authToken,this.sdkMetadata=e.sdkMetadata}async send(e,t){const s=new URL(e,this.baseUrl),r={...t,...this.sdkMetadata&&{sdk:this.sdkMetadata}};try{const e=await fetch(s.toString(),{method:"POST",headers:{"Content-Type":"application/json",...this.authToken&&{Authorization:`Bearer ${this.authToken}`}},body:JSON.stringify(r)});if(!e.ok)return null;let t;try{t=await e.json()}catch{t={}}return t}catch(n){}}}class xe{constructor(e){if(__publicField(this,"defaultTTL"),__publicField(this,"items"),this.defaultTTL=e,e<=0)throw new Error("Default TTL must be a positive number.");this.items=new Map,this.defaultTTL=e,setInterval(()=>this.cleanup(),e)}add(e,t){const s=void 0!==t?t:this.defaultTTL;if(s<=0)throw new Error("TTL must be a positive number.");const r=Date.now()+s;this.items.set(e,r)}has(e){const t=this.items.get(e);return void 0!==t&&(!(Date.now()>t)||(this.items.delete(e),!1))}delete(e){this.items.delete(e)}get size(){return this.cleanup(),this.items.size}clear(){this.items.clear()}cleanup(){const e=Date.now();for(const[t,s]of this.items.entries())s<=e&&this.items.delete(t)}toArray(){return this.cleanup(),Array.from(this.items.keys())}}let Oe=null;var Ae,Ee,Re,Me;"undefined"!=typeof window&&window.addEventListener("message",e=>{if("https://agent.brainfi.sh"===e.origin&&"REQUEST_USER_IDENTITY"===e.data?.type&&Oe&&e.source){const t=document.querySelector("#bf-iframe-container .trigger-iframe");if(!t||e.source!==t.contentWindow)return void console.warn("BrainfishWidgetWarn: Rejected REQUEST_USER_IDENTITY from untrusted iframe source:",e.origin);e.source.postMessage({type:"USER_IDENTIFY",payload:Oe},e.origin)}}),(Ee=Ae||(Ae={})).OpenUrl="openUrl",Ee.CallPhone="callPhone",Ee.SendEmail="sendEmail",Ee.TriggerEvent="triggerEvent",(Me=Re||(Re={})).Button="button",Me.Link="link";const Ne=class e{constructor(t){__publicField(this,"options"),__publicField(this,"client"),__publicField(this,"httpClient"),__publicField(this,"userId"),__publicField(this,"global"),__publicField(this,"queue",[]),__publicField(this,"knownEvents",["nudge.show"]),__publicField(this,"eventListeners",{}),__publicField(this,"recentNudgeIds",new xe(1e3)),__publicField(this,"trackingDisabled",!1),this.options=t;const s={sdk_name:t.sdk||"node",sdk_version:t.sdkVersion||""},r=t.apiUrl||"https://analytic.brainfi.sh",n=t.accessKey;this.client=new ke({baseUrl:r,authToken:n,query:s}),this.httpClient=new Ie({baseUrl:r,authToken:n,sdkMetadata:{name:t.sdk||"node",version:t.sdkVersion||""}}),"undefined"!=typeof window&&"undefined"!=typeof localStorage&&(this.trackingDisabled="true"===localStorage.getItem(e.TRACKING_DISABLED_KEY)),this.setupIncomingPayloadHandler()}init(){}ready(){this.options.waitForUser=!1,this.flush()}setupIncomingPayloadHandler(){this.client.on("e",this.handleIncomingPayload.bind(this))}handleIncomingPayload(e){if("nudge.show"===e.type){const{nudgeId:t}=e.payload;if(this.recentNudgeIds.has(t))return;this.recentNudgeIds.add(t),this.dispatchEventListeners("nudge.show",e.payload)}}dispatchEventListeners(e,t){this.eventListeners[e]?.forEach(e=>e(t))}on(e,t){this.knownEvents.includes(e)&&(this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t))}off(e,t){this.knownEvents.includes(e)&&this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t),0===this.eventListeners[e].length&&delete this.eventListeners[e])}async send(e,t){return this.options.disabled||this.trackingDisabled||this.options.filter&&!this.options.filter(e)?Promise.resolve():this.options.waitForUser&&!this.userId?(this.queue.push(e),Promise.resolve()):this.client.send("t",e,t)}setGlobalProperties(e){this.global={...this.global,...e}}async track(e,t,s){return this.send({type:"event.track",payload:{name:e,userId:t?.userId??this.userId,properties:{...this.global??{},...t??{},...s?{_bfOverrides:s}:{}}}})}async identify(e){e.userId?(this.userId=e.userId,this.flush()):console.warn("BrainfishWidgetWarn: `.identify` called without a userId. User identification requires a valid userId to be provided.");const t=new Set(["userId","firstName","lastName","email","phone","avatar","properties"]),s=Object.keys(e).filter(e=>!t.has(e));s.length>0&&console.warn(`BrainfishWidgetWarn: The following fields are not recognized as main identifier fields: ${s.join(", ")}. Please place custom fields under the 'properties' object instead. Note: Using fields incorrectly may cause user identification to not work as expected.`),e.phone&&!/^\+[1-9]\d{1,14}$/.test(e.phone)&&console.warn("BrainfishWidgetWarn: phone should be in E.164 format (e.g., +14155552671). Providing the correct format ensures accurate user identification."),Oe=e;const r=document.querySelector("#bf-iframe-container .trigger-iframe");if(r){const t=()=>{r.contentWindow&&r.contentWindow.postMessage({type:"USER_IDENTIFY",payload:e},"*")};r.contentWindow&&t(),r.addEventListener("load",t)}if(Object.keys(e).length>1)return this.send({type:"user.identify",payload:{...e,properties:{...this.global,...e.properties}}})}async record(e){if(this.options.disabled)return Promise.resolve(null);if(this.trackingDisabled)return Promise.resolve(null);const t={type:"event.record",payload:{events:e,userId:this.userId}};if(this.options.filter&&!this.options.filter(t))return Promise.resolve(null);const s=await this.httpClient.send("/s",{events:e,userId:this.userId});return s?.sessionId||null}async alias(e){return this.send({type:"user.alias",payload:e})}async increment(e){return this.send({type:"user.increment",payload:e})}async decrement(e){return this.send({type:"user.decrement",payload:e})}clear(){this.userId=void 0}flush(){this.queue.forEach(e=>{this.send({...e,payload:{...e.payload,userId:e.payload.userId??this.userId}})}),this.queue=[]}disableTracking(){this.trackingDisabled=!0,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.setItem(e.TRACKING_DISABLED_KEY,"true")}enableTracking(){this.trackingDisabled=!1,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.removeItem(e.TRACKING_DISABLED_KEY),console.log("Brainfish tracking re-enabled. Refresh page for full effect.")}isTrackingDisabled(){return this.trackingDisabled}};__publicField(Ne,"TRACKING_DISABLED_KEY","bf_tracking_disabled");let _e=Ne;var Te,Pe=Object.defineProperty,Le=(e,t,s)=>((e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),Fe=Object.defineProperty,De=(e,t,s)=>((e,t,s)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),Be=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Be||{});const Ue={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},je={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ze={};function Ve(e){if(ze[e])return ze[e];const t=globalThis[e],s=t.prototype,r=e in Ue?Ue[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in je?je[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return ze[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?ze[e]=i:s}catch{return s}}const We={};function Ye(e,t,s){var r;const n=`${e}.${String(s)}`;if(We[n])return We[n].call(t);const i=Ve(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(We[n]=o,o.call(t)):t[s]}const Ge={};function Ze(e,t,s){const r=`${e}.${String(s)}`;if(Ge[r])return Ge[r].bind(t);const n=Ve(e)[s];return"function"!=typeof n?t[s]:(Ge[r]=n,n.bind(t))}const Je={childNodes:function(e){return Ye("Node",e,"childNodes")},parentNode:function(e){return Ye("Node",e,"parentNode")},parentElement:function(e){return Ye("Node",e,"parentElement")},textContent:function(e){return Ye("Node",e,"textContent")},contains:function(e,t){return Ze("Node",e,"contains")(t)},getRootNode:function(e){return Ze("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ye("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ye("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ye("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ye("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Ve("MutationObserver").constructor}};function Xe(e){return e.nodeType===e.ELEMENT_NODE}function He(e){const t=e&&"host"in e&&"mode"in e&&Je.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Je.shadowRoot(t)===e)}function Ke(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function $e(e){try{const s=e.rules||e.cssRules;if(!s)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);const n=Array.from(s,e=>qe(e,r)).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(s){return null}var t}function qe(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=$e(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}(e)}catch(s){t=e.cssText}return e.styleSheet.href?ct(t,e.styleSheet.href):t}{let s=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(s=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(s)),t?ct(s,t):s}}let Qe=class{constructor(){De(this,"idNodeMap",new Map),De(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function et({element:e,maskInputOptions:t,tagName:s,type:r,value:n,maskInputFn:i}){let o=n||"";const a=r&&tt(r);return(t[s.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function tt(e){return e.toLowerCase()}const st="__rrweb_original__";function rt(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?tt(t):null}function nt(e,t){let s;try{s=new URL(e,t??window.location.href)}catch(Kb){return null}const r=s.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}const it=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ot=/^(?:[a-z+]+:)?\/\//i,at=/^www\..*/i,lt=/^(data:)([^,]*),(.*)/i;function ct(e,t){return(e||"").replace(it,(e,s,r,n,i,o)=>{const a=r||i||o,l=s||n||"";if(!a)return e;if(ot.test(a)||at.test(a))return`url(${l}${a}${l})`;if(lt.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),h=a.split("/");c.pop();for(const t of h)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`})}function ht(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function ut(e,t){return function(e,t){const s=Array.from(t.childNodes),r=[];if(s.length>1&&e&&"string"==typeof e){const t=ht(e);for(let n=1;n<s.length;n++)if(s[n].textContent&&"string"==typeof s[n].textContent){const i=ht(s[n].textContent);for(let s=3;s<i.length;s++){const n=i.substring(0,s);if(2===t.split(n).length){const s=t.indexOf(n);for(let t=s;t<e.length;t++)if(ht(e.substring(0,t)).length===s){r.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return r.push(e),r}(e,t).join("/* rr_split */")}let pt=1;const dt=new RegExp("[^a-z0-9-_:]");function ft(){return pt++}let mt,gt;const yt=/^[^ \t\n\r\u000c]+/,wt=/^[, \t\n\r\u000c]+/;const bt=new WeakMap;function vt(e,t){return t&&""!==t.trim()?St(e,t):t}function Ct(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function St(e,t){let s=bt.get(e);if(s||(s=e.createElement("a"),bt.set(e,s)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return s.setAttribute("href",t),s.href}function kt(e,t,s,r){return r?"src"===s||"href"===s&&("use"!==t||"#"!==r[0])||"xlink:href"===s&&"#"!==r[0]?vt(e,r):"background"!==s||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===s?function(e,t){if(""===t.trim())return t;let s=0;function r(e){let r;const n=e.exec(t.substring(s));return n?(r=n[0],s+=r.length,r):""}const n=[];for(;r(wt),!(s>=t.length);){let i=r(yt);if(","===i.slice(-1))i=vt(e,i.substring(0,i.length-1)),n.push(i);else{let r="";i=vt(e,i);let o=!1;for(;;){const e=t.charAt(s);if(""===e){n.push((i+r).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){s+=1,n.push((i+r).trim());break}"("===e&&(o=!0)}r+=e,s+=1}}}return n.join(", ")}(e,r):"style"===s?ct(r,St(e)):"object"===t&&"data"===s?vt(e,r):r:vt(e,r):r}function It(e,t,s){return("video"===e||"audio"===e)&&"autoplay"===t}function xt(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&xt(Je.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&xt(Je.parentNode(e),t,s)}function Ot(e,t,s,r){let n;if(Xe(e)){if(n=e,!Je.childNodes(n).length)return!1}else{if(null===Je.parentElement(e))return!1;n=Je.parentElement(e)}try{if("string"==typeof t){if(r){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(xt(n,t,r))return!0;if(s)if(r){if(n.closest(s))return!0}else if(n.matches(s))return!0}catch(i){}return!1}function At(e,t){const{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:h,dataURLOptions:u={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return 1===s?void 0:s}(s,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Be.Document,childNodes:[],compatMode:e.compatMode}:{type:Be.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Be.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:s,blockClass:r,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:u,newlyAddedElement:p=!1,rootId:d}=t,f=function(e,t,s){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const r=e.classList[s];if(t.test(r))return!0}if(s)return e.matches(s)}catch(r){}return!1}(e,r,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=tt(e.tagName);return dt.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let v=0;v<y;v++){const t=e.attributes[v];It(m,t.name,t.value)||(g[t.name]=kt(s,m,tt(t.name),t.value))}if("link"===m&&i){const t=Array.from(s.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=$e(t)),r&&(delete g.rel,delete g.href,g._cssText=r)}if("style"===m&&e.sheet){let t=$e(e.sheet);t&&(e.childNodes.length>1&&(t=ut(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,s=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=et({element:e,type:rt(e),tagName:m,value:t,maskInputOptions:o,maskInputFn:a}):s&&(g.checked=s)}"option"===m&&(e.selected&&!o.select?g.selected=!0:delete g.selected);"dialog"===m&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===m&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let s=0;s<e.width;s+=50)for(let r=0;r<e.height;r+=50){const n=t.getImageData,i=st in n?n[st]:n;if(new Uint32Array(i.call(t,s,r,Math.min(50,e.width-s),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=s.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){mt||(mt=s.createElement("canvas"),gt=mt.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{mt.width=t.naturalWidth,mt.height=t.naturalHeight,gt.drawImage(t,0,0),g.rr_dataURL=mt.toDataURL(l.type,l.quality)}catch(Kb){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${r}! Error: ${Kb}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===m||"video"===m){const t=g;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:s}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${s}px`}}"iframe"!==m||u(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(m)&&(w=!0)}catch(b){}return{type:Be.Element,tagName:m,attributes:g,childNodes:[],isSVG:Ct(e)||void 0,needBlock:f,rootId:d,isCustom:w}}(e,{doc:s,blockClass:n,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:u,inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:s,maskTextFn:r,rootId:n,cssCaptured:i}=t,o=Je.parentNode(e),a=o&&o.tagName;let l="";const c="STYLE"===a||void 0,h="SCRIPT"===a||void 0;h?l="SCRIPT_PLACEHOLDER":i||(l=Je.textContent(e),c&&l&&(l=ct(l,St(t.doc))));!c&&!h&&l&&s&&(l=r?r(l,Je.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:Be.Text,textContent:l||"",rootId:n}}(e,{doc:s,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:Be.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:Be.Comment,textContent:Je.textContent(e)||"",rootId:y};default:return!1}}function Et(e){return null==e?"":e.toLowerCase()}function Rt(e,t){const{doc:s,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:k=!1,cssCaptured:I=!1}=t;let{needsMask:x}=t,{preserveWhiteSpace:O=!0}=t;if(!x){x=Ot(e,o,a,void 0===x)}const A=At(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:k,cssCaptured:I});if(!A)return console.warn(e,"not serialized"),null;let E;E=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===Be.Comment)return!0;if(e.type===Be.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===nt(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Et(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Et(e.attributes.name)||"icon"===Et(e.attributes.rel)||"apple-touch-icon"===Et(e.attributes.rel)||"shortcut icon"===Et(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Et(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Et(e.attributes.property).match(/^(og|twitter|fb):/)||Et(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Et(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Et(e.attributes.name)||"googlebot"===Et(e.attributes.name)||"bingbot"===Et(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Et(e.attributes.name)||"generator"===Et(e.attributes.name)||"framework"===Et(e.attributes.name)||"publisher"===Et(e.attributes.name)||"progid"===Et(e.attributes.name)||Et(e.attributes.property).match(/^article:/)||Et(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Et(e.attributes.name)||"yandex-verification"===Et(e.attributes.name)||"csrf-token"===Et(e.attributes.name)||"p:domain_verify"===Et(e.attributes.name)||"verify-v1"===Et(e.attributes.name)||"verification"===Et(e.attributes.name)||"shopify-checkout-api-token"===Et(e.attributes.name)))return!0}}return!1}(A,d)||!O&&A.type===Be.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ft();const R=Object.assign(A,{id:E});if(r.add(e,R),-2===E)return null;y&&y(e);let M=!l;if(R.type===Be.Element){M=M&&!R.needBlock,delete R.needBlock;const t=Je.shadowRoot(e);t&&Ke(t)&&(R.isShadowHost=!0)}if((R.type===Be.Document||R.type===Be.Element)&&M){d.headWhitespace&&R.type===Be.Element&&"head"===R.tagName&&(O=!1);const t={doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S,cssCaptured:!1};if(R.type===Be.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===Be.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const s of Array.from(Je.childNodes(e))){const e=Rt(s,t);e&&R.childNodes.push(e)}}let k=null;if(Xe(e)&&(k=Je.shadowRoot(e)))for(const e of Array.from(Je.childNodes(k))){const s=Rt(e,t);s&&(Ke(k)&&(s.isShadow=!0),R.childNodes.push(s))}}const N=Je.parentNode(e);return N&&He(N)&&Ke(N)&&(R.isShadow=!0),R.type===Be.Element&&"iframe"===R.tagName&&function(e,t,s){const r=e.contentWindow;if(!r)return;let n,i=!1;try{n=r.document.readyState}catch(a){return}if("complete"!==n){const r=setTimeout(()=>{i||(t(),i=!0)},s);return void e.addEventListener("load",()=>{clearTimeout(r),i=!0,t()})}const o="about:blank";if(r.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&w){const s=Rt(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});s&&w(e,s)}},b),R.type===Be.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===nt(R.attributes.href))&&function(e,t,s){let r,n=!1;try{r=e.sheet}catch(o){return}if(r)return;const i=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}(e,()=>{if(v){const t=Rt(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});t&&v(e,t)}},C),R}function Mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Nt(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var _t={exports:{}},Tt=String,Pt=function(){return{isColorSupported:!1,reset:Tt,bold:Tt,dim:Tt,italic:Tt,underline:Tt,inverse:Tt,hidden:Tt,strikethrough:Tt,black:Tt,red:Tt,green:Tt,yellow:Tt,blue:Tt,magenta:Tt,cyan:Tt,white:Tt,gray:Tt,bgBlack:Tt,bgRed:Tt,bgGreen:Tt,bgYellow:Tt,bgBlue:Tt,bgMagenta:Tt,bgCyan:Tt,bgWhite:Tt}};_t.exports=Pt(),_t.exports.createColors=Pt;var Lt=_t.exports;const Ft=Nt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Dt=Lt,Bt=Ft,Ut=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Dt.isColorSupported),Bt&&e&&(t=Bt(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Dt.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var jt=Ut;Ut.default=Ut;var zt={};zt.isClean=Symbol("isClean"),zt.my=Symbol("my");const Vt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Wt=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Vt[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Vt[s]),i.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Yt=Wt;Wt.default=Wt;let Gt=Yt;function Zt(e,t){new Gt(t).stringify(e)}var Jt=Zt;Zt.default=Zt;let{isClean:Xt,my:Ht}=zt,Kt=jt,$t=Yt,qt=Jt;function Qt(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Qt(e,s)):("object"===i&&null!==n&&(n=Qt(n)),s[r]=n)}return s}let es=class{constructor(e={}){this.raws={},this[Xt]=!1,this[Ht]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Qt(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Kt(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Xt]){this[Xt]=!1;let e=this;for(;e=e.parent;)e[Xt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new $t).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=qt){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var ts=es;es.default=es;let ss=ts,rs=class extends ss{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var ns=rs;rs.default=rs;var is={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:os,SourceMapGenerator:as}=Ft,{existsSync:ls,readFileSync:cs}=Ft,{dirname:hs,join:us}=Ft;let ps=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=hs(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new os(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=hs(e),ls(e))return this.mapFile=e,cs(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof os)return as.fromSourceMap(t).toString();if(t instanceof as)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=us(hs(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ds=ps;ps.default=ps;let{SourceMapConsumer:fs,SourceMapGenerator:ms}=Ft,{fileURLToPath:gs,pathToFileURL:ys}=Ft,{isAbsolute:ws,resolve:bs}=Ft,{nanoid:vs}=is,Cs=Ft,Ss=jt,ks=ds,Is=Symbol("fromOffsetCache"),xs=Boolean(fs&&ms),Os=Boolean(bs&&ws),As=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Os||/^\w+:\/\//.test(t.from)||ws(t.from)?this.file=t.from:this.file=bs(t.from)),Os&&xs){let e=new ks(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+vs(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new Ss(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new Ss(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(ys&&(n.input.url=ys(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[Is])s=this[Is];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[Is]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:bs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=ws(a.source)?ys(a.source):new URL(a.source,this.map.consumer().sourceRoot||ys(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!gs)throw new Error("file: protocol is not available in this PostCSS build");l.file=gs(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Es=As;As.default=As,Cs&&Cs.registerInput&&Cs.registerInput(As);let{SourceMapConsumer:Rs,SourceMapGenerator:Ms}=Ft,{dirname:Ns,relative:_s,resolve:Ts,sep:Ps}=Ft,{pathToFileURL:Ls}=Ft,Fs=Es,Ds=Boolean(Rs&&Ms),Bs=Boolean(Ns&&Ts&&_s&&Ps);var Us=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,s=this.toUrl(this.path(e.file)),r=e.root||Ns(e.file);!1===this.mapOpts.sourcesContent?(t=new Rs(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Bs&&Ds&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ms.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ms({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ms({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?Ns(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=Ns(Ts(s,this.mapOpts.annotation)));let r=_s(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Fs(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ls){let t=Ls(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ps&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let js=ts,zs=class extends js{constructor(e){super(e),this.type="comment"}};var Vs=zs;zs.default=zs;let Ws,Ys,Gs,Zs,{isClean:Js,my:Xs}=zt,Hs=ns,Ks=Vs,$s=ts;function qs(e){return e.map(e=>(e.nodes&&(e.nodes=qs(e.nodes)),delete e.source,e))}function Qs(e){if(e[Js]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Qs(t)}let er=class e extends $s{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=qs(Ws(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Hs(t)]}else if(t.selector)t=[new Ys(t)];else if(t.name)t=[new Gs(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Ks(t)]}return t.map(t=>(t[Xs]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Js]&&Qs(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};er.registerParse=e=>{Ws=e},er.registerRule=e=>{Ys=e},er.registerAtRule=e=>{Gs=e},er.registerRoot=e=>{Zs=e};var tr=er;er.default=er,er.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Gs.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ys.prototype):"decl"===e.type?Object.setPrototypeOf(e,Hs.prototype):"comment"===e.type?Object.setPrototypeOf(e,Ks.prototype):"root"===e.type&&Object.setPrototypeOf(e,Zs.prototype),e[Xs]=!0,e.nodes&&e.nodes.forEach(e=>{er.rebuild(e)})};let sr,rr,nr=tr,ir=class extends nr{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new sr(new rr,this,e).stringify()}};ir.registerLazyResult=e=>{sr=e},ir.registerProcessor=e=>{rr=e};var or=ir;ir.default=ir;let ar={};var lr=function(e){ar[e]||(ar[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let cr=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var hr=cr;cr.default=cr;let ur=hr,pr=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new ur(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var dr=pr;pr.default=pr;const fr="'".charCodeAt(0),mr='"'.charCodeAt(0),gr="\\".charCodeAt(0),yr="/".charCodeAt(0),wr="\n".charCodeAt(0),br=" ".charCodeAt(0),vr="\f".charCodeAt(0),Cr="\t".charCodeAt(0),Sr="\r".charCodeAt(0),kr="[".charCodeAt(0),Ir="]".charCodeAt(0),xr="(".charCodeAt(0),Or=")".charCodeAt(0),Ar="{".charCodeAt(0),Er="}".charCodeAt(0),Rr=";".charCodeAt(0),Mr="*".charCodeAt(0),Nr=":".charCodeAt(0),_r="@".charCodeAt(0),Tr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Lr=/.[\r\n"'(/\\]/,Fr=/[\da-f]/i;let Dr=tr,Br=class extends Dr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ur=Br;Br.default=Br,Dr.registerAtRule(Br);let jr,zr,Vr=tr,Wr=class extends Vr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new jr(new zr,this,e).stringify()}};Wr.registerLazyResult=e=>{jr=e},Wr.registerProcessor=e=>{zr=e};var Yr=Wr;Wr.default=Wr,Vr.registerRoot(Wr);let Gr={comma:e=>Gr.split(e,[","],!0),space:e=>Gr.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Zr=Gr;Gr.default=Gr;let Jr=tr,Xr=Zr,Hr=class extends Jr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Xr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Kr=Hr;Hr.default=Hr,Jr.registerRule(Hr);let $r=ns,qr=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case wr:case br:case Cr:case Sr:case vr:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===br||s===wr||s===Cr||s===Sr||s===vr);u=["space",p.slice(m,r)],m=r-1;break;case kr:case Ir:case Ar:case Er:case Nr:case Rr:case Or:{let e=String.fromCharCode(s);u=[e,e,m];break}case xr:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==fr&&h!==mr&&h!==br&&h!==wr&&h!==Cr&&h!==vr&&h!==Sr){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===gr;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Lr.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case fr:case mr:n=s===fr?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===gr;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case _r:Tr.lastIndex=m+1,Tr.test(p),r=0===Tr.lastIndex?p.length-1:Tr.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case gr:for(r=m,o=!0;p.charCodeAt(r+1)===gr;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==yr&&s!==br&&s!==wr&&s!==Cr&&s!==Sr&&s!==vr&&(r+=1,Fr.test(p.charAt(r)))){for(;Fr.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===br&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===yr&&p.charCodeAt(m+1)===Mr?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Pr.lastIndex=m+1,Pr.test(p),r=0===Pr.lastIndex?p.length-1:Pr.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Qr=Vs,en=Ur,tn=Yr,sn=Kr;const rn={empty:!0,space:!0};let nn=tr,on=class{constructor(e){this.input=e,this.root=new tn,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,s,r,n=new en;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Qr;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=qr(this.input)}decl(e,t){let s=new $r;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new sn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",rn[a]||rn[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new sn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},an=Es;function ln(e,t){let s=new an(e,t),r=new on(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var cn=ln;ln.default=ln,nn.registerParse(ln);let{isClean:hn,my:un}=zt,pn=Us,dn=Jt,fn=tr,mn=or,gn=lr,yn=dr,wn=cn,bn=Yr;const vn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Cn={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Sn={Once:!0,postcssPlugin:!0,prepare:!0};function kn(e){return"object"==typeof e&&"function"==typeof e.then}function In(e){let t=!1,s=vn[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function xn(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:In(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function On(e){return e[hn]=!1,e.nodes&&e.nodes.forEach(e=>On(e)),e}let An={},En=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof yn)n=On(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=wn;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[un]&&fn.rebuild(n)}else n=On(s);this.result=new yn(t,n,r),this.helpers={...An,postcss:An,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!Cn[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Sn[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(kn(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[hn];){e[hn]=!0;let s=[xn(e)];for(;s.length>0;){let e=this.visitTick(s);if(kn(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return kn(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=dn;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new pn(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(kn(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[hn];)e[hn]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||gn("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(kn(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[hn])return r[hn]=!0,void e.push(xn(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[hn]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[hn]=!0;let t=In(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[hn]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};En.registerPostcss=e=>{An=e};var Rn=En;En.default=En,bn.registerLazyResult(En),mn.registerLazyResult(En);let Mn=Us,Nn=Jt,_n=lr,Tn=cn;const Pn=dr;let Ln=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Nn;this.result=new Pn(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Mn(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||_n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Tn;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Fn=Ln;Ln.default=Ln;let Dn=Fn,Bn=Rn,Un=or,jn=Yr,zn=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Bn(this,e,t):new Dn(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vn=zn;zn.default=zn,jn.registerProcessor(zn),Un.registerProcessor(zn);let Wn=ns,Yn=ds,Gn=Vs,Zn=Ur,Jn=Es,Xn=Yr,Hn=Kr;function Kn(e,t){if(Array.isArray(e))return e.map(e=>Kn(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Jn.prototype};s.map&&(s.map={...s.map,__proto__:Yn.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Kn(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Xn(r);if("decl"===r.type)return new Wn(r);if("rule"===r.type)return new Hn(r);if("comment"===r.type)return new Gn(r);if("atrule"===r.type)return new Zn(r);throw new Error("Unknown node type: "+e.type)}var $n=Kn;Kn.default=Kn;let qn=jt,Qn=ns,ei=Rn,ti=tr,si=Vn,ri=Jt,ni=$n,ii=or,oi=hr,ai=Vs,li=Ur,ci=dr,hi=Es,ui=cn,pi=Zr,di=Kr,fi=Yr,mi=ts;function gi(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new si(e)}gi.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new si).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return gi([n(s)]).process(e,t)},n},gi.stringify=ri,gi.parse=ui,gi.fromJSON=ni,gi.list=pi,gi.comment=e=>new ai(e),gi.atRule=e=>new li(e),gi.decl=e=>new Qn(e),gi.rule=e=>new di(e),gi.root=e=>new fi(e),gi.document=e=>new ii(e),gi.CssSyntaxError=qn,gi.Declaration=Qn,gi.Container=ti,gi.Processor=si,gi.Document=ii,gi.Comment=ai,gi.Warning=oi,gi.AtRule=li,gi.Result=ci,gi.Input=hi,gi.Rule=di,gi.Root=fi,gi.Node=mi,ei.registerPostcss(gi);var yi=gi;gi.default=gi;const wi=Mt(yi);wi.stringify,wi.fromJSON,wi.plugin,wi.parse,wi.list,wi.document,wi.comment,wi.atRule,wi.rule,wi.decl,wi.root,wi.CssSyntaxError,wi.Declaration,wi.Container,wi.Processor,wi.Document,wi.Comment,wi.Warning,wi.AtRule,wi.Result,wi.Input,wi.Rule,wi.Root,wi.Node;var bi=Object.defineProperty,vi=(e,t,s)=>((e,t,s)=>t in e?bi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function Ci(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Si(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var ki={exports:{}},Ii=String,xi=function(){return{isColorSupported:!1,reset:Ii,bold:Ii,dim:Ii,italic:Ii,underline:Ii,inverse:Ii,hidden:Ii,strikethrough:Ii,black:Ii,red:Ii,green:Ii,yellow:Ii,blue:Ii,magenta:Ii,cyan:Ii,white:Ii,gray:Ii,bgBlack:Ii,bgRed:Ii,bgGreen:Ii,bgYellow:Ii,bgBlue:Ii,bgMagenta:Ii,bgCyan:Ii,bgWhite:Ii}};ki.exports=xi(),ki.exports.createColors=xi;var Oi=ki.exports;const Ai=Si(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ei=Oi,Ri=Ai,Mi=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ei.isColorSupported),Ri&&e&&(t=Ri(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Ei.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ni=Mi;Mi.default=Mi;var _i={};_i.isClean=Symbol("isClean"),_i.my=Symbol("my");const Ti={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Pi=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Ti[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Ti[s]),i.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Li=Pi;Pi.default=Pi;let Fi=Li;function Di(e,t){new Fi(t).stringify(e)}var Bi=Di;Di.default=Di;let{isClean:Ui,my:ji}=_i,zi=Ni,Vi=Li,Wi=Bi;function Yi(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Yi(e,s)):("object"===i&&null!==n&&(n=Yi(n)),s[r]=n)}return s}let Gi=class{constructor(e={}){this.raws={},this[Ui]=!1,this[ji]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Yi(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new zi(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Ui]){this[Ui]=!1;let e=this;for(;e=e.parent;)e[Ui]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Vi).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Wi){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Zi=Gi;Gi.default=Gi;let Ji=Zi,Xi=class extends Ji{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Hi=Xi;Xi.default=Xi;var Ki={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:$i,SourceMapGenerator:qi}=Ai,{existsSync:Qi,readFileSync:eo}=Ai,{dirname:to,join:so}=Ai;let ro=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=to(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new $i(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=to(e),Qi(e))return this.mapFile=e,eo(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof $i)return qi.fromSourceMap(t).toString();if(t instanceof qi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=so(to(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var no=ro;ro.default=ro;let{SourceMapConsumer:io,SourceMapGenerator:oo}=Ai,{fileURLToPath:ao,pathToFileURL:lo}=Ai,{isAbsolute:co,resolve:ho}=Ai,{nanoid:uo}=Ki,po=Ai,fo=Ni,mo=no,go=Symbol("fromOffsetCache"),yo=Boolean(io&&oo),wo=Boolean(ho&&co),bo=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!wo||/^\w+:\/\//.test(t.from)||co(t.from)?this.file=t.from:this.file=ho(t.from)),wo&&yo){let e=new mo(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+uo(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new fo(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new fo(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(lo&&(n.input.url=lo(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[go])s=this[go];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[go]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ho(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=co(a.source)?lo(a.source):new URL(a.source,this.map.consumer().sourceRoot||lo(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ao)throw new Error("file: protocol is not available in this PostCSS build");l.file=ao(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var vo=bo;bo.default=bo,po&&po.registerInput&&po.registerInput(bo);let{SourceMapConsumer:Co,SourceMapGenerator:So}=Ai,{dirname:ko,relative:Io,resolve:xo,sep:Oo}=Ai,{pathToFileURL:Ao}=Ai,Eo=vo,Ro=Boolean(Co&&So),Mo=Boolean(ko&&xo&&Io&&Oo);var No=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,s=this.toUrl(this.path(e.file)),r=e.root||ko(e.file);!1===this.mapOpts.sourcesContent?(t=new Co(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Mo&&Ro&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=So.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new So({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new So({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ko(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=ko(xo(s,this.mapOpts.annotation)));let r=Io(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Eo(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ao){let t=Ao(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Oo&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let _o=Zi,To=class extends _o{constructor(e){super(e),this.type="comment"}};var Po=To;To.default=To;let Lo,Fo,Do,Bo,{isClean:Uo,my:jo}=_i,zo=Hi,Vo=Po,Wo=Zi;function Yo(e){return e.map(e=>(e.nodes&&(e.nodes=Yo(e.nodes)),delete e.source,e))}function Go(e){if(e[Uo]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Go(t)}let Zo=class e extends Wo{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=Yo(Lo(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new zo(t)]}else if(t.selector)t=[new Fo(t)];else if(t.name)t=[new Do(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Vo(t)]}return t.map(t=>(t[jo]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Uo]&&Go(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Zo.registerParse=e=>{Lo=e},Zo.registerRule=e=>{Fo=e},Zo.registerAtRule=e=>{Do=e},Zo.registerRoot=e=>{Bo=e};var Jo=Zo;Zo.default=Zo,Zo.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Do.prototype):"rule"===e.type?Object.setPrototypeOf(e,Fo.prototype):"decl"===e.type?Object.setPrototypeOf(e,zo.prototype):"comment"===e.type?Object.setPrototypeOf(e,Vo.prototype):"root"===e.type&&Object.setPrototypeOf(e,Bo.prototype),e[jo]=!0,e.nodes&&e.nodes.forEach(e=>{Zo.rebuild(e)})};let Xo,Ho,Ko=Jo,$o=class extends Ko{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Xo(new Ho,this,e).stringify()}};$o.registerLazyResult=e=>{Xo=e},$o.registerProcessor=e=>{Ho=e};var qo=$o;$o.default=$o;let Qo={};var ea=function(e){Qo[e]||(Qo[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ta=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var sa=ta;ta.default=ta;let ra=sa,na=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new ra(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var ia=na;na.default=na;const oa="'".charCodeAt(0),aa='"'.charCodeAt(0),la="\\".charCodeAt(0),ca="/".charCodeAt(0),ha="\n".charCodeAt(0),ua=" ".charCodeAt(0),pa="\f".charCodeAt(0),da="\t".charCodeAt(0),fa="\r".charCodeAt(0),ma="[".charCodeAt(0),ga="]".charCodeAt(0),ya="(".charCodeAt(0),wa=")".charCodeAt(0),ba="{".charCodeAt(0),va="}".charCodeAt(0),Ca=";".charCodeAt(0),Sa="*".charCodeAt(0),ka=":".charCodeAt(0),Ia="@".charCodeAt(0),xa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Oa=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Aa=/.[\r\n"'(/\\]/,Ea=/[\da-f]/i;let Ra=Jo,Ma=class extends Ra{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Na=Ma;Ma.default=Ma,Ra.registerAtRule(Ma);let _a,Ta,Pa=Jo,La=class extends Pa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new _a(new Ta,this,e).stringify()}};La.registerLazyResult=e=>{_a=e},La.registerProcessor=e=>{Ta=e};var Fa=La;La.default=La,Pa.registerRoot(La);let Da={comma:e=>Da.split(e,[","],!0),space:e=>Da.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Ba=Da;Da.default=Da;let Ua=Jo,ja=Ba,za=class extends Ua{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ja.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Va=za;za.default=za,Ua.registerRule(za);let Wa=Hi,Ya=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case ha:case ua:case da:case fa:case pa:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===ua||s===ha||s===da||s===fa||s===pa);u=["space",p.slice(m,r)],m=r-1;break;case ma:case ga:case ba:case va:case ka:case Ca:case wa:{let e=String.fromCharCode(s);u=[e,e,m];break}case ya:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==oa&&h!==aa&&h!==ua&&h!==ha&&h!==da&&h!==pa&&h!==fa){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===la;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Aa.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case oa:case aa:n=s===oa?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===la;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Ia:xa.lastIndex=m+1,xa.test(p),r=0===xa.lastIndex?p.length-1:xa.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case la:for(r=m,o=!0;p.charCodeAt(r+1)===la;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==ca&&s!==ua&&s!==ha&&s!==da&&s!==fa&&s!==pa&&(r+=1,Ea.test(p.charAt(r)))){for(;Ea.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===ua&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===ca&&p.charCodeAt(m+1)===Sa?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Oa.lastIndex=m+1,Oa.test(p),r=0===Oa.lastIndex?p.length-1:Oa.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ga=Po,Za=Na,Ja=Fa,Xa=Va;const Ha={empty:!0,space:!0};let Ka=Jo,$a=class{constructor(e){this.input=e,this.root=new Ja,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,s,r,n=new Za;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ga;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Ya(this.input)}decl(e,t){let s=new Wa;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Xa;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Ha[a]||Ha[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Xa;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},qa=vo;function Qa(e,t){let s=new qa(e,t),r=new $a(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var el=Qa;Qa.default=Qa,Ka.registerParse(Qa);let{isClean:tl,my:sl}=_i,rl=No,nl=Bi,il=Jo,ol=qo,al=ea,ll=ia,cl=el,hl=Fa;const ul={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pl={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},dl={Once:!0,postcssPlugin:!0,prepare:!0};function fl(e){return"object"==typeof e&&"function"==typeof e.then}function ml(e){let t=!1,s=ul[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function gl(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ml(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function yl(e){return e[tl]=!1,e.nodes&&e.nodes.forEach(e=>yl(e)),e}let wl={},bl=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof ll)n=yl(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=cl;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[sl]&&il.rebuild(n)}else n=yl(s);this.result=new ll(t,n,r),this.helpers={...wl,postcss:wl,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!pl[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!dl[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(fl(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tl];){e[tl]=!0;let s=[gl(e)];for(;s.length>0;){let e=this.visitTick(s);if(fl(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return fl(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=nl;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new rl(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(fl(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tl];)e[tl]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||al("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(fl(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[tl])return r[tl]=!0,void e.push(gl(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[tl]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[tl]=!0;let t=ml(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[tl]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};bl.registerPostcss=e=>{wl=e};var vl=bl;bl.default=bl,hl.registerLazyResult(bl),ol.registerLazyResult(bl);let Cl=No,Sl=Bi,kl=ea,Il=el;const xl=ia;let Ol=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Sl;this.result=new xl(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Cl(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||kl("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Il;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Al=Ol;Ol.default=Ol;let El=Al,Rl=vl,Ml=qo,Nl=Fa,_l=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Rl(this,e,t):new El(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Tl=_l;_l.default=_l,Nl.registerProcessor(_l),Ml.registerProcessor(_l);let Pl=Hi,Ll=no,Fl=Po,Dl=Na,Bl=vo,Ul=Fa,jl=Va;function zl(e,t){if(Array.isArray(e))return e.map(e=>zl(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Bl.prototype};s.map&&(s.map={...s.map,__proto__:Ll.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>zl(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Ul(r);if("decl"===r.type)return new Pl(r);if("rule"===r.type)return new jl(r);if("comment"===r.type)return new Fl(r);if("atrule"===r.type)return new Dl(r);throw new Error("Unknown node type: "+e.type)}var Vl=zl;zl.default=zl;let Wl=Ni,Yl=Hi,Gl=vl,Zl=Jo,Jl=Tl,Xl=Bi,Hl=Vl,Kl=qo,$l=sa,ql=Po,Ql=Na,ec=ia,tc=vo,sc=el,rc=Ba,nc=Va,ic=Fa,oc=Zi;function ac(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Jl(e)}ac.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new Jl).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return ac([n(s)]).process(e,t)},n},ac.stringify=Xl,ac.parse=sc,ac.fromJSON=Hl,ac.list=rc,ac.comment=e=>new ql(e),ac.atRule=e=>new Ql(e),ac.decl=e=>new Yl(e),ac.rule=e=>new nc(e),ac.root=e=>new ic(e),ac.document=e=>new Kl(e),ac.CssSyntaxError=Wl,ac.Declaration=Yl,ac.Container=Zl,ac.Processor=Jl,ac.Document=Kl,ac.Comment=ql,ac.Warning=$l,ac.AtRule=Ql,ac.Result=ec,ac.Input=tc,ac.Rule=nc,ac.Root=ic,ac.Node=oc,Gl.registerPostcss(ac);var lc=ac;ac.default=ac;const cc=Ci(lc);cc.stringify,cc.fromJSON,cc.plugin,cc.parse,cc.list,cc.document,cc.comment,cc.atRule,cc.rule,cc.decl,cc.root,cc.CssSyntaxError,cc.Declaration,cc.Container,cc.Processor,cc.Document,cc.Comment,cc.Warning,cc.AtRule,cc.Result,cc.Input,cc.Rule,cc.Root,cc.Node;let hc=class e{constructor(...e){vi(this,"parentElement",null),vi(this,"parentNode",null),vi(this,"ownerDocument"),vi(this,"firstChild",null),vi(this,"lastChild",null),vi(this,"previousSibling",null),vi(this,"nextSibling",null),vi(this,"ELEMENT_NODE",1),vi(this,"TEXT_NODE",3),vi(this,"nodeType"),vi(this,"nodeName"),vi(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};const uc={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},dc={};function fc(e){if(dc[e])return dc[e];const t=globalThis[e],s=t.prototype,r=e in uc?uc[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in pc?pc[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return dc[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?dc[e]=i:s}catch{return s}}const mc={};function gc(e,t,s){var r;const n=`${e}.${String(s)}`;if(mc[n])return mc[n].call(t);const i=fc(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(mc[n]=o,o.call(t)):t[s]}const yc={};function wc(e,t,s){const r=`${e}.${String(s)}`;if(yc[r])return yc[r].bind(t);const n=fc(e)[s];return"function"!=typeof n?t[s]:(yc[r]=n,n.bind(t))}function bc(){return fc("MutationObserver").constructor}const vc={childNodes:function(e){return gc("Node",e,"childNodes")},parentNode:function(e){return gc("Node",e,"parentNode")},parentElement:function(e){return gc("Node",e,"parentElement")},textContent:function(e){return gc("Node",e,"textContent")},contains:function(e,t){return wc("Node",e,"contains")(t)},getRootNode:function(e){return wc("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?gc("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?gc("Element",e,"shadowRoot"):null},querySelector:function(e,t){return gc("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return gc("Element",e,"querySelectorAll")(t)},mutationObserver:bc};function Cc(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)}const Sc="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let kc={map:{},getId:()=>(console.error(Sc),-1),getNode:()=>(console.error(Sc),null),removeNodeFromMap(){console.error(Sc)},has:()=>(console.error(Sc),!1),reset(){console.error(Sc)}};function Ic(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}}function xc(e,t,s,r,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,r?s:{set(e){setTimeout(()=>{s.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>xc(e,t,i||{},!0)}function Oc(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(kc=new Proxy(kc,{get:(e,t,s)=>("map"===t&&console.error(Sc),Reflect.get(e,t,s))}));let Ac=Date.now;function Ec(e){var t,s,r,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=vc.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=vc.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function Rc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Mc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Nc(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:vc.parentElement(e)}function _c(e,t,s,r){if(!e)return!1;const n=Nc(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(xt(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1}function Tc(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)}function Pc(e,t){if(He(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const r=vc.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Pc(r,t))}function Lc(e){return Boolean(e.changedTouches)}function Fc(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Dc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Bc(e){return!!e&&(e instanceof hc&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(vc.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ac=()=>(new Date).getTime());let Uc=class{constructor(){Le(this,"id",1),Le(this,"styleIDMap",new WeakMap),Le(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function jc(e){var t;let s=null;return"getRootNode"in e&&(null==(t=vc.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&vc.host(vc.getRootNode(e))&&(s=vc.host(vc.getRootNode(e))),s}function zc(e){const t=e.ownerDocument;if(!t)return!1;const s=function(e){let t,s=e;for(;t=jc(s);)s=t;return s}(e);return vc.contains(t,s)}function Vc(e){const t=e.ownerDocument;return!!t&&(vc.contains(t,e)||zc(e))}var Wc=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Wc||{}),Yc=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Yc||{}),Gc=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Gc||{}),Zc=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Zc||{}),Jc=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Jc||{}),Xc=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Xc||{}),Hc=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Hc||{});function Kc(e){return"__ln"in e}class $c{constructor(){Le(this,"length",0),Le(this,"head",null),Le(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let s=0;s<e;s++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Kc(e.previousSibling)){const s=e.previousSibling.__ln.next;t.next=s,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,s&&(s.previous=t)}else if(e.nextSibling&&Kc(e.nextSibling)&&e.nextSibling.__ln.previous){const s=e.nextSibling.__ln.previous;t.previous=s,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,s&&(s.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const qc=(e,t)=>`${e}@${t}`;class Qc{constructor(){Le(this,"frozen",!1),Le(this,"locked",!1),Le(this,"texts",[]),Le(this,"attributes",[]),Le(this,"attributeMap",new WeakMap),Le(this,"removes",[]),Le(this,"mapRemoves",[]),Le(this,"movedMap",{}),Le(this,"addedSet",new Set),Le(this,"movedSet",new Set),Le(this,"droppedSet",new Set),Le(this,"removesSubTreeCache",new Set),Le(this,"mutationCb"),Le(this,"blockClass"),Le(this,"blockSelector"),Le(this,"maskTextClass"),Le(this,"maskTextSelector"),Le(this,"inlineStylesheet"),Le(this,"maskInputOptions"),Le(this,"maskTextFn"),Le(this,"maskInputFn"),Le(this,"keepIframeSrcFn"),Le(this,"recordCanvas"),Le(this,"inlineImages"),Le(this,"slimDOMOptions"),Le(this,"dataURLOptions"),Le(this,"doc"),Le(this,"mirror"),Le(this,"iframeManager"),Le(this,"stylesheetManager"),Le(this,"shadowDomManager"),Le(this,"canvasManager"),Le(this,"processedNodeManager"),Le(this,"unattachedDoc"),Le(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Le(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new $c,r=e=>{let t=e,s=-2;for(;-2===s;)t=t&&t.nextSibling,s=t&&this.mirror.getId(t);return s},n=n=>{const i=vc.parentNode(n);if(!i||!Vc(n))return;let o=!1;if(n.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(o=!0)}const a=He(i)?this.mirror.getId(jc(n)):this.mirror.getId(i),l=r(n);if(-1===a||-1===l)return s.addNode(n);const c=Rt(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Fc(e,this.mirror)&&this.iframeManager.addIframe(e),Dc(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Bc(n)&&this.shadowDomManager.addShadowRoot(vc.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)th(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(vc.parentNode(a))||n(a);for(const a of this.addedSet)sh(this.droppedSet,a)||th(this.removesSubTreeCache,a,this.mirror)?sh(this.movedSet,a)?n(a):this.droppedSet.add(a):n(a);let i=null;for(;s.length;){let e=null;if(i){const t=this.mirror.getId(vc.parentNode(i.value)),s=r(i.value);-1!==t&&-1!==s&&(e=i)}if(!e){let t=s.tail;for(;t;){const s=t;if(t=t.previous,s){const t=this.mirror.getId(vc.parentNode(s.value));if(-1===r(s.value))continue;if(-1!==t){e=s;break}{const t=s.value,r=vc.parentNode(t);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=vc.host(r);if(-1!==this.mirror.getId(t)){e=s;break}}}}}}if(!e){for(;s.head;)s.removeNode(s.head.value);break}i=e.previous,s.removeNode(e.value),n(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,s=vc.parentNode(t);return s&&"TEXTAREA"===s.tagName&&this.genTextAreaValueMutation(s),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const s=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);s.length<t.style.length&&(s+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(o))}),Le(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(vc.childNodes(e),e=>vc.textContent(e)||"").join("")}),Le(this,"processMutation",e=>{if(!Tc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=vc.textContent(e.target);_c(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Ot(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Nc(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const s=e.target;let r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){const e=rt(s);n=et({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(_c(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===s.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(s.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===s.tagName&&"password"===(e.oldValue||"").toLowerCase()&&s.setAttribute("data-rr-is-password","true"),!It(s.tagName,r))if(i.attributes[r]=kt(this.doc,tt(s.tagName),tt(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(s.style)){const t=s.style.getPropertyValue(e),n=s.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||n!==r.style.getPropertyPriority(e)?i.styleDiff[e]=""===n?t:[t,n]:i._unchangedStyles[e]=[t,n]}for(const e of Array.from(r.style))""===s.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===s.tagName&&(s.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":if(_c(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const s=this.mirror.getId(t),r=He(e.target)?this.mirror.getId(vc.host(e.target)):this.mirror.getId(e.target);_c(e.target,this.blockClass,this.blockSelector,!1)||Tc(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(eh(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===s||Pc(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[qc(s,r)]?eh(this.movedSet,t):(this.removes.push({parentId:r,id:s,isShadow:!(!He(e.target)||!Ke(e.target))||void 0}),function(e,t){const s=[e];for(;s.length;){const e=s.pop();t.has(e)||(t.add(e),vc.childNodes(e).forEach(e=>s.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),Le(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Tc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;t&&this.mirror.hasNode(t)&&(s=this.mirror.getId(t)),s&&-1!==s&&(this.movedMap[qc(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);_c(e,this.blockClass,this.blockSelector,!1)||(vc.childNodes(e).forEach(e=>this.genAdds(e)),Bc(e)&&vc.childNodes(vc.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function eh(e,t){e.delete(t),vc.childNodes(t).forEach(t=>eh(e,t))}function th(e,t,s){return 0!==e.size&&function(e,t){const s=vc.parentNode(t);return!!s&&e.has(s)}(e,t)}function sh(e,t){return 0!==e.size&&rh(e,t)}function rh(e,t){const s=vc.parentNode(t);return!!s&&(!!e.has(s)||rh(e,s))}let nh;const ih=e=>{if(!nh)return e;return(...t)=>{try{return e(...t)}catch(s){if(nh&&!0===nh(s))return;throw s}}},oh=[];function ah(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function lh(e,t){const s=new Qc;oh.push(s),s.init(e);const r=new(bc())(ih(s.processMutations.bind(s)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function ch({mouseInteractionCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const o=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];let l=null;return Object.keys(Gc).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=tt(i);const c=(t=>i=>{const o=ah(i);if(_c(o,r,n,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Zc.Mouse;break;case"touch":a=Zc.Touch;break;case"pen":a=Zc.Pen}a===Zc.Touch?Gc[t]===Gc.MouseDown?c="TouchStart":Gc[t]===Gc.MouseUp&&(c="TouchEnd"):Zc.Pen}else Lc(i)&&(a=Zc.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Zc.Touch||c.startsWith("Mouse")&&a===Zc.Mouse)&&(a=null)):Gc[t]===Gc.Click&&(a=l,l=null);const h=Lc(i)?i.changedTouches[0]:i;if(!h)return;const u=s.getId(o),{clientX:p,clientY:d}=h;ih(e)({type:Gc[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(Gc[i]){case Gc.MouseDown:case Gc.MouseUp:o=o.replace("mouse","pointer");break;case Gc.TouchStart:case Gc.TouchEnd:return}a.push(Cc(o,c,t))}),ih(()=>{a.forEach(e=>e())})}function hh({scrollCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,sampling:i}){return Cc("scroll",ih(Ic(ih(i=>{const o=ah(i);if(!o||_c(o,r,n,!0))return;const a=s.getId(o);if(o===t&&t.defaultView){const s=Ec(t.defaultView);e({id:a,x:s.left,y:s.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const uh=["INPUT","TEXTAREA","SELECT"],ph=new WeakMap;function dh(e){return function(e,t){if(yh("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||yh("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||yh("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||yh("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const s=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(s)}else if(e.parentStyleSheet){const s=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(s)}return t}(e,[])}function fh(e,t,s){let r,n;return e?(e.ownerNode?r=t.getId(e.ownerNode):n=s.getId(e),{styleId:n,id:r}):{}}function mh({mirror:e,stylesheetManager:t},s){var r,n,i;let o=null;o="#document"===s.nodeName?e.getId(s):e.getId(vc.host(s));const a="#document"===s.nodeName?null==(r=s.defaultView)?void 0:r.Document:null==(i=null==(n=s.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&a&&l?(Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var s;const r=null==(s=l.set)?void 0:s.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(n){}return r}}),ih(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function gh(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};let r;!function(e,t){const{mutationCb:s,mousemoveCb:r,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),s(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(r=lh(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:s,mirror:r}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let o,a=[];const l=Ic(ih(t=>{const s=Date.now()-o;e(a.map(e=>(e.timeOffset-=s,e)),t),a=[],o=null}),i),c=ih(Ic(ih(e=>{const t=ah(e),{clientX:s,clientY:n}=Lc(e)?e.changedTouches[0]:e;o||(o=Ac()),a.push({x:s,y:n,id:r.getId(t),timeOffset:Ac()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Yc.Drag:e instanceof MouseEvent?Yc.MouseMove:Yc.TouchMove)}),n,{trailing:!1})),h=[Cc("mousemove",c,s),Cc("touchmove",c,s),Cc("drag",c,s)];return ih(()=>{h.forEach(e=>e())})}(e),i=ch(e),o=hh(e),a=function({viewportResizeCb:e},{win:t}){let s=-1,r=-1;return Cc("resize",ih(Ic(ih(()=>{const t=Rc(),n=Mc();s===t&&r===n||(e({width:Number(n),height:Number(t)}),s=t,r=n)}),200)),t)}(e,{win:s}),l=function({inputCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let s=ah(e);const c=e.isTrusted,u=s&&s.tagName;if(s&&"OPTION"===u&&(s=vc.parentElement(s)),!s||!u||uh.indexOf(u)<0||_c(s,r,n,!0))return;if(s.classList.contains(i)||o&&s.matches(o))return;let d=s.value,f=!1;const m=rt(s)||"";"radio"===m||"checkbox"===m?f=s.checked:(a[u.toLowerCase()]||a[m])&&(d=et({element:s,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(s,h?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=s.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==s){const t=e.value;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,r){const n=ph.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){ph.set(t,r);const n=s.getId(t);ih(e)({...r,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>Cc(e,ih(u),t)),f=t.defaultView;if(!f)return()=>{d.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...g.map(e=>xc(e[0],e[1],{set(){ih(u)({target:this,isTrusted:!1})}},!1,f))),ih(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:r,sampling:n,doc:i}){const o=ih(i=>Ic(ih(n=>{const o=ah(n);if(!o||_c(o,t,s,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:r.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),n.media||500)),a=[Cc("play",o(Xc.Play),i),Cc("pause",o(Xc.Pause),i),Cc("seeked",o(Xc.Seeked),i),Cc("volumechange",o(Xc.VolumeChange),i),Cc("ratechange",o(Xc.RateChange),i)];return ih(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:ih((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=fh(n,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:a}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.addRule=function(e,t,s=this.cssRules.length){const n=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[n,s])};const i=r.CSSStyleSheet.prototype.deleteRule;let o,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),r.apply(n,i)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),r.apply(n,i)})}));const l={};wh("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(wh("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),wh("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),wh("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach(([r,n])=>{c[r]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[r].insertRule,{apply:ih((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=fh(n.parentStyleSheet,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...dh(n),a||0]}]}),r.apply(n,i)})}),n.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n.parentStyleSheet,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...dh(n),o]}]}),r.apply(n,i)})})}),ih(()=>{r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:s}),u=mh(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:r},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ih((n,o,a)=>{var l;const[c,h,u]=a;if(s.has(c))return i.apply(o,[c,h,u]);const{id:p,styleId:d}=fh(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:dh(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ih((n,i,a)=>{var l;const[c]=a;if(s.has(c))return o.apply(i,[c]);const{id:h,styleId:u}=fh(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:dh(i.parentRule)}),n.apply(i,a)})}),ih(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:s}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const r=[],n=new WeakMap,i=s.FontFace;s.FontFace=function(e,t,s){const r=new i(e,t,s);return n.set(r,{family:e,buffer:"string"!=typeof t,descriptors:s,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const o=Oc(t.fonts,"add",function(t){return function(s){return setTimeout(ih(()=>{const t=n.get(s);t&&(e(t),n.delete(s))}),0),t.apply(this,[s])}});return r.push(()=>{s.FontFace=i}),r.push(o),ih(()=>{r.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:s,blockClass:r,blockSelector:n,selectionCb:i}=e;let o=!0;const a=ih(()=>{const e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:c,endOffset:h}=i;_c(o,r,n,!0)||_c(c,r,n,!0)||a.push({start:s.getId(o),startOffset:l,end:s.getId(c),endOffset:h})}i({ranges:a})});return a(),Cc("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const s=e.defaultView;return s&&s.customElements?Oc(s.customElements,"define",function(e){return function(s,r,n){try{t({define:{name:s}})}catch(i){console.warn(`Custom element callback failed for ${s}`)}return e.apply(this,[s,r,n])}}):()=>{}}(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,s,y.options));return ih(()=>{oh.forEach(e=>e.reset()),null==r||r.disconnect(),n(),i(),o(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach(e=>e())})}function yh(e){return void 0!==window[e]}function wh(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class bh{constructor(e){Le(this,"iframeIdToRemoteIdMap",new WeakMap),Le(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,r){const n=s||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let o=n.get(t);return o||(o=this.generateIdFn(),n.set(t,o),i.set(o,t)),o}getIds(e,t){const s=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,s,r))}getRemoteId(e,t,s){const r=s||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=r.get(t);return n||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,s))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class vh{constructor(e){Le(this,"iframes",new WeakMap),Le(this,"crossOriginIframeMap",new WeakMap),Le(this,"crossOriginIframeMirror",new bh(ft)),Le(this,"crossOriginIframeStyleMirror"),Le(this,"crossOriginIframeRootIdMap",new WeakMap),Le(this,"mirror"),Le(this,"mutationCb"),Le(this,"wrappedEmit"),Le(this,"loadListener"),Le(this,"stylesheetManager"),Le(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new bh(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var s,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(s=e.contentWindow)||s.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const r=this.transformCrossOriginEvent(s,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var s;switch(t.type){case Wc.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:Wc.IncrementalSnapshot,data:{source:Yc.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Wc.Meta:case Wc.Load:case Wc.DomContentLoaded:return!1;case Wc.Plugin:return t;case Wc.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Wc.IncrementalSnapshot:switch(t.data.source){case Yc.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(t.node,s)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Yc.Drag:case Yc.TouchMove:case Yc.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Yc.ViewportResize:return!1;case Yc.MediaInteraction:case Yc.MouseInteraction:case Yc.Scroll:case Yc.CanvasMutation:case Yc.Input:return this.replaceIds(t.data,e,["id"]),t;case Yc.StyleSheetRule:case Yc.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Yc.Font:return t;case Yc.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Yc.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(s=t.data.styles)||s.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,s,r){for(const n of r)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(s,t[n]):t[n]=e.getId(s,t[n]));return t}replaceIds(e,t,s){return this.replace(this.crossOriginIframeMirror,e,t,s)}replaceStyleIds(e,t,s){return this.replace(this.crossOriginIframeStyleMirror,e,t,s)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===Hc.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Ch{constructor(e){Le(this,"shadowDoms",new WeakSet),Le(this,"mutationCb"),Le(this,"scrollCb"),Le(this,"bypassOptions"),Le(this,"mirror"),Le(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ke(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=lh({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(hh({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(vc.host(e))),this.restoreHandlers.push(mh({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const s=this;this.restoreHandlers.push(Oc(e.prototype,"attachShadow",function(e){return function(r){const n=e.call(this,r),i=vc.shadowRoot(this);return i&&Vc(this)&&s.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Sh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kh="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ih=0;Ih<64;Ih++)kh[Sh.charCodeAt(Ih)]=Ih;const xh=new Map;const Oh=(e,t,s)=>{if(!e||!Rh(e,t)&&"object"!=typeof e)return;const r=function(e,t){let s=xh.get(e);return s||(s=new Map,xh.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}(s,e.constructor.name);let n=r.indexOf(e);return-1===n&&(n=r.length,r.push(e)),n};function Ah(e,t,s){if(e instanceof Array)return e.map(e=>Ah(e,t,s));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,s=new Uint8Array(e),r=s.length,n="";for(t=0;t<r;t+=3)n+=Sh[s[t]>>2],n+=Sh[(3&s[t])<<4|s[t+1]>>4],n+=Sh[(15&s[t+1])<<2|s[t+2]>>6],n+=Sh[63&s[t+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ah(e.buffer,t,s),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:s}=e;return{rr_type:t,src:s}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ah(e.data,t,s),e.width,e.height]}}if(Rh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Oh(e,t,s)}}return e}const Eh=(e,t,s)=>e.map(e=>Ah(e,t,s)),Rh=(e,t)=>{const s=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(s.find(s=>e instanceof t[s]))};function Mh(e,t,s,r){const n=[];try{const i=Oc(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!_c(this,t,s,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),r&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...i])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function Nh(e,t,s,r,n,i){const o=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=Oc(e,l,function(e){return function(...o){const a=e.apply(this,o);if(Oh(a,i,this),"tagName"in this.canvas&&!_c(this.canvas,r,n,!0)){const e=Eh(o,i,this),r={type:t,property:l,args:e};s(this.canvas,r)}return a}});o.push(a)}catch{const r=xc(e,l,{set(e){s(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(r)}return o}const _h="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Th="undefined"!=typeof window&&window.Blob&&new Blob([(Ph=_h,Uint8Array.from(atob(Ph),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var Ph;function Lh(e){let t;try{if(t=Th&&(window.URL||window.webkitURL).createObjectURL(Th),!t)throw"";const s=new Worker(t,{name:null==e?void 0:e.name});return s.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;base64,"+_h,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Fh{constructor(e){Le(this,"pendingCanvasMutations",new Map),Le(this,"rafStamps",{latestId:0,invokeId:null}),Le(this,"mirror"),Le(this,"mutationCb"),Le(this,"resetObservers"),Le(this,"frozen",!1),Le(this,"locked",!1),Le(this,"processMutation",(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:s,blockClass:r,blockSelector:n,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(s,r,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,s,r,n,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,s,r,n){const i=Mh(t,s,r,!0),o=new Map,a=new Lh;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:s,type:r,width:n,height:i}=e.data;this.mutationCb({id:t,type:Jc["2D"],commands:[{property:"clearRect",args:[0,0,n,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:r}]},0,0]}]})};const l=1e3/e;let c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{_c(t,s,r,!0)||e.push(t)}),e})().forEach(async e=>{var t;const s=this.mirror.getId(e);if(o.get(s))return;if(0===e.width||0===e.height)return;if(o.set(s,!0),["webgl","webgl2"].includes(e.__context)){const s=e.getContext(e.__context);!1===(null==(t=null==s?void 0:s.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&s.clear(s.COLOR_BUFFER_BIT)}const r=await createImageBitmap(e);a.postMessage({id:s,bitmap:r,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[r])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Mh(e,t,s,!1),n=function(e,t,s,r){const n=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=Oc(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return _c(this.canvas,s,r,!0)||setTimeout(()=>{const s=Eh(i,t,this);e(this.canvas,{type:Jc["2D"],property:o,args:s})},0),n.apply(this,i)}});n.push(i)}catch{const s=xc(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:Jc["2D"],property:o,args:[t],setter:!0})}});n.push(s)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s),i=function(e,t,s,r){const n=[];return n.push(...Nh(t.WebGLRenderingContext.prototype,Jc.WebGL,e,s,r,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Nh(t.WebGL2RenderingContext.prototype,Jc.WebGL2,e,s,r,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{r(),n(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const s=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(e);if(!s||-1===t)return;const r=s.map(e=>{const{type:t,...s}=e;return s}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}class Dh{constructor(e){Le(this,"trackedLinkElements",new WeakSet),Le(this,"mutationCb"),Le(this,"adoptedStyleSheetCb"),Le(this,"styleMirror",new Uc),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const s={id:t,styleIds:[]},r=[];for(const n of e){let e;this.styleMirror.has(n)?e=this.styleMirror.getId(n):(e=this.styleMirror.add(n),r.push({styleId:e,rules:Array.from(n.rules||CSSRule,(e,t)=>({rule:qe(e,n.href),index:t}))})),s.styleIds.push(e)}r.length>0&&(s.styles=r),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Bh{constructor(){Le(this,"nodeMap",new WeakMap),Le(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Uh,jh,zh,Vh=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Te=e.contentWindow)?void 0:Te.Array.from)||Array.from,document.body.removeChild(e)}}catch(Kb){console.debug("Unable to override Array.from",Kb)}const Wh=new Qe;function Yh(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:r,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:C=!0,recordCanvas:S=!1,recordCrossOriginIframes:k=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:E,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:N}=e;nh=N;const _=!k||window.parent===window;let T=!1;if(!_)try{window.parent.document&&(T=!1)}catch(Z){T=!0}if(_&&!t)throw new Error("emit function is required");if(!_&&!T)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),Wh.reset();const P=!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==p?p:{password:!0},L=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let F;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let D=0;const B=e=>{for(const t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!T&&(e=y(e)),e};Uh=(e,n)=>{var i;const o=e;if(o.timestamp=Ac(),!(null==(i=oh[0])?void 0:i.isFrozen())||o.type===Wc.FullSnapshot||o.type===Wc.IncrementalSnapshot&&o.data.source===Yc.Mutation||oh.forEach(e=>e.unfreeze()),_)null==t||t(B(o),n);else if(T){const e={type:"rrweb",event:B(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===Wc.FullSnapshot)F=o,D=0;else if(o.type===Wc.IncrementalSnapshot){if(o.data.source===Yc.Mutation&&o.data.isAttachIframe)return;D++;const e=r&&D>=r,t=s&&o.timestamp-F.timestamp>s;(e||t)&&jh(!0)}};const U=e=>{Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Mutation,...e}})},j=e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Scroll,...e}}),z=e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.CanvasMutation,...e}}),V=new Dh({mutationCb:U,adoptedStyleSheetCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.AdoptedStyleSheet,...e}})}),W=new vh({mirror:Wh,mutationCb:U,stylesheetManager:V,recordCrossOriginIframes:k,wrappedEmit:Uh});for(const X of E||[])X.getMirror&&X.getMirror({nodeMirror:Wh,crossOriginIframeMirror:W.crossOriginIframeMirror,crossOriginIframeStyleMirror:W.crossOriginIframeStyleMirror});const Y=new Bh;zh=new Fh({recordCanvas:S,mutationCb:z,win:window,blockClass:n,blockSelector:i,mirror:Wh,sampling:w.canvas,dataURLOptions:b});const G=new Ch({mutationCb:U,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:P,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:S,inlineImages:A,sampling:w,slimDOMOptions:L,iframeManager:W,stylesheetManager:V,canvasManager:zh,keepIframeSrcFn:R,processedNodeManager:Y},mirror:Wh});jh=(e=!1)=>{if(!C)return;Uh({type:Wc.Meta,data:{href:window.location.href,width:Mc(),height:Rc()}},e),V.reset(),G.init(),oh.forEach(e=>e.lock());const t=function(e,t){const{mirror:s=new Qe,blockClass:r="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C=()=>!1}=t||{};return Rt(e,{doc:e,mirror:s,blockClass:r,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Wh,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:P,maskTextFn:m,maskInputFn:f,slimDOM:L,dataURLOptions:b,recordCanvas:S,inlineImages:A,onSerialize:e=>{Fc(e,Wh)&&W.addIframe(e),Dc(e,Wh)&&V.trackLinkElement(e),Bc(e)&&G.addShadowRoot(vc.shadowRoot(e),document)},onIframeLoad:(e,t)=>{W.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");Uh({type:Wc.FullSnapshot,data:{node:t,initialOffset:Ec(window)}},e),oh.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,Wh.getId(document))};try{const e=[],t=e=>{var t;return ih(gh)({mutationCb:U,mousemoveCb:(e,t)=>Uh({type:Wc.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.ViewportResize,...e}}),inputCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Input,...e}}),mediaInteractionCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.MediaInteraction,...e}}),styleSheetRuleCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.StyleSheetRule,...e}}),styleDeclarationCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.StyleDeclaration,...e}}),canvasMutationCb:z,fontCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Font,...e}}),selectionCb:e=>{Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Selection,...e}})},customElementCb:e=>{Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:P,inlineStylesheet:h,sampling:w,recordDOM:C,recordCanvas:S,inlineImages:A,userTriggeredOnInput:x,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:L,dataURLOptions:b,mirror:Wh,iframeManager:W,stylesheetManager:V,shadowDomManager:G,processedNodeManager:Y,canvasManager:zh,ignoreCSSAttributes:M,plugins:(null==(t=null==E?void 0:E.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Uh({type:Wc.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};W.addLoadListener(s=>{try{e.push(t(s.contentDocument))}catch(r){console.warn(r)}});const s=()=>{jh(),e.push(t(document)),Vh=!0};return"interactive"===document.readyState||"complete"===document.readyState?s():(e.push(Cc("DOMContentLoaded",()=>{Uh({type:Wc.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&s()})),e.push(Cc("load",()=>{Uh({type:Wc.Load,data:{}}),"load"===I&&s()},window))),()=>{e.forEach(e=>e()),Y.destroy(),Vh=!1,nh=void 0}}catch(J){console.warn(J)}}var Gh,Zh;Yh.addCustomEvent=(e,t)=>{if(!Vh)throw new Error("please add custom event after start recording");Uh({type:Wc.Custom,data:{tag:e,payload:t}})},Yh.freezePage=()=>{oh.forEach(e=>e.freeze())},Yh.takeFullSnapshot=e=>{if(!Vh)throw new Error("please take full snapshot after start recording");jh(e)},Yh.mirror=Wh,(Zh=Gh||(Gh={}))[Zh.NotStarted=0]="NotStarted",Zh[Zh.Running=1]="Running",Zh[Zh.Stopped=2]="Stopped";const{addCustomEvent:Jh}=Yh,{freezePage:Xh}=Yh,{takeFullSnapshot:Hh}=Yh;class Kh extends Array{constructor(){super()}isEmpty(){return 0===this.length}isFull(){return 10===this.length}flush(){return this.splice(0,this.length)}}class $h{constructor(e){__publicField(this,"agent"),__publicField(this,"eventBuffer"),this.agent=e,this.eventBuffer=new Kh}start(){document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.send()})}handle(e){e.type===Wc.FullSnapshot&&this.eventBuffer.find(e=>e.type===Wc.FullSnapshot)||(this.eventBuffer.push(e),this.eventBuffer.isFull()&&this.send())}async send(){if(!this.eventBuffer.isEmpty()&&this.agent.sendEvents){const e=this.eventBuffer.flush();await this.agent.sendEvents(e)}}}var qh,Qh=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Qh||{}),eu=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(eu||{}),tu=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(tu||{}),su=Object.defineProperty,ru=(e,t,s)=>((e,t,s)=>t in e?su(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),nu=Object.defineProperty,iu=(e,t,s)=>((e,t,s)=>t in e?nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),ou=Object.defineProperty,au=(e,t,s)=>((e,t,s)=>t in e?ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);const lu={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hu={};function uu(e){if(hu[e])return hu[e];const t=globalThis[e],s=t.prototype,r=e in lu?lu[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in cu?cu[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return hu[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?hu[e]=i:s}catch{return s}}const pu={};function du(e,t,s){var r;const n=`${e}.${String(s)}`;if(pu[n])return pu[n].call(t);const i=uu(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(pu[n]=o,o.call(t)):t[s]}const fu={};function mu(e,t,s){const r=`${e}.${String(s)}`;if(fu[r])return fu[r].bind(t);const n=uu(e)[s];return"function"!=typeof n?t[s]:(fu[r]=n,n.bind(t))}const gu={childNodes:function(e){return du("Node",e,"childNodes")},parentNode:function(e){return du("Node",e,"parentNode")},parentElement:function(e){return du("Node",e,"parentElement")},textContent:function(e){return du("Node",e,"textContent")},contains:function(e,t){return mu("Node",e,"contains")(t)},getRootNode:function(e){return mu("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?du("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?du("Element",e,"shadowRoot"):null},querySelector:function(e,t){return du("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return du("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return uu("MutationObserver").constructor}};class yu{constructor(){au(this,"idNodeMap",new Map),au(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wu(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&wu(gu.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&wu(gu.parentNode(e),t,s)}function bu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vu(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var Cu={exports:{}},Su=String,ku=function(){return{isColorSupported:!1,reset:Su,bold:Su,dim:Su,italic:Su,underline:Su,inverse:Su,hidden:Su,strikethrough:Su,black:Su,red:Su,green:Su,yellow:Su,blue:Su,magenta:Su,cyan:Su,white:Su,gray:Su,bgBlack:Su,bgRed:Su,bgGreen:Su,bgYellow:Su,bgBlue:Su,bgMagenta:Su,bgCyan:Su,bgWhite:Su}};Cu.exports=ku(),Cu.exports.createColors=ku;var Iu=Cu.exports;const xu=vu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ou=Iu,Au=xu,Eu=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ou.isColorSupported),Au&&e&&(t=Au(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Ou.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ru=Eu;Eu.default=Eu;var Mu={};Mu.isClean=Symbol("isClean"),Mu.my=Symbol("my");const Nu={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let _u=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Nu[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Nu[s]),i.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Tu=_u;_u.default=_u;let Pu=Tu;function Lu(e,t){new Pu(t).stringify(e)}var Fu=Lu;Lu.default=Lu;let{isClean:Du,my:Bu}=Mu,Uu=Ru,ju=Tu,zu=Fu;function Vu(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Vu(e,s)):("object"===i&&null!==n&&(n=Vu(n)),s[r]=n)}return s}let Wu=class{constructor(e={}){this.raws={},this[Du]=!1,this[Bu]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Vu(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Uu(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Du]){this[Du]=!1;let e=this;for(;e=e.parent;)e[Du]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new ju).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=zu){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Yu=Wu;Wu.default=Wu;let Gu=Yu,Zu=class extends Gu{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Ju=Zu;Zu.default=Zu;var Xu={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Hu,SourceMapGenerator:Ku}=xu,{existsSync:$u,readFileSync:qu}=xu,{dirname:Qu,join:ep}=xu;let tp=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Qu(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Hu(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Qu(e),$u(e))return this.mapFile=e,qu(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Hu)return Ku.fromSourceMap(t).toString();if(t instanceof Ku)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ep(Qu(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var sp=tp;tp.default=tp;let{SourceMapConsumer:rp,SourceMapGenerator:np}=xu,{fileURLToPath:ip,pathToFileURL:op}=xu,{isAbsolute:ap,resolve:lp}=xu,{nanoid:cp}=Xu,hp=xu,up=Ru,pp=sp,dp=Symbol("fromOffsetCache"),fp=Boolean(rp&&np),mp=Boolean(lp&&ap),gp=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!mp||/^\w+:\/\//.test(t.from)||ap(t.from)?this.file=t.from:this.file=lp(t.from)),mp&&fp){let e=new pp(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+cp(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new up(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new up(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(op&&(n.input.url=op(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[dp])s=this[dp];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[dp]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:lp(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=ap(a.source)?op(a.source):new URL(a.source,this.map.consumer().sourceRoot||op(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ip)throw new Error("file: protocol is not available in this PostCSS build");l.file=ip(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var yp=gp;gp.default=gp,hp&&hp.registerInput&&hp.registerInput(gp);let{SourceMapConsumer:wp,SourceMapGenerator:bp}=xu,{dirname:vp,relative:Cp,resolve:Sp,sep:kp}=xu,{pathToFileURL:Ip}=xu,xp=yp,Op=Boolean(wp&&bp),Ap=Boolean(vp&&Sp&&Cp&&kp);var Ep=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,s=this.toUrl(this.path(e.file)),r=e.root||vp(e.file);!1===this.mapOpts.sourcesContent?(t=new wp(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ap&&Op&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=bp.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new bp({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new bp({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?vp(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=vp(Sp(s,this.mapOpts.annotation)));let r=Cp(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new xp(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ip){let t=Ip(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===kp&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Rp=Yu,Mp=class extends Rp{constructor(e){super(e),this.type="comment"}};var Np=Mp;Mp.default=Mp;let _p,Tp,Pp,Lp,{isClean:Fp,my:Dp}=Mu,Bp=Ju,Up=Np,jp=Yu;function zp(e){return e.map(e=>(e.nodes&&(e.nodes=zp(e.nodes)),delete e.source,e))}function Vp(e){if(e[Fp]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Vp(t)}let Wp=class e extends jp{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=zp(_p(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Bp(t)]}else if(t.selector)t=[new Tp(t)];else if(t.name)t=[new Pp(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Up(t)]}return t.map(t=>(t[Dp]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Fp]&&Vp(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Wp.registerParse=e=>{_p=e},Wp.registerRule=e=>{Tp=e},Wp.registerAtRule=e=>{Pp=e},Wp.registerRoot=e=>{Lp=e};var Yp=Wp;Wp.default=Wp,Wp.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Pp.prototype):"rule"===e.type?Object.setPrototypeOf(e,Tp.prototype):"decl"===e.type?Object.setPrototypeOf(e,Bp.prototype):"comment"===e.type?Object.setPrototypeOf(e,Up.prototype):"root"===e.type&&Object.setPrototypeOf(e,Lp.prototype),e[Dp]=!0,e.nodes&&e.nodes.forEach(e=>{Wp.rebuild(e)})};let Gp,Zp,Jp=Yp,Xp=class extends Jp{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Gp(new Zp,this,e).stringify()}};Xp.registerLazyResult=e=>{Gp=e},Xp.registerProcessor=e=>{Zp=e};var Hp=Xp;Xp.default=Xp;let Kp={};var $p=function(e){Kp[e]||(Kp[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let qp=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Qp=qp;qp.default=qp;let ed=Qp,td=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new ed(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var sd=td;td.default=td;const rd="'".charCodeAt(0),nd='"'.charCodeAt(0),id="\\".charCodeAt(0),od="/".charCodeAt(0),ad="\n".charCodeAt(0),ld=" ".charCodeAt(0),cd="\f".charCodeAt(0),hd="\t".charCodeAt(0),ud="\r".charCodeAt(0),pd="[".charCodeAt(0),dd="]".charCodeAt(0),fd="(".charCodeAt(0),md=")".charCodeAt(0),gd="{".charCodeAt(0),yd="}".charCodeAt(0),wd=";".charCodeAt(0),bd="*".charCodeAt(0),vd=":".charCodeAt(0),Cd="@".charCodeAt(0),Sd=/[\t\n\f\r "#'()/;[\\\]{}]/g,kd=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Id=/.[\r\n"'(/\\]/,xd=/[\da-f]/i;let Od=Yp,Ad=class extends Od{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ed=Ad;Ad.default=Ad,Od.registerAtRule(Ad);let Rd,Md,Nd=Yp,_d=class extends Nd{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Rd(new Md,this,e).stringify()}};_d.registerLazyResult=e=>{Rd=e},_d.registerProcessor=e=>{Md=e};var Td=_d;_d.default=_d,Nd.registerRoot(_d);let Pd={comma:e=>Pd.split(e,[","],!0),space:e=>Pd.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Ld=Pd;Pd.default=Pd;let Fd=Yp,Dd=Ld,Bd=class extends Fd{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Dd.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Ud=Bd;Bd.default=Bd,Fd.registerRule(Bd);let jd=Ju,zd=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case ad:case ld:case hd:case ud:case cd:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===ld||s===ad||s===hd||s===ud||s===cd);u=["space",p.slice(m,r)],m=r-1;break;case pd:case dd:case gd:case yd:case vd:case wd:case md:{let e=String.fromCharCode(s);u=[e,e,m];break}case fd:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==rd&&h!==nd&&h!==ld&&h!==ad&&h!==hd&&h!==cd&&h!==ud){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===id;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Id.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case rd:case nd:n=s===rd?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===id;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Cd:Sd.lastIndex=m+1,Sd.test(p),r=0===Sd.lastIndex?p.length-1:Sd.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case id:for(r=m,o=!0;p.charCodeAt(r+1)===id;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==od&&s!==ld&&s!==ad&&s!==hd&&s!==ud&&s!==cd&&(r+=1,xd.test(p.charAt(r)))){for(;xd.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===ld&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===od&&p.charCodeAt(m+1)===bd?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(kd.lastIndex=m+1,kd.test(p),r=0===kd.lastIndex?p.length-1:kd.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Vd=Np,Wd=Ed,Yd=Td,Gd=Ud;const Zd={empty:!0,space:!0};let Jd=Yp,Xd=class{constructor(e){this.input=e,this.root=new Yd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,s,r,n=new Wd;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Vd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=zd(this.input)}decl(e,t){let s=new jd;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Gd;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Zd[a]||Zd[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Gd;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Hd=yp;function Kd(e,t){let s=new Hd(e,t),r=new Xd(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var $d=Kd;Kd.default=Kd,Jd.registerParse(Kd);let{isClean:qd,my:Qd}=Mu,ef=Ep,tf=Fu,sf=Yp,rf=Hp,nf=$p,of=sd,af=$d,lf=Td;const cf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},hf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},uf={Once:!0,postcssPlugin:!0,prepare:!0};function pf(e){return"object"==typeof e&&"function"==typeof e.then}function df(e){let t=!1,s=cf[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function ff(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:df(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function mf(e){return e[qd]=!1,e.nodes&&e.nodes.forEach(e=>mf(e)),e}let gf={},yf=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof of)n=mf(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=af;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[Qd]&&sf.rebuild(n)}else n=mf(s);this.result=new of(t,n,r),this.helpers={...gf,postcss:gf,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!hf[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uf[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(pf(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qd];){e[qd]=!0;let s=[ff(e)];for(;s.length>0;){let e=this.visitTick(s);if(pf(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return pf(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=tf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new ef(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(pf(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qd];)e[qd]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||nf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(pf(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[qd])return r[qd]=!0,void e.push(ff(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[qd]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[qd]=!0;let t=df(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[qd]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};yf.registerPostcss=e=>{gf=e};var wf=yf;yf.default=yf,lf.registerLazyResult(yf),rf.registerLazyResult(yf);let bf=Ep,vf=Fu,Cf=$p,Sf=$d;const kf=sd;let If=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=vf;this.result=new kf(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new bf(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Cf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Sf;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var xf=If;If.default=If;let Of=xf,Af=wf,Ef=Hp,Rf=Td,Mf=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Af(this,e,t):new Of(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Nf=Mf;Mf.default=Mf,Rf.registerProcessor(Mf),Ef.registerProcessor(Mf);let _f=Ju,Tf=sp,Pf=Np,Lf=Ed,Ff=yp,Df=Td,Bf=Ud;function Uf(e,t){if(Array.isArray(e))return e.map(e=>Uf(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ff.prototype};s.map&&(s.map={...s.map,__proto__:Tf.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Uf(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Df(r);if("decl"===r.type)return new _f(r);if("rule"===r.type)return new Bf(r);if("comment"===r.type)return new Pf(r);if("atrule"===r.type)return new Lf(r);throw new Error("Unknown node type: "+e.type)}var jf=Uf;Uf.default=Uf;let zf=Ru,Vf=Ju,Wf=wf,Yf=Yp,Gf=Nf,Zf=Fu,Jf=jf,Xf=Hp,Hf=Qp,Kf=Np,$f=Ed,qf=sd,Qf=yp,em=$d,tm=Ld,sm=Ud,rm=Td,nm=Yu;function im(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Gf(e)}im.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new Gf).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return im([n(s)]).process(e,t)},n},im.stringify=Zf,im.parse=em,im.fromJSON=Jf,im.list=tm,im.comment=e=>new Kf(e),im.atRule=e=>new $f(e),im.decl=e=>new Vf(e),im.rule=e=>new sm(e),im.root=e=>new rm(e),im.document=e=>new Xf(e),im.CssSyntaxError=zf,im.Declaration=Vf,im.Container=Yf,im.Processor=Gf,im.Document=Xf,im.Comment=Kf,im.Warning=Hf,im.AtRule=$f,im.Result=qf,im.Input=Qf,im.Rule=sm,im.Root=rm,im.Node=nm,Wf.registerPostcss(im);var om=im;im.default=im;const am=bu(om);am.stringify,am.fromJSON,am.plugin,am.parse,am.list,am.document,am.comment,am.atRule,am.rule,am.decl,am.root,am.CssSyntaxError,am.Declaration,am.Container,am.Processor,am.Document,am.Comment,am.Warning,am.AtRule,am.Result,am.Input,am.Rule,am.Root,am.Node;var lm=Object.defineProperty,cm=(e,t,s)=>((e,t,s)=>t in e?lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function hm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function um(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var pm={exports:{}},dm=String,fm=function(){return{isColorSupported:!1,reset:dm,bold:dm,dim:dm,italic:dm,underline:dm,inverse:dm,hidden:dm,strikethrough:dm,black:dm,red:dm,green:dm,yellow:dm,blue:dm,magenta:dm,cyan:dm,white:dm,gray:dm,bgBlack:dm,bgRed:dm,bgGreen:dm,bgYellow:dm,bgBlue:dm,bgMagenta:dm,bgCyan:dm,bgWhite:dm}};pm.exports=fm(),pm.exports.createColors=fm;var mm=pm.exports;const gm=um(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let ym=mm,wm=gm,bm=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=ym.isColorSupported),wm&&e&&(t=wm(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=ym.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var vm=bm;bm.default=bm;var Cm={};Cm.isClean=Symbol("isClean"),Cm.my=Symbol("my");const Sm={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let km=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Sm[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Sm[s]),i.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Im=km;km.default=km;let xm=Im;function Om(e,t){new xm(t).stringify(e)}var Am=Om;Om.default=Om;let{isClean:Em,my:Rm}=Cm,Mm=vm,Nm=Im,_m=Am;function Tm(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Tm(e,s)):("object"===i&&null!==n&&(n=Tm(n)),s[r]=n)}return s}let Pm=class{constructor(e={}){this.raws={},this[Em]=!1,this[Rm]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Tm(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Mm(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Em]){this[Em]=!1;let e=this;for(;e=e.parent;)e[Em]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Nm).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=_m){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Lm=Pm;Pm.default=Pm;let Fm=Lm,Dm=class extends Fm{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Bm=Dm;Dm.default=Dm;var Um={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:jm,SourceMapGenerator:zm}=gm,{existsSync:Vm,readFileSync:Wm}=gm,{dirname:Ym,join:Gm}=gm;let Zm=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ym(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new jm(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Ym(e),Vm(e))return this.mapFile=e,Wm(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof jm)return zm.fromSourceMap(t).toString();if(t instanceof zm)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Gm(Ym(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Jm=Zm;Zm.default=Zm;let{SourceMapConsumer:Xm,SourceMapGenerator:Hm}=gm,{fileURLToPath:Km,pathToFileURL:$m}=gm,{isAbsolute:qm,resolve:Qm}=gm,{nanoid:eg}=Um,tg=gm,sg=vm,rg=Jm,ng=Symbol("fromOffsetCache"),ig=Boolean(Xm&&Hm),og=Boolean(Qm&&qm),ag=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!og||/^\w+:\/\//.test(t.from)||qm(t.from)?this.file=t.from:this.file=Qm(t.from)),og&&ig){let e=new rg(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+eg(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new sg(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new sg(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&($m&&(n.input.url=$m(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[ng])s=this[ng];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[ng]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qm(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=qm(a.source)?$m(a.source):new URL(a.source,this.map.consumer().sourceRoot||$m(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!Km)throw new Error("file: protocol is not available in this PostCSS build");l.file=Km(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var lg=ag;ag.default=ag,tg&&tg.registerInput&&tg.registerInput(ag);let{SourceMapConsumer:cg,SourceMapGenerator:hg}=gm,{dirname:ug,relative:pg,resolve:dg,sep:fg}=gm,{pathToFileURL:mg}=gm,gg=lg,yg=Boolean(cg&&hg),wg=Boolean(ug&&dg&&pg&&fg);var bg=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,s=this.toUrl(this.path(e.file)),r=e.root||ug(e.file);!1===this.mapOpts.sourcesContent?(t=new cg(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),wg&&yg&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=hg.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new hg({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new hg({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ug(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=ug(dg(s,this.mapOpts.annotation)));let r=pg(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new gg(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(mg){let t=mg(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===fg&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let vg=Lm,Cg=class extends vg{constructor(e){super(e),this.type="comment"}};var Sg=Cg;Cg.default=Cg;let kg,Ig,xg,Og,{isClean:Ag,my:Eg}=Cm,Rg=Bm,Mg=Sg,Ng=Lm;function _g(e){return e.map(e=>(e.nodes&&(e.nodes=_g(e.nodes)),delete e.source,e))}function Tg(e){if(e[Ag]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Tg(t)}let Pg=class e extends Ng{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=_g(kg(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Rg(t)]}else if(t.selector)t=[new Ig(t)];else if(t.name)t=[new xg(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Mg(t)]}return t.map(t=>(t[Eg]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ag]&&Tg(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Pg.registerParse=e=>{kg=e},Pg.registerRule=e=>{Ig=e},Pg.registerAtRule=e=>{xg=e},Pg.registerRoot=e=>{Og=e};var Lg=Pg;Pg.default=Pg,Pg.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,xg.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ig.prototype):"decl"===e.type?Object.setPrototypeOf(e,Rg.prototype):"comment"===e.type?Object.setPrototypeOf(e,Mg.prototype):"root"===e.type&&Object.setPrototypeOf(e,Og.prototype),e[Eg]=!0,e.nodes&&e.nodes.forEach(e=>{Pg.rebuild(e)})};let Fg,Dg,Bg=Lg,Ug=class extends Bg{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Fg(new Dg,this,e).stringify()}};Ug.registerLazyResult=e=>{Fg=e},Ug.registerProcessor=e=>{Dg=e};var jg=Ug;Ug.default=Ug;let zg={};var Vg=function(e){zg[e]||(zg[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Wg=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Yg=Wg;Wg.default=Wg;let Gg=Yg,Zg=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new Gg(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Jg=Zg;Zg.default=Zg;const Xg="'".charCodeAt(0),Hg='"'.charCodeAt(0),Kg="\\".charCodeAt(0),$g="/".charCodeAt(0),qg="\n".charCodeAt(0),Qg=" ".charCodeAt(0),ey="\f".charCodeAt(0),ty="\t".charCodeAt(0),sy="\r".charCodeAt(0),ry="[".charCodeAt(0),ny="]".charCodeAt(0),iy="(".charCodeAt(0),oy=")".charCodeAt(0),ay="{".charCodeAt(0),ly="}".charCodeAt(0),cy=";".charCodeAt(0),hy="*".charCodeAt(0),uy=":".charCodeAt(0),py="@".charCodeAt(0),dy=/[\t\n\f\r "#'()/;[\\\]{}]/g,fy=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,my=/.[\r\n"'(/\\]/,gy=/[\da-f]/i;let yy=Lg,wy=class extends yy{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var by=wy;wy.default=wy,yy.registerAtRule(wy);let vy,Cy,Sy=Lg,ky=class extends Sy{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new vy(new Cy,this,e).stringify()}};ky.registerLazyResult=e=>{vy=e},ky.registerProcessor=e=>{Cy=e};var Iy=ky;ky.default=ky,Sy.registerRoot(ky);let xy={comma:e=>xy.split(e,[","],!0),space:e=>xy.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Oy=xy;xy.default=xy;let Ay=Lg,Ey=Oy,Ry=class extends Ay{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ey.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var My=Ry;Ry.default=Ry,Ay.registerRule(Ry);let Ny=Bm,_y=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case qg:case Qg:case ty:case sy:case ey:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===Qg||s===qg||s===ty||s===sy||s===ey);u=["space",p.slice(m,r)],m=r-1;break;case ry:case ny:case ay:case ly:case uy:case cy:case oy:{let e=String.fromCharCode(s);u=[e,e,m];break}case iy:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Xg&&h!==Hg&&h!==Qg&&h!==qg&&h!==ty&&h!==ey&&h!==sy){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===Kg;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||my.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case Xg:case Hg:n=s===Xg?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===Kg;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case py:dy.lastIndex=m+1,dy.test(p),r=0===dy.lastIndex?p.length-1:dy.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case Kg:for(r=m,o=!0;p.charCodeAt(r+1)===Kg;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==$g&&s!==Qg&&s!==qg&&s!==ty&&s!==sy&&s!==ey&&(r+=1,gy.test(p.charAt(r)))){for(;gy.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===Qg&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===$g&&p.charCodeAt(m+1)===hy?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(fy.lastIndex=m+1,fy.test(p),r=0===fy.lastIndex?p.length-1:fy.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ty=Sg,Py=by,Ly=Iy,Fy=My;const Dy={empty:!0,space:!0};let By=Lg,Uy=class{constructor(e){this.input=e,this.root=new Ly,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,s,r,n=new Py;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ty;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=_y(this.input)}decl(e,t){let s=new Ny;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Fy;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Dy[a]||Dy[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Fy;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},jy=lg;function zy(e,t){let s=new jy(e,t),r=new Uy(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var Vy=zy;zy.default=zy,By.registerParse(zy);let{isClean:Wy,my:Yy}=Cm,Gy=bg,Zy=Am,Jy=Lg,Xy=jg,Hy=Vg,Ky=Jg,$y=Vy,qy=Iy;const Qy={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ew={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},tw={Once:!0,postcssPlugin:!0,prepare:!0};function sw(e){return"object"==typeof e&&"function"==typeof e.then}function rw(e){let t=!1,s=Qy[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function nw(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:rw(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function iw(e){return e[Wy]=!1,e.nodes&&e.nodes.forEach(e=>iw(e)),e}let ow={},aw=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof Ky)n=iw(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=$y;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[Yy]&&Jy.rebuild(n)}else n=iw(s);this.result=new Ky(t,n,r),this.helpers={...ow,postcss:ow,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!ew[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!tw[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(sw(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Wy];){e[Wy]=!0;let s=[nw(e)];for(;s.length>0;){let e=this.visitTick(s);if(sw(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return sw(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Zy;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Gy(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(sw(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Wy];)e[Wy]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Hy("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(sw(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[Wy])return r[Wy]=!0,void e.push(nw(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[Wy]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Wy]=!0;let t=rw(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[Wy]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};aw.registerPostcss=e=>{ow=e};var lw=aw;aw.default=aw,qy.registerLazyResult(aw),Xy.registerLazyResult(aw);let cw=bg,hw=Am,uw=Vg,pw=Vy;const dw=Jg;let fw=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=hw;this.result=new dw(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new cw(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||uw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=pw;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var mw=fw;fw.default=fw;let gw=mw,yw=lw,ww=jg,bw=Iy,vw=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new yw(this,e,t):new gw(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Cw=vw;vw.default=vw,bw.registerProcessor(vw),ww.registerProcessor(vw);let Sw=Bm,kw=Jm,Iw=Sg,xw=by,Ow=lg,Aw=Iy,Ew=My;function Rw(e,t){if(Array.isArray(e))return e.map(e=>Rw(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ow.prototype};s.map&&(s.map={...s.map,__proto__:kw.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Rw(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Aw(r);if("decl"===r.type)return new Sw(r);if("rule"===r.type)return new Ew(r);if("comment"===r.type)return new Iw(r);if("atrule"===r.type)return new xw(r);throw new Error("Unknown node type: "+e.type)}var Mw=Rw;Rw.default=Rw;let Nw=vm,_w=Bm,Tw=lw,Pw=Lg,Lw=Cw,Fw=Am,Dw=Mw,Bw=jg,Uw=Yg,jw=Sg,zw=by,Vw=Jg,Ww=lg,Yw=Vy,Gw=Oy,Zw=My,Jw=Iy,Xw=Lm;function Hw(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Lw(e)}Hw.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new Lw).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return Hw([n(s)]).process(e,t)},n},Hw.stringify=Fw,Hw.parse=Yw,Hw.fromJSON=Dw,Hw.list=Gw,Hw.comment=e=>new jw(e),Hw.atRule=e=>new zw(e),Hw.decl=e=>new _w(e),Hw.rule=e=>new Zw(e),Hw.root=e=>new Jw(e),Hw.document=e=>new Bw(e),Hw.CssSyntaxError=Nw,Hw.Declaration=_w,Hw.Container=Pw,Hw.Processor=Lw,Hw.Document=Bw,Hw.Comment=jw,Hw.Warning=Uw,Hw.AtRule=zw,Hw.Result=Vw,Hw.Input=Ww,Hw.Rule=Zw,Hw.Root=Jw,Hw.Node=Xw,Tw.registerPostcss(Hw);var Kw=Hw;Hw.default=Hw;const $w=hm(Kw);$w.stringify,$w.fromJSON,$w.plugin,$w.parse,$w.list,$w.document,$w.comment,$w.atRule,$w.rule,$w.decl,$w.root,$w.CssSyntaxError,$w.Declaration,$w.Container,$w.Processor,$w.Document,$w.Comment,$w.Warning,$w.AtRule,$w.Result,$w.Input,$w.Rule,$w.Root,$w.Node;class qw{constructor(...e){cm(this,"parentElement",null),cm(this,"parentNode",null),cm(this,"ownerDocument"),cm(this,"firstChild",null),cm(this,"lastChild",null),cm(this,"previousSibling",null),cm(this,"nextSibling",null),cm(this,"ELEMENT_NODE",1),cm(this,"TEXT_NODE",3),cm(this,"nodeType"),cm(this,"nodeName"),cm(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof qw))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Qw={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},eb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tb={};function sb(e){if(tb[e])return tb[e];const t=globalThis[e],s=t.prototype,r=e in Qw?Qw[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in eb?eb[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return tb[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?tb[e]=i:s}catch{return s}}const rb={};function nb(e,t,s){var r;const n=`${e}.${String(s)}`;if(rb[n])return rb[n].call(t);const i=sb(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(rb[n]=o,o.call(t)):t[s]}const ib={};function ob(e,t,s){const r=`${e}.${String(s)}`;if(ib[r])return ib[r].bind(t);const n=sb(e)[s];return"function"!=typeof n?t[s]:(ib[r]=n,n.bind(t))}const ab={childNodes:function(e){return nb("Node",e,"childNodes")},parentNode:function(e){return nb("Node",e,"parentNode")},parentElement:function(e){return nb("Node",e,"parentElement")},textContent:function(e){return nb("Node",e,"textContent")},contains:function(e,t){return ob("Node",e,"contains")(t)},getRootNode:function(e){return ob("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?nb("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?nb("Element",e,"shadowRoot"):null},querySelector:function(e,t){return nb("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return nb("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return sb("MutationObserver").constructor}};const lb="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let cb={map:{},getId:()=>(console.error(lb),-1),getNode:()=>(console.error(lb),null),removeNodeFromMap(){console.error(lb)},has:()=>(console.error(lb),!1),reset(){console.error(lb)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(cb=new Proxy(cb,{get:(e,t,s)=>("map"===t&&console.error(lb),Reflect.get(e,t,s))}));let hb=Date.now;function ub(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:ab.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(hb=()=>(new Date).getTime());function pb(e){var t;let s=null;return"getRootNode"in e&&(null==(t=ab.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ab.host(ab.getRootNode(e))&&(s=ab.host(ab.getRootNode(e))),s}function db(e){let t,s=e;for(;t=pb(s);)s=t;return s}function fb(e){const t=e.ownerDocument;if(!t)return!1;const s=db(e);return ab.contains(t,s)}const mb=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){iu(this,"id",1),iu(this,"styleIDMap",new WeakMap),iu(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return cb},closestElementOfNode:ub,getBaseDimension:function e(t,s){var r,n;const i=null==(n=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:n.frameElement;if(!i||i===s)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=e(i,s),l=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,s){const r=t[s[0]];return 1===s.length?r:e(r.cssRules[s[1]].cssRules,s.slice(2))},getPositionsAndIndex:function(e){const t=[...e],s=t.pop();return{positions:t,index:s}},getRootShadowHost:db,getShadowHost:pb,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,s,r,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=ab.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=ab.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof qw&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(ab.shadowRoot(e)))},hookSetter:function e(t,s,r,n,i=window){const o=i.Object.getOwnPropertyDescriptor(t,s);return i.Object.defineProperty(t,s,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,s,o||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(ab.contains(t,e)||fb(e))},isAncestorRemoved:function e(t,s){if(function(e){const t=e&&"host"in e&&"mode"in e&&gu.host(e)||null;return Boolean(t&&"shadowRoot"in t&&gu.shadowRoot(t)===e)}(t))return!1;const r=s.getId(t);if(!s.has(r))return!0;const n=ab.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,s))},isBlocked:function(e,t,s,r){if(!e)return!1;const n=ub(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(wu(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1},isIgnored:function(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,s){s(t.value);for(let r=t.children.length-1;r>=0;r--)e(t.children[r],s)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return hb},on:function(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)},patch:function(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}},polyfill:function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},queueToResolveTrees:function(e){const t={},s=(e,s)=>{const r={value:e,parent:s,children:[]};return t[e.node.id]=r,r},r=[];for(const n of e){const{nextId:e,parentId:i}=n;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,s(n,i.parent))}else{const e=r.indexOf(i);r.splice(e,0,s(n,null))}}else if(i in t){const e=t[i];e.children.push(s(n,e))}else r.push(s(n,null))}return r},shadowHostInDom:fb,throttle:function(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}},uniqueTextMutations:function(e){const t=new Set,s=[];for(let r=e.length;r--;){const n=e[r];t.has(n.id)||(s.push(n),t.add(n.id))}return s}},Symbol.toStringTag,{value:"Module"}));for(var gb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yb="undefined"==typeof Uint8Array?[]:new Uint8Array(256),wb=0;wb<64;wb++)yb[gb.charCodeAt(wb)]=wb;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0)))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(qh=e.contentWindow)?void 0:qh.Array.from)||Array.from,document.body.removeChild(e)}}catch(Kb){console.debug("Unable to override Array.from",Kb)}var bb;new yu,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(bb||(bb={}));class vb{constructor(e){ru(this,"fileName"),ru(this,"functionName"),ru(this,"lineNumber"),ru(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const Cb=/(^|@)\S+:\d+/,Sb=/^\s*at .*(\S+:\d+|\(native\))/m,kb=/^(eval@)?(\[native code])?$/,Ib={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Sb)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Sb)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const s=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=s?t.replace(s[0],""):t;const r=t.split(/\s+/).slice(1),n=this.extractLocation(s?s[1]:r.pop()),i=r.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new vb({functionName:i,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(kb)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new vb({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=e.match(t),r=s&&s[1]?s[1]:void 0,n=this.extractLocation(e.replace(t,""));return new vb({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,s=e.message.split("\n"),r=[];for(let n=2,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new vb({fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,s=e.stacktrace.split("\n"),r=[];for(let n=0,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new vb({functionName:e[3]||void 0,fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Cb)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),s=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new vb({functionName:r,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})},this)}};function xb(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let s=e.localName;if(!s)break;s=s.toLowerCase();const r=e.parentElement,n=[];if(r.children&&r.children.length>0)for(let e=0;e<r.children.length;e++){const t=r.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===s&&n.push(t)}n.length>1&&(s+=`:eq(${n.indexOf(e)})`),t=s+(t?">"+t:""),e=r}return t}function Ob(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ab(e,t){if(0===t)return!0;const s=Object.keys(e);for(const r of s)if(Ob(e[r])&&Ab(e[r],t-1))return!0;return!1}function Eb(e,t){const s={numOfKeysLimit:50,depthOfLimit:4};Object.assign(s,t);const r=[],n=[];return JSON.stringify(e,function(e,t){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?n.splice(s,1/0,e):n.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Ob(e)&&Object.keys(e).length>s.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Ob(e)&&Ab(e,s.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();s.stringLengthLimit&&t.length>s.stringLengthLimit&&(t=`${t.slice(0,s.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const s in t){const r=t[s];Array.isArray(r)?e[s]=xb(r.length?r[0]:null):e[s]=r}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const Rb={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Mb(e,t,s){const r=s?Object.assign({},Rb,s):Rb,n=r.logger;if(!n)return()=>{};let i;i="string"==typeof n?t[n]:n;let o=0,a=!1;const l=[];if(r.level.includes("error")){const s=t=>{const s=t.message,n=t.error,i=Ib.parse(n).map(e=>e.toString()),o=[Eb(s,r.stringifyOptions)];e({level:"error",trace:i,payload:o})};t.addEventListener("error",s),l.push(()=>{t.removeEventListener("error",s)});const n=t=>{let s,n;t.reason instanceof Error?(s=t.reason,n=[Eb(`Uncaught (in promise) ${s.name}: ${s.message}`,r.stringifyOptions)]):(s=new Error,n=[Eb("Uncaught (in promise)",r.stringifyOptions),Eb(t.reason,r.stringifyOptions)]);const i=Ib.parse(s).map(e=>e.toString());e({level:"error",trace:i,payload:n})};t.addEventListener("unhandledrejection",n),l.push(()=>{t.removeEventListener("unhandledrejection",n)})}for(const h of r.level)l.push(c(i,h));return()=>{l.forEach(e=>e())};function c(t,s){return t[s]?mb.patch(t,s,t=>(...n)=>{if(t.apply(this,n),!("assert"===s&&n[0]||a)){a=!0;try{const t=Ib.parse(new Error).map(e=>e.toString()).splice(1),i=("assert"===s?n.slice(1):n).map(e=>Eb(e,r.stringifyOptions));o++,o<r.lengthThreshold?e({level:s,trace:t,payload:i}):o===r.lengthThreshold&&e({level:"warn",trace:[],payload:[Eb("The number of log records reached the threshold.")]})}catch(i){t("rrweb logger error:",i,...n)}finally{a=!1}}}):()=>{}}}const Nb={recordOptions:{blockClass:"bf-nocapture",blockSelector:void 0,ignoreClass:"bf-ignore-input",ignoreCSSAttributes:void 0,maskTextClass:"bf-mask",maskTextSelector:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,maskTextFn:void 0},recordConsolePlugin:{level:["error"],lengthThreshold:Number.POSITIVE_INFINITY,stringifyOptions:{stringLengthLimit:Number.POSITIVE_INFINITY,numOfKeysLimit:Number.POSITIVE_INFINITY,depthOfLimit:Number.POSITIVE_INFINITY}},samplingOptions:{scroll:150,media:1e3,canvas:8,input:"last"}};class _b{constructor(e){var t;__publicField(this,"options"),__publicField(this,"stop"),this.options={...Nb.recordOptions,emit:e,plugins:[(t=Nb.recordConsolePlugin,{name:"rrweb/console@1",observer:Mb,options:t})],sampling:Nb.samplingOptions},this.stop=null}static mockImplementation(e){throw new Error("Method not implemented.")}start(){this.stop=Yh(this.options)??null}getMirror(){return Yh.mirror}takeFullSnapshot(){return Yh.takeFullSnapshot()}}class Tb{constructor(e){__publicField(this,"recordingManager"),__publicField(this,"isRunning"),__publicField(this,"events"),this.recordingManager=e,this.isRunning=!1,this.events=[]}start(){this.isRunning=!0}handle(e){this.isInitializingEvent(e)?this.events.push(e):this.stop(e)}isInitializingEvent(e){return[2,4].includes(e.type)||this.isSelectionEvent(e)||this.isConsoleEvent(e)}isSelectionEvent(e){return 3===e.type&&14===e.data.source}isConsoleEvent(e){return 6===e.type}stop(e){this.stamp(this.events,e.timestamp-1),this.publish(...this.events,e),this.events=[],this.isRunning=!1}stamp(e,t){e.forEach(e=>e.timestamp=t)}publish(...e){e.forEach(e=>{this.recordingManager.publishEvent(e)})}}function Pb(e,t){void 0===t&&(t={});for(var s=function(e){for(var t=[],s=0;s<e.length;){var r=e[s];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:s,value:e[s++]});else{var n=1,i="";if("?"===e[a=s+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0===--n){a++;break}}else if("("===e[a]&&(n++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(n)throw new TypeError("Unbalanced pattern at ".concat(s));if(!i)throw new TypeError("Missing pattern at ".concat(s));t.push({type:"PATTERN",index:s,value:i}),s=a}else{for(var o="",a=s+1;a<e.length;){var l=e.charCodeAt(a);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[a++]}if(!o)throw new TypeError("Missing parameter name at ".concat(s));t.push({type:"NAME",index:s,value:o}),s=a}else t.push({type:"CLOSE",index:s,value:e[s++]});else t.push({type:"OPEN",index:s,value:e[s++]});else t.push({type:"ESCAPED_CHAR",index:s++,value:e[s++]});else t.push({type:"MODIFIER",index:s,value:e[s++]})}return t.push({type:"END",index:s,value:""}),t}(e),r=t.prefixes,n=void 0===r?"./":r,i=t.delimiter,o=void 0===i?"/#?":i,a=[],l=0,c=0,h="",u=function(e){if(c<s.length&&s[c].type===e)return s[c++].value},p=function(e){var t=u(e);if(void 0!==t)return t;var r=s[c],n=r.type,i=r.index;throw new TypeError("Unexpected ".concat(n," at ").concat(i,", expected ").concat(e))},d=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t},f=function(e){var t=a[a.length-1],s=e||(t&&"string"==typeof t?t:"");if(t&&!s)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!s||function(e){for(var t=0,s=o;t<s.length;t++){var r=s[t];if(e.indexOf(r)>-1)return!0}return!1}(s)?"[^".concat(Fb(o),"]+?"):"(?:(?!".concat(Fb(s),")[^").concat(Fb(o),"])+?")};c<s.length;){var m=u("CHAR"),g=u("NAME"),y=u("PATTERN");if(g||y){var w=m||"";-1===n.indexOf(w)&&(h+=w,w=""),h&&(a.push(h),h=""),a.push({name:g||l++,prefix:w,suffix:"",pattern:y||f(w),modifier:u("MODIFIER")||""})}else{var b=m||u("ESCAPED_CHAR");if(b)h+=b;else if(h&&(a.push(h),h=""),u("OPEN")){w=d();var v=u("NAME")||"",C=u("PATTERN")||"",S=d();p("CLOSE"),a.push({name:v||(C?l++:""),pattern:v&&!C?f(w):C,prefix:w,suffix:S,modifier:u("MODIFIER")||""})}else p("END")}}return a}function Lb(e,t){var s=[];return function(e,t,s){void 0===s&&(s={});var r=s.decode,n=void 0===r?function(e){return e}:r;return function(s){var r=e.exec(s);if(!r)return!1;for(var i=r[0],o=r.index,a=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var s=t[e-1];"*"===s.modifier||"+"===s.modifier?a[s.name]=r[e].split(s.prefix+s.suffix).map(function(e){return n(e,s)}):a[s.name]=n(r[e],s)},c=1;c<r.length;c++)l(c);return{path:i,index:o,params:a}}}(Ub(e,s,t),s,t)}function Fb(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Db(e){return e&&e.sensitive?"":"i"}function Bb(e,t,s){return function(e,t,s){void 0===s&&(s={});for(var r=s.strict,n=void 0!==r&&r,i=s.start,o=void 0===i||i,a=s.end,l=void 0===a||a,c=s.encode,h=void 0===c?function(e){return e}:c,u=s.delimiter,p=void 0===u?"/#?":u,d=s.endsWith,f="[".concat(Fb(void 0===d?"":d),"]|$"),m="[".concat(Fb(p),"]"),g=o?"^":"",y=0,w=e;y<w.length;y++){var b=w[y];if("string"==typeof b)g+=Fb(h(b));else{var v=Fb(h(b.prefix)),C=Fb(h(b.suffix));if(b.pattern)if(t&&t.push(b),v||C)if("+"===b.modifier||"*"===b.modifier){var S="*"===b.modifier?"?":"";g+="(?:".concat(v,"((?:").concat(b.pattern,")(?:").concat(C).concat(v,"(?:").concat(b.pattern,"))*)").concat(C,")").concat(S)}else g+="(?:".concat(v,"(").concat(b.pattern,")").concat(C,")").concat(b.modifier);else{if("+"===b.modifier||"*"===b.modifier)throw new TypeError('Can not repeat "'.concat(b.name,'" without a prefix and suffix'));g+="(".concat(b.pattern,")").concat(b.modifier)}else g+="(?:".concat(v).concat(C,")").concat(b.modifier)}}if(l)n||(g+="".concat(m,"?")),g+=s.endsWith?"(?=".concat(f,")"):"$";else{var k=e[e.length-1],I="string"==typeof k?m.indexOf(k[k.length-1])>-1:void 0===k;n||(g+="(?:".concat(m,"(?=").concat(f,"))?")),I||(g+="(?=".concat(m,"|").concat(f,")"))}return new RegExp(g,Db(s))}(Pb(e,s),t,s)}function Ub(e,t,s){return e instanceof RegExp?function(e,t){if(!t)return e;for(var s=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,n=s.exec(e.source);n;)t.push({name:n[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),n=s.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,s){var r=e.map(function(e){return Ub(e,t,s).source});return new RegExp("(?:".concat(r.join("|"),")"),Db(s))}(e,t,s):Bb(e,t,s)}function jb(e,t){if(function(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e}()&&!t)return!1;const s=window.location.pathname;for(const n of e)try{if(Lb(n,{decode:decodeURIComponent})(s))return!1}catch(r){if(n===s)return!1}return!0}const zb=[eu.MouseMove,eu.MouseInteraction,eu.Scroll,eu.ViewportResize,eu.Input,eu.TouchMove,eu.MediaInteraction,eu.Drag];class Vb{constructor(e){__publicField(this,"agent"),__publicField(this,"recorder"),__publicField(this,"stasher"),this.agent=e,this.recorder=new _b(this.handleEvent.bind(this)),this.stasher=new Tb(this)}start(){this.recorder.start()}handleEvent(e){const t=new URL(window.location.href),s=t.origin+t.pathname;if(jb(this.agent.recordingBlocklist,this.agent._allowLocalhostRecording)){if(this.agent.sessionManager.isIdle){if(!this.isInteractiveEvent(e))return;this.agent.handleActivityDuringIdle()}if(this.isClick(e)){let t=Yh.mirror.getNode(e.data.id);t&&this.nodeIsInteresting(t)&&(e.conversionData={},e.conversionData.eventType="click",e.conversionData.textContent=t.textContent,e.conversionData.htmlElement=t.nodeName?.toLowerCase(),e.conversionData.location=s)}this.isCustom(e)&&(e.conversionData={},e.conversionData.eventType="custom",e.conversionData.customEventType=e.data.tag,e.conversionData.location=s),this.stasher.isRunning?this.stasher.handle(e):this.publishEvent(e)}}publishEvent(e){this.agent.sender.handle(e),this.agent.timer&&this.agent.timer.restart()}startRecorderWithStasher(){this.stasher.start(),this.recorder=new _b(this.handleEvent.bind(this)),this.recorder.start()}isClick(e){return e.type===Qh.IncrementalSnapshot&&e.data.source===eu.MouseInteraction&&e.data.type===tu.Click}nodeIsInteresting(e){return"BUTTON"===e.nodeName||"ANCHOR"===e.nodeName}isCustom(e){return e.type===Qh.Custom}isInteractiveEvent(e){return e.type===Qh.IncrementalSnapshot&&zb.includes(e.data?.source)}}class Wb{constructor(e,t){__publicField(this,"agent"),__publicField(this,"MAX_IDLE_TIME"),__publicField(this,"timeoutId"),this.agent=e,this.MAX_IDLE_TIME=t,this.timeoutId=0}restart(){this.stop(),this.start()}stop(){clearTimeout(this.timeoutId)}start(){this.timeoutId=window.setTimeout(this.agent.handleTimeout.bind(this.agent),this.MAX_IDLE_TIME)}}const Yb=class e{constructor(){__publicField(this,"sessionId",null),__publicField(this,"lastScreenViewEventTime",0),__publicField(this,"isIdle",!1)}static getInstance(){return e.instance||(e.instance=new e),e.instance}determineSessionState(e){return!this.sessionId&&e?"new":this.sessionId&&e&&this.sessionId!==e?"changed":this.sessionId===e&&null!==this.sessionId?"active":"expired"}handleSessionTransition(e,t){switch(e){case"new":case"changed":this.updateIdleStatus(!1),t.takeFullSnapshot?.()}}updateSession(e,t={}){const s=this.determineSessionState(e);this.handleSessionTransition(s,t),this.sessionId=e}updateLastScreenViewEventTime(){this.lastScreenViewEventTime=Date.now()}updateIdleStatus(e){this.isIdle=e}getLastScreenViewEventTime(){return this.lastScreenViewEventTime}getCurrentSessionId(){return this.sessionId}};__publicField(Yb,"instance");let Gb=Yb;const Zb=class e{constructor(){__publicField(this,"recordingManager"),__publicField(this,"sender"),__publicField(this,"MAX_IDLE_TIME"),__publicField(this,"timer"),__publicField(this,"sendEvents"),__publicField(this,"sendScreenViewEvent"),__publicField(this,"recordingBlocklist",[]),__publicField(this,"_allowLocalhostRecording"),__publicField(this,"sessionCreationPromise",null),this.recordingManager=new Vb(this),this.sender=new $h(this)}get sessionManager(){return e._sessionManager}async start({sendEvents:e,sendScreenViewEvent:t,recordingBlocklist:s,_allowLocalhostRecording:r}){this.sendEvents=e,this.sendScreenViewEvent=t,this.recordingBlocklist=s,this._allowLocalhostRecording=r,this.MAX_IDLE_TIME=6e4,this.timer=new Wb(this,this.MAX_IDLE_TIME),this.sender.start(),this.recordingManager.start()}handleTimeout(){this.recordingManager.recorder.stop&&this.recordingManager.recorder.stop(),this.sender.send(),this.recordingManager.startRecorderWithStasher(),e._sessionManager.updateIdleStatus(!0)}handleActivityDuringIdle(){null===e._sessionManager.getCurrentSessionId()&&(e._sessionManager.getLastScreenViewEventTime()>Date.now()-5e3||this.sessionCreationPromise||(this.sessionCreationPromise=this.createSession().finally(()=>{this.sessionCreationPromise=null})))}takeFullSnapshot(){return this.recordingManager.recorder.takeFullSnapshot()}static handleCustomEvent(e){Yh.addCustomEvent(e,null)}async createSession(){if(this.sendScreenViewEvent)try{this.sendScreenViewEvent({__path:window.location.href,__title:document.title,__is_session_refresh:!0})}catch(e){console.error("Failed to send screen_view event:",e)}}};__publicField(Zb,"_sessionManager",Gb.getInstance());let Jb=Zb;function Xb(e){return e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace("-","").replace("_",""))}class Hb extends _e{constructor(e){if(super({sdk:"web",sdkVersion:"0.0.26",...e}),__publicField(this,"lastPath",""),__publicField(this,"debounceTimer",null),__publicField(this,"agent"),__publicField(this,"sessionManager",Gb.getInstance()),__publicField(this,"recordingBlocklist",[]),__publicField(this,"isRecordingActive",!1),this.options=e,this.agent=new Jb,this.recordingBlocklist=e.recordingBlocklist||[],!this.isServer()){this.setGlobalProperties({__referrer:document.referrer});const e=this.isTrackingDisabled();this.options.trackOutgoingLinks&&!e&&this.trackOutgoingLinks(),this.options.trackScreenViews&&this.trackScreenViews(),this.options.trackAttributes&&!e&&this.trackAttributes(),this.options.enableRecording&&!e&&(this.startRecording(),this.isRecordingActive=!0,console.log("Brainfish has started ambient learning"))}}debounce(e,t){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(e,t)}isServer(){return"undefined"==typeof document}trackOutgoingLinks(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("a");if(s&&t){const e=s.getAttribute("href");e?.startsWith("http")&&super.track("link_out",{href:e,text:s.innerText||s.getAttribute("title")||t.getAttribute("alt")||t.getAttribute("title")})}})}trackScreenViews(){if(this.isServer())return;this.screenView();const e=history.pushState;history.pushState=function(...t){const s=e.apply(this,t);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s};const t=history.replaceState;history.replaceState=function(...e){const s=t.apply(this,e);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s},window.addEventListener("popstate",function(){window.dispatchEvent(new Event("locationchange"))});const s=()=>this.debounce(()=>this.screenView(),100);this.options.trackHashChanges?window.addEventListener("hashchange",s):window.addEventListener("locationchange",s)}trackAttributes(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("button"),r=t.closest("a"),n=s?.getAttribute("data-track")?s:r?.getAttribute("data-track")?r:null;if(n){const e={};for(const s of n.attributes)s.name.startsWith("data-")&&"data-track"!==s.name&&(e[Xb(s.name.replace(/^data-/,""))]=s.value);const t=n.getAttribute("data-track");t&&super.track(t,e)}})}startRecording(){this.isServer()||this.agent.start({sendEvents:this.recordEventsToServer.bind(this),sendScreenViewEvent:this.sendScreenViewEvent.bind(this),recordingBlocklist:this.recordingBlocklist,_allowLocalhostRecording:this.options._allowLocalhostRecording})}async screenView(e,t){if(this.isServer())return;let s,r;if("string"==typeof e?(s=e,r=t):(s=window.location.href,r=e),this.lastPath===s)return;this.lastPath=s;const n={...r??{},__path:s,__title:document.title};this.sendScreenViewEvent(n)}async recordEventsToServer(e){const t=await this.record(e);this.sessionManager.updateSession(t,{takeFullSnapshot:()=>{this.agent.takeFullSnapshot()}})}sendScreenViewEvent(e){super.track("screen_view",e),this.sessionManager.updateLastScreenViewEventTime()}disableTracking(){super.disableTracking(),this.isRecordingActive&&(this.agent.recordingManager.recorder.stop&&this.agent.recordingManager.recorder.stop(),this.isRecordingActive=!1,console.log("Brainfish has stopped ambient learning"))}enableTracking(){super.enableTracking()}}(e=>{if(e.BrainfishAnalytics&&"q"in e.BrainfishAnalytics){const t=e.BrainfishAnalytics.q||[],s=t.findIndex(e=>"init"===e[0]);if(-1===s)return void console.warn("BrainfishAnalytics has not been initialized.");const[r]=t.splice(s,1),n=new Hb(r[1]);t.forEach(e=>{e[0]in n&&n[e[0]](...e.slice(1))}),e.BrainfishAnalytics=(e,...t)=>{const s=n[e]?n[e].bind(n):void 0;if("function"==typeof s)return s(...t);console.warn(`Method ${e} does not exist on BrainfishAnalytics`)}}})(window)}();
1
+ var __defProp=Object.defineProperty,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__publicField=(e,t,s)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,s);!function(){"use strict";const e=Object.create(null);e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);Object.keys(e).forEach(s=>{t[e[s]]=s});const s={type:"error",data:"parser error"},r="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),n="function"==typeof ArrayBuffer,i=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,o=({type:t,data:s},o,l)=>r&&s instanceof Blob?o?l(s):a(s,l):n&&(s instanceof ArrayBuffer||i(s))?o?l(s):a(new Blob([s]),l):l(e[t]+(s||"")),a=(e,t)=>{const s=new FileReader;return s.onload=function(){const e=s.result.split(",")[1];t("b"+(e||""))},s.readAsDataURL(e)};function l(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let c;const h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let $b=0;$b<64;$b++)u[h.charCodeAt($b)]=$b;const p="function"==typeof ArrayBuffer,d=(e,r)=>{if("string"!=typeof e)return{type:"message",data:m(e,r)};const n=e.charAt(0);if("b"===n)return{type:"message",data:f(e.substring(1),r)};return t[n]?e.length>1?{type:t[n],data:e.substring(1)}:{type:t[n]}:s},f=(e,t)=>{if(p){const s=(e=>{let t,s,r,n,i,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);const c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)s=u[e.charCodeAt(t)],r=u[e.charCodeAt(t+1)],n=u[e.charCodeAt(t+2)],i=u[e.charCodeAt(t+3)],h[l++]=s<<2|r>>4,h[l++]=(15&r)<<4|n>>2,h[l++]=(3&n)<<6|63&i;return c})(e);return m(s,t)}return{base64:!0,data:e}},m=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,g=String.fromCharCode(30);function y(){return new TransformStream({transform(e,t){!function(e,t){r&&e.data instanceof Blob?e.data.arrayBuffer().then(l).then(t):n&&(e.data instanceof ArrayBuffer||i(e.data))?t(l(e.data)):o(e,!1,e=>{c||(c=new TextEncoder),t(c.encode(e))})}(e,s=>{const r=s.length;let n;if(r<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,r);else if(r<65536){n=new Uint8Array(3);const e=new DataView(n.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{n=new Uint8Array(9);const e=new DataView(n.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(n[0]|=128),t.enqueue(n),t.enqueue(s)})}})}let w;function b(e){return e.reduce((e,t)=>e+t.length,0)}function v(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let r=0;for(let n=0;n<t;n++)s[n]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),s}function C(e){if(e)return function(e){for(var t in C.prototype)e[t]=C.prototype[t];return e}(e)}C.prototype.on=C.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},C.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<r.length;n++)if((s=r[n])===t||s.fn===t){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},C.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,t)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},C.prototype.hasListeners=function(e){return!!this.listeners(e).length};const S="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),k="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function I(e,...t){return t.reduce((t,s)=>(e.hasOwnProperty(s)&&(t[s]=e[s]),t),{})}const x=k.setTimeout,O=k.clearTimeout;function A(e,t){t.useNativeTimers?(e.setTimeoutFn=x.bind(k),e.clearTimeoutFn=O.bind(k)):(e.setTimeoutFn=k.setTimeout.bind(k),e.clearTimeoutFn=k.clearTimeout.bind(k))}function E(e){return"string"==typeof e?function(e){let t=0,s=0;for(let r=0,n=e.length;r<n;r++)t=e.charCodeAt(r),t<128?s+=1:t<2048?s+=2:t<55296||t>=57344?s+=3:(r++,s+=4);return s}(e):Math.ceil(1.33*(e.byteLength||e.size))}function R(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class M extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class N extends C{constructor(e){super(),this.writable=!1,A(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new M(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=d(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}(e);return t.length?"?"+t:""}}class _ extends N{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const s=e.split(g),r=[];for(let n=0;n<s.length;n++){const e=d(s[n],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const s=e.length,r=new Array(s);let n=0;e.forEach((e,i)=>{o(e,!1,e=>{r[i]=e,++n===s&&t(r.join(g))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=R()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let T=!1;try{T="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Kb){}const P=T;function L(){}class F extends _{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let s=location.port;s||(s=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class D extends C{constructor(e,t,s){super(),this.createRequest=e,A(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=void 0!==s.data?s.data:null,this._create()}_create(){var e;const t=I(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&s.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(r){}if("POST"===this._method)try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{s.setRequestHeader("Accept","*/*")}catch(r){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var e;3===s.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(s.getResponseHeader("set-cookie"))),4===s.readyState&&(200===s.status||1223===s.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof s.status?s.status:0)},0))},s.send(this._data)}catch(r){return void this.setTimeoutFn(()=>{this._onError(r)},0)}"undefined"!=typeof document&&(this._index=D.requestsCount++,D.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=L,e)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete D.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(D.requestsCount=0,D.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",B);else if("function"==typeof addEventListener){addEventListener("onpagehide"in k?"pagehide":"unload",B,!1)}function B(){for(let e in D.requests)D.requests.hasOwnProperty(e)&&D.requests[e].abort()}const U=function(){const e=j({xdomain:!1});return e&&null!==e.responseType}();function j(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||P))return new XMLHttpRequest}catch(s){}if(!t)try{return new(k[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(s){}}const z="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class V extends N{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=z?{}:I(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(Kb){return this.emitReserved("error",Kb)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;o(s,this.supportsBinary,e=>{try{this.doWrite(s,e)}catch(t){}r&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=R()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const W=k.WebSocket||k.MozWebSocket;const Y={websocket:class extends V{createSocket(e,t,s){return z?new W(e,t,s):t?new W(e,t):new W(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends N{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Kb){return this.emitReserved("error",Kb)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){w||(w=new TextDecoder);const r=[];let n=0,i=-1,o=!1;return new TransformStream({transform(a,l){for(r.push(a);;){if(0===n){if(b(r)<1)break;const e=v(r,1);o=!(128&~e[0]),i=127&e[0],n=i<126?3:126===i?1:2}else if(1===n){if(b(r)<2)break;const e=v(r,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),n=3}else if(2===n){if(b(r)<8)break;const e=v(r,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){l.enqueue(s);break}i=o*Math.pow(2,32)+t.getUint32(4),n=3}else{if(b(r)<i)break;const e=v(r,i);l.enqueue(d(o?e:w.decode(e),t)),n=0}if(0===i||i>e){l.enqueue(s);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),n=y();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();const i=()=>{r.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;this._writer.write(s).then(()=>{r&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends F{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=U&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new D(j,this.uri(),e)}}},G=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function J(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),r=e.indexOf("]");-1!=s&&-1!=r&&(e=e.substring(0,s)+e.substring(s,r).replace(/:/g,";")+e.substring(r,e.length));let n=G.exec(e||""),i={},o=14;for(;o--;)i[Z[o]]=n[o]||"";return-1!=s&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const s=/\/{2,9}/g,r=t.replace(s,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(s[t]=r)}),s}(0,i.query),i}const X="function"==typeof addEventListener&&"function"==typeof removeEventListener,H=[];X&&addEventListener("offline",()=>{H.forEach(e=>e())},!1);class K extends C{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const s=J(e);t.hostname=s.host,t.secure="https"===s.protocol||"wss"===s.protocol,t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=J(t.host).host);A(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},s=e.split("&");for(let r=0,n=s.length;r<n;r++){let e=s[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),X&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},H.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&K.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",K.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const s=this.writeBuffer[t].data;if(s&&(e+=E(s)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,S(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:e,data:t,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(K.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),X&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=H.indexOf(this._offlineEventListener);-1!==e&&H.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}K.protocol=4;class $ extends K{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;K.priorWebsocketSuccess=!1;const r=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!s)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;K.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{s||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function n(){s||(s=!0,c(),t.close(),t=null)}const i=e=>{const s=new Error("probe error: "+e);s.transport=t.name,n(),this.emitReserved("upgradeError",s)};function o(){i("transport closed")}function a(){i("socket closed")}function l(e){t&&e.name!==t.name&&n()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",o),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let q=class extends ${constructor(e,t={}){const s="object"==typeof e?e:t;(!s.transports||s.transports&&"string"==typeof s.transports[0])&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(e=>Y[e]).filter(e=>!!e)),super(e,s)}};const Q="function"==typeof ArrayBuffer,ee=Object.prototype.toString,te="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===ee.call(Blob),se="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===ee.call(File);function re(e){return Q&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||te&&e instanceof Blob||se&&e instanceof File}function ne(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,s=e.length;t<s;t++)if(ne(e[t]))return!0;return!1}if(re(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return ne(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&ne(e[s]))return!0;return!1}function ie(e){const t=[],s=e.data,r=e;return r.data=oe(s,t),r.attachments=t.length,{packet:r,buffers:t}}function oe(e,t){if(!e)return e;if(re(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}if(Array.isArray(e)){const s=new Array(e.length);for(let r=0;r<e.length;r++)s[r]=oe(e[r],t);return s}if("object"==typeof e&&!(e instanceof Date)){const s={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=oe(e[r],t));return s}return e}function ae(e,t){return e.data=le(e.data,t),delete e.attachments,e}function le(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=le(e[s],t);else if("object"==typeof e)for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=le(e[s],t));return e}const ce=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var he,ue;(ue=he||(he={}))[ue.CONNECT=0]="CONNECT",ue[ue.DISCONNECT=1]="DISCONNECT",ue[ue.EVENT=2]="EVENT",ue[ue.ACK=3]="ACK",ue[ue.CONNECT_ERROR=4]="CONNECT_ERROR",ue[ue.BINARY_EVENT=5]="BINARY_EVENT",ue[ue.BINARY_ACK=6]="BINARY_ACK";function pe(e){return"[object Object]"===Object.prototype.toString.call(e)}class de extends C{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===he.BINARY_EVENT;s||t.type===he.BINARY_ACK?(t.type=s?he.EVENT:he.ACK,this.reconstructor=new fe(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!re(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(void 0===he[s.type])throw new Error("unknown packet type "+s.type);if(s.type===he.BINARY_EVENT||s.type===he.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const n=e.substring(r,t);if(n!=Number(n)||"-"!==e.charAt(t))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}s.nsp=e.substring(r,t)}else s.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const s=e.charAt(t);if(null==s||Number(s)!=s){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!de.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case he.CONNECT:return pe(t);case he.DISCONNECT:return void 0===t;case he.CONNECT_ERROR:return"string"==typeof t||pe(t);case he.EVENT:case he.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ce.indexOf(t[0]));case he.ACK:case he.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class fe{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ae(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const me=Object.freeze(Object.defineProperty({__proto__:null,Decoder:de,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==he.EVENT&&e.type!==he.ACK||!ne(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===he.EVENT?he.BINARY_EVENT:he.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==he.BINARY_EVENT&&e.type!==he.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=ie(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}},get PacketType(){return he},protocol:5},Symbol.toStringTag,{value:"Module"}));function ge(e,t,s){return e.on(t,s),function(){e.off(t,s)}}const ye=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class we extends C{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[ge(e,"open",this.onopen.bind(this)),ge(e,"packet",this.onpacket.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,r,n;if(ye.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:he.EVENT,data:t,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,s=t.pop();this._registerAckCallback(e,s),i.id=e}const o=null===(r=null===(s=this.io.engine)||void 0===s?void 0:s.transport)||void 0===r?void 0:r.writable,a=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n._hasPingExpired());return this.flags.volatile&&!o||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var s;const r=null!==(s=this.flags.timeout)&&void 0!==s?s:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),i=(...e)=>{this.io.clearTimeoutFn(n),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((s,r)=>{const n=(e,t)=>e?r(e):s(t);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(s!==this._queue[0])return;return null!==e?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),s.pending=!1,this._drainQueue()}),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:he.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case he.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case he.EVENT:case he.BINARY_EVENT:this.onevent(e);break;case he.ACK:case he.BINARY_ACK:this.onack(e);break;case he.DISCONNECT:this.ondisconnect();break;case he.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,t.packet({type:he.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:he.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function be(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}be.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+s:e-s}return 0|Math.min(e,this.max)},be.prototype.reset=function(){this.attempts=0},be.prototype.setMin=function(e){this.ms=e},be.prototype.setMax=function(e){this.max=e},be.prototype.setJitter=function(e){this.jitter=e};class ve extends C{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,A(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=t.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new be({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||me;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new q(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=ge(t,"open",function(){s.onopen(),e&&e()}),n=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=ge(t,"error",n);if(!1!==this._timeout){const e=this._timeout,s=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),t.close()},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ge(e,"ping",this.onping.bind(this)),ge(e,"data",this.ondata.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this)),ge(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){S(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new we(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t){if(this.nsps[s].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),null===(s=this.engine)||void 0===s||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Ce={};function Se(e,t){"object"==typeof e&&(t=e,e=void 0);const s=function(e,t="",s){let r=e;s=s||"undefined"!=typeof location&&location,null==e&&(e=s.protocol+"//"+s.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?s.protocol+e:s.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==s?s.protocol+"//"+e:"https://"+e),r=J(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const n=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+n+":"+r.port+t,r.href=r.protocol+"://"+n+(s&&s.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=s.source,n=s.id,i=s.path,o=Ce[n]&&i in Ce[n].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?a=new ve(r,t):(Ce[n]||(Ce[n]=new ve(r,t)),a=Ce[n]),s.query&&!t.query&&(t.query=s.queryKey),a.socket(s.path,t)}Object.assign(Se,{Manager:ve,Socket:we,io:Se,connect:Se});class ke{constructor(e){__publicField(this,"socket"),__publicField(this,"encode"),__publicField(this,"decode"),this.socket=Se(e.baseUrl,{transports:["websocket"],path:"/analytics/ws",auth:{token:e.authToken},query:e.query}),this.encode=e.encoder??(e=>function(e){const t=(new TextEncoder).encode(e);if("undefined"!=typeof window&&"function"==typeof window.btoa){const e=Array.from(t,e=>String.fromCharCode(e)).join("");return btoa(e)}if("undefined"!=typeof Buffer)return Buffer.from(t).toString("base64");throw new Error("[utils.base64Encode]: Unsupported environment")}(JSON.stringify(e))),this.decode=e.decoder??(e=>JSON.parse((e=>{if("undefined"!=typeof window&&"function"==typeof window.atob){const t=atob(e),s=t.length,r=new Uint8Array(s);for(let e=0;e<s;e++)r[e]=t.charCodeAt(e);return(new TextDecoder).decode(r)}if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");throw new Error("[utils.base64Decode]: Unsupported environment")})(e)))}send(e,t,s){"function"==typeof s?this.socket.emit(e,this.encode(t),s):this.socket.emit(e,this.encode(t))}on(e,t){this.socket.on(e,e=>t(this.decode(e)))}}class Ie{constructor(e){__publicField(this,"baseUrl"),__publicField(this,"authToken"),__publicField(this,"sdkMetadata"),this.baseUrl=e.baseUrl,this.authToken=e.authToken,this.sdkMetadata=e.sdkMetadata}async send(e,t){const s=new URL(e,this.baseUrl),r={...t,...this.sdkMetadata&&{sdk:this.sdkMetadata}};try{const e=await fetch(s.toString(),{method:"POST",headers:{"Content-Type":"application/json",...this.authToken&&{Authorization:`Bearer ${this.authToken}`}},body:JSON.stringify(r)});if(!e.ok)return null;let t;try{t=await e.json()}catch{t={}}return t}catch(n){}}}class xe{constructor(e){if(__publicField(this,"defaultTTL"),__publicField(this,"items"),this.defaultTTL=e,e<=0)throw new Error("Default TTL must be a positive number.");this.items=new Map,this.defaultTTL=e,setInterval(()=>this.cleanup(),e)}add(e,t){const s=void 0!==t?t:this.defaultTTL;if(s<=0)throw new Error("TTL must be a positive number.");const r=Date.now()+s;this.items.set(e,r)}has(e){const t=this.items.get(e);return void 0!==t&&(!(Date.now()>t)||(this.items.delete(e),!1))}delete(e){this.items.delete(e)}get size(){return this.cleanup(),this.items.size}clear(){this.items.clear()}cleanup(){const e=Date.now();for(const[t,s]of this.items.entries())s<=e&&this.items.delete(t)}toArray(){return this.cleanup(),Array.from(this.items.keys())}}let Oe=null;var Ae,Ee,Re,Me;"undefined"!=typeof window&&window.addEventListener("message",e=>{if("https://agent.brainfi.sh"===e.origin&&"REQUEST_USER_IDENTITY"===e.data?.type&&Oe&&e.source){const t=document.querySelector("#bf-iframe-container .trigger-iframe");if(!t||e.source!==t.contentWindow)return void console.warn("BrainfishWidgetWarn: Rejected REQUEST_USER_IDENTITY from untrusted iframe source:",e.origin);e.source.postMessage({type:"USER_IDENTIFY",payload:Oe},e.origin)}}),(Ee=Ae||(Ae={})).OpenUrl="openUrl",Ee.CallPhone="callPhone",Ee.SendEmail="sendEmail",Ee.TriggerEvent="triggerEvent",(Me=Re||(Re={})).Button="button",Me.Link="link";const Ne=class e{constructor(t){__publicField(this,"options"),__publicField(this,"client"),__publicField(this,"httpClient"),__publicField(this,"userId"),__publicField(this,"global"),__publicField(this,"queue",[]),__publicField(this,"knownEvents",["nudge.show"]),__publicField(this,"eventListeners",{}),__publicField(this,"recentNudgeIds",new xe(1e3)),__publicField(this,"trackingDisabled",!1),this.options=t;const s={sdk_name:t.sdk||"node",sdk_version:t.sdkVersion||""},r=t.apiUrl||"https://analytic.brainfi.sh",n=t.accessKey;this.client=new ke({baseUrl:r,authToken:n,query:s}),this.httpClient=new Ie({baseUrl:r,authToken:n,sdkMetadata:{name:t.sdk||"node",version:t.sdkVersion||""}}),"undefined"!=typeof window&&"undefined"!=typeof localStorage&&(this.trackingDisabled="true"===localStorage.getItem(e.TRACKING_DISABLED_KEY)),this.setupIncomingPayloadHandler()}init(){}ready(){this.options.waitForUser=!1,this.flush()}setupIncomingPayloadHandler(){this.client.on("e",this.handleIncomingPayload.bind(this))}handleIncomingPayload(e){if("nudge.show"===e.type){const{nudgeId:t}=e.payload;if(this.recentNudgeIds.has(t))return;this.recentNudgeIds.add(t),this.dispatchEventListeners("nudge.show",e.payload)}}dispatchEventListeners(e,t){this.eventListeners[e]?.forEach(e=>e(t))}on(e,t){this.knownEvents.includes(e)&&(this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t))}off(e,t){this.knownEvents.includes(e)&&this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t),0===this.eventListeners[e].length&&delete this.eventListeners[e])}async send(e,t){return this.options.disabled||this.trackingDisabled||this.options.filter&&!this.options.filter(e)?Promise.resolve():this.options.waitForUser&&!this.userId?(this.queue.push(e),Promise.resolve()):this.client.send("t",e,t)}setGlobalProperties(e){this.global={...this.global,...e}}async track(e,t,s){return this.send({type:"event.track",payload:{name:e,userId:t?.userId??this.userId,properties:{...this.global??{},...t??{},...s?{_bfOverrides:s}:{}}}})}async identify(e){e.userId?(this.userId=e.userId,this.flush()):console.warn("BrainfishWidgetWarn: `.identify` called without a userId. User identification requires a valid userId to be provided.");const t=new Set(["userId","firstName","lastName","email","phone","avatar","properties"]),s=Object.keys(e).filter(e=>!t.has(e));s.length>0&&console.warn(`BrainfishWidgetWarn: The following fields are not recognized as main identifier fields: ${s.join(", ")}. Please place custom fields under the 'properties' object instead. Note: Using fields incorrectly may cause user identification to not work as expected.`),e.phone&&!/^\+[1-9]\d{1,14}$/.test(e.phone)&&console.warn("BrainfishWidgetWarn: phone should be in E.164 format (e.g., +14155552671). Providing the correct format ensures accurate user identification."),Oe=e;const r=document.querySelector("#bf-iframe-container .trigger-iframe");if(r){const t=()=>{r.contentWindow&&r.contentWindow.postMessage({type:"USER_IDENTIFY",payload:e},"*")};r.contentWindow&&t(),r.addEventListener("load",t)}if(Object.keys(e).length>1)return this.send({type:"user.identify",payload:{...e,properties:{...this.global,...e.properties}}})}async record(e){if(this.options.disabled)return Promise.resolve(null);if(this.trackingDisabled)return Promise.resolve(null);const t={type:"event.record",payload:{events:e,userId:this.userId}};if(this.options.filter&&!this.options.filter(t))return Promise.resolve(null);const s=await this.httpClient.send("/s",{events:e,userId:this.userId});return s?.sessionId||null}async alias(e){return this.send({type:"user.alias",payload:e})}async increment(e){return this.send({type:"user.increment",payload:e})}async decrement(e){return this.send({type:"user.decrement",payload:e})}clear(){this.userId=void 0}flush(){this.queue.forEach(e=>{this.send({...e,payload:{...e.payload,userId:e.payload.userId??this.userId}})}),this.queue=[]}disableTracking(){this.trackingDisabled=!0,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.setItem(e.TRACKING_DISABLED_KEY,"true")}enableTracking(){this.trackingDisabled=!1,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.removeItem(e.TRACKING_DISABLED_KEY),console.log("Brainfish tracking re-enabled. Refresh page for full effect.")}isTrackingDisabled(){return this.trackingDisabled}};__publicField(Ne,"TRACKING_DISABLED_KEY","bf_tracking_disabled");let _e=Ne;var Te,Pe=Object.defineProperty,Le=(e,t,s)=>((e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),Fe=Object.defineProperty,De=(e,t,s)=>((e,t,s)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),Be=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Be||{});const Ue={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},je={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ze={};function Ve(e){if(ze[e])return ze[e];const t=globalThis[e],s=t.prototype,r=e in Ue?Ue[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in je?je[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return ze[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?ze[e]=i:s}catch{return s}}const We={};function Ye(e,t,s){var r;const n=`${e}.${String(s)}`;if(We[n])return We[n].call(t);const i=Ve(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(We[n]=o,o.call(t)):t[s]}const Ge={};function Ze(e,t,s){const r=`${e}.${String(s)}`;if(Ge[r])return Ge[r].bind(t);const n=Ve(e)[s];return"function"!=typeof n?t[s]:(Ge[r]=n,n.bind(t))}const Je={childNodes:function(e){return Ye("Node",e,"childNodes")},parentNode:function(e){return Ye("Node",e,"parentNode")},parentElement:function(e){return Ye("Node",e,"parentElement")},textContent:function(e){return Ye("Node",e,"textContent")},contains:function(e,t){return Ze("Node",e,"contains")(t)},getRootNode:function(e){return Ze("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ye("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ye("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ye("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ye("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Ve("MutationObserver").constructor}};function Xe(e){return e.nodeType===e.ELEMENT_NODE}function He(e){const t=e&&"host"in e&&"mode"in e&&Je.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Je.shadowRoot(t)===e)}function Ke(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function $e(e){try{const s=e.rules||e.cssRules;if(!s)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);const n=Array.from(s,e=>qe(e,r)).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(s){return null}var t}function qe(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=$e(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}(e)}catch(s){t=e.cssText}return e.styleSheet.href?ct(t,e.styleSheet.href):t}{let s=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(s=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(s)),t?ct(s,t):s}}let Qe=class{constructor(){De(this,"idNodeMap",new Map),De(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function et({element:e,maskInputOptions:t,tagName:s,type:r,value:n,maskInputFn:i}){let o=n||"";const a=r&&tt(r);return(t[s.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function tt(e){return e.toLowerCase()}const st="__rrweb_original__";function rt(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?tt(t):null}function nt(e,t){let s;try{s=new URL(e,t??window.location.href)}catch(Kb){return null}const r=s.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}const it=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ot=/^(?:[a-z+]+:)?\/\//i,at=/^www\..*/i,lt=/^(data:)([^,]*),(.*)/i;function ct(e,t){return(e||"").replace(it,(e,s,r,n,i,o)=>{const a=r||i||o,l=s||n||"";if(!a)return e;if(ot.test(a)||at.test(a))return`url(${l}${a}${l})`;if(lt.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),h=a.split("/");c.pop();for(const t of h)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`})}function ht(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function ut(e,t){return function(e,t){const s=Array.from(t.childNodes),r=[];if(s.length>1&&e&&"string"==typeof e){const t=ht(e);for(let n=1;n<s.length;n++)if(s[n].textContent&&"string"==typeof s[n].textContent){const i=ht(s[n].textContent);for(let s=3;s<i.length;s++){const n=i.substring(0,s);if(2===t.split(n).length){const s=t.indexOf(n);for(let t=s;t<e.length;t++)if(ht(e.substring(0,t)).length===s){r.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return r.push(e),r}(e,t).join("/* rr_split */")}let pt=1;const dt=new RegExp("[^a-z0-9-_:]");function ft(){return pt++}let mt,gt;const yt=/^[^ \t\n\r\u000c]+/,wt=/^[, \t\n\r\u000c]+/;const bt=new WeakMap;function vt(e,t){return t&&""!==t.trim()?St(e,t):t}function Ct(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function St(e,t){let s=bt.get(e);if(s||(s=e.createElement("a"),bt.set(e,s)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return s.setAttribute("href",t),s.href}function kt(e,t,s,r){return r?"src"===s||"href"===s&&("use"!==t||"#"!==r[0])||"xlink:href"===s&&"#"!==r[0]?vt(e,r):"background"!==s||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===s?function(e,t){if(""===t.trim())return t;let s=0;function r(e){let r;const n=e.exec(t.substring(s));return n?(r=n[0],s+=r.length,r):""}const n=[];for(;r(wt),!(s>=t.length);){let i=r(yt);if(","===i.slice(-1))i=vt(e,i.substring(0,i.length-1)),n.push(i);else{let r="";i=vt(e,i);let o=!1;for(;;){const e=t.charAt(s);if(""===e){n.push((i+r).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){s+=1,n.push((i+r).trim());break}"("===e&&(o=!0)}r+=e,s+=1}}}return n.join(", ")}(e,r):"style"===s?ct(r,St(e)):"object"===t&&"data"===s?vt(e,r):r:vt(e,r):r}function It(e,t,s){return("video"===e||"audio"===e)&&"autoplay"===t}function xt(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&xt(Je.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&xt(Je.parentNode(e),t,s)}function Ot(e,t,s,r){let n;if(Xe(e)){if(n=e,!Je.childNodes(n).length)return!1}else{if(null===Je.parentElement(e))return!1;n=Je.parentElement(e)}try{if("string"==typeof t){if(r){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(xt(n,t,r))return!0;if(s)if(r){if(n.closest(s))return!0}else if(n.matches(s))return!0}catch(i){}return!1}function At(e,t){const{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:h,dataURLOptions:u={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return 1===s?void 0:s}(s,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Be.Document,childNodes:[],compatMode:e.compatMode}:{type:Be.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Be.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:s,blockClass:r,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:u,newlyAddedElement:p=!1,rootId:d}=t,f=function(e,t,s){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const r=e.classList[s];if(t.test(r))return!0}if(s)return e.matches(s)}catch(r){}return!1}(e,r,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=tt(e.tagName);return dt.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let v=0;v<y;v++){const t=e.attributes[v];It(m,t.name,t.value)||(g[t.name]=kt(s,m,tt(t.name),t.value))}if("link"===m&&i){const t=Array.from(s.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=$e(t)),r&&(delete g.rel,delete g.href,g._cssText=r)}if("style"===m&&e.sheet){let t=$e(e.sheet);t&&(e.childNodes.length>1&&(t=ut(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,s=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=et({element:e,type:rt(e),tagName:m,value:t,maskInputOptions:o,maskInputFn:a}):s&&(g.checked=s)}"option"===m&&(e.selected&&!o.select?g.selected=!0:delete g.selected);"dialog"===m&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===m&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let s=0;s<e.width;s+=50)for(let r=0;r<e.height;r+=50){const n=t.getImageData,i=st in n?n[st]:n;if(new Uint32Array(i.call(t,s,r,Math.min(50,e.width-s),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=s.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){mt||(mt=s.createElement("canvas"),gt=mt.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{mt.width=t.naturalWidth,mt.height=t.naturalHeight,gt.drawImage(t,0,0),g.rr_dataURL=mt.toDataURL(l.type,l.quality)}catch(Kb){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${r}! Error: ${Kb}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===m||"video"===m){const t=g;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:s}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${s}px`}}"iframe"!==m||u(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(m)&&(w=!0)}catch(b){}return{type:Be.Element,tagName:m,attributes:g,childNodes:[],isSVG:Ct(e)||void 0,needBlock:f,rootId:d,isCustom:w}}(e,{doc:s,blockClass:n,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:u,inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:s,maskTextFn:r,rootId:n,cssCaptured:i}=t,o=Je.parentNode(e),a=o&&o.tagName;let l="";const c="STYLE"===a||void 0,h="SCRIPT"===a||void 0;h?l="SCRIPT_PLACEHOLDER":i||(l=Je.textContent(e),c&&l&&(l=ct(l,St(t.doc))));!c&&!h&&l&&s&&(l=r?r(l,Je.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:Be.Text,textContent:l||"",rootId:n}}(e,{doc:s,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:Be.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:Be.Comment,textContent:Je.textContent(e)||"",rootId:y};default:return!1}}function Et(e){return null==e?"":e.toLowerCase()}function Rt(e,t){const{doc:s,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:k=!1,cssCaptured:I=!1}=t;let{needsMask:x}=t,{preserveWhiteSpace:O=!0}=t;if(!x){x=Ot(e,o,a,void 0===x)}const A=At(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:k,cssCaptured:I});if(!A)return console.warn(e,"not serialized"),null;let E;E=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===Be.Comment)return!0;if(e.type===Be.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===nt(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Et(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Et(e.attributes.name)||"icon"===Et(e.attributes.rel)||"apple-touch-icon"===Et(e.attributes.rel)||"shortcut icon"===Et(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Et(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Et(e.attributes.property).match(/^(og|twitter|fb):/)||Et(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Et(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Et(e.attributes.name)||"googlebot"===Et(e.attributes.name)||"bingbot"===Et(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Et(e.attributes.name)||"generator"===Et(e.attributes.name)||"framework"===Et(e.attributes.name)||"publisher"===Et(e.attributes.name)||"progid"===Et(e.attributes.name)||Et(e.attributes.property).match(/^article:/)||Et(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Et(e.attributes.name)||"yandex-verification"===Et(e.attributes.name)||"csrf-token"===Et(e.attributes.name)||"p:domain_verify"===Et(e.attributes.name)||"verify-v1"===Et(e.attributes.name)||"verification"===Et(e.attributes.name)||"shopify-checkout-api-token"===Et(e.attributes.name)))return!0}}return!1}(A,d)||!O&&A.type===Be.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ft();const R=Object.assign(A,{id:E});if(r.add(e,R),-2===E)return null;y&&y(e);let M=!l;if(R.type===Be.Element){M=M&&!R.needBlock,delete R.needBlock;const t=Je.shadowRoot(e);t&&Ke(t)&&(R.isShadowHost=!0)}if((R.type===Be.Document||R.type===Be.Element)&&M){d.headWhitespace&&R.type===Be.Element&&"head"===R.tagName&&(O=!1);const t={doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S,cssCaptured:!1};if(R.type===Be.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===Be.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const s of Array.from(Je.childNodes(e))){const e=Rt(s,t);e&&R.childNodes.push(e)}}let k=null;if(Xe(e)&&(k=Je.shadowRoot(e)))for(const e of Array.from(Je.childNodes(k))){const s=Rt(e,t);s&&(Ke(k)&&(s.isShadow=!0),R.childNodes.push(s))}}const N=Je.parentNode(e);return N&&He(N)&&Ke(N)&&(R.isShadow=!0),R.type===Be.Element&&"iframe"===R.tagName&&function(e,t,s){const r=e.contentWindow;if(!r)return;let n,i=!1;try{n=r.document.readyState}catch(a){return}if("complete"!==n){const r=setTimeout(()=>{i||(t(),i=!0)},s);return void e.addEventListener("load",()=>{clearTimeout(r),i=!0,t()})}const o="about:blank";if(r.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&w){const s=Rt(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});s&&w(e,s)}},b),R.type===Be.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===nt(R.attributes.href))&&function(e,t,s){let r,n=!1;try{r=e.sheet}catch(o){return}if(r)return;const i=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}(e,()=>{if(v){const t=Rt(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});t&&v(e,t)}},C),R}function Mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Nt(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var _t={exports:{}},Tt=String,Pt=function(){return{isColorSupported:!1,reset:Tt,bold:Tt,dim:Tt,italic:Tt,underline:Tt,inverse:Tt,hidden:Tt,strikethrough:Tt,black:Tt,red:Tt,green:Tt,yellow:Tt,blue:Tt,magenta:Tt,cyan:Tt,white:Tt,gray:Tt,bgBlack:Tt,bgRed:Tt,bgGreen:Tt,bgYellow:Tt,bgBlue:Tt,bgMagenta:Tt,bgCyan:Tt,bgWhite:Tt}};_t.exports=Pt(),_t.exports.createColors=Pt;var Lt=_t.exports;const Ft=Nt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Dt=Lt,Bt=Ft,Ut=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Dt.isColorSupported),Bt&&e&&(t=Bt(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Dt.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var jt=Ut;Ut.default=Ut;var zt={};zt.isClean=Symbol("isClean"),zt.my=Symbol("my");const Vt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Wt=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Vt[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Vt[s]),i.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Yt=Wt;Wt.default=Wt;let Gt=Yt;function Zt(e,t){new Gt(t).stringify(e)}var Jt=Zt;Zt.default=Zt;let{isClean:Xt,my:Ht}=zt,Kt=jt,$t=Yt,qt=Jt;function Qt(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Qt(e,s)):("object"===i&&null!==n&&(n=Qt(n)),s[r]=n)}return s}let es=class{constructor(e={}){this.raws={},this[Xt]=!1,this[Ht]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Qt(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Kt(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Xt]){this[Xt]=!1;let e=this;for(;e=e.parent;)e[Xt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new $t).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=qt){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var ts=es;es.default=es;let ss=ts,rs=class extends ss{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var ns=rs;rs.default=rs;var is={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:os,SourceMapGenerator:as}=Ft,{existsSync:ls,readFileSync:cs}=Ft,{dirname:hs,join:us}=Ft;let ps=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=hs(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new os(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=hs(e),ls(e))return this.mapFile=e,cs(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof os)return as.fromSourceMap(t).toString();if(t instanceof as)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=us(hs(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ds=ps;ps.default=ps;let{SourceMapConsumer:fs,SourceMapGenerator:ms}=Ft,{fileURLToPath:gs,pathToFileURL:ys}=Ft,{isAbsolute:ws,resolve:bs}=Ft,{nanoid:vs}=is,Cs=Ft,Ss=jt,ks=ds,Is=Symbol("fromOffsetCache"),xs=Boolean(fs&&ms),Os=Boolean(bs&&ws),As=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Os||/^\w+:\/\//.test(t.from)||ws(t.from)?this.file=t.from:this.file=bs(t.from)),Os&&xs){let e=new ks(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+vs(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new Ss(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new Ss(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(ys&&(n.input.url=ys(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[Is])s=this[Is];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[Is]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:bs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=ws(a.source)?ys(a.source):new URL(a.source,this.map.consumer().sourceRoot||ys(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!gs)throw new Error("file: protocol is not available in this PostCSS build");l.file=gs(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Es=As;As.default=As,Cs&&Cs.registerInput&&Cs.registerInput(As);let{SourceMapConsumer:Rs,SourceMapGenerator:Ms}=Ft,{dirname:Ns,relative:_s,resolve:Ts,sep:Ps}=Ft,{pathToFileURL:Ls}=Ft,Fs=Es,Ds=Boolean(Rs&&Ms),Bs=Boolean(Ns&&Ts&&_s&&Ps);var Us=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,s=this.toUrl(this.path(e.file)),r=e.root||Ns(e.file);!1===this.mapOpts.sourcesContent?(t=new Rs(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Bs&&Ds&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ms.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ms({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ms({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?Ns(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=Ns(Ts(s,this.mapOpts.annotation)));let r=_s(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Fs(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ls){let t=Ls(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ps&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let js=ts,zs=class extends js{constructor(e){super(e),this.type="comment"}};var Vs=zs;zs.default=zs;let Ws,Ys,Gs,Zs,{isClean:Js,my:Xs}=zt,Hs=ns,Ks=Vs,$s=ts;function qs(e){return e.map(e=>(e.nodes&&(e.nodes=qs(e.nodes)),delete e.source,e))}function Qs(e){if(e[Js]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Qs(t)}let er=class e extends $s{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=qs(Ws(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Hs(t)]}else if(t.selector)t=[new Ys(t)];else if(t.name)t=[new Gs(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Ks(t)]}return t.map(t=>(t[Xs]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Js]&&Qs(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};er.registerParse=e=>{Ws=e},er.registerRule=e=>{Ys=e},er.registerAtRule=e=>{Gs=e},er.registerRoot=e=>{Zs=e};var tr=er;er.default=er,er.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Gs.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ys.prototype):"decl"===e.type?Object.setPrototypeOf(e,Hs.prototype):"comment"===e.type?Object.setPrototypeOf(e,Ks.prototype):"root"===e.type&&Object.setPrototypeOf(e,Zs.prototype),e[Xs]=!0,e.nodes&&e.nodes.forEach(e=>{er.rebuild(e)})};let sr,rr,nr=tr,ir=class extends nr{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new sr(new rr,this,e).stringify()}};ir.registerLazyResult=e=>{sr=e},ir.registerProcessor=e=>{rr=e};var or=ir;ir.default=ir;let ar={};var lr=function(e){ar[e]||(ar[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let cr=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var hr=cr;cr.default=cr;let ur=hr,pr=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new ur(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var dr=pr;pr.default=pr;const fr="'".charCodeAt(0),mr='"'.charCodeAt(0),gr="\\".charCodeAt(0),yr="/".charCodeAt(0),wr="\n".charCodeAt(0),br=" ".charCodeAt(0),vr="\f".charCodeAt(0),Cr="\t".charCodeAt(0),Sr="\r".charCodeAt(0),kr="[".charCodeAt(0),Ir="]".charCodeAt(0),xr="(".charCodeAt(0),Or=")".charCodeAt(0),Ar="{".charCodeAt(0),Er="}".charCodeAt(0),Rr=";".charCodeAt(0),Mr="*".charCodeAt(0),Nr=":".charCodeAt(0),_r="@".charCodeAt(0),Tr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Lr=/.[\r\n"'(/\\]/,Fr=/[\da-f]/i;let Dr=tr,Br=class extends Dr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ur=Br;Br.default=Br,Dr.registerAtRule(Br);let jr,zr,Vr=tr,Wr=class extends Vr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new jr(new zr,this,e).stringify()}};Wr.registerLazyResult=e=>{jr=e},Wr.registerProcessor=e=>{zr=e};var Yr=Wr;Wr.default=Wr,Vr.registerRoot(Wr);let Gr={comma:e=>Gr.split(e,[","],!0),space:e=>Gr.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Zr=Gr;Gr.default=Gr;let Jr=tr,Xr=Zr,Hr=class extends Jr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Xr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Kr=Hr;Hr.default=Hr,Jr.registerRule(Hr);let $r=ns,qr=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case wr:case br:case Cr:case Sr:case vr:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===br||s===wr||s===Cr||s===Sr||s===vr);u=["space",p.slice(m,r)],m=r-1;break;case kr:case Ir:case Ar:case Er:case Nr:case Rr:case Or:{let e=String.fromCharCode(s);u=[e,e,m];break}case xr:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==fr&&h!==mr&&h!==br&&h!==wr&&h!==Cr&&h!==vr&&h!==Sr){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===gr;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Lr.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case fr:case mr:n=s===fr?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===gr;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case _r:Tr.lastIndex=m+1,Tr.test(p),r=0===Tr.lastIndex?p.length-1:Tr.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case gr:for(r=m,o=!0;p.charCodeAt(r+1)===gr;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==yr&&s!==br&&s!==wr&&s!==Cr&&s!==Sr&&s!==vr&&(r+=1,Fr.test(p.charAt(r)))){for(;Fr.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===br&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===yr&&p.charCodeAt(m+1)===Mr?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Pr.lastIndex=m+1,Pr.test(p),r=0===Pr.lastIndex?p.length-1:Pr.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Qr=Vs,en=Ur,tn=Yr,sn=Kr;const rn={empty:!0,space:!0};let nn=tr,on=class{constructor(e){this.input=e,this.root=new tn,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,s,r,n=new en;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Qr;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=qr(this.input)}decl(e,t){let s=new $r;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new sn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",rn[a]||rn[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new sn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},an=Es;function ln(e,t){let s=new an(e,t),r=new on(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var cn=ln;ln.default=ln,nn.registerParse(ln);let{isClean:hn,my:un}=zt,pn=Us,dn=Jt,fn=tr,mn=or,gn=lr,yn=dr,wn=cn,bn=Yr;const vn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Cn={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Sn={Once:!0,postcssPlugin:!0,prepare:!0};function kn(e){return"object"==typeof e&&"function"==typeof e.then}function In(e){let t=!1,s=vn[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function xn(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:In(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function On(e){return e[hn]=!1,e.nodes&&e.nodes.forEach(e=>On(e)),e}let An={},En=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof yn)n=On(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=wn;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[un]&&fn.rebuild(n)}else n=On(s);this.result=new yn(t,n,r),this.helpers={...An,postcss:An,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!Cn[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Sn[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(kn(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[hn];){e[hn]=!0;let s=[xn(e)];for(;s.length>0;){let e=this.visitTick(s);if(kn(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return kn(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=dn;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new pn(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(kn(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[hn];)e[hn]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||gn("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(kn(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[hn])return r[hn]=!0,void e.push(xn(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[hn]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[hn]=!0;let t=In(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[hn]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};En.registerPostcss=e=>{An=e};var Rn=En;En.default=En,bn.registerLazyResult(En),mn.registerLazyResult(En);let Mn=Us,Nn=Jt,_n=lr,Tn=cn;const Pn=dr;let Ln=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Nn;this.result=new Pn(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Mn(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||_n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Tn;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Fn=Ln;Ln.default=Ln;let Dn=Fn,Bn=Rn,Un=or,jn=Yr,zn=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Bn(this,e,t):new Dn(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vn=zn;zn.default=zn,jn.registerProcessor(zn),Un.registerProcessor(zn);let Wn=ns,Yn=ds,Gn=Vs,Zn=Ur,Jn=Es,Xn=Yr,Hn=Kr;function Kn(e,t){if(Array.isArray(e))return e.map(e=>Kn(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Jn.prototype};s.map&&(s.map={...s.map,__proto__:Yn.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Kn(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Xn(r);if("decl"===r.type)return new Wn(r);if("rule"===r.type)return new Hn(r);if("comment"===r.type)return new Gn(r);if("atrule"===r.type)return new Zn(r);throw new Error("Unknown node type: "+e.type)}var $n=Kn;Kn.default=Kn;let qn=jt,Qn=ns,ei=Rn,ti=tr,si=Vn,ri=Jt,ni=$n,ii=or,oi=hr,ai=Vs,li=Ur,ci=dr,hi=Es,ui=cn,pi=Zr,di=Kr,fi=Yr,mi=ts;function gi(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new si(e)}gi.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new si).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return gi([n(s)]).process(e,t)},n},gi.stringify=ri,gi.parse=ui,gi.fromJSON=ni,gi.list=pi,gi.comment=e=>new ai(e),gi.atRule=e=>new li(e),gi.decl=e=>new Qn(e),gi.rule=e=>new di(e),gi.root=e=>new fi(e),gi.document=e=>new ii(e),gi.CssSyntaxError=qn,gi.Declaration=Qn,gi.Container=ti,gi.Processor=si,gi.Document=ii,gi.Comment=ai,gi.Warning=oi,gi.AtRule=li,gi.Result=ci,gi.Input=hi,gi.Rule=di,gi.Root=fi,gi.Node=mi,ei.registerPostcss(gi);var yi=gi;gi.default=gi;const wi=Mt(yi);wi.stringify,wi.fromJSON,wi.plugin,wi.parse,wi.list,wi.document,wi.comment,wi.atRule,wi.rule,wi.decl,wi.root,wi.CssSyntaxError,wi.Declaration,wi.Container,wi.Processor,wi.Document,wi.Comment,wi.Warning,wi.AtRule,wi.Result,wi.Input,wi.Rule,wi.Root,wi.Node;var bi=Object.defineProperty,vi=(e,t,s)=>((e,t,s)=>t in e?bi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function Ci(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Si(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var ki={exports:{}},Ii=String,xi=function(){return{isColorSupported:!1,reset:Ii,bold:Ii,dim:Ii,italic:Ii,underline:Ii,inverse:Ii,hidden:Ii,strikethrough:Ii,black:Ii,red:Ii,green:Ii,yellow:Ii,blue:Ii,magenta:Ii,cyan:Ii,white:Ii,gray:Ii,bgBlack:Ii,bgRed:Ii,bgGreen:Ii,bgYellow:Ii,bgBlue:Ii,bgMagenta:Ii,bgCyan:Ii,bgWhite:Ii}};ki.exports=xi(),ki.exports.createColors=xi;var Oi=ki.exports;const Ai=Si(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ei=Oi,Ri=Ai,Mi=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ei.isColorSupported),Ri&&e&&(t=Ri(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Ei.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ni=Mi;Mi.default=Mi;var _i={};_i.isClean=Symbol("isClean"),_i.my=Symbol("my");const Ti={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Pi=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Ti[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Ti[s]),i.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Li=Pi;Pi.default=Pi;let Fi=Li;function Di(e,t){new Fi(t).stringify(e)}var Bi=Di;Di.default=Di;let{isClean:Ui,my:ji}=_i,zi=Ni,Vi=Li,Wi=Bi;function Yi(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Yi(e,s)):("object"===i&&null!==n&&(n=Yi(n)),s[r]=n)}return s}let Gi=class{constructor(e={}){this.raws={},this[Ui]=!1,this[ji]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Yi(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new zi(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Ui]){this[Ui]=!1;let e=this;for(;e=e.parent;)e[Ui]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Vi).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Wi){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Zi=Gi;Gi.default=Gi;let Ji=Zi,Xi=class extends Ji{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Hi=Xi;Xi.default=Xi;var Ki={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:$i,SourceMapGenerator:qi}=Ai,{existsSync:Qi,readFileSync:eo}=Ai,{dirname:to,join:so}=Ai;let ro=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=to(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new $i(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=to(e),Qi(e))return this.mapFile=e,eo(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof $i)return qi.fromSourceMap(t).toString();if(t instanceof qi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=so(to(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var no=ro;ro.default=ro;let{SourceMapConsumer:io,SourceMapGenerator:oo}=Ai,{fileURLToPath:ao,pathToFileURL:lo}=Ai,{isAbsolute:co,resolve:ho}=Ai,{nanoid:uo}=Ki,po=Ai,fo=Ni,mo=no,go=Symbol("fromOffsetCache"),yo=Boolean(io&&oo),wo=Boolean(ho&&co),bo=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!wo||/^\w+:\/\//.test(t.from)||co(t.from)?this.file=t.from:this.file=ho(t.from)),wo&&yo){let e=new mo(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+uo(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new fo(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new fo(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(lo&&(n.input.url=lo(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[go])s=this[go];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[go]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ho(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=co(a.source)?lo(a.source):new URL(a.source,this.map.consumer().sourceRoot||lo(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ao)throw new Error("file: protocol is not available in this PostCSS build");l.file=ao(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var vo=bo;bo.default=bo,po&&po.registerInput&&po.registerInput(bo);let{SourceMapConsumer:Co,SourceMapGenerator:So}=Ai,{dirname:ko,relative:Io,resolve:xo,sep:Oo}=Ai,{pathToFileURL:Ao}=Ai,Eo=vo,Ro=Boolean(Co&&So),Mo=Boolean(ko&&xo&&Io&&Oo);var No=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,s=this.toUrl(this.path(e.file)),r=e.root||ko(e.file);!1===this.mapOpts.sourcesContent?(t=new Co(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Mo&&Ro&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=So.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new So({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new So({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ko(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=ko(xo(s,this.mapOpts.annotation)));let r=Io(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Eo(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ao){let t=Ao(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Oo&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let _o=Zi,To=class extends _o{constructor(e){super(e),this.type="comment"}};var Po=To;To.default=To;let Lo,Fo,Do,Bo,{isClean:Uo,my:jo}=_i,zo=Hi,Vo=Po,Wo=Zi;function Yo(e){return e.map(e=>(e.nodes&&(e.nodes=Yo(e.nodes)),delete e.source,e))}function Go(e){if(e[Uo]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Go(t)}let Zo=class e extends Wo{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=Yo(Lo(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new zo(t)]}else if(t.selector)t=[new Fo(t)];else if(t.name)t=[new Do(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Vo(t)]}return t.map(t=>(t[jo]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Uo]&&Go(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Zo.registerParse=e=>{Lo=e},Zo.registerRule=e=>{Fo=e},Zo.registerAtRule=e=>{Do=e},Zo.registerRoot=e=>{Bo=e};var Jo=Zo;Zo.default=Zo,Zo.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Do.prototype):"rule"===e.type?Object.setPrototypeOf(e,Fo.prototype):"decl"===e.type?Object.setPrototypeOf(e,zo.prototype):"comment"===e.type?Object.setPrototypeOf(e,Vo.prototype):"root"===e.type&&Object.setPrototypeOf(e,Bo.prototype),e[jo]=!0,e.nodes&&e.nodes.forEach(e=>{Zo.rebuild(e)})};let Xo,Ho,Ko=Jo,$o=class extends Ko{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Xo(new Ho,this,e).stringify()}};$o.registerLazyResult=e=>{Xo=e},$o.registerProcessor=e=>{Ho=e};var qo=$o;$o.default=$o;let Qo={};var ea=function(e){Qo[e]||(Qo[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ta=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var sa=ta;ta.default=ta;let ra=sa,na=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new ra(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var ia=na;na.default=na;const oa="'".charCodeAt(0),aa='"'.charCodeAt(0),la="\\".charCodeAt(0),ca="/".charCodeAt(0),ha="\n".charCodeAt(0),ua=" ".charCodeAt(0),pa="\f".charCodeAt(0),da="\t".charCodeAt(0),fa="\r".charCodeAt(0),ma="[".charCodeAt(0),ga="]".charCodeAt(0),ya="(".charCodeAt(0),wa=")".charCodeAt(0),ba="{".charCodeAt(0),va="}".charCodeAt(0),Ca=";".charCodeAt(0),Sa="*".charCodeAt(0),ka=":".charCodeAt(0),Ia="@".charCodeAt(0),xa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Oa=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Aa=/.[\r\n"'(/\\]/,Ea=/[\da-f]/i;let Ra=Jo,Ma=class extends Ra{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Na=Ma;Ma.default=Ma,Ra.registerAtRule(Ma);let _a,Ta,Pa=Jo,La=class extends Pa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new _a(new Ta,this,e).stringify()}};La.registerLazyResult=e=>{_a=e},La.registerProcessor=e=>{Ta=e};var Fa=La;La.default=La,Pa.registerRoot(La);let Da={comma:e=>Da.split(e,[","],!0),space:e=>Da.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Ba=Da;Da.default=Da;let Ua=Jo,ja=Ba,za=class extends Ua{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ja.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Va=za;za.default=za,Ua.registerRule(za);let Wa=Hi,Ya=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case ha:case ua:case da:case fa:case pa:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===ua||s===ha||s===da||s===fa||s===pa);u=["space",p.slice(m,r)],m=r-1;break;case ma:case ga:case ba:case va:case ka:case Ca:case wa:{let e=String.fromCharCode(s);u=[e,e,m];break}case ya:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==oa&&h!==aa&&h!==ua&&h!==ha&&h!==da&&h!==pa&&h!==fa){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===la;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Aa.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case oa:case aa:n=s===oa?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===la;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Ia:xa.lastIndex=m+1,xa.test(p),r=0===xa.lastIndex?p.length-1:xa.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case la:for(r=m,o=!0;p.charCodeAt(r+1)===la;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==ca&&s!==ua&&s!==ha&&s!==da&&s!==fa&&s!==pa&&(r+=1,Ea.test(p.charAt(r)))){for(;Ea.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===ua&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===ca&&p.charCodeAt(m+1)===Sa?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Oa.lastIndex=m+1,Oa.test(p),r=0===Oa.lastIndex?p.length-1:Oa.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ga=Po,Za=Na,Ja=Fa,Xa=Va;const Ha={empty:!0,space:!0};let Ka=Jo,$a=class{constructor(e){this.input=e,this.root=new Ja,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,s,r,n=new Za;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ga;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Ya(this.input)}decl(e,t){let s=new Wa;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Xa;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Ha[a]||Ha[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Xa;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},qa=vo;function Qa(e,t){let s=new qa(e,t),r=new $a(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var el=Qa;Qa.default=Qa,Ka.registerParse(Qa);let{isClean:tl,my:sl}=_i,rl=No,nl=Bi,il=Jo,ol=qo,al=ea,ll=ia,cl=el,hl=Fa;const ul={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pl={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},dl={Once:!0,postcssPlugin:!0,prepare:!0};function fl(e){return"object"==typeof e&&"function"==typeof e.then}function ml(e){let t=!1,s=ul[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function gl(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ml(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function yl(e){return e[tl]=!1,e.nodes&&e.nodes.forEach(e=>yl(e)),e}let wl={},bl=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof ll)n=yl(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=cl;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[sl]&&il.rebuild(n)}else n=yl(s);this.result=new ll(t,n,r),this.helpers={...wl,postcss:wl,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!pl[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!dl[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(fl(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tl];){e[tl]=!0;let s=[gl(e)];for(;s.length>0;){let e=this.visitTick(s);if(fl(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return fl(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=nl;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new rl(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(fl(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tl];)e[tl]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||al("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(fl(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[tl])return r[tl]=!0,void e.push(gl(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[tl]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[tl]=!0;let t=ml(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[tl]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};bl.registerPostcss=e=>{wl=e};var vl=bl;bl.default=bl,hl.registerLazyResult(bl),ol.registerLazyResult(bl);let Cl=No,Sl=Bi,kl=ea,Il=el;const xl=ia;let Ol=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Sl;this.result=new xl(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Cl(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||kl("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Il;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Al=Ol;Ol.default=Ol;let El=Al,Rl=vl,Ml=qo,Nl=Fa,_l=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Rl(this,e,t):new El(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Tl=_l;_l.default=_l,Nl.registerProcessor(_l),Ml.registerProcessor(_l);let Pl=Hi,Ll=no,Fl=Po,Dl=Na,Bl=vo,Ul=Fa,jl=Va;function zl(e,t){if(Array.isArray(e))return e.map(e=>zl(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Bl.prototype};s.map&&(s.map={...s.map,__proto__:Ll.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>zl(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Ul(r);if("decl"===r.type)return new Pl(r);if("rule"===r.type)return new jl(r);if("comment"===r.type)return new Fl(r);if("atrule"===r.type)return new Dl(r);throw new Error("Unknown node type: "+e.type)}var Vl=zl;zl.default=zl;let Wl=Ni,Yl=Hi,Gl=vl,Zl=Jo,Jl=Tl,Xl=Bi,Hl=Vl,Kl=qo,$l=sa,ql=Po,Ql=Na,ec=ia,tc=vo,sc=el,rc=Ba,nc=Va,ic=Fa,oc=Zi;function ac(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Jl(e)}ac.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new Jl).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return ac([n(s)]).process(e,t)},n},ac.stringify=Xl,ac.parse=sc,ac.fromJSON=Hl,ac.list=rc,ac.comment=e=>new ql(e),ac.atRule=e=>new Ql(e),ac.decl=e=>new Yl(e),ac.rule=e=>new nc(e),ac.root=e=>new ic(e),ac.document=e=>new Kl(e),ac.CssSyntaxError=Wl,ac.Declaration=Yl,ac.Container=Zl,ac.Processor=Jl,ac.Document=Kl,ac.Comment=ql,ac.Warning=$l,ac.AtRule=Ql,ac.Result=ec,ac.Input=tc,ac.Rule=nc,ac.Root=ic,ac.Node=oc,Gl.registerPostcss(ac);var lc=ac;ac.default=ac;const cc=Ci(lc);cc.stringify,cc.fromJSON,cc.plugin,cc.parse,cc.list,cc.document,cc.comment,cc.atRule,cc.rule,cc.decl,cc.root,cc.CssSyntaxError,cc.Declaration,cc.Container,cc.Processor,cc.Document,cc.Comment,cc.Warning,cc.AtRule,cc.Result,cc.Input,cc.Rule,cc.Root,cc.Node;let hc=class e{constructor(...e){vi(this,"parentElement",null),vi(this,"parentNode",null),vi(this,"ownerDocument"),vi(this,"firstChild",null),vi(this,"lastChild",null),vi(this,"previousSibling",null),vi(this,"nextSibling",null),vi(this,"ELEMENT_NODE",1),vi(this,"TEXT_NODE",3),vi(this,"nodeType"),vi(this,"nodeName"),vi(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};const uc={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},dc={};function fc(e){if(dc[e])return dc[e];const t=globalThis[e],s=t.prototype,r=e in uc?uc[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in pc?pc[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return dc[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?dc[e]=i:s}catch{return s}}const mc={};function gc(e,t,s){var r;const n=`${e}.${String(s)}`;if(mc[n])return mc[n].call(t);const i=fc(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(mc[n]=o,o.call(t)):t[s]}const yc={};function wc(e,t,s){const r=`${e}.${String(s)}`;if(yc[r])return yc[r].bind(t);const n=fc(e)[s];return"function"!=typeof n?t[s]:(yc[r]=n,n.bind(t))}function bc(){return fc("MutationObserver").constructor}const vc={childNodes:function(e){return gc("Node",e,"childNodes")},parentNode:function(e){return gc("Node",e,"parentNode")},parentElement:function(e){return gc("Node",e,"parentElement")},textContent:function(e){return gc("Node",e,"textContent")},contains:function(e,t){return wc("Node",e,"contains")(t)},getRootNode:function(e){return wc("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?gc("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?gc("Element",e,"shadowRoot"):null},querySelector:function(e,t){return gc("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return gc("Element",e,"querySelectorAll")(t)},mutationObserver:bc};function Cc(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)}const Sc="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let kc={map:{},getId:()=>(console.error(Sc),-1),getNode:()=>(console.error(Sc),null),removeNodeFromMap(){console.error(Sc)},has:()=>(console.error(Sc),!1),reset(){console.error(Sc)}};function Ic(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}}function xc(e,t,s,r,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,r?s:{set(e){setTimeout(()=>{s.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>xc(e,t,i||{},!0)}function Oc(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(kc=new Proxy(kc,{get:(e,t,s)=>("map"===t&&console.error(Sc),Reflect.get(e,t,s))}));let Ac=Date.now;function Ec(e){var t,s,r,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=vc.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=vc.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function Rc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Mc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Nc(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:vc.parentElement(e)}function _c(e,t,s,r){if(!e)return!1;const n=Nc(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(xt(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1}function Tc(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)}function Pc(e,t){if(He(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const r=vc.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Pc(r,t))}function Lc(e){return Boolean(e.changedTouches)}function Fc(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Dc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Bc(e){return!!e&&(e instanceof hc&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(vc.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ac=()=>(new Date).getTime());let Uc=class{constructor(){Le(this,"id",1),Le(this,"styleIDMap",new WeakMap),Le(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function jc(e){var t;let s=null;return"getRootNode"in e&&(null==(t=vc.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&vc.host(vc.getRootNode(e))&&(s=vc.host(vc.getRootNode(e))),s}function zc(e){const t=e.ownerDocument;if(!t)return!1;const s=function(e){let t,s=e;for(;t=jc(s);)s=t;return s}(e);return vc.contains(t,s)}function Vc(e){const t=e.ownerDocument;return!!t&&(vc.contains(t,e)||zc(e))}var Wc=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Wc||{}),Yc=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Yc||{}),Gc=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Gc||{}),Zc=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Zc||{}),Jc=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Jc||{}),Xc=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Xc||{}),Hc=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Hc||{});function Kc(e){return"__ln"in e}class $c{constructor(){Le(this,"length",0),Le(this,"head",null),Le(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let s=0;s<e;s++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Kc(e.previousSibling)){const s=e.previousSibling.__ln.next;t.next=s,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,s&&(s.previous=t)}else if(e.nextSibling&&Kc(e.nextSibling)&&e.nextSibling.__ln.previous){const s=e.nextSibling.__ln.previous;t.previous=s,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,s&&(s.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const qc=(e,t)=>`${e}@${t}`;class Qc{constructor(){Le(this,"frozen",!1),Le(this,"locked",!1),Le(this,"texts",[]),Le(this,"attributes",[]),Le(this,"attributeMap",new WeakMap),Le(this,"removes",[]),Le(this,"mapRemoves",[]),Le(this,"movedMap",{}),Le(this,"addedSet",new Set),Le(this,"movedSet",new Set),Le(this,"droppedSet",new Set),Le(this,"removesSubTreeCache",new Set),Le(this,"mutationCb"),Le(this,"blockClass"),Le(this,"blockSelector"),Le(this,"maskTextClass"),Le(this,"maskTextSelector"),Le(this,"inlineStylesheet"),Le(this,"maskInputOptions"),Le(this,"maskTextFn"),Le(this,"maskInputFn"),Le(this,"keepIframeSrcFn"),Le(this,"recordCanvas"),Le(this,"inlineImages"),Le(this,"slimDOMOptions"),Le(this,"dataURLOptions"),Le(this,"doc"),Le(this,"mirror"),Le(this,"iframeManager"),Le(this,"stylesheetManager"),Le(this,"shadowDomManager"),Le(this,"canvasManager"),Le(this,"processedNodeManager"),Le(this,"unattachedDoc"),Le(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Le(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new $c,r=e=>{let t=e,s=-2;for(;-2===s;)t=t&&t.nextSibling,s=t&&this.mirror.getId(t);return s},n=n=>{const i=vc.parentNode(n);if(!i||!Vc(n))return;let o=!1;if(n.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(o=!0)}const a=He(i)?this.mirror.getId(jc(n)):this.mirror.getId(i),l=r(n);if(-1===a||-1===l)return s.addNode(n);const c=Rt(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Fc(e,this.mirror)&&this.iframeManager.addIframe(e),Dc(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Bc(n)&&this.shadowDomManager.addShadowRoot(vc.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)th(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(vc.parentNode(a))||n(a);for(const a of this.addedSet)sh(this.droppedSet,a)||th(this.removesSubTreeCache,a,this.mirror)?sh(this.movedSet,a)?n(a):this.droppedSet.add(a):n(a);let i=null;for(;s.length;){let e=null;if(i){const t=this.mirror.getId(vc.parentNode(i.value)),s=r(i.value);-1!==t&&-1!==s&&(e=i)}if(!e){let t=s.tail;for(;t;){const s=t;if(t=t.previous,s){const t=this.mirror.getId(vc.parentNode(s.value));if(-1===r(s.value))continue;if(-1!==t){e=s;break}{const t=s.value,r=vc.parentNode(t);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=vc.host(r);if(-1!==this.mirror.getId(t)){e=s;break}}}}}}if(!e){for(;s.head;)s.removeNode(s.head.value);break}i=e.previous,s.removeNode(e.value),n(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,s=vc.parentNode(t);return s&&"TEXTAREA"===s.tagName&&this.genTextAreaValueMutation(s),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const s=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);s.length<t.style.length&&(s+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(o))}),Le(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(vc.childNodes(e),e=>vc.textContent(e)||"").join("")}),Le(this,"processMutation",e=>{if(!Tc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=vc.textContent(e.target);_c(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Ot(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Nc(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const s=e.target;let r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){const e=rt(s);n=et({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(_c(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===s.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(s.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===s.tagName&&"password"===(e.oldValue||"").toLowerCase()&&s.setAttribute("data-rr-is-password","true"),!It(s.tagName,r))if(i.attributes[r]=kt(this.doc,tt(s.tagName),tt(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(s.style)){const t=s.style.getPropertyValue(e),n=s.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||n!==r.style.getPropertyPriority(e)?i.styleDiff[e]=""===n?t:[t,n]:i._unchangedStyles[e]=[t,n]}for(const e of Array.from(r.style))""===s.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===s.tagName&&(s.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":if(_c(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const s=this.mirror.getId(t),r=He(e.target)?this.mirror.getId(vc.host(e.target)):this.mirror.getId(e.target);_c(e.target,this.blockClass,this.blockSelector,!1)||Tc(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(eh(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===s||Pc(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[qc(s,r)]?eh(this.movedSet,t):(this.removes.push({parentId:r,id:s,isShadow:!(!He(e.target)||!Ke(e.target))||void 0}),function(e,t){const s=[e];for(;s.length;){const e=s.pop();t.has(e)||(t.add(e),vc.childNodes(e).forEach(e=>s.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),Le(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Tc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;t&&this.mirror.hasNode(t)&&(s=this.mirror.getId(t)),s&&-1!==s&&(this.movedMap[qc(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);_c(e,this.blockClass,this.blockSelector,!1)||(vc.childNodes(e).forEach(e=>this.genAdds(e)),Bc(e)&&vc.childNodes(vc.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function eh(e,t){e.delete(t),vc.childNodes(t).forEach(t=>eh(e,t))}function th(e,t,s){return 0!==e.size&&function(e,t){const s=vc.parentNode(t);return!!s&&e.has(s)}(e,t)}function sh(e,t){return 0!==e.size&&rh(e,t)}function rh(e,t){const s=vc.parentNode(t);return!!s&&(!!e.has(s)||rh(e,s))}let nh;const ih=e=>{if(!nh)return e;return(...t)=>{try{return e(...t)}catch(s){if(nh&&!0===nh(s))return;throw s}}},oh=[];function ah(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function lh(e,t){const s=new Qc;oh.push(s),s.init(e);const r=new(bc())(ih(s.processMutations.bind(s)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function ch({mouseInteractionCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const o=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];let l=null;return Object.keys(Gc).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=tt(i);const c=(t=>i=>{const o=ah(i);if(_c(o,r,n,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Zc.Mouse;break;case"touch":a=Zc.Touch;break;case"pen":a=Zc.Pen}a===Zc.Touch?Gc[t]===Gc.MouseDown?c="TouchStart":Gc[t]===Gc.MouseUp&&(c="TouchEnd"):Zc.Pen}else Lc(i)&&(a=Zc.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Zc.Touch||c.startsWith("Mouse")&&a===Zc.Mouse)&&(a=null)):Gc[t]===Gc.Click&&(a=l,l=null);const h=Lc(i)?i.changedTouches[0]:i;if(!h)return;const u=s.getId(o),{clientX:p,clientY:d}=h;ih(e)({type:Gc[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(Gc[i]){case Gc.MouseDown:case Gc.MouseUp:o=o.replace("mouse","pointer");break;case Gc.TouchStart:case Gc.TouchEnd:return}a.push(Cc(o,c,t))}),ih(()=>{a.forEach(e=>e())})}function hh({scrollCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,sampling:i}){return Cc("scroll",ih(Ic(ih(i=>{const o=ah(i);if(!o||_c(o,r,n,!0))return;const a=s.getId(o);if(o===t&&t.defaultView){const s=Ec(t.defaultView);e({id:a,x:s.left,y:s.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const uh=["INPUT","TEXTAREA","SELECT"],ph=new WeakMap;function dh(e){return function(e,t){if(yh("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||yh("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||yh("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||yh("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const s=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(s)}else if(e.parentStyleSheet){const s=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(s)}return t}(e,[])}function fh(e,t,s){let r,n;return e?(e.ownerNode?r=t.getId(e.ownerNode):n=s.getId(e),{styleId:n,id:r}):{}}function mh({mirror:e,stylesheetManager:t},s){var r,n,i;let o=null;o="#document"===s.nodeName?e.getId(s):e.getId(vc.host(s));const a="#document"===s.nodeName?null==(r=s.defaultView)?void 0:r.Document:null==(i=null==(n=s.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&a&&l?(Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var s;const r=null==(s=l.set)?void 0:s.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(n){}return r}}),ih(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function gh(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};let r;!function(e,t){const{mutationCb:s,mousemoveCb:r,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),s(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(r=lh(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:s,mirror:r}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let o,a=[];const l=Ic(ih(t=>{const s=Date.now()-o;e(a.map(e=>(e.timeOffset-=s,e)),t),a=[],o=null}),i),c=ih(Ic(ih(e=>{const t=ah(e),{clientX:s,clientY:n}=Lc(e)?e.changedTouches[0]:e;o||(o=Ac()),a.push({x:s,y:n,id:r.getId(t),timeOffset:Ac()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Yc.Drag:e instanceof MouseEvent?Yc.MouseMove:Yc.TouchMove)}),n,{trailing:!1})),h=[Cc("mousemove",c,s),Cc("touchmove",c,s),Cc("drag",c,s)];return ih(()=>{h.forEach(e=>e())})}(e),i=ch(e),o=hh(e),a=function({viewportResizeCb:e},{win:t}){let s=-1,r=-1;return Cc("resize",ih(Ic(ih(()=>{const t=Rc(),n=Mc();s===t&&r===n||(e({width:Number(n),height:Number(t)}),s=t,r=n)}),200)),t)}(e,{win:s}),l=function({inputCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let s=ah(e);const c=e.isTrusted,u=s&&s.tagName;if(s&&"OPTION"===u&&(s=vc.parentElement(s)),!s||!u||uh.indexOf(u)<0||_c(s,r,n,!0))return;if(s.classList.contains(i)||o&&s.matches(o))return;let d=s.value,f=!1;const m=rt(s)||"";"radio"===m||"checkbox"===m?f=s.checked:(a[u.toLowerCase()]||a[m])&&(d=et({element:s,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(s,h?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=s.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==s){const t=e.value;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,r){const n=ph.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){ph.set(t,r);const n=s.getId(t);ih(e)({...r,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>Cc(e,ih(u),t)),f=t.defaultView;if(!f)return()=>{d.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...g.map(e=>xc(e[0],e[1],{set(){ih(u)({target:this,isTrusted:!1})}},!1,f))),ih(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:r,sampling:n,doc:i}){const o=ih(i=>Ic(ih(n=>{const o=ah(n);if(!o||_c(o,t,s,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:r.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),n.media||500)),a=[Cc("play",o(Xc.Play),i),Cc("pause",o(Xc.Pause),i),Cc("seeked",o(Xc.Seeked),i),Cc("volumechange",o(Xc.VolumeChange),i),Cc("ratechange",o(Xc.RateChange),i)];return ih(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:ih((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=fh(n,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:a}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.addRule=function(e,t,s=this.cssRules.length){const n=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[n,s])};const i=r.CSSStyleSheet.prototype.deleteRule;let o,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),r.apply(n,i)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),r.apply(n,i)})}));const l={};wh("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(wh("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),wh("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),wh("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach(([r,n])=>{c[r]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[r].insertRule,{apply:ih((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=fh(n.parentStyleSheet,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...dh(n),a||0]}]}),r.apply(n,i)})}),n.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n.parentStyleSheet,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...dh(n),o]}]}),r.apply(n,i)})})}),ih(()=>{r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:s}),u=mh(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:r},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ih((n,o,a)=>{var l;const[c,h,u]=a;if(s.has(c))return i.apply(o,[c,h,u]);const{id:p,styleId:d}=fh(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:dh(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ih((n,i,a)=>{var l;const[c]=a;if(s.has(c))return o.apply(i,[c]);const{id:h,styleId:u}=fh(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:dh(i.parentRule)}),n.apply(i,a)})}),ih(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:s}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const r=[],n=new WeakMap,i=s.FontFace;s.FontFace=function(e,t,s){const r=new i(e,t,s);return n.set(r,{family:e,buffer:"string"!=typeof t,descriptors:s,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const o=Oc(t.fonts,"add",function(t){return function(s){return setTimeout(ih(()=>{const t=n.get(s);t&&(e(t),n.delete(s))}),0),t.apply(this,[s])}});return r.push(()=>{s.FontFace=i}),r.push(o),ih(()=>{r.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:s,blockClass:r,blockSelector:n,selectionCb:i}=e;let o=!0;const a=ih(()=>{const e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:c,endOffset:h}=i;_c(o,r,n,!0)||_c(c,r,n,!0)||a.push({start:s.getId(o),startOffset:l,end:s.getId(c),endOffset:h})}i({ranges:a})});return a(),Cc("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const s=e.defaultView;return s&&s.customElements?Oc(s.customElements,"define",function(e){return function(s,r,n){try{t({define:{name:s}})}catch(i){console.warn(`Custom element callback failed for ${s}`)}return e.apply(this,[s,r,n])}}):()=>{}}(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,s,y.options));return ih(()=>{oh.forEach(e=>e.reset()),null==r||r.disconnect(),n(),i(),o(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach(e=>e())})}function yh(e){return void 0!==window[e]}function wh(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class bh{constructor(e){Le(this,"iframeIdToRemoteIdMap",new WeakMap),Le(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,r){const n=s||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let o=n.get(t);return o||(o=this.generateIdFn(),n.set(t,o),i.set(o,t)),o}getIds(e,t){const s=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,s,r))}getRemoteId(e,t,s){const r=s||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=r.get(t);return n||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,s))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class vh{constructor(e){Le(this,"iframes",new WeakMap),Le(this,"crossOriginIframeMap",new WeakMap),Le(this,"crossOriginIframeMirror",new bh(ft)),Le(this,"crossOriginIframeStyleMirror"),Le(this,"crossOriginIframeRootIdMap",new WeakMap),Le(this,"mirror"),Le(this,"mutationCb"),Le(this,"wrappedEmit"),Le(this,"loadListener"),Le(this,"stylesheetManager"),Le(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new bh(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var s,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(s=e.contentWindow)||s.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const r=this.transformCrossOriginEvent(s,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var s;switch(t.type){case Wc.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:Wc.IncrementalSnapshot,data:{source:Yc.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Wc.Meta:case Wc.Load:case Wc.DomContentLoaded:return!1;case Wc.Plugin:return t;case Wc.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Wc.IncrementalSnapshot:switch(t.data.source){case Yc.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(t.node,s)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Yc.Drag:case Yc.TouchMove:case Yc.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Yc.ViewportResize:return!1;case Yc.MediaInteraction:case Yc.MouseInteraction:case Yc.Scroll:case Yc.CanvasMutation:case Yc.Input:return this.replaceIds(t.data,e,["id"]),t;case Yc.StyleSheetRule:case Yc.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Yc.Font:return t;case Yc.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Yc.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(s=t.data.styles)||s.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,s,r){for(const n of r)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(s,t[n]):t[n]=e.getId(s,t[n]));return t}replaceIds(e,t,s){return this.replace(this.crossOriginIframeMirror,e,t,s)}replaceStyleIds(e,t,s){return this.replace(this.crossOriginIframeStyleMirror,e,t,s)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===Hc.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Ch{constructor(e){Le(this,"shadowDoms",new WeakSet),Le(this,"mutationCb"),Le(this,"scrollCb"),Le(this,"bypassOptions"),Le(this,"mirror"),Le(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ke(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=lh({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(hh({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(vc.host(e))),this.restoreHandlers.push(mh({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const s=this;this.restoreHandlers.push(Oc(e.prototype,"attachShadow",function(e){return function(r){const n=e.call(this,r),i=vc.shadowRoot(this);return i&&Vc(this)&&s.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Sh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kh="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ih=0;Ih<64;Ih++)kh[Sh.charCodeAt(Ih)]=Ih;const xh=new Map;const Oh=(e,t,s)=>{if(!e||!Rh(e,t)&&"object"!=typeof e)return;const r=function(e,t){let s=xh.get(e);return s||(s=new Map,xh.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}(s,e.constructor.name);let n=r.indexOf(e);return-1===n&&(n=r.length,r.push(e)),n};function Ah(e,t,s){if(e instanceof Array)return e.map(e=>Ah(e,t,s));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,s=new Uint8Array(e),r=s.length,n="";for(t=0;t<r;t+=3)n+=Sh[s[t]>>2],n+=Sh[(3&s[t])<<4|s[t+1]>>4],n+=Sh[(15&s[t+1])<<2|s[t+2]>>6],n+=Sh[63&s[t+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ah(e.buffer,t,s),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:s}=e;return{rr_type:t,src:s}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ah(e.data,t,s),e.width,e.height]}}if(Rh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Oh(e,t,s)}}return e}const Eh=(e,t,s)=>e.map(e=>Ah(e,t,s)),Rh=(e,t)=>{const s=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(s.find(s=>e instanceof t[s]))};function Mh(e,t,s,r){const n=[];try{const i=Oc(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!_c(this,t,s,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),r&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...i])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function Nh(e,t,s,r,n,i){const o=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=Oc(e,l,function(e){return function(...o){const a=e.apply(this,o);if(Oh(a,i,this),"tagName"in this.canvas&&!_c(this.canvas,r,n,!0)){const e=Eh(o,i,this),r={type:t,property:l,args:e};s(this.canvas,r)}return a}});o.push(a)}catch{const r=xc(e,l,{set(e){s(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(r)}return o}const _h="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Th="undefined"!=typeof window&&window.Blob&&new Blob([(Ph=_h,Uint8Array.from(atob(Ph),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var Ph;function Lh(e){let t;try{if(t=Th&&(window.URL||window.webkitURL).createObjectURL(Th),!t)throw"";const s=new Worker(t,{name:null==e?void 0:e.name});return s.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;base64,"+_h,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Fh{constructor(e){Le(this,"pendingCanvasMutations",new Map),Le(this,"rafStamps",{latestId:0,invokeId:null}),Le(this,"mirror"),Le(this,"mutationCb"),Le(this,"resetObservers"),Le(this,"frozen",!1),Le(this,"locked",!1),Le(this,"processMutation",(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:s,blockClass:r,blockSelector:n,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(s,r,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,s,r,n,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,s,r,n){const i=Mh(t,s,r,!0),o=new Map,a=new Lh;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:s,type:r,width:n,height:i}=e.data;this.mutationCb({id:t,type:Jc["2D"],commands:[{property:"clearRect",args:[0,0,n,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:r}]},0,0]}]})};const l=1e3/e;let c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{_c(t,s,r,!0)||e.push(t)}),e})().forEach(async e=>{var t;const s=this.mirror.getId(e);if(o.get(s))return;if(0===e.width||0===e.height)return;if(o.set(s,!0),["webgl","webgl2"].includes(e.__context)){const s=e.getContext(e.__context);!1===(null==(t=null==s?void 0:s.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&s.clear(s.COLOR_BUFFER_BIT)}const r=await createImageBitmap(e);a.postMessage({id:s,bitmap:r,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[r])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Mh(e,t,s,!1),n=function(e,t,s,r){const n=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=Oc(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return _c(this.canvas,s,r,!0)||setTimeout(()=>{const s=Eh(i,t,this);e(this.canvas,{type:Jc["2D"],property:o,args:s})},0),n.apply(this,i)}});n.push(i)}catch{const s=xc(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:Jc["2D"],property:o,args:[t],setter:!0})}});n.push(s)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s),i=function(e,t,s,r){const n=[];return n.push(...Nh(t.WebGLRenderingContext.prototype,Jc.WebGL,e,s,r,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Nh(t.WebGL2RenderingContext.prototype,Jc.WebGL2,e,s,r,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{r(),n(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const s=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(e);if(!s||-1===t)return;const r=s.map(e=>{const{type:t,...s}=e;return s}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}class Dh{constructor(e){Le(this,"trackedLinkElements",new WeakSet),Le(this,"mutationCb"),Le(this,"adoptedStyleSheetCb"),Le(this,"styleMirror",new Uc),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const s={id:t,styleIds:[]},r=[];for(const n of e){let e;this.styleMirror.has(n)?e=this.styleMirror.getId(n):(e=this.styleMirror.add(n),r.push({styleId:e,rules:Array.from(n.rules||CSSRule,(e,t)=>({rule:qe(e,n.href),index:t}))})),s.styleIds.push(e)}r.length>0&&(s.styles=r),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Bh{constructor(){Le(this,"nodeMap",new WeakMap),Le(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Uh,jh,zh,Vh=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Te=e.contentWindow)?void 0:Te.Array.from)||Array.from,document.body.removeChild(e)}}catch(Kb){console.debug("Unable to override Array.from",Kb)}const Wh=new Qe;function Yh(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:r,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:C=!0,recordCanvas:S=!1,recordCrossOriginIframes:k=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:E,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:N}=e;nh=N;const _=!k||window.parent===window;let T=!1;if(!_)try{window.parent.document&&(T=!1)}catch(Z){T=!0}if(_&&!t)throw new Error("emit function is required");if(!_&&!T)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),Wh.reset();const P=!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==p?p:{password:!0},L=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let F;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let D=0;const B=e=>{for(const t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!T&&(e=y(e)),e};Uh=(e,n)=>{var i;const o=e;if(o.timestamp=Ac(),!(null==(i=oh[0])?void 0:i.isFrozen())||o.type===Wc.FullSnapshot||o.type===Wc.IncrementalSnapshot&&o.data.source===Yc.Mutation||oh.forEach(e=>e.unfreeze()),_)null==t||t(B(o),n);else if(T){const e={type:"rrweb",event:B(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===Wc.FullSnapshot)F=o,D=0;else if(o.type===Wc.IncrementalSnapshot){if(o.data.source===Yc.Mutation&&o.data.isAttachIframe)return;D++;const e=r&&D>=r,t=s&&o.timestamp-F.timestamp>s;(e||t)&&jh(!0)}};const U=e=>{Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Mutation,...e}})},j=e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Scroll,...e}}),z=e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.CanvasMutation,...e}}),V=new Dh({mutationCb:U,adoptedStyleSheetCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.AdoptedStyleSheet,...e}})}),W=new vh({mirror:Wh,mutationCb:U,stylesheetManager:V,recordCrossOriginIframes:k,wrappedEmit:Uh});for(const X of E||[])X.getMirror&&X.getMirror({nodeMirror:Wh,crossOriginIframeMirror:W.crossOriginIframeMirror,crossOriginIframeStyleMirror:W.crossOriginIframeStyleMirror});const Y=new Bh;zh=new Fh({recordCanvas:S,mutationCb:z,win:window,blockClass:n,blockSelector:i,mirror:Wh,sampling:w.canvas,dataURLOptions:b});const G=new Ch({mutationCb:U,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:P,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:S,inlineImages:A,sampling:w,slimDOMOptions:L,iframeManager:W,stylesheetManager:V,canvasManager:zh,keepIframeSrcFn:R,processedNodeManager:Y},mirror:Wh});jh=(e=!1)=>{if(!C)return;Uh({type:Wc.Meta,data:{href:window.location.href,width:Mc(),height:Rc()}},e),V.reset(),G.init(),oh.forEach(e=>e.lock());const t=function(e,t){const{mirror:s=new Qe,blockClass:r="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C=()=>!1}=t||{};return Rt(e,{doc:e,mirror:s,blockClass:r,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Wh,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:P,maskTextFn:m,maskInputFn:f,slimDOM:L,dataURLOptions:b,recordCanvas:S,inlineImages:A,onSerialize:e=>{Fc(e,Wh)&&W.addIframe(e),Dc(e,Wh)&&V.trackLinkElement(e),Bc(e)&&G.addShadowRoot(vc.shadowRoot(e),document)},onIframeLoad:(e,t)=>{W.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");Uh({type:Wc.FullSnapshot,data:{node:t,initialOffset:Ec(window)}},e),oh.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,Wh.getId(document))};try{const e=[],t=e=>{var t;return ih(gh)({mutationCb:U,mousemoveCb:(e,t)=>Uh({type:Wc.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.ViewportResize,...e}}),inputCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Input,...e}}),mediaInteractionCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.MediaInteraction,...e}}),styleSheetRuleCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.StyleSheetRule,...e}}),styleDeclarationCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.StyleDeclaration,...e}}),canvasMutationCb:z,fontCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Font,...e}}),selectionCb:e=>{Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Selection,...e}})},customElementCb:e=>{Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:P,inlineStylesheet:h,sampling:w,recordDOM:C,recordCanvas:S,inlineImages:A,userTriggeredOnInput:x,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:L,dataURLOptions:b,mirror:Wh,iframeManager:W,stylesheetManager:V,shadowDomManager:G,processedNodeManager:Y,canvasManager:zh,ignoreCSSAttributes:M,plugins:(null==(t=null==E?void 0:E.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Uh({type:Wc.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};W.addLoadListener(s=>{try{e.push(t(s.contentDocument))}catch(r){console.warn(r)}});const s=()=>{jh(),e.push(t(document)),Vh=!0};return"interactive"===document.readyState||"complete"===document.readyState?s():(e.push(Cc("DOMContentLoaded",()=>{Uh({type:Wc.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&s()})),e.push(Cc("load",()=>{Uh({type:Wc.Load,data:{}}),"load"===I&&s()},window))),()=>{e.forEach(e=>e()),Y.destroy(),Vh=!1,nh=void 0}}catch(J){console.warn(J)}}var Gh,Zh;Yh.addCustomEvent=(e,t)=>{if(!Vh)throw new Error("please add custom event after start recording");Uh({type:Wc.Custom,data:{tag:e,payload:t}})},Yh.freezePage=()=>{oh.forEach(e=>e.freeze())},Yh.takeFullSnapshot=e=>{if(!Vh)throw new Error("please take full snapshot after start recording");jh(e)},Yh.mirror=Wh,(Zh=Gh||(Gh={}))[Zh.NotStarted=0]="NotStarted",Zh[Zh.Running=1]="Running",Zh[Zh.Stopped=2]="Stopped";const{addCustomEvent:Jh}=Yh,{freezePage:Xh}=Yh,{takeFullSnapshot:Hh}=Yh;class Kh extends Array{constructor(){super()}isEmpty(){return 0===this.length}isFull(){return 10===this.length}flush(){return this.splice(0,this.length)}}class $h{constructor(e){__publicField(this,"agent"),__publicField(this,"eventBuffer"),this.agent=e,this.eventBuffer=new Kh}start(){document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.send()})}handle(e){e.type===Wc.FullSnapshot&&this.eventBuffer.find(e=>e.type===Wc.FullSnapshot)||(this.eventBuffer.push(e),this.eventBuffer.isFull()&&this.send())}async send(){if(!this.eventBuffer.isEmpty()&&this.agent.sendEvents){const e=this.eventBuffer.flush();await this.agent.sendEvents(e)}}}var qh,Qh=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Qh||{}),eu=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(eu||{}),tu=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(tu||{}),su=Object.defineProperty,ru=(e,t,s)=>((e,t,s)=>t in e?su(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),nu=Object.defineProperty,iu=(e,t,s)=>((e,t,s)=>t in e?nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),ou=Object.defineProperty,au=(e,t,s)=>((e,t,s)=>t in e?ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);const lu={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hu={};function uu(e){if(hu[e])return hu[e];const t=globalThis[e],s=t.prototype,r=e in lu?lu[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in cu?cu[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return hu[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?hu[e]=i:s}catch{return s}}const pu={};function du(e,t,s){var r;const n=`${e}.${String(s)}`;if(pu[n])return pu[n].call(t);const i=uu(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(pu[n]=o,o.call(t)):t[s]}const fu={};function mu(e,t,s){const r=`${e}.${String(s)}`;if(fu[r])return fu[r].bind(t);const n=uu(e)[s];return"function"!=typeof n?t[s]:(fu[r]=n,n.bind(t))}const gu={childNodes:function(e){return du("Node",e,"childNodes")},parentNode:function(e){return du("Node",e,"parentNode")},parentElement:function(e){return du("Node",e,"parentElement")},textContent:function(e){return du("Node",e,"textContent")},contains:function(e,t){return mu("Node",e,"contains")(t)},getRootNode:function(e){return mu("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?du("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?du("Element",e,"shadowRoot"):null},querySelector:function(e,t){return du("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return du("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return uu("MutationObserver").constructor}};class yu{constructor(){au(this,"idNodeMap",new Map),au(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wu(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&wu(gu.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&wu(gu.parentNode(e),t,s)}function bu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vu(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var Cu={exports:{}},Su=String,ku=function(){return{isColorSupported:!1,reset:Su,bold:Su,dim:Su,italic:Su,underline:Su,inverse:Su,hidden:Su,strikethrough:Su,black:Su,red:Su,green:Su,yellow:Su,blue:Su,magenta:Su,cyan:Su,white:Su,gray:Su,bgBlack:Su,bgRed:Su,bgGreen:Su,bgYellow:Su,bgBlue:Su,bgMagenta:Su,bgCyan:Su,bgWhite:Su}};Cu.exports=ku(),Cu.exports.createColors=ku;var Iu=Cu.exports;const xu=vu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ou=Iu,Au=xu,Eu=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ou.isColorSupported),Au&&e&&(t=Au(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Ou.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ru=Eu;Eu.default=Eu;var Mu={};Mu.isClean=Symbol("isClean"),Mu.my=Symbol("my");const Nu={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let _u=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Nu[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Nu[s]),i.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Tu=_u;_u.default=_u;let Pu=Tu;function Lu(e,t){new Pu(t).stringify(e)}var Fu=Lu;Lu.default=Lu;let{isClean:Du,my:Bu}=Mu,Uu=Ru,ju=Tu,zu=Fu;function Vu(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Vu(e,s)):("object"===i&&null!==n&&(n=Vu(n)),s[r]=n)}return s}let Wu=class{constructor(e={}){this.raws={},this[Du]=!1,this[Bu]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Vu(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Uu(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Du]){this[Du]=!1;let e=this;for(;e=e.parent;)e[Du]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new ju).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=zu){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Yu=Wu;Wu.default=Wu;let Gu=Yu,Zu=class extends Gu{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Ju=Zu;Zu.default=Zu;var Xu={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Hu,SourceMapGenerator:Ku}=xu,{existsSync:$u,readFileSync:qu}=xu,{dirname:Qu,join:ep}=xu;let tp=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Qu(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Hu(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Qu(e),$u(e))return this.mapFile=e,qu(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Hu)return Ku.fromSourceMap(t).toString();if(t instanceof Ku)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ep(Qu(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var sp=tp;tp.default=tp;let{SourceMapConsumer:rp,SourceMapGenerator:np}=xu,{fileURLToPath:ip,pathToFileURL:op}=xu,{isAbsolute:ap,resolve:lp}=xu,{nanoid:cp}=Xu,hp=xu,up=Ru,pp=sp,dp=Symbol("fromOffsetCache"),fp=Boolean(rp&&np),mp=Boolean(lp&&ap),gp=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!mp||/^\w+:\/\//.test(t.from)||ap(t.from)?this.file=t.from:this.file=lp(t.from)),mp&&fp){let e=new pp(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+cp(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new up(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new up(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(op&&(n.input.url=op(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[dp])s=this[dp];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[dp]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:lp(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=ap(a.source)?op(a.source):new URL(a.source,this.map.consumer().sourceRoot||op(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ip)throw new Error("file: protocol is not available in this PostCSS build");l.file=ip(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var yp=gp;gp.default=gp,hp&&hp.registerInput&&hp.registerInput(gp);let{SourceMapConsumer:wp,SourceMapGenerator:bp}=xu,{dirname:vp,relative:Cp,resolve:Sp,sep:kp}=xu,{pathToFileURL:Ip}=xu,xp=yp,Op=Boolean(wp&&bp),Ap=Boolean(vp&&Sp&&Cp&&kp);var Ep=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,s=this.toUrl(this.path(e.file)),r=e.root||vp(e.file);!1===this.mapOpts.sourcesContent?(t=new wp(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ap&&Op&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=bp.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new bp({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new bp({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?vp(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=vp(Sp(s,this.mapOpts.annotation)));let r=Cp(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new xp(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ip){let t=Ip(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===kp&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Rp=Yu,Mp=class extends Rp{constructor(e){super(e),this.type="comment"}};var Np=Mp;Mp.default=Mp;let _p,Tp,Pp,Lp,{isClean:Fp,my:Dp}=Mu,Bp=Ju,Up=Np,jp=Yu;function zp(e){return e.map(e=>(e.nodes&&(e.nodes=zp(e.nodes)),delete e.source,e))}function Vp(e){if(e[Fp]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Vp(t)}let Wp=class e extends jp{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=zp(_p(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Bp(t)]}else if(t.selector)t=[new Tp(t)];else if(t.name)t=[new Pp(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Up(t)]}return t.map(t=>(t[Dp]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Fp]&&Vp(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Wp.registerParse=e=>{_p=e},Wp.registerRule=e=>{Tp=e},Wp.registerAtRule=e=>{Pp=e},Wp.registerRoot=e=>{Lp=e};var Yp=Wp;Wp.default=Wp,Wp.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Pp.prototype):"rule"===e.type?Object.setPrototypeOf(e,Tp.prototype):"decl"===e.type?Object.setPrototypeOf(e,Bp.prototype):"comment"===e.type?Object.setPrototypeOf(e,Up.prototype):"root"===e.type&&Object.setPrototypeOf(e,Lp.prototype),e[Dp]=!0,e.nodes&&e.nodes.forEach(e=>{Wp.rebuild(e)})};let Gp,Zp,Jp=Yp,Xp=class extends Jp{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Gp(new Zp,this,e).stringify()}};Xp.registerLazyResult=e=>{Gp=e},Xp.registerProcessor=e=>{Zp=e};var Hp=Xp;Xp.default=Xp;let Kp={};var $p=function(e){Kp[e]||(Kp[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let qp=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Qp=qp;qp.default=qp;let ed=Qp,td=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new ed(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var sd=td;td.default=td;const rd="'".charCodeAt(0),nd='"'.charCodeAt(0),id="\\".charCodeAt(0),od="/".charCodeAt(0),ad="\n".charCodeAt(0),ld=" ".charCodeAt(0),cd="\f".charCodeAt(0),hd="\t".charCodeAt(0),ud="\r".charCodeAt(0),pd="[".charCodeAt(0),dd="]".charCodeAt(0),fd="(".charCodeAt(0),md=")".charCodeAt(0),gd="{".charCodeAt(0),yd="}".charCodeAt(0),wd=";".charCodeAt(0),bd="*".charCodeAt(0),vd=":".charCodeAt(0),Cd="@".charCodeAt(0),Sd=/[\t\n\f\r "#'()/;[\\\]{}]/g,kd=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Id=/.[\r\n"'(/\\]/,xd=/[\da-f]/i;let Od=Yp,Ad=class extends Od{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ed=Ad;Ad.default=Ad,Od.registerAtRule(Ad);let Rd,Md,Nd=Yp,_d=class extends Nd{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Rd(new Md,this,e).stringify()}};_d.registerLazyResult=e=>{Rd=e},_d.registerProcessor=e=>{Md=e};var Td=_d;_d.default=_d,Nd.registerRoot(_d);let Pd={comma:e=>Pd.split(e,[","],!0),space:e=>Pd.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Ld=Pd;Pd.default=Pd;let Fd=Yp,Dd=Ld,Bd=class extends Fd{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Dd.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Ud=Bd;Bd.default=Bd,Fd.registerRule(Bd);let jd=Ju,zd=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case ad:case ld:case hd:case ud:case cd:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===ld||s===ad||s===hd||s===ud||s===cd);u=["space",p.slice(m,r)],m=r-1;break;case pd:case dd:case gd:case yd:case vd:case wd:case md:{let e=String.fromCharCode(s);u=[e,e,m];break}case fd:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==rd&&h!==nd&&h!==ld&&h!==ad&&h!==hd&&h!==cd&&h!==ud){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===id;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Id.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case rd:case nd:n=s===rd?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===id;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Cd:Sd.lastIndex=m+1,Sd.test(p),r=0===Sd.lastIndex?p.length-1:Sd.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case id:for(r=m,o=!0;p.charCodeAt(r+1)===id;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==od&&s!==ld&&s!==ad&&s!==hd&&s!==ud&&s!==cd&&(r+=1,xd.test(p.charAt(r)))){for(;xd.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===ld&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===od&&p.charCodeAt(m+1)===bd?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(kd.lastIndex=m+1,kd.test(p),r=0===kd.lastIndex?p.length-1:kd.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Vd=Np,Wd=Ed,Yd=Td,Gd=Ud;const Zd={empty:!0,space:!0};let Jd=Yp,Xd=class{constructor(e){this.input=e,this.root=new Yd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,s,r,n=new Wd;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Vd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=zd(this.input)}decl(e,t){let s=new jd;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Gd;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Zd[a]||Zd[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Gd;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Hd=yp;function Kd(e,t){let s=new Hd(e,t),r=new Xd(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var $d=Kd;Kd.default=Kd,Jd.registerParse(Kd);let{isClean:qd,my:Qd}=Mu,ef=Ep,tf=Fu,sf=Yp,rf=Hp,nf=$p,of=sd,af=$d,lf=Td;const cf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},hf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},uf={Once:!0,postcssPlugin:!0,prepare:!0};function pf(e){return"object"==typeof e&&"function"==typeof e.then}function df(e){let t=!1,s=cf[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function ff(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:df(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function mf(e){return e[qd]=!1,e.nodes&&e.nodes.forEach(e=>mf(e)),e}let gf={},yf=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof of)n=mf(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=af;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[Qd]&&sf.rebuild(n)}else n=mf(s);this.result=new of(t,n,r),this.helpers={...gf,postcss:gf,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!hf[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uf[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(pf(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qd];){e[qd]=!0;let s=[ff(e)];for(;s.length>0;){let e=this.visitTick(s);if(pf(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return pf(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=tf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new ef(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(pf(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qd];)e[qd]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||nf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(pf(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[qd])return r[qd]=!0,void e.push(ff(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[qd]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[qd]=!0;let t=df(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[qd]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};yf.registerPostcss=e=>{gf=e};var wf=yf;yf.default=yf,lf.registerLazyResult(yf),rf.registerLazyResult(yf);let bf=Ep,vf=Fu,Cf=$p,Sf=$d;const kf=sd;let If=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=vf;this.result=new kf(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new bf(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Cf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Sf;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var xf=If;If.default=If;let Of=xf,Af=wf,Ef=Hp,Rf=Td,Mf=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Af(this,e,t):new Of(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Nf=Mf;Mf.default=Mf,Rf.registerProcessor(Mf),Ef.registerProcessor(Mf);let _f=Ju,Tf=sp,Pf=Np,Lf=Ed,Ff=yp,Df=Td,Bf=Ud;function Uf(e,t){if(Array.isArray(e))return e.map(e=>Uf(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ff.prototype};s.map&&(s.map={...s.map,__proto__:Tf.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Uf(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Df(r);if("decl"===r.type)return new _f(r);if("rule"===r.type)return new Bf(r);if("comment"===r.type)return new Pf(r);if("atrule"===r.type)return new Lf(r);throw new Error("Unknown node type: "+e.type)}var jf=Uf;Uf.default=Uf;let zf=Ru,Vf=Ju,Wf=wf,Yf=Yp,Gf=Nf,Zf=Fu,Jf=jf,Xf=Hp,Hf=Qp,Kf=Np,$f=Ed,qf=sd,Qf=yp,em=$d,tm=Ld,sm=Ud,rm=Td,nm=Yu;function im(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Gf(e)}im.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new Gf).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return im([n(s)]).process(e,t)},n},im.stringify=Zf,im.parse=em,im.fromJSON=Jf,im.list=tm,im.comment=e=>new Kf(e),im.atRule=e=>new $f(e),im.decl=e=>new Vf(e),im.rule=e=>new sm(e),im.root=e=>new rm(e),im.document=e=>new Xf(e),im.CssSyntaxError=zf,im.Declaration=Vf,im.Container=Yf,im.Processor=Gf,im.Document=Xf,im.Comment=Kf,im.Warning=Hf,im.AtRule=$f,im.Result=qf,im.Input=Qf,im.Rule=sm,im.Root=rm,im.Node=nm,Wf.registerPostcss(im);var om=im;im.default=im;const am=bu(om);am.stringify,am.fromJSON,am.plugin,am.parse,am.list,am.document,am.comment,am.atRule,am.rule,am.decl,am.root,am.CssSyntaxError,am.Declaration,am.Container,am.Processor,am.Document,am.Comment,am.Warning,am.AtRule,am.Result,am.Input,am.Rule,am.Root,am.Node;var lm=Object.defineProperty,cm=(e,t,s)=>((e,t,s)=>t in e?lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function hm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function um(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var pm={exports:{}},dm=String,fm=function(){return{isColorSupported:!1,reset:dm,bold:dm,dim:dm,italic:dm,underline:dm,inverse:dm,hidden:dm,strikethrough:dm,black:dm,red:dm,green:dm,yellow:dm,blue:dm,magenta:dm,cyan:dm,white:dm,gray:dm,bgBlack:dm,bgRed:dm,bgGreen:dm,bgYellow:dm,bgBlue:dm,bgMagenta:dm,bgCyan:dm,bgWhite:dm}};pm.exports=fm(),pm.exports.createColors=fm;var mm=pm.exports;const gm=um(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let ym=mm,wm=gm,bm=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=ym.isColorSupported),wm&&e&&(t=wm(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=ym.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var vm=bm;bm.default=bm;var Cm={};Cm.isClean=Symbol("isClean"),Cm.my=Symbol("my");const Sm={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let km=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Sm[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Sm[s]),i.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Im=km;km.default=km;let xm=Im;function Om(e,t){new xm(t).stringify(e)}var Am=Om;Om.default=Om;let{isClean:Em,my:Rm}=Cm,Mm=vm,Nm=Im,_m=Am;function Tm(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Tm(e,s)):("object"===i&&null!==n&&(n=Tm(n)),s[r]=n)}return s}let Pm=class{constructor(e={}){this.raws={},this[Em]=!1,this[Rm]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Tm(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Mm(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Em]){this[Em]=!1;let e=this;for(;e=e.parent;)e[Em]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Nm).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=_m){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Lm=Pm;Pm.default=Pm;let Fm=Lm,Dm=class extends Fm{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Bm=Dm;Dm.default=Dm;var Um={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:jm,SourceMapGenerator:zm}=gm,{existsSync:Vm,readFileSync:Wm}=gm,{dirname:Ym,join:Gm}=gm;let Zm=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ym(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new jm(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Ym(e),Vm(e))return this.mapFile=e,Wm(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof jm)return zm.fromSourceMap(t).toString();if(t instanceof zm)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Gm(Ym(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Jm=Zm;Zm.default=Zm;let{SourceMapConsumer:Xm,SourceMapGenerator:Hm}=gm,{fileURLToPath:Km,pathToFileURL:$m}=gm,{isAbsolute:qm,resolve:Qm}=gm,{nanoid:eg}=Um,tg=gm,sg=vm,rg=Jm,ng=Symbol("fromOffsetCache"),ig=Boolean(Xm&&Hm),og=Boolean(Qm&&qm),ag=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!og||/^\w+:\/\//.test(t.from)||qm(t.from)?this.file=t.from:this.file=Qm(t.from)),og&&ig){let e=new rg(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+eg(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new sg(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new sg(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&($m&&(n.input.url=$m(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[ng])s=this[ng];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[ng]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qm(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=qm(a.source)?$m(a.source):new URL(a.source,this.map.consumer().sourceRoot||$m(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!Km)throw new Error("file: protocol is not available in this PostCSS build");l.file=Km(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var lg=ag;ag.default=ag,tg&&tg.registerInput&&tg.registerInput(ag);let{SourceMapConsumer:cg,SourceMapGenerator:hg}=gm,{dirname:ug,relative:pg,resolve:dg,sep:fg}=gm,{pathToFileURL:mg}=gm,gg=lg,yg=Boolean(cg&&hg),wg=Boolean(ug&&dg&&pg&&fg);var bg=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,s=this.toUrl(this.path(e.file)),r=e.root||ug(e.file);!1===this.mapOpts.sourcesContent?(t=new cg(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),wg&&yg&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=hg.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new hg({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new hg({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ug(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=ug(dg(s,this.mapOpts.annotation)));let r=pg(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new gg(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(mg){let t=mg(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===fg&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let vg=Lm,Cg=class extends vg{constructor(e){super(e),this.type="comment"}};var Sg=Cg;Cg.default=Cg;let kg,Ig,xg,Og,{isClean:Ag,my:Eg}=Cm,Rg=Bm,Mg=Sg,Ng=Lm;function _g(e){return e.map(e=>(e.nodes&&(e.nodes=_g(e.nodes)),delete e.source,e))}function Tg(e){if(e[Ag]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Tg(t)}let Pg=class e extends Ng{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=_g(kg(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Rg(t)]}else if(t.selector)t=[new Ig(t)];else if(t.name)t=[new xg(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Mg(t)]}return t.map(t=>(t[Eg]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ag]&&Tg(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Pg.registerParse=e=>{kg=e},Pg.registerRule=e=>{Ig=e},Pg.registerAtRule=e=>{xg=e},Pg.registerRoot=e=>{Og=e};var Lg=Pg;Pg.default=Pg,Pg.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,xg.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ig.prototype):"decl"===e.type?Object.setPrototypeOf(e,Rg.prototype):"comment"===e.type?Object.setPrototypeOf(e,Mg.prototype):"root"===e.type&&Object.setPrototypeOf(e,Og.prototype),e[Eg]=!0,e.nodes&&e.nodes.forEach(e=>{Pg.rebuild(e)})};let Fg,Dg,Bg=Lg,Ug=class extends Bg{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Fg(new Dg,this,e).stringify()}};Ug.registerLazyResult=e=>{Fg=e},Ug.registerProcessor=e=>{Dg=e};var jg=Ug;Ug.default=Ug;let zg={};var Vg=function(e){zg[e]||(zg[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Wg=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Yg=Wg;Wg.default=Wg;let Gg=Yg,Zg=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new Gg(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Jg=Zg;Zg.default=Zg;const Xg="'".charCodeAt(0),Hg='"'.charCodeAt(0),Kg="\\".charCodeAt(0),$g="/".charCodeAt(0),qg="\n".charCodeAt(0),Qg=" ".charCodeAt(0),ey="\f".charCodeAt(0),ty="\t".charCodeAt(0),sy="\r".charCodeAt(0),ry="[".charCodeAt(0),ny="]".charCodeAt(0),iy="(".charCodeAt(0),oy=")".charCodeAt(0),ay="{".charCodeAt(0),ly="}".charCodeAt(0),cy=";".charCodeAt(0),hy="*".charCodeAt(0),uy=":".charCodeAt(0),py="@".charCodeAt(0),dy=/[\t\n\f\r "#'()/;[\\\]{}]/g,fy=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,my=/.[\r\n"'(/\\]/,gy=/[\da-f]/i;let yy=Lg,wy=class extends yy{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var by=wy;wy.default=wy,yy.registerAtRule(wy);let vy,Cy,Sy=Lg,ky=class extends Sy{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new vy(new Cy,this,e).stringify()}};ky.registerLazyResult=e=>{vy=e},ky.registerProcessor=e=>{Cy=e};var Iy=ky;ky.default=ky,Sy.registerRoot(ky);let xy={comma:e=>xy.split(e,[","],!0),space:e=>xy.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Oy=xy;xy.default=xy;let Ay=Lg,Ey=Oy,Ry=class extends Ay{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ey.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var My=Ry;Ry.default=Ry,Ay.registerRule(Ry);let Ny=Bm,_y=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case qg:case Qg:case ty:case sy:case ey:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===Qg||s===qg||s===ty||s===sy||s===ey);u=["space",p.slice(m,r)],m=r-1;break;case ry:case ny:case ay:case ly:case uy:case cy:case oy:{let e=String.fromCharCode(s);u=[e,e,m];break}case iy:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Xg&&h!==Hg&&h!==Qg&&h!==qg&&h!==ty&&h!==ey&&h!==sy){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===Kg;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||my.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case Xg:case Hg:n=s===Xg?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===Kg;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case py:dy.lastIndex=m+1,dy.test(p),r=0===dy.lastIndex?p.length-1:dy.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case Kg:for(r=m,o=!0;p.charCodeAt(r+1)===Kg;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==$g&&s!==Qg&&s!==qg&&s!==ty&&s!==sy&&s!==ey&&(r+=1,gy.test(p.charAt(r)))){for(;gy.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===Qg&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===$g&&p.charCodeAt(m+1)===hy?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(fy.lastIndex=m+1,fy.test(p),r=0===fy.lastIndex?p.length-1:fy.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ty=Sg,Py=by,Ly=Iy,Fy=My;const Dy={empty:!0,space:!0};let By=Lg,Uy=class{constructor(e){this.input=e,this.root=new Ly,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,s,r,n=new Py;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ty;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=_y(this.input)}decl(e,t){let s=new Ny;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Fy;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Dy[a]||Dy[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Fy;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},jy=lg;function zy(e,t){let s=new jy(e,t),r=new Uy(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var Vy=zy;zy.default=zy,By.registerParse(zy);let{isClean:Wy,my:Yy}=Cm,Gy=bg,Zy=Am,Jy=Lg,Xy=jg,Hy=Vg,Ky=Jg,$y=Vy,qy=Iy;const Qy={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ew={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},tw={Once:!0,postcssPlugin:!0,prepare:!0};function sw(e){return"object"==typeof e&&"function"==typeof e.then}function rw(e){let t=!1,s=Qy[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function nw(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:rw(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function iw(e){return e[Wy]=!1,e.nodes&&e.nodes.forEach(e=>iw(e)),e}let ow={},aw=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof Ky)n=iw(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=$y;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[Yy]&&Jy.rebuild(n)}else n=iw(s);this.result=new Ky(t,n,r),this.helpers={...ow,postcss:ow,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!ew[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!tw[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(sw(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Wy];){e[Wy]=!0;let s=[nw(e)];for(;s.length>0;){let e=this.visitTick(s);if(sw(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return sw(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Zy;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Gy(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(sw(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Wy];)e[Wy]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Hy("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(sw(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[Wy])return r[Wy]=!0,void e.push(nw(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[Wy]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Wy]=!0;let t=rw(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[Wy]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};aw.registerPostcss=e=>{ow=e};var lw=aw;aw.default=aw,qy.registerLazyResult(aw),Xy.registerLazyResult(aw);let cw=bg,hw=Am,uw=Vg,pw=Vy;const dw=Jg;let fw=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=hw;this.result=new dw(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new cw(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||uw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=pw;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var mw=fw;fw.default=fw;let gw=mw,yw=lw,ww=jg,bw=Iy,vw=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new yw(this,e,t):new gw(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Cw=vw;vw.default=vw,bw.registerProcessor(vw),ww.registerProcessor(vw);let Sw=Bm,kw=Jm,Iw=Sg,xw=by,Ow=lg,Aw=Iy,Ew=My;function Rw(e,t){if(Array.isArray(e))return e.map(e=>Rw(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ow.prototype};s.map&&(s.map={...s.map,__proto__:kw.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Rw(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Aw(r);if("decl"===r.type)return new Sw(r);if("rule"===r.type)return new Ew(r);if("comment"===r.type)return new Iw(r);if("atrule"===r.type)return new xw(r);throw new Error("Unknown node type: "+e.type)}var Mw=Rw;Rw.default=Rw;let Nw=vm,_w=Bm,Tw=lw,Pw=Lg,Lw=Cw,Fw=Am,Dw=Mw,Bw=jg,Uw=Yg,jw=Sg,zw=by,Vw=Jg,Ww=lg,Yw=Vy,Gw=Oy,Zw=My,Jw=Iy,Xw=Lm;function Hw(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Lw(e)}Hw.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new Lw).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return Hw([n(s)]).process(e,t)},n},Hw.stringify=Fw,Hw.parse=Yw,Hw.fromJSON=Dw,Hw.list=Gw,Hw.comment=e=>new jw(e),Hw.atRule=e=>new zw(e),Hw.decl=e=>new _w(e),Hw.rule=e=>new Zw(e),Hw.root=e=>new Jw(e),Hw.document=e=>new Bw(e),Hw.CssSyntaxError=Nw,Hw.Declaration=_w,Hw.Container=Pw,Hw.Processor=Lw,Hw.Document=Bw,Hw.Comment=jw,Hw.Warning=Uw,Hw.AtRule=zw,Hw.Result=Vw,Hw.Input=Ww,Hw.Rule=Zw,Hw.Root=Jw,Hw.Node=Xw,Tw.registerPostcss(Hw);var Kw=Hw;Hw.default=Hw;const $w=hm(Kw);$w.stringify,$w.fromJSON,$w.plugin,$w.parse,$w.list,$w.document,$w.comment,$w.atRule,$w.rule,$w.decl,$w.root,$w.CssSyntaxError,$w.Declaration,$w.Container,$w.Processor,$w.Document,$w.Comment,$w.Warning,$w.AtRule,$w.Result,$w.Input,$w.Rule,$w.Root,$w.Node;class qw{constructor(...e){cm(this,"parentElement",null),cm(this,"parentNode",null),cm(this,"ownerDocument"),cm(this,"firstChild",null),cm(this,"lastChild",null),cm(this,"previousSibling",null),cm(this,"nextSibling",null),cm(this,"ELEMENT_NODE",1),cm(this,"TEXT_NODE",3),cm(this,"nodeType"),cm(this,"nodeName"),cm(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof qw))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Qw={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},eb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tb={};function sb(e){if(tb[e])return tb[e];const t=globalThis[e],s=t.prototype,r=e in Qw?Qw[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in eb?eb[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return tb[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?tb[e]=i:s}catch{return s}}const rb={};function nb(e,t,s){var r;const n=`${e}.${String(s)}`;if(rb[n])return rb[n].call(t);const i=sb(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(rb[n]=o,o.call(t)):t[s]}const ib={};function ob(e,t,s){const r=`${e}.${String(s)}`;if(ib[r])return ib[r].bind(t);const n=sb(e)[s];return"function"!=typeof n?t[s]:(ib[r]=n,n.bind(t))}const ab={childNodes:function(e){return nb("Node",e,"childNodes")},parentNode:function(e){return nb("Node",e,"parentNode")},parentElement:function(e){return nb("Node",e,"parentElement")},textContent:function(e){return nb("Node",e,"textContent")},contains:function(e,t){return ob("Node",e,"contains")(t)},getRootNode:function(e){return ob("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?nb("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?nb("Element",e,"shadowRoot"):null},querySelector:function(e,t){return nb("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return nb("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return sb("MutationObserver").constructor}};const lb="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let cb={map:{},getId:()=>(console.error(lb),-1),getNode:()=>(console.error(lb),null),removeNodeFromMap(){console.error(lb)},has:()=>(console.error(lb),!1),reset(){console.error(lb)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(cb=new Proxy(cb,{get:(e,t,s)=>("map"===t&&console.error(lb),Reflect.get(e,t,s))}));let hb=Date.now;function ub(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:ab.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(hb=()=>(new Date).getTime());function pb(e){var t;let s=null;return"getRootNode"in e&&(null==(t=ab.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ab.host(ab.getRootNode(e))&&(s=ab.host(ab.getRootNode(e))),s}function db(e){let t,s=e;for(;t=pb(s);)s=t;return s}function fb(e){const t=e.ownerDocument;if(!t)return!1;const s=db(e);return ab.contains(t,s)}const mb=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){iu(this,"id",1),iu(this,"styleIDMap",new WeakMap),iu(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return cb},closestElementOfNode:ub,getBaseDimension:function e(t,s){var r,n;const i=null==(n=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:n.frameElement;if(!i||i===s)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=e(i,s),l=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,s){const r=t[s[0]];return 1===s.length?r:e(r.cssRules[s[1]].cssRules,s.slice(2))},getPositionsAndIndex:function(e){const t=[...e],s=t.pop();return{positions:t,index:s}},getRootShadowHost:db,getShadowHost:pb,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,s,r,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=ab.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=ab.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof qw&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(ab.shadowRoot(e)))},hookSetter:function e(t,s,r,n,i=window){const o=i.Object.getOwnPropertyDescriptor(t,s);return i.Object.defineProperty(t,s,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,s,o||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(ab.contains(t,e)||fb(e))},isAncestorRemoved:function e(t,s){if(function(e){const t=e&&"host"in e&&"mode"in e&&gu.host(e)||null;return Boolean(t&&"shadowRoot"in t&&gu.shadowRoot(t)===e)}(t))return!1;const r=s.getId(t);if(!s.has(r))return!0;const n=ab.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,s))},isBlocked:function(e,t,s,r){if(!e)return!1;const n=ub(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(wu(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1},isIgnored:function(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,s){s(t.value);for(let r=t.children.length-1;r>=0;r--)e(t.children[r],s)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return hb},on:function(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)},patch:function(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}},polyfill:function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},queueToResolveTrees:function(e){const t={},s=(e,s)=>{const r={value:e,parent:s,children:[]};return t[e.node.id]=r,r},r=[];for(const n of e){const{nextId:e,parentId:i}=n;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,s(n,i.parent))}else{const e=r.indexOf(i);r.splice(e,0,s(n,null))}}else if(i in t){const e=t[i];e.children.push(s(n,e))}else r.push(s(n,null))}return r},shadowHostInDom:fb,throttle:function(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}},uniqueTextMutations:function(e){const t=new Set,s=[];for(let r=e.length;r--;){const n=e[r];t.has(n.id)||(s.push(n),t.add(n.id))}return s}},Symbol.toStringTag,{value:"Module"}));for(var gb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yb="undefined"==typeof Uint8Array?[]:new Uint8Array(256),wb=0;wb<64;wb++)yb[gb.charCodeAt(wb)]=wb;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0)))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(qh=e.contentWindow)?void 0:qh.Array.from)||Array.from,document.body.removeChild(e)}}catch(Kb){console.debug("Unable to override Array.from",Kb)}var bb;new yu,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(bb||(bb={}));class vb{constructor(e){ru(this,"fileName"),ru(this,"functionName"),ru(this,"lineNumber"),ru(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const Cb=/(^|@)\S+:\d+/,Sb=/^\s*at .*(\S+:\d+|\(native\))/m,kb=/^(eval@)?(\[native code])?$/,Ib={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Sb)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Sb)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const s=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=s?t.replace(s[0],""):t;const r=t.split(/\s+/).slice(1),n=this.extractLocation(s?s[1]:r.pop()),i=r.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new vb({functionName:i,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(kb)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new vb({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=e.match(t),r=s&&s[1]?s[1]:void 0,n=this.extractLocation(e.replace(t,""));return new vb({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,s=e.message.split("\n"),r=[];for(let n=2,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new vb({fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,s=e.stacktrace.split("\n"),r=[];for(let n=0,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new vb({functionName:e[3]||void 0,fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Cb)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),s=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new vb({functionName:r,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})},this)}};function xb(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let s=e.localName;if(!s)break;s=s.toLowerCase();const r=e.parentElement,n=[];if(r.children&&r.children.length>0)for(let e=0;e<r.children.length;e++){const t=r.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===s&&n.push(t)}n.length>1&&(s+=`:eq(${n.indexOf(e)})`),t=s+(t?">"+t:""),e=r}return t}function Ob(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ab(e,t){if(0===t)return!0;const s=Object.keys(e);for(const r of s)if(Ob(e[r])&&Ab(e[r],t-1))return!0;return!1}function Eb(e,t){const s={numOfKeysLimit:50,depthOfLimit:4};Object.assign(s,t);const r=[],n=[];return JSON.stringify(e,function(e,t){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?n.splice(s,1/0,e):n.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Ob(e)&&Object.keys(e).length>s.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Ob(e)&&Ab(e,s.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();s.stringLengthLimit&&t.length>s.stringLengthLimit&&(t=`${t.slice(0,s.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const s in t){const r=t[s];Array.isArray(r)?e[s]=xb(r.length?r[0]:null):e[s]=r}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const Rb={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Mb(e,t,s){const r=s?Object.assign({},Rb,s):Rb,n=r.logger;if(!n)return()=>{};let i;i="string"==typeof n?t[n]:n;let o=0,a=!1;const l=[];if(r.level.includes("error")){const s=t=>{const s=t.message,n=t.error,i=Ib.parse(n).map(e=>e.toString()),o=[Eb(s,r.stringifyOptions)];e({level:"error",trace:i,payload:o})};t.addEventListener("error",s),l.push(()=>{t.removeEventListener("error",s)});const n=t=>{let s,n;t.reason instanceof Error?(s=t.reason,n=[Eb(`Uncaught (in promise) ${s.name}: ${s.message}`,r.stringifyOptions)]):(s=new Error,n=[Eb("Uncaught (in promise)",r.stringifyOptions),Eb(t.reason,r.stringifyOptions)]);const i=Ib.parse(s).map(e=>e.toString());e({level:"error",trace:i,payload:n})};t.addEventListener("unhandledrejection",n),l.push(()=>{t.removeEventListener("unhandledrejection",n)})}for(const h of r.level)l.push(c(i,h));return()=>{l.forEach(e=>e())};function c(t,s){return t[s]?mb.patch(t,s,t=>(...n)=>{if(t.apply(this,n),!("assert"===s&&n[0]||a)){a=!0;try{const t=Ib.parse(new Error).map(e=>e.toString()).splice(1),i=("assert"===s?n.slice(1):n).map(e=>Eb(e,r.stringifyOptions));o++,o<r.lengthThreshold?e({level:s,trace:t,payload:i}):o===r.lengthThreshold&&e({level:"warn",trace:[],payload:[Eb("The number of log records reached the threshold.")]})}catch(i){t("rrweb logger error:",i,...n)}finally{a=!1}}}):()=>{}}}const Nb={recordOptions:{blockClass:"bf-nocapture",blockSelector:void 0,ignoreClass:"bf-ignore-input",ignoreCSSAttributes:void 0,maskTextClass:"bf-mask",maskTextSelector:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,maskTextFn:void 0},recordConsolePlugin:{level:["error"],lengthThreshold:Number.POSITIVE_INFINITY,stringifyOptions:{stringLengthLimit:Number.POSITIVE_INFINITY,numOfKeysLimit:Number.POSITIVE_INFINITY,depthOfLimit:Number.POSITIVE_INFINITY}},samplingOptions:{scroll:150,media:1e3,canvas:8,input:"last"}};class _b{constructor(e){var t;__publicField(this,"options"),__publicField(this,"stop"),this.options={...Nb.recordOptions,emit:e,plugins:[(t=Nb.recordConsolePlugin,{name:"rrweb/console@1",observer:Mb,options:t})],sampling:Nb.samplingOptions},this.stop=null}static mockImplementation(e){throw new Error("Method not implemented.")}start(){this.stop=Yh(this.options)??null}getMirror(){return Yh.mirror}takeFullSnapshot(){return Yh.takeFullSnapshot()}}class Tb{constructor(e){__publicField(this,"recordingManager"),__publicField(this,"isRunning"),__publicField(this,"events"),this.recordingManager=e,this.isRunning=!1,this.events=[]}start(){this.isRunning=!0}handle(e){this.isInitializingEvent(e)?this.events.push(e):this.stop(e)}isInitializingEvent(e){return[2,4].includes(e.type)||this.isSelectionEvent(e)||this.isConsoleEvent(e)}isSelectionEvent(e){return 3===e.type&&14===e.data.source}isConsoleEvent(e){return 6===e.type}stop(e){this.stamp(this.events,e.timestamp-1),this.publish(...this.events,e),this.events=[],this.isRunning=!1}stamp(e,t){e.forEach(e=>e.timestamp=t)}publish(...e){e.forEach(e=>{this.recordingManager.publishEvent(e)})}}function Pb(e,t){void 0===t&&(t={});for(var s=function(e){for(var t=[],s=0;s<e.length;){var r=e[s];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:s,value:e[s++]});else{var n=1,i="";if("?"===e[a=s+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0===--n){a++;break}}else if("("===e[a]&&(n++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(n)throw new TypeError("Unbalanced pattern at ".concat(s));if(!i)throw new TypeError("Missing pattern at ".concat(s));t.push({type:"PATTERN",index:s,value:i}),s=a}else{for(var o="",a=s+1;a<e.length;){var l=e.charCodeAt(a);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[a++]}if(!o)throw new TypeError("Missing parameter name at ".concat(s));t.push({type:"NAME",index:s,value:o}),s=a}else t.push({type:"CLOSE",index:s,value:e[s++]});else t.push({type:"OPEN",index:s,value:e[s++]});else t.push({type:"ESCAPED_CHAR",index:s++,value:e[s++]});else t.push({type:"MODIFIER",index:s,value:e[s++]})}return t.push({type:"END",index:s,value:""}),t}(e),r=t.prefixes,n=void 0===r?"./":r,i=t.delimiter,o=void 0===i?"/#?":i,a=[],l=0,c=0,h="",u=function(e){if(c<s.length&&s[c].type===e)return s[c++].value},p=function(e){var t=u(e);if(void 0!==t)return t;var r=s[c],n=r.type,i=r.index;throw new TypeError("Unexpected ".concat(n," at ").concat(i,", expected ").concat(e))},d=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t},f=function(e){var t=a[a.length-1],s=e||(t&&"string"==typeof t?t:"");if(t&&!s)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!s||function(e){for(var t=0,s=o;t<s.length;t++){var r=s[t];if(e.indexOf(r)>-1)return!0}return!1}(s)?"[^".concat(Fb(o),"]+?"):"(?:(?!".concat(Fb(s),")[^").concat(Fb(o),"])+?")};c<s.length;){var m=u("CHAR"),g=u("NAME"),y=u("PATTERN");if(g||y){var w=m||"";-1===n.indexOf(w)&&(h+=w,w=""),h&&(a.push(h),h=""),a.push({name:g||l++,prefix:w,suffix:"",pattern:y||f(w),modifier:u("MODIFIER")||""})}else{var b=m||u("ESCAPED_CHAR");if(b)h+=b;else if(h&&(a.push(h),h=""),u("OPEN")){w=d();var v=u("NAME")||"",C=u("PATTERN")||"",S=d();p("CLOSE"),a.push({name:v||(C?l++:""),pattern:v&&!C?f(w):C,prefix:w,suffix:S,modifier:u("MODIFIER")||""})}else p("END")}}return a}function Lb(e,t){var s=[];return function(e,t,s){void 0===s&&(s={});var r=s.decode,n=void 0===r?function(e){return e}:r;return function(s){var r=e.exec(s);if(!r)return!1;for(var i=r[0],o=r.index,a=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var s=t[e-1];"*"===s.modifier||"+"===s.modifier?a[s.name]=r[e].split(s.prefix+s.suffix).map(function(e){return n(e,s)}):a[s.name]=n(r[e],s)},c=1;c<r.length;c++)l(c);return{path:i,index:o,params:a}}}(Ub(e,s,t),s,t)}function Fb(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Db(e){return e&&e.sensitive?"":"i"}function Bb(e,t,s){return function(e,t,s){void 0===s&&(s={});for(var r=s.strict,n=void 0!==r&&r,i=s.start,o=void 0===i||i,a=s.end,l=void 0===a||a,c=s.encode,h=void 0===c?function(e){return e}:c,u=s.delimiter,p=void 0===u?"/#?":u,d=s.endsWith,f="[".concat(Fb(void 0===d?"":d),"]|$"),m="[".concat(Fb(p),"]"),g=o?"^":"",y=0,w=e;y<w.length;y++){var b=w[y];if("string"==typeof b)g+=Fb(h(b));else{var v=Fb(h(b.prefix)),C=Fb(h(b.suffix));if(b.pattern)if(t&&t.push(b),v||C)if("+"===b.modifier||"*"===b.modifier){var S="*"===b.modifier?"?":"";g+="(?:".concat(v,"((?:").concat(b.pattern,")(?:").concat(C).concat(v,"(?:").concat(b.pattern,"))*)").concat(C,")").concat(S)}else g+="(?:".concat(v,"(").concat(b.pattern,")").concat(C,")").concat(b.modifier);else{if("+"===b.modifier||"*"===b.modifier)throw new TypeError('Can not repeat "'.concat(b.name,'" without a prefix and suffix'));g+="(".concat(b.pattern,")").concat(b.modifier)}else g+="(?:".concat(v).concat(C,")").concat(b.modifier)}}if(l)n||(g+="".concat(m,"?")),g+=s.endsWith?"(?=".concat(f,")"):"$";else{var k=e[e.length-1],I="string"==typeof k?m.indexOf(k[k.length-1])>-1:void 0===k;n||(g+="(?:".concat(m,"(?=").concat(f,"))?")),I||(g+="(?=".concat(m,"|").concat(f,")"))}return new RegExp(g,Db(s))}(Pb(e,s),t,s)}function Ub(e,t,s){return e instanceof RegExp?function(e,t){if(!t)return e;for(var s=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,n=s.exec(e.source);n;)t.push({name:n[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),n=s.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,s){var r=e.map(function(e){return Ub(e,t,s).source});return new RegExp("(?:".concat(r.join("|"),")"),Db(s))}(e,t,s):Bb(e,t,s)}function jb(e,t){if(function(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e}()&&!t)return!1;const s=window.location.pathname;for(const n of e)try{if(Lb(n,{decode:decodeURIComponent})(s))return!1}catch(r){if(n===s)return!1}return!0}const zb=[eu.MouseMove,eu.MouseInteraction,eu.Scroll,eu.ViewportResize,eu.Input,eu.TouchMove,eu.MediaInteraction,eu.Drag];class Vb{constructor(e){__publicField(this,"agent"),__publicField(this,"recorder"),__publicField(this,"stasher"),this.agent=e,this.recorder=new _b(this.handleEvent.bind(this)),this.stasher=new Tb(this)}start(){this.recorder.start()}handleEvent(e){const t=new URL(window.location.href),s=t.origin+t.pathname;if(jb(this.agent.recordingBlocklist,this.agent._allowLocalhostRecording)){if(this.agent.sessionManager.isIdle){if(!this.isInteractiveEvent(e))return;this.agent.handleActivityDuringIdle()}if(this.isClick(e)){let t=Yh.mirror.getNode(e.data.id);t&&this.nodeIsInteresting(t)&&(e.conversionData={},e.conversionData.eventType="click",e.conversionData.textContent=t.textContent,e.conversionData.htmlElement=t.nodeName?.toLowerCase(),e.conversionData.location=s)}this.isCustom(e)&&(e.conversionData={},e.conversionData.eventType="custom",e.conversionData.customEventType=e.data.tag,e.conversionData.location=s),this.stasher.isRunning?this.stasher.handle(e):this.publishEvent(e)}}publishEvent(e){this.agent.sender.handle(e),this.agent.timer&&this.agent.timer.restart()}startRecorderWithStasher(){this.stasher.start(),this.recorder=new _b(this.handleEvent.bind(this)),this.recorder.start()}isClick(e){return e.type===Qh.IncrementalSnapshot&&e.data.source===eu.MouseInteraction&&e.data.type===tu.Click}nodeIsInteresting(e){return"BUTTON"===e.nodeName||"ANCHOR"===e.nodeName}isCustom(e){return e.type===Qh.Custom}isInteractiveEvent(e){return e.type===Qh.IncrementalSnapshot&&zb.includes(e.data?.source)}}class Wb{constructor(e,t){__publicField(this,"agent"),__publicField(this,"MAX_IDLE_TIME"),__publicField(this,"timeoutId"),this.agent=e,this.MAX_IDLE_TIME=t,this.timeoutId=0}restart(){this.stop(),this.start()}stop(){clearTimeout(this.timeoutId)}start(){this.timeoutId=window.setTimeout(this.agent.handleTimeout.bind(this.agent),this.MAX_IDLE_TIME)}}const Yb=class e{constructor(){__publicField(this,"sessionId",null),__publicField(this,"lastScreenViewEventTime",0),__publicField(this,"isIdle",!1)}static getInstance(){return e.instance||(e.instance=new e),e.instance}determineSessionState(e){return!this.sessionId&&e?"new":this.sessionId&&e&&this.sessionId!==e?"changed":this.sessionId===e&&null!==this.sessionId?"active":"expired"}handleSessionTransition(e,t){switch(e){case"new":case"changed":this.updateIdleStatus(!1),t.takeFullSnapshot?.()}}updateSession(e,t={}){const s=this.determineSessionState(e);this.handleSessionTransition(s,t),this.sessionId=e}updateLastScreenViewEventTime(){this.lastScreenViewEventTime=Date.now()}updateIdleStatus(e){this.isIdle=e}getLastScreenViewEventTime(){return this.lastScreenViewEventTime}getCurrentSessionId(){return this.sessionId}};__publicField(Yb,"instance");let Gb=Yb;const Zb=class e{constructor(){__publicField(this,"recordingManager"),__publicField(this,"sender"),__publicField(this,"MAX_IDLE_TIME"),__publicField(this,"timer"),__publicField(this,"sendEvents"),__publicField(this,"sendScreenViewEvent"),__publicField(this,"recordingBlocklist",[]),__publicField(this,"_allowLocalhostRecording"),__publicField(this,"sessionCreationPromise",null),this.recordingManager=new Vb(this),this.sender=new $h(this)}get sessionManager(){return e._sessionManager}async start({sendEvents:e,sendScreenViewEvent:t,recordingBlocklist:s,_allowLocalhostRecording:r}){this.sendEvents=e,this.sendScreenViewEvent=t,this.recordingBlocklist=s,this._allowLocalhostRecording=r,this.MAX_IDLE_TIME=6e4,this.timer=new Wb(this,this.MAX_IDLE_TIME),this.sender.start(),this.recordingManager.start()}handleTimeout(){this.recordingManager.recorder.stop&&this.recordingManager.recorder.stop(),this.sender.send(),this.recordingManager.startRecorderWithStasher(),e._sessionManager.updateIdleStatus(!0)}handleActivityDuringIdle(){null===e._sessionManager.getCurrentSessionId()&&(e._sessionManager.getLastScreenViewEventTime()>Date.now()-5e3||this.sessionCreationPromise||(this.sessionCreationPromise=this.createSession().finally(()=>{this.sessionCreationPromise=null})))}takeFullSnapshot(){return this.recordingManager.recorder.takeFullSnapshot()}static handleCustomEvent(e){Yh.addCustomEvent(e,null)}async createSession(){if(this.sendScreenViewEvent)try{this.sendScreenViewEvent({__path:window.location.href,__title:document.title,__is_session_refresh:!0})}catch(e){console.error("Failed to send screen_view event:",e)}}};__publicField(Zb,"_sessionManager",Gb.getInstance());let Jb=Zb;function Xb(e){return e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace("-","").replace("_",""))}class Hb extends _e{constructor(e){if(super({sdk:"web",sdkVersion:"0.0.28",...e}),__publicField(this,"lastPath",""),__publicField(this,"debounceTimer",null),__publicField(this,"agent"),__publicField(this,"sessionManager",Gb.getInstance()),__publicField(this,"recordingBlocklist",[]),__publicField(this,"isRecordingActive",!1),this.options=e,this.agent=new Jb,this.recordingBlocklist=e.recordingBlocklist||[],!this.isServer()){this.setGlobalProperties({__referrer:document.referrer});const e=this.isTrackingDisabled();this.options.trackOutgoingLinks&&!e&&this.trackOutgoingLinks(),this.options.trackScreenViews&&this.trackScreenViews(),this.options.trackAttributes&&!e&&this.trackAttributes(),this.options.enableRecording&&!e&&(this.startRecording(),this.isRecordingActive=!0,console.log("Brainfish has started ambient learning"))}}debounce(e,t){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(e,t)}isServer(){return"undefined"==typeof document}trackOutgoingLinks(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("a");if(s&&t){const e=s.getAttribute("href");e?.startsWith("http")&&super.track("link_out",{href:e,text:s.innerText||s.getAttribute("title")||t.getAttribute("alt")||t.getAttribute("title")})}})}trackScreenViews(){if(this.isServer())return;this.screenView();const e=history.pushState;history.pushState=function(...t){const s=e.apply(this,t);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s};const t=history.replaceState;history.replaceState=function(...e){const s=t.apply(this,e);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s},window.addEventListener("popstate",function(){window.dispatchEvent(new Event("locationchange"))});const s=()=>this.debounce(()=>this.screenView(),100);this.options.trackHashChanges?window.addEventListener("hashchange",s):window.addEventListener("locationchange",s)}trackAttributes(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("button"),r=t.closest("a"),n=s?.getAttribute("data-track")?s:r?.getAttribute("data-track")?r:null;if(n){const e={};for(const s of n.attributes)s.name.startsWith("data-")&&"data-track"!==s.name&&(e[Xb(s.name.replace(/^data-/,""))]=s.value);const t=n.getAttribute("data-track");t&&super.track(t,e)}})}startRecording(){this.isServer()||this.agent.start({sendEvents:this.recordEventsToServer.bind(this),sendScreenViewEvent:this.sendScreenViewEvent.bind(this),recordingBlocklist:this.recordingBlocklist,_allowLocalhostRecording:this.options._allowLocalhostRecording})}async screenView(e,t){if(this.isServer())return;let s,r;if("string"==typeof e?(s=e,r=t):(s=window.location.href,r=e),this.lastPath===s)return;this.lastPath=s;const n={...r??{},__path:s,__title:document.title};this.sendScreenViewEvent(n)}async recordEventsToServer(e){const t=await this.record(e);this.sessionManager.updateSession(t,{takeFullSnapshot:()=>{this.agent.takeFullSnapshot()}})}sendScreenViewEvent(e){super.track("screen_view",e),this.sessionManager.updateLastScreenViewEventTime()}disableTracking(){super.disableTracking(),this.isRecordingActive&&(this.agent.recordingManager.recorder.stop&&this.agent.recordingManager.recorder.stop(),this.isRecordingActive=!1,console.log("Brainfish has stopped ambient learning"))}enableTracking(){super.enableTracking()}}(e=>{if(e.BrainfishAnalytics&&"q"in e.BrainfishAnalytics){const t=e.BrainfishAnalytics.q||[],s=t.findIndex(e=>"init"===e[0]);if(-1===s)return void console.warn("BrainfishAnalytics has not been initialized.");const[r]=t.splice(s,1),n=new Hb(r[1]);t.forEach(e=>{e[0]in n&&n[e[0]](...e.slice(1))}),e.BrainfishAnalytics=(e,...t)=>{const s=n[e]?n[e].bind(n):void 0;if("function"==typeof s)return s(...t);console.warn(`Method ${e} does not exist on BrainfishAnalytics`)}}})(window)}();
2
2
  //# sourceMappingURL=tracker.js.map