@zaplier/sdk 1.9.1 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Zaplier SDK v3.0.0 - Unified SDK
3
+ * Advanced privacy-first tracking with code splitting
4
+ * (c) 2026 Zaplier Team
5
+ */
6
+ const t=new Set(["token","replay","heatmap","debug","allow_localhost","gdprMode","replaySampleRate"]);function i(t){return function(t){const i=new Date||new Date;return`${t}_${i.getFullYear()}${(i.getMonth()+1).toString().padStart(2,"0")}${i.getDate().toString().padStart(2,"0")}_${i.getHours().toString().padStart(2,"0")}`}(t)}const e={apiEndpoint:"https://api.zaplier.com",retryEnabled:!0,maxRetries:3,retryDelays:[1e3,2e3,4e3],autoTrack:!0,dedupeEnabled:!0,fingerprintEnabled:!0,presenceTracking:!1,heartbeatInterval:3e4,scrollTracking:!0,scrollDepthTracking:!0,gdprCompliant:!0,enhancedTracking:"ask",replaySampling:.1,replayMaskInputs:!0};class n{constructor(i){var n;if(this.version="1.9.1",this.isInitialized=!1,this.eventQueue=[],this.t=!1,!i.token)throw console.error('[Zaplier] Missing required "token" option. Get your token at https://app.zaplier.com/dashboard/keys'),new Error("Zaplier: token is required");if("string"!=typeof i.token||i.token.trim().length<5)throw console.error('[Zaplier] Invalid token format. Token should be a workspace API key (e.g., "ws_abc123...")'),new Error("Zaplier: invalid token format");for(const e of Object.keys(i))t.has(e)||console.warn(`[Zaplier] Unknown config option "${e}". Valid options: ${[...t].join(", ")}`);const s=["replay","heatmap","debug","allow_localhost","gdprMode"];for(const t of s){const e=i[t];void 0!==e&&"boolean"!=typeof e&&console.warn(`[Zaplier] "${t}" should be true or false, got: ${typeof e}`)}let o=i;if(void 0!==i.replaySampleRate){const t=i.replaySampleRate;("number"!=typeof t||t<0||t>1)&&(console.warn(`[Zaplier] "replaySampleRate" must be a number between 0 and 1, got: ${t}. Defaulting to 1.0.`),o={...i,replaySampleRate:1})}this.config={...e,...o,gdprMode:null!==(n=o.gdprMode)&&void 0!==n&&n},this.t=this.isDevEnvironment(),this.heatmap=this.createHeatmapProxy(),this.replay=this.createReplayProxy(),this.autoTrack=this.createAutoTrackProxy(),this.initializeCore()}initializeCore(){try{if(this.config.debug&&this.version,!this.config.allow_localhost&&this.isLocalhost())return void this.config.debug;this.sessionId=this.generateTempSessionId(),this.visitorId=this.generateTempVisitorId(),this.isInitialized=!0,this.processEventQueue(),this.config.debug,"undefined"!=typeof window&&this.scheduleModuleLoading()}catch(t){console.error("[Zaplier] Initialization failed:",t)}}scheduleModuleLoading(){const t=(t,i)=>{"undefined"!=typeof requestIdleCallback?requestIdleCallback(t,{timeout:i}):setTimeout(t,Math.min(i/10,200))};t(async()=>{try{await this.loadFingerprint(),this.config.debug}catch(t){this.config.debug&&console.error("[Zaplier] Deferred fingerprinting failed:",t)}},3e3),t(()=>{this.loadAntiAdblock(),this.config.debug},1e3),this.config.autoTrack&&t(()=>{this.loadAutoTracker(),this.config.debug},1500),this.config.replay&&t(async()=>{await this.loadReplayEngine(),this.config.debug},2e3),this.config.heatmap&&t(()=>{this.loadHeatmapEngine(),this.config.debug},2500)}async loadFingerprint(){if(!this.fingerprint)try{const{getCompleteFingerprint:t,getLightweightFingerprint:i}=await import("./fingerprint-C1MH_xUr.min.js").then(function(t){return t.f}),e=this.config.gdprMode?await i():await t();if(e.success&&e.data){this.fingerprint=e.data,e.data.incognitoDetection&&(this.fingerprint.incognitoDetection={...e.data.incognitoDetection,detectionTimestamp:Date.now(),sdkVersion:this.version});try{const{VisitorIdentityManager:t}=await import("./visitor-persistence-Wdujedxu.min.js");this.visitorIdentityManager=new t;const i=await this.visitorIdentityManager.getOrCreateVisitorIdentity({fingerprintHash:e.data.hash,stableCoreHash:e.data.stableCoreHash,deviceFingerprint:e.data.stableCoreHash||e.data.hash,sessionId:this.sessionId,userAgent:navigator.userAgent,ipAddress:void 0});i.visitorId&&!i.pendingBackendResponse&&(this.visitorId=i.visitorId,this.backendVisitorId=i.visitorId),this.config.debug&&(this.visitorId,i.persistenceMethod,i.confidence,i.reused)}catch(t){this.config.debug&&console.error("[Zaplier] Visitor persistence loading failed:",t)}this.config.debug&&(e.collectedComponents,e.data.hash,e.data.stableCoreHash,this.config.gdprMode)}}catch(t){this.config.debug&&console.error("[Zaplier] Fingerprinting failed:",t),this.collectFallbackEntropy()}}collectFallbackEntropy(){try{const t=[navigator.userAgent||"",navigator.language||"",navigator.platform||"",screen.width||0,screen.height||0,screen.colorDepth||0,new Date(2024,0,1).getTimezoneOffset(),navigator.hardwareConcurrency||0,navigator.deviceMemory||0,navigator.maxTouchPoints||0,performance.timeOrigin||0,navigator.plugins?navigator.plugins.length:0].join("|");let i=0;for(let e=0;e<t.length;e++)i=(i<<5)-i+t.charCodeAt(e)&4294967295,i^=i>>>16;this.fingerprint||(this.fingerprint={}),this.fingerprint.fallbackEntropy=Math.abs(i).toString(36)}catch{}}async loadAntiAdblock(){if(!this.antiAdblockManager)try{const{AntiAdblockManager:t}=await import("./anti-adblock-B_7p9rSc.min.js");this.antiAdblockManager=new t(this.config.apiEndpoint,this.config.token,{enabled:!0,methods:["elysia-websocket","fetch"],fallbackDelay:100,maxRetries:2,debug:this.config.debug})}catch(t){this.config.debug&&console.error("[Zaplier] Anti-adblock loading failed:",t)}}async loadAutoTracker(){if(!this.i)try{const{AutoTracker:t}=await import("./auto-tracker-5ij0Y4C-.min.js");this.i=new t(this,{enabled:!0,trackClicks:!0,trackScrolls:!0,trackViews:!0,trackHovers:!0,trackForms:!0,debug:this.config.debug}),this.i.start()}catch(t){this.config.debug&&console.error("[Zaplier] Auto tracker loading failed:",t)}}shouldRecord(){var t,i;const e="__zp_rs";try{if("undefined"!=typeof window&&window.sessionStorage){const i=sessionStorage.getItem(e);if(null!==i)return"1"===i;const n=null!==(t=this.config.replaySampleRate)&&void 0!==t?t:1,s=Math.random()<n;return sessionStorage.setItem(e,s?"1":"0"),s}}catch{}const n=null!==(i=this.config.replaySampleRate)&&void 0!==i?i:1;return Math.random()<n}async fetchFeatureFlags(){try{const t=await this.makeRequest(`/sdk/features?token=${encodeURIComponent(this.config.token)}`,null,"GET");return{hasSessionReplay:!0===(null==t?void 0:t.hasSessionReplay),hasHeatmap:!0===(null==t?void 0:t.hasHeatmap)}}catch{return this.config.debug&&console.warn("[Zaplier] Feature flag fetch failed, assuming features enabled"),{hasSessionReplay:!0,hasHeatmap:!0}}}async loadReplayEngine(){if(!this.o)try{if(!(await this.fetchFeatureFlags()).hasSessionReplay)return;if(!this.shouldRecord())return void this.config.debug;this.sessionId||(this.sessionId=this.generateSessionId());const{SessionReplayEngine:t}=await import("./session-replay-NyWElyXm.min.js");this.o=new t(this.sessionId,this.backendVisitorId||"unknown",{sampleRate:1,inactivityTimeout:3e4,pauseOnInactive:!0}),this.o.setSDKInstance(this),this.o.start()}catch(t){this.config.debug&&console.error("[Zaplier] Replay loading failed:",t)}}async loadHeatmapEngine(){if(!this.h)try{if(!(await this.fetchFeatureFlags()).hasHeatmap)return void this.config.debug;this.sessionId||(this.sessionId=this.generateSessionId());const{HeatmapEngine:t}=await import("./heatmap-FZpkJ8Pr.min.js");this.h=new t(this.sessionId,{trackClicks:!0,trackScrollDepth:!0,trackRageClicks:!0,trackMouseMoves:!1,apiEndpoint:this.config.apiEndpoint,token:this.config.token}),this.antiAdblockManager&&this.h.setAntiAdblockManager(this.antiAdblockManager),this.h.start()}catch(t){this.config.debug&&console.error("[Zaplier] Heatmap loading failed:",t)}}createHeatmapProxy(){const t=this;return{enable(){t.config.heatmap=!0,!t.h&&t.isInitialized&&t.loadHeatmapEngine(),t.config.debug},disable(){t.config.heatmap=!1,t.h&&(t.h.stop(),t.h=void 0),t.config.debug},enableMouseTracking(){t.h?t.h.enableMouseTracking():t.loadHeatmapEngine().then(()=>{var i;null===(i=t.h)||void 0===i||i.enableMouseTracking()})},disableMouseTracking(){t.h&&t.h.disableMouseTracking()},getStats:()=>t.h?t.h.getStats():null,isRecording:()=>!!t.h&&t.h.isRecording()}}createReplayProxy(){const t=this;return{enable(){t.config.replay=!0,(!t.o&&t.isInitialized||t.o&&!t.o.isRecording())&&t.loadReplayEngineForced(),t.config.debug},disable(){t.config.replay=!1,t.o&&(t.o.stop(),t.o=void 0),t.config.debug},start:async()=>(!t.o&&t.isInitialized&&await t.loadReplayEngineForced(),!!t.o&&t.o.start()),stop(){t.o&&t.o.stop()},isRecording:()=>!!t.o&&t.o.isRecording(),getEventCount:()=>t.o?t.o.getEventCount():0,addFunnelStep(i){t.sendEvent({eventType:"funnel_step",eventName:"funnel_step",customData:i})},markConversion(i){t.trackConversion("funnel_conversion",i.value,i.currency,i)}}}createAutoTrackProxy(){const t=this;return{enable(){t.i?t.i.configure({enabled:!0}):t.loadAutoTracker(),t.config.debug},disable(){t.i&&(t.i.stop(),t.i=void 0),t.config.debug},configure(i){t.i&&t.i.configure(i),t.config.debug},refreshTracking(){t.i&&t.i.refreshTracking(),t.config.debug},getDiagnostics:()=>t.i?t.i.getDiagnostics():null,getStats:()=>t.i?t.i.getStats():null,isEnabled:()=>!!t.i}}async loadReplayEngineForced(){try{this.o&&(this.o.stop(),this.o=void 0),this.sessionId||(this.sessionId=this.generateSessionId());const{SessionReplayEngine:t}=await import("./session-replay-NyWElyXm.min.js");this.o=new t(this.sessionId,this.backendVisitorId||"unknown",{sampleRate:1,inactivityTimeout:3e4,pauseOnInactive:!0}),this.o.setSDKInstance(this),this.o.start()}catch(t){this.config.debug&&console.error("[Zaplier] Replay engine loading failed:",t)}}extractUTMParameters(){const t={};if("undefined"==typeof window||!window.location)return t;try{const i=new URLSearchParams(window.location.search),e=i.get("utm_source"),n=i.get("utm_medium"),s=i.get("utm_campaign"),o=i.get("utm_content"),a=i.get("utm_term"),r=i.get("fbclid"),h=i.get("gclid"),l=i.get("ttclid"),c=i.get("creative_id"),d=i.get("ad_id"),u=i.get("adset_id"),p=i.get("campaign_id"),v=i.get("platform");e&&(t.utmSource=e),n&&(t.utmMedium=n),s&&(t.utmCampaign=s),o&&(t.utmContent=o),a&&(t.utmTerm=a),r&&(t.fbclid=r),h&&(t.gclid=h),l&&(t.ttclid=l),c&&(t.creativeId=c),d&&(t.adId=d),u&&(t.adsetId=u),p&&(t.campaignId=p),v&&(t.platform=v),this.config.debug&&Object.keys(t).length}catch(t){this.config.debug&&console.warn("[Zaplier] Failed to extract UTM parameters:",t)}return t}async sendEvent(t){var e,n,s,o,a,r,h,l,c,d,u,p,v,f,g,w,m,y,k;if(!this.isInitialized)return this.eventQueue.length>=100&&this.eventQueue.shift(),void this.eventQueue.push(t);try{const k={visitorId:this.backendVisitorId||null,sessionId:this.sessionId,fingerprintHash:null===(e=this.fingerprint)||void 0===e?void 0:e.hash,stableCoreHash:null===(n=this.fingerprint)||void 0===n?void 0:n.stableCoreHash,stableCoreVector:null===(s=this.fingerprint)||void 0===s?void 0:s.stableCoreVector,fingerprintVector:this.fingerprint||void 0,incognitoDetection:(null===(o=this.fingerprint)||void 0===o?void 0:o.incognitoDetection)&&(void 0!==this.fingerprint.incognitoDetection.likelihood||this.fingerprint.incognitoDetection.methods&&this.fingerprint.incognitoDetection.methods.length>0)?this.fingerprint.incognitoDetection:void 0,fingerprintComponents:(null===(a=this.fingerprint)||void 0===a?void 0:a.components)||{},isSafari:"undefined"!=typeof navigator&&/safari/i.test(navigator.userAgent)&&!/chrome|chromium|opr|edg|edge/i.test(navigator.userAgent),ch:navigator.userAgentData?{brands:navigator.userAgentData.brands||[],platform:navigator.userAgentData.platform||void 0,mobile:navigator.userAgentData.mobile||void 0,model:navigator.userAgentData.model||void 0}:void 0,...this.extractUTMParameters(),...t,timestamp:(new Date).toISOString(),url:"undefined"!=typeof window&&window.location?window.location.href:"",referrer:"undefined"!=typeof document?document.referrer:"",pageTitle:"undefined"!=typeof document?document.title:"",userAgent:"undefined"!=typeof navigator?navigator.userAgent:"",screenWidth:(null===(l=null===(h=null===(r=this.fingerprint)||void 0===r?void 0:r.screen)||void 0===h?void 0:h.value)||void 0===l?void 0:l.width)||("undefined"!=typeof window&&window.screen?window.screen.width:0),screenHeight:(null===(u=null===(d=null===(c=this.fingerprint)||void 0===c?void 0:c.screen)||void 0===d?void 0:d.value)||void 0===u?void 0:u.height)||("undefined"!=typeof window&&window.screen?window.screen.height:0),viewportWidth:(null===(f=null===(v=null===(p=this.fingerprint)||void 0===p?void 0:p.screen)||void 0===v?void 0:v.value)||void 0===f?void 0:f.viewportWidth)||("undefined"!=typeof window?window.innerWidth:0),viewportHeight:(null===(m=null===(w=null===(g=this.fingerprint)||void 0===g?void 0:g.screen)||void 0===w?void 0:w.value)||void 0===m?void 0:m.viewportHeight)||("undefined"!=typeof window?window.innerHeight:0),gdprMode:this.config.gdprMode,isDev:this.t},b=await this.makeRequest(`/tracking/event?token=${encodeURIComponent(this.config.token)}`,k);if(b.visitorId){if(this.backendVisitorId=b.visitorId,this.visitorIdentityManager&&(null===(y=this.fingerprint)||void 0===y?void 0:y.stableCoreHash))try{await this.visitorIdentityManager.updateVisitorIdFromBackend(b.visitorId,this.fingerprint.stableCoreHash,this.sessionId)}catch(t){this.config.debug&&console.error("[Zaplier] Failed to save backend visitor ID to storage:",t)}this.config.debug&&b.visitorId}if(!b.sessionId||this.sessionId&&!this.sessionId.includes("temp_")){if(this.backendVisitorId&&(!this.sessionId||this.sessionId.includes("temp_"))){const t=this.sessionId;this.sessionId=i(this.backendVisitorId),t!==this.sessionId&&this.sessionId&&this.updateTrackingEnginesSessionId(this.sessionId)}}else{const t=this.sessionId;this.sessionId=b.sessionId,t!==this.sessionId&&this.sessionId&&this.updateTrackingEnginesSessionId(this.sessionId)}return b}catch(i){if(this.config.debug&&console.error("[Zaplier] Event sending failed:",i),this.config.retryEnabled){const i=t.l||0;if(i<this.config.maxRetries){const e=null!==(k=this.config.retryDelays[i])&&void 0!==k?k:5e3;setTimeout(()=>{this.sendEvent({...t,l:i+1})},e)}else this.config.debug&&console.warn("[Zaplier] Event dropped after max retries:",t.eventType)}}}async sendReplayBatch(t){var i;if(!this.isInitialized)return{success:!1,error:"SDK not initialized"};try{const e={sessionId:t.sessionId,userId:this.backendVisitorId,events:t.events,metadata:{...t.metadata,visitorId:this.backendVisitorId,fingerprintHash:null===(i=this.fingerprint)||void 0===i?void 0:i.hash}};this.config.debug&&(e.sessionId,e.events.length);const n=await this.makeRequest(`/replays/record?token=${encodeURIComponent(this.config.token)}`,e,"POST");if(n.sessionId&&n.sessionId!==this.sessionId){const t=this.sessionId;this.sessionId=n.sessionId,t!==this.sessionId&&this.sessionId&&this.updateTrackingEnginesSessionId(this.sessionId)}return n}catch(t){return this.config.debug&&console.error("[Zaplier] Replay batch sending failed:",t),{success:!1,error:t instanceof Error?t.message:"Unknown error"}}}async makeRequest(t,i,e="POST"){const n=`${this.config.apiEndpoint}${t}`,s={method:e,headers:{"Content-Type":"application/json"}};"POST"===e&&i&&(s.body=JSON.stringify(i),s.keepalive=!0);try{const t=Promise.race([fetch(n,s),new Promise((t,i)=>setTimeout(()=>i(new Error("Fetch timeout - possibly blocked")),5e3))]),i=await t;if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);return await i.json()}catch(n){if(this.antiAdblockManager&&"POST"===e){this.config.debug&&console.warn(`[Zaplier] Standard fetch failed (${n instanceof Error?n.message:String(n)}), trying anti-adblock fallback`);try{const e=await this.antiAdblockManager.send(i,t);if(e.success)return this.config.debug&&(e.method,e.latency),{success:!0,method:e.method}}catch(t){this.config.debug&&console.warn("[Zaplier] Both standard fetch and anti-adblock failed:",t)}}throw n}}updateTrackingEnginesSessionId(t){try{if(this.o){const i=this.o.isRecording();this.o.stop(),import("./session-replay-NyWElyXm.min.js").then(({SessionReplayEngine:e})=>{this.o=new e(t,this.backendVisitorId||"unknown",{sampleRate:1,inactivityTimeout:3e4,pauseOnInactive:!0}),this.o.setSDKInstance(this),i&&this.o.start()})}if(this.h){const i=this.h.isRecording();this.h.stop(),import("./heatmap-FZpkJ8Pr.min.js").then(({HeatmapEngine:e})=>{this.h=new e(t,{trackClicks:!0,trackScrollDepth:!0,trackRageClicks:!0,trackMouseMoves:!1,apiEndpoint:this.config.apiEndpoint,token:this.config.token}),this.antiAdblockManager&&this.h.setAntiAdblockManager(this.antiAdblockManager),i&&this.h.start()})}this.config.debug}catch(t){console.error("[Zaplier] Failed to update tracking engines session ID:",t)}}processEventQueue(){if(0===this.eventQueue.length)return;const t=[...this.eventQueue];this.eventQueue=[],t.forEach(t=>this.sendEvent(t))}isLocalhost(){return!("undefined"==typeof window||!window.location)&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname||window.location.hostname.startsWith("192.168.")||window.location.hostname.startsWith("10.")||window.location.hostname.includes("local"))}isDevEnvironment(){if("undefined"==typeof window)return!1;const t=window.location.hostname;return"localhost"===t||"127.0.0.1"===t||"[::1]"===t||t.endsWith(".local")||t.endsWith(".test")||!0===this.config.debug}generateTempSessionId(){const t=new Date,i=t.getFullYear()+(t.getMonth()+1).toString().padStart(2,"0")+t.getDate().toString().padStart(2,"0"),e=t.getHours().toString().padStart(2,"0");return`temp_${Date.now()}_${i}_${e}`}generateTempVisitorId(){return`temp_visitor_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}generateSessionId(){return this.backendVisitorId?i(this.backendVisitorId):i(this.visitorId||"temp-"+Date.now().toString(36))}track(t,i){this.sendEvent({eventType:t,eventName:t,customData:i})}trackCustomEvent(t,i){return this.sendEvent({eventType:"custom",eventName:t,customData:i}),!0}trackConversion(t,i,e,n){return this.sendEvent({eventType:"conversion",eventName:t,revenue:i,currency:e||"USD",customData:n}),!0}trackPageView(t){this.sendEvent({eventType:"page_view",eventName:"page_view",...t})}trackSPANavigation(t,i){this.trackPageView({url:t||("undefined"!=typeof window&&window.location?window.location.href:""),pageTitle:i||("undefined"!=typeof document?document.title:"")})}trackPurchase(t){this.sendEvent({eventType:"purchase",eventName:"purchase",revenue:t.value||t.revenue,currency:t.currency||"USD",quantity:t.quantity||1,productId:t.productId,customData:{productName:t.productName,orderId:t.orderId,...t.customData}})}trackAddToCart(t){this.sendEvent({eventType:"add_to_cart",eventName:"add_to_cart",revenue:null==t?void 0:t.price,quantity:(null==t?void 0:t.quantity)||1,productId:null==t?void 0:t.productId,customData:{productName:null==t?void 0:t.productName,...null==t?void 0:t.customData}})}trackViewContent(t){this.sendEvent({eventType:"view_content",eventName:"view_content",productId:null==t?void 0:t.productId,customData:{productName:null==t?void 0:t.productName,category:null==t?void 0:t.category,...null==t?void 0:t.customData}})}trackInitiateCheckout(t){this.sendEvent({eventType:"initiate_checkout",eventName:"initiate_checkout",revenue:null==t?void 0:t.value,currency:(null==t?void 0:t.currency)||"USD",quantity:null==t?void 0:t.numItems,customData:null==t?void 0:t.customData})}trackLead(t){this.sendEvent({eventType:"lead",eventName:"lead",customData:t})}identify(t){this.sendEvent({eventType:"identify",eventName:"identify",email:t.email,phone:t.phone,customData:t})}startPresenceTracking(){this.config.presenceTracking=!0,this.config.debug}stopPresenceTracking(){this.config.presenceTracking=!1,this.config.debug}enableAdvancedFeatures(){return this.loadFingerprint()}enableEnhancedTracking(){return this.config.enhancedTracking="true",this.config.gdprMode=!1,this.loadFingerprint(),this.config.debug,!0}disableEnhancedTracking(){this.config.enhancedTracking="false",this.config.gdprMode=!0,this.config.debug}isEnhancedMode(){return"true"===this.config.enhancedTracking&&!this.config.gdprMode}resetScrollTracking(){this.config.debug}getVisitorId(){if(this.backendVisitorId)return this.backendVisitorId;if(this.visitorId)return this.visitorId;if(this.visitorIdentityManager){const t=this.visitorIdentityManager.getCurrentVisitorId();if(t)return this.backendVisitorId=t,this.visitorId=t,t}return null}getUserData(){var t,i,e,n,s,o,a;const r="undefined"!=typeof navigator?{userAgent:navigator.userAgent,language:navigator.language,screen:{width:null!==(i=null===(t=window.screen)||void 0===t?void 0:t.width)&&void 0!==i?i:0,height:null!==(n=null===(e=window.screen)||void 0===e?void 0:e.height)&&void 0!==n?n:0}}:{userAgent:"",language:"",screen:{width:0,height:0}};return{sessionId:null!==(s=this.sessionId)&&void 0!==s?s:"",visitorId:null!==(o=this.getVisitorId())&&void 0!==o?o:void 0,location:{},device:r,journey:[],fingerprint:null===(a=this.fingerprint)||void 0===a?void 0:a.hash}}async getVisitorInfo(){const t=this.backendVisitorId;if(!t)return this.config.debug&&console.warn("[Zaplier] No backend visitor ID yet. Track an event first."),null;if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t))return null;if(this.cachedVisitorInfo)return this.cachedVisitorInfo;try{const i=await this.makeRequest(`/tracking/visitor/${t}?token=${encodeURIComponent(this.config.token)}`,null,"GET");return this.cachedVisitorInfo=i,i}catch{return null}}async getVisitorHistory(){const t=this.backendVisitorId;if(!t)return this.config.debug&&console.warn("[Zaplier] No backend visitor ID available. Track an event first."),null;if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t))return null;try{return await this.makeRequest(`/tracking/visitor/${t}/history?token=${encodeURIComponent(this.config.token)}`,null,"GET")}catch(t){return this.config.debug&&console.error("[Zaplier] Failed to get visitor history:",t),null}}getConversionLikelihood(){return{score:0,level:"unknown",factors:[]}}getUserSegment(){return{segment:"unknown",confidence:0,traits:[]}}}function s(t){return new n(t)}const o=s;if("undefined"!=typeof window){window.Zaplier={init:s,version:"1.9.1"};const t=()=>{const t=document.getElementsByTagName("script");for(const i of Array.from(t))if(i.src&&(i.src.includes("zaplier")||i.src.includes("core.min.js")||i.src.includes("sdk.min.js"))&&i.dataset.token){const t=s({token:i.dataset.token,debug:"true"===i.dataset.debug,replay:"true"===i.dataset.replay,heatmap:"true"===i.dataset.heatmap,gdprMode:"true"===i.dataset.gdprMode,allow_localhost:"true"===i.dataset.allowLocalhost});return window.Zaplier.instance=t,void t.trackPageView()}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()}export{n as Z,o as a,i as g,s as i};
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Zaplier SDK v3.0.0 - Unified SDK
3
+ * Advanced privacy-first tracking with code splitting
4
+ * (c) 2026 Zaplier Team
5
+ */
6
+ var t,e=Object.defineProperty,i=(t,i,s)=>((t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s)(t,"symbol"!=typeof i?i+"":i,s),s=Object.defineProperty,r=(t,e,i)=>((t,e,i)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),n=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(n||{});const o={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},h={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},l={};const a={};function c(t,e,i){var s;const r=`${t}.${String(i)}`;if(a[r])return a[r].call(e);const n=function(t){if(l[t])return l[t];const e=globalThis[t],i=e.prototype,s=t in o?o[t]:void 0,r=Boolean(s&&s.every(t=>{var e,s;return Boolean(null==(s=null==(e=Object.getOwnPropertyDescriptor(i,t))?void 0:e.get)?void 0:s.toString().includes("[native code]"))})),n=t in h?h[t]:void 0,a=Boolean(n&&n.every(t=>{var e;return"function"==typeof i[t]&&(null==(e=i[t])?void 0:e.toString().includes("[native code]"))}));if(r&&a&&!globalThis.Zone)return l[t]=e.prototype,e.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const r=s.contentWindow;if(!r)return e.prototype;const n=r[t].prototype;return document.body.removeChild(s),n?l[t]=n:i}catch{return i}}(t),c=null==(s=Object.getOwnPropertyDescriptor(n,i))?void 0:s.get;return c?(a[r]=c,c.call(e)):e[i]}const u=function(t){return c("Node",t,"childNodes")},f=function(t){return c("Node",t,"parentNode")},d=function(t){return c("Node",t,"parentElement")},p=function(t){return c("Node",t,"textContent")},m=function(t){return t&&"shadowRoot"in t?c("Element",t,"shadowRoot"):null};function g(t){return t.nodeType===t.ELEMENT_NODE}function w(t){const e=t&&"host"in t&&"mode"in t&&function(t){return t&&"host"in t?c("ShadowRoot",t,"host"):null}(t)||null;return Boolean(e&&"shadowRoot"in e&&m(e)===t)}function y(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function b(t){try{const i=t.rules||t.cssRules;if(!i)return null;let s=t.href;return!s&&t.ownerNode&&t.ownerNode.ownerDocument&&(s=t.ownerNode.ownerDocument.location.href),(e=Array.from(i,t=>v(t,s)).join("")).includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}catch(t){return null}var e}function v(t,e){if(function(t){return"styleSheet"in t}(t)){let e;try{e=b(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const i=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?i.push("layer"):t.layerName&&i.push(`layer(${t.layerName})`),t.supportsText&&i.push(`supports(${t.supportsText})`),t.media.length&&i.push(t.media.mediaText),i.join(" ")+";"}(t)}catch(i){e=t.cssText}return t.styleSheet.href?E(e,t.styleSheet.href):e}{let i=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(i=i.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?E(i,e):i}}class C{constructor(){r(this,"idNodeMap",new Map),r(this,"nodeMetaMap",new WeakMap)}getId(t){var e;return t?(null==(e=this.getMeta(t))?void 0:e.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const i=e.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,e)}replace(t,e){const i=this.getNode(t);if(i){const t=this.nodeMetaMap.get(i);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function I({element:t,maskInputOptions:e,tagName:i,type:s,value:r,maskInputFn:n}){let o=r||"";const h=s&&S(s);return(e[i.toLowerCase()]||h&&e[h])&&(o=n?n(o,t):"*".repeat(o.length)),o}function S(t){return t.toLowerCase()}const k="__rrweb_original__";function A(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?S(e):null}function x(t,e){let i;try{i=new URL(t,e??window.location.href)}catch(t){return null}const s=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const R=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,M=/^(?:[a-z+]+:)?\/\//i,O=/^www\..*/i,T=/^(data:)([^,]*),(.*)/i;function E(t,e){return(t||"").replace(R,(t,i,s,r,n,o)=>{const h=s||n||o,l=i||r||"";if(!h)return t;if(M.test(h)||O.test(h))return`url(${l}${h}${l})`;if(T.test(h))return`url(${l}${h}${l})`;if("/"===h[0])return`url(${l}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+h}${l})`;const a=e.split("/"),c=h.split("/");a.pop();for(const t of c)"."!==t&&(".."===t?a.pop():a.push(t));return`url(${l}${a.join("/")}${l})`})}function B(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}let F=1;const N=new RegExp("[^a-z0-9-_:]");function L(){return F++}let j,D;const U=/^[^ \t\n\r\u000c]+/,W=/^[, \t\n\r\u000c]+/,Y=new WeakMap;function Z(t,e){return e&&""!==e.trim()?P(t,e):e}function P(t,e){let i=Y.get(t);if(i||(i=t.createElement("a"),Y.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function G(t,e,i,s){return s?"src"===i||"href"===i&&("use"!==e||"#"!==s[0])||"xlink:href"===i&&"#"!==s[0]?Z(t,s):"background"!==i||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===i?function(t,e){if(""===e.trim())return e;let i=0;function s(t){let s;const r=t.exec(e.substring(i));return r?(s=r[0],i+=s.length,s):""}const r=[];for(;s(W),!(i>=e.length);){let n=s(U);if(","===n.slice(-1))n=Z(t,n.substring(0,n.length-1)),r.push(n);else{let s="";n=Z(t,n);let o=!1;for(;;){const t=e.charAt(i);if(""===t){r.push((n+s).trim());break}if(o)")"===t&&(o=!1);else{if(","===t){i+=1,r.push((n+s).trim());break}"("===t&&(o=!0)}s+=t,i+=1}}}return r.join(", ")}(t,s):"style"===i?E(s,P(t)):"object"===e&&"data"===i?Z(t,s):s:Z(t,s):s}function V(t,e,i){return("video"===t||"audio"===t)&&"autoplay"===e}function z(t,e,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!i&&z(f(t),e,i);for(let i=t.classList.length;i--;){const s=t.classList[i];if(e.test(s))return!0}return!!i&&z(f(t),e,i)}function X(t,e,i,s){let r;if(g(t)){if(r=t,!u(r).length)return!1}else{if(null===d(t))return!1;r=d(t)}try{if("string"==typeof e){if(s){if(r.closest(`.${e}`))return!0}else if(r.classList.contains(e))return!0}else if(z(r,e,s))return!0;if(i)if(s){if(r.closest(i))return!0}else if(r.matches(i))return!0}catch(t){}return!1}function J(t){return null==t?"":t.toLowerCase()}function $(t,e){const{doc:i,mirror:s,blockClass:r,blockSelector:o,maskTextClass:h,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:c=!0,maskInputOptions:v={},maskTextFn:C,maskInputFn:R,slimDOMOptions:M,dataURLOptions:O={},inlineImages:T=!1,recordCanvas:F=!1,onSerialize:U,onIframeLoad:W,iframeLoadTimeout:Y=5e3,onStylesheetLoad:Z,stylesheetLoadTimeout:z=5e3,keepIframeSrcFn:K=()=>!1,newlyAddedElement:_=!1,cssCaptured:H=!1}=e;let{needsMask:Q}=e,{preserveWhiteSpace:q=!0}=e;Q||(Q=X(t,h,l,void 0===Q));const tt=function(t,e){const{doc:i,mirror:s,blockClass:r,blockSelector:o,needsMask:h,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:m={},inlineImages:g,recordCanvas:w,keepIframeSrcFn:y,newlyAddedElement:v=!1,cssCaptured:C=!1}=e,x=function(t,e){if(!e.hasNode(t))return;const i=e.getId(t);return 1===i?void 0:i}(i,s);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:n.Document,childNodes:[],compatMode:t.compatMode}:{type:n.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:n.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:x};case t.ELEMENT_NODE:return function(t,e){const{doc:i,blockClass:s,blockSelector:r,inlineStylesheet:o,maskInputOptions:h={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:f,newlyAddedElement:d=!1,rootId:p}=e,m=function(t,e,i){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let i=t.classList.length;i--;){const s=t.classList[i];if(e.test(s))return!0}if(i)return t.matches(i)}catch(t){}return!1}(t,s,r),g=function(t){if(t instanceof HTMLFormElement)return"form";const e=S(t.tagName);return N.test(e)?"div":e}(t);let w={};const y=t.attributes.length;for(let e=0;e<y;e++){const s=t.attributes[e];V(g,s.name,s.value)||(w[s.name]=G(i,g,S(s.name),s.value))}if("link"===g&&o){const e=Array.from(i.styleSheets).find(e=>e.href===t.href);let s=null;e&&(s=b(e)),s&&(delete w.rel,delete w.href,w.t=s)}if("style"===g&&t.sheet){let e=b(t.sheet);e&&(t.childNodes.length>1&&(e=function(t,e){return function(t,e){const i=Array.from(e.childNodes),s=[];if(i.length>1&&t&&"string"==typeof t){const e=B(t);for(let r=1;r<i.length;r++)if(i[r].textContent&&"string"==typeof i[r].textContent){const n=B(i[r].textContent);for(let i=3;i<n.length;i++){const r=n.substring(0,i);if(2===e.split(r).length){const i=e.indexOf(r);for(let e=i;e<t.length;e++)if(B(t.substring(0,e)).length===i){s.push(t.substring(0,e)),t=t.substring(e);break}break}}}}return s.push(t),s}(t,e).join("/* rr_split */")}(e,t)),w.t=e)}if("input"===g||"textarea"===g||"select"===g){const e=t.value,i=t.checked;"radio"!==w.type&&"checkbox"!==w.type&&"submit"!==w.type&&"button"!==w.type&&e?w.value=I({element:t,type:A(t),tagName:g,value:e,maskInputOptions:h,maskInputFn:l}):i&&(w.checked=i)}if("option"===g&&(t.selected&&!h.select?w.selected=!0:delete w.selected),"dialog"===g&&t.open&&(w.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),"canvas"===g&&u)if("2d"===t.i)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let i=0;i<t.width;i+=50)for(let s=0;s<t.height;s+=50){const r=e.getImageData,n=k in r?r[k]:r;if(new Uint32Array(n.call(e,i,s,Math.min(50,t.width-i),Math.min(50,t.height-s)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(w.rr_dataURL=t.toDataURL(a.type,a.quality));else if(!("i"in t)){const e=t.toDataURL(a.type,a.quality),s=i.createElement("canvas");s.width=t.width,s.height=t.height,e!==s.toDataURL(a.type,a.quality)&&(w.rr_dataURL=e)}if("img"===g&&c){j||(j=i.createElement("canvas"),D=j.getContext("2d"));const e=t,s=e.currentSrc||e.getAttribute("src")||"<unknown-src>",r=e.crossOrigin,n=()=>{e.removeEventListener("load",n);try{j.width=e.naturalWidth,j.height=e.naturalHeight,D.drawImage(e,0,0),w.rr_dataURL=j.toDataURL(a.type,a.quality)}catch(t){if("anonymous"!==e.crossOrigin)return e.crossOrigin="anonymous",void(e.complete&&0!==e.naturalWidth?n():e.addEventListener("load",n));console.warn(`Cannot inline img src=${s}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(r?w.crossOrigin=r:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?n():e.addEventListener("load",n)}if("audio"===g||"video"===g){const e=w;e.rr_mediaState=t.paused?"paused":"played",e.rr_mediaCurrentTime=t.currentTime,e.rr_mediaPlaybackRate=t.playbackRate,e.rr_mediaMuted=t.muted,e.rr_mediaLoop=t.loop,e.rr_mediaVolume=t.volume}if(d||(t.scrollLeft&&(w.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(w.rr_scrollTop=t.scrollTop)),m){const{width:e,height:i}=t.getBoundingClientRect();w={class:w.class,rr_width:`${e}px`,rr_height:`${i}px`}}let v;"iframe"!==g||f(w.src)||(t.contentDocument||(w.rr_src=w.src),delete w.src);try{customElements.get(g)&&(v=!0)}catch(t){}return{type:n.Element,tagName:g,attributes:w,childNodes:[],isSVG:(C=t,Boolean("svg"===C.tagName||C.ownerSVGElement)||void 0),needBlock:m,rootId:p,isCustom:v};var C}(t,{doc:i,blockClass:r,blockSelector:o,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:m,inlineImages:g,recordCanvas:w,keepIframeSrcFn:y,newlyAddedElement:v,rootId:x});case t.TEXT_NODE:return function(t,e){const{needsMask:i,maskTextFn:s,rootId:r,cssCaptured:o}=e,h=f(t),l=h&&h.tagName;let a="";const c="STYLE"===l||void 0,u="SCRIPT"===l||void 0;return u?a="SCRIPT_PLACEHOLDER":o||(a=p(t),c&&a&&(a=E(a,P(e.doc)))),!c&&!u&&a&&i&&(a=s?s(a,d(t)):a.replace(/[\S]/g,"*")),{type:n.Text,textContent:a||"",rootId:r}}(t,{doc:i,needsMask:h,maskTextFn:c,rootId:x,cssCaptured:C});case t.CDATA_SECTION_NODE:return{type:n.CDATA,textContent:"",rootId:x};case t.COMMENT_NODE:return{type:n.Comment,textContent:p(t)||"",rootId:x};default:return!1}}(t,{doc:i,mirror:s,blockClass:r,blockSelector:o,needsMask:Q,inlineStylesheet:c,maskInputOptions:v,maskTextFn:C,maskInputFn:R,dataURLOptions:O,inlineImages:T,recordCanvas:F,keepIframeSrcFn:K,newlyAddedElement:_,cssCaptured:H});if(!tt)return console.warn(t,"not serialized"),null;let et;et=s.hasNode(t)?s.getId(t):function(t,e){if(e.comment&&t.type===n.Comment)return!0;if(t.type===n.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===x(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(J(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===J(t.attributes.name)||"icon"===J(t.attributes.rel)||"apple-touch-icon"===J(t.attributes.rel)||"shortcut icon"===J(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&J(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(J(t.attributes.property).match(/^(og|twitter|fb):/)||J(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===J(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===J(t.attributes.name)||"googlebot"===J(t.attributes.name)||"bingbot"===J(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===J(t.attributes.name)||"generator"===J(t.attributes.name)||"framework"===J(t.attributes.name)||"publisher"===J(t.attributes.name)||"progid"===J(t.attributes.name)||J(t.attributes.property).match(/^article:/)||J(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===J(t.attributes.name)||"yandex-verification"===J(t.attributes.name)||"csrf-token"===J(t.attributes.name)||"p:domain_verify"===J(t.attributes.name)||"verify-v1"===J(t.attributes.name)||"verification"===J(t.attributes.name)||"shopify-checkout-api-token"===J(t.attributes.name)))return!0}}return!1}(tt,M)||!q&&tt.type===n.Text&&!tt.textContent.replace(/^\s+|\s+$/gm,"").length?-2:L();const it=Object.assign(tt,{id:et});if(s.add(t,it),-2===et)return null;U&&U(t);let st=!a;if(it.type===n.Element){st=st&&!it.needBlock,delete it.needBlock;const e=m(t);e&&y(e)&&(it.isShadowHost=!0)}if((it.type===n.Document||it.type===n.Element)&&st){M.headWhitespace&&it.type===n.Element&&"head"===it.tagName&&(q=!1);const e={doc:i,mirror:s,blockClass:r,blockSelector:o,needsMask:Q,maskTextClass:h,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:v,maskTextFn:C,maskInputFn:R,slimDOMOptions:M,dataURLOptions:O,inlineImages:T,recordCanvas:F,preserveWhiteSpace:q,onSerialize:U,onIframeLoad:W,iframeLoadTimeout:Y,onStylesheetLoad:Z,stylesheetLoadTimeout:z,keepIframeSrcFn:K,cssCaptured:!1};if(it.type===n.Element&&"textarea"===it.tagName&&void 0!==it.attributes.value);else{it.type===n.Element&&void 0!==it.attributes.t&&"string"==typeof it.attributes.t&&(e.cssCaptured=!0);for(const i of Array.from(u(t))){const t=$(i,e);t&&it.childNodes.push(t)}}let f=null;if(g(t)&&(f=m(t)))for(const t of Array.from(u(f))){const i=$(t,e);i&&(y(f)&&(i.isShadow=!0),it.childNodes.push(i))}}const rt=f(t);return rt&&w(rt)&&y(rt)&&(it.isShadow=!0),it.type===n.Element&&"iframe"===it.tagName&&function(t,e,i){const s=t.contentWindow;if(!s)return;let r,n=!1;try{r=s.document.readyState}catch(t){return}if("complete"!==r){const s=setTimeout(()=>{n||(e(),n=!0)},i);return void t.addEventListener("load",()=>{clearTimeout(s),n=!0,e()})}const o="about:blank";if(s.location.href!==o||t.src===o||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,()=>{const e=t.contentDocument;if(e&&W){const i=$(e,{doc:e,mirror:s,blockClass:r,blockSelector:o,needsMask:Q,maskTextClass:h,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:v,maskTextFn:C,maskInputFn:R,slimDOMOptions:M,dataURLOptions:O,inlineImages:T,recordCanvas:F,preserveWhiteSpace:q,onSerialize:U,onIframeLoad:W,iframeLoadTimeout:Y,onStylesheetLoad:Z,stylesheetLoadTimeout:z,keepIframeSrcFn:K});i&&W(t,i)}},Y),it.type===n.Element&&"link"===it.tagName&&"string"==typeof it.attributes.rel&&("stylesheet"===it.attributes.rel||"preload"===it.attributes.rel&&"string"==typeof it.attributes.href&&"css"===x(it.attributes.href))&&function(t,e,i){let s,r=!1;try{s=t.sheet}catch(t){return}if(s)return;const n=setTimeout(()=>{r||(e(),r=!0)},i);t.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}(t,()=>{if(Z){const e=$(t,{doc:i,mirror:s,blockClass:r,blockSelector:o,needsMask:Q,maskTextClass:h,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:v,maskTextFn:C,maskInputFn:R,slimDOMOptions:M,dataURLOptions:O,inlineImages:T,recordCanvas:F,preserveWhiteSpace:q,onSerialize:U,onIframeLoad:W,iframeLoadTimeout:Y,onStylesheetLoad:Z,stylesheetLoadTimeout:z,keepIframeSrcFn:K});e&&Z(t,e)}},z),it}function K(t){return t&&t.o&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function _(t){if(t.o)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"o",{value:!0}),Object.keys(t).forEach(function(e){var s=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,s.get?s:{enumerable:!0,get:function(){return t[e]}})}),i}var H={exports:{}},Q=String,q=function(){return{isColorSupported:!1,reset:Q,bold:Q,dim:Q,italic:Q,underline:Q,inverse:Q,hidden:Q,strikethrough:Q,black:Q,red:Q,green:Q,yellow:Q,blue:Q,magenta:Q,cyan:Q,white:Q,gray:Q,bgBlack:Q,bgRed:Q,bgGreen:Q,bgYellow:Q,bgBlue:Q,bgMagenta:Q,bgCyan:Q,bgWhite:Q}};H.exports=q(),H.exports.createColors=q;var tt=H.exports;const et=_(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let it=tt,st=et,rt=class t extends Error{constructor(e,i,s,r,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),r&&(this.source=r),o&&(this.plugin=o),void 0!==i&&void 0!==s&&("number"==typeof i?(this.line=i,this.column=s):(this.line=i.line,this.column=i.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}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(t){if(!this.source)return"";let e=this.source;null==t&&(t=it.isColorSupported),st&&t&&(e=st(e));let i,s,r=e.split(/\r?\n/),n=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),h=String(o).length;if(t){let{bold:t,gray:e,red:r}=it.createColors(!0);i=e=>t(r(e)),s=t=>e(t)}else i=s=t=>t;return r.slice(n,o).map((t,e)=>{let r=n+1+e,o=" "+(" "+r).slice(-h)+" | ";if(r===this.line){let e=s(o.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+s(o)+t+"\n "+e+i("^")}return" "+s(o)+t}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};var nt=rt;rt.default=rt;var ot={};ot.isClean=Symbol("isClean"),ot.my=Symbol("my");const ht={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let lt=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name,s=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes)this.block(t,i+s);else{let r=(t.raws.between||"")+(e?";":"");this.builder(i+s+r,t)}}beforeAfter(t,e){let i;i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");let s=t.parent,r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;t<r;t++)i+=e}return i}block(t,e){let i,s=this.raw(t,"between","beforeOpen");this.builder(e+s+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(i),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&"comment"===t.nodes[e].type;)e-=1;let i=this.raw(t,"semicolon");for(let s=0;s<t.nodes.length;s++){let r=t.nodes[s],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,e!==s||i)}}comment(t){let e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){let i=this.raw(t,"between","colon"),s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i||(i=e),e&&(s=t.raws[e],void 0!==s))return s;let r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return ht[i];let n=t.root();if(n.rawCache||(n.rawCache={}),void 0!==n.rawCache[i])return n.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);{let r="raw"+((o=i)[0].toUpperCase()+o.slice(1));this[r]?s=this[r](n,t):n.walk(t=>{if(s=t.raws[e],void 0!==s)return!1})}var o;return void 0===s&&(s=ht[i]),n.rawCache[i]=s,s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return e=t.raws.after,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&(e=t.raws.between,void 0!==e))return!1}),e}rawBeforeRule(t){let e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return e=i.raws.before,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&(e=t.raws.after,void 0!==e))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(i=>{let s=i.parent;if(s&&s!==t&&s.parent&&s.parent===t&&void 0!==i.raws.before){let t=i.raws.before.split("\n");return e=t[t.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&(e=t.raws.semicolon,void 0!==e))return!1}),e}rawValue(t,e){let i=t[e],s=t.raws[e];return s&&s.value===i?s.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};var at=lt;lt.default=lt;let ct=at;function ut(t,e){new ct(e).stringify(t)}var ft=ut;ut.default=ut;let{isClean:dt,my:pt}=ot,mt=nt,gt=at,wt=ft;function yt(t,e){let i=new t.constructor;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;if("proxyCache"===s)continue;let r=t[s],n=typeof r;"parent"===s&&"object"===n?e&&(i[s]=e):"source"===s?i[s]=r:Array.isArray(r)?i[s]=r.map(t=>yt(t,i)):("object"===n&&null!==r&&(r=yt(r)),i[s]=r)}return i}let bt=class{constructor(t={}){this.raws={},this[dt]=!1,this[pt]=!0;for(let e in t)if("nodes"===e){this.nodes=[];for(let i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=yt(this);for(let i in t)e[i]=t[i];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:i,start:s}=this.rangeBy(e);return this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)}return new mt(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[dt]){this[dt]=!1;let t=this;for(;t=t.parent;)t[dt]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;if(t.index)i=this.positionInside(t.index,e);else if(t.word){let s=(e=this.toString()).indexOf(t.word);-1!==s&&(i=this.positionInside(s,e))}return i}positionInside(t,e){let i=e||this.toString(),s=this.source.start.column,r=this.source.start.line;for(let e=0;e<t;e++)"\n"===i[e]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let s=this.toString(),r=s.indexOf(t.word);-1!==r&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(i.line<e.line||i.line===e.line&&i.column<=e.column)&&(i={column:e.column+1,line:e.line}),{end:i,start:e}}raw(t,e){return(new gt).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,i=!1;for(let s of t)s===this?i=!0:i?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s);i||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){let i={},s=null==e;e=e||new Map;let r=0;for(let t in this){if(!Object.prototype.hasOwnProperty.call(this,t))continue;if("parent"===t||"proxyCache"===t)continue;let s=this[t];if(Array.isArray(s))i[t]=s.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof s&&s.toJSON)i[t]=s.toJSON(null,e);else if("source"===t){let n=e.get(s.input);null==n&&(n=r,e.set(s.input,r),r++),i[t]={end:s.end,inputId:n,start:s.start}}else i[t]=s}return s&&(i.inputs=[...e.keys()].map(t=>t.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=wt){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){let s={node:this};for(let t in i)s[t]=i[t];return t.warn(e,s)}get proxyOf(){return this}};var vt=bt;bt.default=bt;let Ct=vt,It=class extends Ct{constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var St=It;It.default=It;var kt={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}};let{SourceMapConsumer:At,SourceMapGenerator:xt}=et,{existsSync:Rt,readFileSync:Mt}=et,{dirname:Ot,join:Tt}=et,Et=class{constructor(t,e){if(!1===e.map)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=e.map?e.map.prev:void 0,s=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ot(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new At(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e;let i=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t.h||Array.isArray(t.sections))}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!e)return;let i=t.lastIndexOf(e.pop()),s=t.indexOf("*/",i);i>-1&&s>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,s)))}loadFile(t){if(this.root=Ot(t),Rt(t))return this.mapFile=t,Mt(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof At)return xt.fromSourceMap(e).toString();if(e instanceof xt)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let i=e(t);if(i){let t=this.loadFile(i);if(!t)throw new Error("Unable to load previous source map: "+i.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=Tt(Ot(t),e)),this.loadFile(e)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Bt=Et;Et.default=Et;let{SourceMapConsumer:Ft,SourceMapGenerator:Nt}=et,{fileURLToPath:Lt,pathToFileURL:jt}=et,{isAbsolute:Dt,resolve:Ut}=et,{nanoid:Wt}=kt,Yt=et,Zt=nt,Pt=Bt,Gt=Symbol("fromOffsetCache"),Vt=Boolean(Ft&&Nt),zt=Boolean(Ut&&Dt),Xt=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!zt||/^\w+:\/\//.test(e.from)||Dt(e.from)?this.file=e.from:this.file=Ut(e.from)),zt&&Vt){let t=new Pt(this.css,e);if(t.text){this.map=t;let e=t.consumer().file;!this.file&&e&&(this.file=this.mapResolve(e))}}this.file||(this.id="<input css "+Wt(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;if(e&&"object"==typeof e){let t=e,s=i;if("number"==typeof t.offset){let s=this.fromOffset(t.offset);e=s.line,i=s.col}else e=t.line,i=t.column;if("number"==typeof s.offset){let t=this.fromOffset(s.offset);n=t.line,o=t.col}else n=s.line,o=s.column}else if(!i){let t=this.fromOffset(e);e=t.line,i=t.col}let h=this.origin(e,i,n,o);return r=h?new Zt(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new Zt(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin),r.input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(jt&&(r.input.url=jt(this.file).toString()),r.input.file=this.file),r}fromOffset(t){let e,i;if(this[Gt])i=this[Gt];else{let t=this.css.split("\n");i=new Array(t.length);let e=0;for(let s=0,r=t.length;s<r;s++)i[s]=e,e+=t[s].length+1;this[Gt]=i}e=i[i.length-1];let s=0;if(t>=e)s=i.length-1;else{let e,r=i.length-2;for(;s<r;)if(e=s+(r-s>>1),t<i[e])r=e-1;else{if(!(t>=i[e+1])){s=e;break}s=e+1}}return{col:t-i[s]+1,line:s+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ut(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;let r,n,o=this.map.consumer(),h=o.originalPositionFor({column:e,line:t});if(!h.source)return!1;"number"==typeof i&&(r=o.originalPositionFor({column:s,line:i})),n=Dt(h.source)?jt(h.source):new URL(h.source,this.map.consumer().sourceRoot||jt(this.map.mapFile));let l={column:h.column,endColumn:r&&r.column,endLine:r&&r.line,line:h.line,url:n.toString()};if("file:"===n.protocol){if(!Lt)throw new Error("file: protocol is not available in this PostCSS build");l.file=Lt(n)}let a=o.sourceContentFor(h.source);return a&&(l.source=a),l}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var Jt=Xt;Xt.default=Xt,Yt&&Yt.registerInput&&Yt.registerInput(Xt);let{SourceMapConsumer:$t,SourceMapGenerator:Kt}=et,{dirname:_t,relative:Ht,resolve:Qt,sep:qt}=et,{pathToFileURL:te}=et,ee=Jt,ie=Boolean($t&&Kt),se=Boolean(_t&&Qt&&Ht&&qt);var re=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;t=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 e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e,i=this.toUrl(this.path(t.file)),s=t.root||_t(t.file);!1===this.mapOpts.sourcesContent?(e=new $t(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,i,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],"comment"===t.type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),se&&ie&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Kt.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Kt({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 Kt({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,i=1,s=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,h,l)=>{if(this.css+=o,h&&"end"!==l&&(n.generated.line=i,n.generated.column=s-1,h.source&&h.source.start?(n.source=this.sourcePath(h),n.original.line=h.source.start.line,n.original.column=h.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),t=o.match(/\n/g),t?(i+=t.length,e=o.lastIndexOf("\n"),s=o.length-e):s+=o.length,h&&"start"!==l){let t=h.parent||{raws:{}};("decl"===h.type||"atrule"===h.type&&!h.nodes)&&h===t.last&&!t.raws.semicolon||(h.source&&h.source.end?(n.source=this.sourcePath(h),n.original.line=h.source.end.line,n.original.column=h.source.end.column-1,n.generated.line=i,n.generated.column=s-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=i,n.generated.column=s-1,this.map.addMapping(n)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.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(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?_t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=_t(Qt(i,this.mapOpts.annotation)));let s=Ht(i,t);return this.memoizedPaths.set(t,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new ee(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let i=e.source.input.from;if(i&&!t[i]){t[i]=!0;let s=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(s,e.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(te){let e=te(t).toString();return this.memoizedFileURLs.set(t,e),e}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;"\\"===qt&&(t=t.replace(/\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}};let ne=vt,oe=class extends ne{constructor(t){super(t),this.type="comment"}};var he=oe;oe.default=oe;let le,ae,ce,ue,{isClean:fe,my:de}=ot,pe=St,me=he,ge=vt;function we(t){return t.map(t=>(t.nodes&&(t.nodes=we(t.nodes)),delete t.source,t))}function ye(t){if(t[fe]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ye(e)}let be=class t extends ge{append(...t){for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let e of this.nodes)e.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let e,i,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(e=this.indexes[s],i=t(this.proxyOf.nodes[e],e),!1!==i);)this.indexes[s]+=1;return delete this.indexes[s],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?(...i)=>t[e](...i.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t)):"every"===e||"some"===e?i=>t[e]((t,...e)=>i(t.toProxy(),...e)):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){let i,s=this.index(t),r=this.normalize(e,this.proxyOf.nodes[s]).reverse();s=this.index(t);for(let t of r)this.proxyOf.nodes.splice(s+1,0,t);for(let t in this.indexes)i=this.indexes[t],s<i&&(this.indexes[t]=i+r.length);return this.markDirty(),this}insertBefore(t,e){let i,s=this.index(t),r=0===s&&"prepend",n=this.normalize(e,this.proxyOf.nodes[s],r).reverse();s=this.index(t);for(let t of n)this.proxyOf.nodes.splice(s,0,t);for(let t in this.indexes)i=this.indexes[t],s<=i&&(this.indexes[t]=i+n.length);return this.markDirty(),this}normalize(e,i){if("string"==typeof e)e=we(le(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new pe(e)]}else if(e.selector)e=[new ae(e)];else if(e.name)e=[new ce(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new me(e)]}return e.map(e=>(e[de]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[fe]&&ye(e),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...t){t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){let e;t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);for(let i in this.indexes)e=this.indexes[i],e>=t&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(s=>{e.props&&!e.props.includes(s.prop)||e.fast&&!s.value.includes(e.fast)||(s.value=s.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,i)=>{let s;try{s=t(e,i)}catch(t){throw e.addToError(t)}return!1!==s&&e.walk&&(s=e.walk(t)),s})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,s)=>{if("atrule"===i.type&&t.test(i.name))return e(i,s)}):this.walk((i,s)=>{if("atrule"===i.type&&i.name===t)return e(i,s)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,s)=>{if("decl"===i.type&&t.test(i.prop))return e(i,s)}):this.walk((i,s)=>{if("decl"===i.type&&i.prop===t)return e(i,s)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,s)=>{if("rule"===i.type&&t.test(i.selector))return e(i,s)}):this.walk((i,s)=>{if("rule"===i.type&&i.selector===t)return e(i,s)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}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]}};be.registerParse=t=>{le=t},be.registerRule=t=>{ae=t},be.registerAtRule=t=>{ce=t},be.registerRoot=t=>{ue=t};var ve=be;be.default=be,be.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,ce.prototype):"rule"===t.type?Object.setPrototypeOf(t,ae.prototype):"decl"===t.type?Object.setPrototypeOf(t,pe.prototype):"comment"===t.type?Object.setPrototypeOf(t,me.prototype):"root"===t.type&&Object.setPrototypeOf(t,ue.prototype),t[de]=!0,t.nodes&&t.nodes.forEach(t=>{be.rebuild(t)})};let Ce,Ie,Se=ve,ke=class extends Se{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Ce(new Ie,this,t).stringify()}};ke.registerLazyResult=t=>{Ce=t},ke.registerProcessor=t=>{Ie=t};var Ae=ke;ke.default=ke;let xe={};var Re=function(t){xe[t]||(xe[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))};let Me=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let t=e.node.rangeBy(e);this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column}for(let t in e)this[t]=e[t]}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 Oe=Me;Me.default=Me;let Te=Oe,Ee=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let i=new Te(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}};var Be=Ee;Ee.default=Ee;const Fe="'".charCodeAt(0),Ne='"'.charCodeAt(0),Le="\\".charCodeAt(0),je="/".charCodeAt(0),De="\n".charCodeAt(0),Ue=" ".charCodeAt(0),We="\f".charCodeAt(0),Ye="\t".charCodeAt(0),Ze="\r".charCodeAt(0),Pe="[".charCodeAt(0),Ge="]".charCodeAt(0),Ve="(".charCodeAt(0),ze=")".charCodeAt(0),Xe="{".charCodeAt(0),Je="}".charCodeAt(0),$e=";".charCodeAt(0),Ke="*".charCodeAt(0),_e=":".charCodeAt(0),He="@".charCodeAt(0),Qe=/[\t\n\f\r "#'()/;[\\\]{}]/g,qe=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ti=/.[\r\n"'(/\\]/,ei=/[\da-f]/i;let ii=ve,si=class extends ii{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var ri=si;si.default=si,ii.registerAtRule(si);let ni,oi,hi=ve,li=class extends hi{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){let s=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let t of s)t.raws.before=e.raws.before;return s}removeChild(t,e){let i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new ni(new oi,this,t).stringify()}};li.registerLazyResult=t=>{ni=t},li.registerProcessor=t=>{oi=t};var ai=li;li.default=li,hi.registerRoot(li);let ci={comma:t=>ci.split(t,[","],!0),space:t=>ci.split(t,[" ","\n","\t"]),split(t,e,i){let s=[],r="",n=!1,o=0,h=!1,l="",a=!1;for(let i of t)a?a=!1:"\\"===i?a=!0:h?i===l&&(h=!1):'"'===i||"'"===i?(h=!0,l=i):"("===i?o+=1:")"===i?o>0&&(o-=1):0===o&&e.includes(i)&&(n=!0),n?(""!==r&&s.push(r.trim()),r="",n=!1):r+=i;return(i||""!==r)&&s.push(r.trim()),s}};var ui=ci;ci.default=ci;let fi=ve,di=ui,pi=class extends fi{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return di.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}};var mi=pi;pi.default=pi,fi.registerRule(pi);let gi=St,wi=he,yi=ri,bi=ai,vi=mi;const Ci={empty:!0,space:!0};let Ii=ve,Si=class{constructor(t){this.input=t,this.root=new bi,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e,i,s,r=new yi;r.name=t[1].slice(1),""===r.name&&this.unnamedAtrule(r,t),this.init(r,t[2]);let n=!1,o=!1,h=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?l.push("("===e?")":"]"):"{"===e&&l.length>0?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){r.source.end=this.getPosition(t[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(h.length>0){for(s=h.length-1,i=h[s];i&&"space"===i[0];)i=h[--s];i&&(r.source.end=this.getPosition(i[3]||i[2]),r.source.end.offset++)}this.end(t);break}h.push(t)}else h.push(t);if(this.tokenizer.endOfFile()){n=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(r.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(r,"params",h),n&&(t=h[h.length-1],r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let i,s=0;for(let r=e-1;r>=0&&(i=t[r],"space"===i[0]||(s+=1,2!==s));r--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}colon(t){let e,i,s,r=0;for(let[n,o]of t.entries()){if(e=o,i=e[0],"("===i&&(r+=1),")"===i&&(r-=1),0===r&&":"===i){if(s){if("word"===s[0]&&"progid"===s[1])continue;return n}this.doubleColon(e)}s=e}return!1}comment(t){let e=new wi;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let i=t[1].slice(2,-2);if(/^\s*$/.test(i))e.text="",e.raws.left=i,e.raws.right="";else{let t=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}}createTokenizer(){this.tokenizer=function(t,e={}){let i,s,r,n,o,h,l,a,c,u,f=t.css.valueOf(),d=e.ignoreErrors,p=f.length,m=0,g=[],w=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(t){w.push(t)},endOfFile:function(){return 0===w.length&&m>=p},nextToken:function(t){if(w.length)return w.pop();if(m>=p)return;let e=!!t&&t.ignoreUnclosed;switch(i=f.charCodeAt(m),i){case De:case Ue:case Ye:case Ze:case We:s=m;do{s+=1,i=f.charCodeAt(s)}while(i===Ue||i===De||i===Ye||i===Ze||i===We);u=["space",f.slice(m,s)],m=s-1;break;case Pe:case Ge:case Xe:case Je:case _e:case $e:case ze:{let t=String.fromCharCode(i);u=[t,t,m];break}case Ve:if(a=g.length?g.pop()[1]:"",c=f.charCodeAt(m+1),"url"===a&&c!==Fe&&c!==Ne&&c!==Ue&&c!==De&&c!==Ye&&c!==We&&c!==Ze){s=m;do{if(h=!1,s=f.indexOf(")",s+1),-1===s){if(d||e){s=m;break}y("bracket")}for(l=s;f.charCodeAt(l-1)===Le;)l-=1,h=!h}while(h);u=["brackets",f.slice(m,s+1),m,s],m=s}else s=f.indexOf(")",m+1),n=f.slice(m,s+1),-1===s||ti.test(n)?u=["(","(",m]:(u=["brackets",n,m,s],m=s);break;case Fe:case Ne:r=i===Fe?"'":'"',s=m;do{if(h=!1,s=f.indexOf(r,s+1),-1===s){if(d||e){s=m+1;break}y("string")}for(l=s;f.charCodeAt(l-1)===Le;)l-=1,h=!h}while(h);u=["string",f.slice(m,s+1),m,s],m=s;break;case He:Qe.lastIndex=m+1,Qe.test(f),s=0===Qe.lastIndex?f.length-1:Qe.lastIndex-2,u=["at-word",f.slice(m,s+1),m,s],m=s;break;case Le:for(s=m,o=!0;f.charCodeAt(s+1)===Le;)s+=1,o=!o;if(i=f.charCodeAt(s+1),o&&i!==je&&i!==Ue&&i!==De&&i!==Ye&&i!==Ze&&i!==We&&(s+=1,ei.test(f.charAt(s)))){for(;ei.test(f.charAt(s+1));)s+=1;f.charCodeAt(s+1)===Ue&&(s+=1)}u=["word",f.slice(m,s+1),m,s],m=s;break;default:i===je&&f.charCodeAt(m+1)===Ke?(s=f.indexOf("*/",m+2)+1,0===s&&(d||e?s=f.length:y("comment")),u=["comment",f.slice(m,s+1),m,s],m=s):(qe.lastIndex=m+1,qe.test(f),s=0===qe.lastIndex?f.length-1:qe.lastIndex-2,u=["word",f.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}}(this.input)}decl(t,e){let i=new gi;this.init(i,t[0][2]);let s,r=t[t.length-1];for(";"===r[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(r[3]||r[2]||function(t){for(let e=t.length-1;e>=0;e--){let i=t[e],s=i[3]||i[2];if(s)return s}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(s=t.shift(),":"===s[0]){i.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let n,o=[];for(;t.length&&(n=t[0][0],"space"===n||"comment"===n);)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(s=t[e],"!important"===s[1].toLowerCase()){i.important=!0;let s=this.stringFrom(t,e);s=this.spacesFromEnd(t)+s," !important"!==s&&(i.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=t.slice(0),r="";for(let t=e;t>0;t--){let e=s[t][0];if(0===r.trim().indexOf("!")&&"space"!==e)break;r=s.pop()[1]+r}0===r.trim().indexOf("!")&&(i.important=!0,i.raws.important=r,t=s)}if("space"!==s[0]&&"comment"!==s[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(i.raws.between+=o.map(t=>t[1]).join(""),o=[]),this.raw(i,"value",o.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new vi;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1,i=null,s=!1,r=null,n=[],o=t[1].startsWith("--"),h=[],l=t;for(;l;){if(i=l[0],h.push(l),"("===i||"["===i)r||(r=l),n.push("("===i?")":"]");else if(o&&s&&"{"===i)r||(r=l),n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(h,o);break}if("{"===i)return void this.rule(h);if("}"===i){this.tokenizer.back(h.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length&&(r=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),n.length>0&&this.unclosedBracket(r),e&&s){if(!o)for(;h.length&&(l=h[h.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(h.pop());this.decl(h,o)}else this.unknownWord(h)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){let r,n,o,h,l=i.length,a="",c=!0;for(let t=0;t<l;t+=1)r=i[t],n=r[0],"space"!==n||t!==l-1||s?"comment"===n?(h=i[t-1]?i[t-1][0]:"empty",o=i[t+1]?i[t+1][0]:"empty",Ci[h]||Ci[o]||","===a.slice(-1)?c=!1:a+=r[1]):a+=r[1]:c=!1;if(!c){let s=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:s,value:a}}t[e]=a}rule(t){t.pop();let e=new vi;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let e,i="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)i=t.pop()[1]+i;return i}stringFrom(t,e){let i="";for(let s=e;s<t.length;s++)i+=t[s][1];return t.splice(e,t.length-e),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},ki=Jt;function Ai(t,e){let i=new ki(t,e),s=new Si(i);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}var xi=Ai;Ai.default=Ai,Ii.registerParse(Ai);let{isClean:Ri,my:Mi}=ot,Oi=re,Ti=ft,Ei=ve,Bi=Ae,Fi=Re,Ni=Be,Li=xi,ji=ai;const Di={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ui={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},Wi={Once:!0,postcssPlugin:!0,prepare:!0};function Yi(t){return"object"==typeof t&&"function"==typeof t.then}function Zi(t){let e=!1,i=Di[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function Pi(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:Zi(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Gi(t){return t[Ri]=!1,t.nodes&&t.nodes.forEach(t=>Gi(t)),t}let Vi={},zi=class t{constructor(e,i,s){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof t||i instanceof Ni)r=Gi(i.root),i.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=i.map);else{let t=Li;s.syntax&&(t=s.syntax.parse),s.parser&&(t=s.parser),t.parse&&(t=t.parse);try{r=t(i,s)}catch(t){this.processed=!0,this.error=t}r&&!r[Mi]&&Ei.rebuild(r)}else r=Gi(i);this.result=new Ni(e,r,s),this.helpers={...Vi,postcss:Vi,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){let i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion&&"production"!==process.env.NODE_ENV){let t=i.postcssPlugin,e=i.postcssVersion,s=this.result.processor.version,r=e.split("."),n=s.split(".");(r[0]!==n[0]||parseInt(r[1])>parseInt(n[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(let e of this.plugins)if("object"==typeof e)for(let i in e){if(!Ui[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wi[i])if("object"==typeof e[i])for(let s in e[i])t(e,"*"===s?i:i+"-"+s.toLowerCase(),e[i][s]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let e=this.plugins[t],i=this.runOnRoot(e);if(Yi(i))try{await i}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ri];){t[Ri]=!0;let e=[Pi(t)];for(;e.length>0;){let t=this.visitTick(e);if(Yi(t))try{await t}catch(t){let i=e[e.length-1].node;throw this.handleError(t,i)}}}if(this.listeners.OnceExit)for(let[e,i]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(t=>i(t,this.helpers));await Promise.all(e)}else await i(t,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){let e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return Yi(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(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 t=this.result.opts,e=Ti;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let i=new Oi(e,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 t of this.plugins)if(Yi(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ri];)t[Ri]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Fi("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(t,e)}toString(){return this.css}visitSync(t,e){for(let[i,s]of t){let t;this.result.lastPlugin=i;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Yi(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:i,visitors:s}=e;if("root"!==i.type&&"document"!==i.type&&!i.parent)return void t.pop();if(s.length>0&&e.visitorIndex<s.length){let[t,r]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return r(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){let s,r=e.iterator;for(;s=i.nodes[i.indexes[r]];)if(i.indexes[r]+=1,!s[Ri])return s[Ri]=!0,void t.push(Pi(s));e.iterator=0,delete i.indexes[r]}let r=e.events;for(;e.eventIndex<r.length;){let t=r[e.eventIndex];if(e.eventIndex+=1,0===t)return void(i.nodes&&i.nodes.length&&(i[Ri]=!0,e.iterator=i.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[Ri]=!0;let e=Zi(t);for(let i of e)if(0===i)t.nodes&&t.each(t=>{t[Ri]||this.walkSync(t)});else{let e=this.listeners[i];if(e&&this.visitSync(e,t.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"}};zi.registerPostcss=t=>{Vi=t};var Xi=zi;zi.default=zi,ji.registerLazyResult(zi),Bi.registerLazyResult(zi);let Ji=re,$i=ft,Ki=Re,_i=xi;const Hi=Be;let Qi=class{constructor(t,e,i){let s;e=e.toString(),this.stringified=!1,this.l=t,this.u=e,this.p=i,this.m=void 0;let r=$i;this.result=new Hi(this.l,s,this.p),this.result.css=e;let n=this;Object.defineProperty(this.result,"root",{get:()=>n.root});let o=new Ji(r,s,this.p,e);if(o.isMap()){let[t,e]=o.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.p||Ki("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(t,e)}toString(){return this.u}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.v)return this.v;let t,e=_i;try{t=e(this.u,this.p)}catch(t){this.error=t}if(this.error)throw this.error;return this.v=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var qi=Qi;Qi.default=Qi;let ts=qi,es=Xi,is=Ae,ss=ai,rs=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else{if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" 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 e}process(t,e={}){return this.plugins.length||e.parser||e.stringifier||e.syntax?new es(this,t,e):new ts(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var ns=rs;rs.default=rs,ss.registerProcessor(rs),is.registerProcessor(rs);let os=St,hs=Bt,ls=he,as=ri,cs=Jt,us=ai,fs=mi;function ds(t,e){if(Array.isArray(t))return t.map(t=>ds(t));let{inputs:i,...s}=t;if(i){e=[];for(let t of i){let i={...t,__proto__:cs.prototype};i.map&&(i.map={...i.map,__proto__:hs.prototype}),e.push(i)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>ds(t,e))),s.source){let{inputId:t,...i}=s.source;s.source=i,null!=t&&(s.source.input=e[t])}if("root"===s.type)return new us(s);if("decl"===s.type)return new os(s);if("rule"===s.type)return new fs(s);if("comment"===s.type)return new ls(s);if("atrule"===s.type)return new as(s);throw new Error("Unknown node type: "+t.type)}var ps=ds;ds.default=ds;let ms=nt,gs=St,ws=Xi,ys=ve,bs=ns,vs=ft,Cs=ps,Is=Ae,Ss=Oe,ks=he,As=ri,xs=Be,Rs=Jt,Ms=xi,Os=ui,Ts=mi,Es=ai,Bs=vt;function Fs(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new bs(t)}Fs.plugin=function(t,e){let i,s=!1;function r(...i){console&&console.warn&&!s&&(s=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let r=e(...i);return r.postcssPlugin=t,r.postcssVersion=(new bs).version,r}return Object.defineProperty(r,"postcss",{get:()=>(i||(i=r()),i)}),r.process=function(t,e,i){return Fs([r(i)]).process(t,e)},r},Fs.stringify=vs,Fs.parse=Ms,Fs.fromJSON=Cs,Fs.list=Os,Fs.comment=t=>new ks(t),Fs.atRule=t=>new As(t),Fs.decl=t=>new gs(t),Fs.rule=t=>new Ts(t),Fs.root=t=>new Es(t),Fs.document=t=>new Is(t),Fs.CssSyntaxError=ms,Fs.Declaration=gs,Fs.Container=ys,Fs.Processor=bs,Fs.Document=Is,Fs.Comment=ks,Fs.Warning=Ss,Fs.AtRule=As,Fs.Result=xs,Fs.Input=Rs,Fs.Rule=Ts,Fs.Root=Es,Fs.Node=Bs,ws.registerPostcss(Fs);var Ns=Fs;Fs.default=Fs;const Ls=K(Ns);Ls.stringify,Ls.fromJSON,Ls.plugin,Ls.parse,Ls.list,Ls.document,Ls.comment,Ls.atRule,Ls.rule,Ls.decl,Ls.root,Ls.CssSyntaxError,Ls.Declaration,Ls.Container,Ls.Processor,Ls.Document,Ls.Comment,Ls.Warning,Ls.AtRule,Ls.Result,Ls.Input,Ls.Rule,Ls.Root,Ls.Node;var js=Object.defineProperty,Ds=(t,e,i)=>((t,e,i)=>e in t?js(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i);function Us(t){return t&&t.o&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ws(t){if(t.o)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"o",{value:!0}),Object.keys(t).forEach(function(e){var s=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,s.get?s:{enumerable:!0,get:function(){return t[e]}})}),i}var Ys={exports:{}},Zs=String,Ps=function(){return{isColorSupported:!1,reset:Zs,bold:Zs,dim:Zs,italic:Zs,underline:Zs,inverse:Zs,hidden:Zs,strikethrough:Zs,black:Zs,red:Zs,green:Zs,yellow:Zs,blue:Zs,magenta:Zs,cyan:Zs,white:Zs,gray:Zs,bgBlack:Zs,bgRed:Zs,bgGreen:Zs,bgYellow:Zs,bgBlue:Zs,bgMagenta:Zs,bgCyan:Zs,bgWhite:Zs}};Ys.exports=Ps(),Ys.exports.createColors=Ps;var Gs=Ys.exports;const Vs=Ws(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let zs=Gs,Xs=Vs,Js=class t extends Error{constructor(e,i,s,r,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),r&&(this.source=r),o&&(this.plugin=o),void 0!==i&&void 0!==s&&("number"==typeof i?(this.line=i,this.column=s):(this.line=i.line,this.column=i.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}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(t){if(!this.source)return"";let e=this.source;null==t&&(t=zs.isColorSupported),Xs&&t&&(e=Xs(e));let i,s,r=e.split(/\r?\n/),n=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),h=String(o).length;if(t){let{bold:t,gray:e,red:r}=zs.createColors(!0);i=e=>t(r(e)),s=t=>e(t)}else i=s=t=>t;return r.slice(n,o).map((t,e)=>{let r=n+1+e,o=" "+(" "+r).slice(-h)+" | ";if(r===this.line){let e=s(o.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+s(o)+t+"\n "+e+i("^")}return" "+s(o)+t}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};var $s=Js;Js.default=Js;var Ks={};Ks.isClean=Symbol("isClean"),Ks.my=Symbol("my");const _s={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Hs=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name,s=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes)this.block(t,i+s);else{let r=(t.raws.between||"")+(e?";":"");this.builder(i+s+r,t)}}beforeAfter(t,e){let i;i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");let s=t.parent,r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;t<r;t++)i+=e}return i}block(t,e){let i,s=this.raw(t,"between","beforeOpen");this.builder(e+s+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(i),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&"comment"===t.nodes[e].type;)e-=1;let i=this.raw(t,"semicolon");for(let s=0;s<t.nodes.length;s++){let r=t.nodes[s],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,e!==s||i)}}comment(t){let e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){let i=this.raw(t,"between","colon"),s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i||(i=e),e&&(s=t.raws[e],void 0!==s))return s;let r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return _s[i];let n=t.root();if(n.rawCache||(n.rawCache={}),void 0!==n.rawCache[i])return n.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);{let r="raw"+((o=i)[0].toUpperCase()+o.slice(1));this[r]?s=this[r](n,t):n.walk(t=>{if(s=t.raws[e],void 0!==s)return!1})}var o;return void 0===s&&(s=_s[i]),n.rawCache[i]=s,s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return e=t.raws.after,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&(e=t.raws.between,void 0!==e))return!1}),e}rawBeforeRule(t){let e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return e=i.raws.before,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&(e=t.raws.after,void 0!==e))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(i=>{let s=i.parent;if(s&&s!==t&&s.parent&&s.parent===t&&void 0!==i.raws.before){let t=i.raws.before.split("\n");return e=t[t.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&(e=t.raws.semicolon,void 0!==e))return!1}),e}rawValue(t,e){let i=t[e],s=t.raws[e];return s&&s.value===i?s.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};var Qs=Hs;Hs.default=Hs;let qs=Qs;function tr(t,e){new qs(e).stringify(t)}var er=tr;tr.default=tr;let{isClean:ir,my:sr}=Ks,rr=$s,nr=Qs,or=er;function hr(t,e){let i=new t.constructor;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;if("proxyCache"===s)continue;let r=t[s],n=typeof r;"parent"===s&&"object"===n?e&&(i[s]=e):"source"===s?i[s]=r:Array.isArray(r)?i[s]=r.map(t=>hr(t,i)):("object"===n&&null!==r&&(r=hr(r)),i[s]=r)}return i}let lr=class{constructor(t={}){this.raws={},this[ir]=!1,this[sr]=!0;for(let e in t)if("nodes"===e){this.nodes=[];for(let i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=hr(this);for(let i in t)e[i]=t[i];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:i,start:s}=this.rangeBy(e);return this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)}return new rr(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[ir]){this[ir]=!1;let t=this;for(;t=t.parent;)t[ir]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;if(t.index)i=this.positionInside(t.index,e);else if(t.word){let s=(e=this.toString()).indexOf(t.word);-1!==s&&(i=this.positionInside(s,e))}return i}positionInside(t,e){let i=e||this.toString(),s=this.source.start.column,r=this.source.start.line;for(let e=0;e<t;e++)"\n"===i[e]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let s=this.toString(),r=s.indexOf(t.word);-1!==r&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(i.line<e.line||i.line===e.line&&i.column<=e.column)&&(i={column:e.column+1,line:e.line}),{end:i,start:e}}raw(t,e){return(new nr).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,i=!1;for(let s of t)s===this?i=!0:i?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s);i||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){let i={},s=null==e;e=e||new Map;let r=0;for(let t in this){if(!Object.prototype.hasOwnProperty.call(this,t))continue;if("parent"===t||"proxyCache"===t)continue;let s=this[t];if(Array.isArray(s))i[t]=s.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof s&&s.toJSON)i[t]=s.toJSON(null,e);else if("source"===t){let n=e.get(s.input);null==n&&(n=r,e.set(s.input,r),r++),i[t]={end:s.end,inputId:n,start:s.start}}else i[t]=s}return s&&(i.inputs=[...e.keys()].map(t=>t.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=or){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){let s={node:this};for(let t in i)s[t]=i[t];return t.warn(e,s)}get proxyOf(){return this}};var ar=lr;lr.default=lr;let cr=ar,ur=class extends cr{constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var fr=ur;ur.default=ur;var dr={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}};let{SourceMapConsumer:pr,SourceMapGenerator:mr}=Vs,{existsSync:gr,readFileSync:wr}=Vs,{dirname:yr,join:br}=Vs,vr=class{constructor(t,e){if(!1===e.map)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=e.map?e.map.prev:void 0,s=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=yr(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new pr(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e;let i=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t.h||Array.isArray(t.sections))}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!e)return;let i=t.lastIndexOf(e.pop()),s=t.indexOf("*/",i);i>-1&&s>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,s)))}loadFile(t){if(this.root=yr(t),gr(t))return this.mapFile=t,wr(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof pr)return mr.fromSourceMap(e).toString();if(e instanceof mr)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let i=e(t);if(i){let t=this.loadFile(i);if(!t)throw new Error("Unable to load previous source map: "+i.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=br(yr(t),e)),this.loadFile(e)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Cr=vr;vr.default=vr;let{SourceMapConsumer:Ir,SourceMapGenerator:Sr}=Vs,{fileURLToPath:kr,pathToFileURL:Ar}=Vs,{isAbsolute:xr,resolve:Rr}=Vs,{nanoid:Mr}=dr,Or=Vs,Tr=$s,Er=Cr,Br=Symbol("fromOffsetCache"),Fr=Boolean(Ir&&Sr),Nr=Boolean(Rr&&xr),Lr=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!Nr||/^\w+:\/\//.test(e.from)||xr(e.from)?this.file=e.from:this.file=Rr(e.from)),Nr&&Fr){let t=new Er(this.css,e);if(t.text){this.map=t;let e=t.consumer().file;!this.file&&e&&(this.file=this.mapResolve(e))}}this.file||(this.id="<input css "+Mr(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;if(e&&"object"==typeof e){let t=e,s=i;if("number"==typeof t.offset){let s=this.fromOffset(t.offset);e=s.line,i=s.col}else e=t.line,i=t.column;if("number"==typeof s.offset){let t=this.fromOffset(s.offset);n=t.line,o=t.col}else n=s.line,o=s.column}else if(!i){let t=this.fromOffset(e);e=t.line,i=t.col}let h=this.origin(e,i,n,o);return r=h?new Tr(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new Tr(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin),r.input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(Ar&&(r.input.url=Ar(this.file).toString()),r.input.file=this.file),r}fromOffset(t){let e,i;if(this[Br])i=this[Br];else{let t=this.css.split("\n");i=new Array(t.length);let e=0;for(let s=0,r=t.length;s<r;s++)i[s]=e,e+=t[s].length+1;this[Br]=i}e=i[i.length-1];let s=0;if(t>=e)s=i.length-1;else{let e,r=i.length-2;for(;s<r;)if(e=s+(r-s>>1),t<i[e])r=e-1;else{if(!(t>=i[e+1])){s=e;break}s=e+1}}return{col:t-i[s]+1,line:s+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Rr(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;let r,n,o=this.map.consumer(),h=o.originalPositionFor({column:e,line:t});if(!h.source)return!1;"number"==typeof i&&(r=o.originalPositionFor({column:s,line:i})),n=xr(h.source)?Ar(h.source):new URL(h.source,this.map.consumer().sourceRoot||Ar(this.map.mapFile));let l={column:h.column,endColumn:r&&r.column,endLine:r&&r.line,line:h.line,url:n.toString()};if("file:"===n.protocol){if(!kr)throw new Error("file: protocol is not available in this PostCSS build");l.file=kr(n)}let a=o.sourceContentFor(h.source);return a&&(l.source=a),l}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var jr=Lr;Lr.default=Lr,Or&&Or.registerInput&&Or.registerInput(Lr);let{SourceMapConsumer:Dr,SourceMapGenerator:Ur}=Vs,{dirname:Wr,relative:Yr,resolve:Zr,sep:Pr}=Vs,{pathToFileURL:Gr}=Vs,Vr=jr,zr=Boolean(Dr&&Ur),Xr=Boolean(Wr&&Zr&&Yr&&Pr);var Jr=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;t=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 e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e,i=this.toUrl(this.path(t.file)),s=t.root||Wr(t.file);!1===this.mapOpts.sourcesContent?(e=new Dr(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,i,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],"comment"===t.type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Xr&&zr&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Ur.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ur({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 Ur({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,i=1,s=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,h,l)=>{if(this.css+=o,h&&"end"!==l&&(n.generated.line=i,n.generated.column=s-1,h.source&&h.source.start?(n.source=this.sourcePath(h),n.original.line=h.source.start.line,n.original.column=h.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),t=o.match(/\n/g),t?(i+=t.length,e=o.lastIndexOf("\n"),s=o.length-e):s+=o.length,h&&"start"!==l){let t=h.parent||{raws:{}};("decl"===h.type||"atrule"===h.type&&!h.nodes)&&h===t.last&&!t.raws.semicolon||(h.source&&h.source.end?(n.source=this.sourcePath(h),n.original.line=h.source.end.line,n.original.column=h.source.end.column-1,n.generated.line=i,n.generated.column=s-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=i,n.generated.column=s-1,this.map.addMapping(n)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.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(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?Wr(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=Wr(Zr(i,this.mapOpts.annotation)));let s=Yr(i,t);return this.memoizedPaths.set(t,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new Vr(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let i=e.source.input.from;if(i&&!t[i]){t[i]=!0;let s=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(s,e.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Gr){let e=Gr(t).toString();return this.memoizedFileURLs.set(t,e),e}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;"\\"===Pr&&(t=t.replace(/\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}};let $r=ar,Kr=class extends $r{constructor(t){super(t),this.type="comment"}};var _r=Kr;Kr.default=Kr;let Hr,Qr,qr,tn,{isClean:en,my:sn}=Ks,rn=fr,nn=_r,on=ar;function hn(t){return t.map(t=>(t.nodes&&(t.nodes=hn(t.nodes)),delete t.source,t))}function ln(t){if(t[en]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ln(e)}let an=class t extends on{append(...t){for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let e of this.nodes)e.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let e,i,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(e=this.indexes[s],i=t(this.proxyOf.nodes[e],e),!1!==i);)this.indexes[s]+=1;return delete this.indexes[s],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?(...i)=>t[e](...i.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t)):"every"===e||"some"===e?i=>t[e]((t,...e)=>i(t.toProxy(),...e)):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){let i,s=this.index(t),r=this.normalize(e,this.proxyOf.nodes[s]).reverse();s=this.index(t);for(let t of r)this.proxyOf.nodes.splice(s+1,0,t);for(let t in this.indexes)i=this.indexes[t],s<i&&(this.indexes[t]=i+r.length);return this.markDirty(),this}insertBefore(t,e){let i,s=this.index(t),r=0===s&&"prepend",n=this.normalize(e,this.proxyOf.nodes[s],r).reverse();s=this.index(t);for(let t of n)this.proxyOf.nodes.splice(s,0,t);for(let t in this.indexes)i=this.indexes[t],s<=i&&(this.indexes[t]=i+n.length);return this.markDirty(),this}normalize(e,i){if("string"==typeof e)e=hn(Hr(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new rn(e)]}else if(e.selector)e=[new Qr(e)];else if(e.name)e=[new qr(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new nn(e)]}return e.map(e=>(e[sn]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[en]&&ln(e),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...t){t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){let e;t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);for(let i in this.indexes)e=this.indexes[i],e>=t&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(s=>{e.props&&!e.props.includes(s.prop)||e.fast&&!s.value.includes(e.fast)||(s.value=s.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,i)=>{let s;try{s=t(e,i)}catch(t){throw e.addToError(t)}return!1!==s&&e.walk&&(s=e.walk(t)),s})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,s)=>{if("atrule"===i.type&&t.test(i.name))return e(i,s)}):this.walk((i,s)=>{if("atrule"===i.type&&i.name===t)return e(i,s)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,s)=>{if("decl"===i.type&&t.test(i.prop))return e(i,s)}):this.walk((i,s)=>{if("decl"===i.type&&i.prop===t)return e(i,s)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,s)=>{if("rule"===i.type&&t.test(i.selector))return e(i,s)}):this.walk((i,s)=>{if("rule"===i.type&&i.selector===t)return e(i,s)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}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]}};an.registerParse=t=>{Hr=t},an.registerRule=t=>{Qr=t},an.registerAtRule=t=>{qr=t},an.registerRoot=t=>{tn=t};var cn=an;an.default=an,an.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,qr.prototype):"rule"===t.type?Object.setPrototypeOf(t,Qr.prototype):"decl"===t.type?Object.setPrototypeOf(t,rn.prototype):"comment"===t.type?Object.setPrototypeOf(t,nn.prototype):"root"===t.type&&Object.setPrototypeOf(t,tn.prototype),t[sn]=!0,t.nodes&&t.nodes.forEach(t=>{an.rebuild(t)})};let un,fn,dn=cn,pn=class extends dn{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new un(new fn,this,t).stringify()}};pn.registerLazyResult=t=>{un=t},pn.registerProcessor=t=>{fn=t};var mn=pn;pn.default=pn;let gn={};var wn=function(t){gn[t]||(gn[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))};let yn=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let t=e.node.rangeBy(e);this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column}for(let t in e)this[t]=e[t]}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 bn=yn;yn.default=yn;let vn=bn,Cn=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let i=new vn(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}};var In=Cn;Cn.default=Cn;const Sn="'".charCodeAt(0),kn='"'.charCodeAt(0),An="\\".charCodeAt(0),xn="/".charCodeAt(0),Rn="\n".charCodeAt(0),Mn=" ".charCodeAt(0),On="\f".charCodeAt(0),Tn="\t".charCodeAt(0),En="\r".charCodeAt(0),Bn="[".charCodeAt(0),Fn="]".charCodeAt(0),Nn="(".charCodeAt(0),Ln=")".charCodeAt(0),jn="{".charCodeAt(0),Dn="}".charCodeAt(0),Un=";".charCodeAt(0),Wn="*".charCodeAt(0),Yn=":".charCodeAt(0),Zn="@".charCodeAt(0),Pn=/[\t\n\f\r "#'()/;[\\\]{}]/g,Gn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Vn=/.[\r\n"'(/\\]/,zn=/[\da-f]/i;let Xn=cn,Jn=class extends Xn{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var $n=Jn;Jn.default=Jn,Xn.registerAtRule(Jn);let Kn,_n,Hn=cn,Qn=class extends Hn{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){let s=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let t of s)t.raws.before=e.raws.before;return s}removeChild(t,e){let i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new Kn(new _n,this,t).stringify()}};Qn.registerLazyResult=t=>{Kn=t},Qn.registerProcessor=t=>{_n=t};var qn=Qn;Qn.default=Qn,Hn.registerRoot(Qn);let to={comma:t=>to.split(t,[","],!0),space:t=>to.split(t,[" ","\n","\t"]),split(t,e,i){let s=[],r="",n=!1,o=0,h=!1,l="",a=!1;for(let i of t)a?a=!1:"\\"===i?a=!0:h?i===l&&(h=!1):'"'===i||"'"===i?(h=!0,l=i):"("===i?o+=1:")"===i?o>0&&(o-=1):0===o&&e.includes(i)&&(n=!0),n?(""!==r&&s.push(r.trim()),r="",n=!1):r+=i;return(i||""!==r)&&s.push(r.trim()),s}};var eo=to;to.default=to;let io=cn,so=eo,ro=class extends io{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return so.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}};var no=ro;ro.default=ro,io.registerRule(ro);let oo=fr,ho=_r,lo=$n,ao=qn,co=no;const uo={empty:!0,space:!0};let fo=cn,po=class{constructor(t){this.input=t,this.root=new ao,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e,i,s,r=new lo;r.name=t[1].slice(1),""===r.name&&this.unnamedAtrule(r,t),this.init(r,t[2]);let n=!1,o=!1,h=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?l.push("("===e?")":"]"):"{"===e&&l.length>0?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){r.source.end=this.getPosition(t[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(h.length>0){for(s=h.length-1,i=h[s];i&&"space"===i[0];)i=h[--s];i&&(r.source.end=this.getPosition(i[3]||i[2]),r.source.end.offset++)}this.end(t);break}h.push(t)}else h.push(t);if(this.tokenizer.endOfFile()){n=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(r.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(r,"params",h),n&&(t=h[h.length-1],r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let i,s=0;for(let r=e-1;r>=0&&(i=t[r],"space"===i[0]||(s+=1,2!==s));r--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}colon(t){let e,i,s,r=0;for(let[n,o]of t.entries()){if(e=o,i=e[0],"("===i&&(r+=1),")"===i&&(r-=1),0===r&&":"===i){if(s){if("word"===s[0]&&"progid"===s[1])continue;return n}this.doubleColon(e)}s=e}return!1}comment(t){let e=new ho;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let i=t[1].slice(2,-2);if(/^\s*$/.test(i))e.text="",e.raws.left=i,e.raws.right="";else{let t=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}}createTokenizer(){this.tokenizer=function(t,e={}){let i,s,r,n,o,h,l,a,c,u,f=t.css.valueOf(),d=e.ignoreErrors,p=f.length,m=0,g=[],w=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(t){w.push(t)},endOfFile:function(){return 0===w.length&&m>=p},nextToken:function(t){if(w.length)return w.pop();if(m>=p)return;let e=!!t&&t.ignoreUnclosed;switch(i=f.charCodeAt(m),i){case Rn:case Mn:case Tn:case En:case On:s=m;do{s+=1,i=f.charCodeAt(s)}while(i===Mn||i===Rn||i===Tn||i===En||i===On);u=["space",f.slice(m,s)],m=s-1;break;case Bn:case Fn:case jn:case Dn:case Yn:case Un:case Ln:{let t=String.fromCharCode(i);u=[t,t,m];break}case Nn:if(a=g.length?g.pop()[1]:"",c=f.charCodeAt(m+1),"url"===a&&c!==Sn&&c!==kn&&c!==Mn&&c!==Rn&&c!==Tn&&c!==On&&c!==En){s=m;do{if(h=!1,s=f.indexOf(")",s+1),-1===s){if(d||e){s=m;break}y("bracket")}for(l=s;f.charCodeAt(l-1)===An;)l-=1,h=!h}while(h);u=["brackets",f.slice(m,s+1),m,s],m=s}else s=f.indexOf(")",m+1),n=f.slice(m,s+1),-1===s||Vn.test(n)?u=["(","(",m]:(u=["brackets",n,m,s],m=s);break;case Sn:case kn:r=i===Sn?"'":'"',s=m;do{if(h=!1,s=f.indexOf(r,s+1),-1===s){if(d||e){s=m+1;break}y("string")}for(l=s;f.charCodeAt(l-1)===An;)l-=1,h=!h}while(h);u=["string",f.slice(m,s+1),m,s],m=s;break;case Zn:Pn.lastIndex=m+1,Pn.test(f),s=0===Pn.lastIndex?f.length-1:Pn.lastIndex-2,u=["at-word",f.slice(m,s+1),m,s],m=s;break;case An:for(s=m,o=!0;f.charCodeAt(s+1)===An;)s+=1,o=!o;if(i=f.charCodeAt(s+1),o&&i!==xn&&i!==Mn&&i!==Rn&&i!==Tn&&i!==En&&i!==On&&(s+=1,zn.test(f.charAt(s)))){for(;zn.test(f.charAt(s+1));)s+=1;f.charCodeAt(s+1)===Mn&&(s+=1)}u=["word",f.slice(m,s+1),m,s],m=s;break;default:i===xn&&f.charCodeAt(m+1)===Wn?(s=f.indexOf("*/",m+2)+1,0===s&&(d||e?s=f.length:y("comment")),u=["comment",f.slice(m,s+1),m,s],m=s):(Gn.lastIndex=m+1,Gn.test(f),s=0===Gn.lastIndex?f.length-1:Gn.lastIndex-2,u=["word",f.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}}(this.input)}decl(t,e){let i=new oo;this.init(i,t[0][2]);let s,r=t[t.length-1];for(";"===r[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(r[3]||r[2]||function(t){for(let e=t.length-1;e>=0;e--){let i=t[e],s=i[3]||i[2];if(s)return s}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(s=t.shift(),":"===s[0]){i.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let n,o=[];for(;t.length&&(n=t[0][0],"space"===n||"comment"===n);)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(s=t[e],"!important"===s[1].toLowerCase()){i.important=!0;let s=this.stringFrom(t,e);s=this.spacesFromEnd(t)+s," !important"!==s&&(i.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=t.slice(0),r="";for(let t=e;t>0;t--){let e=s[t][0];if(0===r.trim().indexOf("!")&&"space"!==e)break;r=s.pop()[1]+r}0===r.trim().indexOf("!")&&(i.important=!0,i.raws.important=r,t=s)}if("space"!==s[0]&&"comment"!==s[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(i.raws.between+=o.map(t=>t[1]).join(""),o=[]),this.raw(i,"value",o.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new co;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1,i=null,s=!1,r=null,n=[],o=t[1].startsWith("--"),h=[],l=t;for(;l;){if(i=l[0],h.push(l),"("===i||"["===i)r||(r=l),n.push("("===i?")":"]");else if(o&&s&&"{"===i)r||(r=l),n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(h,o);break}if("{"===i)return void this.rule(h);if("}"===i){this.tokenizer.back(h.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length&&(r=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),n.length>0&&this.unclosedBracket(r),e&&s){if(!o)for(;h.length&&(l=h[h.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(h.pop());this.decl(h,o)}else this.unknownWord(h)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){let r,n,o,h,l=i.length,a="",c=!0;for(let t=0;t<l;t+=1)r=i[t],n=r[0],"space"!==n||t!==l-1||s?"comment"===n?(h=i[t-1]?i[t-1][0]:"empty",o=i[t+1]?i[t+1][0]:"empty",uo[h]||uo[o]||","===a.slice(-1)?c=!1:a+=r[1]):a+=r[1]:c=!1;if(!c){let s=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:s,value:a}}t[e]=a}rule(t){t.pop();let e=new co;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let e,i="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)i=t.pop()[1]+i;return i}stringFrom(t,e){let i="";for(let s=e;s<t.length;s++)i+=t[s][1];return t.splice(e,t.length-e),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},mo=jr;function go(t,e){let i=new mo(t,e),s=new po(i);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}var wo=go;go.default=go,fo.registerParse(go);let{isClean:yo,my:bo}=Ks,vo=Jr,Co=er,Io=cn,So=mn,ko=wn,Ao=In,xo=wo,Ro=qn;const Mo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Oo={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},To={Once:!0,postcssPlugin:!0,prepare:!0};function Eo(t){return"object"==typeof t&&"function"==typeof t.then}function Bo(t){let e=!1,i=Mo[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function Fo(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:Bo(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function No(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(t=>No(t)),t}let Lo={},jo=class t{constructor(e,i,s){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof t||i instanceof Ao)r=No(i.root),i.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=i.map);else{let t=xo;s.syntax&&(t=s.syntax.parse),s.parser&&(t=s.parser),t.parse&&(t=t.parse);try{r=t(i,s)}catch(t){this.processed=!0,this.error=t}r&&!r[bo]&&Io.rebuild(r)}else r=No(i);this.result=new Ao(e,r,s),this.helpers={...Lo,postcss:Lo,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){let i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion&&"production"!==process.env.NODE_ENV){let t=i.postcssPlugin,e=i.postcssVersion,s=this.result.processor.version,r=e.split("."),n=s.split(".");(r[0]!==n[0]||parseInt(r[1])>parseInt(n[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(let e of this.plugins)if("object"==typeof e)for(let i in e){if(!Oo[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!To[i])if("object"==typeof e[i])for(let s in e[i])t(e,"*"===s?i:i+"-"+s.toLowerCase(),e[i][s]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let e=this.plugins[t],i=this.runOnRoot(e);if(Eo(i))try{await i}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[yo];){t[yo]=!0;let e=[Fo(t)];for(;e.length>0;){let t=this.visitTick(e);if(Eo(t))try{await t}catch(t){let i=e[e.length-1].node;throw this.handleError(t,i)}}}if(this.listeners.OnceExit)for(let[e,i]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(t=>i(t,this.helpers));await Promise.all(e)}else await i(t,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){let e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return Eo(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(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 t=this.result.opts,e=Co;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let i=new vo(e,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 t of this.plugins)if(Eo(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[yo];)t[yo]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||ko("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(t,e)}toString(){return this.css}visitSync(t,e){for(let[i,s]of t){let t;this.result.lastPlugin=i;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Eo(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:i,visitors:s}=e;if("root"!==i.type&&"document"!==i.type&&!i.parent)return void t.pop();if(s.length>0&&e.visitorIndex<s.length){let[t,r]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return r(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){let s,r=e.iterator;for(;s=i.nodes[i.indexes[r]];)if(i.indexes[r]+=1,!s[yo])return s[yo]=!0,void t.push(Fo(s));e.iterator=0,delete i.indexes[r]}let r=e.events;for(;e.eventIndex<r.length;){let t=r[e.eventIndex];if(e.eventIndex+=1,0===t)return void(i.nodes&&i.nodes.length&&(i[yo]=!0,e.iterator=i.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[yo]=!0;let e=Bo(t);for(let i of e)if(0===i)t.nodes&&t.each(t=>{t[yo]||this.walkSync(t)});else{let e=this.listeners[i];if(e&&this.visitSync(e,t.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"}};jo.registerPostcss=t=>{Lo=t};var Do=jo;jo.default=jo,Ro.registerLazyResult(jo),So.registerLazyResult(jo);let Uo=Jr,Wo=er,Yo=wn,Zo=wo;const Po=In;let Go=class{constructor(t,e,i){let s;e=e.toString(),this.stringified=!1,this.l=t,this.u=e,this.p=i,this.m=void 0;let r=Wo;this.result=new Po(this.l,s,this.p),this.result.css=e;let n=this;Object.defineProperty(this.result,"root",{get:()=>n.root});let o=new Uo(r,s,this.p,e);if(o.isMap()){let[t,e]=o.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.p||Yo("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(t,e)}toString(){return this.u}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.v)return this.v;let t,e=Zo;try{t=e(this.u,this.p)}catch(t){this.error=t}if(this.error)throw this.error;return this.v=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var Vo=Go;Go.default=Go;let zo=Vo,Xo=Do,Jo=mn,$o=qn,Ko=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else{if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" 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 e}process(t,e={}){return this.plugins.length||e.parser||e.stringifier||e.syntax?new Xo(this,t,e):new zo(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var _o=Ko;Ko.default=Ko,$o.registerProcessor(Ko),Jo.registerProcessor(Ko);let Ho=fr,Qo=Cr,qo=_r,th=$n,eh=jr,ih=qn,sh=no;function rh(t,e){if(Array.isArray(t))return t.map(t=>rh(t));let{inputs:i,...s}=t;if(i){e=[];for(let t of i){let i={...t,__proto__:eh.prototype};i.map&&(i.map={...i.map,__proto__:Qo.prototype}),e.push(i)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>rh(t,e))),s.source){let{inputId:t,...i}=s.source;s.source=i,null!=t&&(s.source.input=e[t])}if("root"===s.type)return new ih(s);if("decl"===s.type)return new Ho(s);if("rule"===s.type)return new sh(s);if("comment"===s.type)return new qo(s);if("atrule"===s.type)return new th(s);throw new Error("Unknown node type: "+t.type)}var nh=rh;rh.default=rh;let oh=$s,hh=fr,lh=Do,ah=cn,ch=_o,uh=er,fh=nh,dh=mn,ph=bn,mh=_r,gh=$n,wh=In,yh=jr,bh=wo,vh=eo,Ch=no,Ih=qn,Sh=ar;function kh(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new ch(t)}kh.plugin=function(t,e){let i,s=!1;function r(...i){console&&console.warn&&!s&&(s=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let r=e(...i);return r.postcssPlugin=t,r.postcssVersion=(new ch).version,r}return Object.defineProperty(r,"postcss",{get:()=>(i||(i=r()),i)}),r.process=function(t,e,i){return kh([r(i)]).process(t,e)},r},kh.stringify=uh,kh.parse=bh,kh.fromJSON=fh,kh.list=vh,kh.comment=t=>new mh(t),kh.atRule=t=>new gh(t),kh.decl=t=>new hh(t),kh.rule=t=>new Ch(t),kh.root=t=>new Ih(t),kh.document=t=>new dh(t),kh.CssSyntaxError=oh,kh.Declaration=hh,kh.Container=ah,kh.Processor=ch,kh.Document=dh,kh.Comment=mh,kh.Warning=ph,kh.AtRule=gh,kh.Result=wh,kh.Input=yh,kh.Rule=Ch,kh.Root=Ih,kh.Node=Sh,lh.registerPostcss(kh);var Ah=kh;kh.default=kh;const xh=Us(Ah);xh.stringify,xh.fromJSON,xh.plugin,xh.parse,xh.list,xh.document,xh.comment,xh.atRule,xh.rule,xh.decl,xh.root,xh.CssSyntaxError,xh.Declaration,xh.Container,xh.Processor,xh.Document,xh.Comment,xh.Warning,xh.AtRule,xh.Result,xh.Input,xh.Rule,xh.Root,xh.Node;class Rh{constructor(...t){Ds(this,"parentElement",null),Ds(this,"parentNode",null),Ds(this,"ownerDocument"),Ds(this,"firstChild",null),Ds(this,"lastChild",null),Ds(this,"previousSibling",null),Ds(this,"nextSibling",null),Ds(this,"ELEMENT_NODE",1),Ds(this,"TEXT_NODE",3),Ds(this,"nodeType"),Ds(this,"nodeName"),Ds(this,"RRNodeType")}get childNodes(){const t=[];let e=this.firstChild;for(;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Rh))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(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Mh={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Oh={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Th={};function Eh(t){if(Th[t])return Th[t];const e=globalThis[t],i=e.prototype,s=t in Mh?Mh[t]:void 0,r=Boolean(s&&s.every(t=>{var e,s;return Boolean(null==(s=null==(e=Object.getOwnPropertyDescriptor(i,t))?void 0:e.get)?void 0:s.toString().includes("[native code]"))})),n=t in Oh?Oh[t]:void 0,o=Boolean(n&&n.every(t=>{var e;return"function"==typeof i[t]&&(null==(e=i[t])?void 0:e.toString().includes("[native code]"))}));if(r&&o&&!globalThis.Zone)return Th[t]=e.prototype,e.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const r=s.contentWindow;if(!r)return e.prototype;const n=r[t].prototype;return document.body.removeChild(s),n?Th[t]=n:i}catch{return i}}const Bh={};function Fh(t,e,i){var s;const r=`${t}.${String(i)}`;if(Bh[r])return Bh[r].call(e);const n=Eh(t),o=null==(s=Object.getOwnPropertyDescriptor(n,i))?void 0:s.get;return o?(Bh[r]=o,o.call(e)):e[i]}const Nh={};function Lh(t,e,i){const s=`${t}.${String(i)}`;if(Nh[s])return Nh[s].bind(e);const r=Eh(t)[i];return"function"!=typeof r?e[i]:(Nh[s]=r,r.bind(e))}const jh=function(t){return Fh("Node",t,"childNodes")},Dh=function(t){return Fh("Node",t,"parentNode")},Uh=function(t){return Fh("Node",t,"parentElement")},Wh=function(t){return Fh("Node",t,"textContent")},Yh=function(t,e){return Lh("Node",t,"contains")(e)},Zh=function(t){return Lh("Node",t,"getRootNode")()},Ph=function(t){return t&&"host"in t?Fh("ShadowRoot",t,"host"):null},Gh=function(t){return t&&"shadowRoot"in t?Fh("Element",t,"shadowRoot"):null};function Vh(t,e,i=document){const s={capture:!0,passive:!0};return i.addEventListener(t,e,s),()=>i.removeEventListener(t,e,s)}const zh="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 Xh={map:{},getId:()=>(console.error(zh),-1),getNode:()=>(console.error(zh),null),removeNodeFromMap(){console.error(zh)},has:()=>(console.error(zh),!1),reset(){console.error(zh)}};function Jh(t,e,i={}){let s=null,r=0;return function(...n){const o=Date.now();r||!1!==i.leading||(r=o);const h=e-(o-r),l=this;h<=0||h>e?(s&&(clearTimeout(s),s=null),r=o,t.apply(l,n)):s||!1===i.trailing||(s=setTimeout(()=>{r=!1===i.leading?0:Date.now(),s=null,t.apply(l,n)},h))}}function $h(t,e,i,s,r=window){const n=r.Object.getOwnPropertyDescriptor(t,e);return r.Object.defineProperty(t,e,s?i:{set(t){setTimeout(()=>{i.set.call(this,t)},0),n&&n.set&&n.set.call(this,t)}}),()=>$h(t,e,n||{},!0)}function Kh(t,e,i){try{if(!(e in t))return()=>{};const s=t[e],r=i(s);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{C:{enumerable:!1,value:s}})),t[e]=r,()=>{t[e]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Xh=new Proxy(Xh,{get:(t,e,i)=>("map"===e&&console.error(zh),Reflect.get(t,e,i))}));let _h=Date.now;function Hh(t){var e,i,s,r;const n=t.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:n.documentElement.scrollLeft||(null==n?void 0:n.body)&&(null==(e=Uh(n.body))?void 0:e.scrollLeft)||(null==(i=null==n?void 0:n.body)?void 0:i.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==n?void 0:n.documentElement.scrollTop)||(null==n?void 0:n.body)&&(null==(s=Uh(n.body))?void 0:s.scrollTop)||(null==(r=null==n?void 0:n.body)?void 0:r.scrollTop)||0}}function Qh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function qh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function tl(t){return t?t.nodeType===t.ELEMENT_NODE?t:Uh(t):null}function el(t,e,i,s){if(!t)return!1;const r=tl(t);if(!r)return!1;try{if("string"==typeof e){if(r.classList.contains(e))return!0;if(s&&null!==r.closest("."+e))return!0}else if(z(r,e,s))return!0}catch(t){}if(i){if(r.matches(i))return!0;if(s&&null!==r.closest(i))return!0}return!1}function il(t,e,i){return!("TITLE"!==t.tagName||!i.headTitleMutations)||-2===e.getId(t)}function sl(t,e){if(w(t))return!1;const i=e.getId(t);if(!e.has(i))return!0;const s=Dh(t);return(!s||s.nodeType!==t.DOCUMENT_NODE)&&(!s||sl(s,e))}function rl(t){return Boolean(t.changedTouches)}function nl(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function ol(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function hl(t){return!!t&&(t instanceof Rh&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Gh(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(_h=()=>(new Date).getTime());class ll{constructor(){i(this,"id",1),i(this,"styleIDMap",new WeakMap),i(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let i;return i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function al(t){var e;let i=null;return"getRootNode"in t&&(null==(e=Zh(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ph(Zh(t))&&(i=Ph(Zh(t))),i}function cl(t){const e=t.ownerDocument;return!!e&&(Yh(e,t)||function(t){const e=t.ownerDocument;if(!e)return!1;const i=function(t){let e,i=t;for(;e=al(i);)i=e;return i}(t);return Yh(e,i)}(t))}var ul=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(ul||{}),fl=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(fl||{}),dl=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(dl||{}),pl=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(pl||{}),ml=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ml||{}),gl=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(gl||{}),wl=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(wl||{});function yl(t){return"I"in t}class bl{constructor(){i(this,"length",0),i(this,"head",null),i(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let i=0;i<t;i++)e=(null==e?void 0:e.next)||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.I=e,t.previousSibling&&yl(t.previousSibling)){const i=t.previousSibling.I.next;e.next=i,e.previous=t.previousSibling.I,t.previousSibling.I.next=e,i&&(i.previous=e)}else if(t.nextSibling&&yl(t.nextSibling)&&t.nextSibling.I.previous){const i=t.nextSibling.I.previous;e.previous=i,e.next=t.nextSibling.I,t.nextSibling.I.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.I;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.I&&delete t.I,this.length--)}}const vl=(t,e)=>`${t}@${e}`;class Cl{constructor(){i(this,"frozen",!1),i(this,"locked",!1),i(this,"texts",[]),i(this,"attributes",[]),i(this,"attributeMap",new WeakMap),i(this,"removes",[]),i(this,"mapRemoves",[]),i(this,"movedMap",{}),i(this,"addedSet",new Set),i(this,"movedSet",new Set),i(this,"droppedSet",new Set),i(this,"removesSubTreeCache",new Set),i(this,"mutationCb"),i(this,"blockClass"),i(this,"blockSelector"),i(this,"maskTextClass"),i(this,"maskTextSelector"),i(this,"inlineStylesheet"),i(this,"maskInputOptions"),i(this,"maskTextFn"),i(this,"maskInputFn"),i(this,"keepIframeSrcFn"),i(this,"recordCanvas"),i(this,"inlineImages"),i(this,"slimDOMOptions"),i(this,"dataURLOptions"),i(this,"doc"),i(this,"mirror"),i(this,"iframeManager"),i(this,"stylesheetManager"),i(this,"shadowDomManager"),i(this,"canvasManager"),i(this,"processedNodeManager"),i(this,"unattachedDoc"),i(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),i(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,i=new bl,s=t=>{let e=t,i=-2;for(;-2===i;)e=e&&e.nextSibling,i=e&&this.mirror.getId(e);return i},r=r=>{const n=Dh(r);if(!n||!cl(r))return;let o=!1;if(r.nodeType===Node.TEXT_NODE){const t=n.tagName;if("TEXTAREA"===t)return;"STYLE"===t&&this.addedSet.has(n)&&(o=!0)}const h=w(n)?this.mirror.getId(al(r)):this.mirror.getId(n),l=s(r);if(-1===h||-1===l)return i.addNode(r);const a=$(r,{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:t=>{nl(t,this.mirror)&&this.iframeManager.addIframe(t),ol(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),hl(r)&&this.shadowDomManager.addShadowRoot(Gh(r),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},cssCaptured:o});a&&(t.push({parentId:h,nextId:l,node:a}),e.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)Sl(this.removesSubTreeCache,t,this.mirror)&&!this.movedSet.has(Dh(t))||r(t);for(const t of this.addedSet)kl(this.droppedSet,t)||Sl(this.removesSubTreeCache,t,this.mirror)?kl(this.movedSet,t)?r(t):this.droppedSet.add(t):r(t);let n=null;for(;i.length;){let t=null;if(n){const e=this.mirror.getId(Dh(n.value)),i=s(n.value);-1!==e&&-1!==i&&(t=n)}if(!t){let e=i.tail;for(;e;){const i=e;if(e=e.previous,i){const e=this.mirror.getId(Dh(i.value));if(-1===s(i.value))continue;if(-1!==e){t=i;break}{const e=i.value,s=Dh(e);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const e=Ph(s);if(-1!==this.mirror.getId(e)){t=i;break}}}}}}if(!t){for(;i.head;)i.removeNode(i.head.value);break}n=t.previous,i.removeNode(t.value),r(t.value)}const o={texts:this.texts.map(t=>{const e=t.node,i=Dh(e);return i&&"TEXTAREA"===i.tagName&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{const{attributes:e}=t;if("string"==typeof e.style){const i=JSON.stringify(t.styleDiff),s=JSON.stringify(t.S);i.length<e.style.length&&(i+s).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(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))}),i(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},S:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(jh(t),t=>Wh(t)||"").join("")}),i(this,"processMutation",t=>{if(!il(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const e=Wh(t.target);el(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:X(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,tl(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let i=t.attributeName,s=t.target.getAttribute(i);if("value"===i){const t=A(e);s=I({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:t,value:s,maskInputFn:this.maskInputFn})}if(el(t.target,this.blockClass,this.blockSelector,!1)||s===t.oldValue)return;let r=this.attributeMap.get(t.target);if("IFRAME"===e.tagName&&"src"===i&&!this.keepIframeSrcFn(s)){if(e.contentDocument)return;i="rr_src"}if(r||(r={node:t.target,attributes:{},styleDiff:{},S:{}},this.attributes.push(r),this.attributeMap.set(t.target,r)),"type"===i&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),!V(e.tagName,i))if(r.attributes[i]=G(this.doc,S(e.tagName),S(i),s),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const i=this.unattachedDoc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue);for(const t of Array.from(e.style)){const s=e.style.getPropertyValue(t),n=e.style.getPropertyPriority(t);s!==i.style.getPropertyValue(t)||n!==i.style.getPropertyPriority(t)?r.styleDiff[t]=""===n?s:[s,n]:r.S[t]=[s,n]}for(const t of Array.from(i.style))""===e.style.getPropertyValue(t)&&(r.styleDiff[t]=!1)}else"open"===i&&"DIALOG"===e.tagName&&(e.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal");break}case"childList":if(el(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const i=this.mirror.getId(e),s=w(t.target)?this.mirror.getId(Ph(t.target)):this.mirror.getId(t.target);el(t.target,this.blockClass,this.blockSelector,!1)||il(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Il(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===i||sl(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[vl(i,s)]?Il(this.movedSet,e):(this.removes.push({parentId:s,id:i,isShadow:!(!w(t.target)||!y(t.target))||void 0}),function(t,e){const i=[t];for(;i.length;){const t=i.pop();e.has(t)||(e.add(t),jh(t).forEach(t=>i.push(t)))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))})}}),i(this,"genAdds",(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(il(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;e&&this.mirror.hasNode(e)&&(i=this.mirror.getId(e)),i&&-1!==i&&(this.movedMap[vl(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);el(t,this.blockClass,this.blockSelector,!1)||(jh(t).forEach(t=>this.genAdds(t)),hl(t)&&jh(Gh(t)).forEach(e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]})}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 Il(t,e){t.delete(e),jh(e).forEach(e=>Il(t,e))}function Sl(t,e,i){return 0!==t.size&&function(t,e){const i=Dh(e);return!!i&&t.has(i)}(t,e)}function kl(t,e){return 0!==t.size&&Al(t,e)}function Al(t,e){const i=Dh(e);return!!i&&(!!t.has(i)||Al(t,i))}let xl;const Rl=t=>xl?(...e)=>{try{return t(...e)}catch(t){if(xl&&!0===xl(t))return;throw t}}:t,Ml=[];function Ol(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function Tl(t,e){const i=new Cl;Ml.push(i),i.init(t);const s=new(Eh("MutationObserver").constructor)(Rl(i.processMutations.bind(i)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function El({scrollCb:t,doc:e,mirror:i,blockClass:s,blockSelector:r,sampling:n}){return Vh("scroll",Rl(Jh(Rl(n=>{const o=Ol(n);if(!o||el(o,s,r,!0))return;const h=i.getId(o);if(o===e&&e.defaultView){const i=Hh(e.defaultView);t({id:h,x:i.left,y:i.top})}else t({id:h,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100)),e)}const Bl=["INPUT","TEXTAREA","SELECT"],Fl=new WeakMap;function Nl(t){return function(t,e){if(Ul("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Ul("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Ul("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Ul("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const i=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(i)}else if(t.parentStyleSheet){const i=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(i)}return e}(t,[])}function Ll(t,e,i){let s,r;return t?(t.ownerNode?s=e.getId(t.ownerNode):r=i.getId(t),{styleId:r,id:s}):{}}function jl({mirror:t,stylesheetManager:e},i){var s,r,n;let o=null;o="#document"===i.nodeName?t.getId(i):t.getId(Ph(i));const h="#document"===i.nodeName?null==(s=i.defaultView)?void 0:s.Document:null==(n=null==(r=i.ownerDocument)?void 0:r.defaultView)?void 0:n.ShadowRoot,l=(null==h?void 0:h.prototype)?Object.getOwnPropertyDescriptor(null==h?void 0:h.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&h&&l?(Object.defineProperty(i,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var t;return null==(t=l.get)?void 0:t.call(this)},set(t){var i;const s=null==(i=l.set)?void 0:i.call(this,t);if(null!==o&&-1!==o)try{e.adoptStyleSheets(t,o)}catch(t){}return s}}),Rl(()=>{Object.defineProperty(i,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function Dl(t,e={}){const i=t.doc.defaultView;if(!i)return()=>{};let s;!function(t,e){const{mutationCb:i,mousemoveCb:s,mouseInteractionCb:r,scrollCb:n,viewportResizeCb:o,inputCb:h,mediaInteractionCb:l,styleSheetRuleCb:a,styleDeclarationCb:c,canvasMutationCb:u,fontCb:f,selectionCb:d,customElementCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),i(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),s(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),r(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),n(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),o(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),h(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),l(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),a(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),c(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),u(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),f(...t)},t.selectionCb=(...t)=>{e.selection&&e.selection(...t),d(...t)},t.customElementCb=(...t)=>{e.customElement&&e.customElement(...t),p(...t)}}(t,e),t.recordDOM&&(s=Tl(t,t.doc));const r=function({mousemoveCb:t,sampling:e,doc:i,mirror:s}){if(!1===e.mousemove)return()=>{};const r="number"==typeof e.mousemove?e.mousemove:50,n="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let o,h=[];const l=Jh(Rl(e=>{const i=Date.now()-o;t(h.map(t=>(t.timeOffset-=i,t)),e),h=[],o=null}),n),a=Rl(Jh(Rl(t=>{const e=Ol(t),{clientX:i,clientY:r}=rl(t)?t.changedTouches[0]:t;o||(o=_h()),h.push({x:i,y:r,id:s.getId(e),timeOffset:_h()-o}),l("undefined"!=typeof DragEvent&&t instanceof DragEvent?fl.Drag:t instanceof MouseEvent?fl.MouseMove:fl.TouchMove)}),r,{trailing:!1})),c=[Vh("mousemove",a,i),Vh("touchmove",a,i),Vh("drag",a,i)];return Rl(()=>{c.forEach(t=>t())})}(t),n=function({mouseInteractionCb:t,doc:e,mirror:i,blockClass:s,blockSelector:r,sampling:n}){if(!1===n.mouseInteraction)return()=>{};const o=!0===n.mouseInteraction||void 0===n.mouseInteraction?{}:n.mouseInteraction,h=[];let l=null;return Object.keys(dl).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==o[t]).forEach(n=>{let o=S(n);const a=(e=>n=>{const o=Ol(n);if(el(o,s,r,!0))return;let h=null,a=e;if("pointerType"in n){switch(n.pointerType){case"mouse":h=pl.Mouse;break;case"touch":h=pl.Touch;break;case"pen":h=pl.Pen}h===pl.Touch?dl[e]===dl.MouseDown?a="TouchStart":dl[e]===dl.MouseUp&&(a="TouchEnd"):pl.Pen}else rl(n)&&(h=pl.Touch);null!==h?(l=h,(a.startsWith("Touch")&&h===pl.Touch||a.startsWith("Mouse")&&h===pl.Mouse)&&(h=null)):dl[e]===dl.Click&&(h=l,l=null);const c=rl(n)?n.changedTouches[0]:n;if(!c)return;const u=i.getId(o),{clientX:f,clientY:d}=c;Rl(t)({type:dl[a],id:u,x:f,y:d,...null!==h&&{pointerType:h}})})(n);if(window.PointerEvent)switch(dl[n]){case dl.MouseDown:case dl.MouseUp:o=o.replace("mouse","pointer");break;case dl.TouchStart:case dl.TouchEnd:return}h.push(Vh(o,a,e))}),Rl(()=>{h.forEach(t=>t())})}(t),o=El(t),h=function({viewportResizeCb:t},{win:e}){let i=-1,s=-1;return Vh("resize",Rl(Jh(Rl(()=>{const e=Qh(),r=qh();i===e&&s===r||(t({width:Number(r),height:Number(e)}),i=e,s=r)}),200)),e)}(t,{win:i}),l=function({inputCb:t,doc:e,mirror:i,blockClass:s,blockSelector:r,ignoreClass:n,ignoreSelector:o,maskInputOptions:h,maskInputFn:l,sampling:a,userTriggeredOnInput:c}){function u(t){let i=Ol(t);const a=t.isTrusted,u=i&&i.tagName;if(i&&"OPTION"===u&&(i=Uh(i)),!i||!u||Bl.indexOf(u)<0||el(i,s,r,!0))return;if(i.classList.contains(n)||o&&i.matches(o))return;let d=i.value,p=!1;const m=A(i)||"";"radio"===m||"checkbox"===m?p=i.checked:(h[u.toLowerCase()]||h[m])&&(d=I({element:i,maskInputOptions:h,tagName:u,type:m,value:d,maskInputFn:l})),f(i,c?{text:d,isChecked:p,userTriggered:a}:{text:d,isChecked:p});const g=i.name;"radio"===m&&g&&p&&e.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(t=>{if(t!==i){const e=t.value;f(t,c?{text:e,isChecked:!p,userTriggered:!1}:{text:e,isChecked:!p})}})}function f(e,s){const r=Fl.get(e);if(!r||r.text!==s.text||r.isChecked!==s.isChecked){Fl.set(e,s);const r=i.getId(e);Rl(t)({...s,id:r})}}const d=("last"===a.input?["change"]:["input","change"]).map(t=>Vh(t,Rl(u),e)),p=e.defaultView;if(!p)return()=>{d.forEach(t=>t())};const m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),g=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...g.map(t=>$h(t[0],t[1],{set(){Rl(u)({target:this,isTrusted:!1})}},!1,p))),Rl(()=>{d.forEach(t=>t())})}(t),a=function({mediaInteractionCb:t,blockClass:e,blockSelector:i,mirror:s,sampling:r,doc:n}){const o=Rl(n=>Jh(Rl(r=>{const o=Ol(r);if(!o||el(o,e,i,!0))return;const{currentTime:h,volume:l,muted:a,playbackRate:c,loop:u}=o;t({type:n,id:s.getId(o),currentTime:h,volume:l,muted:a,playbackRate:c,loop:u})}),r.media||500)),h=[Vh("play",o(gl.Play),n),Vh("pause",o(gl.Pause),n),Vh("seeked",o(gl.Seeked),n),Vh("volumechange",o(gl.VolumeChange),n),Vh("ratechange",o(gl.RateChange),n)];return Rl(()=>{h.forEach(t=>t())})}(t);let c=()=>{},u=()=>{},f=()=>{},d=()=>{};t.recordDOM&&(c=function({styleSheetRuleCb:t,mirror:e,stylesheetManager:i},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const r=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:Rl((s,r,n)=>{const[o,h]=n,{id:l,styleId:a}=Ll(r,e,i.styleMirror);return(l&&-1!==l||a&&-1!==a)&&t({id:l,styleId:a,adds:[{rule:o,index:h}]}),s.apply(r,n)})}),s.CSSStyleSheet.prototype.addRule=function(t,e,i=this.cssRules.length){const r=`${t} { ${e} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[r,i])};const n=s.CSSStyleSheet.prototype.deleteRule;let o,h;s.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:Rl((s,r,n)=>{const[o]=n,{id:h,styleId:l}=Ll(r,e,i.styleMirror);return(h&&-1!==h||l&&-1!==l)&&t({id:h,styleId:l,removes:[{index:o}]}),s.apply(r,n)})}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Rl((s,r,n)=>{const[o]=n,{id:h,styleId:l}=Ll(r,e,i.styleMirror);return(h&&-1!==h||l&&-1!==l)&&t({id:h,styleId:l,replace:o}),s.apply(r,n)})})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:Rl((s,r,n)=>{const[o]=n,{id:h,styleId:l}=Ll(r,e,i.styleMirror);return(h&&-1!==h||l&&-1!==l)&&t({id:h,styleId:l,replaceSync:o}),s.apply(r,n)})}));const l={};Wl("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Wl("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Wl("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Wl("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const a={};return Object.entries(l).forEach(([s,r])=>{a[s]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(a[s].insertRule,{apply:Rl((s,r,n)=>{const[o,h]=n,{id:l,styleId:a}=Ll(r.parentStyleSheet,e,i.styleMirror);return(l&&-1!==l||a&&-1!==a)&&t({id:l,styleId:a,adds:[{rule:o,index:[...Nl(r),h||0]}]}),s.apply(r,n)})}),r.prototype.deleteRule=new Proxy(a[s].deleteRule,{apply:Rl((s,r,n)=>{const[o]=n,{id:h,styleId:l}=Ll(r.parentStyleSheet,e,i.styleMirror);return(h&&-1!==h||l&&-1!==l)&&t({id:h,styleId:l,removes:[{index:[...Nl(r),o]}]}),s.apply(r,n)})})}),Rl(()=>{s.CSSStyleSheet.prototype.insertRule=r,s.CSSStyleSheet.prototype.deleteRule=n,o&&(s.CSSStyleSheet.prototype.replace=o),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach(([t,e])=>{e.prototype.insertRule=a[t].insertRule,e.prototype.deleteRule=a[t].deleteRule})})}(t,{win:i}),u=jl(t,t.doc),f=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:i,stylesheetManager:s},{win:r}){const n=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:Rl((r,o,h)=>{var l;const[a,c,u]=h;if(i.has(a))return n.apply(o,[a,c,u]);const{id:f,styleId:d}=Ll(null==(l=o.parentRule)?void 0:l.parentStyleSheet,e,s.styleMirror);return(f&&-1!==f||d&&-1!==d)&&t({id:f,styleId:d,set:{property:a,value:c,priority:u},index:Nl(o.parentRule)}),r.apply(o,h)})});const o=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Rl((r,n,h)=>{var l;const[a]=h;if(i.has(a))return o.apply(n,[a]);const{id:c,styleId:u}=Ll(null==(l=n.parentRule)?void 0:l.parentStyleSheet,e,s.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,remove:{property:a},index:Nl(n.parentRule)}),r.apply(n,h)})}),Rl(()=>{r.CSSStyleDeclaration.prototype.setProperty=n,r.CSSStyleDeclaration.prototype.removeProperty=o})}(t,{win:i}),t.collectFonts&&(d=function({fontCb:t,doc:e}){const i=e.defaultView;if(!i)return()=>{};const s=[],r=new WeakMap,n=i.FontFace;i.FontFace=function(t,e,i){const s=new n(t,e,i);return r.set(s,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),s};const o=Kh(e.fonts,"add",function(e){return function(i){return setTimeout(Rl(()=>{const e=r.get(i);e&&(t(e),r.delete(i))}),0),e.apply(this,[i])}});return s.push(()=>{i.FontFace=n}),s.push(o),Rl(()=>{s.forEach(t=>t())})}(t)));const p=function(t){const{doc:e,mirror:i,blockClass:s,blockSelector:r,selectionCb:n}=t;let o=!0;const h=Rl(()=>{const t=e.getSelection();if(!t||o&&(null==t?void 0:t.isCollapsed))return;o=t.isCollapsed||!1;const h=[],l=t.rangeCount||0;for(let e=0;e<l;e++){const n=t.getRangeAt(e),{startContainer:o,startOffset:l,endContainer:a,endOffset:c}=n;el(o,s,r,!0)||el(a,s,r,!0)||h.push({start:i.getId(o),startOffset:l,end:i.getId(a),endOffset:c})}n({ranges:h})});return h(),Vh("selectionchange",h)}(t),m=function({doc:t,customElementCb:e}){const i=t.defaultView;return i&&i.customElements?Kh(i.customElements,"define",function(t){return function(i,s,r){try{e({define:{name:i}})}catch(t){console.warn(`Custom element callback failed for ${i}`)}return t.apply(this,[i,s,r])}}):()=>{}}(t),g=[];for(const e of t.plugins)g.push(e.observer(e.callback,i,e.options));return Rl(()=>{Ml.forEach(t=>t.reset()),null==s||s.disconnect(),r(),n(),o(),h(),l(),a(),c(),u(),f(),d(),p(),m(),g.forEach(t=>t())})}function Ul(t){return void 0!==window[t]}function Wl(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Yl{constructor(t){i(this,"iframeIdToRemoteIdMap",new WeakMap),i(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,s){const r=i||this.getIdToRemoteIdMap(t),n=s||this.getRemoteIdToIdMap(t);let o=r.get(e);return o||(o=this.generateIdFn(),r.set(e,o),n.set(o,e)),o}getIds(t,e){const i=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,i,s))}getRemoteId(t,e,i){const s=i||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:s.get(e)||-1}getRemoteIds(t,e){const i=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,i))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class Zl{constructor(t){i(this,"iframes",new WeakMap),i(this,"crossOriginIframeMap",new WeakMap),i(this,"crossOriginIframeMirror",new Yl(L)),i(this,"crossOriginIframeStyleMirror"),i(this,"crossOriginIframeRootIdMap",new WeakMap),i(this,"mirror"),i(this,"mutationCb"),i(this,"wrappedEmit"),i(this,"loadListener"),i(this,"stylesheetManager"),i(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Yl(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var i,s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(i=t.contentWindow)||i.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const s=this.transformCrossOriginEvent(i,e.data.event);s&&this.wrappedEmit(s,e.data.isCheckout)}transformCrossOriginEvent(t,e){var i;switch(e.type){case ul.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),{timestamp:e.timestamp,type:ul.IncrementalSnapshot,data:{source:fl.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ul.Meta:case ul.Load:case ul.DomContentLoaded:return!1;case ul.Plugin:return e;case ul.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case ul.IncrementalSnapshot:switch(e.data.source){case fl.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(e.node,i)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case fl.Drag:case fl.TouchMove:case fl.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case fl.ViewportResize:return!1;case fl.MediaInteraction:case fl.MouseInteraction:case fl.Scroll:case fl.CanvasMutation:case fl.Input:return this.replaceIds(e.data,t,["id"]),e;case fl.StyleSheetRule:case fl.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case fl.Font:return e;case fl.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case fl.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(i=e.data.styles)||i.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,i,s){for(const r of s)(Array.isArray(e[r])||"number"==typeof e[r])&&(Array.isArray(e[r])?e[r]=t.getIds(i,e[r]):e[r]=t.getId(i,e[r]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===wl.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class Pl{constructor(t){i(this,"shadowDoms",new WeakSet),i(this,"mutationCb"),i(this,"scrollCb"),i(this,"bypassOptions"),i(this,"mirror"),i(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(!y(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const i=Tl({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(El({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(Ph(t))),this.restoreHandlers.push(jl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const i=this;this.restoreHandlers.push(Kh(t.prototype,"attachShadow",function(t){return function(s){const r=t.call(this,s),n=Gh(this);return n&&cl(this)&&i.addShadowRoot(n,e),r}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Gl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),zl=0;zl<64;zl++)Vl[Gl.charCodeAt(zl)]=zl;const Xl=new Map,Jl=(t,e,i)=>{if(!t||!_l(t,e)&&"object"!=typeof t)return;const s=function(t,e){let i=Xl.get(t);return i||(i=new Map,Xl.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(i,t.constructor.name);let r=s.indexOf(t);return-1===r&&(r=s.length,s.push(t)),r};function $l(t,e,i){if(t instanceof Array)return t.map(t=>$l(t,e,i));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,i=new Uint8Array(t),s=i.length,r="";for(e=0;e<s;e+=3)r+=Gl[i[e]>>2],r+=Gl[(3&i[e])<<4|i[e+1]>>4],r+=Gl[(15&i[e+1])<<2|i[e+2]>>6],r+=Gl[63&i[e+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[$l(t.buffer,e,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:i}=t;return{rr_type:e,src:i}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[$l(t.data,e,i),t.width,t.height]}:_l(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Jl(t,e,i)}:t}const Kl=(t,e,i)=>t.map(t=>$l(t,e,i)),_l=(t,e)=>{const i=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(i.find(i=>t instanceof e[i]))};function Hl(t,e,i,s){const r=[];try{const n=Kh(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(r,...n){if(!el(this,e,i,!0)){const t=function(t){return"experimental-webgl"===t?"webgl":t}(r);if("i"in this||(this.i=t),s&&["webgl","webgl2"].includes(t))if(n[0]&&"object"==typeof n[0]){const t=n[0];t.preserveDrawingBuffer||(t.preserveDrawingBuffer=!0)}else n.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[r,...n])}});r.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(t=>t())}}function Ql(t,e,i,s,r,n){const o=[],h=Object.getOwnPropertyNames(t);for(const l of h)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof t[l])continue;const h=Kh(t,l,function(t){return function(...o){const h=t.apply(this,o);if(Jl(h,n,this),"tagName"in this.canvas&&!el(this.canvas,s,r,!0)){const t=Kl(o,n,this),s={type:e,property:l,args:t};i(this.canvas,s)}return h}});o.push(h)}catch{const s=$h(t,l,{set(t){i(this.canvas,{type:e,property:l,args:[t],setter:!0})}});o.push(s)}return o}const ql="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ta="undefined"!=typeof window&&window.Blob&&new Blob([(ea=ql,Uint8Array.from(atob(ea),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var ea;function ia(t){let e;try{if(e=ta&&(window.URL||window.webkitURL).createObjectURL(ta),!e)throw"";const i=new Worker(e,{name:null==t?void 0:t.name});return i.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),i}catch(e){return new Worker("data:text/javascript;base64,"+ql,{name:null==t?void 0:t.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class sa{constructor(t){i(this,"pendingCanvasMutations",new Map),i(this,"rafStamps",{latestId:0,invokeId:null}),i(this,"mirror"),i(this,"mutationCb"),i(this,"resetObservers"),i(this,"frozen",!1),i(this,"locked",!1),i(this,"processMutation",(t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});const{sampling:e="all",win:s,blockClass:r,blockSelector:n,recordCanvas:o,dataURLOptions:h}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&"all"===e&&this.initCanvasMutationObserver(s,r,n),o&&"number"==typeof e&&this.initCanvasFPSObserver(e,s,r,n,{dataURLOptions:h})}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(t,e,i,s,r){const n=Hl(e,i,s,!0),o=new Map,h=new ia;h.onmessage=t=>{const{id:e}=t.data;if(o.set(e,!1),!("base64"in t.data))return;const{base64:i,type:s,width:r,height:n}=t.data;this.mutationCb({id:e,type:ml["2D"],commands:[{property:"clearRect",args:[0,0,r,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:s}]},0,0]}]})};const l=1e3/t;let a,c=0;const u=t=>{c&&t-c<l||(c=t,(()=>{const t=[];return e.document.querySelectorAll("canvas").forEach(e=>{el(e,i,s,!0)||t.push(e)}),t})().forEach(async t=>{var e;const i=this.mirror.getId(t);if(o.get(i))return;if(0===t.width||0===t.height)return;if(o.set(i,!0),["webgl","webgl2"].includes(t.i)){const i=t.getContext(t.i);!1===(null==(e=null==i?void 0:i.getContextAttributes())?void 0:e.preserveDrawingBuffer)&&i.clear(i.COLOR_BUFFER_BIT)}const s=await createImageBitmap(t);h.postMessage({id:i,bitmap:s,width:t.width,height:t.height,dataURLOptions:r.dataURLOptions},[s])})),a=requestAnimationFrame(u)};a=requestAnimationFrame(u),this.resetObservers=()=>{n(),cancelAnimationFrame(a)}}initCanvasMutationObserver(t,e,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Hl(t,e,i,!1),r=function(t,e,i,s){const r=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])continue;const n=Kh(e.CanvasRenderingContext2D.prototype,o,function(r){return function(...n){return el(this.canvas,i,s,!0)||setTimeout(()=>{const i=Kl(n,e,this);t(this.canvas,{type:ml["2D"],property:o,args:i})},0),r.apply(this,n)}});r.push(n)}catch{const i=$h(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:ml["2D"],property:o,args:[e],setter:!0})}});r.push(i)}return()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i),n=function(t,e,i,s){const r=[];return r.push(...Ql(e.WebGLRenderingContext.prototype,ml.WebGL,t,i,s,e)),void 0!==e.WebGL2RenderingContext&&r.push(...Ql(e.WebGL2RenderingContext.prototype,ml.WebGL2,t,i,s,e)),()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i);this.resetObservers=()=>{s(),r(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(t);if(!i||-1===e)return;const s=i.map(t=>{const{type:e,...i}=t;return i}),{type:r}=i[0];this.mutationCb({id:e,type:r,commands:s}),this.pendingCanvasMutations.delete(t)}}class ra{constructor(t){i(this,"trackedLinkElements",new WeakSet),i(this,"mutationCb"),i(this,"adoptedStyleSheetCb"),i(this,"styleMirror",new ll),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"t"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const i={id:e,styleIds:[]},s=[];for(const e of t){let t;this.styleMirror.has(e)?t=this.styleMirror.getId(e):(t=this.styleMirror.add(e),s.push({styleId:t,rules:Array.from(e.rules||CSSRule,(t,i)=>({rule:v(t,e.href),index:i}))})),i.styleIds.push(t)}s.length>0&&(i.styles=s),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class na{constructor(){i(this,"nodeMap",new WeakMap),i(this,"active",!1)}inOtherBuffer(t,e){const i=this.nodeMap.get(t);return i&&Array.from(i).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}let oa,ha,la,aa=!1;try{if(2!==Array.from([1],t=>2*t)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(t=e.contentWindow)?void 0:t.Array.from)||Array.from,document.body.removeChild(e)}}catch(t){console.debug("Unable to override Array.from",t)}const ca=new C;function ua(t={}){const{emit:e,checkoutEveryNms:i,checkoutEveryNth:s,blockClass:r="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:h=null,maskTextClass:l="rr-mask",maskTextSelector:a=null,inlineStylesheet:c=!0,maskAllInputs:u,maskInputOptions:f,slimDOMOptions:d,maskInputFn:p,maskTextFn:m,hooks:g,packFn:w,sampling:y={},dataURLOptions:b={},mousemoveWait:v,recordDOM:I=!0,recordCanvas:S=!1,recordCrossOriginIframes:k=!1,recordAfter:A=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:R=!1,inlineImages:M=!1,plugins:O,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:E=new Set([]),errorHandler:B}=t;xl=B;const F=!k||window.parent===window;let N=!1;if(!F)try{window.parent.document&&(N=!1)}catch(t){N=!0}if(F&&!e)throw new Error("emit function is required");if(!F&&!N)return()=>{};void 0!==v&&void 0===y.mousemove&&(y.mousemove=v),ca.reset();const L=!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!==f?f:{password:!0},j=!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 D;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let U=0;const W=t=>{for(const e of O||[])e.eventProcessor&&(t=e.eventProcessor(t));return w&&!N&&(t=w(t)),t};oa=(t,r)=>{var n;const o=t;if(o.timestamp=_h(),!(null==(n=Ml[0])?void 0:n.isFrozen())||o.type===ul.FullSnapshot||o.type===ul.IncrementalSnapshot&&o.data.source===fl.Mutation||Ml.forEach(t=>t.unfreeze()),F)null==e||e(W(o),r);else if(N){const t={type:"rrweb",event:W(o),origin:window.location.origin,isCheckout:r};window.parent.postMessage(t,"*")}if(o.type===ul.FullSnapshot)D=o,U=0;else if(o.type===ul.IncrementalSnapshot){if(o.data.source===fl.Mutation&&o.data.isAttachIframe)return;U++;const t=s&&U>=s,e=i&&o.timestamp-D.timestamp>i;(t||e)&&ha(!0)}};const Y=t=>{oa({type:ul.IncrementalSnapshot,data:{source:fl.Mutation,...t}})},Z=t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.Scroll,...t}}),P=t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.CanvasMutation,...t}}),G=new ra({mutationCb:Y,adoptedStyleSheetCb:t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.AdoptedStyleSheet,...t}})}),V=new Zl({mirror:ca,mutationCb:Y,stylesheetManager:G,recordCrossOriginIframes:k,wrappedEmit:oa});for(const t of O||[])t.getMirror&&t.getMirror({nodeMirror:ca,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});const z=new na;la=new sa({recordCanvas:S,mutationCb:P,win:window,blockClass:r,blockSelector:n,mirror:ca,sampling:y.canvas,dataURLOptions:b});const X=new Pl({mutationCb:Y,scrollCb:Z,bypassOptions:{blockClass:r,blockSelector:n,maskTextClass:l,maskTextSelector:a,inlineStylesheet:c,maskInputOptions:L,dataURLOptions:b,maskTextFn:m,maskInputFn:p,recordCanvas:S,inlineImages:M,sampling:y,slimDOMOptions:j,iframeManager:V,stylesheetManager:G,canvasManager:la,keepIframeSrcFn:T,processedNodeManager:z},mirror:ca});ha=(t=!1)=>{if(!I)return;oa({type:ul.Meta,data:{href:window.location.href,width:qh(),height:Qh()}},t),G.reset(),X.init(),Ml.forEach(t=>t.lock());const e=function(t,e){const{mirror:i=new C,blockClass:s="rr-block",blockSelector:r=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:h=!0,inlineImages:l=!1,recordCanvas:a=!1,maskAllInputs:c=!1,maskTextFn:u,maskInputFn:f,slimDOM:d=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:I=()=>!1}=e||{};return $(t,{doc:t,mirror:i,blockClass:s,blockSelector:r,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===c?{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===c?{password:!0}:c,maskTextFn:u,maskInputFn:f,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:p,inlineImages:l,recordCanvas:a,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:ca,blockClass:r,blockSelector:n,maskTextClass:l,maskTextSelector:a,inlineStylesheet:c,maskAllInputs:L,maskTextFn:m,maskInputFn:p,slimDOM:j,dataURLOptions:b,recordCanvas:S,inlineImages:M,onSerialize:t=>{nl(t,ca)&&V.addIframe(t),ol(t,ca)&&G.trackLinkElement(t),hl(t)&&X.addShadowRoot(Gh(t),document)},onIframeLoad:(t,e)=>{V.attachIframe(t,e),X.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{G.attachLinkElement(t,e)},keepIframeSrcFn:T});if(!e)return console.warn("Failed to snapshot the document");oa({type:ul.FullSnapshot,data:{node:e,initialOffset:Hh(window)}},t),Ml.forEach(t=>t.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,ca.getId(document))};try{const t=[],e=t=>{var e;return Rl(Dl)({mutationCb:Y,mousemoveCb:(t,e)=>oa({type:ul.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.MouseInteraction,...t}}),scrollCb:Z,viewportResizeCb:t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.ViewportResize,...t}}),inputCb:t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.Input,...t}}),mediaInteractionCb:t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.MediaInteraction,...t}}),styleSheetRuleCb:t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.StyleSheetRule,...t}}),styleDeclarationCb:t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.StyleDeclaration,...t}}),canvasMutationCb:P,fontCb:t=>oa({type:ul.IncrementalSnapshot,data:{source:fl.Font,...t}}),selectionCb:t=>{oa({type:ul.IncrementalSnapshot,data:{source:fl.Selection,...t}})},customElementCb:t=>{oa({type:ul.IncrementalSnapshot,data:{source:fl.CustomElement,...t}})},blockClass:r,ignoreClass:o,ignoreSelector:h,maskTextClass:l,maskTextSelector:a,maskInputOptions:L,inlineStylesheet:c,sampling:y,recordDOM:I,recordCanvas:S,inlineImages:M,userTriggeredOnInput:x,collectFonts:R,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:T,blockSelector:n,slimDOMOptions:j,dataURLOptions:b,mirror:ca,iframeManager:V,stylesheetManager:G,shadowDomManager:X,processedNodeManager:z,canvasManager:la,ignoreCSSAttributes:E,plugins:(null==(e=null==O?void 0:O.filter(t=>t.observer))?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>oa({type:ul.Plugin,data:{plugin:t.name,payload:e}})})))||[]},g)};V.addLoadListener(i=>{try{t.push(e(i.contentDocument))}catch(t){console.warn(t)}});const i=()=>{ha(),t.push(e(document)),aa=!0};return"interactive"===document.readyState||"complete"===document.readyState?i():(t.push(Vh("DOMContentLoaded",()=>{oa({type:ul.DomContentLoaded,data:{}}),"DOMContentLoaded"===A&&i()})),t.push(Vh("load",()=>{oa({type:ul.Load,data:{}}),"load"===A&&i()},window))),()=>{t.forEach(t=>t()),z.destroy(),aa=!1,xl=void 0}}catch(t){console.warn(t)}}var fa,da;ua.addCustomEvent=(t,e)=>{if(!aa)throw new Error("please add custom event after start recording");oa({type:ul.Custom,data:{tag:t,payload:e}})},ua.freezePage=()=>{Ml.forEach(t=>t.freeze())},ua.takeFullSnapshot=t=>{if(!aa)throw new Error("please take full snapshot after start recording");ha(t)},ua.mirror=ca,(da=fa||(fa={}))[da.NotStarted=0]="NotStarted",da[da.Running=1]="Running",da[da.Stopped=2]="Stopped";const{addCustomEvent:pa}=ua,{freezePage:ma}=ua,{takeFullSnapshot:ga}=ua;export{ul as EventType,fl as IncrementalSource,dl as MouseInteractions,pa as addCustomEvent,ma as freezePage,Xh as mirror,ua as record,ga as takeFullSnapshot};
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Zaplier SDK v3.0.0 - Unified SDK
3
+ * Advanced privacy-first tracking with code splitting
4
+ * (c) 2026 Zaplier Team
5
+ */
6
+ class t{constructor(t,i,s={}){this.events=[],this.isActive=!1,this.isPaused=!1,this.lastActivityTime=Date.now(),this.sessionStartTime=Date.now(),this.boundOnActivity=null,this.sessionId=t,this.visitorId=i,this.config={enabled:!0,sampleRate:1,batchInterval:1e4,inactivityTimeout:3e4,pauseOnInactive:!0,...s}}async start(){if(!this.config.enabled||this.isActive)return!1;if(Math.random()>this.config.sampleRate)return!1;try{const{record:t}=await import("./rrweb-CUXM0llf.min.js");return this.rrwebStopRecord=t({emit:t=>{this.onActivity(),this.isPaused||this.events.push(t)}}),this.isActive=!0,this.startBatchTimer(),this.startInactivityTracking(),!0}catch(t){return console.error("[Zaplier] Failed to start rrweb recording:",t),!1}}stop(){this.isActive&&(this.isActive=!1,this.rrwebStopRecord&&(this.rrwebStopRecord(),this.rrwebStopRecord=void 0),this.batchTimer&&(clearInterval(this.batchTimer),this.batchTimer=void 0),this.inactivityTimer&&(clearTimeout(this.inactivityTimer),this.inactivityTimer=void 0),this.boundOnActivity&&(["mousedown","mousemove","keypress","scroll","touchstart","click"].forEach(t=>{document.removeEventListener(t,this.boundOnActivity,!0)}),this.boundOnActivity=null),this.sendBatch())}startBatchTimer(){this.batchTimer=window.setInterval(()=>{this.sendBatch()},this.config.batchInterval)}sendBatch(){if(!this.sdkInstance)return void(this.config.pauseOnInactive&&this.events.length>0&&console.warn("[Zaplier] Replay: SDK instance not ready, holding batch"));if(0===this.events.length)return;const t={sessionId:this.sessionId,visitorId:this.visitorId,events:[...this.events],metadata:{userAgent:navigator.userAgent,timestamp:Date.now(),startUrl:window.location.href,duration:Date.now()-this.sessionStartTime,activeTime:this.getActiveTime(),funnelSteps:[],hasConversion:!1,eventsCount:this.events.length,isPaused:this.isPaused}};this.events=[],t.events.length,this.sendToBackend(t)}setSDKInstance(t){this.sdkInstance=t}async sendToBackend(t){try{if(!this.sdkInstance)return void console.error("[Zaplier] No SDK instance available for replay transport");const i=await this.sdkInstance.sendReplayBatch(t);i&&i.success||console.error("[Zaplier] Session replay batch failed:",i)}catch(t){console.error("[Zaplier] Session replay error:",t)}}getEventCount(){return this.events.length}isRecording(){return this.isActive}isPausedState(){return this.isPaused}startInactivityTracking(){this.config.pauseOnInactive&&(this.boundOnActivity=this.onActivity.bind(this),["mousedown","mousemove","keypress","scroll","touchstart","click"].forEach(t=>{document.addEventListener(t,this.boundOnActivity,!0)}),this.resetInactivityTimer())}onActivity(){this.lastActivityTime=Date.now(),this.isPaused&&this.resume(),this.resetInactivityTimer()}resetInactivityTimer(){this.inactivityTimer&&clearTimeout(this.inactivityTimer),this.inactivityTimer=window.setTimeout(()=>{this.pauseForInactivity()},this.config.inactivityTimeout)}pauseForInactivity(){this.isPaused||(this.isPaused=!0)}resume(){this.isPaused&&(this.isPaused=!1)}getActiveTime(){return Date.now()-this.sessionStartTime}getVisitorId(){return this.visitorId}}export{t as SessionReplayEngine};
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Zaplier SDK v3.0.0 - Unified SDK
3
+ * Advanced privacy-first tracking with code splitting
4
+ * (c) 2026 Zaplier Team
5
+ */
6
+ import{g as e}from"./core-C742iEqG.min.js";const t={session:"__zp_s",visitor:"__zp_v",device:"__zp_d",prefs:"__zp_p",analytics:"__zp_a"};class n{static setLocal(e,t){try{if("undefined"!=typeof window&&window.localStorage)return localStorage.setItem(e,t),!0}catch(e){}return!1}static getLocal(e){try{if("undefined"!=typeof window&&window.localStorage)return localStorage.getItem(e)}catch(e){}return null}static setSession(e,t){try{if("undefined"!=typeof window&&window.sessionStorage)return sessionStorage.setItem(e,t),!0}catch(e){}return!1}static getSession(e){try{if("undefined"!=typeof window&&window.sessionStorage)return sessionStorage.getItem(e)}catch(e){}return null}static setCookie(e,t,n=365){try{if("undefined"!=typeof document){const s=new Date(Date.now()+24*n*60*60*1e3).toUTCString();return document.cookie=`${e}=${t}; expires=${s}; path=/; SameSite=Lax`,!0}}catch(e){}return!1}static getCookie(e){try{if("undefined"!=typeof document){const t=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let e=0;e<n.length;e++){let s=n[e];if(s){for(;" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(t))return s.substring(t.length,s.length)}}}}catch(e){}return null}static setMemory(e,t){return this.memoryStore.set(e,t),!0}static getMemory(e){return this.memoryStore.get(e)||null}static get(e){let t=this.getLocal(e);return t?{value:t,method:"localStorage"}:(t=this.getSession(e),t?{value:t,method:"sessionStorage"}:(t=this.getCookie(e),t?{value:t,method:"cookie"}:(t=this.getMemory(e),t?{value:t,method:"memory"}:{value:null,method:"none"})))}static set(e,t){return this.setLocal(e,t)?{success:!0,method:"localStorage"}:this.setSession(e,t)?{success:!0,method:"sessionStorage"}:this.setCookie(e,t)?{success:!0,method:"cookie"}:(this.setMemory(e,t),{success:!0,method:"memory"})}}n.memoryStore=new Map;class s{generateSessionId(){const{value:s}=n.get(t.prefs);if(s)try{const t=JSON.parse(s);if(t.t&&!0===t.o)return e(t.t)}catch(e){}const o="temp-"+Date.now().toString(36);return e(o)}createCamouflageData(e,t,n,s=!1){return{theme:"auto",lang:(navigator.language||"en-US").substring(0,2),tz:Intl.DateTimeFormat().resolvedOptions().timeZone,analytics:!0,cookies:!0,t:e,i:t,u:n,o:!!s||void 0,ts:Date.now()}}extractFromCamouflage(e){try{const t=JSON.parse(e);if(t.t&&t.i&&t.u&&!0===t.o)return{visitorId:t.t,sessionId:t.i,stableCoreHash:t.u,persistenceMethod:"localStorage",confidence:.95,createdAt:t.ts||Date.now(),lastSeen:Date.now(),reused:!0};if(t.t&&!t.o)return null}catch(e){}return null}async getOrCreateVisitorIdentity(e){const{stableCoreHash:s}=e,{value:o,method:r}=n.get(t.prefs);if(o){const e=this.extractFromCamouflage(o);if(e&&e.stableCoreHash===s&&e.visitorId){const o=this.createCamouflageData(e.visitorId,e.sessionId,s);return n.set(t.prefs,JSON.stringify(o)),{...e,persistenceMethod:r,lastSeen:Date.now(),reused:!0}}}return{sessionId:e.sessionId||this.generateSessionId(),stableCoreHash:s,deviceFingerprint:e.deviceFingerprint,persistenceMethod:"memory",confidence:.9,createdAt:Date.now(),lastSeen:Date.now(),reused:!1,pendingBackendResponse:!0}}async updateVisitorIdFromBackend(s,o,r){try{let i=r||this.getCurrentSessionId();i&&!i.includes("temp-")||(i=e(s));const a=this.createCamouflageData(s,i,o,!0),{success:c,method:u}=n.set(t.prefs,JSON.stringify(a));return!!c&&(n.set(t.device,o),!0)}catch(e){return console.error("[VisitorIdentityManager] Failed to update visitor ID from backend:",e),!1}}getCurrentSessionId(){const{value:e}=n.get(t.prefs);if(e){const t=this.extractFromCamouflage(e);return(null==t?void 0:t.sessionId)||null}return null}getCurrentVisitorId(){const{value:e}=n.get(t.prefs);if(e){const t=this.extractFromCamouflage(e);return(null==t?void 0:t.visitorId)||null}return null}clearIdentity(){try{for(const e of Object.values(t)){try{"undefined"!=typeof window&&window.localStorage&&localStorage.removeItem(e)}catch{}try{"undefined"!=typeof window&&window.sessionStorage&&sessionStorage.removeItem(e)}catch{}}n.setCookie(t.prefs,"",-1),n.setCookie(t.device,"",-1)}catch(e){}}}export{s as VisitorIdentityManager};
@@ -3,4 +3,4 @@
3
3
  * Advanced privacy-first tracking with code splitting
4
4
  * (c) 2026 Zaplier Team
5
5
  */
6
- export{Z as ZaplierCore,Z as default,i as initZaplier,a as initZaplierCore}from"./chunks/core-BTl6GQvU.min.js";
6
+ export{Z as ZaplierCore,Z as default,i as initZaplier,a as initZaplierCore}from"./chunks/core-C742iEqG.min.js";
@@ -3,4 +3,4 @@
3
3
  * Advanced privacy-first tracking with code splitting
4
4
  * (c) 2026 Zaplier Team
5
5
  */
6
- class t{constructor(t,i,s={}){this.events=[],this.isActive=!1,this.isPaused=!1,this.lastActivityTime=Date.now(),this.sessionStartTime=Date.now(),this.boundOnActivity=null,this.sessionId=t,this.visitorId=i,this.config={enabled:!0,sampleRate:1,batchInterval:1e4,inactivityTimeout:3e4,pauseOnInactive:!0,...s}}async start(){if(!this.config.enabled||this.isActive)return!1;if(Math.random()>this.config.sampleRate)return!1;try{const{record:t}=await import("rrweb");return this.rrwebStopRecord=t({emit:t=>{this.onActivity(),this.isPaused||this.events.push(t)}}),this.isActive=!0,this.startBatchTimer(),this.startInactivityTracking(),!0}catch(t){return!1}}stop(){this.isActive&&(this.isActive=!1,this.rrwebStopRecord&&(this.rrwebStopRecord(),this.rrwebStopRecord=void 0),this.batchTimer&&(clearInterval(this.batchTimer),this.batchTimer=void 0),this.inactivityTimer&&(clearTimeout(this.inactivityTimer),this.inactivityTimer=void 0),this.boundOnActivity&&(["mousedown","mousemove","keypress","scroll","touchstart","click"].forEach(t=>{document.removeEventListener(t,this.boundOnActivity,!0)}),this.boundOnActivity=null),this.sendBatch())}startBatchTimer(){this.batchTimer=window.setInterval(()=>{this.sendBatch()},this.config.batchInterval)}sendBatch(){if(!this.sdkInstance)return void(this.config.pauseOnInactive&&this.events.length);if(0===this.events.length)return;const t={sessionId:this.sessionId,visitorId:this.visitorId,events:[...this.events],metadata:{userAgent:navigator.userAgent,timestamp:Date.now(),startUrl:window.location.href,duration:Date.now()-this.sessionStartTime,activeTime:this.getActiveTime(),funnelSteps:[],hasConversion:!1,eventsCount:this.events.length,isPaused:this.isPaused}};this.events=[],this.sendToBackend(t)}setSDKInstance(t){this.sdkInstance=t}async sendToBackend(t){try{if(!this.sdkInstance)return;const i=await this.sdkInstance.sendReplayBatch(t);i&&i.success}catch(t){}}getEventCount(){return this.events.length}isRecording(){return this.isActive}isPausedState(){return this.isPaused}startInactivityTracking(){this.config.pauseOnInactive&&(this.boundOnActivity=this.onActivity.bind(this),["mousedown","mousemove","keypress","scroll","touchstart","click"].forEach(t=>{document.addEventListener(t,this.boundOnActivity,!0)}),this.resetInactivityTimer())}onActivity(){this.lastActivityTime=Date.now(),this.isPaused&&this.resume(),this.resetInactivityTimer()}resetInactivityTimer(){this.inactivityTimer&&clearTimeout(this.inactivityTimer),this.inactivityTimer=window.setTimeout(()=>{this.pauseForInactivity()},this.config.inactivityTimeout)}pauseForInactivity(){this.isPaused||(this.isPaused=!0)}resume(){this.isPaused&&(this.isPaused=!1)}getActiveTime(){return Date.now()-this.sessionStartTime}getVisitorId(){return this.visitorId}}export{t as SessionReplayEngine};
6
+ class t{constructor(t,i,s={}){this.events=[],this.isActive=!1,this.isPaused=!1,this.lastActivityTime=Date.now(),this.sessionStartTime=Date.now(),this.boundOnActivity=null,this.sessionId=t,this.visitorId=i,this.config={enabled:!0,sampleRate:1,batchInterval:1e4,inactivityTimeout:3e4,pauseOnInactive:!0,...s}}async start(){if(!this.config.enabled||this.isActive)return!1;if(Math.random()>this.config.sampleRate)return!1;try{const{record:t}=await import("./rrweb-CZOCorIZ.js");return this.rrwebStopRecord=t({emit:t=>{this.onActivity(),this.isPaused||this.events.push(t)}}),this.isActive=!0,this.startBatchTimer(),this.startInactivityTracking(),!0}catch(t){return!1}}stop(){this.isActive&&(this.isActive=!1,this.rrwebStopRecord&&(this.rrwebStopRecord(),this.rrwebStopRecord=void 0),this.batchTimer&&(clearInterval(this.batchTimer),this.batchTimer=void 0),this.inactivityTimer&&(clearTimeout(this.inactivityTimer),this.inactivityTimer=void 0),this.boundOnActivity&&(["mousedown","mousemove","keypress","scroll","touchstart","click"].forEach(t=>{document.removeEventListener(t,this.boundOnActivity,!0)}),this.boundOnActivity=null),this.sendBatch())}startBatchTimer(){this.batchTimer=window.setInterval(()=>{this.sendBatch()},this.config.batchInterval)}sendBatch(){if(!this.sdkInstance)return void(this.config.pauseOnInactive&&this.events.length);if(0===this.events.length)return;const t={sessionId:this.sessionId,visitorId:this.visitorId,events:[...this.events],metadata:{userAgent:navigator.userAgent,timestamp:Date.now(),startUrl:window.location.href,duration:Date.now()-this.sessionStartTime,activeTime:this.getActiveTime(),funnelSteps:[],hasConversion:!1,eventsCount:this.events.length,isPaused:this.isPaused}};this.events=[],this.sendToBackend(t)}setSDKInstance(t){this.sdkInstance=t}async sendToBackend(t){try{if(!this.sdkInstance)return;const i=await this.sdkInstance.sendReplayBatch(t);i&&i.success}catch(t){}}getEventCount(){return this.events.length}isRecording(){return this.isActive}isPausedState(){return this.isPaused}startInactivityTracking(){this.config.pauseOnInactive&&(this.boundOnActivity=this.onActivity.bind(this),["mousedown","mousemove","keypress","scroll","touchstart","click"].forEach(t=>{document.addEventListener(t,this.boundOnActivity,!0)}),this.resetInactivityTimer())}onActivity(){this.lastActivityTime=Date.now(),this.isPaused&&this.resume(),this.resetInactivityTimer()}resetInactivityTimer(){this.inactivityTimer&&clearTimeout(this.inactivityTimer),this.inactivityTimer=window.setTimeout(()=>{this.pauseForInactivity()},this.config.inactivityTimeout)}pauseForInactivity(){this.isPaused||(this.isPaused=!0)}resume(){this.isPaused&&(this.isPaused=!1)}getActiveTime(){return Date.now()-this.sessionStartTime}getVisitorId(){return this.visitorId}}export{t as SessionReplayEngine};
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Zaplier SDK v3.0.0 - Unified SDK
3
+ * Advanced privacy-first tracking with code splitting
4
+ * (c) 2026 Zaplier Team
5
+ */
6
+ var e,t=Object.defineProperty,r=(e,r,s)=>((e,r,s)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s)(e,"symbol"!=typeof r?r+"":r,s),s=Object.defineProperty,n=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),o=(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))(o||{});const i={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},a={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},l={};function c(e){if(l[e])return l[e];const t=globalThis[e],r=t.prototype,s=e in i?i[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),o=e in a?a[e]:void 0,c=Boolean(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&c&&!globalThis.Zone)return l[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?l[e]=o:r}catch{return r}}const h={};function u(e,t,r){var s;const n=`${e}.${String(r)}`;if(h[n])return h[n].call(t);const o=c(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(h[n]=i,i.call(t)):t[r]}const p=function(e){return u("Node",e,"childNodes")},d=function(e){return u("Node",e,"parentNode")},f=function(e){return u("Node",e,"parentElement")},m=function(e){return u("Node",e,"textContent")},g=function(e){return e&&"host"in e?u("ShadowRoot",e,"host"):null},y=function(e){return e&&"shadowRoot"in e?u("Element",e,"shadowRoot"):null};function w(e){return e.nodeType===e.ELEMENT_NODE}function b(e){const t=e&&"host"in e&&"mode"in e&&g(e)||null;return Boolean(t&&"shadowRoot"in t&&y(t)===e)}function S(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function C(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);return(t=Array.from(r,e=>v(e,s)).join("")).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(e){return null}var t}function v(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=C(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?L(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=r.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?L(r,t):r}}class I{constructor(){n(this,"idNodeMap",new Map),n(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-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 r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function k({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let i=n||"";const a=s&&x(s);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function x(e){return e.toLowerCase()}const O="__rrweb_original__";function M(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?x(t):null}function A(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const R=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,E=/^(?:[a-z+]+:)?\/\//i,T=/^www\..*/i,N=/^(data:)([^,]*),(.*)/i;function L(e,t){return(e||"").replace(R,(e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(E.test(a)||T.test(a))return`url(${l}${a}${l})`;if(N.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 e of h)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`})}function D(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}let P=1;const F=new RegExp("[^a-z0-9-_:]");function B(){return P++}let _,U;const z=/^[^ \t\n\r\u000c]+/,W=/^[, \t\n\r\u000c]+/,j=new WeakMap;function V(e,t){return t&&""!==t.trim()?G(e,t):t}function G(e,t){let r=j.get(e);if(r||(r=e.createElement("a"),j.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Y(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?V(e,s):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(W),!(r>=t.length);){let o=s(z);if(","===o.slice(-1))o=V(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=V(e,o);let i=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((o+s).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){r+=1,n.push((o+s).trim());break}"("===e&&(i=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?L(s,G(e)):"object"===t&&"data"===r?V(e,s):s:V(e,s):s}function Z(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function J(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&J(d(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&J(d(e),t,r)}function X(e,t,r,s){let n;if(w(e)){if(n=e,!p(n).length)return!1}else{if(null===f(e))return!1;n=f(e)}try{if("string"==typeof t){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(J(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function H(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:a,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:h,maskInputFn:u,dataURLOptions:p={},inlineImages:g,recordCanvas:y,keepIframeSrcFn:w,newlyAddedElement:b=!1,cssCaptured:S=!1}=t,v=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:o.Document,childNodes:[],compatMode:e.compatMode}:{type:o.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:o.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:i,maskInputOptions:a={},maskInputFn:l,dataURLOptions:c={},inlineImages:h,recordCanvas:u,keepIframeSrcFn:p,newlyAddedElement:d=!1,rootId:f}=t,m=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),g=function(e){if(e instanceof HTMLFormElement)return"form";const t=x(e.tagName);return F.test(t)?"div":t}(e);let y={};const w=e.attributes.length;for(let t=0;t<w;t++){const s=e.attributes[t];Z(g,s.name,s.value)||(y[s.name]=Y(r,g,x(s.name),s.value))}if("link"===g&&i){const t=Array.from(r.styleSheets).find(t=>t.href===e.href);let s=null;t&&(s=C(t)),s&&(delete y.rel,delete y.href,y._cssText=s)}if("style"===g&&e.sheet){let t=C(e.sheet);t&&(e.childNodes.length>1&&(t=function(e,t){return function(e,t){const r=Array.from(t.childNodes),s=[];if(r.length>1&&e&&"string"==typeof e){const t=D(e);for(let n=1;n<r.length;n++)if(r[n].textContent&&"string"==typeof r[n].textContent){const o=D(r[n].textContent);for(let r=3;r<o.length;r++){const n=o.substring(0,r);if(2===t.split(n).length){const r=t.indexOf(n);for(let t=r;t<e.length;t++)if(D(e.substring(0,t)).length===r){s.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return s.push(e),s}(e,t).join("/* rr_split */")}(t,e)),y._cssText=t)}if("input"===g||"textarea"===g||"select"===g){const t=e.value,r=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&t?y.value=k({element:e,type:M(e),tagName:g,value:t,maskInputOptions:a,maskInputFn:l}):r&&(y.checked=r)}if("option"===g&&(e.selected&&!a.select?y.selected=!0:delete y.selected),"dialog"===g&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===g&&u)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let s=0;s<e.height;s+=50){const n=t.getImageData,o=O in n?n[O]:n;if(new Uint32Array(o.call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const t=e.toDataURL(c.type,c.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height,t!==s.toDataURL(c.type,c.quality)&&(y.rr_dataURL=t)}if("img"===g&&h){_||(_=r.createElement("canvas"),U=_.getContext("2d"));const t=e,s=(t.currentSrc||t.getAttribute("src"),t.crossOrigin),n=()=>{t.removeEventListener("load",n);try{_.width=t.naturalWidth,_.height=t.naturalHeight,U.drawImage(t,0,0),y.rr_dataURL=_.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?n():t.addEventListener("load",n))}"anonymous"===t.crossOrigin&&(s?y.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?n():t.addEventListener("load",n)}if("audio"===g||"video"===g){const t=y;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}if(d||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),m){const{width:t,height:r}=e.getBoundingClientRect();y={class:y.class,rr_width:`${t}px`,rr_height:`${r}px`}}let b;"iframe"!==g||p(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);try{customElements.get(g)&&(b=!0)}catch(e){}return{type:o.Element,tagName:g,attributes:y,childNodes:[],isSVG:(S=e,Boolean("svg"===S.tagName||S.ownerSVGElement)||void 0),needBlock:m,rootId:f,isCustom:b};var S}(e,{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:l,maskInputOptions:c,maskInputFn:u,dataURLOptions:p,inlineImages:g,recordCanvas:y,keepIframeSrcFn:w,newlyAddedElement:b,rootId:v});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:i}=t,a=d(e),l=a&&a.tagName;let c="";const h="STYLE"===l||void 0,u="SCRIPT"===l||void 0;return u?c="SCRIPT_PLACEHOLDER":i||(c=m(e),h&&c&&(c=L(c,G(t.doc)))),!h&&!u&&c&&r&&(c=s?s(c,f(e)):c.replace(/[\S]/g,"*")),{type:o.Text,textContent:c||"",rootId:n}}(e,{doc:r,needsMask:a,maskTextFn:h,rootId:v,cssCaptured:S});case e.CDATA_SECTION_NODE:return{type:o.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:o.Comment,textContent:m(e)||"",rootId:v};default:return!1}}function K(e){return null==e?"":e.toLowerCase()}function $(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:C={},inlineImages:v=!1,recordCanvas:I=!1,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:O=5e3,onStylesheetLoad:M,stylesheetLoadTimeout:R=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:T=!1,cssCaptured:N=!1}=t;let{needsMask:L}=t,{preserveWhiteSpace:D=!0}=t;L||(L=X(e,a,l,void 0===L));const P=H(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:L,inlineStylesheet:h,maskInputOptions:u,maskTextFn:f,maskInputFn:m,dataURLOptions:C,inlineImages:v,recordCanvas:I,keepIframeSrcFn:E,newlyAddedElement:T,cssCaptured:N});if(!P)return null;let F;F=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===o.Comment)return!0;if(e.type===o.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"===A(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(K(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===K(e.attributes.name)||"icon"===K(e.attributes.rel)||"apple-touch-icon"===K(e.attributes.rel)||"shortcut icon"===K(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&K(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(K(e.attributes.property).match(/^(og|twitter|fb):/)||K(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===K(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===K(e.attributes.name)||"googlebot"===K(e.attributes.name)||"bingbot"===K(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===K(e.attributes.name)||"generator"===K(e.attributes.name)||"framework"===K(e.attributes.name)||"publisher"===K(e.attributes.name)||"progid"===K(e.attributes.name)||K(e.attributes.property).match(/^article:/)||K(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===K(e.attributes.name)||"yandex-verification"===K(e.attributes.name)||"csrf-token"===K(e.attributes.name)||"p:domain_verify"===K(e.attributes.name)||"verify-v1"===K(e.attributes.name)||"verification"===K(e.attributes.name)||"shopify-checkout-api-token"===K(e.attributes.name)))return!0}}return!1}(P,g)||!D&&P.type===o.Text&&!P.textContent.replace(/^\s+|\s+$/gm,"").length?-2:B();const _=Object.assign(P,{id:F});if(s.add(e,_),-2===F)return null;k&&k(e);let U=!c;if(_.type===o.Element){U=U&&!_.needBlock,delete _.needBlock;const t=y(e);t&&S(t)&&(_.isShadowHost=!0)}if((_.type===o.Document||_.type===o.Element)&&U){g.headWhitespace&&_.type===o.Element&&"head"===_.tagName&&(D=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:L,maskTextClass:a,maskTextSelector:l,skipChild:c,inlineStylesheet:h,maskInputOptions:u,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:C,inlineImages:v,recordCanvas:I,preserveWhiteSpace:D,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:O,onStylesheetLoad:M,stylesheetLoadTimeout:R,keepIframeSrcFn:E,cssCaptured:!1};if(_.type===o.Element&&"textarea"===_.tagName&&void 0!==_.attributes.value);else{_.type===o.Element&&void 0!==_.attributes._cssText&&"string"==typeof _.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(p(e))){const e=$(r,t);e&&_.childNodes.push(e)}}let d=null;if(w(e)&&(d=y(e)))for(const e of Array.from(p(d))){const r=$(e,t);r&&(S(d)&&(r.isShadow=!0),_.childNodes.push(r))}}const z=d(e);return z&&b(z)&&S(z)&&(_.isShadow=!0),_.type===o.Element&&"iframe"===_.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,o=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout(()=>{o||(t(),o=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(s),o=!0,t()})}const i="about:blank";if(s.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&x){const r=$(t,{doc:t,mirror:s,blockClass:n,blockSelector:i,needsMask:L,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:C,inlineImages:v,recordCanvas:I,preserveWhiteSpace:D,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:O,onStylesheetLoad:M,stylesheetLoadTimeout:R,keepIframeSrcFn:E});r&&x(e,r)}},O),_.type===o.Element&&"link"===_.tagName&&"string"==typeof _.attributes.rel&&("stylesheet"===_.attributes.rel||"preload"===_.attributes.rel&&"string"==typeof _.attributes.href&&"css"===A(_.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const o=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),n=!0,t()})}(e,()=>{if(M){const t=$(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:L,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:C,inlineImages:v,recordCanvas:I,preserveWhiteSpace:D,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:O,onStylesheetLoad:M,stylesheetLoadTimeout:R,keepIframeSrcFn:E});t&&M(e,t)}},R),_}function Q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function q(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var ee={exports:{}},te=String,re=function(){return{isColorSupported:!1,reset:te,bold:te,dim:te,italic:te,underline:te,inverse:te,hidden:te,strikethrough:te,black:te,red:te,green:te,yellow:te,blue:te,magenta:te,cyan:te,white:te,gray:te,bgBlack:te,bgRed:te,bgGreen:te,bgYellow:te,bgBlue:te,bgMagenta:te,bgCyan:te,bgWhite:te}};ee.exports=re(),ee.exports.createColors=re;var se=ee.exports;const ne=q(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let oe=se,ie=ne,ae=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.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=oe.isColorSupported),ie&&e&&(t=ie(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=oe.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var le=ae;ae.default=ae;var ce={};ce.isClean=Symbol("isClean"),ce.my=Symbol("my");const he={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let ue=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="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 s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return he[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk(e=>{if(s=e.raws[t],void 0!==s)return!1})}var i;return void 0===s&&(s=he[r]),o.rawCache[r]=s,s}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 r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}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(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.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(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.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 r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 pe=ue;ue.default=ue;let de=pe;function fe(e,t){new de(t).stringify(e)}var me=fe;fe.default=fe;let{isClean:ge,my:ye}=ce,we=le,be=pe,Se=me;function Ce(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>Ce(e,r)):("object"===o&&null!==n&&(n=Ce(n)),r[s]=n)}return r}let ve=class{constructor(e={}){this.raws={},this[ge]=!1,this[ye]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}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=Ce(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new we(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[ge]){this[ge]=!1;let e=this;for(;e=e.parent;)e[ge]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new be).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Se){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Ie=ve;ve.default=ve;let ke=Ie,xe=class extends ke{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 Oe=xe;xe.default=xe;var Me={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Ae,SourceMapGenerator:Re}=ne,{existsSync:Ee,readFileSync:Te}=ne,{dirname:Ne,join:Le}=ne,De=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ne(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Ae(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 r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}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 r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Ne(e),Ee(e))return this.mapFile=e,Te(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 Ae)return Re.fromSourceMap(t).toString();if(t instanceof Re)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Le(Ne(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 Pe=De;De.default=De;let{SourceMapConsumer:Fe,SourceMapGenerator:Be}=ne,{fileURLToPath:_e,pathToFileURL:Ue}=ne,{isAbsolute:ze,resolve:We}=ne,{nanoid:je}=Me,Ve=ne,Ge=le,Ye=Pe,Ze=Symbol("fromOffsetCache"),Je=Boolean(Fe&&Be),Xe=Boolean(We&&ze),He=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&&(!Xe||/^\w+:\/\//.test(t.from)||ze(t.from)?this.file=t.from:this.file=We(t.from)),Xe&&Je){let e=new Ye(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 "+je(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new Ge(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,s.plugin):new Ge(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(Ue&&(n.input.url=Ue(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ze])r=this[Ze];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Ze]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:We(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=ze(a.source)?Ue(a.source):new URL(a.source,this.map.consumer().sourceRoot||Ue(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!_e)throw new Error("file: protocol is not available in this PostCSS build");l.file=_e(o)}let c=i.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 Ke=He;He.default=He,Ve&&Ve.registerInput&&Ve.registerInput(He);let{SourceMapConsumer:$e,SourceMapGenerator:Qe}=ne,{dirname:qe,relative:et,resolve:tt,sep:rt}=ne,{pathToFileURL:st}=ne,nt=Ke,ot=Boolean($e&&Qe),it=Boolean(qe&&tt&&et&&rt);var at=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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,r=this.toUrl(this.path(e.file)),s=e.root||qe(e.file);!1===this.mapOpts.sourcesContent?(t=new $e(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}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(),it&&ot&&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=Qe.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Qe({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 Qe({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.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?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}})}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 r=this.opts.to?qe(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=qe(tt(r,this.mapOpts.annotation)));let s=et(r,e);return this.memoizedPaths.set(e,s),s}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 nt(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(st){let t=st(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;"\\"===rt&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let lt=Ie,ct=class extends lt{constructor(e){super(e),this.type="comment"}};var ht=ct;ct.default=ct;let ut,pt,dt,ft,{isClean:mt,my:gt}=ce,yt=Oe,wt=ht,bt=Ie;function St(e){return e.map(e=>(e.nodes&&(e.nodes=St(e.nodes)),delete e.source,e))}function Ct(e){if(e[mt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Ct(t)}let vt=class e extends bt{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}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")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(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,r)=>(e[t]===r||(e[t]=r,"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 r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=St(ut(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 yt(t)]}else if(t.selector)t=[new pt(t)];else if(t.name)t=[new dt(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new wt(t)]}return t.map(t=>(t[gt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[mt]&&Ct(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.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 r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}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]}};vt.registerParse=e=>{ut=e},vt.registerRule=e=>{pt=e},vt.registerAtRule=e=>{dt=e},vt.registerRoot=e=>{ft=e};var It=vt;vt.default=vt,vt.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,dt.prototype):"rule"===e.type?Object.setPrototypeOf(e,pt.prototype):"decl"===e.type?Object.setPrototypeOf(e,yt.prototype):"comment"===e.type?Object.setPrototypeOf(e,wt.prototype):"root"===e.type&&Object.setPrototypeOf(e,ft.prototype),e[gt]=!0,e.nodes&&e.nodes.forEach(e=>{vt.rebuild(e)})};let kt,xt,Ot=It,Mt=class extends Ot{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new kt(new xt,this,e).stringify()}};Mt.registerLazyResult=e=>{kt=e},Mt.registerProcessor=e=>{xt=e};var At=Mt;Mt.default=Mt;let Rt={};var Et=function(e){Rt[e]||(Rt[e]=!0,"undefined"!=typeof console&&console.warn)};let Tt=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 e in t)this[e]=t[e]}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 Nt=Tt;Tt.default=Tt;let Lt=Nt,Dt=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,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 r=new Lt(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Pt=Dt;Dt.default=Dt;const Ft="'".charCodeAt(0),Bt='"'.charCodeAt(0),_t="\\".charCodeAt(0),Ut="/".charCodeAt(0),zt="\n".charCodeAt(0),Wt=" ".charCodeAt(0),jt="\f".charCodeAt(0),Vt="\t".charCodeAt(0),Gt="\r".charCodeAt(0),Yt="[".charCodeAt(0),Zt="]".charCodeAt(0),Jt="(".charCodeAt(0),Xt=")".charCodeAt(0),Ht="{".charCodeAt(0),Kt="}".charCodeAt(0),$t=";".charCodeAt(0),Qt="*".charCodeAt(0),qt=":".charCodeAt(0),er="@".charCodeAt(0),tr=/[\t\n\f\r "#'()/;[\\\]{}]/g,rr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,sr=/.[\r\n"'(/\\]/,nr=/[\da-f]/i;let or=It,ir=class extends or{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 ar=ir;ir.default=ir,or.registerAtRule(ir);let lr,cr,hr=It,ur=class extends hr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new lr(new cr,this,e).stringify()}};ur.registerLazyResult=e=>{lr=e},ur.registerProcessor=e=>{cr=e};var pr=ur;ur.default=ur,hr.registerRoot(ur);let dr={comma:e=>dr.split(e,[","],!0),space:e=>dr.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var fr=dr;dr.default=dr;let mr=It,gr=fr,yr=class extends mr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return gr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var wr=yr;yr.default=yr,mr.registerRule(yr);let br=Oe,Sr=ht,Cr=ar,vr=pr,Ir=wr;const kr={empty:!0,space:!0};let xr=It,Or=class{constructor(e){this.input=e,this.root=new vr,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,r,s,n=new Cr;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!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){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(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=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Sr;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=function(e,t={}){let r,s,n,o,i,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(r=p.charCodeAt(m),r){case zt:case Wt:case Vt:case Gt:case jt:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===Wt||r===zt||r===Vt||r===Gt||r===jt);u=["space",p.slice(m,s)],m=s-1;break;case Yt:case Zt:case Ht:case Kt:case qt:case $t:case Xt:{let e=String.fromCharCode(r);u=[e,e,m];break}case Jt:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Ft&&h!==Bt&&h!==Wt&&h!==zt&&h!==Vt&&h!==jt&&h!==Gt){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===_t;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||sr.test(o)?u=["(","(",m]:(u=["brackets",o,m,s],m=s);break;case Ft:case Bt:n=r===Ft?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===_t;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case er:tr.lastIndex=m+1,tr.test(p),s=0===tr.lastIndex?p.length-1:tr.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case _t:for(s=m,i=!0;p.charCodeAt(s+1)===_t;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==Ut&&r!==Wt&&r!==zt&&r!==Vt&&r!==Gt&&r!==jt&&(s+=1,nr.test(p.charAt(s)))){for(;nr.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===Wt&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Ut&&p.charCodeAt(m+1)===Qt?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(rr.lastIndex=m+1,rr.test(p),s=0===rr.lastIndex?p.length-1:rr.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}}(this.input)}decl(e,t){let r=new br;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=i.map(e=>e[1]).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.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 Ir;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,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}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,r,s){let n,o,i,a,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",kr[a]||kr[i]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Ir;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}},Mr=Ke;function Ar(e,t){let r=new Mr(e,t),s=new Or(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var Rr=Ar;Ar.default=Ar,xr.registerParse(Ar);let{isClean:Er,my:Tr}=ce,Nr=at,Lr=me,Dr=It,Pr=At,Fr=Et,Br=Pt,_r=Rr,Ur=pr;const zr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Wr={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},jr={Once:!0,postcssPlugin:!0,prepare:!0};function Vr(e){return"object"==typeof e&&"function"==typeof e.then}function Gr(e){let t=!1,r=zr[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Yr(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Gr(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Zr(e){return e[Er]=!1,e.nodes&&e.nodes.forEach(e=>Zr(e)),e}let Jr={},Xr=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Br)n=Zr(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=_r;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Tr]&&Dr.rebuild(n)}else n=Zr(r);this.result=new Br(t,n,s),this.helpers={...Jr,postcss:Jr,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 r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){r.postcssPlugin;let e=r.postcssVersion,t=this.result.processor.version,s=e.split("."),n=t.split(".");s[0]!==n[0]||(parseInt(s[1]),parseInt(n[1]))}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Wr[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!jr[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Vr(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Er];){e[Er]=!0;let t=[Yr(e)];for(;t.length>0;){let e=this.visitTick(t);if(Vr(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;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(e){throw this.handleError(e)}}}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 Vr(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(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Lr;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Nr(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(Vr(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Er];)e[Er]=!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||Fr("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,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Vr(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Er])return s[Er]=!0,void e.push(Yr(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Er]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Er]=!0;let t=Gr(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Er]||this.walkSync(e)});else{let t=this.listeners[r];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"}};Xr.registerPostcss=e=>{Jr=e};var Hr=Xr;Xr.default=Xr,Ur.registerLazyResult(Xr),Pr.registerLazyResult(Xr);let Kr=at,$r=me,Qr=Et,qr=Rr;const es=Pt;let ts=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=$r;this.result=new es(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Kr(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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||Qr("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=qr;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var rs=ts;ts.default=ts;let ss=rs,ns=Hr,os=At,is=pr,as=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" 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 ns(this,e,t):new ss(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ls=as;as.default=as,is.registerProcessor(as),os.registerProcessor(as);let cs=Oe,hs=Pe,us=ht,ps=ar,ds=Ke,fs=pr,ms=wr;function gs(e,t){if(Array.isArray(e))return e.map(e=>gs(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:ds.prototype};r.map&&(r.map={...r.map,__proto__:hs.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>gs(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new fs(s);if("decl"===s.type)return new cs(s);if("rule"===s.type)return new ms(s);if("comment"===s.type)return new us(s);if("atrule"===s.type)return new ps(s);throw new Error("Unknown node type: "+e.type)}var ys=gs;gs.default=gs;let ws=le,bs=Oe,Ss=Hr,Cs=It,vs=ls,Is=me,ks=ys,xs=At,Os=Nt,Ms=ht,As=ar,Rs=Pt,Es=Ke,Ts=Rr,Ns=fr,Ls=wr,Ds=pr,Ps=Ie;function Fs(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new vs(e)}Fs.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,process.env.LANG&&process.env.LANG.startsWith("cn"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new vs).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Fs([n(r)]).process(e,t)},n},Fs.stringify=Is,Fs.parse=Ts,Fs.fromJSON=ks,Fs.list=Ns,Fs.comment=e=>new Ms(e),Fs.atRule=e=>new As(e),Fs.decl=e=>new bs(e),Fs.rule=e=>new Ls(e),Fs.root=e=>new Ds(e),Fs.document=e=>new xs(e),Fs.CssSyntaxError=ws,Fs.Declaration=bs,Fs.Container=Cs,Fs.Processor=vs,Fs.Document=xs,Fs.Comment=Ms,Fs.Warning=Os,Fs.AtRule=As,Fs.Result=Rs,Fs.Input=Es,Fs.Rule=Ls,Fs.Root=Ds,Fs.Node=Ps,Ss.registerPostcss(Fs);var Bs=Fs;Fs.default=Fs;const _s=Q(Bs);_s.stringify,_s.fromJSON,_s.plugin,_s.parse,_s.list,_s.document,_s.comment,_s.atRule,_s.rule,_s.decl,_s.root,_s.CssSyntaxError,_s.Declaration,_s.Container,_s.Processor,_s.Document,_s.Comment,_s.Warning,_s.AtRule,_s.Result,_s.Input,_s.Rule,_s.Root,_s.Node;var Us=Object.defineProperty,zs=(e,t,r)=>((e,t,r)=>t in e?Us(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Ws(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function js(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var Vs={exports:{}},Gs=String,Ys=function(){return{isColorSupported:!1,reset:Gs,bold:Gs,dim:Gs,italic:Gs,underline:Gs,inverse:Gs,hidden:Gs,strikethrough:Gs,black:Gs,red:Gs,green:Gs,yellow:Gs,blue:Gs,magenta:Gs,cyan:Gs,white:Gs,gray:Gs,bgBlack:Gs,bgRed:Gs,bgGreen:Gs,bgYellow:Gs,bgBlue:Gs,bgMagenta:Gs,bgCyan:Gs,bgWhite:Gs}};Vs.exports=Ys(),Vs.exports.createColors=Ys;var Zs=Vs.exports;const Js=js(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Xs=Zs,Hs=Js,Ks=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.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=Xs.isColorSupported),Hs&&e&&(t=Hs(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Xs.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var $s=Ks;Ks.default=Ks;var Qs={};Qs.isClean=Symbol("isClean"),Qs.my=Symbol("my");const qs={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let en=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="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 s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return qs[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk(e=>{if(s=e.raws[t],void 0!==s)return!1})}var i;return void 0===s&&(s=qs[r]),o.rawCache[r]=s,s}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 r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}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(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.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(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.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 r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}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 tn=en;en.default=en;let rn=tn;function sn(e,t){new rn(t).stringify(e)}var nn=sn;sn.default=sn;let{isClean:on,my:an}=Qs,ln=$s,cn=tn,hn=nn;function un(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>un(e,r)):("object"===o&&null!==n&&(n=un(n)),r[s]=n)}return r}let pn=class{constructor(e={}){this.raws={},this[on]=!1,this[an]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}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=un(this);for(let r in e)t[r]=e[r];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:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new ln(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[on]){this[on]=!1;let e=this;for(;e=e.parent;)e[on]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,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},r=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 s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new cn).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,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=hn){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var dn=pn;pn.default=pn;let fn=dn,mn=class extends fn{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 gn=mn;mn.default=mn;var yn={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:wn,SourceMapGenerator:bn}=Js,{existsSync:Sn,readFileSync:Cn}=Js,{dirname:vn,join:In}=Js,kn=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=vn(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new wn(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 r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}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 r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=vn(e),Sn(e))return this.mapFile=e,Cn(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 wn)return bn.fromSourceMap(t).toString();if(t instanceof bn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=In(vn(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 xn=kn;kn.default=kn;let{SourceMapConsumer:On,SourceMapGenerator:Mn}=Js,{fileURLToPath:An,pathToFileURL:Rn}=Js,{isAbsolute:En,resolve:Tn}=Js,{nanoid:Nn}=yn,Ln=Js,Dn=$s,Pn=xn,Fn=Symbol("fromOffsetCache"),Bn=Boolean(On&&Mn),_n=Boolean(Tn&&En),Un=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&&(!_n||/^\w+:\/\//.test(t.from)||En(t.from)?this.file=t.from:this.file=Tn(t.from)),_n&&Bn){let e=new Pn(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 "+Nn(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new Dn(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,s.plugin):new Dn(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(Rn&&(n.input.url=Rn(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Fn])r=this[Fn];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Fn]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Tn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=En(a.source)?Rn(a.source):new URL(a.source,this.map.consumer().sourceRoot||Rn(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!An)throw new Error("file: protocol is not available in this PostCSS build");l.file=An(o)}let c=i.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 zn=Un;Un.default=Un,Ln&&Ln.registerInput&&Ln.registerInput(Un);let{SourceMapConsumer:Wn,SourceMapGenerator:jn}=Js,{dirname:Vn,relative:Gn,resolve:Yn,sep:Zn}=Js,{pathToFileURL:Jn}=Js,Xn=zn,Hn=Boolean(Wn&&jn),Kn=Boolean(Vn&&Yn&&Gn&&Zn);var $n=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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,r=this.toUrl(this.path(e.file)),s=e.root||Vn(e.file);!1===this.mapOpts.sourcesContent?(t=new Wn(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}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(),Kn&&Hn&&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=jn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new jn({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 jn({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.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?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}})}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 r=this.opts.to?Vn(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Vn(Yn(r,this.mapOpts.annotation)));let s=Gn(r,e);return this.memoizedPaths.set(e,s),s}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 Xn(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(Jn){let t=Jn(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;"\\"===Zn&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Qn=dn,qn=class extends Qn{constructor(e){super(e),this.type="comment"}};var eo=qn;qn.default=qn;let to,ro,so,no,{isClean:oo,my:io}=Qs,ao=gn,lo=eo,co=dn;function ho(e){return e.map(e=>(e.nodes&&(e.nodes=ho(e.nodes)),delete e.source,e))}function uo(e){if(e[oo]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)uo(t)}let po=class e extends co{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,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}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")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(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,r)=>(e[t]===r||(e[t]=r,"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 r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=ho(to(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 ao(t)]}else if(t.selector)t=[new ro(t)];else if(t.name)t=[new so(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new lo(t)]}return t.map(t=>(t[io]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[oo]&&uo(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.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 r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}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]}};po.registerParse=e=>{to=e},po.registerRule=e=>{ro=e},po.registerAtRule=e=>{so=e},po.registerRoot=e=>{no=e};var fo=po;po.default=po,po.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,so.prototype):"rule"===e.type?Object.setPrototypeOf(e,ro.prototype):"decl"===e.type?Object.setPrototypeOf(e,ao.prototype):"comment"===e.type?Object.setPrototypeOf(e,lo.prototype):"root"===e.type&&Object.setPrototypeOf(e,no.prototype),e[io]=!0,e.nodes&&e.nodes.forEach(e=>{po.rebuild(e)})};let mo,go,yo=fo,wo=class extends yo{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new mo(new go,this,e).stringify()}};wo.registerLazyResult=e=>{mo=e},wo.registerProcessor=e=>{go=e};var bo=wo;wo.default=wo;let So={};var Co=function(e){So[e]||(So[e]=!0,"undefined"!=typeof console&&console.warn)};let vo=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 e in t)this[e]=t[e]}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 Io=vo;vo.default=vo;let ko=Io,xo=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,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 r=new ko(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Oo=xo;xo.default=xo;const Mo="'".charCodeAt(0),Ao='"'.charCodeAt(0),Ro="\\".charCodeAt(0),Eo="/".charCodeAt(0),To="\n".charCodeAt(0),No=" ".charCodeAt(0),Lo="\f".charCodeAt(0),Do="\t".charCodeAt(0),Po="\r".charCodeAt(0),Fo="[".charCodeAt(0),Bo="]".charCodeAt(0),_o="(".charCodeAt(0),Uo=")".charCodeAt(0),zo="{".charCodeAt(0),Wo="}".charCodeAt(0),jo=";".charCodeAt(0),Vo="*".charCodeAt(0),Go=":".charCodeAt(0),Yo="@".charCodeAt(0),Zo=/[\t\n\f\r "#'()/;[\\\]{}]/g,Jo=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Xo=/.[\r\n"'(/\\]/,Ho=/[\da-f]/i;let Ko=fo,$o=class extends Ko{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 Qo=$o;$o.default=$o,Ko.registerAtRule($o);let qo,ei,ti=fo,ri=class extends ti{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new qo(new ei,this,e).stringify()}};ri.registerLazyResult=e=>{qo=e},ri.registerProcessor=e=>{ei=e};var si=ri;ri.default=ri,ti.registerRoot(ri);let ni={comma:e=>ni.split(e,[","],!0),space:e=>ni.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var oi=ni;ni.default=ni;let ii=fo,ai=oi,li=class extends ii{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ai.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var ci=li;li.default=li,ii.registerRule(li);let hi=gn,ui=eo,pi=Qo,di=si,fi=ci;const mi={empty:!0,space:!0};let gi=fo,yi=class{constructor(e){this.input=e,this.root=new di,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,r,s,n=new pi;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!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){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(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=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new ui;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=function(e,t={}){let r,s,n,o,i,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(r=p.charCodeAt(m),r){case To:case No:case Do:case Po:case Lo:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===No||r===To||r===Do||r===Po||r===Lo);u=["space",p.slice(m,s)],m=s-1;break;case Fo:case Bo:case zo:case Wo:case Go:case jo:case Uo:{let e=String.fromCharCode(r);u=[e,e,m];break}case _o:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Mo&&h!==Ao&&h!==No&&h!==To&&h!==Do&&h!==Lo&&h!==Po){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;p.charCodeAt(l-1)===Ro;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||Xo.test(o)?u=["(","(",m]:(u=["brackets",o,m,s],m=s);break;case Mo:case Ao:n=r===Mo?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;p.charCodeAt(l-1)===Ro;)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case Yo:Zo.lastIndex=m+1,Zo.test(p),s=0===Zo.lastIndex?p.length-1:Zo.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case Ro:for(s=m,i=!0;p.charCodeAt(s+1)===Ro;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==Eo&&r!==No&&r!==To&&r!==Do&&r!==Po&&r!==Lo&&(s+=1,Ho.test(p.charAt(s)))){for(;Ho.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===No&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Eo&&p.charCodeAt(m+1)===Vo?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(Jo.lastIndex=m+1,Jo.test(p),s=0===Jo.lastIndex?p.length-1:Jo.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}}(this.input)}decl(e,t){let r=new hi;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=i.map(e=>e[1]).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.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 fi;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,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}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,r,s){let n,o,i,a,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",mi[a]||mi[i]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new fi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}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})}},wi=zn;function bi(e,t){let r=new wi(e,t),s=new yi(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var Si=bi;bi.default=bi,gi.registerParse(bi);let{isClean:Ci,my:vi}=Qs,Ii=$n,ki=nn,xi=fo,Oi=bo,Mi=Co,Ai=Oo,Ri=Si,Ei=si;const Ti={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ni={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},Li={Once:!0,postcssPlugin:!0,prepare:!0};function Di(e){return"object"==typeof e&&"function"==typeof e.then}function Pi(e){let t=!1,r=Ti[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Fi(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Pi(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Bi(e){return e[Ci]=!1,e.nodes&&e.nodes.forEach(e=>Bi(e)),e}let _i={},Ui=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Ai)n=Bi(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Ri;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[vi]&&xi.rebuild(n)}else n=Bi(r);this.result=new Ai(t,n,s),this.helpers={..._i,postcss:_i,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 r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){r.postcssPlugin;let e=r.postcssVersion,t=this.result.processor.version,s=e.split("."),n=t.split(".");s[0]!==n[0]||(parseInt(s[1]),parseInt(n[1]))}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Ni[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Li[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Di(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ci];){e[Ci]=!0;let t=[Fi(e)];for(;t.length>0;){let e=this.visitTick(t);if(Di(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;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(e){throw this.handleError(e)}}}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 Di(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(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ki;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Ii(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(Di(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ci];)e[Ci]=!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||Mi("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,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Di(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Ci])return s[Ci]=!0,void e.push(Fi(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Ci]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Ci]=!0;let t=Pi(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Ci]||this.walkSync(e)});else{let t=this.listeners[r];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"}};Ui.registerPostcss=e=>{_i=e};var zi=Ui;Ui.default=Ui,Ei.registerLazyResult(Ui),Oi.registerLazyResult(Ui);let Wi=$n,ji=nn,Vi=Co,Gi=Si;const Yi=Oo;let Zi=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=ji;this.result=new Yi(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Wi(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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||Vi("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=Gi;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Ji=Zi;Zi.default=Zi;let Xi=Ji,Hi=zi,Ki=bo,$i=si,Qi=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" 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 Hi(this,e,t):new Xi(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var qi=Qi;Qi.default=Qi,$i.registerProcessor(Qi),Ki.registerProcessor(Qi);let ea=gn,ta=xn,ra=eo,sa=Qo,na=zn,oa=si,ia=ci;function aa(e,t){if(Array.isArray(e))return e.map(e=>aa(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:na.prototype};r.map&&(r.map={...r.map,__proto__:ta.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>aa(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new oa(s);if("decl"===s.type)return new ea(s);if("rule"===s.type)return new ia(s);if("comment"===s.type)return new ra(s);if("atrule"===s.type)return new sa(s);throw new Error("Unknown node type: "+e.type)}var la=aa;aa.default=aa;let ca=$s,ha=gn,ua=zi,pa=fo,da=qi,fa=nn,ma=la,ga=bo,ya=Io,wa=eo,ba=Qo,Sa=Oo,Ca=zn,va=Si,Ia=oi,ka=ci,xa=si,Oa=dn;function Ma(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new da(e)}Ma.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,process.env.LANG&&process.env.LANG.startsWith("cn"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new da).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Ma([n(r)]).process(e,t)},n},Ma.stringify=fa,Ma.parse=va,Ma.fromJSON=ma,Ma.list=Ia,Ma.comment=e=>new wa(e),Ma.atRule=e=>new ba(e),Ma.decl=e=>new ha(e),Ma.rule=e=>new ka(e),Ma.root=e=>new xa(e),Ma.document=e=>new ga(e),Ma.CssSyntaxError=ca,Ma.Declaration=ha,Ma.Container=pa,Ma.Processor=da,Ma.Document=ga,Ma.Comment=wa,Ma.Warning=ya,Ma.AtRule=ba,Ma.Result=Sa,Ma.Input=Ca,Ma.Rule=ka,Ma.Root=xa,Ma.Node=Oa,ua.registerPostcss(Ma);var Aa=Ma;Ma.default=Ma;const Ra=Ws(Aa);Ra.stringify,Ra.fromJSON,Ra.plugin,Ra.parse,Ra.list,Ra.document,Ra.comment,Ra.atRule,Ra.rule,Ra.decl,Ra.root,Ra.CssSyntaxError,Ra.Declaration,Ra.Container,Ra.Processor,Ra.Document,Ra.Comment,Ra.Warning,Ra.AtRule,Ra.Result,Ra.Input,Ra.Rule,Ra.Root,Ra.Node;class Ea{constructor(...e){zs(this,"parentElement",null),zs(this,"parentNode",null),zs(this,"ownerDocument"),zs(this,"firstChild",null),zs(this,"lastChild",null),zs(this,"previousSibling",null),zs(this,"nextSibling",null),zs(this,"ELEMENT_NODE",1),zs(this,"TEXT_NODE",3),zs(this,"nodeType"),zs(this,"nodeName"),zs(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 Ea))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 Ta={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Na={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},La={};function Da(e){if(La[e])return La[e];const t=globalThis[e],r=t.prototype,s=e in Ta?Ta[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),o=e in Na?Na[e]:void 0,i=Boolean(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&i&&!globalThis.Zone)return La[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?La[e]=o:r}catch{return r}}const Pa={};function Fa(e,t,r){var s;const n=`${e}.${String(r)}`;if(Pa[n])return Pa[n].call(t);const o=Da(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Pa[n]=i,i.call(t)):t[r]}const Ba={};function _a(e,t,r){const s=`${e}.${String(r)}`;if(Ba[s])return Ba[s].bind(t);const n=Da(e)[r];return"function"!=typeof n?t[r]:(Ba[s]=n,n.bind(t))}function Ua(){return Da("MutationObserver").constructor}const za=function(e){return Fa("Node",e,"childNodes")},Wa=function(e){return Fa("Node",e,"parentNode")},ja=function(e){return Fa("Node",e,"parentElement")},Va=function(e){return Fa("Node",e,"textContent")},Ga=function(e,t){return _a("Node",e,"contains")(t)},Ya=function(e){return _a("Node",e,"getRootNode")()},Za=function(e){return e&&"host"in e?Fa("ShadowRoot",e,"host"):null},Ja=function(e){return e&&"shadowRoot"in e?Fa("Element",e,"shadowRoot"):null};function Xa(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}let Ha={map:{},getId:()=>-1,getNode:()=>null,removeNodeFromMap(){},has:()=>!1,reset(){}};function Ka(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout(()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)},a))}}function $a(e,t,r,s,n=window){const o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>$a(e,t,o||{},!0)}function Qa(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ha=new Proxy(Ha,{get:(e,t,r)=>Reflect.get(e,t,r)}));let qa=Date.now;function el(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=ja(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=ja(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}}function tl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function rl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function sl(e){return e?e.nodeType===e.ELEMENT_NODE?e:ja(e):null}function nl(e,t,r,s){if(!e)return!1;const n=sl(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(J(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1}function ol(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function il(e,t){if(b(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Wa(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||il(s,t))}function al(e){return Boolean(e.changedTouches)}function ll(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function cl(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function hl(e){return!!e&&(e instanceof Ea&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Ja(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(qa=()=>(new Date).getTime());class ul{constructor(){r(this,"id",1),r(this,"styleIDMap",new WeakMap),r(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 r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}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 pl(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Ya(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Za(Ya(e))&&(r=Za(Ya(e))),r}function dl(e){const t=e.ownerDocument;return!!t&&(Ga(t,e)||function(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=pl(r);)r=t;return r}(e);return Ga(t,r)}(e))}var fl=(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))(fl||{}),ml=(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))(ml||{}),gl=(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))(gl||{}),yl=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(yl||{}),wl=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(wl||{}),bl=(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))(bl||{}),Sl=(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))(Sl||{});function Cl(e){return"__ln"in e}class vl{constructor(){r(this,"length",0),r(this,"head",null),r(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)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&&Cl(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Cl(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.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 Il=(e,t)=>`${e}@${t}`;class kl{constructor(){r(this,"frozen",!1),r(this,"locked",!1),r(this,"texts",[]),r(this,"attributes",[]),r(this,"attributeMap",new WeakMap),r(this,"removes",[]),r(this,"mapRemoves",[]),r(this,"movedMap",{}),r(this,"addedSet",new Set),r(this,"movedSet",new Set),r(this,"droppedSet",new Set),r(this,"removesSubTreeCache",new Set),r(this,"mutationCb"),r(this,"blockClass"),r(this,"blockSelector"),r(this,"maskTextClass"),r(this,"maskTextSelector"),r(this,"inlineStylesheet"),r(this,"maskInputOptions"),r(this,"maskTextFn"),r(this,"maskInputFn"),r(this,"keepIframeSrcFn"),r(this,"recordCanvas"),r(this,"inlineImages"),r(this,"slimDOMOptions"),r(this,"dataURLOptions"),r(this,"doc"),r(this,"mirror"),r(this,"iframeManager"),r(this,"stylesheetManager"),r(this,"shadowDomManager"),r(this,"canvasManager"),r(this,"processedNodeManager"),r(this,"unattachedDoc"),r(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),r(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new vl,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const o=Wa(n);if(!o||!dl(n))return;let i=!1;if(n.nodeType===Node.TEXT_NODE){const e=o.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(o)&&(i=!0)}const a=b(o)?this.mirror.getId(pl(n)):this.mirror.getId(o),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=$(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=>{ll(e,this.mirror)&&this.iframeManager.addIframe(e),cl(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),hl(n)&&this.shadowDomManager.addShadowRoot(Ja(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:i});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 e of this.movedSet)Ol(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Wa(e))||n(e);for(const e of this.addedSet)Ml(this.droppedSet,e)||Ol(this.removesSubTreeCache,e,this.mirror)?Ml(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let o=null;for(;r.length;){let e=null;if(o){const t=this.mirror.getId(Wa(o.value)),r=s(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(Wa(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Wa(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Za(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),n(e.value)}const i={texts:this.texts.map(e=>{const t=e.node,r=Wa(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{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 r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).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};(i.texts.length||i.attributes.length||i.removes.length||i.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(i))}),r(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(za(e),e=>Va(e)||"").join("")}),r(this,"processMutation",e=>{if(!ol(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Va(e.target);nl(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:X(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,sl(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const e=M(t);s=k({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(nl(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Z(t.tagName,r))if(n.attributes[r]=Y(this.doc,x(t.tagName),x(r),s),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===o?s:[s,o]:n._unchangedStyles[e]=[s,o]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":if(nl(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 r=this.mirror.getId(t),s=b(e.target)?this.mirror.getId(Za(e.target)):this.mirror.getId(e.target);nl(e.target,this.blockClass,this.blockSelector,!1)||ol(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(xl(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||il(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Il(r,s)]?xl(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!b(e.target)||!S(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),za(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),r(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(ol(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Il(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);nl(e,this.blockClass,this.blockSelector,!1)||(za(e).forEach(e=>this.genAdds(e)),hl(e)&&za(Ja(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 xl(e,t){e.delete(t),za(t).forEach(t=>xl(e,t))}function Ol(e,t,r){return 0!==e.size&&function(e,t){const r=Wa(t);return!!r&&e.has(r)}(e,t)}function Ml(e,t){return 0!==e.size&&Al(e,t)}function Al(e,t){const r=Wa(t);return!!r&&(!!e.has(r)||Al(e,r))}let Rl;const El=e=>Rl?(...t)=>{try{return e(...t)}catch(e){if(Rl&&!0===Rl(e))return;throw e}}:e,Tl=[];function Nl(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 Ll(e,t){const r=new kl;Tl.push(r),r.init(e);const s=new(Ua())(El(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Dl({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){return Xa("scroll",El(Ka(El(o=>{const i=Nl(o);if(!i||nl(i,s,n,!0))return;const a=r.getId(i);if(i===t&&t.defaultView){const r=el(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}),o.scroll||100)),t)}const Pl=["INPUT","TEXTAREA","SELECT"],Fl=new WeakMap;function Bl(e){return function(e,t){if(Wl("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Wl("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Wl("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Wl("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function _l(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function Ul({mirror:e,stylesheetManager:t},r){var s,n,o;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(Za(r));const a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(o=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const s=null==(r=l.set)?void 0:r.call(this,e);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return s}}),El(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function zl(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:i,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),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),i(...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&&(s=Ll(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const l=Ka(El(t=>{const r=Date.now()-i;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],i=null}),o),c=El(Ka(El(e=>{const t=Nl(e),{clientX:r,clientY:n}=al(e)?e.changedTouches[0]:e;i||(i=qa()),a.push({x:r,y:n,id:s.getId(t),timeOffset:qa()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?ml.Drag:e instanceof MouseEvent?ml.MouseMove:ml.TouchMove)}),n,{trailing:!1})),h=[Xa("mousemove",c,r),Xa("touchmove",c,r),Xa("drag",c,r)];return El(()=>{h.forEach(e=>e())})}(e),o=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let l=null;return Object.keys(gl).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e]).forEach(o=>{let i=x(o);const c=(t=>o=>{const i=Nl(o);if(nl(i,s,n,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=yl.Mouse;break;case"touch":a=yl.Touch;break;case"pen":a=yl.Pen}a===yl.Touch?gl[t]===gl.MouseDown?c="TouchStart":gl[t]===gl.MouseUp&&(c="TouchEnd"):yl.Pen}else al(o)&&(a=yl.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===yl.Touch||c.startsWith("Mouse")&&a===yl.Mouse)&&(a=null)):gl[t]===gl.Click&&(a=l,l=null);const h=al(o)?o.changedTouches[0]:o;if(!h)return;const u=r.getId(i),{clientX:p,clientY:d}=h;El(e)({type:gl[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(gl[o]){case gl.MouseDown:case gl.MouseUp:i=i.replace("mouse","pointer");break;case gl.TouchStart:case gl.TouchEnd:return}a.push(Xa(i,c,t))}),El(()=>{a.forEach(e=>e())})}(e),i=Dl(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return Xa("resize",El(Ka(El(()=>{const t=tl(),n=rl();r===t&&s===n||(e({width:Number(n),height:Number(t)}),r=t,s=n)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:o,ignoreSelector:i,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let r=Nl(e);const c=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=ja(r)),!r||!u||Pl.indexOf(u)<0||nl(r,s,n,!0))return;if(r.classList.contains(o)||i&&r.matches(i))return;let d=r.value,f=!1;const m=M(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[u.toLowerCase()]||a[m])&&(d=k({element:r,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(r,h?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){const t=e.value;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,s){const n=Fl.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){Fl.set(t,s);const n=r.getId(t);El(e)({...s,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>Xa(e,El(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=>$a(e[0],e[1],{set(){El(u)({target:this,isTrusted:!1})}},!1,f))),El(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:o}){const i=El(o=>Ka(El(n=>{const i=Nl(n);if(!i||nl(i,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=i;e({type:o,id:s.getId(i),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),n.media||500)),a=[Xa("play",i(bl.Play),o),Xa("pause",i(bl.Pause),o),Xa("seeked",i(bl.Seeked),o),Xa("volumechange",i(bl.VolumeChange),o),Xa("ratechange",i(bl.RateChange),o)];return El(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:El((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=_l(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:a}]}),s.apply(n,o)})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const n=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};const o=s.CSSStyleSheet.prototype.deleteRule;let i,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:El((s,n,o)=>{const[i]=o,{id:a,styleId:l}=_l(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:i}]}),s.apply(n,o)})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:El((s,n,o)=>{const[i]=o,{id:a,styleId:l}=_l(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:i}),s.apply(n,o)})})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:El((s,n,o)=>{const[i]=o,{id:a,styleId:l}=_l(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:i}),s.apply(n,o)})}));const l={};jl("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(jl("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),jl("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),jl("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach(([s,n])=>{c[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[s].insertRule,{apply:El((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=_l(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:[...Bl(n),a||0]}]}),s.apply(n,o)})}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:El((s,n,o)=>{const[i]=o,{id:a,styleId:l}=_l(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...Bl(n),i]}]}),s.apply(n,o)})})}),El(()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=o,i&&(s.CSSStyleSheet.prototype.replace=i),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:r}),u=Ul(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){const o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:El((n,i,a)=>{var l;const[c,h,u]=a;if(r.has(c))return o.apply(i,[c,h,u]);const{id:p,styleId:d}=_l(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:Bl(i.parentRule)}),n.apply(i,a)})});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:El((n,o,a)=>{var l;const[c]=a;if(r.has(c))return i.apply(o,[c]);const{id:h,styleId:u}=_l(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:Bl(o.parentRule)}),n.apply(o,a)})}),El(()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:r}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){const s=new o(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const i=Qa(t.fonts,"add",function(t){return function(r){return setTimeout(El(()=>{const t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}});return s.push(()=>{r.FontFace=o}),s.push(i),El(()=>{s.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:o}=e;let i=!0;const a=El(()=>{const e=t.getSelection();if(!e||i&&(null==e?void 0:e.isCollapsed))return;i=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const o=e.getRangeAt(t),{startContainer:i,startOffset:l,endContainer:c,endOffset:h}=o;nl(i,s,n,!0)||nl(c,s,n,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:h})}o({ranges:a})});return a(),Xa("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?Qa(r.customElements,"define",function(e){return function(r,s,n){try{t({define:{name:r}})}catch(e){}return e.apply(this,[r,s,n])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return El(()=>{Tl.forEach(e=>e.reset()),null==s||s.disconnect(),n(),o(),i(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach(e=>e())})}function Wl(e){return void 0!==window[e]}function jl(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Vl{constructor(e){r(this,"iframeIdToRemoteIdMap",new WeakMap),r(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let i=n.get(t);return i||(i=this.generateIdFn(),n.set(t,i),o.set(i,t)),i}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,s))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return s.get(t)||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}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 Gl{constructor(e){r(this,"iframes",new WeakMap),r(this,"crossOriginIframeMap",new WeakMap),r(this,"crossOriginIframeMirror",new Vl(B)),r(this,"crossOriginIframeStyleMirror"),r(this,"crossOriginIframeRootIdMap",new WeakMap),r(this,"mirror"),r(this,"mutationCb"),r(this,"wrappedEmit"),r(this,"loadListener"),r(this,"stylesheetManager"),r(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Vl(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 r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.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 r=this.crossOriginIframeMap.get(e.source);if(!r)return;const s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case fl.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:fl.IncrementalSnapshot,data:{source:ml.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case fl.Meta:case fl.Load:case fl.DomContentLoaded:return!1;case fl.Plugin:return t;case fl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case fl.IncrementalSnapshot:switch(t.data.source){case ml.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),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 ml.Drag:case ml.TouchMove:case ml.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case ml.ViewportResize:return!1;case ml.MediaInteraction:case ml.MouseInteraction:case ml.Scroll:case ml.CanvasMutation:case ml.Input:return this.replaceIds(t.data,e,["id"]),t;case ml.StyleSheetRule:case ml.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case ml.Font:return t;case ml.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case ml.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(const n of s)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}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===Sl.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Yl{constructor(e){r(this,"shadowDoms",new WeakSet),r(this,"mutationCb"),r(this,"scrollCb"),r(this,"bypassOptions"),r(this,"mirror"),r(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(!S(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ll({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Dl({...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(Za(e))),this.restoreHandlers.push(Ul({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 r=this;this.restoreHandlers.push(Qa(e.prototype,"attachShadow",function(e){return function(s){const n=e.call(this,s),o=Ja(this);return o&&dl(this)&&r.addShadowRoot(o,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Zl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Xl=0;Xl<64;Xl++)Jl[Zl.charCodeAt(Xl)]=Xl;const Hl=new Map,Kl=(e,t,r)=>{if(!e||!ql(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=Hl.get(e);return r||(r=new Map,Hl.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function $l(e,t,r){if(e instanceof Array)return e.map(e=>$l(e,t,r));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,r=new Uint8Array(e),s=r.length,n="";for(t=0;t<s;t+=3)n+=Zl[r[t]>>2],n+=Zl[(3&r[t])<<4|r[t+1]>>4],n+=Zl[(15&r[t+1])<<2|r[t+2]>>6],n+=Zl[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[$l(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}return e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[$l(e.data,t,r),e.width,e.height]}:ql(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:Kl(e,t,r)}:e}const Ql=(e,t,r)=>e.map(e=>$l(e,t,r)),ql=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(r.find(r=>e instanceof t[r]))};function ec(e,t,r,s){const n=[];try{const o=Qa(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...o){if(!nl(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(o[0]&&"object"==typeof o[0]){const e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...o])}});n.push(o)}catch{}return()=>{n.forEach(e=>e())}}function tc(e,t,r,s,n,o){const i=[],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=Qa(e,l,function(e){return function(...i){const a=e.apply(this,i);if(Kl(a,o,this),"tagName"in this.canvas&&!nl(this.canvas,s,n,!0)){const e=Ql(i,o,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}});i.push(a)}catch{const s=$a(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(s)}return i}const rc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",sc="undefined"!=typeof window&&window.Blob&&new Blob([(nc=rc,Uint8Array.from(atob(nc),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var nc;function oc(e){let t;try{if(t=sc&&(window.URL||window.webkitURL).createObjectURL(sc),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;base64,"+rc,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class ic{constructor(e){r(this,"pendingCanvasMutations",new Map),r(this,"rafStamps",{latestId:0,invokeId:null}),r(this,"mirror"),r(this,"mutationCb"),r(this,"resetObservers"),r(this,"frozen",!1),r(this,"locked",!1),r(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:n,blockSelector:o,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(s,n,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,s,n,o,{dataURLOptions:a})}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,r,s,n){const o=ec(t,r,s,!0),i=new Map,a=new oc;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:o}=e.data;this.mutationCb({id:t,type:wl["2D"],commands:[{property:"clearRect",args:[0,0,n,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},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=>{nl(t,r,s,!0)||e.push(t)}),e})().forEach(async e=>{var t;const r=this.mirror.getId(e);if(i.get(r))return;if(0===e.width||0===e.height)return;if(i.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=ec(e,t,r,!1),n=function(e,t,r,s){const n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const o=Qa(t.CanvasRenderingContext2D.prototype,i,function(n){return function(...o){return nl(this.canvas,r,s,!0)||setTimeout(()=>{const r=Ql(o,t,this);e(this.canvas,{type:wl["2D"],property:i,args:r})},0),n.apply(this,o)}});n.push(o)}catch{const r=$a(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:wl["2D"],property:i,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,s){const n=[];return n.push(...tc(t.WebGLRenderingContext.prototype,wl.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...tc(t.WebGL2RenderingContext.prototype,wl.WebGL2,e,r,s,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const s=r.map(e=>{const{type:t,...r}=e;return r}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}}class ac{constructor(e){r(this,"trackedLinkElements",new WeakSet),r(this,"mutationCb"),r(this,"adoptedStyleSheetCb"),r(this,"styleMirror",new ul),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 r={id:t,styleIds:[]},s=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:v(e,t.href),index:r}))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class lc{constructor(){r(this,"nodeMap",new WeakMap),r(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).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 cc,hc,uc,pc=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(e=t.contentWindow)?void 0:e.Array.from)||Array.from,document.body.removeChild(t)}}catch(e){}const dc=new I;function fc(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:i="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:S,recordDOM:C=!0,recordCanvas:v=!1,recordCrossOriginIframes:k=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:M=!1,inlineImages:A=!1,plugins:R,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:T=new Set([]),errorHandler:N}=e;Rl=N;const L=!k||window.parent===window;let D=!1;if(!L)try{window.parent.document&&(D=!1)}catch(e){D=!0}if(L&&!t)throw new Error("emit function is required");if(!L&&!D)return()=>{};void 0!==S&&void 0===w.mousemove&&(w.mousemove=S),dc.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},F=!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 B;!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 _=0;const U=e=>{for(const t of R||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};cc=(e,n)=>{var o;const i=e;if(i.timestamp=qa(),!(null==(o=Tl[0])?void 0:o.isFrozen())||i.type===fl.FullSnapshot||i.type===fl.IncrementalSnapshot&&i.data.source===ml.Mutation||Tl.forEach(e=>e.unfreeze()),L)null==t||t(U(i),n);else if(D){const e={type:"rrweb",event:U(i),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(i.type===fl.FullSnapshot)B=i,_=0;else if(i.type===fl.IncrementalSnapshot){if(i.data.source===ml.Mutation&&i.data.isAttachIframe)return;_++;const e=s&&_>=s,t=r&&i.timestamp-B.timestamp>r;(e||t)&&hc(!0)}};const z=e=>{cc({type:fl.IncrementalSnapshot,data:{source:ml.Mutation,...e}})},W=e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.Scroll,...e}}),j=e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.CanvasMutation,...e}}),V=new ac({mutationCb:z,adoptedStyleSheetCb:e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.AdoptedStyleSheet,...e}})}),G=new Gl({mirror:dc,mutationCb:z,stylesheetManager:V,recordCrossOriginIframes:k,wrappedEmit:cc});for(const e of R||[])e.getMirror&&e.getMirror({nodeMirror:dc,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});const Y=new lc;uc=new ic({recordCanvas:v,mutationCb:j,win:window,blockClass:n,blockSelector:o,mirror:dc,sampling:w.canvas,dataURLOptions:b});const Z=new Yl({mutationCb:z,scrollCb:W,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:P,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:v,inlineImages:A,sampling:w,slimDOMOptions:F,iframeManager:G,stylesheetManager:V,canvasManager:uc,keepIframeSrcFn:E,processedNodeManager:Y},mirror:dc});hc=(e=!1)=>{if(!C)return;cc({type:fl.Meta,data:{href:window.location.href,width:rl(),height:tl()}},e),V.reset(),Z.init(),Tl.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new I,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:i=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:S,keepIframeSrcFn:C=()=>!1}=t||{};return $(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:i,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:S,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:dc,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:P,maskTextFn:m,maskInputFn:f,slimDOM:F,dataURLOptions:b,recordCanvas:v,inlineImages:A,onSerialize:e=>{ll(e,dc)&&G.addIframe(e),cl(e,dc)&&V.trackLinkElement(e),hl(e)&&Z.addShadowRoot(Ja(e),document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),Z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:E});t&&(cc({type:fl.FullSnapshot,data:{node:t,initialOffset:el(window)}},e),Tl.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,dc.getId(document)))};try{const e=[],t=e=>{var t;return El(zl)({mutationCb:z,mousemoveCb:(e,t)=>cc({type:fl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.MouseInteraction,...e}}),scrollCb:W,viewportResizeCb:e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.ViewportResize,...e}}),inputCb:e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.Input,...e}}),mediaInteractionCb:e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.MediaInteraction,...e}}),styleSheetRuleCb:e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.StyleSheetRule,...e}}),styleDeclarationCb:e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.StyleDeclaration,...e}}),canvasMutationCb:j,fontCb:e=>cc({type:fl.IncrementalSnapshot,data:{source:ml.Font,...e}}),selectionCb:e=>{cc({type:fl.IncrementalSnapshot,data:{source:ml.Selection,...e}})},customElementCb:e=>{cc({type:fl.IncrementalSnapshot,data:{source:ml.CustomElement,...e}})},blockClass:n,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:P,inlineStylesheet:h,sampling:w,recordDOM:C,recordCanvas:v,inlineImages:A,userTriggeredOnInput:O,collectFonts:M,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:E,blockSelector:o,slimDOMOptions:F,dataURLOptions:b,mirror:dc,iframeManager:G,stylesheetManager:V,shadowDomManager:Z,processedNodeManager:Y,canvasManager:uc,ignoreCSSAttributes:T,plugins:(null==(t=null==R?void 0:R.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>cc({type:fl.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};G.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){}});const r=()=>{hc(),e.push(t(document)),pc=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Xa("DOMContentLoaded",()=>{cc({type:fl.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&r()})),e.push(Xa("load",()=>{cc({type:fl.Load,data:{}}),"load"===x&&r()},window))),()=>{e.forEach(e=>e()),Y.destroy(),pc=!1,Rl=void 0}}catch(e){}}var mc,gc;fc.addCustomEvent=(e,t)=>{if(!pc)throw new Error("please add custom event after start recording");cc({type:fl.Custom,data:{tag:e,payload:t}})},fc.freezePage=()=>{Tl.forEach(e=>e.freeze())},fc.takeFullSnapshot=e=>{if(!pc)throw new Error("please take full snapshot after start recording");hc(e)},fc.mirror=dc,(gc=mc||(mc={}))[gc.NotStarted=0]="NotStarted",gc[gc.Running=1]="Running",gc[gc.Stopped=2]="Stopped";const{addCustomEvent:yc}=fc,{freezePage:wc}=fc,{takeFullSnapshot:bc}=fc;export{fl as EventType,ml as IncrementalSource,gl as MouseInteractions,yc as addCustomEvent,wc as freezePage,Ha as mirror,fc as record,bc as takeFullSnapshot};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaplier/sdk",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "Advanced privacy-first tracking SDK with session replay, heatmaps, and anti-adblock technology",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",