@zaplier/sdk 1.8.1 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/core-ultra.min.js +1 -1
  2. package/dist/index.cjs +1615 -34
  3. package/dist/index.d.ts +11 -7
  4. package/dist/index.esm.js +1615 -34
  5. package/dist/v2/chunks/browser-apis-AyU2utpF.min.js +6 -0
  6. package/dist/v2/chunks/confidence-BslwbUCt.min.js +6 -0
  7. package/dist/v2/chunks/device-signals-2L_62qNZ.min.js +6 -0
  8. package/dist/v2/chunks/dom-blockers-C467-IRd.min.js +6 -0
  9. package/dist/v2/chunks/fingerprint-FfUEEIAd.min.js +6 -0
  10. package/dist/v2/chunks/hardware-9ikfSEs-.min.js +6 -0
  11. package/dist/v2/chunks/incognito-CkKAdE8Z.min.js +6 -0
  12. package/dist/v2/chunks/math-Q4s6nkVD.min.js +6 -0
  13. package/dist/v2/chunks/plugins-enhanced-mUjU1EXe.min.js +6 -0
  14. package/dist/v2/chunks/session-replay-C5Tp0d16.min.js +6 -0
  15. package/dist/v2/chunks/storage-Bl_8oytT.min.js +6 -0
  16. package/dist/v2/chunks/system-DTjxyOZF.min.js +6 -0
  17. package/dist/v2/core.d.ts +289 -7
  18. package/dist/v2/core.min.js +2 -2
  19. package/dist/v2/modules/anti-adblock.js +1 -1
  20. package/dist/v2/modules/browser-apis-DzzjRXFN.js +6 -0
  21. package/dist/v2/modules/confidence-CLylpqVh.js +6 -0
  22. package/dist/v2/modules/device-signals-D-VQg-o6.js +6 -0
  23. package/dist/v2/modules/dom-blockers-D9M2aO9M.js +6 -0
  24. package/dist/v2/modules/fingerprint-Ddq30bun.js +6 -0
  25. package/dist/v2/modules/fingerprint.js +2 -2
  26. package/dist/v2/modules/hardware-BxWqOjae.js +6 -0
  27. package/dist/v2/modules/heatmap.js +1 -1
  28. package/dist/v2/modules/incognito-DpuYoC8S.js +6 -0
  29. package/dist/v2/modules/math-B13vt1ND.js +6 -0
  30. package/dist/v2/modules/plugins-enhanced-D5ft0k0e.js +6 -0
  31. package/dist/v2/modules/replay.js +1 -1
  32. package/dist/v2/modules/storage-D8dcMojB.js +6 -0
  33. package/dist/v2/modules/system-ZMflVbka.js +6 -0
  34. package/package.json +13 -13
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * Zaplier SDK v2.0.0 - Performance Optimized
3
3
  * Advanced privacy-first tracking with code splitting
4
- * (c) 2025 Zaplier Team
4
+ * (c) 2026 Zaplier Team
5
5
  */
6
- class t{constructor(t){this.eventQueue=[],this.isInitialized=!1,this.modules=new Map,this.version="2.0.0",this.config={deferAdvanced:!0,loadTimeout:5e3,debug:!1,...t},this.initializeCore()}initializeCore(){try{this.config.debug&&this.version,this.sessionId=this.generateTempSessionId(),this.visitorId=this.generateTempVisitorId(),this.isInitialized=!0,this.processEventQueue(),this.config.debug,this.config.deferAdvanced||this.scheduleAdvancedLoading()}catch(t){console.error("[Zaplier Core] Initialization failed:",t)}}trackPageView(t={}){this.config.debug;const e={eventType:"page_view",eventName:"page_view",sessionId:this.sessionId,visitorId:this.visitorId,url:window.location.href,referrer:document.referrer,timestamp:(new Date).toISOString(),...t};this.sendEvent(e)}track(t,e={}){this.config.debug;const n={eventType:"custom",eventName:t,sessionId:this.sessionId,visitorId:this.visitorId,timestamp:(new Date).toISOString(),...e};this.sendEvent(n)}async enableAdvancedFeatures(){this.config.debug;try{await this.loadFingerprinting(),this.config.replay&&await this.loadReplayModule(),this.config.debug}catch(t){console.error("[Zaplier Core] Failed to load advanced features:",t)}}async loadFingerprinting(){if(!this.modules.has("fingerprint"))try{const{getCompleteFingerprint:t}=await Promise.resolve().then(function(){return se}),e=await t();e.success&&e.data&&(this.visitorId=e.data.hash||this.visitorId,this.modules.set("fingerprint",e.data),this.config.debug)}catch(t){console.error("[Zaplier Core] Fingerprinting failed:",t)}}async loadReplayModule(){if(!this.modules.has("replay"))try{const{SessionReplayEngine:t}=await Promise.resolve().then(function(){return bh}),e=new t(this.sessionId,this.visitorId,{sampleRate:this.config.replaySampling||.1});e.start()&&(this.modules.set("replay",e),this.config.debug)}catch(t){console.error("[Zaplier Core] Replay loading failed:",t)}}scheduleAdvancedLoading(){((t,e=100)=>{"undefined"!=typeof requestIdleCallback?requestIdleCallback(t,{timeout:this.config.loadTimeout}):setTimeout(t,e)})(()=>this.enableAdvancedFeatures())}async sendEvent(t){try{const e=await fetch(`${this.config.apiEndpoint||"https://api.zaplier.com"}/events?token=${encodeURIComponent(this.config.token)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0});this.config.debug&&!e.ok&&console.warn(`[Zaplier Core] Event sending failed: ${e.status}`)}catch(e){this.eventQueue.push(t),this.config.debug&&console.warn("[Zaplier Core] Event queued for retry:",e)}}processEventQueue(){if(0===this.eventQueue.length)return;const t=[...this.eventQueue];this.eventQueue=[],t.forEach(t=>this.sendEvent(t))}generateTempSessionId(){const t=new Date,e=t.getFullYear()+(t.getMonth()+1).toString().padStart(2,"0")+t.getDate().toString().padStart(2,"0"),n=t.getHours().toString().padStart(2,"0");return`temp_${Date.now()}_${e}_${n}`}generateTempVisitorId(){return`temp_visitor_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}getVisitorInfo(){return{visitorId:this.visitorId,sessionId:this.sessionId,isReady:this.isInitialized,hasFingerprint:this.modules.has("fingerprint")}}}function e(e){return new t(e)}function n(t,e){const n=t[1]+e[1]&4294967295;return[t[0]+e[0]+(n<t[1]?1:0)&4294967295,n]}function i(t,e){const n=65535&t[1],i=t[1]>>>16,r=65535&e[1],o=e[1]>>>16,s=n*o+i*r&4294967295,a=i*o+(s>>>16),c=n*r+((65535&s)<<16)&4294967295;return[t[0]*e[1]+t[1]*e[0]+a&4294967295,c]}function r(t,e){return 0==(e%=64)?t:e<32?[4294967295&(t[0]<<e|t[1]>>>32-e),4294967295&(t[1]<<e|t[0]>>>32-e)]:(e-=32,[4294967295&(t[1]<<e|t[0]>>>32-e),4294967295&(t[0]<<e|t[1]>>>32-e)])}function o(t,e){return[t[0]^e[0],t[1]^e[1]]}function s(t){let e=t;return e=o(e,[0,e[0]>>>1]),e=i(e,[4283543511,3981806797]),e=o(e,[0,e[0]>>>1]),e=i(e,[3301882366,444984403]),e=o(e,[0,e[0]>>>1]),e}function a(t,e=0){const a=function(t){const e=[];for(let n=0;n<t.length;n+=4){let i=0;for(let e=Math.min(3,t.length-n-1);e>=0;e--)i=i<<8|t.charCodeAt(n+e);e.push(i)}return e}(t),c=Math.floor(a.length/4);let l=[0,e],u=[0,e];const h=[2277735313,289559509],f=[1291169091,658871167];for(let t=0;t<c;t++){const e=4*t,s=4*t+2;let c=[a[e+1]||0,a[e]||0],d=[a[s+1]||0,a[s]||0];c=i(c,h),c=r(c,31),c=i(c,f),l=o(l,c),l=r(l,27),l=n(l,u),l=n(i(l,[0,5]),[0,1390208809]),d=i(d,f),d=r(d,33),d=i(d,h),u=o(u,d),u=r(u,31),u=n(u,l),u=n(i(u,[0,5]),[0,944331445])}const d=4*c,p=a.length-d;let m=[0,0],g=[0,0];return p>=12&&(g=o(g,[a[d+3]||0,0])),p>=8&&(g=o(g,[0,a[d+2]||0]),g=i(g,f),g=r(g,33),g=i(g,h),u=o(u,g)),p>=4&&(m=o(m,[a[d+1]||0,0])),p>=1&&(m=o(m,[0,a[d]||0]),m=i(m,h),m=r(m,31),m=i(m,f),l=o(l,m)),l=o(l,[0,t.length]),u=o(u,[0,t.length]),l=n(l,u),u=n(u,l),l=s(l),u=s(u),l=n(l,u),u=n(u,l),(l[0]>>>0).toString(16).padStart(8,"0")+(l[1]>>>0).toString(16).padStart(8,"0")+((u[0]>>>0).toString(16).padStart(8,"0")+(u[1]>>>0).toString(16).padStart(8,"0"))}function c(t){let e=0;if(0===t.length)return e.toString(36);for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e&=e;return Math.abs(e).toString(36)}function l(t){return["duration","timestamp","error","errors","collectionTime","startTime","endTime","_timestamp"].includes(t)||t.endsWith("_timestamp")||t.endsWith("Timestamp")}function u(t){if(null==t)return null;if(Array.isArray(t))return t.map(t=>u(t)).filter(t=>null!==t).sort((t,e)=>JSON.stringify(t).localeCompare(JSON.stringify(e)));if("object"==typeof t){const e=Object.keys(t).sort(),n={};for(const i of e){if(l(i))continue;const e=u(t[i]);null!==e&&(n[i]=e)}return n}return"number"==typeof t?Number.isFinite(t)?Math.abs(t)<1e-4?0:Math.abs(t)>1e6?t>0?1e6:-1e6:Number(t>=.1&&t<=10?t.toFixed(3):t.toFixed(2)):0:"string"==typeof t?t.trim().toLowerCase():"boolean"==typeof t?t:null}const h={SAMPLE_RATE:44100,DURATION:.1,FREQUENCIES:[440,1e3,1760,3520],COMPRESSOR_THRESHOLD:-50,COMPRESSOR_KNEE:40,COMPRESSOR_RATIO:12,COMPRESSOR_ATTACK:.003,COMPRESSOR_RELEASE:.25,FILTER_FREQUENCY:2e3,GAIN_VALUE:.5,DELAY_TIME:.02};function f(){try{const t=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(!t)return null;const e=44100,n=h.DURATION;return new t(1,Math.floor(e*n),e)}catch{return null}}async function d(t){try{const e=h.FREQUENCIES.map((e,n)=>{const i=t.createOscillator(),r=["sine","square","sawtooth","triangle"],o=r[n%r.length];return i.type=o||"sine",i.frequency.setValueAtTime(e,t.currentTime),i}),n=t.createDynamicsCompressor(),i=t.createBiquadFilter(),r=t.createGain(),o=t.createDelay(),s=t.createAnalyser();n.threshold.setValueAtTime(h.COMPRESSOR_THRESHOLD,t.currentTime),n.knee.setValueAtTime(h.COMPRESSOR_KNEE,t.currentTime),n.ratio.setValueAtTime(h.COMPRESSOR_RATIO,t.currentTime),n.attack.setValueAtTime(h.COMPRESSOR_ATTACK,t.currentTime),n.release.setValueAtTime(h.COMPRESSOR_RELEASE,t.currentTime),i.type="bandpass",i.frequency.setValueAtTime(h.FILTER_FREQUENCY,t.currentTime),i.Q.setValueAtTime(.7,t.currentTime),r.gain.setValueAtTime(h.GAIN_VALUE,t.currentTime),o.delayTime.setValueAtTime(h.DELAY_TIME,t.currentTime);const a=t.createGain();a.gain.setValueAtTime(.25,t.currentTime),e.forEach(t=>{t.connect(a)}),a.connect(i),i.connect(n),n.connect(r),r.connect(o),o.connect(s),s.connect(t.destination),e.forEach((t,e)=>{t.start(.01*e),t.stop(h.DURATION)});const l=(await t.startRendering()).getChannelData(0),u=[];for(let t=0;t<32;t++){const e=Math.floor(l.length/32*t);u.push(l[e]||0)}const f=Math.sqrt(u.reduce((t,e)=>t+e*e,0)/u.length),d=Math.max(...u.map(Math.abs)),p=u.reduce((t,e)=>t+Math.abs(e),0)/u.length;let m=0;for(let t=0;t<Math.min(u.length,16);t++){const e=u[t];void 0!==e&&(m+=t*Math.abs(e))}return c([...u,f,d,p,m].join(","))}catch(t){return c("multi_oscillator_error")}}async function p(t){try{const e=[100,440,1e3,2e3,4e3,8e3,12e3,16e3],n=[];for(const i of e){const e=t.createOscillator(),r=t.createAnalyser();e.type="sine",e.frequency.setValueAtTime(i,t.currentTime),r.fftSize=256,r.smoothingTimeConstant=0,e.connect(r),r.connect(t.destination),e.start(),e.stop(.05);const o=f();if(o){const t=o.createOscillator();t.type="sine",t.frequency.setValueAtTime(i,o.currentTime),t.connect(o.destination),t.start(),t.stop(.05);try{const t=(await o.startRendering()).getChannelData(0),e=Math.sqrt(t.reduce((t,e)=>t+e*e,0)/t.length);n.push(e)}catch{n.push(0)}}}return c(n.join(","))}catch(t){return c("frequency_response_error")}}async function m(t){try{const e=t.createOscillator(),n=t.createDynamicsCompressor();e.type="triangle",e.frequency.setValueAtTime(h.FREQUENCIES[0],t.currentTime),n.threshold.setValueAtTime(h.COMPRESSOR_THRESHOLD,t.currentTime),n.knee.setValueAtTime(h.COMPRESSOR_KNEE,t.currentTime),n.ratio.setValueAtTime(h.COMPRESSOR_RATIO,t.currentTime),n.attack.setValueAtTime(h.COMPRESSOR_ATTACK,t.currentTime),n.release.setValueAtTime(h.COMPRESSOR_RELEASE,t.currentTime),e.connect(n),n.connect(t.destination),e.start(),e.stop(h.DURATION);const i=(await t.startRendering()).getChannelData(0);return c([i[0]||0,i[Math.floor(.25*i.length)]||0,i[Math.floor(.5*i.length)]||0,i[Math.floor(.75*i.length)]||0,i[i.length-1]||0].join(","))}catch(t){return c("compressor_error")}}async function g(){var t;const e=performance.now();try{const n=function(){try{const t=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(t)try{return new t(1,1,44100).sampleRate}catch{}const e=window.AudioContext||window.webkitAudioContext;if(e)try{const t=new e,n=t.sampleRate;return t.close().catch(()=>{}),n}catch{}}catch{}return 44100}(),i=function(){const t={};try{const e=f();if(e){t.sampleRate=e.sampleRate,t.length=e.length,t.state=e.state;const n=[],i=[8e3,22050,44100,48e3,96e3];for(const t of i)try{const e=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,1,t);e.sampleRate===t&&n.push(t),"close"in e&&"function"==typeof e.close&&e.close()}catch{}t.supportedSampleRates=n,"baseLatency"in e&&(t.baseLatency=e.baseLatency),"close"in e&&"function"==typeof e.close&&e.close()}}catch(e){t.error="context_characteristics_error"}return t}(),r={multiOsc:f(),compressor:f(),frequencyResponse:f()};if(!r.multiOsc||!r.compressor||!r.frequencyResponse)throw new Error("OfflineAudioContext not available");const[o,s,a]=await Promise.all([d(r.multiOsc).catch(()=>"multi_oscillator_error"),m(r.compressor).catch(()=>"compressor_error"),p(r.frequencyResponse).catch(()=>"frequency_response_error")]),l={};try{const t=f();if(t){const e=["createOscillator","createAnalyser","createBiquadFilter","createConvolver","createDelay","createDynamicsCompressor","createGain","createWaveShaper","createStereoPanner","createChannelSplitter","createChannelMerger"];for(const n of e)try{"function"==typeof t[n]&&(t[n](),l[n]=!0)}catch{l[n]=!1}"close"in t&&"function"==typeof t.close&&t.close()}}catch{}const u=c([o,s,a,n.toString(),JSON.stringify(i),JSON.stringify(l)].join("|")),h=performance.now();return{value:{oscillator:o,compressor:s,sampleRate:n,maxChannelCount:(null===(t=i.supportedSampleRates)||void 0===t?void 0:t.length)||2,multiOscillatorFingerprint:o,frequencyResponseFingerprint:a,contextCharacteristics:i,nodeCapabilities:l,audioStackHash:u,supportedSampleRates:i.supportedSampleRates||[]},duration:h-e}}catch(t){return{value:{oscillator:"error",compressor:"error",sampleRate:0,maxChannelCount:0,multiOscillatorFingerprint:"error",frequencyResponseFingerprint:"error",contextCharacteristics:{},nodeCapabilities:{},audioStackHash:"error",supportedSampleRates:[]},duration:performance.now()-e,error:t instanceof Error?t.message:"Audio fingerprinting failed"}}}function y(){try{return"WebKitAppearance"in document.documentElement.style||"webkitRequestFileSystem"in window||"webkitResolveLocalFileSystemURL"in window||Boolean(window.safari)}catch{return!1}}function w(){try{return"ontouchstart"in window&&("orientation"in window||"onorientationchange"in window)&&/android/i.test(navigator.userAgent)}catch{return!1}}function v(){try{if("brave"in navigator&&navigator.brave)return!0;const t=navigator.userAgent;return!!t.includes("Brave")||!(!window.chrome||!window.chrome.runtime||window.chrome.webstore||window.navigator.getBattery||!/Chrome/.test(t))}catch{return!1}}function b(){try{const t=navigator.userAgent;return!!(t.includes("Arc/")||window.arc||window.Arc||window.chrome&&window.chrome.runtime&&/Chrome/.test(t)&&(t.includes("ArcBrowser")||"arc:"===window.location.protocol))}catch{return!1}}function S(){try{if(window.opr||window.opera)return!0;const t=navigator.userAgent;return!(!t.includes("OPR/")&&!t.includes("Opera/"))}catch{return!1}}function C(){try{return!!navigator.userAgent.includes("Vivaldi/")||!!window.vivaldi}catch{return!1}}function k(){try{const t=navigator.userAgent;return t.includes("SamsungBrowser/")||t.includes("Samsung Internet")}catch{return!1}}function I(){try{return!(v()||b()||S()||C()||A()||k())&&Boolean(window.chrome&&(window.chrome.webstore||window.chrome.runtime)&&/Chrome/.test(navigator.userAgent)&&!/Edg|OPR|Opera|Vivaldi|SamsungBrowser|Arc|Brave/.test(navigator.userAgent))}catch{return!1}}function M(){try{return"InstallTrigger"in window||"mozInnerScreenX"in window||"mozPaintCount"in window||Boolean(navigator.mozApps)}catch{return!1}}function A(){try{return"msCredentials"in navigator||Boolean(window.StyleMedia)||I()&&/edg/i.test(navigator.userAgent)}catch{return!1}}function R(){try{return y()&&!I()&&!A()&&Boolean(window.safari)&&/safari/i.test(navigator.userAgent)}catch{return!1}}function x(){try{return window.isSecureContext||"https:"===location.protocol}catch{return!1}}function E(){try{return"webkitTemporaryStorage"in navigator||navigator.storage&&navigator.storage.estimate&&navigator.storage.estimate().then(t=>(t.quota||0)<104857600),!1}catch{return!1}}function T(){return v()||b()||S()||C()||k()||I()?"Blink":A()?"EdgeHTML/Blink":M()?"Gecko":y()||R()?"WebKit":"Unknown"}function _(){const t=function(){try{if(v())return"Brave";if(b())return"Arc";if(S())return"Opera";if(C())return"Vivaldi";if(k())return"Samsung Internet";if(A())return"Edge";if(M())return"Firefox";if(R())return"Safari";if(I())return"Chrome";const t=navigator.userAgent;return/Firefox/i.test(t)&&!I()?"Firefox":/Safari/i.test(t)&&!I()?"Safari":/Chrome/i.test(t)?"Chrome":"Unknown"}catch{return"Unknown"}}(),e=T(),n=["Brave","Arc","Opera","Vivaldi","Samsung Internet","Edge","Chrome"].includes(t);let i=t.toLowerCase();return n&&"Chrome"!==t&&(i=`${t.toLowerCase()}-chromium`),{name:t,engine:e,isChromiumBased:n,family:i}}function O(){try{return"undefined"!=typeof document&&"function"==typeof document.createElement&&void 0!==document.body}catch{return!1}}function F(){try{if(!O())return!1;const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(!e)return!1;const n=e,i=n.getParameter(n.RENDERER),r=Boolean(i&&"string"==typeof i),o=n.getExtension("WEBGL_lose_context");return o&&o.loseContext(),r}catch{return!1}}function N(){try{return!(!window.AudioContext&&!window.webkitAudioContext)}catch{return!1}}function B(){const t=O(),e=function(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia}catch{return!1}}();return{engine:T(),supportsDOM:t,supportsMediaQueries:e,supportsWebGL:F(),supportsAudio:N(),isSecure:x(),isPrivateMode:E(),canRunDOMBlockers:(y()||w())&&t,canRunAccessibility:e,canRunBrowserAPIs:t&&"undefined"!=typeof navigator}}async function L(){const t=performance.now();try{const e=function(){try{const t=navigator.language||"";let e=[];navigator.languages?e=Array.from(navigator.languages):navigator.language&&(e=[navigator.language]);const n=[navigator.userLanguage,navigator.browserLanguage,navigator.systemLanguage].filter(Boolean);return e=[...new Set([...e,...n])],{language:t,languages:e}}catch{return{language:"",languages:[]}}}(),n=function(){try{let t="";if(Intl&&Intl.DateTimeFormat)try{t=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}if(!t){const e=new Date(2024,0,1).getTimezoneOffset(),n=e>0?"-":"+",i=Math.floor(Math.abs(e)/60),r=Math.abs(e)%60;t=`UTC${n}${i.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}return{timezone:t,timezoneOffset:new Date(2024,0,1).getTimezoneOffset()}}catch{return{timezone:"",timezoneOffset:0}}}(),i=function(){try{return{platform:navigator.platform||"",userAgent:navigator.userAgent||""}}catch{return{platform:"",userAgent:""}}}(),r=function(){try{const t=navigator.hardwareConcurrency||0;let e;"deviceMemory"in navigator&&(e=navigator.deviceMemory);const n={hardwareConcurrency:t};return void 0!==e&&(n.deviceMemory=e),n}catch{return{hardwareConcurrency:0}}}(),o=function(){try{const t=!1!==navigator.cookieEnabled;let e=null;return"doNotTrack"in navigator?e=navigator.doNotTrack:"msDoNotTrack"in navigator?e=navigator.msDoNotTrack:"mozDoNotTrack"in window&&(e=window.mozDoNotTrack),{cookieEnabled:t,doNotTrack:e}}catch{return{cookieEnabled:!0,doNotTrack:null}}}(),s=function(){try{if(!navigator.plugins)return{length:0,names:[]};const t=Array.from(navigator.plugins).map(t=>t.name).filter(t=>t).sort();return{length:navigator.plugins.length,names:t.slice(0,10)}}catch{return{length:0,names:[]}}}(),a=function(){try{let t=0,e=!1,n=!1;"maxTouchPoints"in navigator?t=navigator.maxTouchPoints:"msMaxTouchPoints"in navigator&&(t=navigator.msMaxTouchPoints);try{e="TouchEvent"in window}catch{e="ontouchstart"in window}return n="ontouchstart"in window,{maxTouchPoints:t,touchEvent:e,touchStart:n}}catch{return{maxTouchPoints:0,touchEvent:!1,touchStart:!1}}}(),c=function(){try{return _()}catch{return{name:"Unknown",engine:"Unknown",isChromiumBased:!1,family:"unknown"}}}(),l=performance.now(),u={language:e.language,languages:e.languages,timezone:n.timezone,timezoneOffset:n.timezoneOffset,platform:i.platform,userAgent:i.userAgent,browserInfo:c,hardwareConcurrency:r.hardwareConcurrency,cookieEnabled:o.cookieEnabled,doNotTrack:o.doNotTrack,plugins:s,touchSupport:a};return void 0!==r.deviceMemory&&(u.deviceMemory=r.deviceMemory),{value:u,duration:l-t}}catch(e){return{value:{language:"",languages:[],timezone:"",timezoneOffset:0,platform:"",userAgent:"",hardwareConcurrency:0,cookieEnabled:!0,doNotTrack:null,plugins:{length:0,names:[]},touchSupport:{maxTouchPoints:0,touchEvent:!1,touchStart:!1}},duration:performance.now()-t,error:e instanceof Error?e.message:"Browser fingerprinting failed"}}}const P=["Zap Canvas 🎨🔒2024","Żółć gęślą jaźń €$¢£¥","αβγδεζηθικλμνξο","中文测试字体渲染","🌟🎯🚀💎🌊🎨"];function D(t){t.imageSmoothingEnabled=!0,t.imageSmoothingQuality="high";const e=t.createRadialGradient(75,75,0,75,75,50);e.addColorStop(0,"rgba(255, 0, 0, 0.8)"),e.addColorStop(.3,"rgba(0, 255, 0, 0.6)"),e.addColorStop(.7,"rgba(0, 0, 255, 0.4)"),e.addColorStop(1,"rgba(255, 255, 0, 0.2)"),t.fillStyle=e,t.fillRect(10,10,130,100),t.fillStyle="rgba(102, 204, 0, 0.7)",t.fillRect(15.5,15.3,49.7,49.2),t.fillStyle="#f60",t.fillRect(70.3,10.7,50.1,50.9),t.beginPath(),t.moveTo(25.2,120.1),t.bezierCurveTo(25.2,120.1,75.8,90.3,125.5,120.7),t.bezierCurveTo(125.5,120.7,90.1,150.2,60.8,140.9),t.closePath(),t.fillStyle="rgba(200, 100, 50, 0.6)",t.fill(),t.globalCompositeOperation="multiply",t.beginPath(),t.arc(50.7,80.3,20.1,0,2*Math.PI),t.fillStyle="rgba(255, 0, 100, 0.5)",t.fill(),t.beginPath(),t.arc(70.3,80.7,20.9,0,2*Math.PI),t.fillStyle="rgba(0, 255, 100, 0.5)",t.fill(),t.globalCompositeOperation="source-over",t.strokeStyle="rgba(50, 50, 50, 0.8)",t.lineWidth=.5,t.setLineDash([2.3,1.7]);for(let e=0;e<10;e++)t.beginPath(),t.moveTo(10+13.7*e,160),t.lineTo(50+11.3*e,200),t.stroke();t.setLineDash([]);const n=document.createElement("canvas");n.width=20,n.height=20;const i=n.getContext("2d");if(i){i.fillStyle="rgba(150, 75, 200, 0.3)",i.fillRect(0,0,10,10),i.fillRect(10,10,10,10);const e=t.createPattern(n,"repeat");e&&(t.fillStyle=e,t.fillRect(150,120,80,60))}t.shadowColor="rgba(0, 0, 0, 0.5)",t.shadowBlur=3.2,t.shadowOffsetX=2.1,t.shadowOffsetY=2.7,t.fillStyle="rgba(100, 200, 150, 0.8)",t.fillRect(160,30,60,40),t.shadowColor="transparent",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0}function j(t){const e=["14px Arial, sans-serif",'13px "Times New Roman", serif',"12px Georgia, serif","15px Helvetica, Arial, sans-serif",'11px "Courier New", monospace',"13px Verdana, sans-serif","16px Impact, fantasy",'12px "Comic Sans MS", cursive'],n=["#000","#333","#666","#999","rgba(255, 0, 0, 0.8)","rgba(0, 255, 0, 0.7)","rgba(0, 0, 255, 0.6)","rgba(128, 64, 192, 0.9)"],i=["top","hanging","middle","alphabetic","bottom"],r=["left","center","right"];let o=250;P.forEach((s,a)=>{e.forEach((e,c)=>{const l=(a+c)%n.length,u=c%i.length,h=c%r.length;t.font=e,t.fillStyle=n[l]||n[0],t.textBaseline=i[u]||"top",t.textAlign=r[h]||"left";const f=10+.7*c%200,d=o+18.3*c%100;t.fillText(s,f,d),c%2==0&&(t.strokeStyle=`rgba(${100+20*c}, ${50+15*c}, ${150+10*c}, 0.5)`,t.lineWidth=.3,t.strokeText(s,f+.5,d+.5))}),o+=120}),t.save(),t.translate(100,400),t.rotate(Math.PI/6),t.scale(1.2,.8),t.font="italic 14px Arial",t.fillStyle="rgba(200, 100, 50, 0.8)",t.fillText("Transformed & Rotated Text",0,0),t.restore(),t.font="6px Arial",t.fillStyle="#000",t.fillText("Tiny text rendering test",10,500),t.font="32px Arial",t.fillStyle="rgba(255, 0, 0, 0.5)",t.fillText("Large",10,540),t.textAlign="left",t.textBaseline="top"}async function U(){const t=performance.now();try{const e=document.createElement("canvas");e.width=300,e.height=600;const n=e.getContext("2d",{alpha:!0,desynchronized:!1,colorSpace:"srgb",willReadFrequently:!0});if(!n)throw new Error("Canvas 2D context not available");n.rect(0,0,10,10),n.rect(2,2,6,6);const i=n.isPointInPath(5,5,"evenodd");j(n);const r=c(e.toDataURL("image/png"));n.clearRect(0,0,e.width,e.height),D(n);const o=c(e.toDataURL("image/png")),s=function(t,e){try{t.clearRect(0,0,e.width,e.height),t.fillStyle="rgb(100, 150, 200)",t.fillRect(10.3,10.7,20.1,20.9),t.strokeStyle="rgb(200, 100, 50)",t.lineWidth=1.3,t.beginPath(),t.moveTo(15.2,35.8),t.lineTo(25.7,45.1),t.stroke();const n=t.getImageData(10,10,30,40).data;let i=0,r=0,o=0,s=0,a=0;for(let t=0;t<n.length;t+=4){const e=n[t]||0,c=n[t+1]||0,l=n[t+2]||0;if((n[t+3]||0)>25&&(i+=e,r+=c,o+=l,a++,t>=16)){const i=n[t-16]||0,r=Math.abs(e-i);r>=8&&(s+=r)}}if(0===a)return"no-valid-pixels";return`${10*Math.round(i/a/10)}-${10*Math.round(r/a/10)}-${10*Math.round(o/a/10)}-${10*Math.round(s/a/10)}`}catch(t){return"subpixel-error"}}(n,e),a=function(t,e,n,i){const r=[];let o=0;try{const s=i.getImageData(0,0,1,1);s&&0!==s.data.length||(r.push("getImageData-blocked"),o+=3),(t.length<8||e.length<8)&&(r.push("short-hash"),o+=2);const a=["error","blocked","disabled","00000000","ffffffff","12345678"];(a.includes(t)||a.includes(e))&&(r.push("known-blocked-hash"),o+=3),("subpixel-error"===n||n.includes("0-0-0"))&&(r.push("subpixel-anomaly"),o+=2),t===e&&"error"!==t&&(r.push("identical-hashes"),o+=2);const c=document.createElement("canvas");c.width=10,c.height=10;const l=c.getContext("2d");if(l){const t=performance.now();l.fillStyle="red",l.fillRect(0,0,10,10),c.toDataURL(),performance.now()-t>50&&(r.push("slow-canvas"),o+=1)}return{isInconsistent:o>=2,confidence:Math.min(o/5,1),reasons:r}}catch(t){return{isInconsistent:!0,confidence:1,reasons:["detection-error"]}}}(r,o,s,n);n.clearRect(0,0,e.width,e.height),j(n),n.globalCompositeOperation="multiply",D(n),n.globalCompositeOperation="source-over";const l=c(e.toDataURL("image/png")),u=performance.now();return{value:{text:r,geometry:o,winding:i,isInconsistent:a.isInconsistent,subPixelAnalysis:s,compositeHash:l,inconsistencyConfidence:a.confidence,blockingReasons:a.reasons},duration:u-t}}catch(e){return{value:{text:"error",geometry:"error",winding:!1,isInconsistent:!0,subPixelAnalysis:"error",compositeHash:"error",inconsistencyConfidence:1,blockingReasons:["canvas-error"]},duration:performance.now()-t,error:e instanceof Error?e.message:"Canvas fingerprinting failed"}}}const G=["Arial","Arial Black","Calibri","Cambria","Comic Sans MS","Consolas","Courier New","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Microsoft Sans Serif","Palatino Linotype","Segoe UI","Tahoma","Times New Roman","Trebuchet MS","Verdana","American Typewriter","Avenir","Baskerville","Big Caslon","Brush Script MT","Copperplate","Didot","Futura","Gill Sans","Helvetica","Helvetica Neue","Hoefler Text","Lucida Grande","Marker Felt","Optima","Papyrus","Phosphate","Rockwell","Savoye LET","SignPainter","Skia","Snell Roundhand","System Font","Zapfino","DejaVu Sans","DejaVu Sans Mono","DejaVu Serif","Droid Sans","Droid Sans Mono","Droid Serif","Liberation Sans","Liberation Sans Narrow","Liberation Serif","Ubuntu","Ubuntu Mono","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Droid Sans","Droid Sans Mono","Droid Serif","Helvetica Neue","Arial","Helvetica","Courier New","Times New Roman","San Francisco","Avenir Next","Open Sans","Lato","Montserrat","Source Sans Pro","Raleway","PT Sans","Lora","Playfair Display","Oswald","Slabo 27px","Fira Sans","Hiragino Sans","Hiragino Kaku Gothic ProN","Meiryo","MS Gothic","MS Mincho","SimSun","SimHei","Microsoft YaHei","Malgun Gothic","Apple SD Gothic Neo"],W=["monospace","sans-serif","serif"],$="mmMwWLliI0O&1 ※";function V(t,e){const n=document.createElement("canvas").getContext("2d");if(!n)return{width:0,height:0};n.font=`12px ${e}`;const i=n.measureText(t);return{width:i.width,height:i.actualBoundingBoxAscent+i.actualBoundingBoxDescent}}function Z(t,e){const n=document.createElement("span");n.style.position="absolute",n.style.left="-9999px",n.style.top="-9999px",n.style.fontSize="12px",n.style.fontFamily=e,n.style.whiteSpace="nowrap",n.textContent=t,document.body.appendChild(n);const i=n.getBoundingClientRect(),r={width:i.width,height:i.height};return document.body.removeChild(n),r}function Y(t,e="canvas"){const n="canvas"===e?V:Z,i=W.map(t=>n($,t)),r=W.map(e=>n($,`${t}, ${e}`));for(let t=0;t<i.length;t++){const e=i[t],n=r[t];if(e&&n){const t=Math.abs(e.width-n.width),i=Math.abs(e.height-n.height);if(t>.1||i>.1)return!0}}return!1}function z(t){return 10*Math.round(t/10)}async function H(){const t=performance.now();try{const e=function(){try{return{width:screen.width||0,height:screen.height||0}}catch{return{width:0,height:0}}}(),n=screen.colorDepth||screen.pixelDepth||0,i=function(){try{return window.devicePixelRatio||1}catch{return 1}}(),r=function(){try{const t=screen.availWidth||0,e=screen.availHeight||0;return 0===t&&0===e?{width:z(screen.width||0),height:z(screen.height||0)}:{width:z(t),height:z(e)}}catch{return{width:z(screen.width||0),height:z(screen.height||0)}}}(),o=function(){try{const t=document.documentElement,e=Math.max(t.clientWidth||0,window.innerWidth||0),n=Math.max(t.clientHeight||0,window.innerHeight||0);return{width:z(e),height:z(n)}}catch{const t=window.innerWidth||0,e=window.innerHeight||0;return{width:z(t),height:z(e)}}}(),s=function(){try{if(screen.orientation)return{angle:screen.orientation.angle,type:screen.orientation.type};const t=screen.mozOrientation||screen.msOrientation||screen.webkitOrientation;if(void 0!==t)return{angle:t,type:"unknown"};const e=screen.width>screen.height;return{angle:e?90:0,type:e?"landscape-primary":"portrait-primary"}}catch{return}}(),a=performance.now(),c={width:e.width,height:e.height,colorDepth:n,pixelRatio:i,availableWidth:r.width,availableHeight:r.height,viewportWidth:o.width,viewportHeight:o.height};return s&&(c.orientation=s),{value:c,duration:a-t}}catch(e){return{value:{width:0,height:0,colorDepth:0,pixelRatio:1,viewportWidth:0,viewportHeight:0,availableWidth:0,availableHeight:0},duration:performance.now()-t,error:e instanceof Error?e.message:"Screen fingerprinting failed"}}}let X=null,J=0,K=0;function q(){try{const t=performance.now();if(X&&X.isValid)if(t-X.timestamp<18e5){if(X.context&&!X.context.isContextLost())return X.usageCount++,X.lastUsed=t,X.context;Q()}else Q();if(J>=8)return console.warn("[WebGL Cache] Maximum context limit reached, reusing existing contexts"),null;const e=function(){try{if("undefined"==typeof document)return null;const t=document.createElement("canvas");return t.width=1,t.height=1,t}catch{return null}}();if(!e)return null;const n=function(t){try{const e={alpha:!1,antialias:!1,depth:!1,stencil:!1,preserveDrawingBuffer:!1,failIfMajorPerformanceCaveat:!0,powerPreference:"default"};return t.getContext("webgl",e)||t.getContext("experimental-webgl",e)}catch{return null}}(e);return n?(J++,K++,X={context:n,canvas:e,timestamp:t,isValid:!0,usageCount:1,lastUsed:t},n):null}catch(t){return Q(),null}}function Q(){if(X){try{if(X.context){const t=X.context.getExtension("WEBGL_lose_context");t&&t.loseContext()}X.canvas&&(X.canvas.width=0,X.canvas.height=0),J>0&&J--}catch{J>0&&J--}X.isValid=!1,X=null}}function tt(){if(!X||!X.context)return!1;try{return!X.context.isContextLost()}catch{return!1}}function et(){const t=q();if(!t)return[];try{const e=t.getSupportedExtensions();return e?Array.from(e).sort():[]}catch{return[]}}function nt(){const t=q();if(!t)return{};try{const e={},n=["VERSION","VENDOR","RENDERER","SHADING_LANGUAGE_VERSION","MAX_TEXTURE_SIZE","MAX_RENDERBUFFER_SIZE","MAX_VIEWPORT_DIMS","MAX_VERTEX_ATTRIBS","MAX_VERTEX_UNIFORM_VECTORS","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_VARYING_VECTORS"];for(const i of n)try{const n=t[i];void 0!==n&&(e[i]=t.getParameter(n))}catch{}return e}catch{return{}}}function it(){try{Q(),J=0,K=0}catch(t){console.warn("[WebGL Cache] Cleanup error:",t)}}if("undefined"!=typeof window&&(window.addEventListener("beforeunload",it),window.addEventListener("pagehide",it),window.addEventListener("unload",it),document.addEventListener("visibilitychange",()=>{}),"memory"in performance&&"function"==typeof performance.memory.addEventListener))try{performance.memory.addEventListener("memorypressure",it)}catch(t){}var rt=Object.freeze({__proto__:null,cleanupWebGLCache:it,forceCleanupWebGL:function(){Q(),J=0},getCachedWebGLContext:q,getCachedWebGLExtensions:et,getCachedWebGLParameters:nt,invalidateWebGLCache:Q,isWebGLContextValid:tt});const ot={VENDOR:7936,RENDERER:7937,VERSION:7938,SHADING_LANGUAGE_VERSION:35724,MAX_VERTEX_ATTRIBS:34921,MAX_TEXTURE_SIZE:3379,MAX_RENDERBUFFER_SIZE:34024,MAX_VIEWPORT_DIMS:3386,ALIASED_LINE_WIDTH_RANGE:33902,ALIASED_POINT_SIZE_RANGE:33901,MAX_FRAGMENT_UNIFORM_VECTORS:36349,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661};function st(t,e,n){const i=t.createShader(e);return i?(t.shaderSource(i,n),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS)?i:(t.deleteShader(i),null)):null}function at(t){try{const e=t.getParameter(t.VENDOR)||"unknown",n=t.getParameter(t.RENDERER)||"unknown",i=t.getParameter(t.VERSION)||"unknown",r=`${e}|${n}|${i}|${t.getParameter(t.MAX_TEXTURE_SIZE)||0}|${t.getParameter(t.MAX_VERTEX_ATTRIBS)||0}|${t.getParameter(t.MAX_VIEWPORT_DIMS)||[0,0]}`;let o=0;for(let t=0;t<r.length;t++)o=(o<<5)-o+r.charCodeAt(t)&4294967295;return`fallback_${Math.abs(o).toString(16)}`}catch{return"webgl_unavailable"}}async function ct(){const t=performance.now();try{if(!ut())throw new Error("WebGL not supported in this browser");const e=q();if(!e)throw new Error("WebGL context not available");if(!tt())throw new Error("WebGL context lost");const n=function(){try{return nt()}catch{return{}}}(),i=n.VENDOR||"unknown",r=n.RENDERER||"unknown",o=n.VERSION||"unknown";let s=i,a=r;for(let t=0;t<3;t++)try{const t=e.getExtension("WEBGL_debug_renderer_info");if(t){const n=e.getParameter(t.UNMASKED_VENDOR_WEBGL),i=e.getParameter(t.UNMASKED_RENDERER_WEBGL);n&&"unknown"!==n&&(s=n),i&&"unknown"!==i&&(a=i);break}}catch(e){if(2===t)break;await new Promise(t=>setTimeout(t,10))}const c=function(){try{return et()}catch{return[]}}(),l=function(t){const e={};return Object.entries(ot).forEach(([n,i])=>{const r=function(t,e){try{return t.getParameter(e)}catch{return null}}(t,i);null!==r&&(e[n]=Array.isArray(r)?r.join(","):r)}),["UNMASKED_VENDOR_WEBGL","UNMASKED_RENDERER_WEBGL"].forEach(n=>{try{const i=t.getExtension("WEBGL_debug_renderer_info");if(i){const r=i[n];if(void 0!==r){const i=t.getParameter(r);i&&(e[n]=i)}}}catch{}}),e}(e),u=function(t){const e=[],n=[];try{const i=[t.LOW_FLOAT,t.MEDIUM_FLOAT,t.HIGH_FLOAT,t.LOW_INT,t.MEDIUM_INT,t.HIGH_INT],r=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"];for(let o=0;o<i.length;o++){const s=i[o];if(void 0===s)continue;const a=t.getShaderPrecisionFormat(t.VERTEX_SHADER,s),c=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,s);a&&e.push(`${r[o]}:${a.precision},${a.rangeMin},${a.rangeMax}`),c&&n.push(`${r[o]}:${c.precision},${c.rangeMin},${c.rangeMax}`)}}catch{}return{vertex:e.join(";"),fragment:n.join(";")}}(e),h=function(t){var e,n,i,r;try{const o="\n attribute vec2 a_position;\n attribute vec3 a_color;\n varying vec3 v_color;\n uniform float u_time;\n \n void main() {\n // Complex mathematical operations to differentiate GPUs\n float wave = sin(a_position.x * 10.0 + u_time) * 0.1;\n vec2 position = a_position + vec2(wave, cos(a_position.y * 8.0) * 0.1);\n \n // GPU-specific floating point calculations\n float precision = sin(position.x * 123.456) + cos(position.y * 789.012);\n position += vec2(precision * 0.001);\n \n gl_Position = vec4(position, 0.0, 1.0);\n v_color = a_color;\n }\n ",s="\n precision mediump float;\n varying vec3 v_color;\n uniform float u_time;\n \n void main() {\n // Complex color calculations that vary between GPU vendors\n vec3 color = v_color;\n color.r += sin(gl_FragCoord.x * 0.1 + u_time) * 0.1;\n color.g += cos(gl_FragCoord.y * 0.1 + u_time) * 0.1;\n color.b += sin((gl_FragCoord.x + gl_FragCoord.y) * 0.05) * 0.1;\n \n // GPU-specific precision in color calculations\n color = normalize(color) * length(v_color);\n \n gl_FragColor = vec4(color, 1.0);\n }\n ",a=st(t,t.VERTEX_SHADER,o),c=st(t,t.FRAGMENT_SHADER,s);if(!a||!c)return at(t);const l=function(t,e,n){const i=t.createProgram();return i?(t.attachShader(i,e),t.attachShader(i,n),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS)?i:(t.deleteProgram(i),null)):null}(t,a,c);if(!l)return at(t);t.useProgram(l);const u=new Float32Array([-.8,-.6,1,.2,.3,0,.8,.3,1,.2,.8,-.6,.2,.3,1,-.5,-.2,.8,.9,.1,.3,.6,.1,.8,.9,.7,-.3,.9,.1,.8]),h=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,h),t.bufferData(t.ARRAY_BUFFER,u,t.STATIC_DRAW);const f=t.getAttribLocation(l,"a_position"),d=t.getAttribLocation(l,"a_color"),p=t.getUniformLocation(l,"u_time");t.enableVertexAttribArray(f),t.enableVertexAttribArray(d),t.vertexAttribPointer(f,2,t.FLOAT,!1,20,0),t.vertexAttribPointer(d,3,t.FLOAT,!1,20,8),t.uniform1f(p,1.23456789),t.enable(t.BLEND),t.blendFunc(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA),t.clearColor(.1,.2,.3,1),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLES,0,6);const m=new Uint8Array(t.canvas.width*t.canvas.height*4);t.readPixels(0,0,t.canvas.width,t.canvas.height,t.RGBA,t.UNSIGNED_BYTE,m);let g=0;for(let t=0;t<m.length;t+=4){const o=1*(null!==(e=m[t])&&void 0!==e?e:0);g=33*g+(o+256*(null!==(n=m[t+1])&&void 0!==n?n:0)+65536*(null!==(i=m[t+2])&&void 0!==i?i:0)+16777216*(null!==(r=m[t+3])&&void 0!==r?r:0))>>>0}return t.deleteProgram(l),t.deleteShader(a),t.deleteShader(c),t.deleteBuffer(h),g.toString(16)}catch(e){return at(t)}}(e),f=function(t){var e;const n={};try{const i=t.getExtension("WEBGL_debug_renderer_info");i&&(n.unmaskedVendor=t.getParameter(i.UNMASKED_VENDOR_WEBGL),n.unmaskedRenderer=t.getParameter(i.UNMASKED_RENDERER_WEBGL)),n.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE),n.maxCombinedTextureImageUnits=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),n.maxViewportDims=t.getParameter(t.MAX_VIEWPORT_DIMS),n.maxRenderbufferSize=t.getParameter(t.MAX_RENDERBUFFER_SIZE),n.maxVertexAttribs=t.getParameter(t.MAX_VERTEX_ATTRIBS),n.maxVertexUniformVectors=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),n.maxFragmentUniformVectors=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),n.maxVaryingVectors=t.getParameter(t.MAX_VARYING_VECTORS),n.antialias=(null===(e=t.getContextAttributes())||void 0===e?void 0:e.antialias)||!1;const r=t.getExtension("OES_texture_float");n.floatTextures=!!r;const o=t.getExtension("OES_texture_half_float");n.halfFloatTextures=!!o;const s=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS);n.compressedTextureFormats=Array.isArray(s)?s.length:0;const a=t instanceof WebGL2RenderingContext;if(n.webgl2=a,a){const e=t;n.maxColorAttachments=e.getParameter(e.MAX_COLOR_ATTACHMENTS),n.maxDrawBuffers=e.getParameter(e.MAX_DRAW_BUFFERS),n.maxTexture3DSize=e.getParameter(e.MAX_3D_TEXTURE_SIZE)}const c=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE);n.lineWidthRange=Array.isArray(c)?c.join(","):"";const l=t.getParameter(t.ALIASED_POINT_SIZE_RANGE);n.pointSizeRange=Array.isArray(l)?l.join(","):""}catch(t){}return n}(e),d=(()=>{const t=`${s||i||""}|${a||r||""}`.toLowerCase();let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)&4294967295;return Math.abs(e).toString(16)})(),p=performance.now();return{value:{vendor:s,renderer:a,version:o,extensions:c,parameters:l,shaderPrecision:u,renderHash:h,capabilities:f,vendorRendererHash:d,contextAttributes:e.getContextAttributes()||{}},duration:p-t}}catch(e){return{value:{vendor:"unknown",renderer:"unknown",version:"unknown",extensions:[],parameters:{},shaderPrecision:{vertex:"",fragment:""},renderHash:"",capabilities:{},vendorRendererHash:"",contextAttributes:{}},duration:performance.now()-t,error:e instanceof Error?e.message:"WebGL fingerprinting failed"}}}let lt=null;function ut(){if(null!==lt)return lt;try{const t=document.createElement("canvas");t.width=1,t.height=1;const e=t.getContext("webgl",{failIfMajorPerformanceCaveat:!0,antialias:!1,alpha:!1,depth:!1,stencil:!1,preserveDrawingBuffer:!1})||t.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0,antialias:!1,alpha:!1,depth:!1,stencil:!1,preserveDrawingBuffer:!1}),n=null!==e;if(e&&"getExtension"in e)try{const t=e.getExtension("WEBGL_lose_context");t&&t.loseContext()}catch(t){}return t.width=0,t.height=0,lt=n,n}catch{return lt=!1,!1}}function ht(){try{for(const t of["rec2020","p3","srgb"]){const e=kt(`(color-gamut: ${t})`);if(null==e?void 0:e.matches)return t}return"unknown"}catch{return"unknown"}}function ft(){try{const t=kt("(forced-colors: active)");if(null==t?void 0:t.matches)return!0;const e=kt("(forced-colors: none)");return!(null==e?void 0:e.matches)&&null}catch{return null}}function dt(){try{const t=["no-preference","high","more","low","less","forced"];for(const e of t){const t=kt(`(prefers-contrast: ${e})`);if(null==t?void 0:t.matches)return"high"===e?"more":"low"===e?"less":e}return"unknown"}catch{return"unknown"}}function pt(){try{const t=kt("(prefers-reduced-motion: reduce)");if(null==t?void 0:t.matches)return!0;const e=kt("(prefers-reduced-motion: no-preference)");return!(null==e?void 0:e.matches)&&null}catch{return null}}function mt(){try{return!!matchMedia("(prefers-reduced-transparency: reduce)").matches||!matchMedia("(prefers-reduced-transparency: no-preference)").matches&&null}catch{return null}}function gt(){try{for(let t=8;t>=0;t--)if(matchMedia(`(monochrome: ${t})`).matches)return t;return 0}catch{return 0}}function yt(){try{return!!matchMedia("(inverted-colors: inverted)").matches||!matchMedia("(inverted-colors: none)").matches&&null}catch{return null}}function wt(){try{return!!matchMedia("(dynamic-range: high)").matches||!matchMedia("(dynamic-range: standard)").matches&&null}catch{return null}}function vt(){try{const t=[48,36,30,24,16,15,8];for(const e of t)if(matchMedia(`(color: ${e})`).matches)return e;return screen.colorDepth||24}catch{return screen.colorDepth||24}}function bt(){try{return matchMedia("(hover: hover)").matches?"hover":matchMedia("(hover: none)").matches?"none":"unknown"}catch{return"unknown"}}function St(){try{return matchMedia("(pointer: fine)").matches?"fine":matchMedia("(pointer: coarse)").matches?"coarse":matchMedia("(pointer: none)").matches?"none":"unknown"}catch{return"unknown"}}function Ct(){return B().canRunAccessibility}function kt(t){try{return Ct()?matchMedia(t):null}catch(t){return null}}function It(){try{return!!matchMedia("(prefers-reduced-data: reduce)").matches||!matchMedia("(prefers-reduced-data: no-preference)").matches&&null}catch{return null}}function Mt(){try{const t=["fullscreen","standalone","minimal-ui","browser"];for(const e of t)if(matchMedia(`(display-mode: ${e})`).matches)return e;return"unknown"}catch{return"unknown"}}function At(){try{const t=["opaque","additive","subtractive"];for(const e of t)if(matchMedia(`(environment-blending: ${e})`).matches)return e;return"unknown"}catch{return"unknown"}}function Rt(){try{return!!matchMedia("(any-hover: hover)").matches||!matchMedia("(any-hover: none)").matches&&null}catch{return null}}function xt(){try{return matchMedia("(any-pointer: fine)").matches?"fine":matchMedia("(any-pointer: coarse)").matches?"coarse":matchMedia("(any-pointer: none)").matches?"none":"unknown"}catch{return"unknown"}}function Et(){try{return matchMedia("(prefers-color-scheme: dark)").matches?"dark":matchMedia("(prefers-color-scheme: light)").matches?"light":matchMedia("(prefers-color-scheme: no-preference)").matches?"no-preference":"unknown"}catch{return"unknown"}}function Tt(){const t=ht(),e=ft(),n=dt(),i=pt(),r=mt(),o=gt(),s=yt(),a=wt(),c=vt(),l=bt(),u=St(),h=It(),f=Mt(),d=At(),p=Rt(),m=xt(),g=Et(),y=Boolean(e||i||r||s||h||"no-preference"!==n||"no-preference"!==g||o>0),w=[t,a?"hdr":"sdr",`${c}bit`,o>0?`mono${o}`:"color",g,f,d].join("-"),v=[l,u,p?"anyhover":"nohover",m].join("-");return{colorGamut:t,forcedColors:e,contrastPreference:n,reducedMotion:i,reducedTransparency:r,monochromeDepth:o,invertedColors:s,hdrSupport:a,enhancedColorDepth:c,hoverCapability:l,pointerCapability:u,reducedData:h,displayMode:f,environmentBlending:d,anyHover:p,anyPointer:m,colorScheme:g,hasAccessibilityFeatures:y,displayCapabilities:w,interactionCapabilities:v}}function _t(t){const e=["unknown"!==t.colorGamut,null!==t.forcedColors,"unknown"!==t.contrastPreference,null!==t.reducedMotion,null!==t.reducedTransparency,null!==t.invertedColors,null!==t.hdrSupport,null!==t.reducedData,"unknown"!==t.displayMode,"unknown"!==t.environmentBlending,null!==t.anyHover,"unknown"!==t.colorScheme],n=e.filter(Boolean).length/e.length,i=[null!==t.reducedData,"unknown"!==t.displayMode,"unknown"!==t.environmentBlending,"unknown"!==t.colorScheme,null!==t.hdrSupport],r=i.filter(Boolean).length/i.length,o=[!0===t.forcedColors,!0===t.reducedMotion,!0===t.reducedTransparency,!0===t.invertedColors,!0===t.reducedData,"no-preference"!==t.contrastPreference,"dark"===t.colorScheme,t.monochromeDepth>0],s=o.filter(Boolean).length/o.length,a=["srgb"!==t.colorGamut,!0===t.forcedColors,!0===t.reducedMotion,!0===t.reducedTransparency,!0===t.invertedColors,!0===t.reducedData,t.monochromeDepth>0,!0===t.hdrSupport,"browser"!==t.displayMode,"opaque"!==t.environmentBlending,"dark"===t.colorScheme],c=a.filter(Boolean).length/a.length;return{confidence:Math.round(100*n)/100,uniqueness:Math.round(100*c)/100,accessibilityScore:Math.round(100*s)/100,modernBrowserScore:Math.round(100*r)/100}}var Ot=Object.freeze({__proto__:null,analyzeAccessibilityFingerprint:_t,getAccessibilityFingerprint:Tt,getAnyHover:Rt,getAnyPointer:xt,getColorGamut:ht,getColorScheme:Et,getContrastPreference:dt,getDisplayMode:Mt,getEnhancedColorDepth:vt,getEnvironmentBlending:At,getForcedColors:ft,getHDRSupport:wt,getHoverCapability:bt,getInvertedColors:yt,getMonochromeDepth:gt,getPointerCapability:St,getReducedData:It,getReducedMotion:pt,getReducedTransparency:mt,isAccessibilityDetectionAvailable:Ct});function Ft(t){if("number"==typeof t)return{confidence:0,uniqueness:0,intlApiSupport:0,localeComplexity:0};const e=Object.values(t.intlSupport).filter(Boolean).length/Object.keys(t.intlSupport).length,n=[t.locale,t.calendar,t.numberingSystem,t.timeZone,t.dateStyle,t.timeStyle,t.hourCycle,t.numberLocale,t.currencyDisplay,t.currencySign,t.notation,t.signDisplay,t.listStyle,t.relativeTimeStyle,t.pluralRules],i=n.filter(t=>"unknown"!==t&&""!==t).length/n.length,r=[t.locale.length>2?1:0,"gregory"!==t.calendar?1:0,"latn"!==t.numberingSystem?1:0,t.hour12?1:0,t.localeMatch?0:1].reduce((t,e)=>t+e,0)/5,o=(i+e+r)/3;return{confidence:Math.round(100*i)/100,uniqueness:Math.round(100*o)/100,intlApiSupport:Math.round(100*e)/100,localeComplexity:Math.round(100*r)/100}}const Nt="mmMwWLliI0fiflO&1",Bt={default:{text:Nt},serif:{style:{fontFamily:"serif"},text:Nt},sans:{style:{fontFamily:"sans-serif"},text:Nt},mono:{style:{fontFamily:"monospace"},text:Nt},apple:{style:{font:"-apple-system-body"},text:Nt},system:{style:{fontFamily:"system-ui"},text:Nt},min:{style:{fontSize:"1px"},text:Nt},large:{style:{fontSize:"72px"},text:Nt},ui:{style:{fontFamily:"ui-serif"},text:Nt},emoji:{style:{fontFamily:"Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji"},text:"🎯🔥💯"},math:{style:{fontFamily:"STIX Two Math, Cambria Math"},text:"∑∆∇∂"},cjk:{style:{fontFamily:"Hiragino Sans, Microsoft YaHei, SimSun"},text:"中文测试"},arabic:{style:{fontFamily:"Tahoma, Arial Unicode MS"},text:"اختبار"},hebrew:{style:{fontFamily:"Tahoma, Arial Unicode MS"},text:"בדיקה"},subpixel:{style:{fontFamily:"Arial",fontSize:"11px",textRendering:"optimizeLegibility"},text:Nt},kerning:{style:{fontFamily:"Times",fontSize:"24px",fontKerning:"normal"},text:"AV To"},ligatures:{style:{fontFamily:"Times",fontSize:"24px",fontVariantLigatures:"common-ligatures"},text:"ffi ffl fi fl"}};function Lt(t,e,n){try{const i="mmmmmmmmmmlli",r=Pt(t,e,{style:{fontFamily:n},text:i}),o=Pt(t,e,{style:{fontFamily:"monospace"},text:i});if(Math.abs(r-o)<1)return"monospace-fallback";const s=Pt(t,e,{style:{fontFamily:"sans-serif"},text:i});return Math.abs(r-s)<1?"sans-serif-fallback":"native-font"}catch(t){return"fallback-error"}}function Pt(t,e,n){const i=t.createElement("span"),{style:r={},text:o=Nt}=n;i.textContent=o,i.style.cssText="position: absolute; left: 0; top: 0; white-space: nowrap; visibility: hidden;",Object.entries(r).forEach(([t,e])=>{void 0!==e&&(i.style[t]=e)}),e.appendChild(i);const s=i.getBoundingClientRect().width;return e.removeChild(i),Math.round(100*s)/100}function Dt(t){const e=[t.default,t.serif,t.sans,t.mono,t.apple,t.system,t.min,t.large,t.ui,t.emoji,t.math,t.cjk,t.arabic,t.hebrew,t.subpixel,t.kerning,t.ligatures],n=e.some(t=>t>0),i=e.filter(t=>t>0).length,r=e.length;let o=n?i/r:0;(t.antiAliasing.enabled||t.systemFontHints.clearType)&&(o+=.2),Object.keys(t.fallbackBehavior).length>0&&(o+=.1),o=Math.min(o,1);const s=t.apple>0||t.system>0,a=[t.subpixel,t.kerning,t.ligatures,t.emoji,t.math].some(t=>t>0)||t.antiAliasing.enabled||t.systemFontHints.clearType,c=e.reduce((t,e)=>t+e,0)/e.length,l=e.reduce((t,e)=>t+Math.pow(e-c,2),0)/e.length;let u=Math.min(l/100,1);t.antiAliasing.smoothingLevel>0&&(u+=.1),t.systemFontHints.hintingLevel>0&&(u+=.1),u=Math.min(u,1);let h="low";const f=t.antiAliasing.smoothingLevel;f>50||t.systemFontHints.clearType?h="high":(f>20||t.systemFontHints.hintingLevel>2)&&(h="medium");const d="error"!==t.isolatedHash&&t.isolatedHash.length>0;return{confidence:Math.round(100*o)/100,uniqueness:Math.round(100*u)/100,hasSystemFonts:s,hasAdvancedFeatures:a,renderingQuality:h,isolationIntegrity:d}}const jt=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF","Arial","Arial Black","Comic Sans MS","Courier New","Georgia","Impact","Palatino Linotype","Tahoma","Times New Roman","Trebuchet MS","Verdana","American Typewriter","Avenir","Baskerville","Big Caslon","Brush Script MT","Copperplate","Didot","Futura","Helvetica","Hoefler Text","Lucida Grande","Marker Felt","Optima","Papyrus","Phosphate","Rockwell","Savoye LET","SignPainter","Skia","Snell Roundhand","Zapfino","DejaVu Sans","DejaVu Sans Mono","DejaVu Serif","Liberation Sans","Liberation Serif","Ubuntu","Ubuntu Mono"],Ut="mmMwWLliI0O&1",Gt="48px",Wt=["monospace","sans-serif","serif"];function $t(t,e){const n=t.createElement("span");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.fontFamily=e,n.style.fontSize=Gt,n.style.whiteSpace="nowrap",n.textContent=Ut,n}function Vt(t,e,n){return $t(t,`'${e}',${n}`)}function Zt(t,e){return Wt.some((n,i)=>{const r=t[i],o=e[n];return!(!r||!o||r.offsetWidth===o.width&&r.offsetHeight===o.height)})}function Yt(t){const{available:e,method:n,precision:i,totalTested:r,detectionTime:o}=t;let s=.5;"iframe"===n?s=.9:"dom"===n&&(s=.7),s*=i;const a=e.filter(t=>["Calibri","Segoe UI Light","MS UI Gothic","Arial Unicode MS"].includes(t)).length,c=e.filter(t=>["Helvetica Neue","Avenir","Menlo","Zapfino","Baskerville"].includes(t)).length,l=e.filter(t=>["DejaVu Sans","Liberation Sans","Ubuntu"].includes(t)).length,u=e.filter(t=>["sans-serif-thin","Roboto"].includes(t)).length;let h="unknown";a>=2?h="windows":c>=2?h="macos":l>=1?h="linux":u>=1&&(h="android");const f=Math.min(o<100?1:.8,1),d=["Arial","Times New Roman","Helvetica"],p=e.filter(t=>!d.includes(t)),m=Math.min(p.length/10,1);return{confidence:Math.round(100*s)/100,uniqueness:Math.round(100*m)/100,osSignature:h,browserCapabilities:Math.round(100*f)/100}}function zt(t){return`${t.available.sort().join(",")}|${t.method}|${t.precision.toFixed(2)}`}const Ht=Math,Xt=()=>0;function Jt(){const t=Ht.acos||Xt,e=Ht.acosh||Xt,n=Ht.asin||Xt,i=Ht.asinh||Xt,r=Ht.atanh||Xt,o=Ht.atan||Xt,s=Ht.sin||Xt,a=Ht.sinh||Xt,c=Ht.cos||Xt,l=Ht.cosh||Xt,u=Ht.tan||Xt,h=Ht.tanh||Xt,f=Ht.exp||Xt,d=Ht.expm1||Xt,p=Ht.log1p||Xt,m=Ht.cbrt||Xt,g=Ht.hypot||Xt,y=Ht.log10||Xt,w=Ht.log2||Xt;return{acos:t(.12312423423423424),asin:n(.12312423423423424),atan:o(.5),cos:c(10.000000000123),sin:s(-1e300),tan:u(-1e300),acosh:e(1e308),asinh:i(1),atanh:r(.5),cosh:l(1),sinh:a(1),tanh:h(1),exp:f(1),expm1:d(1),log1p:p(10),powPI:Ht.pow(Ht.PI,-100),cbrt:m(27),hypot:g(3,4),log10:y(100),log2:w(8),acoshPf:(v=1e154,Ht.log(v+Ht.sqrt(v*v-1))),asinhPf:Ht.log(1+Ht.sqrt(2)),atanhPf:Ht.log(3)/2,sinhPf:(Ht.exp(1)-Ht.exp(-1))/2,coshPf:(Ht.exp(1)+Ht.exp(-1))/2,expm1Pf:Ht.exp(1)-1,tanhPf:(Ht.exp(2)-1)/(Ht.exp(2)+1),log1pPf:Ht.log(11),precision:{float32:Ht.abs(0),float64:Ht.abs(2-2.0000000000000004),bigNumbers:Ht.abs(1),smallNumbers:Ht.abs(1e-15+2e-15-3e-15)}};var v}function Kt(){try{const t=Jt();return[t.acos,t.asin,t.atan,t.cos,t.sin,t.tan,t.acosh,t.asinh,t.atanh,t.cosh,t.sinh,t.tanh,t.exp,t.expm1,t.log1p,t.powPI,t.cbrt,t.hypot,t.log10,t.log2,t.precision.float32,t.precision.float64,t.precision.bigNumbers,t.precision.smallNumbers].join(",")}catch{return"math-unavailable"}}function qt(t){let e=.9,n=.8;Object.values(t).some(t=>"number"==typeof t&&0!==t)||(e=.1,n=.1),e*=Object.values(t.precision).reduce((t,e)=>t+("number"!=typeof e||isNaN(e)?0:1),0)/4;let i="high";return e<.3?i="low":e<.7&&(i="medium"),{confidence:Math.round(100*e)/100,stability:i,uniqueness:Math.round(100*n)/100}}const Qt={gdprMode:!1,includeInvasive:!0,timeout:5e3,debug:!1,excludeComponents:[]},te=new Map;function ee(t,e){return!(e.excludeComponents.includes(t)||e.gdprMode&&!e.includeInvasive&&["canvas","webgl","audio","fontPreferences","enhancedFonts"].includes(t)||(["mathFingerprint","dateTimeLocale","accessibilityEnhanced","fontPreferences","enhancedFonts"].includes(t),0))}function ne(t,e){te.set(t,e)}async function ie(t,e,n){const i=`${t}_${n.gdprMode}`,r=(o=i,te.get(o)||null);var o;if(r)return r;const s="webgl"===t,a=["canvas","webgl","audio","hardware","system"].includes(t),c=s?2:a?3:1,l=s?[200,500]:[100,250,500];for(let r=0;r<c;r++)try{const o=n.timeout+r*(s?2e3:1e3),a=new Promise((e,n)=>{setTimeout(()=>n(new Error(`${t} timeout after ${o}ms (attempt ${r+1})`)),o)}),c=await Promise.race([e(),a]);if(null!=c)return ne(i,c),c;throw new Error(`${t} returned null/undefined result`)}catch(e){const n=r===c-1,i=e instanceof Error?e.message:String(e);if(s&&i.includes("context")){console.warn(`[RabbitTracker] WebGL context issue detected: ${i}`);try{const{forceCleanupWebGL:t}=await Promise.resolve().then(function(){return rt});t()}catch(t){}return null}if(n)return console.warn(`[RabbitTracker] Component ${t} failed after ${c} attempts: ${i}`),null;!i.includes("timeout")&&r<l.length&&await new Promise(t=>setTimeout(t,l[r])),s&&await new Promise(t=>setTimeout(t,100))}return null}async function re(t={}){var e,n,i,r,o,s;const l=performance.now(),h={...Qt,...t},f=[],d=[],p={collectionTime:l,gdprMode:h.gdprMode,components:[]},m=[];if(ee("canvas",h)&&function(){try{const t=document.createElement("canvas").getContext("2d");return null!==t&&"function"==typeof t.fillText}catch{return!1}}()&&m.push(ie("canvas",U,h).then(t=>({component:"canvas",result:t}))),ee("webgl",h)&&ut()&&m.push(ie("webgl",ct,h).then(t=>({component:"webgl",result:t}))),ee("audio",h)&&function(){try{return"function"==typeof(window.OfflineAudioContext||window.webkitOfflineAudioContext)||"function"==typeof(window.AudioContext||window.webkitAudioContext)}catch{return!1}}()&&m.push(ie("audio",g,h).then(t=>({component:"audio",result:t}))),ee("fonts",h)&&function(){try{const t=document.createElement("span");return t&&"object"==typeof t.style}catch{return!1}}()&&m.push(ie("fonts",()=>async function(t=!0){const e=performance.now();try{let n;if(t&&function(){try{const t=document.createElement("canvas").getContext("2d");return null!==t&&"function"==typeof t.measureText}catch{return!1}}()){const{available:t,measurements:e}=function(){const t=[],e={};for(const n of G)try{const i=V($,n);e[n]=i,Y(n,"canvas")&&t.push(n)}catch(t){continue}return{available:t,measurements:e}}();n={available:t.sort(),method:"advanced",measurements:e}}else n={available:function(){const t=[];for(const e of G)try{Y(e,"dom")&&t.push(e)}catch(t){continue}return t}().sort(),method:"basic"};return{value:n,duration:performance.now()-e}}catch(t){return{value:{available:[],method:"basic"},duration:performance.now()-e,error:t instanceof Error?t.message:"Font detection failed"}}}(!h.gdprMode),h).then(t=>({component:"fonts",result:t}))),ee("screen",h)&&function(){try{return"object"==typeof screen&&"number"==typeof screen.width&&"number"==typeof screen.height}catch{return!1}}()&&m.push(ie("screen",H,h).then(t=>({component:"screen",result:t}))),ee("browser",h)&&function(){try{return"object"==typeof navigator&&null!==navigator}catch{return!1}}()&&m.push(ie("browser",L,h).then(t=>({component:"browser",result:t}))),(await Promise.allSettled(m)).forEach((t,e)=>{var n,i;if("fulfilled"===t.status&&t.value.result){const{component:e,result:n}=t.value;p[e]=n,f.push(e)}else{const r=m[e],o=(null===(n=null==r?void 0:r.toString().match(/component: "(\w+)"/))||void 0===n?void 0:n[1])||"unknown";d.push({component:o,error:"rejected"===t.status?(null===(i=t.reason)||void 0===i?void 0:i.message)||"Promise rejected":"Collection failed or timeout"})}}),!h.gdprMode)try{const{detectIncognitoHeuristics:t}=await Promise.resolve().then(function(){return Sh}),e=await t();e&&(p.incognitoDetection={likelihood:e.likelihood,methods:e.methods},f.push("incognito"))}catch(t){d.push({component:"incognito",error:t instanceof Error?t.message:"Incognito detection failed"})}if(ee("hardware",h))try{const t=await Promise.resolve().then(function(){return Ah}).catch(()=>null);if(null===(e=null==t?void 0:t.isHardwareDetectionAvailable)||void 0===e?void 0:e.call(t)){const e=null===(n=t.getHardwareFingerprint)||void 0===n?void 0:n.call(t);e&&(p.hardware={value:e,duration:0},f.push("hardware"))}else if(!t){const t={hardwareConcurrency:navigator.hardwareConcurrency||0,deviceMemory:navigator.deviceMemory||0,platform:navigator.platform||"unknown"};p.hardware={value:t,duration:0},f.push("hardware")}}catch(t){d.push({component:"hardware",error:t instanceof Error?t.message:"Hardware detection failed"})}if(ee("system",h))try{const{getSystemFingerprint:t,isSystemDetectionAvailable:e}=await Promise.resolve().then(function(){return _h});if(e()){const e=t();e&&(p.system={value:e,duration:0},f.push("system"))}}catch(t){d.push({component:"system",error:t instanceof Error?t.message:"System detection failed"})}if(ee("storage",h))try{const{getStorageFingerprint:t,isStorageDetectionAvailable:e}=await Promise.resolve().then(function(){return Ph});if(e()){const e=performance.now(),n=await t(),i=performance.now()-e;n&&(p.storage={value:n,duration:i},f.push("storage"))}}catch(t){d.push({component:"storage",error:t instanceof Error?t.message:"Storage detection failed"})}if(ee("math",h))try{const{getCompleteMathFingerprint:t,isMathDetectionAvailable:e}=await Promise.resolve().then(function(){return Gh});if(e()){const e=performance.now(),n=t(),i=performance.now()-e;n&&(p.math={value:n,duration:i},f.push("math"))}}catch(t){d.push({component:"math",error:t instanceof Error?t.message:"Math fingerprinting failed"})}if(ee("domBlockers",h))try{const{getDomBlockersFingerprint:t,isDomBlockersDetectionAvailable:e}=await Promise.resolve().then(function(){return Xh});if(e()){const e=performance.now(),n=await t({debug:h.debug}),i=performance.now()-e;n&&(p.domBlockers={value:n,duration:i},f.push("domBlockers"))}}catch(t){d.push({component:"domBlockers",error:t instanceof Error?t.message:"DOM blockers detection failed"})}if(ee("accessibility",h))try{const{getAccessibilityFingerprint:t,isAccessibilityDetectionAvailable:e}=await Promise.resolve().then(function(){return Ot});if(e()){const e=performance.now(),n=t(),i=performance.now()-e;n&&(p.accessibility={value:n,duration:i},f.push("accessibility"))}}catch(t){d.push({component:"accessibility",error:t instanceof Error?t.message:"Accessibility detection failed"})}if(ee("browserApis",h))try{const{getBrowserApisFingerprint:t,isBrowserApisDetectionAvailable:e}=await Promise.resolve().then(function(){return af});if(e()){const e=performance.now(),n=t(),i=performance.now()-e;n&&(p.browserApis={value:n,duration:i},f.push("browserApis"))}}catch(t){d.push({component:"browserApis",error:t instanceof Error?t.message:"Browser APIs detection failed"})}if(ee("pluginsEnhanced",h))try{const{getEnhancedPluginFingerprint:t,isEnhancedPluginDetectionAvailable:e}=await Promise.resolve().then(function(){return bf});if(e()){const e=performance.now(),n=t(),i=performance.now()-e;n&&(p.pluginsEnhanced={value:n,duration:i},f.push("pluginsEnhanced"))}}catch(t){d.push({component:"pluginsEnhanced",error:t instanceof Error?t.message:"Enhanced plugin detection failed"})}if(ee("mathFingerprint",h)&&function(){try{return"undefined"!=typeof Math&&"function"==typeof Math.sin}catch{return!1}}())try{const t=performance.now(),e=Jt(),n=performance.now()-t;e&&(p.mathFingerprint={value:e,duration:n,analysis:qt(e),hash:Kt()},f.push("mathFingerprint"))}catch(t){d.push({component:"mathFingerprint",error:t instanceof Error?t.message:"Math fingerprinting failed"})}if(ee("fontPreferences",h)&&function(){try{return"undefined"!=typeof document&&"function"==typeof document.createElement&&void 0!==document.body}catch{return!1}}())try{const t=performance.now(),e=await async function(){try{const{document:t,container:e,cleanup:n}=await new Promise((t,e)=>{const n=document.createElement("iframe");n.style.cssText="position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0;",n.srcdoc='<!doctype html>\n <html>\n <head>\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <style>\n body { \n margin: 0; \n padding: 20px; \n width: 4000px;\n text-size-adjust: none;\n -webkit-text-size-adjust: none;\n }\n </style>\n </head>\n <body></body>\n </html>',n.onload=()=>{try{const i=n.contentDocument,r=n.contentWindow;if(!i||!r)return void e(new Error("Cannot access iframe content"));const o=i.body;I()?o.style.zoom=""+1/r.devicePixelRatio:y()&&(o.style.zoom="reset");const s=i.createElement("div");s.textContent=Array(200).fill("word").join(" "),o.appendChild(s),t({document:i,container:o,cleanup:()=>{n.parentNode&&n.parentNode.removeChild(n)}})}catch(t){e(t)}},n.onerror=()=>{e(new Error("Failed to load iframe"))},document.body.appendChild(n)}),i={};for(const[n,r]of Object.entries(Bt))try{i[n]=Pt(t,e,r)}catch(t){i[n]=0}const r=function(t,e,n="Arial"){try{const e=t.createElement("canvas");e.width=100,e.height=50;const i=e.getContext("2d",{willReadFrequently:!0});if(!i)return{quality:0,antiAliasing:!1,smoothing:0};i.font=`24px "${n}"`,i.fillStyle="#000000",i.fillText("Wg",10.5,30.7);const r=i.getImageData(10,20,30,20).data;let o=0,s=0,a=0;for(let t=0;t<r.length;t+=4){const e=r[t]||0,n=r[t+1]||0,i=r[t+2]||0;(r[t+3]||0)<10||(a++,e===n&&n===i&&e>0&&e<255&&s++,t>4&&Math.abs(e-(r[t-4]||0))>50&&o++)}const c=a>0?s/a:0,l=a>0?100*s/a:0;return{quality:Math.round(l),antiAliasing:c>.1,smoothing:Math.round(100*l)/100}}catch(t){return{quality:0,antiAliasing:!1,smoothing:0}}}(t,0,"Arial"),o=function(t){try{const e=t.createElement("canvas");e.width=100,e.height=50;const n=e.getContext("2d",{willReadFrequently:!0});if(!n)return{clearType:!1,hintingLevel:0,subpixelRendering:!1};const i=["rn","il","WW","mm"];let r=0,o=0,s=0;for(const t of i){n.clearRect(0,0,e.width,e.height),n.font="16px Arial",n.fillStyle="#000",n.fillText(t,10,25);const i=n.getImageData(10,15,40,20).data;for(let t=0;t<i.length;t+=12){const e=i[t]||0,n=i[t+1]||0,a=i[t+2]||0,c=i[t+4]||0,l=i[t+5]||0,u=i[t+6]||0;(Math.abs(e-n)>20||Math.abs(n-a)>20)&&r++,Math.abs(e-c)+Math.abs(n-l)+Math.abs(a-u)>50&&o++,(e>0&&e<255||n>0&&n<255||a>0&&a<255)&&s++}}return{clearType:r>10,hintingLevel:Math.min(Math.round(s/10),5),subpixelRendering:o>5}}catch(t){return{clearType:!1,hintingLevel:0,subpixelRendering:!1}}}(t),s={},a=["Arial","Helvetica","Times New Roman","Georgia","Courier New"];for(const n of a)try{s[n]=Lt(t,e,n)}catch(t){s[n]="fallback-error"}const l=c([JSON.stringify(i),JSON.stringify(r),JSON.stringify(o),JSON.stringify(s)].join("|"));return n(),{...i,antiAliasing:{enabled:r.antiAliasing,type:o.clearType?"cleartype":r.antiAliasing?"standard":"none",smoothingLevel:r.smoothing},systemFontHints:o,fallbackBehavior:s,isolatedHash:l}}catch(t){return{...Object.keys(Bt).reduce((t,e)=>(t[e]=0,t),{}),antiAliasing:{enabled:!1,type:"unknown",smoothingLevel:0},systemFontHints:{clearType:!1,hintingLevel:0,subpixelRendering:!1},fallbackBehavior:{},isolatedHash:"error"}}}(),n=performance.now()-t;e&&(p.fontPreferences={value:e,duration:n,analysis:Dt(e),hash:(w=e,w.isolatedHash&&"error"!==w.isolatedHash?w.isolatedHash:[...[w.default,w.serif,w.sans,w.mono,w.apple,w.system,w.min,w.large,w.ui,w.emoji,w.math,w.cjk,w.arabic,w.hebrew,w.subpixel,w.kerning,w.ligatures].map(t=>Math.round(t)),w.antiAliasing.enabled?1:0,w.systemFontHints.clearType?1:0,w.systemFontHints.hintingLevel,Math.round(w.antiAliasing.smoothingLevel)].join(","))},f.push("fontPreferences"))}catch(t){d.push({component:"fontPreferences",error:t instanceof Error?t.message:"Font preferences detection failed"})}var w,v;if(ee("dateTimeLocale",h)&&function(){try{return"undefined"!=typeof window&&void 0!==window.Intl}catch{return!1}}())try{const t=performance.now(),e=function(){const t=function(){try{if(!window.Intl)return-1;const t=window.Intl.DateTimeFormat;if(!t)return-2;const e=(new t).resolvedOptions();return e.locale||""===e.locale?{locale:e.locale||"unknown",calendar:e.calendar||"unknown",numberingSystem:e.numberingSystem||"unknown",timeZone:e.timeZone||"unknown",hourCycle:e.hourCycle||"unknown",hour12:void 0!==e.hour12&&e.hour12}:-3}catch(t){return-2}}();if("number"==typeof t)return t;const e=function(){try{if(!window.Intl||!window.Intl.NumberFormat)return-4;const t=(new Intl.NumberFormat).resolvedOptions(),e=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD"}).resolvedOptions();return{numberLocale:t.locale||"unknown",currencyDisplay:e.currencyDisplay||"unknown",currencySign:e.currencySign||"unknown",notation:t.notation||"unknown",signDisplay:t.signDisplay||"unknown"}}catch(t){return-4}}(),n="number"==typeof e?{}:e,i=function(){const t={listStyle:"unknown",relativeTimeStyle:"unknown",pluralRules:"unknown"};try{if(window.Intl&&window.Intl.ListFormat){const e=(new window.Intl.ListFormat).resolvedOptions();t.listStyle=e.style||"unknown"}}catch(t){}try{if(window.Intl&&window.Intl.RelativeTimeFormat){const e=(new window.Intl.RelativeTimeFormat).resolvedOptions();t.relativeTimeStyle=e.style||"unknown"}}catch(t){}try{if(window.Intl&&window.Intl.PluralRules){const e=(new window.Intl.PluralRules).select(1);t.pluralRules=e||"unknown"}}catch(t){}return t}(),r=function(){const t={DateTimeFormat:!1,NumberFormat:!1,RelativeTimeFormat:!1,ListFormat:!1,PluralRules:!1,Collator:!1};try{window.Intl&&(t.DateTimeFormat="function"==typeof window.Intl.DateTimeFormat,t.NumberFormat="function"==typeof window.Intl.NumberFormat,t.RelativeTimeFormat="function"==typeof window.Intl.RelativeTimeFormat,t.ListFormat="function"==typeof window.Intl.ListFormat,t.PluralRules="function"==typeof window.Intl.PluralRules,t.Collator="function"==typeof window.Intl.Collator)}catch(t){}return t}(),o=navigator.language||"unknown",s=t.locale===o;let a="unknown",c="unknown";try{if(window.Intl&&"function"==typeof window.Intl.DateTimeFormat){const t=new Intl.DateTimeFormat(void 0,{dateStyle:"long"}),e=new Intl.DateTimeFormat(void 0,{timeStyle:"long"}),n=t.resolvedOptions(),i=e.resolvedOptions();a=n.dateStyle||"unknown",c=i.timeStyle||"unknown"}}catch(t){}return{locale:t.locale||"unknown",calendar:t.calendar||"unknown",numberingSystem:t.numberingSystem||"unknown",timeZone:t.timeZone||"unknown",dateStyle:a,timeStyle:c,hourCycle:t.hourCycle||"unknown",hour12:t.hour12||!1,numberLocale:n.numberLocale||t.locale||"unknown",currencyDisplay:n.currencyDisplay||"unknown",currencySign:n.currencySign||"unknown",notation:n.notation||"unknown",signDisplay:n.signDisplay||"unknown",listStyle:i.listStyle||"unknown",relativeTimeStyle:i.relativeTimeStyle||"unknown",pluralRules:i.pluralRules||"unknown",navigatorLanguage:o,localeMatch:s,intlSupport:r}}(),n=performance.now()-t;e&&"object"==typeof e&&(p.dateTimeLocale={value:e,duration:n,analysis:Ft(e),hash:(v=e,"number"==typeof v?`status-${v}`:[v.locale,v.calendar,v.numberingSystem,v.timeZone,v.hourCycle,v.hour12?"1":"0",v.localeMatch?"1":"0",Object.values(v.intlSupport).map(t=>t?"1":"0").join("")].join("|"))},f.push("dateTimeLocale"))}catch(t){d.push({component:"dateTimeLocale",error:t instanceof Error?t.message:"DateTime locale detection failed"})}if(ee("accessibilityEnhanced",h)&&Ct())try{const t=performance.now(),e=Tt(),n=performance.now()-t;e&&(p.accessibilityEnhanced={value:e,duration:n,analysis:_t(e)},f.push("accessibilityEnhanced"))}catch(t){d.push({component:"accessibilityEnhanced",error:t instanceof Error?t.message:"Enhanced accessibility detection failed"})}if(ee("enhancedFonts",h)&&function(){try{return"undefined"!=typeof document&&"function"==typeof document.createElement&&void 0!==document.body}catch{return!1}}())try{const t=performance.now(),e=await async function(){const t=performance.now();try{const{document:e,body:n,cleanup:i}=await new Promise((t,e)=>{const n=document.createElement("iframe");n.style.cssText="position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none;",n.onload=()=>{try{const e=n.contentDocument;if(!e)throw new Error("Cannot access iframe document");const i=e.body;if(!i)throw new Error("Iframe body not available");i.style.fontSize=Gt,i.style.margin="0",i.style.padding="0",t({document:e,body:i,cleanup:()=>{n.parentNode&&n.parentNode.removeChild(n)}})}catch(t){e(t)}},n.onerror=()=>{e(new Error("Failed to load font measurement iframe"))},document.body.appendChild(n)});try{const i=e.createElement("div");i.style.setProperty("visibility","hidden","important");const r=Wt.map(t=>$t(e,t));r.forEach(t=>i.appendChild(t));const o={};for(const t of jt)o[t]=Wt.map(n=>Vt(e,t,n)),o[t].forEach(t=>i.appendChild(t));n.appendChild(i);const s={};Wt.forEach((t,e)=>{const n=r[e];n&&(s[t]={width:n.offsetWidth,height:n.offsetHeight})});const a=[],c={};for(const t of jt){const e=o[t];e&&(Zt(e,s)&&a.push(t),e.length>0&&e[0]&&(c[t]={width:e[0].offsetWidth,height:e[0].offsetHeight}))}const l=performance.now()-t,u=Object.values(c).map(t=>t.width);return{available:a,method:"iframe",measurements:c,precision:new Set(u).size/u.length,totalTested:jt.length,detectionTime:l}}finally{i()}}catch(e){return function(t){const e=[],n={};try{const t=document.createElement("div");t.style.cssText="position: absolute; left: -9999px; top: -9999px; visibility: hidden;";const i={};Wt.forEach(e=>{const n=document.createElement("span");n.style.fontFamily=e,n.style.fontSize=Gt,n.style.whiteSpace="nowrap",n.textContent=Ut,t.appendChild(n),document.body.appendChild(t),i[e]={width:n.offsetWidth,height:n.offsetHeight},document.body.removeChild(t),t.removeChild(n)});for(const r of jt){let o=!1;for(const e of Wt){const s=document.createElement("span");s.style.fontFamily=`'${r}',${e}`,s.style.fontSize=Gt,s.style.whiteSpace="nowrap",s.textContent=Ut,t.appendChild(s),document.body.appendChild(t);const a={width:s.offsetWidth,height:s.offsetHeight};n[r]=a;const c=i[e];if(!c||a.width===c.width&&a.height===c.height||(o=!0),document.body.removeChild(t),t.removeChild(s),o)break}o&&e.push(r)}}catch(t){}const i=performance.now()-t,r=Object.values(n).map(t=>t.width),o=new Set(r).size;return{available:e,method:"dom",measurements:n,precision:r.length>0?o/r.length:0,totalTested:jt.length,detectionTime:i}}(t)}}(),n=performance.now()-t;e&&(p.enhancedFonts={value:e,duration:n,analysis:Yt(e),hash:zt(e)},f.push("enhancedFonts"))}catch(t){d.push({component:"enhancedFonts",error:t instanceof Error?t.message:"Enhanced font detection failed"})}const b={};let S;f.forEach(t=>{const e=p[t];e&&e.value&&(b[t]=e.value)});try{const{calculateConfidence:t}=await Promise.resolve().then(function(){return If}),e=[...f.map(t=>{var e,n;return{component:t,success:!0,duration:(null===(e=p[t])||void 0===e?void 0:e.duration)||0,value:null===(n=p[t])||void 0===n?void 0:n.value}}),...d.map(t=>({component:t.component,success:!1,duration:0,error:t.error}))];S=t(e,{requireMinimumComponents:6,penalizeMissingCore:!0,adjustForIncognito:!0}),p.confidence={score:S.score,level:S.level,factors:S.factors,recommendations:S.recommendations}}catch(t){const e=f.length/(f.length+d.length||1);p.confidence={score:e>=.8?.95:e>=.6?.8:.5,level:e>=.8?"High":e>=.6?"Medium":"Low",factors:{componentCount:f.length,weightedScore:e,stabilityScore:e,entropyScore:e,spoofResistanceScore:e},recommendations:e<.8?["Enable more fingerprinting components"]:[]}}const C={...p,hash:"",components:f,collectionTime:performance.now()-l},k={success:f.length>0,collectedComponents:f,failedComponents:d,confidence:S||p.confidence};if(f.length>0){const t=null===(i=C.browser)||void 0===i?void 0:i.value,e=null===(r=C.screen)||void 0===r?void 0:r.value,n=(null==t?void 0:t.userAgent)||"",c=(()=>{var t;const n=!0===(null===(t=navigator.userAgentData)||void 0===t?void 0:t.mobile),i=navigator.maxTouchPoints||0,r=(null==e?void 0:e.width)||0,o=(null==e?void 0:e.height)||0,s=Math.min(r,o);return Math.max(r,o),n?"mobile":i>0?s<=480?"mobile":"tablet":s>1024?"desktop":s<=480?"mobile":"desktop"})();let l={};try{const{collectDeviceSignals:t}=await Promise.resolve().then(function(){return Of});l=t()}catch(t){}const p={ua:(()=>{try{return _().family}catch{const t=n,e=t.match(/(chrome|safari|firefox|edge|edg|brave|opera|opr|chromium)/i);return((null==e?void 0:e[1])||t.split(" ")[0]||"unknown").toLowerCase()}})(),timezone:(null==t?void 0:t.timezone)||"unknown",primaryLanguage:(()=>{try{const e=null==t?void 0:t.languages;return Array.isArray(e)&&e.length>0&&e[0]?e[0].toLowerCase().split("-")[0]:"undefined"!=typeof navigator&&navigator.language?navigator.language.toLowerCase().split("-")[0]:"unknown"}catch{return"unknown"}})(),platform:((null==t?void 0:t.platform)||"unknown").toLowerCase(),deviceType:c,hardware:(()=>{var t;const e=l.hardwareConcurrency,n=l.deviceMemory;if(!e&&!n)return;const i=e?(t=>t>=32?"workstation":t>=20?"ultra":t>=16?"high":t>=12?"premium":t>=8?"mid":t>=6?"normal":t>=4?"basic":t>=2?"low":"minimal")(e):"unknown",r=n?(t=>t>=64?"workstation":t>=32?"ultra":t>=24?"high":t>=16?"premium":t>=12?"mid":t>=8?"normal":t>=4?"basic":t>=2?"low":"minimal")(n):"unknown";var o;return{cores:i,memory:r,arch:void 0===(o=l.architecture)?"unknown":255===o?"arm64":0===o?"x86_64":"other",class:((t,e)=>"workstation"!==t&&"ultra"!==t||"workstation"!==e&&"ultra"!==e?"high"!==t&&"premium"!==t||"high"!==e&&"premium"!==e&&"ultra"!==e?"mid"!==t&&"normal"!==t||"mid"!==e&&"normal"!==e&&"premium"!==e?"basic"!==t&&"low"!==t||"basic"!==e&&"low"!==e&&"normal"!==e?"minimal"===t||"minimal"===e?"mobile":"mixed":"budget":"mainstream":"enthusiast":"professional")(i,r),touch:(null===(t=l.touchSupport)||void 0===t?void 0:t.maxTouchPoints)?l.touchSupport.maxTouchPoints>=10?"multi":l.touchSupport.maxTouchPoints>=5?"standard":"basic":"none"}})(),screenFrame:(null==l?void 0:l.screenFrame)?{top:l.screenFrame.top||0,right:l.screenFrame.right||0,bottom:l.screenFrame.bottom||0,left:l.screenFrame.left||0}:void 0,display:(()=>{const t=l.colorDepth,e=l.colorGamut,n=(t=>t?t>=48?"ultra_high":t>=32?"high":t>=24?"normal":t>=16?"basic":"low":"unknown")(t),i=(t=>{if(!t)return"unknown";switch(t){case"rec2020":return"professional";case"p3":return"enhanced";case"srgb":return"standard";default:return"unknown"}})(e);return{depth:n,gamut:i,class:((t,e)=>"ultra_high"===t||"professional"===e?"professional":"high"===t||"enhanced"===e?"premium":"normal"===t&&"standard"===e?"standard":"basic"===t?"basic":"legacy")(n,i)}})()},m=[p.ua||"",p.platform||"",p.deviceType||"",p.timezone||"",p.primaryLanguage||""].filter(Boolean);if(m.length>=3){const t=m.join("|");let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)&4294967295;p.t=Math.abs(e).toString(36).substring(0,8)}(h.debug||"undefined"!=typeof window&&window._rabbitTrackerDebug)&&(p.ua,p.platform,p.deviceType,p.timezone,p.primaryLanguage,p.hardware,p.display,p.screenFrame,p.t);const g=function(t,e=!1){const n=u(t),i=JSON.stringify(n);e&&(Object.keys(t),Object.keys(n),i.length,i.substring(0,200));const r=a(i);return e&&r.substring(0,32),r}(p,h.debug),y=["canvas","webgl","audio","mathFingerprint","fontPreferences","enhancedFonts","dateTimeLocale","accessibilityEnhanced","domBlockers","pluginsEnhanced"],w={};for(const[t,e]of Object.entries(b))y.includes(t)||(w[t]=e);const v={...w,i:p},I=function(t,e=!1){const n=u(t),i=JSON.stringify(n);e&&(Object.keys(t),Object.keys(n),i.length,i.substring(0,200));const r=a(i);return e&&r.substring(0,32),r}(v,h.debug);C.hash=I,h.debug&&(Object.keys(p),p.t,g.substring(0,16),I.substring(0,16),p.ua,p.deviceType,p.platform,p.timezone,p.screenFrame,null===(o=p.hardware)||void 0===o||o.class,null===(s=p.display)||void 0===s||s.class,Object.keys(v).length),k.data={...C,stableCoreHash:g,stableCoreVector:p},h.debug&&(f.length,d.length,C.collectionTime,C.hash,null==S||S.level,null==S||S.score,(null==S?void 0:S.recommendations.length)&&S.recommendations)}else k.error="No components could be collected";return k}var oe,se=Object.freeze({__proto__:null,collectFingerprint:re,getCompleteFingerprint:async function(){return re({gdprMode:!1,includeInvasive:!0,timeout:5e3})}}),ae=Object.defineProperty,ce=(t,e,n)=>((t,e,n)=>e in t?ae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),le=Object.defineProperty,ue=(t,e,n)=>((t,e,n)=>e in t?le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),he=(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))(he||{});const fe={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},de={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pe={};const me={};function ge(t,e,n){var i;const r=`${t}.${String(n)}`;if(me[r])return me[r].call(e);const o=function(t){if(pe[t])return pe[t];const e=globalThis[t],n=e.prototype,i=t in fe?fe[t]:void 0,r=Boolean(i&&i.every(t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(n,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))})),o=t in de?de[t]:void 0,s=Boolean(o&&o.every(t=>{var e;return"function"==typeof n[t]&&(null==(e=n[t])?void 0:e.toString().includes("[native code]"))}));if(r&&s&&!globalThis.Zone)return pe[t]=e.prototype,e.prototype;try{const i=document.createElement("iframe");document.body.appendChild(i);const r=i.contentWindow;if(!r)return e.prototype;const o=r[t].prototype;return document.body.removeChild(i),o?pe[t]=o:n}catch{return n}}(t),s=null==(i=Object.getOwnPropertyDescriptor(o,n))?void 0:i.get;return s?(me[r]=s,s.call(e)):e[n]}const ye=function(t){return ge("Node",t,"childNodes")},we=function(t){return ge("Node",t,"parentNode")},ve=function(t){return ge("Node",t,"parentElement")},be=function(t){return ge("Node",t,"textContent")},Se=function(t){return t&&"shadowRoot"in t?ge("Element",t,"shadowRoot"):null};function Ce(t){return t.nodeType===t.ELEMENT_NODE}function ke(t){const e=t&&"host"in t&&"mode"in t&&function(t){return t&&"host"in t?ge("ShadowRoot",t,"host"):null}(t)||null;return Boolean(e&&"shadowRoot"in e&&Se(e)===t)}function Ie(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function Me(t){try{const n=t.rules||t.cssRules;if(!n)return null;let i=t.href;return!i&&t.ownerNode&&t.ownerNode.ownerDocument&&(i=t.ownerNode.ownerDocument.location.href),(e=Array.from(n,t=>Ae(t,i)).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 Ae(t,e){if(function(t){return"styleSheet"in t}(t)){let e;try{e=Me(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}(t)}catch(n){e=t.cssText}return t.styleSheet.href?Pe(e,t.styleSheet.href):e}{let n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?Pe(n,e):n}}class Re{constructor(){ue(this,"idNodeMap",new Map),ue(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 n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function xe({element:t,maskInputOptions:e,tagName:n,type:i,value:r,maskInputFn:o}){let s=r||"";const a=i&&Ee(i);return(e[n.toLowerCase()]||a&&e[a])&&(s=o?o(s,t):"*".repeat(s.length)),s}function Ee(t){return t.toLowerCase()}const Te="__rrweb_original__";function _e(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ee(e):null}function Oe(t,e){let n;try{n=new URL(t,e??window.location.href)}catch(t){return null}const i=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==i?void 0:i[1])??null}const Fe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ne=/^(?:[a-z+]+:)?\/\//i,Be=/^www\..*/i,Le=/^(data:)([^,]*),(.*)/i;function Pe(t,e){return(t||"").replace(Fe,(t,n,i,r,o,s)=>{const a=i||o||s,c=n||r||"";if(!a)return t;if(Ne.test(a)||Be.test(a))return`url(${c}${a}${c})`;if(Le.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+a}${c})`;const l=e.split("/"),u=a.split("/");l.pop();for(const t of u)"."!==t&&(".."===t?l.pop():l.push(t));return`url(${c}${l.join("/")}${c})`})}function De(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}let je=1;const Ue=new RegExp("[^a-z0-9-_:]");function Ge(){return je++}let We,$e;const Ve=/^[^ \t\n\r\u000c]+/,Ze=/^[, \t\n\r\u000c]+/,Ye=new WeakMap;function ze(t,e){return e&&""!==e.trim()?He(t,e):e}function He(t,e){let n=Ye.get(t);if(n||(n=t.createElement("a"),Ye.set(t,n)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return n.setAttribute("href",e),n.href}function Xe(t,e,n,i){return i?"src"===n||"href"===n&&("use"!==e||"#"!==i[0])||"xlink:href"===n&&"#"!==i[0]?ze(t,i):"background"!==n||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;let n=0;function i(t){let i;const r=t.exec(e.substring(n));return r?(i=r[0],n+=i.length,i):""}const r=[];for(;i(Ze),!(n>=e.length);){let o=i(Ve);if(","===o.slice(-1))o=ze(t,o.substring(0,o.length-1)),r.push(o);else{let i="";o=ze(t,o);let s=!1;for(;;){const t=e.charAt(n);if(""===t){r.push((o+i).trim());break}if(s)")"===t&&(s=!1);else{if(","===t){n+=1,r.push((o+i).trim());break}"("===t&&(s=!0)}i+=t,n+=1}}}return r.join(", ")}(t,i):"style"===n?Pe(i,He(t)):"object"===e&&"data"===n?ze(t,i):i:ze(t,i):i}function Je(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function Ke(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!n&&Ke(we(t),e,n);for(let n=t.classList.length;n--;){const i=t.classList[n];if(e.test(i))return!0}return!!n&&Ke(we(t),e,n)}function qe(t,e,n,i){let r;if(Ce(t)){if(r=t,!ye(r).length)return!1}else{if(null===ve(t))return!1;r=ve(t)}try{if("string"==typeof e){if(i){if(r.closest(`.${e}`))return!0}else if(r.classList.contains(e))return!0}else if(Ke(r,e,i))return!0;if(n)if(i){if(r.closest(n))return!0}else if(r.matches(n))return!0}catch(t){}return!1}function Qe(t){return null==t?"":t.toLowerCase()}function tn(t,e){const{doc:n,mirror:i,blockClass:r,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:v=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:k=!1,cssCaptured:I=!1}=e;let{needsMask:M}=e,{preserveWhiteSpace:A=!0}=e;M||(M=qe(t,s,a,void 0===M));const R=function(t,e){const{doc:n,mirror:i,blockClass:r,blockSelector:o,needsMask:s,inlineStylesheet:a,maskInputOptions:c={},maskTextFn:l,maskInputFn:u,dataURLOptions:h={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:g=!1}=e,y=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:he.Document,childNodes:[],compatMode:t.compatMode}:{type:he.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:he.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:y};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:i,blockSelector:r,inlineStylesheet:o,maskInputOptions:s={},maskInputFn:a,dataURLOptions:c={},inlineImages:l,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:d}=e,p=function(t,e,n){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const i=t.classList[n];if(e.test(i))return!0}if(n)return t.matches(n)}catch(t){}return!1}(t,i,r),m=function(t){if(t instanceof HTMLFormElement)return"form";const e=Ee(t.tagName);return Ue.test(e)?"div":e}(t);let g={};const y=t.attributes.length;for(let e=0;e<y;e++){const i=t.attributes[e];Je(m,i.name,i.value)||(g[i.name]=Xe(n,m,Ee(i.name),i.value))}if("link"===m&&o){const e=Array.from(n.styleSheets).find(e=>e.href===t.href);let i=null;e&&(i=Me(e)),i&&(delete g.rel,delete g.href,g.o=i)}if("style"===m&&t.sheet){let e=Me(t.sheet);e&&(t.childNodes.length>1&&(e=function(t,e){return function(t,e){const n=Array.from(e.childNodes),i=[];if(n.length>1&&t&&"string"==typeof t){const e=De(t);for(let r=1;r<n.length;r++)if(n[r].textContent&&"string"==typeof n[r].textContent){const o=De(n[r].textContent);for(let n=3;n<o.length;n++){const r=o.substring(0,n);if(2===e.split(r).length){const n=e.indexOf(r);for(let e=n;e<t.length;e++)if(De(t.substring(0,e)).length===n){i.push(t.substring(0,e)),t=t.substring(e);break}break}}}}return i.push(t),i}(t,e).join("/* rr_split */")}(e,t)),g.o=e)}if("input"===m||"textarea"===m||"select"===m){const e=t.value,n=t.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&e?g.value=xe({element:t,type:_e(t),tagName:m,value:e,maskInputOptions:s,maskInputFn:a}):n&&(g.checked=n)}if("option"===m&&(t.selected&&!s.select?g.selected=!0:delete g.selected),"dialog"===m&&t.open&&(g.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),"canvas"===m&&u)if("2d"===t.l)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let i=0;i<t.height;i+=50){const r=e.getImageData,o=Te in r?r[Te]:r;if(new Uint32Array(o.call(e,n,i,Math.min(50,t.width-n),Math.min(50,t.height-i)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(g.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("l"in t)){const e=t.toDataURL(c.type,c.quality),i=n.createElement("canvas");i.width=t.width,i.height=t.height,e!==i.toDataURL(c.type,c.quality)&&(g.rr_dataURL=e)}if("img"===m&&l){We||(We=n.createElement("canvas"),$e=We.getContext("2d"));const e=t,i=e.currentSrc||e.getAttribute("src")||"<unknown-src>",r=e.crossOrigin,o=()=>{e.removeEventListener("load",o);try{We.width=e.naturalWidth,We.height=e.naturalHeight,$e.drawImage(e,0,0),g.rr_dataURL=We.toDataURL(c.type,c.quality)}catch(t){if("anonymous"!==e.crossOrigin)return e.crossOrigin="anonymous",void(e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o));console.warn(`Cannot inline img src=${i}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(r?g.crossOrigin=r:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if("audio"===m||"video"===m){const e=g;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(f||(t.scrollLeft&&(g.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(g.rr_scrollTop=t.scrollTop)),p){const{width:e,height:n}=t.getBoundingClientRect();g={class:g.class,rr_width:`${e}px`,rr_height:`${n}px`}}let w;"iframe"!==m||h(g.src)||(t.contentDocument||(g.rr_src=g.src),delete g.src);try{customElements.get(m)&&(w=!0)}catch(t){}return{type:he.Element,tagName:m,attributes:g,childNodes:[],isSVG:(v=t,Boolean("svg"===v.tagName||v.ownerSVGElement)||void 0),needBlock:p,rootId:d,isCustom:w};var v}(t,{doc:n,blockClass:r,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:u,dataURLOptions:h,inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case t.TEXT_NODE:return function(t,e){const{needsMask:n,maskTextFn:i,rootId:r,cssCaptured:o}=e,s=we(t),a=s&&s.tagName;let c="";const l="STYLE"===a||void 0,u="SCRIPT"===a||void 0;return u?c="SCRIPT_PLACEHOLDER":o||(c=be(t),l&&c&&(c=Pe(c,He(e.doc)))),!l&&!u&&c&&n&&(c=i?i(c,ve(t)):c.replace(/[\S]/g,"*")),{type:he.Text,textContent:c||"",rootId:r}}(t,{doc:n,needsMask:s,maskTextFn:l,rootId:y,cssCaptured:g});case t.CDATA_SECTION_NODE:return{type:he.CDATA,textContent:"",rootId:y};case t.COMMENT_NODE:return{type:he.Comment,textContent:be(t)||"",rootId:y};default:return!1}}(t,{doc:n,mirror:i,blockClass:r,blockSelector:o,needsMask:M,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:k,cssCaptured:I});if(!R)return console.warn(t,"not serialized"),null;let x;x=i.hasNode(t)?i.getId(t):function(t,e){if(e.comment&&t.type===he.Comment)return!0;if(t.type===he.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"===Oe(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Qe(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Qe(t.attributes.name)||"icon"===Qe(t.attributes.rel)||"apple-touch-icon"===Qe(t.attributes.rel)||"shortcut icon"===Qe(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Qe(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Qe(t.attributes.property).match(/^(og|twitter|fb):/)||Qe(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Qe(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===Qe(t.attributes.name)||"googlebot"===Qe(t.attributes.name)||"bingbot"===Qe(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===Qe(t.attributes.name)||"generator"===Qe(t.attributes.name)||"framework"===Qe(t.attributes.name)||"publisher"===Qe(t.attributes.name)||"progid"===Qe(t.attributes.name)||Qe(t.attributes.property).match(/^article:/)||Qe(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===Qe(t.attributes.name)||"yandex-verification"===Qe(t.attributes.name)||"csrf-token"===Qe(t.attributes.name)||"p:domain_verify"===Qe(t.attributes.name)||"verify-v1"===Qe(t.attributes.name)||"verification"===Qe(t.attributes.name)||"shopify-checkout-api-token"===Qe(t.attributes.name)))return!0}}return!1}(R,d)||!A&&R.type===he.Text&&!R.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Ge();const E=Object.assign(R,{id:x});if(i.add(t,E),-2===x)return null;y&&y(t);let T=!c;if(E.type===he.Element){T=T&&!E.needBlock,delete E.needBlock;const e=Se(t);e&&Ie(e)&&(E.isShadowHost=!0)}if((E.type===he.Document||E.type===he.Element)&&T){d.headWhitespace&&E.type===he.Element&&"head"===E.tagName&&(A=!1);const e={doc:n,mirror:i,blockClass:r,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(E.type===he.Element&&"textarea"===E.tagName&&void 0!==E.attributes.value);else{E.type===he.Element&&void 0!==E.attributes.o&&"string"==typeof E.attributes.o&&(e.cssCaptured=!0);for(const n of Array.from(ye(t))){const t=tn(n,e);t&&E.childNodes.push(t)}}let k=null;if(Ce(t)&&(k=Se(t)))for(const t of Array.from(ye(k))){const n=tn(t,e);n&&(Ie(k)&&(n.isShadow=!0),E.childNodes.push(n))}}const _=we(t);return _&&ke(_)&&Ie(_)&&(E.isShadow=!0),E.type===he.Element&&"iframe"===E.tagName&&function(t,e,n){const i=t.contentWindow;if(!i)return;let r,o=!1;try{r=i.document.readyState}catch(t){return}if("complete"!==r){const i=setTimeout(()=>{o||(e(),o=!0)},n);return void t.addEventListener("load",()=>{clearTimeout(i),o=!0,e()})}const s="about:blank";if(i.location.href!==s||t.src===s||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,()=>{const e=t.contentDocument;if(e&&w){const n=tn(e,{doc:e,mirror:i,blockClass:r,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});n&&w(t,n)}},v),E.type===he.Element&&"link"===E.tagName&&"string"==typeof E.attributes.rel&&("stylesheet"===E.attributes.rel||"preload"===E.attributes.rel&&"string"==typeof E.attributes.href&&"css"===Oe(E.attributes.href))&&function(t,e,n){let i,r=!1;try{i=t.sheet}catch(t){return}if(i)return;const o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}(t,()=>{if(b){const e=tn(t,{doc:n,mirror:i,blockClass:r,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});e&&b(t,e)}},S),E}function en(t){return t&&t.u&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function nn(t){if(t.u)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"u",{value:!0}),Object.keys(t).forEach(function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})}),n}var rn={exports:{}},on=String,sn=function(){return{isColorSupported:!1,reset:on,bold:on,dim:on,italic:on,underline:on,inverse:on,hidden:on,strikethrough:on,black:on,red:on,green:on,yellow:on,blue:on,magenta:on,cyan:on,white:on,gray:on,bgBlack:on,bgRed:on,bgGreen:on,bgYellow:on,bgBlue:on,bgMagenta:on,bgCyan:on,bgWhite:on}};rn.exports=sn(),rn.exports.createColors=sn;var an=rn.exports;const cn=nn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let ln=an,un=cn,hn=class t extends Error{constructor(e,n,i,r,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),r&&(this.source=r),s&&(this.plugin=s),void 0!==n&&void 0!==i&&("number"==typeof n?(this.line=n,this.column=i):(this.line=n.line,this.column=n.column,this.endLine=i.line,this.endColumn=i.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=ln.isColorSupported),un&&t&&(e=un(e));let n,i,r=e.split(/\r?\n/),o=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),a=String(s).length;if(t){let{bold:t,gray:e,red:r}=ln.createColors(!0);n=e=>t(r(e)),i=t=>e(t)}else n=i=t=>t;return r.slice(o,s).map((t,e)=>{let r=o+1+e,s=" "+(" "+r).slice(-a)+" | ";if(r===this.line){let e=i(s.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(s)+t+"\n "+e+n("^")}return" "+i(s)+t}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};var fn=hn;hn.default=hn;var dn={};dn.isClean=Symbol("isClean"),dn.my=Symbol("my");const pn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let mn=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?n+=t.raws.afterName:i&&(n+=" "),t.nodes)this.block(t,n+i);else{let r=(t.raws.between||"")+(e?";":"");this.builder(n+i+r,t)}}beforeAfter(t,e){let n;n="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 i=t.parent,r=0;for(;i&&"root"!==i.type;)r+=1,i=i.parent;if(n.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;t<r;t++)n+=e}return n}block(t,e){let n,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&"comment"===t.nodes[e].type;)e-=1;let n=this.raw(t,"semicolon");for(let i=0;i<t.nodes.length;i++){let r=t.nodes[i],o=this.raw(r,"before");o&&this.builder(o),this.stringify(r,e!==i||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),i=t.prop+n+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(t,e,n){let i;if(n||(n=e),e&&(i=t.raws[e],void 0!==i))return i;let r=t.parent;if("before"===n){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return pn[n];let o=t.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{let r="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[r]?i=this[r](o,t):o.walk(t=>{if(i=t.raws[e],void 0!==i)return!1})}var s;return void 0===i&&(i=pn[n]),o.rawCache[n]=i,i}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 n;return t.walkComments(t=>{if(void 0!==t.raws.before)return n=t.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(t=>{if(void 0!==t.raws.before)return n=t.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}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(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&void 0!==n.raws.before)return e=n.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(n=>{let i=n.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==n.raws.before){let t=n.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 n=t[e],i=t.raws[e];return i&&i.value===n?i.raw:n}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 gn=mn;mn.default=mn;let yn=gn;function wn(t,e){new yn(e).stringify(t)}var vn=wn;wn.default=wn;let{isClean:bn,my:Sn}=dn,Cn=fn,kn=gn,In=vn;function Mn(t,e){let n=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;if("proxyCache"===i)continue;let r=t[i],o=typeof r;"parent"===i&&"object"===o?e&&(n[i]=e):"source"===i?n[i]=r:Array.isArray(r)?n[i]=r.map(t=>Mn(t,n)):("object"===o&&null!==r&&(r=Mn(r)),n[i]=r)}return n}let An=class{constructor(t={}){this.raws={},this[bn]=!1,this[Sn]=!0;for(let e in t)if("nodes"===e){this.nodes=[];for(let n of t[e])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}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=Mn(this);for(let n in t)e[n]=t[n];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:n,start:i}=this.rangeBy(e);return this.source.input.error(t,{column:i.column,line:i.line},{column:n.column,line:n.line},e)}return new Cn(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,n)=>(t[e]===n||(t[e]=n,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[bn]){this[bn]=!1;let t=this;for(;t=t.parent;)t[bn]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,e){let n=this.source.start;if(t.index)n=this.positionInside(t.index,e);else if(t.word){let i=(e=this.toString()).indexOf(t.word);-1!==i&&(n=this.positionInside(i,e))}return n}positionInside(t,e){let n=e||this.toString(),i=this.source.start.column,r=this.source.start.line;for(let e=0;e<t;e++)"\n"===n[e]?(i=1,r+=1):i+=1;return{column:i,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},n=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 i=this.toString(),r=i.indexOf(t.word);-1!==r&&(e=this.positionInside(r,i),n=this.positionInside(r+t.word.length,i))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return(new kn).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,n=!1;for(let i of t)i===this?n=!0:n?(this.parent.insertAfter(e,i),e=i):this.parent.insertBefore(e,i);n||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){let n={},i=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 i=this[t];if(Array.isArray(i))n[t]=i.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof i&&i.toJSON)n[t]=i.toJSON(null,e);else if("source"===t){let o=e.get(i.input);null==o&&(o=r,e.set(i.input,r),r++),n[t]={end:i.end,inputId:o,start:i.start}}else n[t]=i}return i&&(n.inputs=[...e.keys()].map(t=>t.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=In){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,n){let i={node:this};for(let t in n)i[t]=n[t];return t.warn(e,i)}get proxyOf(){return this}};var Rn=An;An.default=An;let xn=Rn,En=class extends xn{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 Tn=En;En.default=En;var _n={nanoid:(t=21)=>{let e="",n=t;for(;n--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}};let{SourceMapConsumer:On,SourceMapGenerator:Fn}=cn,{existsSync:Nn,readFileSync:Bn}=cn,{dirname:Ln,join:Pn}=cn,Dn=class{constructor(t,e){if(!1===e.map)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,i=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ln(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new On(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 n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}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 n=t.lastIndexOf(e.pop()),i=t.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,i)))}loadFile(t){if(this.root=Ln(t),Nn(t))return this.mapFile=t,Bn(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 On)return Fn.fromSourceMap(e).toString();if(e instanceof Fn)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let n=e(t);if(n){let t=this.loadFile(n);if(!t)throw new Error("Unable to load previous source map: "+n.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=Pn(Ln(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 jn=Dn;Dn.default=Dn;let{SourceMapConsumer:Un,SourceMapGenerator:Gn}=cn,{fileURLToPath:Wn,pathToFileURL:$n}=cn,{isAbsolute:Vn,resolve:Zn}=cn,{nanoid:Yn}=_n,zn=cn,Hn=fn,Xn=jn,Jn=Symbol("fromOffsetCache"),Kn=Boolean(Un&&Gn),qn=Boolean(Zn&&Vn),Qn=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&&(!qn||/^\w+:\/\//.test(e.from)||Vn(e.from)?this.file=e.from:this.file=Zn(e.from)),qn&&Kn){let t=new Xn(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 "+Yn(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,i={}){let r,o,s;if(e&&"object"==typeof e){let t=e,i=n;if("number"==typeof t.offset){let i=this.fromOffset(t.offset);e=i.line,n=i.col}else e=t.line,n=t.column;if("number"==typeof i.offset){let t=this.fromOffset(i.offset);o=t.line,s=t.col}else o=i.line,s=i.column}else if(!n){let t=this.fromOffset(e);e=t.line,n=t.col}let a=this.origin(e,n,o,s);return r=a?new Hn(t,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,i.plugin):new Hn(t,void 0===o?e:{column:n,line:e},void 0===o?n:{column:s,line:o},this.css,this.file,i.plugin),r.input={column:n,endColumn:s,endLine:o,line:e,source:this.css},this.file&&($n&&(r.input.url=$n(this.file).toString()),r.input.file=this.file),r}fromOffset(t){let e,n;if(this[Jn])n=this[Jn];else{let t=this.css.split("\n");n=new Array(t.length);let e=0;for(let i=0,r=t.length;i<r;i++)n[i]=e,e+=t[i].length+1;this[Jn]=n}e=n[n.length-1];let i=0;if(t>=e)i=n.length-1;else{let e,r=n.length-2;for(;i<r;)if(e=i+(r-i>>1),t<n[e])r=e-1;else{if(!(t>=n[e+1])){i=e;break}i=e+1}}return{col:t-n[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Zn(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,i){if(!this.map)return!1;let r,o,s=this.map.consumer(),a=s.originalPositionFor({column:e,line:t});if(!a.source)return!1;"number"==typeof n&&(r=s.originalPositionFor({column:i,line:n})),o=Vn(a.source)?$n(a.source):new URL(a.source,this.map.consumer().sourceRoot||$n(this.map.mapFile));let c={column:a.column,endColumn:r&&r.column,endLine:r&&r.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!Wn)throw new Error("file: protocol is not available in this PostCSS build");c.file=Wn(o)}let l=s.sourceContentFor(a.source);return l&&(c.source=l),c}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 ti=Qn;Qn.default=Qn,zn&&zn.registerInput&&zn.registerInput(Qn);let{SourceMapConsumer:ei,SourceMapGenerator:ni}=cn,{dirname:ii,relative:ri,resolve:oi,sep:si}=cn,{pathToFileURL:ai}=cn,ci=ti,li=Boolean(ei&&ni),ui=Boolean(ii&&oi&&ri&&si);var hi=class{constructor(t,e,n,i){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=i,this.originalCSS=i,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,n=this.toUrl(this.path(t.file)),i=t.root||ii(t.file);!1===this.mapOpts.sourcesContent?(e=new ei(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,n,this.toUrl(this.path(i)))}}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(),ui&&li&&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=ni.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new ni({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 ni({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,n=1,i=1,r="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&"end"!==c&&(o.generated.line=n,o.generated.column=i-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=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),t=s.match(/\n/g),t?(n+=t.length,e=s.lastIndexOf("\n"),i=s.length-e):i+=s.length,a&&"start"!==c){let t=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===t.last&&!t.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=n,o.generated.column=i-2,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,o.generated.line=n,o.generated.column=i-1,this.map.addMapping(o)))}})}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 n=this.opts.to?ii(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=ii(oi(n,this.mapOpts.annotation)));let i=ri(n,t);return this.memoizedPaths.set(t,i),i}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 ci(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 n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,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(ai){let e=ai(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;"\\"===si&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}};let fi=Rn,di=class extends fi{constructor(t){super(t),this.type="comment"}};var pi=di;di.default=di;let mi,gi,yi,wi,{isClean:vi,my:bi}=dn,Si=Tn,Ci=pi,ki=Rn;function Ii(t){return t.map(t=>(t.nodes&&(t.nodes=Ii(t.nodes)),delete t.source,t))}function Mi(t){if(t[vi]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Mi(e)}let Ai=class t extends ki{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,n,i=this.getIterator();for(;this.indexes[i]<this.proxyOf.nodes.length&&(e=this.indexes[i],n=t(this.proxyOf.nodes[e],e),!1!==n);)this.indexes[i]+=1;return delete this.indexes[i],n}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")?(...n)=>t[e](...n.map(t=>"function"==typeof t?(e,n)=>t(e.toProxy(),n):t)):"every"===e||"some"===e?n=>t[e]((t,...e)=>n(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,n)=>(t[e]===n||(t[e]=n,"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 n,i=this.index(t),r=this.normalize(e,this.proxyOf.nodes[i]).reverse();i=this.index(t);for(let t of r)this.proxyOf.nodes.splice(i+1,0,t);for(let t in this.indexes)n=this.indexes[t],i<n&&(this.indexes[t]=n+r.length);return this.markDirty(),this}insertBefore(t,e){let n,i=this.index(t),r=0===i&&"prepend",o=this.normalize(e,this.proxyOf.nodes[i],r).reverse();i=this.index(t);for(let t of o)this.proxyOf.nodes.splice(i,0,t);for(let t in this.indexes)n=this.indexes[t],i<=n&&(this.indexes[t]=n+o.length);return this.markDirty(),this}normalize(e,n){if("string"==typeof e)e=Ii(mi(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 Si(e)]}else if(e.selector)e=[new gi(e)];else if(e.name)e=[new yi(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Ci(e)]}return e.map(e=>(e[bi]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[vi]&&Mi(e),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.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 n in this.indexes)e=this.indexes[n],e>=t&&(this.indexes[n]=e-1);return this.markDirty(),this}replaceValues(t,e,n){return n||(n=e,e={}),this.walkDecls(i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,n))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,n)=>{let i;try{i=t(e,n)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((n,i)=>{if("atrule"===n.type&&t.test(n.name))return e(n,i)}):this.walk((n,i)=>{if("atrule"===n.type&&n.name===t)return e(n,i)}):(e=t,this.walk((t,n)=>{if("atrule"===t.type)return e(t,n)}))}walkComments(t){return this.walk((e,n)=>{if("comment"===e.type)return t(e,n)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((n,i)=>{if("decl"===n.type&&t.test(n.prop))return e(n,i)}):this.walk((n,i)=>{if("decl"===n.type&&n.prop===t)return e(n,i)}):(e=t,this.walk((t,n)=>{if("decl"===t.type)return e(t,n)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((n,i)=>{if("rule"===n.type&&t.test(n.selector))return e(n,i)}):this.walk((n,i)=>{if("rule"===n.type&&n.selector===t)return e(n,i)}):(e=t,this.walk((t,n)=>{if("rule"===t.type)return e(t,n)}))}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]}};Ai.registerParse=t=>{mi=t},Ai.registerRule=t=>{gi=t},Ai.registerAtRule=t=>{yi=t},Ai.registerRoot=t=>{wi=t};var Ri=Ai;Ai.default=Ai,Ai.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,yi.prototype):"rule"===t.type?Object.setPrototypeOf(t,gi.prototype):"decl"===t.type?Object.setPrototypeOf(t,Si.prototype):"comment"===t.type?Object.setPrototypeOf(t,Ci.prototype):"root"===t.type&&Object.setPrototypeOf(t,wi.prototype),t[bi]=!0,t.nodes&&t.nodes.forEach(t=>{Ai.rebuild(t)})};let xi,Ei,Ti=Ri,_i=class extends Ti{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new xi(new Ei,this,t).stringify()}};_i.registerLazyResult=t=>{xi=t},_i.registerProcessor=t=>{Ei=t};var Oi=_i;_i.default=_i;let Fi={};var Ni=function(t){Fi[t]||(Fi[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))};let Bi=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 Li=Bi;Bi.default=Bi;let Pi=Li,Di=class{constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,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 n=new Pi(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}};var ji=Di;Di.default=Di;const Ui="'".charCodeAt(0),Gi='"'.charCodeAt(0),Wi="\\".charCodeAt(0),$i="/".charCodeAt(0),Vi="\n".charCodeAt(0),Zi=" ".charCodeAt(0),Yi="\f".charCodeAt(0),zi="\t".charCodeAt(0),Hi="\r".charCodeAt(0),Xi="[".charCodeAt(0),Ji="]".charCodeAt(0),Ki="(".charCodeAt(0),qi=")".charCodeAt(0),Qi="{".charCodeAt(0),tr="}".charCodeAt(0),er=";".charCodeAt(0),nr="*".charCodeAt(0),ir=":".charCodeAt(0),rr="@".charCodeAt(0),or=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ar=/.[\r\n"'(/\\]/,cr=/[\da-f]/i;let lr=Ri,ur=class extends lr{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 hr=ur;ur.default=ur,lr.registerAtRule(ur);let fr,dr,pr=Ri,mr=class extends pr{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let i=super.normalize(t);if(e)if("prepend"===n)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 i)t.raws.before=e.raws.before;return i}removeChild(t,e){let n=this.index(t);return!e&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new fr(new dr,this,t).stringify()}};mr.registerLazyResult=t=>{fr=t},mr.registerProcessor=t=>{dr=t};var gr=mr;mr.default=mr,pr.registerRoot(mr);let yr={comma:t=>yr.split(t,[","],!0),space:t=>yr.split(t,[" ","\n","\t"]),split(t,e,n){let i=[],r="",o=!1,s=0,a=!1,c="",l=!1;for(let n of t)l?l=!1:"\\"===n?l=!0:a?n===c&&(a=!1):'"'===n||"'"===n?(a=!0,c=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&e.includes(n)&&(o=!0),o?(""!==r&&i.push(r.trim()),r="",o=!1):r+=n;return(n||""!==r)&&i.push(r.trim()),i}};var wr=yr;yr.default=yr;let vr=Ri,br=wr,Sr=class extends vr{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return br.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}};var Cr=Sr;Sr.default=Sr,vr.registerRule(Sr);let kr=Tn,Ir=pi,Mr=hr,Ar=gr,Rr=Cr;const xr={empty:!0,space:!0};let Er=Ri,Tr=class{constructor(t){this.input=t,this.root=new Ar,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,n,i,r=new Mr;r.name=t[1].slice(1),""===r.name&&this.unnamedAtrule(r,t),this.init(r,t[2]);let o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?c.push("("===e?")":"]"):"{"===e&&c.length>0?c.push("}"):e===c[c.length-1]&&c.pop(),0===c.length){if(";"===e){r.source.end=this.getPosition(t[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===e){s=!0;break}if("}"===e){if(a.length>0){for(i=a.length-1,n=a[i];n&&"space"===n[0];)n=a[--i];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),o&&(t=a[a.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=""),s&&(r.nodes=[],this.current=r)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let n,i=0;for(let r=e-1;r>=0&&(n=t[r],"space"===n[0]||(i+=1,2!==i));r--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(t){let e,n,i,r=0;for(let[o,s]of t.entries()){if(e=s,n=e[0],"("===n&&(r+=1),")"===n&&(r-=1),0===r&&":"===n){if(i){if("word"===i[0]&&"progid"===i[1])continue;return o}this.doubleColon(e)}i=e}return!1}comment(t){let e=new Ir;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let t=n.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 n,i,r,o,s,a,c,l,u,h,f=t.css.valueOf(),d=e.ignoreErrors,p=f.length,m=0,g=[],y=[];function w(e){throw t.error("Unclosed "+e,m)}return{back:function(t){y.push(t)},endOfFile:function(){return 0===y.length&&m>=p},nextToken:function(t){if(y.length)return y.pop();if(m>=p)return;let e=!!t&&t.ignoreUnclosed;switch(n=f.charCodeAt(m),n){case Vi:case Zi:case zi:case Hi:case Yi:i=m;do{i+=1,n=f.charCodeAt(i)}while(n===Zi||n===Vi||n===zi||n===Hi||n===Yi);h=["space",f.slice(m,i)],m=i-1;break;case Xi:case Ji:case Qi:case tr:case ir:case er:case qi:{let t=String.fromCharCode(n);h=[t,t,m];break}case Ki:if(l=g.length?g.pop()[1]:"",u=f.charCodeAt(m+1),"url"===l&&u!==Ui&&u!==Gi&&u!==Zi&&u!==Vi&&u!==zi&&u!==Yi&&u!==Hi){i=m;do{if(a=!1,i=f.indexOf(")",i+1),-1===i){if(d||e){i=m;break}w("bracket")}for(c=i;f.charCodeAt(c-1)===Wi;)c-=1,a=!a}while(a);h=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),o=f.slice(m,i+1),-1===i||ar.test(o)?h=["(","(",m]:(h=["brackets",o,m,i],m=i);break;case Ui:case Gi:r=n===Ui?"'":'"',i=m;do{if(a=!1,i=f.indexOf(r,i+1),-1===i){if(d||e){i=m+1;break}w("string")}for(c=i;f.charCodeAt(c-1)===Wi;)c-=1,a=!a}while(a);h=["string",f.slice(m,i+1),m,i],m=i;break;case rr:or.lastIndex=m+1,or.test(f),i=0===or.lastIndex?f.length-1:or.lastIndex-2,h=["at-word",f.slice(m,i+1),m,i],m=i;break;case Wi:for(i=m,s=!0;f.charCodeAt(i+1)===Wi;)i+=1,s=!s;if(n=f.charCodeAt(i+1),s&&n!==$i&&n!==Zi&&n!==Vi&&n!==zi&&n!==Hi&&n!==Yi&&(i+=1,cr.test(f.charAt(i)))){for(;cr.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===Zi&&(i+=1)}h=["word",f.slice(m,i+1),m,i],m=i;break;default:n===$i&&f.charCodeAt(m+1)===nr?(i=f.indexOf("*/",m+2)+1,0===i&&(d||e?i=f.length:w("comment")),h=["comment",f.slice(m,i+1),m,i],m=i):(sr.lastIndex=m+1,sr.test(f),i=0===sr.lastIndex?f.length-1:sr.lastIndex-2,h=["word",f.slice(m,i+1),m,i],g.push(h),m=i)}return m++,h},position:function(){return m}}}(this.input)}decl(t,e){let n=new kr;this.init(n,t[0][2]);let i,r=t[t.length-1];for(";"===r[0]&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||function(t){for(let e=t.length-1;e>=0;e--){let n=t[e],i=n[3]||n[2];if(i)return i}}(t)),n.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;n.prop+=t.shift()[1]}for(n.raws.between="";t.length;){if(i=t.shift(),":"===i[0]){n.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o,s=[];for(;t.length&&(o=t[0][0],"space"===o||"comment"===o);)s.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(i=t[e],"!important"===i[1].toLowerCase()){n.important=!0;let i=this.stringFrom(t,e);i=this.spacesFromEnd(t)+i," !important"!==i&&(n.raws.important=i);break}if("important"===i[1].toLowerCase()){let i=t.slice(0),r="";for(let t=e;t>0;t--){let e=i[t][0];if(0===r.trim().indexOf("!")&&"space"!==e)break;r=i.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,t=i)}if("space"!==i[0]&&"comment"!==i[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(n.raws.between+=s.map(t=>t[1]).join(""),s=[]),this.raw(n,"value",s.concat(t),e),n.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 Rr;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,n=null,i=!1,r=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),"("===n||"["===n)r||(r=c),o.push("("===n?")":"]");else if(s&&i&&"{"===n)r||(r=c),o.push("}");else if(0===o.length){if(";"===n){if(i)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),e=!0;break}":"===n&&(i=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(r=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(r),e&&i){if(!s)for(;a.length&&(c=a[a.length-1][0],"space"===c||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}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,n,i){let r,o,s,a,c=n.length,l="",u=!0;for(let t=0;t<c;t+=1)r=n[t],o=r[0],"space"!==o||t!==c-1||i?"comment"===o?(a=n[t-1]?n[t-1][0]:"empty",s=n[t+1]?n[t+1][0]:"empty",xr[a]||xr[s]||","===l.slice(-1)?u=!1:l+=r[1]):l+=r[1]:u=!1;if(!u){let i=n.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:i,value:l}}t[e]=l}rule(t){t.pop();let e=new Rr;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let i=e;i<t.length;i++)n+=t[i][1];return t.splice(e,t.length-e),n}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})}},_r=ti;function Or(t,e){let n=new _r(t,e),i=new Tr(n);try{i.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 i.root}var Fr=Or;Or.default=Or,Er.registerParse(Or);let{isClean:Nr,my:Br}=dn,Lr=hi,Pr=vn,Dr=Ri,jr=Oi,Ur=Ni,Gr=ji,Wr=Fr,$r=gr;const Vr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Zr={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},Yr={Once:!0,postcssPlugin:!0,prepare:!0};function zr(t){return"object"==typeof t&&"function"==typeof t.then}function Hr(t){let e=!1,n=Vr[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,0,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function Xr(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:Hr(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Jr(t){return t[Nr]=!1,t.nodes&&t.nodes.forEach(t=>Jr(t)),t}let Kr={},qr=class t{constructor(e,n,i){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof t||n instanceof Gr)r=Jr(n.root),n.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=n.map);else{let t=Wr;i.syntax&&(t=i.syntax.parse),i.parser&&(t=i.parser),t.parse&&(t=t.parse);try{r=t(n,i)}catch(t){this.processed=!0,this.error=t}r&&!r[Br]&&Dr.rebuild(r)}else r=Jr(n);this.result=new Gr(e,r,i),this.helpers={...Kr,postcss:Kr,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 n=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){let t=n.postcssPlugin,e=n.postcssVersion,i=this.result.processor.version,r=e.split("."),o=i.split(".");(r[0]!==o[0]||parseInt(r[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=n.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,n)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,n])};for(let e of this.plugins)if("object"==typeof e)for(let n in e){if(!Zr[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Yr[n])if("object"==typeof e[n])for(let i in e[n])t(e,"*"===i?n:n+"-"+i.toLowerCase(),e[n][i]);else"function"==typeof e[n]&&t(e,n,e[n])}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],n=this.runOnRoot(e);if(zr(n))try{await n}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Nr];){t[Nr]=!0;let e=[Xr(t)];for(;e.length>0;){let t=this.visitTick(e);if(zr(t))try{await t}catch(t){let n=e[e.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(t=>n(t,this.helpers));await Promise.all(e)}else await n(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 zr(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=Pr;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let n=new Lr(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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(zr(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Nr];)t[Nr]=!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||Ur("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[n,i]of t){let t;this.result.lastPlugin=n;try{t=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(zr(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:n,visitors:i}=e;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(i.length>0&&e.visitorIndex<i.length){let[t,r]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return r(n.toProxy(),this.helpers)}catch(t){throw this.handleError(t,n)}}if(0!==e.iterator){let i,r=e.iterator;for(;i=n.nodes[n.indexes[r]];)if(n.indexes[r]+=1,!i[Nr])return i[Nr]=!0,void t.push(Xr(i));e.iterator=0,delete n.indexes[r]}let r=e.events;for(;e.eventIndex<r.length;){let t=r[e.eventIndex];if(e.eventIndex+=1,0===t)return void(n.nodes&&n.nodes.length&&(n[Nr]=!0,e.iterator=n.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[Nr]=!0;let e=Hr(t);for(let n of e)if(0===n)t.nodes&&t.each(t=>{t[Nr]||this.walkSync(t)});else{let e=this.listeners[n];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"}};qr.registerPostcss=t=>{Kr=t};var Qr=qr;qr.default=qr,$r.registerLazyResult(qr),jr.registerLazyResult(qr);let to=hi,eo=vn,no=Ni,io=Fr;const ro=ji;let oo=class{constructor(t,e,n){let i;e=e.toString(),this.stringified=!1,this.p=t,this.m=e,this.v=n,this.S=void 0;let r=eo;this.result=new ro(this.p,i,this.v),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let s=new to(r,i,this.v,e);if(s.isMap()){let[t,e]=s.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else s.clearAnnotation(),this.result.css=s.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.v||no("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.m}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.C)return this.C;let t,e=io;try{t=e(this.m,this.v)}catch(t){this.error=t}if(this.error)throw this.error;return this.C=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var so=oo;oo.default=oo;let ao=so,co=Qr,lo=Oi,uo=gr,ho=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)e.push(n);else if("function"==typeof n)e.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" 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 co(this,t,e):new ao(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var fo=ho;ho.default=ho,uo.registerProcessor(ho),lo.registerProcessor(ho);let po=Tn,mo=jn,go=pi,yo=hr,wo=ti,vo=gr,bo=Cr;function So(t,e){if(Array.isArray(t))return t.map(t=>So(t));let{inputs:n,...i}=t;if(n){e=[];for(let t of n){let n={...t,__proto__:wo.prototype};n.map&&(n.map={...n.map,__proto__:mo.prototype}),e.push(n)}}if(i.nodes&&(i.nodes=t.nodes.map(t=>So(t,e))),i.source){let{inputId:t,...n}=i.source;i.source=n,null!=t&&(i.source.input=e[t])}if("root"===i.type)return new vo(i);if("decl"===i.type)return new po(i);if("rule"===i.type)return new bo(i);if("comment"===i.type)return new go(i);if("atrule"===i.type)return new yo(i);throw new Error("Unknown node type: "+t.type)}var Co=So;So.default=So;let ko=fn,Io=Tn,Mo=Qr,Ao=Ri,Ro=fo,xo=vn,Eo=Co,To=Oi,_o=Li,Oo=pi,Fo=hr,No=ji,Bo=ti,Lo=Fr,Po=wr,Do=Cr,jo=gr,Uo=Rn;function Go(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Ro(t)}Go.plugin=function(t,e){let n,i=!1;function r(...n){console&&console.warn&&!i&&(i=!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(...n);return r.postcssPlugin=t,r.postcssVersion=(new Ro).version,r}return Object.defineProperty(r,"postcss",{get:()=>(n||(n=r()),n)}),r.process=function(t,e,n){return Go([r(n)]).process(t,e)},r},Go.stringify=xo,Go.parse=Lo,Go.fromJSON=Eo,Go.list=Po,Go.comment=t=>new Oo(t),Go.atRule=t=>new Fo(t),Go.decl=t=>new Io(t),Go.rule=t=>new Do(t),Go.root=t=>new jo(t),Go.document=t=>new To(t),Go.CssSyntaxError=ko,Go.Declaration=Io,Go.Container=Ao,Go.Processor=Ro,Go.Document=To,Go.Comment=Oo,Go.Warning=_o,Go.AtRule=Fo,Go.Result=No,Go.Input=Bo,Go.Rule=Do,Go.Root=jo,Go.Node=Uo,Mo.registerPostcss(Go);var Wo=Go;Go.default=Go;const $o=en(Wo);$o.stringify,$o.fromJSON,$o.plugin,$o.parse,$o.list,$o.document,$o.comment,$o.atRule,$o.rule,$o.decl,$o.root,$o.CssSyntaxError,$o.Declaration,$o.Container,$o.Processor,$o.Document,$o.Comment,$o.Warning,$o.AtRule,$o.Result,$o.Input,$o.Rule,$o.Root,$o.Node;var Vo=Object.defineProperty,Zo=(t,e,n)=>((t,e,n)=>e in t?Vo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);function Yo(t){return t&&t.u&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function zo(t){if(t.u)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"u",{value:!0}),Object.keys(t).forEach(function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})}),n}var Ho={exports:{}},Xo=String,Jo=function(){return{isColorSupported:!1,reset:Xo,bold:Xo,dim:Xo,italic:Xo,underline:Xo,inverse:Xo,hidden:Xo,strikethrough:Xo,black:Xo,red:Xo,green:Xo,yellow:Xo,blue:Xo,magenta:Xo,cyan:Xo,white:Xo,gray:Xo,bgBlack:Xo,bgRed:Xo,bgGreen:Xo,bgYellow:Xo,bgBlue:Xo,bgMagenta:Xo,bgCyan:Xo,bgWhite:Xo}};Ho.exports=Jo(),Ho.exports.createColors=Jo;var Ko=Ho.exports;const qo=zo(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Qo=Ko,ts=qo,es=class t extends Error{constructor(e,n,i,r,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),r&&(this.source=r),s&&(this.plugin=s),void 0!==n&&void 0!==i&&("number"==typeof n?(this.line=n,this.column=i):(this.line=n.line,this.column=n.column,this.endLine=i.line,this.endColumn=i.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=Qo.isColorSupported),ts&&t&&(e=ts(e));let n,i,r=e.split(/\r?\n/),o=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),a=String(s).length;if(t){let{bold:t,gray:e,red:r}=Qo.createColors(!0);n=e=>t(r(e)),i=t=>e(t)}else n=i=t=>t;return r.slice(o,s).map((t,e)=>{let r=o+1+e,s=" "+(" "+r).slice(-a)+" | ";if(r===this.line){let e=i(s.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(s)+t+"\n "+e+n("^")}return" "+i(s)+t}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};var ns=es;es.default=es;var is={};is.isClean=Symbol("isClean"),is.my=Symbol("my");const rs={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let os=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?n+=t.raws.afterName:i&&(n+=" "),t.nodes)this.block(t,n+i);else{let r=(t.raws.between||"")+(e?";":"");this.builder(n+i+r,t)}}beforeAfter(t,e){let n;n="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 i=t.parent,r=0;for(;i&&"root"!==i.type;)r+=1,i=i.parent;if(n.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;t<r;t++)n+=e}return n}block(t,e){let n,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&"comment"===t.nodes[e].type;)e-=1;let n=this.raw(t,"semicolon");for(let i=0;i<t.nodes.length;i++){let r=t.nodes[i],o=this.raw(r,"before");o&&this.builder(o),this.stringify(r,e!==i||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),i=t.prop+n+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(t,e,n){let i;if(n||(n=e),e&&(i=t.raws[e],void 0!==i))return i;let r=t.parent;if("before"===n){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return rs[n];let o=t.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{let r="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[r]?i=this[r](o,t):o.walk(t=>{if(i=t.raws[e],void 0!==i)return!1})}var s;return void 0===i&&(i=rs[n]),o.rawCache[n]=i,i}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 n;return t.walkComments(t=>{if(void 0!==t.raws.before)return n=t.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(t=>{if(void 0!==t.raws.before)return n=t.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}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(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&void 0!==n.raws.before)return e=n.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(n=>{let i=n.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==n.raws.before){let t=n.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 n=t[e],i=t.raws[e];return i&&i.value===n?i.raw:n}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 ss=os;os.default=os;let as=ss;function cs(t,e){new as(e).stringify(t)}var ls=cs;cs.default=cs;let{isClean:us,my:hs}=is,fs=ns,ds=ss,ps=ls;function ms(t,e){let n=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;if("proxyCache"===i)continue;let r=t[i],o=typeof r;"parent"===i&&"object"===o?e&&(n[i]=e):"source"===i?n[i]=r:Array.isArray(r)?n[i]=r.map(t=>ms(t,n)):("object"===o&&null!==r&&(r=ms(r)),n[i]=r)}return n}let gs=class{constructor(t={}){this.raws={},this[us]=!1,this[hs]=!0;for(let e in t)if("nodes"===e){this.nodes=[];for(let n of t[e])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}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=ms(this);for(let n in t)e[n]=t[n];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:n,start:i}=this.rangeBy(e);return this.source.input.error(t,{column:i.column,line:i.line},{column:n.column,line:n.line},e)}return new fs(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,n)=>(t[e]===n||(t[e]=n,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[us]){this[us]=!1;let t=this;for(;t=t.parent;)t[us]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,e){let n=this.source.start;if(t.index)n=this.positionInside(t.index,e);else if(t.word){let i=(e=this.toString()).indexOf(t.word);-1!==i&&(n=this.positionInside(i,e))}return n}positionInside(t,e){let n=e||this.toString(),i=this.source.start.column,r=this.source.start.line;for(let e=0;e<t;e++)"\n"===n[e]?(i=1,r+=1):i+=1;return{column:i,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},n=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 i=this.toString(),r=i.indexOf(t.word);-1!==r&&(e=this.positionInside(r,i),n=this.positionInside(r+t.word.length,i))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return(new ds).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,n=!1;for(let i of t)i===this?n=!0:n?(this.parent.insertAfter(e,i),e=i):this.parent.insertBefore(e,i);n||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){let n={},i=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 i=this[t];if(Array.isArray(i))n[t]=i.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof i&&i.toJSON)n[t]=i.toJSON(null,e);else if("source"===t){let o=e.get(i.input);null==o&&(o=r,e.set(i.input,r),r++),n[t]={end:i.end,inputId:o,start:i.start}}else n[t]=i}return i&&(n.inputs=[...e.keys()].map(t=>t.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=ps){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,n){let i={node:this};for(let t in n)i[t]=n[t];return t.warn(e,i)}get proxyOf(){return this}};var ys=gs;gs.default=gs;let ws=ys,vs=class extends ws{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 bs=vs;vs.default=vs;var Ss={nanoid:(t=21)=>{let e="",n=t;for(;n--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}};let{SourceMapConsumer:Cs,SourceMapGenerator:ks}=qo,{existsSync:Is,readFileSync:Ms}=qo,{dirname:As,join:Rs}=qo,xs=class{constructor(t,e){if(!1===e.map)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,i=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=As(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Cs(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 n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}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 n=t.lastIndexOf(e.pop()),i=t.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,i)))}loadFile(t){if(this.root=As(t),Is(t))return this.mapFile=t,Ms(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 Cs)return ks.fromSourceMap(e).toString();if(e instanceof ks)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let n=e(t);if(n){let t=this.loadFile(n);if(!t)throw new Error("Unable to load previous source map: "+n.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=Rs(As(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 Es=xs;xs.default=xs;let{SourceMapConsumer:Ts,SourceMapGenerator:_s}=qo,{fileURLToPath:Os,pathToFileURL:Fs}=qo,{isAbsolute:Ns,resolve:Bs}=qo,{nanoid:Ls}=Ss,Ps=qo,Ds=ns,js=Es,Us=Symbol("fromOffsetCache"),Gs=Boolean(Ts&&_s),Ws=Boolean(Bs&&Ns),$s=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&&(!Ws||/^\w+:\/\//.test(e.from)||Ns(e.from)?this.file=e.from:this.file=Bs(e.from)),Ws&&Gs){let t=new js(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 "+Ls(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,i={}){let r,o,s;if(e&&"object"==typeof e){let t=e,i=n;if("number"==typeof t.offset){let i=this.fromOffset(t.offset);e=i.line,n=i.col}else e=t.line,n=t.column;if("number"==typeof i.offset){let t=this.fromOffset(i.offset);o=t.line,s=t.col}else o=i.line,s=i.column}else if(!n){let t=this.fromOffset(e);e=t.line,n=t.col}let a=this.origin(e,n,o,s);return r=a?new Ds(t,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,i.plugin):new Ds(t,void 0===o?e:{column:n,line:e},void 0===o?n:{column:s,line:o},this.css,this.file,i.plugin),r.input={column:n,endColumn:s,endLine:o,line:e,source:this.css},this.file&&(Fs&&(r.input.url=Fs(this.file).toString()),r.input.file=this.file),r}fromOffset(t){let e,n;if(this[Us])n=this[Us];else{let t=this.css.split("\n");n=new Array(t.length);let e=0;for(let i=0,r=t.length;i<r;i++)n[i]=e,e+=t[i].length+1;this[Us]=n}e=n[n.length-1];let i=0;if(t>=e)i=n.length-1;else{let e,r=n.length-2;for(;i<r;)if(e=i+(r-i>>1),t<n[e])r=e-1;else{if(!(t>=n[e+1])){i=e;break}i=e+1}}return{col:t-n[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Bs(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,i){if(!this.map)return!1;let r,o,s=this.map.consumer(),a=s.originalPositionFor({column:e,line:t});if(!a.source)return!1;"number"==typeof n&&(r=s.originalPositionFor({column:i,line:n})),o=Ns(a.source)?Fs(a.source):new URL(a.source,this.map.consumer().sourceRoot||Fs(this.map.mapFile));let c={column:a.column,endColumn:r&&r.column,endLine:r&&r.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!Os)throw new Error("file: protocol is not available in this PostCSS build");c.file=Os(o)}let l=s.sourceContentFor(a.source);return l&&(c.source=l),c}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 Vs=$s;$s.default=$s,Ps&&Ps.registerInput&&Ps.registerInput($s);let{SourceMapConsumer:Zs,SourceMapGenerator:Ys}=qo,{dirname:zs,relative:Hs,resolve:Xs,sep:Js}=qo,{pathToFileURL:Ks}=qo,qs=Vs,Qs=Boolean(Zs&&Ys),ta=Boolean(zs&&Xs&&Hs&&Js);var ea=class{constructor(t,e,n,i){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=i,this.originalCSS=i,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,n=this.toUrl(this.path(t.file)),i=t.root||zs(t.file);!1===this.mapOpts.sourcesContent?(e=new Zs(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,n,this.toUrl(this.path(i)))}}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(),ta&&Qs&&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=Ys.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ys({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 Ys({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,n=1,i=1,r="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&"end"!==c&&(o.generated.line=n,o.generated.column=i-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=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),t=s.match(/\n/g),t?(n+=t.length,e=s.lastIndexOf("\n"),i=s.length-e):i+=s.length,a&&"start"!==c){let t=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===t.last&&!t.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=n,o.generated.column=i-2,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,o.generated.line=n,o.generated.column=i-1,this.map.addMapping(o)))}})}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 n=this.opts.to?zs(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=zs(Xs(n,this.mapOpts.annotation)));let i=Hs(n,t);return this.memoizedPaths.set(t,i),i}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 qs(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 n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,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(Ks){let e=Ks(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;"\\"===Js&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}};let na=ys,ia=class extends na{constructor(t){super(t),this.type="comment"}};var ra=ia;ia.default=ia;let oa,sa,aa,ca,{isClean:la,my:ua}=is,ha=bs,fa=ra,da=ys;function pa(t){return t.map(t=>(t.nodes&&(t.nodes=pa(t.nodes)),delete t.source,t))}function ma(t){if(t[la]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ma(e)}let ga=class t extends da{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,n,i=this.getIterator();for(;this.indexes[i]<this.proxyOf.nodes.length&&(e=this.indexes[i],n=t(this.proxyOf.nodes[e],e),!1!==n);)this.indexes[i]+=1;return delete this.indexes[i],n}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")?(...n)=>t[e](...n.map(t=>"function"==typeof t?(e,n)=>t(e.toProxy(),n):t)):"every"===e||"some"===e?n=>t[e]((t,...e)=>n(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,n)=>(t[e]===n||(t[e]=n,"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 n,i=this.index(t),r=this.normalize(e,this.proxyOf.nodes[i]).reverse();i=this.index(t);for(let t of r)this.proxyOf.nodes.splice(i+1,0,t);for(let t in this.indexes)n=this.indexes[t],i<n&&(this.indexes[t]=n+r.length);return this.markDirty(),this}insertBefore(t,e){let n,i=this.index(t),r=0===i&&"prepend",o=this.normalize(e,this.proxyOf.nodes[i],r).reverse();i=this.index(t);for(let t of o)this.proxyOf.nodes.splice(i,0,t);for(let t in this.indexes)n=this.indexes[t],i<=n&&(this.indexes[t]=n+o.length);return this.markDirty(),this}normalize(e,n){if("string"==typeof e)e=pa(oa(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 ha(e)]}else if(e.selector)e=[new sa(e)];else if(e.name)e=[new aa(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new fa(e)]}return e.map(e=>(e[ua]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[la]&&ma(e),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.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 n in this.indexes)e=this.indexes[n],e>=t&&(this.indexes[n]=e-1);return this.markDirty(),this}replaceValues(t,e,n){return n||(n=e,e={}),this.walkDecls(i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,n))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,n)=>{let i;try{i=t(e,n)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((n,i)=>{if("atrule"===n.type&&t.test(n.name))return e(n,i)}):this.walk((n,i)=>{if("atrule"===n.type&&n.name===t)return e(n,i)}):(e=t,this.walk((t,n)=>{if("atrule"===t.type)return e(t,n)}))}walkComments(t){return this.walk((e,n)=>{if("comment"===e.type)return t(e,n)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((n,i)=>{if("decl"===n.type&&t.test(n.prop))return e(n,i)}):this.walk((n,i)=>{if("decl"===n.type&&n.prop===t)return e(n,i)}):(e=t,this.walk((t,n)=>{if("decl"===t.type)return e(t,n)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((n,i)=>{if("rule"===n.type&&t.test(n.selector))return e(n,i)}):this.walk((n,i)=>{if("rule"===n.type&&n.selector===t)return e(n,i)}):(e=t,this.walk((t,n)=>{if("rule"===t.type)return e(t,n)}))}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]}};ga.registerParse=t=>{oa=t},ga.registerRule=t=>{sa=t},ga.registerAtRule=t=>{aa=t},ga.registerRoot=t=>{ca=t};var ya=ga;ga.default=ga,ga.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,aa.prototype):"rule"===t.type?Object.setPrototypeOf(t,sa.prototype):"decl"===t.type?Object.setPrototypeOf(t,ha.prototype):"comment"===t.type?Object.setPrototypeOf(t,fa.prototype):"root"===t.type&&Object.setPrototypeOf(t,ca.prototype),t[ua]=!0,t.nodes&&t.nodes.forEach(t=>{ga.rebuild(t)})};let wa,va,ba=ya,Sa=class extends ba{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new wa(new va,this,t).stringify()}};Sa.registerLazyResult=t=>{wa=t},Sa.registerProcessor=t=>{va=t};var Ca=Sa;Sa.default=Sa;let ka={};var Ia=function(t){ka[t]||(ka[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))};let Ma=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 Aa=Ma;Ma.default=Ma;let Ra=Aa,xa=class{constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,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 n=new Ra(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}};var Ea=xa;xa.default=xa;const Ta="'".charCodeAt(0),_a='"'.charCodeAt(0),Oa="\\".charCodeAt(0),Fa="/".charCodeAt(0),Na="\n".charCodeAt(0),Ba=" ".charCodeAt(0),La="\f".charCodeAt(0),Pa="\t".charCodeAt(0),Da="\r".charCodeAt(0),ja="[".charCodeAt(0),Ua="]".charCodeAt(0),Ga="(".charCodeAt(0),Wa=")".charCodeAt(0),$a="{".charCodeAt(0),Va="}".charCodeAt(0),Za=";".charCodeAt(0),Ya="*".charCodeAt(0),za=":".charCodeAt(0),Ha="@".charCodeAt(0),Xa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ja=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ka=/.[\r\n"'(/\\]/,qa=/[\da-f]/i;let Qa=ya,tc=class extends Qa{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 ec=tc;tc.default=tc,Qa.registerAtRule(tc);let nc,ic,rc=ya,oc=class extends rc{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let i=super.normalize(t);if(e)if("prepend"===n)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 i)t.raws.before=e.raws.before;return i}removeChild(t,e){let n=this.index(t);return!e&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new nc(new ic,this,t).stringify()}};oc.registerLazyResult=t=>{nc=t},oc.registerProcessor=t=>{ic=t};var sc=oc;oc.default=oc,rc.registerRoot(oc);let ac={comma:t=>ac.split(t,[","],!0),space:t=>ac.split(t,[" ","\n","\t"]),split(t,e,n){let i=[],r="",o=!1,s=0,a=!1,c="",l=!1;for(let n of t)l?l=!1:"\\"===n?l=!0:a?n===c&&(a=!1):'"'===n||"'"===n?(a=!0,c=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&e.includes(n)&&(o=!0),o?(""!==r&&i.push(r.trim()),r="",o=!1):r+=n;return(n||""!==r)&&i.push(r.trim()),i}};var cc=ac;ac.default=ac;let lc=ya,uc=cc,hc=class extends lc{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return uc.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}};var fc=hc;hc.default=hc,lc.registerRule(hc);let dc=bs,pc=ra,mc=ec,gc=sc,yc=fc;const wc={empty:!0,space:!0};let vc=ya,bc=class{constructor(t){this.input=t,this.root=new gc,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,n,i,r=new mc;r.name=t[1].slice(1),""===r.name&&this.unnamedAtrule(r,t),this.init(r,t[2]);let o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?c.push("("===e?")":"]"):"{"===e&&c.length>0?c.push("}"):e===c[c.length-1]&&c.pop(),0===c.length){if(";"===e){r.source.end=this.getPosition(t[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===e){s=!0;break}if("}"===e){if(a.length>0){for(i=a.length-1,n=a[i];n&&"space"===n[0];)n=a[--i];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),o&&(t=a[a.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=""),s&&(r.nodes=[],this.current=r)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let n,i=0;for(let r=e-1;r>=0&&(n=t[r],"space"===n[0]||(i+=1,2!==i));r--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(t){let e,n,i,r=0;for(let[o,s]of t.entries()){if(e=s,n=e[0],"("===n&&(r+=1),")"===n&&(r-=1),0===r&&":"===n){if(i){if("word"===i[0]&&"progid"===i[1])continue;return o}this.doubleColon(e)}i=e}return!1}comment(t){let e=new pc;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let t=n.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 n,i,r,o,s,a,c,l,u,h,f=t.css.valueOf(),d=e.ignoreErrors,p=f.length,m=0,g=[],y=[];function w(e){throw t.error("Unclosed "+e,m)}return{back:function(t){y.push(t)},endOfFile:function(){return 0===y.length&&m>=p},nextToken:function(t){if(y.length)return y.pop();if(m>=p)return;let e=!!t&&t.ignoreUnclosed;switch(n=f.charCodeAt(m),n){case Na:case Ba:case Pa:case Da:case La:i=m;do{i+=1,n=f.charCodeAt(i)}while(n===Ba||n===Na||n===Pa||n===Da||n===La);h=["space",f.slice(m,i)],m=i-1;break;case ja:case Ua:case $a:case Va:case za:case Za:case Wa:{let t=String.fromCharCode(n);h=[t,t,m];break}case Ga:if(l=g.length?g.pop()[1]:"",u=f.charCodeAt(m+1),"url"===l&&u!==Ta&&u!==_a&&u!==Ba&&u!==Na&&u!==Pa&&u!==La&&u!==Da){i=m;do{if(a=!1,i=f.indexOf(")",i+1),-1===i){if(d||e){i=m;break}w("bracket")}for(c=i;f.charCodeAt(c-1)===Oa;)c-=1,a=!a}while(a);h=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),o=f.slice(m,i+1),-1===i||Ka.test(o)?h=["(","(",m]:(h=["brackets",o,m,i],m=i);break;case Ta:case _a:r=n===Ta?"'":'"',i=m;do{if(a=!1,i=f.indexOf(r,i+1),-1===i){if(d||e){i=m+1;break}w("string")}for(c=i;f.charCodeAt(c-1)===Oa;)c-=1,a=!a}while(a);h=["string",f.slice(m,i+1),m,i],m=i;break;case Ha:Xa.lastIndex=m+1,Xa.test(f),i=0===Xa.lastIndex?f.length-1:Xa.lastIndex-2,h=["at-word",f.slice(m,i+1),m,i],m=i;break;case Oa:for(i=m,s=!0;f.charCodeAt(i+1)===Oa;)i+=1,s=!s;if(n=f.charCodeAt(i+1),s&&n!==Fa&&n!==Ba&&n!==Na&&n!==Pa&&n!==Da&&n!==La&&(i+=1,qa.test(f.charAt(i)))){for(;qa.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===Ba&&(i+=1)}h=["word",f.slice(m,i+1),m,i],m=i;break;default:n===Fa&&f.charCodeAt(m+1)===Ya?(i=f.indexOf("*/",m+2)+1,0===i&&(d||e?i=f.length:w("comment")),h=["comment",f.slice(m,i+1),m,i],m=i):(Ja.lastIndex=m+1,Ja.test(f),i=0===Ja.lastIndex?f.length-1:Ja.lastIndex-2,h=["word",f.slice(m,i+1),m,i],g.push(h),m=i)}return m++,h},position:function(){return m}}}(this.input)}decl(t,e){let n=new dc;this.init(n,t[0][2]);let i,r=t[t.length-1];for(";"===r[0]&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||function(t){for(let e=t.length-1;e>=0;e--){let n=t[e],i=n[3]||n[2];if(i)return i}}(t)),n.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;n.prop+=t.shift()[1]}for(n.raws.between="";t.length;){if(i=t.shift(),":"===i[0]){n.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o,s=[];for(;t.length&&(o=t[0][0],"space"===o||"comment"===o);)s.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(i=t[e],"!important"===i[1].toLowerCase()){n.important=!0;let i=this.stringFrom(t,e);i=this.spacesFromEnd(t)+i," !important"!==i&&(n.raws.important=i);break}if("important"===i[1].toLowerCase()){let i=t.slice(0),r="";for(let t=e;t>0;t--){let e=i[t][0];if(0===r.trim().indexOf("!")&&"space"!==e)break;r=i.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,t=i)}if("space"!==i[0]&&"comment"!==i[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(n.raws.between+=s.map(t=>t[1]).join(""),s=[]),this.raw(n,"value",s.concat(t),e),n.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 yc;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,n=null,i=!1,r=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),"("===n||"["===n)r||(r=c),o.push("("===n?")":"]");else if(s&&i&&"{"===n)r||(r=c),o.push("}");else if(0===o.length){if(";"===n){if(i)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),e=!0;break}":"===n&&(i=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(r=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(r),e&&i){if(!s)for(;a.length&&(c=a[a.length-1][0],"space"===c||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}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,n,i){let r,o,s,a,c=n.length,l="",u=!0;for(let t=0;t<c;t+=1)r=n[t],o=r[0],"space"!==o||t!==c-1||i?"comment"===o?(a=n[t-1]?n[t-1][0]:"empty",s=n[t+1]?n[t+1][0]:"empty",wc[a]||wc[s]||","===l.slice(-1)?u=!1:l+=r[1]):l+=r[1]:u=!1;if(!u){let i=n.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:i,value:l}}t[e]=l}rule(t){t.pop();let e=new yc;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let i=e;i<t.length;i++)n+=t[i][1];return t.splice(e,t.length-e),n}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})}},Sc=Vs;function Cc(t,e){let n=new Sc(t,e),i=new bc(n);try{i.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 i.root}var kc=Cc;Cc.default=Cc,vc.registerParse(Cc);let{isClean:Ic,my:Mc}=is,Ac=ea,Rc=ls,xc=ya,Ec=Ca,Tc=Ia,_c=Ea,Oc=kc,Fc=sc;const Nc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Bc={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},Lc={Once:!0,postcssPlugin:!0,prepare:!0};function Pc(t){return"object"==typeof t&&"function"==typeof t.then}function Dc(t){let e=!1,n=Nc[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,0,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function jc(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:Dc(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Uc(t){return t[Ic]=!1,t.nodes&&t.nodes.forEach(t=>Uc(t)),t}let Gc={},Wc=class t{constructor(e,n,i){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof t||n instanceof _c)r=Uc(n.root),n.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=n.map);else{let t=Oc;i.syntax&&(t=i.syntax.parse),i.parser&&(t=i.parser),t.parse&&(t=t.parse);try{r=t(n,i)}catch(t){this.processed=!0,this.error=t}r&&!r[Mc]&&xc.rebuild(r)}else r=Uc(n);this.result=new _c(e,r,i),this.helpers={...Gc,postcss:Gc,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 n=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){let t=n.postcssPlugin,e=n.postcssVersion,i=this.result.processor.version,r=e.split("."),o=i.split(".");(r[0]!==o[0]||parseInt(r[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=n.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,n)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,n])};for(let e of this.plugins)if("object"==typeof e)for(let n in e){if(!Bc[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Lc[n])if("object"==typeof e[n])for(let i in e[n])t(e,"*"===i?n:n+"-"+i.toLowerCase(),e[n][i]);else"function"==typeof e[n]&&t(e,n,e[n])}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],n=this.runOnRoot(e);if(Pc(n))try{await n}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ic];){t[Ic]=!0;let e=[jc(t)];for(;e.length>0;){let t=this.visitTick(e);if(Pc(t))try{await t}catch(t){let n=e[e.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(t=>n(t,this.helpers));await Promise.all(e)}else await n(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 Pc(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=Rc;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let n=new Ac(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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(Pc(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ic];)t[Ic]=!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||Tc("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[n,i]of t){let t;this.result.lastPlugin=n;try{t=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Pc(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:n,visitors:i}=e;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(i.length>0&&e.visitorIndex<i.length){let[t,r]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return r(n.toProxy(),this.helpers)}catch(t){throw this.handleError(t,n)}}if(0!==e.iterator){let i,r=e.iterator;for(;i=n.nodes[n.indexes[r]];)if(n.indexes[r]+=1,!i[Ic])return i[Ic]=!0,void t.push(jc(i));e.iterator=0,delete n.indexes[r]}let r=e.events;for(;e.eventIndex<r.length;){let t=r[e.eventIndex];if(e.eventIndex+=1,0===t)return void(n.nodes&&n.nodes.length&&(n[Ic]=!0,e.iterator=n.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[Ic]=!0;let e=Dc(t);for(let n of e)if(0===n)t.nodes&&t.each(t=>{t[Ic]||this.walkSync(t)});else{let e=this.listeners[n];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"}};Wc.registerPostcss=t=>{Gc=t};var $c=Wc;Wc.default=Wc,Fc.registerLazyResult(Wc),Ec.registerLazyResult(Wc);let Vc=ea,Zc=ls,Yc=Ia,zc=kc;const Hc=Ea;let Xc=class{constructor(t,e,n){let i;e=e.toString(),this.stringified=!1,this.p=t,this.m=e,this.v=n,this.S=void 0;let r=Zc;this.result=new Hc(this.p,i,this.v),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let s=new Vc(r,i,this.v,e);if(s.isMap()){let[t,e]=s.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else s.clearAnnotation(),this.result.css=s.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.v||Yc("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.m}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.C)return this.C;let t,e=zc;try{t=e(this.m,this.v)}catch(t){this.error=t}if(this.error)throw this.error;return this.C=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var Jc=Xc;Xc.default=Xc;let Kc=Jc,qc=$c,Qc=Ca,tl=sc,el=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)e.push(n);else if("function"==typeof n)e.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" 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 qc(this,t,e):new Kc(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var nl=el;el.default=el,tl.registerProcessor(el),Qc.registerProcessor(el);let il=bs,rl=Es,ol=ra,sl=ec,al=Vs,cl=sc,ll=fc;function ul(t,e){if(Array.isArray(t))return t.map(t=>ul(t));let{inputs:n,...i}=t;if(n){e=[];for(let t of n){let n={...t,__proto__:al.prototype};n.map&&(n.map={...n.map,__proto__:rl.prototype}),e.push(n)}}if(i.nodes&&(i.nodes=t.nodes.map(t=>ul(t,e))),i.source){let{inputId:t,...n}=i.source;i.source=n,null!=t&&(i.source.input=e[t])}if("root"===i.type)return new cl(i);if("decl"===i.type)return new il(i);if("rule"===i.type)return new ll(i);if("comment"===i.type)return new ol(i);if("atrule"===i.type)return new sl(i);throw new Error("Unknown node type: "+t.type)}var hl=ul;ul.default=ul;let fl=ns,dl=bs,pl=$c,ml=ya,gl=nl,yl=ls,wl=hl,vl=Ca,bl=Aa,Sl=ra,Cl=ec,kl=Ea,Il=Vs,Ml=kc,Al=cc,Rl=fc,xl=sc,El=ys;function Tl(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new gl(t)}Tl.plugin=function(t,e){let n,i=!1;function r(...n){console&&console.warn&&!i&&(i=!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(...n);return r.postcssPlugin=t,r.postcssVersion=(new gl).version,r}return Object.defineProperty(r,"postcss",{get:()=>(n||(n=r()),n)}),r.process=function(t,e,n){return Tl([r(n)]).process(t,e)},r},Tl.stringify=yl,Tl.parse=Ml,Tl.fromJSON=wl,Tl.list=Al,Tl.comment=t=>new Sl(t),Tl.atRule=t=>new Cl(t),Tl.decl=t=>new dl(t),Tl.rule=t=>new Rl(t),Tl.root=t=>new xl(t),Tl.document=t=>new vl(t),Tl.CssSyntaxError=fl,Tl.Declaration=dl,Tl.Container=ml,Tl.Processor=gl,Tl.Document=vl,Tl.Comment=Sl,Tl.Warning=bl,Tl.AtRule=Cl,Tl.Result=kl,Tl.Input=Il,Tl.Rule=Rl,Tl.Root=xl,Tl.Node=El,pl.registerPostcss(Tl);var _l=Tl;Tl.default=Tl;const Ol=Yo(_l);Ol.stringify,Ol.fromJSON,Ol.plugin,Ol.parse,Ol.list,Ol.document,Ol.comment,Ol.atRule,Ol.rule,Ol.decl,Ol.root,Ol.CssSyntaxError,Ol.Declaration,Ol.Container,Ol.Processor,Ol.Document,Ol.Comment,Ol.Warning,Ol.AtRule,Ol.Result,Ol.Input,Ol.Rule,Ol.Root,Ol.Node;class Fl{constructor(...t){Zo(this,"parentElement",null),Zo(this,"parentNode",null),Zo(this,"ownerDocument"),Zo(this,"firstChild",null),Zo(this,"lastChild",null),Zo(this,"previousSibling",null),Zo(this,"nextSibling",null),Zo(this,"ELEMENT_NODE",1),Zo(this,"TEXT_NODE",3),Zo(this,"nodeType"),Zo(this,"nodeName"),Zo(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 Fl))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 Nl={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Bl={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ll={};function Pl(t){if(Ll[t])return Ll[t];const e=globalThis[t],n=e.prototype,i=t in Nl?Nl[t]:void 0,r=Boolean(i&&i.every(t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(n,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))})),o=t in Bl?Bl[t]:void 0,s=Boolean(o&&o.every(t=>{var e;return"function"==typeof n[t]&&(null==(e=n[t])?void 0:e.toString().includes("[native code]"))}));if(r&&s&&!globalThis.Zone)return Ll[t]=e.prototype,e.prototype;try{const i=document.createElement("iframe");document.body.appendChild(i);const r=i.contentWindow;if(!r)return e.prototype;const o=r[t].prototype;return document.body.removeChild(i),o?Ll[t]=o:n}catch{return n}}const Dl={};function jl(t,e,n){var i;const r=`${t}.${String(n)}`;if(Dl[r])return Dl[r].call(e);const o=Pl(t),s=null==(i=Object.getOwnPropertyDescriptor(o,n))?void 0:i.get;return s?(Dl[r]=s,s.call(e)):e[n]}const Ul={};function Gl(t,e,n){const i=`${t}.${String(n)}`;if(Ul[i])return Ul[i].bind(e);const r=Pl(t)[n];return"function"!=typeof r?e[n]:(Ul[i]=r,r.bind(e))}const Wl=function(t){return jl("Node",t,"childNodes")},$l=function(t){return jl("Node",t,"parentNode")},Vl=function(t){return jl("Node",t,"parentElement")},Zl=function(t){return jl("Node",t,"textContent")},Yl=function(t,e){return Gl("Node",t,"contains")(e)},zl=function(t){return Gl("Node",t,"getRootNode")()},Hl=function(t){return t&&"host"in t?jl("ShadowRoot",t,"host"):null},Xl=function(t){return t&&"shadowRoot"in t?jl("Element",t,"shadowRoot"):null};function Jl(t,e,n=document){const i={capture:!0,passive:!0};return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}const Kl="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 ql={map:{},getId:()=>(console.error(Kl),-1),getNode:()=>(console.error(Kl),null),removeNodeFromMap(){console.error(Kl)},has:()=>(console.error(Kl),!1),reset(){console.error(Kl)}};function Ql(t,e,n={}){let i=null,r=0;return function(...o){const s=Date.now();r||!1!==n.leading||(r=s);const a=e-(s-r),c=this;a<=0||a>e?(i&&(clearTimeout(i),i=null),r=s,t.apply(c,o)):i||!1===n.trailing||(i=setTimeout(()=>{r=!1===n.leading?0:Date.now(),i=null,t.apply(c,o)},a))}}function tu(t,e,n,i,r=window){const o=r.Object.getOwnPropertyDescriptor(t,e);return r.Object.defineProperty(t,e,i?n:{set(t){setTimeout(()=>{n.set.call(this,t)},0),o&&o.set&&o.set.call(this,t)}}),()=>tu(t,e,o||{},!0)}function eu(t,e,n){try{if(!(e in t))return()=>{};const i=t[e],r=n(i);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{k:{enumerable:!1,value:i}})),t[e]=r,()=>{t[e]=i}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ql=new Proxy(ql,{get:(t,e,n)=>("map"===e&&console.error(Kl),Reflect.get(t,e,n))}));let nu=Date.now;function iu(t){var e,n,i,r;const o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(e=Vl(o.body))?void 0:e.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(i=Vl(o.body))?void 0:i.scrollTop)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollTop)||0}}function ru(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ou(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function su(t){return t?t.nodeType===t.ELEMENT_NODE?t:Vl(t):null}function au(t,e,n,i){if(!t)return!1;const r=su(t);if(!r)return!1;try{if("string"==typeof e){if(r.classList.contains(e))return!0;if(i&&null!==r.closest("."+e))return!0}else if(Ke(r,e,i))return!0}catch(t){}if(n){if(r.matches(n))return!0;if(i&&null!==r.closest(n))return!0}return!1}function cu(t,e,n){return!("TITLE"!==t.tagName||!n.headTitleMutations)||-2===e.getId(t)}function lu(t,e){if(ke(t))return!1;const n=e.getId(t);if(!e.has(n))return!0;const i=$l(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||lu(i,e))}function uu(t){return Boolean(t.changedTouches)}function hu(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function fu(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function du(t){return!!t&&(t instanceof Fl&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Xl(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(nu=()=>(new Date).getTime());class pu{constructor(){ce(this,"id",1),ce(this,"styleIDMap",new WeakMap),ce(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 n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}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 mu(t){var e;let n=null;return"getRootNode"in t&&(null==(e=zl(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Hl(zl(t))&&(n=Hl(zl(t))),n}function gu(t){const e=t.ownerDocument;return!!e&&(Yl(e,t)||function(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=mu(n);)n=e;return n}(t);return Yl(e,n)}(t))}var yu=(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))(yu||{}),wu=(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))(wu||{}),vu=(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))(vu||{}),bu=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(bu||{}),Su=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Su||{}),Cu=(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))(Cu||{}),ku=(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))(ku||{});function Iu(t){return"I"in t}class Mu{constructor(){ce(this,"length",0),ce(this,"head",null),ce(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n<t;n++)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&&Iu(t.previousSibling)){const n=t.previousSibling.I.next;e.next=n,e.previous=t.previousSibling.I,t.previousSibling.I.next=e,n&&(n.previous=e)}else if(t.nextSibling&&Iu(t.nextSibling)&&t.nextSibling.I.previous){const n=t.nextSibling.I.previous;e.previous=n,e.next=t.nextSibling.I,t.nextSibling.I.previous=e,n&&(n.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 Au=(t,e)=>`${t}@${e}`;class Ru{constructor(){ce(this,"frozen",!1),ce(this,"locked",!1),ce(this,"texts",[]),ce(this,"attributes",[]),ce(this,"attributeMap",new WeakMap),ce(this,"removes",[]),ce(this,"mapRemoves",[]),ce(this,"movedMap",{}),ce(this,"addedSet",new Set),ce(this,"movedSet",new Set),ce(this,"droppedSet",new Set),ce(this,"removesSubTreeCache",new Set),ce(this,"mutationCb"),ce(this,"blockClass"),ce(this,"blockSelector"),ce(this,"maskTextClass"),ce(this,"maskTextSelector"),ce(this,"inlineStylesheet"),ce(this,"maskInputOptions"),ce(this,"maskTextFn"),ce(this,"maskInputFn"),ce(this,"keepIframeSrcFn"),ce(this,"recordCanvas"),ce(this,"inlineImages"),ce(this,"slimDOMOptions"),ce(this,"dataURLOptions"),ce(this,"doc"),ce(this,"mirror"),ce(this,"iframeManager"),ce(this,"stylesheetManager"),ce(this,"shadowDomManager"),ce(this,"canvasManager"),ce(this,"processedNodeManager"),ce(this,"unattachedDoc"),ce(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),ce(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,n=new Mu,i=t=>{let e=t,n=-2;for(;-2===n;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},r=r=>{const o=$l(r);if(!o||!gu(r))return;let s=!1;if(r.nodeType===Node.TEXT_NODE){const t=o.tagName;if("TEXTAREA"===t)return;"STYLE"===t&&this.addedSet.has(o)&&(s=!0)}const a=ke(o)?this.mirror.getId(mu(r)):this.mirror.getId(o),c=i(r);if(-1===a||-1===c)return n.addNode(r);const l=tn(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=>{hu(t,this.mirror)&&this.iframeManager.addIframe(t),fu(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),du(r)&&this.shadowDomManager.addShadowRoot(Xl(r),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},cssCaptured:s});l&&(t.push({parentId:a,nextId:c,node:l}),e.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)Eu(this.removesSubTreeCache,t,this.mirror)&&!this.movedSet.has($l(t))||r(t);for(const t of this.addedSet)Tu(this.droppedSet,t)||Eu(this.removesSubTreeCache,t,this.mirror)?Tu(this.movedSet,t)?r(t):this.droppedSet.add(t):r(t);let o=null;for(;n.length;){let t=null;if(o){const e=this.mirror.getId($l(o.value)),n=i(o.value);-1!==e&&-1!==n&&(t=o)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId($l(n.value));if(-1===i(n.value))continue;if(-1!==e){t=n;break}{const e=n.value,i=$l(e);if(i&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const e=Hl(i);if(-1!==this.mirror.getId(e)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}o=t.previous,n.removeNode(t.value),r(t.value)}const s={texts:this.texts.map(t=>{const e=t.node,n=$l(e);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{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 n=JSON.stringify(t.styleDiff),i=JSON.stringify(t.M);n.length<e.style.length&&(n+i).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};(s.texts.length||s.attributes.length||s.removes.length||s.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(s))}),ce(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},M:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(Wl(t),t=>Zl(t)||"").join("")}),ce(this,"processMutation",t=>{if(!cu(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const e=Zl(t.target);au(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:qe(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,su(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=t.attributeName,i=t.target.getAttribute(n);if("value"===n){const t=_e(e);i=xe({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:t,value:i,maskInputFn:this.maskInputFn})}if(au(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let r=this.attributeMap.get(t.target);if("IFRAME"===e.tagName&&"src"===n&&!this.keepIframeSrcFn(i)){if(e.contentDocument)return;n="rr_src"}if(r||(r={node:t.target,attributes:{},styleDiff:{},M:{}},this.attributes.push(r),this.attributeMap.set(t.target,r)),"type"===n&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),!Je(e.tagName,n))if(r.attributes[n]=Xe(this.doc,Ee(e.tagName),Ee(n),i),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue);for(const t of Array.from(e.style)){const i=e.style.getPropertyValue(t),o=e.style.getPropertyPriority(t);i!==n.style.getPropertyValue(t)||o!==n.style.getPropertyPriority(t)?r.styleDiff[t]=""===o?i:[i,o]:r.M[t]=[i,o]}for(const t of Array.from(n.style))""===e.style.getPropertyValue(t)&&(r.styleDiff[t]=!1)}else"open"===n&&"DIALOG"===e.tagName&&(e.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal");break}case"childList":if(au(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 n=this.mirror.getId(e),i=ke(t.target)?this.mirror.getId(Hl(t.target)):this.mirror.getId(t.target);au(t.target,this.blockClass,this.blockSelector,!1)||cu(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(xu(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||lu(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Au(n,i)]?xu(this.movedSet,e):(this.removes.push({parentId:i,id:n,isShadow:!(!ke(t.target)||!Ie(t.target))||void 0}),function(t,e){const n=[t];for(;n.length;){const t=n.pop();e.has(t)||(e.add(t),Wl(t).forEach(t=>n.push(t)))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))})}}),ce(this,"genAdds",(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(cu(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[Au(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);au(t,this.blockClass,this.blockSelector,!1)||(Wl(t).forEach(t=>this.genAdds(t)),du(t)&&Wl(Xl(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 xu(t,e){t.delete(e),Wl(e).forEach(e=>xu(t,e))}function Eu(t,e,n){return 0!==t.size&&function(t,e){const n=$l(e);return!!n&&t.has(n)}(t,e)}function Tu(t,e){return 0!==t.size&&_u(t,e)}function _u(t,e){const n=$l(e);return!!n&&(!!t.has(n)||_u(t,n))}let Ou;const Fu=t=>Ou?(...e)=>{try{return t(...e)}catch(t){if(Ou&&!0===Ou(t))return;throw t}}:t,Nu=[];function Bu(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 Lu(t,e){const n=new Ru;Nu.push(n),n.init(t);const i=new(Pl("MutationObserver").constructor)(Fu(n.processMutations.bind(n)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Pu({scrollCb:t,doc:e,mirror:n,blockClass:i,blockSelector:r,sampling:o}){return Jl("scroll",Fu(Ql(Fu(o=>{const s=Bu(o);if(!s||au(s,i,r,!0))return;const a=n.getId(s);if(s===e&&e.defaultView){const n=iu(e.defaultView);t({id:a,x:n.left,y:n.top})}else t({id:a,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),e)}const Du=["INPUT","TEXTAREA","SELECT"],ju=new WeakMap;function Uu(t){return function(t,e){if(Vu("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Vu("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Vu("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Vu("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function Gu(t,e,n){let i,r;return t?(t.ownerNode?i=e.getId(t.ownerNode):r=n.getId(t),{styleId:r,id:i}):{}}function Wu({mirror:t,stylesheetManager:e},n){var i,r,o;let s=null;s="#document"===n.nodeName?t.getId(n):t.getId(Hl(n));const a="#document"===n.nodeName?null==(i=n.defaultView)?void 0:i.Document:null==(o=null==(r=n.ownerDocument)?void 0:r.defaultView)?void 0:o.ShadowRoot,c=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&c?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var t;return null==(t=c.get)?void 0:t.call(this)},set(t){var n;const i=null==(n=c.set)?void 0:n.call(this,t);if(null!==s&&-1!==s)try{e.adoptStyleSheets(t,s)}catch(t){}return i}}),Fu(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})})):()=>{}}function $u(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let i;!function(t,e){const{mutationCb:n,mousemoveCb:i,mouseInteractionCb:r,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:h,fontCb:f,selectionCb:d,customElementCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),n(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),i(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),r(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),o(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),s(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),a(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),c(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),l(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),h(...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&&(i=Lu(t,t.doc));const r=function({mousemoveCb:t,sampling:e,doc:n,mirror:i}){if(!1===e.mousemove)return()=>{};const r="number"==typeof e.mousemove?e.mousemove:50,o="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let s,a=[];const c=Ql(Fu(e=>{const n=Date.now()-s;t(a.map(t=>(t.timeOffset-=n,t)),e),a=[],s=null}),o),l=Fu(Ql(Fu(t=>{const e=Bu(t),{clientX:n,clientY:r}=uu(t)?t.changedTouches[0]:t;s||(s=nu()),a.push({x:n,y:r,id:i.getId(e),timeOffset:nu()-s}),c("undefined"!=typeof DragEvent&&t instanceof DragEvent?wu.Drag:t instanceof MouseEvent?wu.MouseMove:wu.TouchMove)}),r,{trailing:!1})),u=[Jl("mousemove",l,n),Jl("touchmove",l,n),Jl("drag",l,n)];return Fu(()=>{u.forEach(t=>t())})}(t),o=function({mouseInteractionCb:t,doc:e,mirror:n,blockClass:i,blockSelector:r,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const s=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let c=null;return Object.keys(vu).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==s[t]).forEach(o=>{let s=Ee(o);const l=(e=>o=>{const s=Bu(o);if(au(s,i,r,!0))return;let a=null,l=e;if("pointerType"in o){switch(o.pointerType){case"mouse":a=bu.Mouse;break;case"touch":a=bu.Touch;break;case"pen":a=bu.Pen}a===bu.Touch?vu[e]===vu.MouseDown?l="TouchStart":vu[e]===vu.MouseUp&&(l="TouchEnd"):bu.Pen}else uu(o)&&(a=bu.Touch);null!==a?(c=a,(l.startsWith("Touch")&&a===bu.Touch||l.startsWith("Mouse")&&a===bu.Mouse)&&(a=null)):vu[e]===vu.Click&&(a=c,c=null);const u=uu(o)?o.changedTouches[0]:o;if(!u)return;const h=n.getId(s),{clientX:f,clientY:d}=u;Fu(t)({type:vu[l],id:h,x:f,y:d,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(vu[o]){case vu.MouseDown:case vu.MouseUp:s=s.replace("mouse","pointer");break;case vu.TouchStart:case vu.TouchEnd:return}a.push(Jl(s,l,e))}),Fu(()=>{a.forEach(t=>t())})}(t),s=Pu(t),a=function({viewportResizeCb:t},{win:e}){let n=-1,i=-1;return Jl("resize",Fu(Ql(Fu(()=>{const e=ru(),r=ou();n===e&&i===r||(t({width:Number(r),height:Number(e)}),n=e,i=r)}),200)),e)}(t,{win:n}),c=function({inputCb:t,doc:e,mirror:n,blockClass:i,blockSelector:r,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function h(t){let n=Bu(t);const l=t.isTrusted,h=n&&n.tagName;if(n&&"OPTION"===h&&(n=Vl(n)),!n||!h||Du.indexOf(h)<0||au(n,i,r,!0))return;if(n.classList.contains(o)||s&&n.matches(s))return;let d=n.value,p=!1;const m=_e(n)||"";"radio"===m||"checkbox"===m?p=n.checked:(a[h.toLowerCase()]||a[m])&&(d=xe({element:n,maskInputOptions:a,tagName:h,type:m,value:d,maskInputFn:c})),f(n,u?{text:d,isChecked:p,userTriggered:l}:{text:d,isChecked:p});const g=n.name;"radio"===m&&g&&p&&e.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(t=>{if(t!==n){const e=t.value;f(t,u?{text:e,isChecked:!p,userTriggered:!1}:{text:e,isChecked:!p})}})}function f(e,i){const r=ju.get(e);if(!r||r.text!==i.text||r.isChecked!==i.isChecked){ju.set(e,i);const r=n.getId(e);Fu(t)({...i,id:r})}}const d=("last"===l.input?["change"]:["input","change"]).map(t=>Jl(t,Fu(h),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=>tu(t[0],t[1],{set(){Fu(h)({target:this,isTrusted:!1})}},!1,p))),Fu(()=>{d.forEach(t=>t())})}(t),l=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:i,sampling:r,doc:o}){const s=Fu(o=>Ql(Fu(r=>{const s=Bu(r);if(!s||au(s,e,n,!0))return;const{currentTime:a,volume:c,muted:l,playbackRate:u,loop:h}=s;t({type:o,id:i.getId(s),currentTime:a,volume:c,muted:l,playbackRate:u,loop:h})}),r.media||500)),a=[Jl("play",s(Cu.Play),o),Jl("pause",s(Cu.Pause),o),Jl("seeked",s(Cu.Seeked),o),Jl("volumechange",s(Cu.VolumeChange),o),Jl("ratechange",s(Cu.RateChange),o)];return Fu(()=>{a.forEach(t=>t())})}(t);let u=()=>{},h=()=>{},f=()=>{},d=()=>{};t.recordDOM&&(u=function({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const r=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:Fu((i,r,o)=>{const[s,a]=o,{id:c,styleId:l}=Gu(r,e,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&t({id:c,styleId:l,adds:[{rule:s,index:a}]}),i.apply(r,o)})}),i.CSSStyleSheet.prototype.addRule=function(t,e,n=this.cssRules.length){const r=`${t} { ${e} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};const o=i.CSSStyleSheet.prototype.deleteRule;let s,a;i.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:Fu((i,r,o)=>{const[s]=o,{id:a,styleId:c}=Gu(r,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:s}]}),i.apply(r,o)})}),i.CSSStyleSheet.prototype.removeRule=function(t){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},i.CSSStyleSheet.prototype.replace&&(s=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Fu((i,r,o)=>{const[s]=o,{id:a,styleId:c}=Gu(r,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replace:s}),i.apply(r,o)})})),i.CSSStyleSheet.prototype.replaceSync&&(a=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Fu((i,r,o)=>{const[s]=o,{id:a,styleId:c}=Gu(r,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replaceSync:s}),i.apply(r,o)})}));const c={};Zu("CSSGroupingRule")?c.CSSGroupingRule=i.CSSGroupingRule:(Zu("CSSMediaRule")&&(c.CSSMediaRule=i.CSSMediaRule),Zu("CSSConditionRule")&&(c.CSSConditionRule=i.CSSConditionRule),Zu("CSSSupportsRule")&&(c.CSSSupportsRule=i.CSSSupportsRule));const l={};return Object.entries(c).forEach(([i,r])=>{l[i]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(l[i].insertRule,{apply:Fu((i,r,o)=>{const[s,a]=o,{id:c,styleId:l}=Gu(r.parentStyleSheet,e,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&t({id:c,styleId:l,adds:[{rule:s,index:[...Uu(r),a||0]}]}),i.apply(r,o)})}),r.prototype.deleteRule=new Proxy(l[i].deleteRule,{apply:Fu((i,r,o)=>{const[s]=o,{id:a,styleId:c}=Gu(r.parentStyleSheet,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:[...Uu(r),s]}]}),i.apply(r,o)})})}),Fu(()=>{i.CSSStyleSheet.prototype.insertRule=r,i.CSSStyleSheet.prototype.deleteRule=o,s&&(i.CSSStyleSheet.prototype.replace=s),a&&(i.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([t,e])=>{e.prototype.insertRule=l[t].insertRule,e.prototype.deleteRule=l[t].deleteRule})})}(t,{win:n}),h=Wu(t,t.doc),f=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:i},{win:r}){const o=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Fu((r,s,a)=>{var c;const[l,u,h]=a;if(n.has(l))return o.apply(s,[l,u,h]);const{id:f,styleId:d}=Gu(null==(c=s.parentRule)?void 0:c.parentStyleSheet,e,i.styleMirror);return(f&&-1!==f||d&&-1!==d)&&t({id:f,styleId:d,set:{property:l,value:u,priority:h},index:Uu(s.parentRule)}),r.apply(s,a)})});const s=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Fu((r,o,a)=>{var c;const[l]=a;if(n.has(l))return s.apply(o,[l]);const{id:u,styleId:h}=Gu(null==(c=o.parentRule)?void 0:c.parentStyleSheet,e,i.styleMirror);return(u&&-1!==u||h&&-1!==h)&&t({id:u,styleId:h,remove:{property:l},index:Uu(o.parentRule)}),r.apply(o,a)})}),Fu(()=>{r.CSSStyleDeclaration.prototype.setProperty=o,r.CSSStyleDeclaration.prototype.removeProperty=s})}(t,{win:n}),t.collectFonts&&(d=function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const i=[],r=new WeakMap,o=n.FontFace;n.FontFace=function(t,e,n){const i=new o(t,e,n);return r.set(i,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};const s=eu(e.fonts,"add",function(e){return function(n){return setTimeout(Fu(()=>{const e=r.get(n);e&&(t(e),r.delete(n))}),0),e.apply(this,[n])}});return i.push(()=>{n.FontFace=o}),i.push(s),Fu(()=>{i.forEach(t=>t())})}(t)));const p=function(t){const{doc:e,mirror:n,blockClass:i,blockSelector:r,selectionCb:o}=t;let s=!0;const a=Fu(()=>{const t=e.getSelection();if(!t||s&&(null==t?void 0:t.isCollapsed))return;s=t.isCollapsed||!1;const a=[],c=t.rangeCount||0;for(let e=0;e<c;e++){const o=t.getRangeAt(e),{startContainer:s,startOffset:c,endContainer:l,endOffset:u}=o;au(s,i,r,!0)||au(l,i,r,!0)||a.push({start:n.getId(s),startOffset:c,end:n.getId(l),endOffset:u})}o({ranges:a})});return a(),Jl("selectionchange",a)}(t),m=function({doc:t,customElementCb:e}){const n=t.defaultView;return n&&n.customElements?eu(n.customElements,"define",function(t){return function(n,i,r){try{e({define:{name:n}})}catch(t){console.warn(`Custom element callback failed for ${n}`)}return t.apply(this,[n,i,r])}}):()=>{}}(t),g=[];for(const e of t.plugins)g.push(e.observer(e.callback,n,e.options));return Fu(()=>{Nu.forEach(t=>t.reset()),null==i||i.disconnect(),r(),o(),s(),a(),c(),l(),u(),h(),f(),d(),p(),m(),g.forEach(t=>t())})}function Vu(t){return void 0!==window[t]}function Zu(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Yu{constructor(t){ce(this,"iframeIdToRemoteIdMap",new WeakMap),ce(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,n,i){const r=n||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let s=r.get(e);return s||(s=this.generateIdFn(),r.set(e,s),o.set(s,e)),s}getIds(t,e){const n=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,n,i))}getRemoteId(t,e,n){const i=n||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,n))}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 zu{constructor(t){ce(this,"iframes",new WeakMap),ce(this,"crossOriginIframeMap",new WeakMap),ce(this,"crossOriginIframeMirror",new Yu(Ge)),ce(this,"crossOriginIframeStyleMirror"),ce(this,"crossOriginIframeRootIdMap",new WeakMap),ce(this,"mirror"),ce(this,"mutationCb"),ce(this,"wrappedEmit"),ce(this,"loadListener"),ce(this,"stylesheetManager"),ce(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Yu(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 n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=t.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(i=this.loadListener)||i.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 n=this.crossOriginIframeMap.get(t.source);if(!n)return;const i=this.transformCrossOriginEvent(n,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}transformCrossOriginEvent(t,e){var n;switch(e.type){case yu.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:yu.IncrementalSnapshot,data:{source:wu.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case yu.Meta:case yu.Load:case yu.DomContentLoaded:return!1;case yu.Plugin:return e;case yu.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case yu.IncrementalSnapshot:switch(e.data.source){case wu.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)}),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 wu.Drag:case wu.TouchMove:case wu.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case wu.ViewportResize:return!1;case wu.MediaInteraction:case wu.MouseInteraction:case wu.Scroll:case wu.CanvasMutation:case wu.Input:return this.replaceIds(e.data,t,["id"]),e;case wu.StyleSheetRule:case wu.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case wu.Font:return e;case wu.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case wu.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(n=e.data.styles)||n.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,n,i){for(const r of i)(Array.isArray(e[r])||"number"==typeof e[r])&&(Array.isArray(e[r])?e[r]=t.getIds(n,e[r]):e[r]=t.getId(n,e[r]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}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===ku.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class Hu{constructor(t){ce(this,"shadowDoms",new WeakSet),ce(this,"mutationCb"),ce(this,"scrollCb"),ce(this,"bypassOptions"),ce(this,"mirror"),ce(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(!Ie(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=Lu({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Pu({...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(Hl(t))),this.restoreHandlers.push(Wu({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 n=this;this.restoreHandlers.push(eu(t.prototype,"attachShadow",function(t){return function(i){const r=t.call(this,i),o=Xl(this);return o&&gu(this)&&n.addShadowRoot(o,e),r}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Xu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ju="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ku=0;Ku<64;Ku++)Ju[Xu.charCodeAt(Ku)]=Ku;const qu=new Map,Qu=(t,e,n)=>{if(!t||!nh(t,e)&&"object"!=typeof t)return;const i=function(t,e){let n=qu.get(t);return n||(n=new Map,qu.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let r=i.indexOf(t);return-1===r&&(r=i.length,i.push(t)),r};function th(t,e,n){if(t instanceof Array)return t.map(t=>th(t,e,n));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,n=new Uint8Array(t),i=n.length,r="";for(e=0;e<i;e+=3)r+=Xu[n[e]>>2],r+=Xu[(3&n[e])<<4|n[e+1]>>4],r+=Xu[(15&n[e+1])<<2|n[e+2]>>6],r+=Xu[63&n[e+2]];return i%3==2?r=r.substring(0,r.length-1)+"=":i%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[th(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[th(t.data,e,n),t.width,t.height]}:nh(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Qu(t,e,n)}:t}const eh=(t,e,n)=>t.map(t=>th(t,e,n)),nh=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(n.find(n=>t instanceof e[n]))};function ih(t,e,n,i){const r=[];try{const o=eu(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(r,...o){if(!au(this,e,n,!0)){const t=function(t){return"experimental-webgl"===t?"webgl":t}(r);if("l"in this||(this.l=t),i&&["webgl","webgl2"].includes(t))if(o[0]&&"object"==typeof o[0]){const t=o[0];t.preserveDrawingBuffer||(t.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[r,...o])}});r.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(t=>t())}}function rh(t,e,n,i,r,o){const s=[],a=Object.getOwnPropertyNames(t);for(const c of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if("function"!=typeof t[c])continue;const a=eu(t,c,function(t){return function(...s){const a=t.apply(this,s);if(Qu(a,o,this),"tagName"in this.canvas&&!au(this.canvas,i,r,!0)){const t=eh(s,o,this),i={type:e,property:c,args:t};n(this.canvas,i)}return a}});s.push(a)}catch{const i=tu(t,c,{set(t){n(this.canvas,{type:e,property:c,args:[t],setter:!0})}});s.push(i)}return s}const oh="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",sh="undefined"!=typeof window&&window.Blob&&new Blob([(ah=oh,Uint8Array.from(atob(ah),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var ah;function ch(t){let e;try{if(e=sh&&(window.URL||window.webkitURL).createObjectURL(sh),!e)throw"";const n=new Worker(e,{name:null==t?void 0:t.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),n}catch(e){return new Worker("data:text/javascript;base64,"+oh,{name:null==t?void 0:t.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class lh{constructor(t){ce(this,"pendingCanvasMutations",new Map),ce(this,"rafStamps",{latestId:0,invokeId:null}),ce(this,"mirror"),ce(this,"mutationCb"),ce(this,"resetObservers"),ce(this,"frozen",!1),ce(this,"locked",!1),ce(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:n,blockClass:i,blockSelector:r,recordCanvas:o,dataURLOptions:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&"all"===e&&this.initCanvasMutationObserver(n,i,r),o&&"number"==typeof e&&this.initCanvasFPSObserver(e,n,i,r,{dataURLOptions:s})}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,n,i,r){const o=ih(e,n,i,!0),s=new Map,a=new ch;a.onmessage=t=>{const{id:e}=t.data;if(s.set(e,!1),!("base64"in t.data))return;const{base64:n,type:i,width:r,height:o}=t.data;this.mutationCb({id:e,type:Su["2D"],commands:[{property:"clearRect",args:[0,0,r,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:i}]},0,0]}]})};const c=1e3/t;let l,u=0;const h=t=>{u&&t-u<c||(u=t,(()=>{const t=[];return e.document.querySelectorAll("canvas").forEach(e=>{au(e,n,i,!0)||t.push(e)}),t})().forEach(async t=>{var e;const n=this.mirror.getId(t);if(s.get(n))return;if(0===t.width||0===t.height)return;if(s.set(n,!0),["webgl","webgl2"].includes(t.l)){const n=t.getContext(t.l);!1===(null==(e=null==n?void 0:n.getContextAttributes())?void 0:e.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}const i=await createImageBitmap(t);a.postMessage({id:n,bitmap:i,width:t.width,height:t.height,dataURLOptions:r.dataURLOptions},[i])})),l=requestAnimationFrame(h)};l=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,e,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=ih(t,e,n,!1),r=function(t,e,n,i){const r=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const s of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[s])continue;const o=eu(e.CanvasRenderingContext2D.prototype,s,function(r){return function(...o){return au(this.canvas,n,i,!0)||setTimeout(()=>{const n=eh(o,e,this);t(this.canvas,{type:Su["2D"],property:s,args:n})},0),r.apply(this,o)}});r.push(o)}catch{const n=tu(e.CanvasRenderingContext2D.prototype,s,{set(e){t(this.canvas,{type:Su["2D"],property:s,args:[e],setter:!0})}});r.push(n)}return()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,n),o=function(t,e,n,i){const r=[];return r.push(...rh(e.WebGLRenderingContext.prototype,Su.WebGL,t,n,i,e)),void 0!==e.WebGL2RenderingContext&&r.push(...rh(e.WebGL2RenderingContext.prototype,Su.WebGL2,t,n,i,e)),()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,n);this.resetObservers=()=>{i(),r(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||-1===e)return;const i=n.map(t=>{const{type:e,...n}=t;return n}),{type:r}=n[0];this.mutationCb({id:e,type:r,commands:i}),this.pendingCanvasMutations.delete(t)}}class uh{constructor(t){ce(this,"trackedLinkElements",new WeakSet),ce(this,"mutationCb"),ce(this,"adoptedStyleSheetCb"),ce(this,"styleMirror",new pu),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"o"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 n={id:e,styleIds:[]},i=[];for(const e of t){let t;this.styleMirror.has(e)?t=this.styleMirror.getId(e):(t=this.styleMirror.add(e),i.push({styleId:t,rules:Array.from(e.rules||CSSRule,(t,n)=>({rule:Ae(t,e.href),index:n}))})),n.styleIds.push(t)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class hh{constructor(){ce(this,"nodeMap",new WeakMap),ce(this,"active",!1)}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).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 fh,dh,ph,mh=!1;try{if(2!==Array.from([1],t=>2*t)[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(oe=t.contentWindow)?void 0:oe.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const gh=new Re;function yh(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:r="rr-block",blockSelector:o=null,ignoreClass:s="rr-ignore",ignoreSelector:a=null,maskTextClass:c="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:d,maskInputFn:p,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:v={},mousemoveWait:b,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:k=!1,recordAfter:I=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:M=!1,collectFonts:A=!1,inlineImages:R=!1,plugins:x,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:T=new Set([]),errorHandler:_}=t;Ou=_;const O=!k||window.parent===window;let F=!1;if(!O)try{window.parent.document&&(F=!1)}catch(t){F=!0}if(O&&!e)throw new Error("emit function is required");if(!O&&!F)return()=>{};void 0!==b&&void 0===w.mousemove&&(w.mousemove=b),gh.reset();const N=!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}:void 0!==f?f:{password:!0},B=!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 L;!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 P=0;const D=t=>{for(const e of x||[])e.eventProcessor&&(t=e.eventProcessor(t));return y&&!F&&(t=y(t)),t};fh=(t,r)=>{var o;const s=t;if(s.timestamp=nu(),!(null==(o=Nu[0])?void 0:o.isFrozen())||s.type===yu.FullSnapshot||s.type===yu.IncrementalSnapshot&&s.data.source===wu.Mutation||Nu.forEach(t=>t.unfreeze()),O)null==e||e(D(s),r);else if(F){const t={type:"rrweb",event:D(s),origin:window.location.origin,isCheckout:r};window.parent.postMessage(t,"*")}if(s.type===yu.FullSnapshot)L=s,P=0;else if(s.type===yu.IncrementalSnapshot){if(s.data.source===wu.Mutation&&s.data.isAttachIframe)return;P++;const t=i&&P>=i,e=n&&s.timestamp-L.timestamp>n;(t||e)&&dh(!0)}};const j=t=>{fh({type:yu.IncrementalSnapshot,data:{source:wu.Mutation,...t}})},U=t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.Scroll,...t}}),G=t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.CanvasMutation,...t}}),W=new uh({mutationCb:j,adoptedStyleSheetCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.AdoptedStyleSheet,...t}})}),$=new zu({mirror:gh,mutationCb:j,stylesheetManager:W,recordCrossOriginIframes:k,wrappedEmit:fh});for(const t of x||[])t.getMirror&&t.getMirror({nodeMirror:gh,crossOriginIframeMirror:$.crossOriginIframeMirror,crossOriginIframeStyleMirror:$.crossOriginIframeStyleMirror});const V=new hh;ph=new lh({recordCanvas:C,mutationCb:G,win:window,blockClass:r,blockSelector:o,mirror:gh,sampling:w.canvas,dataURLOptions:v});const Z=new Hu({mutationCb:j,scrollCb:U,bypassOptions:{blockClass:r,blockSelector:o,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:N,dataURLOptions:v,maskTextFn:m,maskInputFn:p,recordCanvas:C,inlineImages:R,sampling:w,slimDOMOptions:B,iframeManager:$,stylesheetManager:W,canvasManager:ph,keepIframeSrcFn:E,processedNodeManager:V},mirror:gh});dh=(t=!1)=>{if(!S)return;fh({type:yu.Meta,data:{href:window.location.href,width:ou(),height:ru()}},t),W.reset(),Z.init(),Nu.forEach(t=>t.lock());const e=function(t,e){const{mirror:n=new Re,blockClass:i="rr-block",blockSelector:r=null,maskTextClass:o="rr-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:c=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:f,slimDOM:d=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:b,keepIframeSrcFn:S=()=>!1}=e||{};return tn(t,{doc:t,mirror:n,blockClass:i,blockSelector:r,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:!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}:!1===u?{password:!0}:u,maskTextFn:h,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:c,recordCanvas:l,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:gh,blockClass:r,blockSelector:o,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:N,maskTextFn:m,maskInputFn:p,slimDOM:B,dataURLOptions:v,recordCanvas:C,inlineImages:R,onSerialize:t=>{hu(t,gh)&&$.addIframe(t),fu(t,gh)&&W.trackLinkElement(t),du(t)&&Z.addShadowRoot(Xl(t),document)},onIframeLoad:(t,e)=>{$.attachIframe(t,e),Z.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{W.attachLinkElement(t,e)},keepIframeSrcFn:E});if(!e)return console.warn("Failed to snapshot the document");fh({type:yu.FullSnapshot,data:{node:e,initialOffset:iu(window)}},t),Nu.forEach(t=>t.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,gh.getId(document))};try{const t=[],e=t=>{var e;return Fu($u)({mutationCb:j,mousemoveCb:(t,e)=>fh({type:yu.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.MouseInteraction,...t}}),scrollCb:U,viewportResizeCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.ViewportResize,...t}}),inputCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.Input,...t}}),mediaInteractionCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.MediaInteraction,...t}}),styleSheetRuleCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.StyleSheetRule,...t}}),styleDeclarationCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.StyleDeclaration,...t}}),canvasMutationCb:G,fontCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.Font,...t}}),selectionCb:t=>{fh({type:yu.IncrementalSnapshot,data:{source:wu.Selection,...t}})},customElementCb:t=>{fh({type:yu.IncrementalSnapshot,data:{source:wu.CustomElement,...t}})},blockClass:r,ignoreClass:s,ignoreSelector:a,maskTextClass:c,maskTextSelector:l,maskInputOptions:N,inlineStylesheet:u,sampling:w,recordDOM:S,recordCanvas:C,inlineImages:R,userTriggeredOnInput:M,collectFonts:A,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:E,blockSelector:o,slimDOMOptions:B,dataURLOptions:v,mirror:gh,iframeManager:$,stylesheetManager:W,shadowDomManager:Z,processedNodeManager:V,canvasManager:ph,ignoreCSSAttributes:T,plugins:(null==(e=null==x?void 0:x.filter(t=>t.observer))?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>fh({type:yu.Plugin,data:{plugin:t.name,payload:e}})})))||[]},g)};$.addLoadListener(n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}});const n=()=>{dh(),t.push(e(document)),mh=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(Jl("DOMContentLoaded",()=>{fh({type:yu.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&n()})),t.push(Jl("load",()=>{fh({type:yu.Load,data:{}}),"load"===I&&n()},window))),()=>{t.forEach(t=>t()),V.destroy(),mh=!1,Ou=void 0}}catch(t){console.warn(t)}}var wh,vh;yh.addCustomEvent=(t,e)=>{if(!mh)throw new Error("please add custom event after start recording");fh({type:yu.Custom,data:{tag:t,payload:e}})},yh.freezePage=()=>{Nu.forEach(t=>t.freeze())},yh.takeFullSnapshot=t=>{if(!mh)throw new Error("please take full snapshot after start recording");dh(t)},yh.mirror=gh,(vh=wh||(wh={}))[vh.NotStarted=0]="NotStarted",vh[vh.Running=1]="Running",vh[vh.Stopped=2]="Stopped";var bh=Object.freeze({__proto__:null,SessionReplayEngine:class{constructor(t,e,n={}){this.events=[],this.isActive=!1,this.isPaused=!1,this.lastActivityTime=Date.now(),this.sessionStartTime=Date.now(),this.sessionId=t,this.visitorId=e,this.config={enabled:!0,sampleRate:1,batchInterval:1e4,inactivityTimeout:3e4,pauseOnInactive:!0,...n}}start(){if(!this.config.enabled||this.isActive)return!1;if(Math.random()>this.config.sampleRate)return!1;try{return this.rrwebStopRecord=yh({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.sendBatch())}startBatchTimer(){this.batchTimer=window.setInterval(()=>{this.sendBatch()},this.config.batchInterval)}sendBatch(){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 e=await this.sdkInstance.sendReplayBatch(t);e&&e.success||console.error("[Zaplier] Session replay batch failed:",e)}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&&(["mousedown","mousemove","keypress","scroll","touchstart","click"].forEach(t=>{document.addEventListener(t,this.onActivity.bind(this),!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}}}),Sh=Object.freeze({__proto__:null,detectIncognitoHeuristics:async function(){var t,e;const n=[];let i=0;const r=await async function(){try{const t="__incognito_test__",e=Date.now().toString();localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),n===e}catch{return!1}}();r||(i+=.25,n.push("localStorage_blocked"));const o=await async function(){try{const t="__incognito_test__",e=Date.now().toString();sessionStorage.setItem(t,e);const n=sessionStorage.getItem(t);return sessionStorage.removeItem(t),n===e}catch{return!1}}();o||(i+=.2,n.push("sessionStorage_blocked"));const s=await async function(){try{return!!window.indexedDB&&new Promise(t=>{const e=indexedDB.open("__incognito_test__",1);e.onsuccess=()=>{e.result.close(),indexedDB.deleteDatabase("__incognito_test__"),t(!0)},e.onerror=()=>t(!1),e.onblocked=()=>t(!1)})}catch{return!1}}();s||(i+=.15,n.push("indexedDB_blocked"));const a=function(){try{const t="__incognito_test__",e=Date.now().toString();document.cookie=`${t}=${e}; SameSite=Strict; path=/`;const n=-1!==document.cookie.indexOf(`${t}=${e}`);return document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`,n}catch{return!1}}();a||(i+=.2,n.push("cookies_blocked")),function(){try{return!(!Array.isArray(navigator.languages)||1!==navigator.languages.length||!navigator.language)&&navigator.languages[0]===navigator.language}catch{return!1}}()&&(i+=.25,n.push("languages_single_value"));try{if(r){const t="__incognito_persistence_test__",e="persist_test";localStorage.setItem(t,e);const r=localStorage.getItem(t)===e;localStorage.removeItem(t),r||(i+=.2,n.push("localStorage_not_persistent"))}}catch{}try{if(null===(t=navigator.storage)||void 0===t?void 0:t.estimate){const t=await navigator.storage.estimate(),e=(null==t?void 0:t.quota)||0,r=(null==t?void 0:t.usage)||0;0===e?(i+=.3,n.push("storage_quota_zero")):e>0&&e<125829120&&(i+=.25,n.push("storage_quota_low")),0===r&&e>0&&(i+=.1,n.push("storage_usage_zero"))}else n.push("storage_estimate_unavailable")}catch{n.push("storage_estimate_error")}"serviceWorker"in navigator||(i+=.1,n.push("service_worker_absent")),"caches"in window||(i+=.05,n.push("cache_api_absent"));try{if(null===(e=navigator.permissions)||void 0===e?void 0:e.query){const t=await navigator.permissions.query({name:"notifications"});"denied"===(null==t?void 0:t.state)&&(i+=.05,n.push("notifications_denied"))}}catch{n.push("permissions_query_error")}(function(){try{return!!window.showOpenFilePicker}catch{return!1}})()||n.push("fs_access_absent"),"connection"in navigator||n.push("network_info_absent"),i=Math.max(0,Math.min(1,i));const c=[r,o,s,a].filter(t=>!t).length;return c>=3?i=Math.max(i,.85):c>=2&&(i=Math.max(i,.7)),n.includes("languages_single_value")&&(c>=1||i>=.2)&&(i=Math.max(i,.5)),{likelihood:i,methods:n}}});function Ch(){try{if("deviceMemory"in navigator){const t=navigator.deviceMemory;return"number"==typeof t?t:null}return null}catch{return null}}function kh(){try{if("hardwareConcurrency"in navigator){const t=navigator.hardwareConcurrency;return"number"==typeof t?t:null}return null}catch{return null}}function Ih(){try{return[navigator.platform,navigator.userAgent,navigator.userAgent.includes("ARM")?"ARM":null,navigator.userAgent.includes("arm64")?"ARM64":null,navigator.userAgent.includes("aarch64")?"ARM64":null,navigator.userAgent.includes("x86_64")?"x86_64":null,navigator.userAgent.includes("WOW64")?"x86_64":null,navigator.userAgent.includes("Win64")?"x86_64":null,navigator.userAgent.includes("Intel")?"Intel":null].filter(Boolean).join("|")||"unknown"}catch{return"unknown"}}function Mh(){try{return navigator.maxTouchPoints||0}catch{return 0}}var Ah=Object.freeze({__proto__:null,getArchitecture:Ih,getDeviceMemory:Ch,getHardwareConcurrency:kh,getHardwareFingerprint:function(){return{deviceMemory:Ch(),hardwareConcurrency:kh(),architecture:Ih(),maxTouchPoints:Mh(),platform:navigator.platform||"unknown"}},getMaxTouchPoints:Mh,isHardwareDetectionAvailable:function(){return"undefined"!=typeof navigator}});function Rh(){try{if("undefined"!=typeof Intl&&Intl.DateTimeFormat){const t=Intl.DateTimeFormat().resolvedOptions().timeZone;if(t)return t}const t=new Date(2024,0,1).getTimezoneOffset();return`UTC${t>0?"-":"+"}${Math.abs(t/60)}`}catch{return"unknown"}}function xh(){try{const t=[];navigator.languages&&Array.isArray(navigator.languages)&&t.push(...navigator.languages),navigator.language&&t.push(navigator.language);const e=navigator.userLanguage||navigator.browserLanguage;return e&&t.push(e),[...new Set(t)]}catch{return["unknown"]}}function Eh(){try{if("undefined"!=typeof Intl&&Intl.DateTimeFormat){const t=(new Intl.DateTimeFormat).resolvedOptions();return{locale:t.locale||"unknown",calendar:t.calendar||"unknown",numberingSystem:t.numberingSystem||"unknown",timeZone:t.timeZone||"unknown"}}return{locale:"unknown"}}catch{return{locale:"unknown"}}}function Th(){try{const t={platform:navigator.platform||"unknown",oscpu:navigator.oscpu||null,vendor:navigator.vendor||null},e=navigator.userAgent;if(e.includes("Windows"))t.os="Windows",e.includes("Windows NT 10.0")?t.osVersion="10":e.includes("Windows NT 6.3")?t.osVersion="8.1":e.includes("Windows NT 6.2")?t.osVersion="8":e.includes("Windows NT 6.1")&&(t.osVersion="7");else if(e.includes("Macintosh")||e.includes("Mac OS")){t.os="macOS";const n=e.match(/Mac OS X ([0-9_]+)/);n&&n[1]&&(t.osVersion=n[1].replace(/_/g,"."))}else if(e.includes("Linux"))t.os="Linux";else if(e.includes("Android")){t.os="Android";const n=e.match(/Android ([0-9.]+)/);n&&n[1]&&(t.osVersion=n[1])}else if(e.includes("iOS")||e.includes("iPhone")||e.includes("iPad")){t.os="iOS";const n=e.match(/OS ([0-9_]+)/);n&&n[1]&&(t.osVersion=n[1].replace(/_/g,"."))}return t}catch{return{platform:"unknown"}}}var _h=Object.freeze({__proto__:null,getDateTimeLocale:Eh,getLanguages:xh,getPlatformExtended:Th,getSystemFingerprint:function(){return{timezone:Rh(),languages:xh(),dateTimeLocale:Eh(),platform:Th(),cookiesEnabled:navigator.cookieEnabled||!1}},getTimezone:Rh,isSystemDetectionAvailable:function(){return"undefined"!=typeof navigator}});function Oh(){try{if("undefined"==typeof localStorage)return!1;const t="__rb_test__",e="test";localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),n===e}catch(t){return"blocked"}}function Fh(){try{if("undefined"==typeof sessionStorage)return!1;const t="__rb_test__",e="test";sessionStorage.setItem(t,e);const n=sessionStorage.getItem(t);return sessionStorage.removeItem(t),n===e}catch(t){return"blocked"}}function Nh(){return new Promise(t=>{try{if(!("indexedDB"in window))return void t(!1);const e="__rb_test_db__",n=indexedDB.open(e,1);let i=!1;const r=e=>{i||(i=!0,t(e))};setTimeout(()=>r("blocked"),1e3),n.onerror=()=>r("blocked"),n.onsuccess=()=>{try{n.result.close();const t=indexedDB.deleteDatabase(e);t.onsuccess=()=>r(!0),t.onerror=()=>r(!0)}catch{r("blocked")}},n.onupgradeneeded=()=>{try{const t=n.result;t.objectStoreNames.contains("test")||t.createObjectStore("test")}catch{r("blocked")}}}catch{t("blocked")}})}function Bh(){try{return"openDatabase"in window&&"function"==typeof window.openDatabase}catch{return!1}}async function Lh(){try{if("storage"in navigator&&"estimate"in navigator.storage){const t=await navigator.storage.estimate();return{quota:t.quota||null,usage:t.usage||null,available:t.quota&&t.usage?t.quota-t.usage:null}}return{}}catch{return{}}}var Ph=Object.freeze({__proto__:null,getIndexedDBSupport:Nh,getLocalStorageSupport:Oh,getSessionStorageSupport:Fh,getStorageFingerprint:async function(){const[t,e]=await Promise.all([Nh(),Lh()]);return{localStorage:Oh(),sessionStorage:Fh(),indexedDB:t,webSQL:Bh(),quota:e}},getStorageQuota:Lh,getWebSQLSupport:Bh,isStorageDetectionAvailable:function(){return"undefined"!=typeof window}});function Dh(){const t=Math,e=()=>0,n=t.acos||e,i=t.acosh||e,r=t.asin||e,o=t.asinh||e,s=t.atanh||e,a=t.atan||e,c=t.sin||e,l=t.sinh||e,u=t.cos||e,h=t.cosh||e,f=t.tan||e,d=t.tanh||e,p=t.exp||e,m=t.expm1||e,g=t.log1p||e,y=e=>t.pow(t.PI,e),w=e=>t.log(e+t.sqrt(e*e+1)),v=e=>t.log((1+e)/(1-e))/2,b=e=>(t.exp(e)-1/t.exp(e))/2,S=e=>(t.exp(e)+1/t.exp(e))/2,C=e=>t.exp(e)-1,k=e=>(t.exp(2*e)-1)/(t.exp(2*e)+1),I=e=>t.log(1+e);try{return{acos:n(.12312423423423424),asin:r(.12312423423423424),atan:a(.5),cos:u(10.000000000123),sin:c(-1e300),tan:f(-1e300),acosh:i(1e308),acoshPf:(M=1e154,t.log(M+t.sqrt(M*M-1))),asinh:o(1),asinhPf:w(1),atanh:s(.5),atanhPf:v(.5),cosh:h(1),coshPf:S(1),sinh:l(1),sinhPf:b(1),tanh:d(1),tanhPf:k(1),exp:p(1),expm1:m(1),expm1Pf:C(1),log1p:g(10),log1pPf:I(10),powPI:y(-100),sqrt:t.sqrt(2),cbrt:t.cbrt?t.cbrt(8):0,log:t.log(t.E),log10:t.log10?t.log10(10):0,log2:t.log2?t.log2(2):0,special_0:t.sin(t.PI),special_1:t.cos(t.PI/2),special_2:t.tan(t.PI/4),special_3:t.sqrt(-1),special_4:t.log(-1),special_5:1/0,special_6:NaN}}catch(e){return{error:1,basicMath:t.PI+t.E}}var M}function jh(){try{return{PI:Math.PI,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2}}catch{return{}}}function Uh(){try{return{precision1:.1+.2,precision2:.3-.1,precision3:.1*3,precision4:1.1-.9,largeAdd:1e16,largeSub:1e16,tiny:Number.MIN_VALUE,epsilon:Number.EPSILON||2220446049250313e-31,maxValue:Number.MAX_VALUE,maxSafeInteger:Number.MAX_SAFE_INTEGER||9007199254740991,minSafeInteger:Number.MIN_SAFE_INTEGER||-9007199254740991}}catch{return{}}}var Gh=Object.freeze({__proto__:null,getCompleteMathFingerprint:function(){return{operations:Dh(),constants:jh(),floatingPoint:Uh()}},getFloatingPointBehavior:Uh,getMathConstants:jh,getMathFingerprint:Dh,isMathDetectionAvailable:function(){return"undefined"!=typeof Math}});function Wh(){const t=atob;return{adBlock:["#ad-banner",".advertisement",t("I2FkLWNvbnRhaW5lcg=="),t("LmFkdmVydGlzZW1lbnQ="),t("W2NsYXNzKj0iYWQtIl0=")],uBlockOrigin:["#ublock-stats",".adsbygoogle",t("I2dvb2dsZV9hZHM="),t("LmFkc2J5Z29vZ2xl"),t("LnVibG9jay1ibG9ja2Vk")],adGuardBase:[".BetterJsPopOverlay",t("I2FkXzMwMFgyNTA="),t("I2Jhbm5lcmZsb2F0"),t("I2NhbXBhaWduLWJhbm5lcg=="),t("I0FkLUNvbnRlbnQ=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],easyList:[".yb-floorad",t("LndpZGdldF9wb19hZHNfd2lkZ2V0"),t("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",t("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],privacyBadger:["#privacy-badger-popup",".privacy-badger-blocked",t("LnByaXZhY3ktYmFkZ2Vy")],ghostery:["#ghostery-popup",".ghostery-blocking",t("Lmdob3N0ZXJ5LWJsb2NrZWQ=")],brave:["#brave-ads-blocked",".brave-blocked",t("LmJyYXZlLWFkLWJsb2Nr")],facebookContainer:[".facebook-container-blocked",t("LmZiLWJsb2NrZWQ=")],cookieBlockers:[".cookie-notice-blocked","#cookie-banner-hidden",t("LmNvb2tpZS1ibG9ja2Vy")],trackingProtection:[".tracking-blocked","#tracking-protection-enabled",t("LnRyYWNrZXItYmxvY2tlZA==")]}}function $h(t){const e=document.createElement("div");if(t.startsWith("#"))e.id=t.substring(1);else if(t.startsWith("."))e.className=t.substring(1);else if(t.includes("["))try{const n=t.match(/\[([^=]+)([*^$|~]?=)"([^"]+)"\]/);if(n&&n[1]&&n[3]){const[,t,i,r]=n;"*="===i?e.setAttribute(t,`test-${r}-test`):e.setAttribute(t,r)}}catch{e.className="test-element"}else e.className=t.replace(/[^a-zA-Z0-9-_]/g,"");return e}function Vh(t){const e=t.style;e.setProperty("visibility","hidden","important"),e.setProperty("display","block","important"),e.setProperty("position","absolute","important"),e.setProperty("left","-9999px","important"),e.setProperty("width","1px","important"),e.setProperty("height","1px","important"),e.setProperty("pointer-events","none","important"),e.setProperty("z-index","-1","important")}function Zh(t){return new Promise(e=>setTimeout(e,t))}async function Yh(t){var e,n;const i=document,r=i.createElement("div"),o=new Array(t.length),s={};Vh(r);const a=i.createDocumentFragment();for(let r=0;r<t.length;r++){const s=t[r];if(s)try{const t=$h(s),c=i.createElement("div");"DIALOG"===t.tagName&&(null===(n=(e=t).show)||void 0===n||n.call(e)),Vh(c),c.appendChild(t),a.appendChild(c),o[r]=t}catch(t){o[r]=void 0}}r.appendChild(a);let c=0;for(;!i.body&&c<100;)await Zh(50),c++;if(!i.body)throw new Error("Document body not available for DOM blockers detection");i.body.appendChild(r);try{await Zh(50),await new Promise(e=>{requestAnimationFrame(()=>{for(let e=0;e<t.length;e++){const n=o[e],i=t[e];n&&i&&!n.offsetParent&&(s[i]=!0)}e()})})}finally{try{r.parentNode&&r.parentNode.removeChild(r)}catch(t){setTimeout(()=>{try{r.parentNode&&r.parentNode.removeChild(r)}catch{}},0)}}return s}async function zh(t={}){const{debug:e=!1,timeout:n=5e3}=t;try{if(!Hh())return"BROWSER_INCOMPATIBLE";if(!document||!document.body)return"DOM_NOT_AVAILABLE";const t=Wh(),i=Object.keys(t),r=[].concat(...i.map(e=>t[e]||[])),o=new Promise((t,e)=>{setTimeout(()=>e(new Error("DOM blockers detection timeout")),n)}),s=await Promise.race([Yh(r),o]);return e&&(r.length,Object.keys(s).length),i.filter(e=>{const n=t[e];return!(!n||0===n.length)&&n.map(t=>s[t]).filter(Boolean).length>.6*n.length}).sort()}catch(t){if(e&&console.error("[RabbitTracker] DOM Blockers detection failed:",t),t instanceof Error){if(t.message.includes("timeout"))return"TIMEOUT";if("SecurityError"===t.name||t.message.includes("SecurityError"))return"SECURITY_ERROR"}return"NOT_SUPPORTED"}}function Hh(){return B().canRunDOMBlockers}var Xh=Object.freeze({__proto__:null,getBlockedSelectors:Yh,getBlockerFilters:Wh,getDomBlockers:zh,getDomBlockersFingerprint:async function(t={}){const e=await zh(t),n=Array.isArray(e)?e:[];return{activeBlockers:n,blockerCount:n.length,hasAdBlocker:n.some(t=>["adBlock","uBlockOrigin","adGuardBase","easyList"].includes(t)),hasPrivacyExtension:n.some(t=>["privacyBadger","ghostery","brave"].includes(t)),hasTrackingProtection:n.includes("trackingProtection")}},isDomBlockersDetectionAvailable:Hh});function Jh(){var t;try{return I()&&null!==(t=navigator.pdfViewerEnabled)&&void 0!==t?t:null}catch{return null}}function Kh(){try{if(!R())return-1;const{ApplePaySession:t}=window;if("function"!=typeof(null==t?void 0:t.canMakePayments))return-1;if(!x())return-2;if(window.self!==window.top)return-3;try{return t.canMakePayments()?1:0}catch(t){if(t instanceof Error&&"InvalidAccessError"===t.name)return-2;throw t}}catch{return-1}}function qh(){try{return"attributionReporting"in window||"privateClickMeasurement"in window||null}catch{return null}}function Qh(){const t={enabled:!1,sameSiteSupport:!1,secureSupport:!1,partitionedSupport:!1};try{if(t.enabled=navigator.cookieEnabled,!t.enabled)return t;t.sameSiteSupport=tf("__rb_test_samesite","SameSite=Strict"),x()&&(t.secureSupport=tf("__rb_test_secure","Secure")),x()&&I()&&(t.partitionedSupport=tf("__rb_test_partitioned","Partitioned; Secure; SameSite=None"))}catch{}return t}function tf(t,e){try{const n="1",i=`${t}=${n}; ${e}; path=/`;document.cookie=i;const r=document.cookie.includes(`${t}=${n}`);return ef(t),r}catch{return ef(t),!1}}function ef(t){try{const e=[`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`,`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=${location.hostname}`,`${t}=; max-age=0; path=/`,`${t}=; max-age=0; path=/; domain=${location.hostname}`];for(const t of e)try{document.cookie=t}catch{}setTimeout(()=>{try{document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`}catch{}},100)}catch{}}function nf(){try{const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");return e?(e.getSupportedExtensions()||[]).sort():[]}catch{return[]}}function rf(){try{const t=performance.memory;return t?{usedJSHeapSize:t.usedJSHeapSize,totalJSHeapSize:t.totalJSHeapSize,jsHeapSizeLimit:t.jsHeapSizeLimit}:null}catch{return null}}function of(){try{const t=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return t?{effectiveType:t.effectiveType,downlink:t.downlink,rtt:t.rtt,saveData:t.saveData}:null}catch{return null}}function sf(){var t;const e={};try{e.webkitTemporaryStorage="webkitTemporaryStorage"in navigator,e.webkitPersistentStorage="webkitPersistentStorage"in navigator,window.safari&&(e.safariObjectTypes=Object.getOwnPropertyNames(window.safari)),e.chromeRuntime=!!(null===(t=window.chrome)||void 0===t?void 0:t.runtime),e.mozInnerScreenX="mozInnerScreenX"in window,e.msCredentials="msCredentials"in navigator}catch{}return e}var af=Object.freeze({__proto__:null,getApplePayState:Kh,getBrowserApisFingerprint:function(){const t=Jh(),e=Kh(),n=qh(),i=Qh(),r=nf(),o=rf(),s=of(),a=sf();let c="unknown";a.chromeRuntime?c="chrome":-1!==e?c="safari":a.mozInnerScreenX?c="firefox":a.msCredentials&&(c="edge");const l=Boolean(t||e>-1||n||o||s),u=[null!==t,-1!==e,null!==n,i.enabled,r.length>0,null!==o,null!==s,Object.keys(a).length>0];return{pdfViewerEnabled:t,applePayState:e,privateClickMeasurement:n,cookieCapabilities:i,webglExtensions:r,performanceMemory:o,connectionInfo:s,vendorProperties:a,browserVendor:c,hasNativeFeatures:l,apiScore:Math.round(u.filter(Boolean).length/u.length*100)}},getConnectionInfo:of,getCookieCapabilities:Qh,getPdfViewerEnabled:Jh,getPerformanceMemory:rf,getPrivateClickMeasurement:qh,getVendorProperties:sf,getWebGLExtensions:nf,isBrowserApisDetectionAvailable:function(){return"undefined"!=typeof window&&"undefined"!=typeof navigator}});function cf(){try{if(!vf())return"NOT_SUPPORTED";const t=function(){try{return navigator.plugins||null}catch(t){if("SecurityError"===t.name)return null;throw t}}();if(!t)return"NAVIGATOR_UNAVAILABLE";const e=[];if(0===t.length)return e;for(let n=0;n<t.length;n++){const i=t[n];if(!i)continue;const r=[];if(i.length>0)for(let t=0;t<i.length;t++){const e=i[t];e&&e.type&&r.push(e.type)}e.push({name:i.name||"",filename:i.filename||"",description:i.description||"",version:i.version||void 0,mimeTypes:r})}return e.sort((t,e)=>t.name.localeCompare(e.name))}catch(t){return"SecurityError"===t.name?"SECURITY_RESTRICTED":[]}}function lf(){try{if(!navigator.mimeTypes||0===navigator.mimeTypes.length)return[];const t=[];for(let e=0;e<navigator.mimeTypes.length;e++){const n=navigator.mimeTypes[e];n&&n.type&&t.push(n.type)}return t.sort()}catch{return[]}}function uf(){try{if(navigator.plugins&&Array.from(navigator.plugins).some(t=>t.name.toLowerCase().includes("flash")||t.description.toLowerCase().includes("flash")))return!0;if(navigator.mimeTypes&&Array.from(navigator.mimeTypes).some(t=>"application/x-shockwave-flash"===t.type))return!0;if(void 0!==window.ActiveXObject)try{return!!new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch{return!1}return!1}catch{return!1}}function hf(){try{if(navigator.plugins&&Array.from(navigator.plugins).some(t=>t.name.toLowerCase().includes("java")&&!t.name.toLowerCase().includes("javascript")))return!0;const t=["application/x-java-applet","application/x-java-bean","application/x-java-vm"];return!(!navigator.mimeTypes||!t.some(t=>Array.from(navigator.mimeTypes).some(e=>e.type===t)))||"function"==typeof navigator.javaEnabled&&navigator.javaEnabled()}catch{return!1}}function ff(){try{if(navigator.plugins&&Array.from(navigator.plugins).some(t=>t.name.toLowerCase().includes("silverlight")))return!0;if(navigator.mimeTypes&&Array.from(navigator.mimeTypes).some(t=>"application/x-silverlight"===t.type))return!0;if(void 0!==window.ActiveXObject)try{return!!new window.ActiveXObject("AgControl.AgControl")}catch{return!1}return!1}catch{return!1}}function df(){var t,e;try{if(!I())return"NOT_SUPPORTED";if(!navigator.plugins)return"NAVIGATOR_UNAVAILABLE";const n=navigator.plugins.length;return 0===n||!(null===(t=window.chrome)||void 0===t?void 0:t.runtime)&&!(null===(e=window.chrome)||void 0===e?void 0:e.webstore)&&void 0!==window.chrome||!Array.from(navigator.plugins).some(t=>t.name.toLowerCase().includes("pdf")||t.name.toLowerCase().includes("chrome"))&&n<3}catch(t){return"SecurityError"===t.name&&"SECURITY_RESTRICTED"}}function pf(){try{if(!M())return"NOT_SUPPORTED";const t={mozInnerScreenX:"mozInnerScreenX"in window,mozPaintCount:"mozPaintCount"in window,mozApps:!!navigator.mozApps,buildID:!!navigator.buildID,oscpu:!!navigator.oscpu},e=Object.values(t).filter(Boolean).length;return 0===e||(navigator.plugins?0===navigator.plugins.length&&e<2:"NAVIGATOR_UNAVAILABLE")}catch(t){return"SecurityError"===t.name&&"SECURITY_RESTRICTED"}}function mf(t){const e=["antivirus","security","firewall","malware","protection","kaspersky","norton","mcafee","avast","avira","bitdefender","eset","sophos","symantec","trend micro","f-secure"];return t.filter(t=>e.some(e=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))).map(t=>t.name)}function gf(t){const e=["adblock","adblocker","ad block","ublock","ghostery","privacy badger","disconnect","noscript","tracking protection"];return t.filter(t=>e.some(e=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))).map(t=>t.name)}function yf(t,e,n,i){let r=50;return r+=10*t.length,r+=5*e.length,n&&(r-=15),i&&(r-=10),Math.max(0,Math.min(100,r))}function wf(t,e){const n=t.map(t=>t.name).sort(),i=e.slice(0,10).sort();return[`plugins:${n.length}`,`mimes:${e.length}`,...n.slice(0,5),...i.slice(0,5)].join("|")}function vf(){return B().canRunBrowserAPIs&&"undefined"!=typeof navigator}var bf=Object.freeze({__proto__:null,calculateSecurityScore:yf,detectChromeExtensionsBlocked:df,detectFirefoxExtensionsBlocked:pf,generatePluginSignature:wf,getEnhancedPluginFingerprint:function(){const t=cf(),e=Array.isArray(t)?t:[],n=lf(),i=Array.isArray(n)?n:[],r=uf(),o=hf(),s=ff(),a=df(),c="boolean"==typeof a&&a,l=pf(),u="boolean"==typeof l&&l,h=mf(e),f=gf(e),d=wf(e,i),p=yf(h,f,r,o);return{plugins:e,pluginCount:e.length,mimeTypes:i,mimeTypeCount:i.length,flashEnabled:r,javaEnabled:o,silverLightEnabled:s,chromeExtensionsBlocked:c,firefoxExtensionsBlocked:u,securityPlugins:h,adBlockerPlugins:f,pluginSignature:d,securityScore:p}},getMimeTypes:lf,getNavigatorPlugins:cf,identifyAdBlockerPlugins:gf,identifySecurityPlugins:mf,isEnhancedPluginDetectionAvailable:vf,testFlashEnabled:uf,testJavaEnabled:hf,testSilverlightEnabled:ff});const Sf={canvas:{stability:.95,entropy:.9,uniqueness:.85,spoofResistance:.8},webgl:{stability:.92,entropy:.88,uniqueness:.82,spoofResistance:.85},audio:{stability:.9,entropy:.85,uniqueness:.8,spoofResistance:.9},hardware:{stability:.98,entropy:.7,uniqueness:.75,spoofResistance:.95},screen:{stability:.85,entropy:.6,uniqueness:.65,spoofResistance:.7},system:{stability:.8,entropy:.65,uniqueness:.7,spoofResistance:.6},browser:{stability:.75,entropy:.6,uniqueness:.65,spoofResistance:.5},fonts:{stability:.7,entropy:.75,uniqueness:.7,spoofResistance:.4},math:{stability:.95,entropy:.8,uniqueness:.9,spoofResistance:.95},storage:{stability:.6,entropy:.5,uniqueness:.6,spoofResistance:.3},incognito:{stability:.5,entropy:.4,uniqueness:.3,spoofResistance:.2},domBlockers:{stability:.8,entropy:.7,uniqueness:.6,spoofResistance:.9},accessibility:{stability:.9,entropy:.6,uniqueness:.7,spoofResistance:.85},browserApis:{stability:.85,entropy:.75,uniqueness:.8,spoofResistance:.7},pluginsEnhanced:{stability:.7,entropy:.65,uniqueness:.75,spoofResistance:.5},mathFingerprint:{stability:.99,entropy:.95,uniqueness:.9,spoofResistance:.98},fontPreferences:{stability:.92,entropy:.88,uniqueness:.85,spoofResistance:.75},dateTimeLocale:{stability:.95,entropy:.7,uniqueness:.75,spoofResistance:.8},accessibilityEnhanced:{stability:.93,entropy:.65,uniqueness:.8,spoofResistance:.9},enhancedFonts:{stability:.88,entropy:.85,uniqueness:.82,spoofResistance:.7}},Cf={domBlockers:{stability:.8,entropy:.7,uniqueness:.6,spoofResistance:.9},accessibility:{stability:.9,entropy:.6,uniqueness:.7,spoofResistance:.85},browserApis:{stability:.85,entropy:.75,uniqueness:.8,spoofResistance:.7}};function kf(t){const e=Sf[t]||Cf[t];if(!e)return.5;const n=.3*e.stability+.25*e.entropy+.25*e.uniqueness+.2*e.spoofResistance;return Math.max(.1,Math.min(1,n))}var If=Object.freeze({__proto__:null,ADVANCED_COMPONENT_CHARACTERISTICS:Cf,COMPONENT_CHARACTERISTICS:Sf,calculateComponentWeight:kf,calculateConfidence:function(t,e={}){const{requireMinimumComponents:n=4,penalizeMissingCore:i=!0,adjustForIncognito:r=!0}=e,o=t.filter(t=>t.success),s=[];o.length<n&&s.push(`Collect at least ${n} components for reliable identification`);let a=0,c=0,l=0,u=0,h=0;const f=["canvas","webgl","audio","hardware"].filter(t=>!o.some(e=>e.component===t));for(const t of o){const e=kf(t.component),n=Sf[t.component]||Cf[t.component];n&&(a+=e,c+=n.stability*e,l+=n.entropy*e,u+=n.uniqueness*e,h+=n.spoofResistance*e)}const d=a>0?c/a:0,p=a>0?l/a:0,m=a>0?h/a:0;let g,y,w=.35*d+.25*p+.25*(a>0?u/a:0)+.15*m,v=w;return i&&f.length>0&&(v-=.1*f.length,s.push(`Missing core components: ${f.join(", ")}`)),o.length<6&&(v-=.05*(6-o.length)),r&&o.some(t=>"incognito"===t.component)&&(v+=.02),o.filter(t=>["domBlockers","accessibility","browserApis","math"].includes(t.component)).length>=2&&(v+=.05),v=Math.max(0,Math.min(1,v)),v>=.995?(g=.995,y="Very High"):v>=.99?(g=.99,y="High"):v>=.95?(g=.95,y="Medium"):v>=.8?(g=.8,y="Low"):(g=.5,y="Very Low",s.push("Consider implementing additional fingerprinting techniques")),v<.95&&s.push("Enable all available fingerprinting components for better accuracy"),m<.6&&s.push("Include more spoof-resistant components like audio and WebGL"),p<.6&&s.push("Add high-entropy components like canvas and math fingerprinting"),{score:g,level:y,factors:{componentCount:o.length,weightedScore:Math.round(1e3*w)/1e3,stabilityScore:Math.round(1e3*d)/1e3,entropyScore:Math.round(1e3*p)/1e3,spoofResistanceScore:Math.round(1e3*m)/1e3},recommendations:s.slice(0,3)}}});function Mf(){var t,e,n,i;try{const r=screen,o=null!==(t=r.availTop)&&void 0!==t?t:0,s=null!==(e=r.availLeft)&&void 0!==e?e:0,a=null!==(n=r.availWidth)&&void 0!==n?n:r.width,c=null!==(i=r.availHeight)&&void 0!==i?i:r.height,l=o||null,u=r.width-a-s||null,h=r.height-c-o||null,f=s||null;if(null===l&&null===u&&null===h&&null===f)return null;const d=t=>null===t?null:10*Math.round(t/10);return{top:d(l),right:d(u),bottom:d(h),left:d(f)}}catch{return null}}function Af(){var t,e,n,i;try{const r=(null===(t=navigator.platform)||void 0===t?void 0:t.toLowerCase())||"",o=(null===(e=navigator.userAgent)||void 0===e?void 0:e.toLowerCase())||"";if(r.includes("win")&&(o.includes("wow64")||o.includes("x64")||o.includes("x86_64")))return 0;if(r.includes("linux")&&(r.includes("x86_64")||o.includes("x86_64")))return 0;if(r.includes("mac")&&(r.includes("intel")||o.includes("intel mac")))return 0;if(r.includes("x86")||r.includes("x64")||r.includes("intel")||r.includes("amd64")||o.includes("x86")||o.includes("amd64"))return 0;if(r.includes("arm")||o.includes("arm")||o.includes("aarch64")||r.includes("aarch64"))return 255;try{const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(e&&"getExtension"in e&&"getParameter"in e){const t=e.getExtension("WEBGL_debug_renderer_info");if(t){const r=(null===(n=e.getParameter(t.UNMASKED_VENDOR_WEBGL))||void 0===n?void 0:n.toLowerCase())||"",o=(null===(i=e.getParameter(t.UNMASKED_RENDERER_WEBGL))||void 0===i?void 0:i.toLowerCase())||"";if(r.includes("intel")||r.includes("nvidia")||r.includes("amd")||o.includes("intel")||o.includes("nvidia")||o.includes("amd")||o.includes("radeon")||o.includes("geforce")||o.includes("quadro")||o.includes("iris")||o.includes("uhd")||o.includes("hd graphics"))return 0;if(o.includes("mali")||o.includes("adreno")||o.includes("powervr")||o.includes("tegra")||o.includes("apple gpu")||r.includes("arm")||o.includes("videocore"))return 255}}}catch{}try{const t=new Float32Array(1),e=new Uint8Array(t.buffer);t[0]=1/0,t[0]=t[0]-t[0];const n=e[3];return r.includes("linux"),n}catch{return}}catch{return}}function Rf(){try{const t=navigator;let e=0;void 0!==t.maxTouchPoints?e=t.maxTouchPoints:void 0!==t.msMaxTouchPoints&&(e=t.msMaxTouchPoints);let n=!1;try{document.createEvent("TouchEvent"),n=!0}catch{n=!1}return{maxTouchPoints:e,touchEvent:n,touchStart:"ontouchstart"in window}}catch{return}}function xf(){const t=[],e=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];for(const n of e){const e=window[n];e&&"object"==typeof e&&t.push(n)}return t.sort()}function Ef(){try{const t=navigator.deviceMemory;if("number"==typeof t)return Math.round(t);if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:Math.round(e)}return}catch{return}}function Tf(){try{return screen.colorDepth||void 0}catch{return}}function _f(){try{for(const t of["rec2020","p3","srgb"])if(window.matchMedia(`(color-gamut: ${t})`).matches)return t;return}catch{return}}var Of=Object.freeze({__proto__:null,collectDeviceSignals:function(){return{screenFrame:Mf(),hardwareConcurrency:navigator.hardwareConcurrency||void 0,deviceMemory:Ef(),architecture:Af(),touchSupport:Rf(),vendorFlavors:xf(),cpuClass:navigator.cpuClass||void 0,colorDepth:Tf(),colorGamut:_f()}}});export{t as ZaplierCore,t as default,e as initZaplierCore};
6
+ class e{constructor(e){if(this.eventQueue=[],this.isInitialized=!1,this.modules=new Map,this.version="2.0.0",this.t=!1,!e.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 e.token||e.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");this.config={deferAdvanced:!0,loadTimeout:5e3,debug:!1,...e},this.t=this.isDevEnvironment(),this.initializeCore()}isDevEnvironment(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"[::1]"===e||e.endsWith(".local")||e.endsWith(".test")||!0===this.config.debug}initializeCore(){try{this.config.debug&&this.version,this.sessionId=this.generateTempSessionId(),this.visitorId=this.generateTempVisitorId(),this.isInitialized=!0,this.processEventQueue(),this.config.debug,this.config.deferAdvanced||this.scheduleAdvancedLoading()}catch(e){console.error("[Zaplier Core] Initialization failed:",e)}}trackPageView(e={}){this.config.debug;const t={eventType:"page_view",eventName:"page_view",sessionId:this.sessionId,visitorId:this.visitorId,url:window.location.href,referrer:document.referrer,timestamp:(new Date).toISOString(),...e};this.sendEvent(t)}track(e,t={}){this.config.debug;const i={eventType:"custom",eventName:e,sessionId:this.sessionId,visitorId:this.visitorId,timestamp:(new Date).toISOString(),...t};this.sendEvent(i)}async enableAdvancedFeatures(){this.config.debug;try{await this.loadFingerprinting(),this.config.replay&&await this.loadReplayModule(),this.config.debug}catch(e){console.error("[Zaplier Core] Failed to load advanced features:",e)}}async loadFingerprinting(){if(!this.modules.has("fingerprint"))try{const{getCompleteFingerprint:e}=await import("./chunks/fingerprint-FfUEEIAd.min.js").then(function(e){return e.f}),t=await e();t.success&&t.data&&(this.visitorId=t.data.hash||this.visitorId,this.modules.set("fingerprint",t.data),this.config.debug)}catch(e){console.error("[Zaplier Core] Fingerprinting failed:",e)}}async loadReplayModule(){if(!this.modules.has("replay"))try{const{SessionReplayEngine:e}=await import("./chunks/session-replay-C5Tp0d16.min.js"),t=new e(this.sessionId,this.visitorId,{sampleRate:this.config.replaySampling||.1});t.start()&&(this.modules.set("replay",t),this.config.debug)}catch(e){console.error("[Zaplier Core] Replay loading failed:",e)}}scheduleAdvancedLoading(){((e,t=100)=>{"undefined"!=typeof requestIdleCallback?requestIdleCallback(e,{timeout:this.config.loadTimeout}):setTimeout(e,t)})(()=>this.enableAdvancedFeatures())}async sendEvent(e){try{const t={...e,isDev:this.t},i=await fetch(`${this.config.apiEndpoint||"https://api.zaplier.com"}/events?token=${encodeURIComponent(this.config.token)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0});if(this.config.debug&&!i.ok&&console.warn(`[Zaplier Core] Event sending failed: ${i.status}`),i.ok){const e=await i.json().catch(()=>null);(null==e?void 0:e.visitorId)&&(this.backendVisitorId=e.visitorId)}}catch(t){this.eventQueue.push(e),this.config.debug&&console.warn("[Zaplier Core] Event queued for retry:",t)}}processEventQueue(){if(0===this.eventQueue.length)return;const e=[...this.eventQueue];this.eventQueue=[],e.forEach(e=>this.sendEvent(e))}generateTempSessionId(){const e=new Date,t=e.getFullYear()+(e.getMonth()+1).toString().padStart(2,"0")+e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0");return`temp_${Date.now()}_${t}_${i}`}generateTempVisitorId(){return`temp_visitor_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}getVisitorId(){var e,t;return null!==(t=null!==(e=this.backendVisitorId)&&void 0!==e?e:this.visitorId)&&void 0!==t?t:null}getUserData(){var e,t,i,n,s,o,r;const a="undefined"!=typeof navigator?{userAgent:navigator.userAgent,language:navigator.language,screen:{width:null!==(t=null===(e=window.screen)||void 0===e?void 0:e.width)&&void 0!==t?t:0,height:null!==(n=null===(i=window.screen)||void 0===i?void 0:i.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:a,journey:[],fingerprint:null===(r=this.modules.get("fingerprint"))||void 0===r?void 0:r.hash}}async getVisitorInfo(){var e;const t=this.backendVisitorId;if(!t)return this.config.debug&&console.warn("[Zaplier Core] 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;try{const i=null!==(e=this.config.apiEndpoint)&&void 0!==e?e:"https://api.zaplier.com",n=await fetch(`${i}/tracking/visitor/${t}?token=${encodeURIComponent(this.config.token)}`,{method:"GET",headers:{"Content-Type":"application/json"}});return n.ok?await n.json():null}catch{return null}}}function t(t){return new e(t)}if("undefined"!=typeof window){window.Zaplier={init:t,version:"2.0.0"};const e=()=>{const e=document.getElementsByTagName("script");for(const i of Array.from(e))if(i.src&&(i.src.includes("zaplier")||i.src.includes("core.min.js"))&&i.dataset.token){const e=t({token:i.dataset.token,debug:"true"===i.dataset.debug,replay:"true"===i.dataset.replay,deferAdvanced:"false"!==i.dataset.deferAdvanced});return window.Zaplier.instance=e,e.trackPageView(),void(e.config.deferAdvanced&&e.enableAdvancedFeatures())}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}export{e as ZaplierCore,e as default,t as initZaplierCore};