@spectosh/browser 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/specto-browser.cjs +1 -1
- package/dist/specto-browser.js +1 -1
- package/dist/{src-CWM5vchW.js → src-D-1ogCCr.js} +188 -179
- package/dist/{src-By9NWWVq.cjs → src-DyiwhKUe.cjs} +5 -5
- package/package.json +1 -1
- package/src/recorder.js +6 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,n=(e,n,r)=>t(e,typeof n==`symbol`?n:n+``,r),r=Object.defineProperty,i=(e,t,n)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,a=(e,t,n)=>i(e,typeof t==`symbol`?t:t+``,n),o=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(o||{}),s={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`,`ownerDocument`,`firstChild`,`lastChild`,`nextSibling`,`previousSibling`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},c={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},l={},u={},d=()=>!!globalThis.Zone;function f(e){if(l[e])return l[e];let t=globalThis[e],n=t.prototype,r=e in s?s[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in c?c[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o&&!d())return l[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);r.style.display=`none`,document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;if(!a)return r.remove(),n;let o=navigator.userAgent;return o.includes(`Safari`)&&!o.includes(`Chrome`)?(r.classList.add(`rr-block`),r.setAttribute(`__rrwebUntaintedMutationObserver`,``),u[e]=()=>r.remove()):r.remove(),l[e]=a}catch{return n}}var p={};function m(e,t,n){let r=p[e]?.[n];if(r)return r.call(t);let i=f(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?((p[e]||(p[e]={}))[n]=a,a.call(t)):t[n]}var h={};function g(e,t,n){let r=`${e}.${String(n)}`;if(h[r])return h[r].bind(t);let i=f(e)[n];return typeof i==`function`?(h[r]=i,i.bind(t)):t[n]}function _(e){return m(`Node`,e,`ownerDocument`)}function v(e){return m(`Node`,e,`childNodes`)}function y(e){return m(`Node`,e,`parentNode`)}function b(e){return m(`Node`,e,`parentElement`)}function x(e){return m(`Node`,e,`textContent`)}function S(e){return m(`Node`,e,`firstChild`)}function C(e){return m(`Node`,e,`lastChild`)}function w(e){return m(`Node`,e,`nextSibling`)}function T(e){return m(`Node`,e,`previousSibling`)}function E(e,t){return g(`Node`,e,`contains`)(t)}function D(e){return g(`Node`,e,`getRootNode`)()}function O(e){return!e||!(`host`in e)?null:m(`ShadowRoot`,e,`host`)}function ee(e){return e.styleSheets}function k(e){return!e||!(`shadowRoot`in e)?null:m(`Element`,e,`shadowRoot`)}function te(e,t){return m(`Element`,e,`querySelector`)(t)}function A(e,t){return m(`Element`,e,`querySelectorAll`)(t)}function j(){return[f(`MutationObserver`).constructor,u.MutationObserver??(()=>{})]}var ne=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ne=()=>new Date().getTime());function re(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var M={ownerDocument:_,childNodes:v,parentNode:y,parentElement:b,textContent:x,firstChild:S,lastChild:C,nextSibling:w,previousSibling:T,contains:E,getRootNode:D,host:O,styleSheets:ee,shadowRoot:k,querySelector:te,querySelectorAll:A,nowTimestamp:ne,mutationObserverCtor:j,patch:re};function ie(e){return e.nodeType===e.ELEMENT_NODE}function ae(e){let t=e&&`host`in e&&`mode`in e&&M.host(e)||null;return!!(t&&`shadowRoot`in t&&M.shadowRoot(t)===e)}function N(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function oe(e){return e.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}function se(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function P(e){try{let t=e.rules||e.cssRules;if(!t)return null;let n=e.href;return!n&&e.ownerNode&&(n=e.ownerNode.baseURI),oe(Array.from(t,e=>F(e,n)).join(``))}catch{return null}}function F(e,t){if(le(e)){let t;try{t=P(e.styleSheet)||se(e)}catch{t=e.cssText}return e.styleSheet.href?we(t,e.styleSheet.href):t}{let n=e.cssText;return ue(e)&&e.selectorText.includes(`:`)&&(n=ce(n)),t?we(n,t):n}}function ce(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function le(e){return`styleSheet`in e}function ue(e){return`selectorText`in e}var de=class{constructor(){a(this,`idNodeMap`,new Map),a(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function fe(){return new de}function pe({element:e,maskInputOptions:t,tagName:n,type:r,value:i,maskInputFn:a}){let o=i||``,s=r&&me(r);return(t[n.toLowerCase()]||s&&t[s])&&(o=a?a(o,e):`*`.repeat(o.length)),o}function me(e){return e.toLowerCase()}var he=`__rrweb_original__`;function ge(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=he in i?i[he]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function _e(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?me(t):null}function ve(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}function ye(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var be=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,xe=/^(?:[a-z+]+:)?\/\//i,Se=/^www\..*/i,Ce=/^(data:)([^,]*),(.*)/i;function we(e,t){return(e||``).replace(be,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(xe.test(s)||Se.test(s)||Ce.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${ye(t)+s}${c})`;let l=s.split(`#`)[0],u=s.substring(l.length),d=t.split(`#`)[0].split(`/`),f=l.split(`/`);d.pop();for(let e of f)if(e===`.`)continue;else e===`..`?d.pop():d.push(e);return`url(${c}${d.join(`/`)}${u}${c})`})}function Te(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``).replace(/0px/g,`0`)}function Ee(e,t,n=!1){let r=Array.from(t.childNodes),i=[],a=0;if(r.length>1&&e&&typeof e==`string`){let t=Te(e,n),o=t.length/e.length;for(let s=1;s<r.length;s++)if(r[s].textContent&&typeof r[s].textContent==`string`){let c=Te(r[s].textContent,n),l=3;for(;l<c.length&&(c[l].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,l),1)!==-1);l++);for(;l<c.length;l++){let u=c.substring(0,l),d=t.split(u),f=-1;if(d.length===2)f=d[0].length;else if(d.length>2&&d[0]===``&&r[s-1].textContent!==``)f=t.indexOf(u,1);else if(d.length===1){if(u=u.substring(0,u.length-1),d=t.split(u),d.length<=1)return i.push(e),i;l=101}else l===c.length-1&&(f=t.indexOf(u));if(d.length>=2&&l>100){let e=r[s-1].textContent;if(e&&typeof e==`string`){let n=Te(e).length;f=t.indexOf(u,n)}f===-1&&(f=d[0].length)}if(f!==-1){let s=Math.floor(f/o);for(;s>0&&s<e.length;){if(a+=1,a>50*r.length)return i.push(e),i;let c=Te(e.substring(0,s),n);if(c.length===f){i.push(e.substring(0,s)),e=e.substring(s),t=t.substring(f);break}c.length<f?s+=Math.max(1,Math.floor((f-c.length)/o)):s-=Math.max(1,Math.floor((c.length-f)*o))}break}}}}return i.push(e),i}function De(e,t){return Ee(e,t).join(`/* rr_split */`)}var Oe=1,ke=RegExp(`[^a-z0-9-_:]`),Ae=-2;function je(){return Oe++}function Me(e){if(e instanceof HTMLFormElement)return`form`;let t=me(e.tagName);return ke.test(t)?`div`:t}var Ne,Pe,Fe=/^[^ \t\n\r\u000c]+/,Ie=/^[, \t\n\r\u000c]+/;function Le(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(Ie),!(n>=t.length);){let a=r(Fe);if(a.slice(-1)===`,`)a=ze(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=ze(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}if(o)e===`)`&&(o=!1);else{if(e===`,`){n+=1,i.push((a+r).trim());break}e===`(`&&(o=!0)}r+=e,n+=1}}}return i.join(`, `)}var Re=new WeakMap;function ze(e,t){return!t||t.trim()===``?t:Ve(e,t)}function Be(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function Ve(e,t){let n=Re.get(e);if(n||(n=e.createElement(`a`),Re.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function He(e,t,n,r){return r&&(n===`src`||n===`href`&&(t!==`use`||r[0]!==`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&[`table`,`td`,`th`].includes(t)?ze(e,r):n===`srcset`?Le(e,r):n===`style`?we(r,Ve(e)):t===`object`&&n===`data`?ze(e,r):r)}function Ue(e,t,n){return[`video`,`audio`].includes(e)&&me(t)===`autoplay`}function We(e,t,n){try{if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Ge(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ge(M.parentNode(e),t,n):!1;for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return n?Ge(M.parentNode(e),t,n):!1}function Ke(e,t,n,r){let i;if(ie(e)){if(i=e,!M.childNodes(i).length)return!1}else if(M.parentElement(e)===null)return!1;else i=M.parentElement(e);try{if(typeof t==`string`){if(r){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ge(i,t,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch{}return!1}function qe(e,t,n){let r=e.contentWindow;if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=setTimeout(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return setTimeout(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function Je(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(a),r=!0,t()})}function Ye(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:s,inlineStylesheet:c,maskInputOptions:l={},maskTextFn:u,maskInputFn:d,dataURLOptions:f={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:h,newlyAddedElement:g=!1,cssCaptured:_=!1}=t,v=Xe(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:o.Document,childNodes:[]}:{type:o.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:o.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return Qe(e,{doc:n,blockClass:i,blockSelector:a,inlineStylesheet:c,maskInputOptions:l,maskInputFn:d,dataURLOptions:f,inlineImages:p,recordCanvas:m,keepIframeSrcFn:h,newlyAddedElement:g,rootId:v});case e.TEXT_NODE:return Ze(e,{doc:n,needsMask:s,maskTextFn:u,rootId:v,cssCaptured:_});case e.CDATA_SECTION_NODE:return{type:o.CDATA,textContent:``,rootId:v};case e.COMMENT_NODE:return{type:o.Comment,textContent:M.textContent(e)||``,rootId:v};default:return!1}}function Xe(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function Ze(e,t){let{needsMask:n,maskTextFn:r,rootId:i,cssCaptured:a}=t,s=M.parentNode(e),c=s&&s.tagName,l=``,u=c===`STYLE`||void 0,d=c===`SCRIPT`||void 0;return d?l=`SCRIPT_PLACEHOLDER`:a||(l=M.textContent(e),u&&l&&(l=we(l,Ve(t.doc)))),!u&&!d&&l&&n&&(l=r?r(l,M.parentElement(e)):l.replace(/[\S]/g,`*`)),{type:o.Text,textContent:l||``,rootId:i}}function Qe(e,t){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:c,dataURLOptions:l={},inlineImages:u,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:p=!1,rootId:m}=t,h=We(e,r,i),g=Me(e),_={},v=e.attributes.length;for(let t=0;t<v;t++){let r=e.attributes[t];Ue(g,r.name,r.value)||(_[r.name]=He(n,g,me(r.name),r.value))}if(g===`link`&&a){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=P(t)),r&&(delete _.rel,delete _.href,_._cssText=r)}if(g===`style`&&e.sheet){let t=P(e.sheet);t&&(e.childNodes.length>1&&(t=De(t,e)),_._cssText=t)}if([`input`,`textarea`,`select`].includes(g)){let t=e.value,n=e.checked;_.type!==`radio`&&_.type!==`checkbox`&&_.type!==`submit`&&_.type!==`button`&&t?_.value=pe({element:e,type:_e(e),tagName:g,value:t,maskInputOptions:s,maskInputFn:c}):n&&(_.checked=n)}if(g===`option`&&(e.selected&&!s.select?_.selected=!0:delete _.selected),g===`dialog`&&e.open&&(_.rr_open_mode=e.matches(`dialog:modal`)?`modal`:`non-modal`),g===`canvas`&&d){if(e.__context===`2d`)ge(e)||(_.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!(`__context`in e)){let t=e.toDataURL(l.type,l.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(l.type,l.quality)&&(_.rr_dataURL=t)}}if(g===`img`&&u){Ne||(Ne=n.createElement(`canvas`),Pe=Ne.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{Ne.width=t.naturalWidth,Ne.height=t.naturalHeight,Pe.drawImage(t,0,0),_.rr_dataURL=Ne.toDataURL(l.type,l.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?_.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if([`audio`,`video`].includes(g)){let t=_;t.rr_mediaState=e.paused?`paused`:`played`,t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(p||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),h){let{width:t,height:n}=e.getBoundingClientRect();_={class:_.class,rr_width:`${t}px`,rr_height:`${n}px`}}g===`iframe`&&!f(_.src)&&(e.contentDocument||(_.rr_src=_.src),delete _.src);let y;try{customElements.get(g)&&(y=!0)}catch{}return{type:o.Element,tagName:g,attributes:_,childNodes:[],isSVG:Be(e)||void 0,needBlock:h,rootId:m,isCustom:y}}function I(e){return e==null?``:e.toLowerCase()}function $e(e){return e===!0||e===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e===`all`,headMetaDescKeywords:e===`all`,headTitleMutations:e===`all`}:e||{}}function et(e,t){return!!(t.comment&&e.type===o.Comment||e.type===o.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`&&e.attributes.as===`script`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&ve(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(I(e.attributes.name).match(/^msapplication-tile(image|color)$/)||I(e.attributes.name)===`application-name`||I(e.attributes.rel)===`icon`||I(e.attributes.rel)===`apple-touch-icon`||I(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&I(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(I(e.attributes.property).match(/^(og|twitter|fb):/)||I(e.attributes.name).match(/^(og|twitter):/)||I(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(I(e.attributes.name)===`robots`||I(e.attributes.name)===`googlebot`||I(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(I(e.attributes.name)===`author`||I(e.attributes.name)===`generator`||I(e.attributes.name)===`framework`||I(e.attributes.name)===`publisher`||I(e.attributes.name)===`progid`||I(e.attributes.property).match(/^article:/)||I(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(I(e.attributes.name)===`google-site-verification`||I(e.attributes.name)===`yandex-verification`||I(e.attributes.name)===`csrf-token`||I(e.attributes.name)===`p:domain_verify`||I(e.attributes.name)===`verify-v1`||I(e.attributes.name)===`verification`||I(e.attributes.name)===`shopify-checkout-api-token`))))}function tt(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:c,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:d={},maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h={},inlineImages:g=!1,recordCanvas:_=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:w=!1,cssCaptured:T=!1}=t,{needsMask:E}=t,{preserveWhiteSpace:D=!0}=t;E||=Ke(e,s,c,E===void 0);let O=Ye(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:E,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,dataURLOptions:h,inlineImages:g,recordCanvas:_,keepIframeSrcFn:C,newlyAddedElement:w,cssCaptured:T});if(!O)return console.warn(e,`not serialized`),null;let ee;ee=r.hasNode(e)?r.getId(e):et(O,m)||!D&&O.type===o.Text&&!O.textContent.replace(/^\s+|\s+$/gm,``).length?Ae:je();let k=Object.assign(O,{id:ee});if(r.add(e,k),ee===Ae)return null;v&&v(e);let te=!l;if(k.type===o.Element){te&&=!k.needBlock,delete k.needBlock;let t=M.shadowRoot(e);t&&N(t)&&(k.isShadowHost=!0)}if((k.type===o.Document||k.type===o.Element)&&te){m.headWhitespace&&k.type===o.Element&&k.tagName===`head`&&(D=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:E,maskTextClass:s,maskTextSelector:c,skipChild:l,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h,inlineImages:g,recordCanvas:_,preserveWhiteSpace:D,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(k.type!==o.Element||k.tagName!==`textarea`||k.attributes.value===void 0){k.type===o.Element&&k.attributes._cssText!==void 0&&typeof k.attributes._cssText==`string`&&(t.cssCaptured=!0);for(let n of Array.from(M.childNodes(e))){let e=tt(n,t);e&&k.childNodes.push(e)}}let w=null;if(ie(e)&&(w=M.shadowRoot(e)))for(let e of Array.from(M.childNodes(w))){let n=tt(e,t);n&&(N(w)&&(n.isShadow=!0),k.childNodes.push(n))}}let A=M.parentNode(e);return A&&ae(A)&&N(A)&&(k.isShadow=!0),k.type===o.Element&&k.tagName===`iframe`&&qe(e,()=>{let t=e.contentDocument;if(t&&y){let n=tt(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,needsMask:E,maskTextClass:s,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h,inlineImages:g,recordCanvas:_,preserveWhiteSpace:D,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:S,keepIframeSrcFn:C});n&&y(e,n)}},b),k.type===o.Element&&k.tagName===`link`&&typeof k.attributes.rel==`string`&&(k.attributes.rel===`stylesheet`||k.attributes.rel===`preload`&&typeof k.attributes.href==`string`&&ve(k.attributes.href)===`css`)&&Je(e,()=>{if(x){let t=tt(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:E,maskTextClass:s,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h,inlineImages:g,recordCanvas:_,preserveWhiteSpace:D,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&x(e,t)}},S),k}function nt(e,t){let{mirror:n=new de,blockClass:r=`rr-block`,blockSelector:i=null,maskTextClass:a=`rr-mask`,maskTextSelector:o=null,inlineStylesheet:s=!0,inlineImages:c=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:f,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x=()=>!1}=t;return tt(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:s,maskInputOptions:u===!0?{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}:u===!1?{password:!0}:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:$e(p),dataURLOptions:m,inlineImages:c,recordCanvas:l,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x,newlyAddedElement:!1})}function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function it(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var at={exports:{}},ot;function st(){if(ot)return at.exports;ot=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return at.exports=t(),at.exports.createColors=t,at.exports}var L=it(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),ct,lt;function ut(){if(lt)return ct;lt=1;let e=st(),t=L;class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+`
|
|
1
|
+
var e=Object.defineProperty,t=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,n=(e,n,r)=>t(e,typeof n==`symbol`?n:n+``,r),r=Object.defineProperty,i=(e,t,n)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,a=(e,t,n)=>i(e,typeof t==`symbol`?t:t+``,n),o=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(o||{}),s={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`,`ownerDocument`,`firstChild`,`lastChild`,`nextSibling`,`previousSibling`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},c={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},l={},u={},d=()=>!!globalThis.Zone;function f(e){if(l[e])return l[e];let t=globalThis[e],n=t.prototype,r=e in s?s[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in c?c[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o&&!d())return l[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);r.style.display=`none`,document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;if(!a)return r.remove(),n;let o=navigator.userAgent;return o.includes(`Safari`)&&!o.includes(`Chrome`)?(r.classList.add(`rr-block`),r.setAttribute(`__rrwebUntaintedMutationObserver`,``),u[e]=()=>r.remove()):r.remove(),l[e]=a}catch{return n}}var p={};function m(e,t,n){let r=p[e]?.[n];if(r)return r.call(t);let i=f(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?((p[e]||(p[e]={}))[n]=a,a.call(t)):t[n]}var h={};function g(e,t,n){let r=`${e}.${String(n)}`;if(h[r])return h[r].bind(t);let i=f(e)[n];return typeof i==`function`?(h[r]=i,i.bind(t)):t[n]}function _(e){return m(`Node`,e,`ownerDocument`)}function v(e){return m(`Node`,e,`childNodes`)}function y(e){return m(`Node`,e,`parentNode`)}function b(e){return m(`Node`,e,`parentElement`)}function x(e){return m(`Node`,e,`textContent`)}function S(e){return m(`Node`,e,`firstChild`)}function C(e){return m(`Node`,e,`lastChild`)}function w(e){return m(`Node`,e,`nextSibling`)}function ee(e){return m(`Node`,e,`previousSibling`)}function T(e,t){return g(`Node`,e,`contains`)(t)}function E(e){return g(`Node`,e,`getRootNode`)()}function D(e){return!e||!(`host`in e)?null:m(`ShadowRoot`,e,`host`)}function O(e){return e.styleSheets}function k(e){return!e||!(`shadowRoot`in e)?null:m(`Element`,e,`shadowRoot`)}function te(e,t){return m(`Element`,e,`querySelector`)(t)}function ne(e,t){return m(`Element`,e,`querySelectorAll`)(t)}function A(){return[f(`MutationObserver`).constructor,u.MutationObserver??(()=>{})]}var re=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(re=()=>new Date().getTime());function ie(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var j={ownerDocument:_,childNodes:v,parentNode:y,parentElement:b,textContent:x,firstChild:S,lastChild:C,nextSibling:w,previousSibling:ee,contains:T,getRootNode:E,host:D,styleSheets:O,shadowRoot:k,querySelector:te,querySelectorAll:ne,nowTimestamp:re,mutationObserverCtor:A,patch:ie};function M(e){return e.nodeType===e.ELEMENT_NODE}function ae(e){let t=e&&`host`in e&&`mode`in e&&j.host(e)||null;return!!(t&&`shadowRoot`in t&&j.shadowRoot(t)===e)}function N(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function oe(e){return e.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}function se(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function P(e){try{let t=e.rules||e.cssRules;if(!t)return null;let n=e.href;return!n&&e.ownerNode&&(n=e.ownerNode.baseURI),oe(Array.from(t,e=>F(e,n)).join(``))}catch{return null}}function F(e,t){if(le(e)){let t;try{t=P(e.styleSheet)||se(e)}catch{t=e.cssText}return e.styleSheet.href?we(t,e.styleSheet.href):t}{let n=e.cssText;return ue(e)&&e.selectorText.includes(`:`)&&(n=ce(n)),t?we(n,t):n}}function ce(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function le(e){return`styleSheet`in e}function ue(e){return`selectorText`in e}var de=class{constructor(){a(this,`idNodeMap`,new Map),a(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function fe(){return new de}function pe({element:e,maskInputOptions:t,tagName:n,type:r,value:i,maskInputFn:a}){let o=i||``,s=r&&me(r);return(t[n.toLowerCase()]||s&&t[s])&&(o=a?a(o,e):`*`.repeat(o.length)),o}function me(e){return e.toLowerCase()}var he=`__rrweb_original__`;function ge(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=he in i?i[he]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function _e(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?me(t):null}function ve(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}function ye(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var be=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,xe=/^(?:[a-z+]+:)?\/\//i,Se=/^www\..*/i,Ce=/^(data:)([^,]*),(.*)/i;function we(e,t){return(e||``).replace(be,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(xe.test(s)||Se.test(s)||Ce.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${ye(t)+s}${c})`;let l=s.split(`#`)[0],u=s.substring(l.length),d=t.split(`#`)[0].split(`/`),f=l.split(`/`);d.pop();for(let e of f)if(e===`.`)continue;else e===`..`?d.pop():d.push(e);return`url(${c}${d.join(`/`)}${u}${c})`})}function Te(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``).replace(/0px/g,`0`)}function Ee(e,t,n=!1){let r=Array.from(t.childNodes),i=[],a=0;if(r.length>1&&e&&typeof e==`string`){let t=Te(e,n),o=t.length/e.length;for(let s=1;s<r.length;s++)if(r[s].textContent&&typeof r[s].textContent==`string`){let c=Te(r[s].textContent,n),l=3;for(;l<c.length&&(c[l].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,l),1)!==-1);l++);for(;l<c.length;l++){let u=c.substring(0,l),d=t.split(u),f=-1;if(d.length===2)f=d[0].length;else if(d.length>2&&d[0]===``&&r[s-1].textContent!==``)f=t.indexOf(u,1);else if(d.length===1){if(u=u.substring(0,u.length-1),d=t.split(u),d.length<=1)return i.push(e),i;l=101}else l===c.length-1&&(f=t.indexOf(u));if(d.length>=2&&l>100){let e=r[s-1].textContent;if(e&&typeof e==`string`){let n=Te(e).length;f=t.indexOf(u,n)}f===-1&&(f=d[0].length)}if(f!==-1){let s=Math.floor(f/o);for(;s>0&&s<e.length;){if(a+=1,a>50*r.length)return i.push(e),i;let c=Te(e.substring(0,s),n);if(c.length===f){i.push(e.substring(0,s)),e=e.substring(s),t=t.substring(f);break}c.length<f?s+=Math.max(1,Math.floor((f-c.length)/o)):s-=Math.max(1,Math.floor((c.length-f)*o))}break}}}}return i.push(e),i}function De(e,t){return Ee(e,t).join(`/* rr_split */`)}var Oe=1,ke=RegExp(`[^a-z0-9-_:]`),Ae=-2;function je(){return Oe++}function Me(e){if(e instanceof HTMLFormElement)return`form`;let t=me(e.tagName);return ke.test(t)?`div`:t}var Ne,Pe,Fe=/^[^ \t\n\r\u000c]+/,Ie=/^[, \t\n\r\u000c]+/;function Le(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(Ie),!(n>=t.length);){let a=r(Fe);if(a.slice(-1)===`,`)a=ze(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=ze(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}if(o)e===`)`&&(o=!1);else{if(e===`,`){n+=1,i.push((a+r).trim());break}e===`(`&&(o=!0)}r+=e,n+=1}}}return i.join(`, `)}var Re=new WeakMap;function ze(e,t){return!t||t.trim()===``?t:Ve(e,t)}function Be(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function Ve(e,t){let n=Re.get(e);if(n||(n=e.createElement(`a`),Re.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function He(e,t,n,r){return r&&(n===`src`||n===`href`&&(t!==`use`||r[0]!==`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&[`table`,`td`,`th`].includes(t)?ze(e,r):n===`srcset`?Le(e,r):n===`style`?we(r,Ve(e)):t===`object`&&n===`data`?ze(e,r):r)}function Ue(e,t,n){return[`video`,`audio`].includes(e)&&me(t)===`autoplay`}function We(e,t,n){try{if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Ge(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ge(j.parentNode(e),t,n):!1;for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return n?Ge(j.parentNode(e),t,n):!1}function Ke(e,t,n,r){let i;if(M(e)){if(i=e,!j.childNodes(i).length)return!1}else if(j.parentElement(e)===null)return!1;else i=j.parentElement(e);try{if(typeof t==`string`){if(r){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ge(i,t,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch{}return!1}function qe(e,t,n){let r=e.contentWindow;if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=setTimeout(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return setTimeout(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function Je(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(a),r=!0,t()})}function Ye(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:s,inlineStylesheet:c,maskInputOptions:l={},maskTextFn:u,maskInputFn:d,dataURLOptions:f={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:h,newlyAddedElement:g=!1,cssCaptured:_=!1}=t,v=Xe(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:o.Document,childNodes:[]}:{type:o.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:o.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return Qe(e,{doc:n,blockClass:i,blockSelector:a,inlineStylesheet:c,maskInputOptions:l,maskInputFn:d,dataURLOptions:f,inlineImages:p,recordCanvas:m,keepIframeSrcFn:h,newlyAddedElement:g,rootId:v});case e.TEXT_NODE:return Ze(e,{doc:n,needsMask:s,maskTextFn:u,rootId:v,cssCaptured:_});case e.CDATA_SECTION_NODE:return{type:o.CDATA,textContent:``,rootId:v};case e.COMMENT_NODE:return{type:o.Comment,textContent:j.textContent(e)||``,rootId:v};default:return!1}}function Xe(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function Ze(e,t){let{needsMask:n,maskTextFn:r,rootId:i,cssCaptured:a}=t,s=j.parentNode(e),c=s&&s.tagName,l=``,u=c===`STYLE`||void 0,d=c===`SCRIPT`||void 0;return d?l=`SCRIPT_PLACEHOLDER`:a||(l=j.textContent(e),u&&l&&(l=we(l,Ve(t.doc)))),!u&&!d&&l&&n&&(l=r?r(l,j.parentElement(e)):l.replace(/[\S]/g,`*`)),{type:o.Text,textContent:l||``,rootId:i}}function Qe(e,t){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:c,dataURLOptions:l={},inlineImages:u,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:p=!1,rootId:m}=t,h=We(e,r,i),g=Me(e),_={},v=e.attributes.length;for(let t=0;t<v;t++){let r=e.attributes[t];Ue(g,r.name,r.value)||(_[r.name]=He(n,g,me(r.name),r.value))}if(g===`link`&&a){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=P(t)),r&&(delete _.rel,delete _.href,_._cssText=r)}if(g===`style`&&e.sheet){let t=P(e.sheet);t&&(e.childNodes.length>1&&(t=De(t,e)),_._cssText=t)}if([`input`,`textarea`,`select`].includes(g)){let t=e.value,n=e.checked;_.type!==`radio`&&_.type!==`checkbox`&&_.type!==`submit`&&_.type!==`button`&&t?_.value=pe({element:e,type:_e(e),tagName:g,value:t,maskInputOptions:s,maskInputFn:c}):n&&(_.checked=n)}if(g===`option`&&(e.selected&&!s.select?_.selected=!0:delete _.selected),g===`dialog`&&e.open&&(_.rr_open_mode=e.matches(`dialog:modal`)?`modal`:`non-modal`),g===`canvas`&&d){if(e.__context===`2d`)ge(e)||(_.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!(`__context`in e)){let t=e.toDataURL(l.type,l.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(l.type,l.quality)&&(_.rr_dataURL=t)}}if(g===`img`&&u){Ne||(Ne=n.createElement(`canvas`),Pe=Ne.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{Ne.width=t.naturalWidth,Ne.height=t.naturalHeight,Pe.drawImage(t,0,0),_.rr_dataURL=Ne.toDataURL(l.type,l.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?_.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if([`audio`,`video`].includes(g)){let t=_;t.rr_mediaState=e.paused?`paused`:`played`,t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(p||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),h){let{width:t,height:n}=e.getBoundingClientRect();_={class:_.class,rr_width:`${t}px`,rr_height:`${n}px`}}g===`iframe`&&!f(_.src)&&(e.contentDocument||(_.rr_src=_.src),delete _.src);let y;try{customElements.get(g)&&(y=!0)}catch{}return{type:o.Element,tagName:g,attributes:_,childNodes:[],isSVG:Be(e)||void 0,needBlock:h,rootId:m,isCustom:y}}function I(e){return e==null?``:e.toLowerCase()}function $e(e){return e===!0||e===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e===`all`,headMetaDescKeywords:e===`all`,headTitleMutations:e===`all`}:e||{}}function et(e,t){return!!(t.comment&&e.type===o.Comment||e.type===o.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`&&e.attributes.as===`script`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&ve(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(I(e.attributes.name).match(/^msapplication-tile(image|color)$/)||I(e.attributes.name)===`application-name`||I(e.attributes.rel)===`icon`||I(e.attributes.rel)===`apple-touch-icon`||I(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&I(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(I(e.attributes.property).match(/^(og|twitter|fb):/)||I(e.attributes.name).match(/^(og|twitter):/)||I(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(I(e.attributes.name)===`robots`||I(e.attributes.name)===`googlebot`||I(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(I(e.attributes.name)===`author`||I(e.attributes.name)===`generator`||I(e.attributes.name)===`framework`||I(e.attributes.name)===`publisher`||I(e.attributes.name)===`progid`||I(e.attributes.property).match(/^article:/)||I(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(I(e.attributes.name)===`google-site-verification`||I(e.attributes.name)===`yandex-verification`||I(e.attributes.name)===`csrf-token`||I(e.attributes.name)===`p:domain_verify`||I(e.attributes.name)===`verify-v1`||I(e.attributes.name)===`verification`||I(e.attributes.name)===`shopify-checkout-api-token`))))}function tt(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:c,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:d={},maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h={},inlineImages:g=!1,recordCanvas:_=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:w=!1,cssCaptured:ee=!1}=t,{needsMask:T}=t,{preserveWhiteSpace:E=!0}=t;T||=Ke(e,s,c,T===void 0);let D=Ye(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:T,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,dataURLOptions:h,inlineImages:g,recordCanvas:_,keepIframeSrcFn:C,newlyAddedElement:w,cssCaptured:ee});if(!D)return console.warn(e,`not serialized`),null;let O;O=r.hasNode(e)?r.getId(e):et(D,m)||!E&&D.type===o.Text&&!D.textContent.replace(/^\s+|\s+$/gm,``).length?Ae:je();let k=Object.assign(D,{id:O});if(r.add(e,k),O===Ae)return null;v&&v(e);let te=!l;if(k.type===o.Element){te&&=!k.needBlock,delete k.needBlock;let t=j.shadowRoot(e);t&&N(t)&&(k.isShadowHost=!0)}if((k.type===o.Document||k.type===o.Element)&&te){m.headWhitespace&&k.type===o.Element&&k.tagName===`head`&&(E=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:s,maskTextSelector:c,skipChild:l,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h,inlineImages:g,recordCanvas:_,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(k.type!==o.Element||k.tagName!==`textarea`||k.attributes.value===void 0){k.type===o.Element&&k.attributes._cssText!==void 0&&typeof k.attributes._cssText==`string`&&(t.cssCaptured=!0);for(let n of Array.from(j.childNodes(e))){let e=tt(n,t);e&&k.childNodes.push(e)}}let w=null;if(M(e)&&(w=j.shadowRoot(e)))for(let e of Array.from(j.childNodes(w))){let n=tt(e,t);n&&(N(w)&&(n.isShadow=!0),k.childNodes.push(n))}}let ne=j.parentNode(e);return ne&&ae(ne)&&N(ne)&&(k.isShadow=!0),k.type===o.Element&&k.tagName===`iframe`&&qe(e,()=>{let t=e.contentDocument;if(t&&y){let n=tt(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:s,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h,inlineImages:g,recordCanvas:_,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:S,keepIframeSrcFn:C});n&&y(e,n)}},b),k.type===o.Element&&k.tagName===`link`&&typeof k.attributes.rel==`string`&&(k.attributes.rel===`stylesheet`||k.attributes.rel===`preload`&&typeof k.attributes.href==`string`&&ve(k.attributes.href)===`css`)&&Je(e,()=>{if(x){let t=tt(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:s,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h,inlineImages:g,recordCanvas:_,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&x(e,t)}},S),k}function nt(e,t){let{mirror:n=new de,blockClass:r=`rr-block`,blockSelector:i=null,maskTextClass:a=`rr-mask`,maskTextSelector:o=null,inlineStylesheet:s=!0,inlineImages:c=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:f,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x=()=>!1}=t;return tt(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:s,maskInputOptions:u===!0?{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}:u===!1?{password:!0}:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:$e(p),dataURLOptions:m,inlineImages:c,recordCanvas:l,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x,newlyAddedElement:!1})}function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function it(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var at={exports:{}},ot;function st(){if(ot)return at.exports;ot=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return at.exports=t(),at.exports.createColors=t,at.exports}var L=it(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),ct,lt;function ut(){if(lt)return ct;lt=1;let e=st(),t=L;class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+`
|
|
2
2
|
`+t+c(`^`)}return` `+l(r)+e}).join(`
|
|
3
3
|
`)}toString(){let e=this.showSourceCode();return e&&=`
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ var e=Object.defineProperty,t=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:
|
|
|
20
20
|
`;this.css.includes(`\r
|
|
21
21
|
`)&&(t=`\r
|
|
22
22
|
`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&(a.sourcesContent=null)):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(`
|
|
23
|
-
`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(e=>e.annotation):this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(e=>e.inline)}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(e=>e.withContent()):this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return Ft=u,Ft}var Rt,zt;function Bt(){if(zt)return Rt;zt=1;let e=St();class t extends e{constructor(e){super(e),this.type=`comment`}}return Rt=t,t.default=t,Rt}var Vt,Ht;function Ut(){if(Ht)return Vt;Ht=1;let{isClean:e,my:t}=pt(),n=Tt(),r=Bt(),i=St(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{(!t.props||t.props.includes(r.prop))&&(!t.fast||r.value.includes(t.fast))&&(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,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]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},Vt=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},Vt}var Wt,Gt;function Kt(){if(Gt)return Wt;Gt=1;let e=Ut(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Wt=r,r.default=r,Wt}var qt,Jt;function Yt(){if(Jt)return qt;Jt=1;let e={};return qt=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},qt}var Xt,Zt;function Qt(){if(Zt)return Xt;Zt=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return Xt=e,e.default=e,Xt}var $t,en;function tn(){if(en)return $t;en=1;let e=Qt();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return $t=t,t.default=t,$t}var nn,rn;function an(){if(rn)return nn;rn=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return nn=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function T(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1){if(s||a){l=y;break}C(`bracket`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1){if(s||a){l=y+1;break}C(`string`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l)}return y++,_}function E(e){x.push(e)}return{back:E,endOfFile:w,nextToken:T,position:S}},nn}var on,sn;function cn(){if(sn)return on;sn=1;let e=Ut();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return on=t,t.default=t,e.registerAtRule(t),on}var ln,un;function dn(){if(un)return ln;un=1;let e=Ut(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},ln=r,r.default=r,e.registerRoot(r),ln}var fn,pn;function mn(){if(pn)return fn;pn=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,`
|
|
23
|
+
`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(e=>e.annotation):this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(e=>e.inline)}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(e=>e.withContent()):this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return Ft=u,Ft}var Rt,zt;function Bt(){if(zt)return Rt;zt=1;let e=St();class t extends e{constructor(e){super(e),this.type=`comment`}}return Rt=t,t.default=t,Rt}var Vt,Ht;function Ut(){if(Ht)return Vt;Ht=1;let{isClean:e,my:t}=pt(),n=Tt(),r=Bt(),i=St(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{(!t.props||t.props.includes(r.prop))&&(!t.fast||r.value.includes(t.fast))&&(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,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]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},Vt=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},Vt}var Wt,Gt;function Kt(){if(Gt)return Wt;Gt=1;let e=Ut(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Wt=r,r.default=r,Wt}var qt,Jt;function Yt(){if(Jt)return qt;Jt=1;let e={};return qt=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},qt}var Xt,Zt;function Qt(){if(Zt)return Xt;Zt=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return Xt=e,e.default=e,Xt}var $t,en;function tn(){if(en)return $t;en=1;let e=Qt();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return $t=t,t.default=t,$t}var nn,rn;function an(){if(rn)return nn;rn=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return nn=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function ee(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1){if(s||a){l=y;break}C(`bracket`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1){if(s||a){l=y+1;break}C(`string`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l)}return y++,_}function T(e){x.push(e)}return{back:T,endOfFile:w,nextToken:ee,position:S}},nn}var on,sn;function cn(){if(sn)return on;sn=1;let e=Ut();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return on=t,t.default=t,e.registerAtRule(t),on}var ln,un;function dn(){if(un)return ln;un=1;let e=Ut(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},ln=r,r.default=r,e.registerRoot(r),ln}var fn,pn;function mn(){if(pn)return fn;pn=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,`
|
|
24
24
|
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return fn=e,e.default=e,fn}var hn,gn;function _n(){if(gn)return hn;gn=1;let e=Ut(),t=mn();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return hn=n,n.default=n,e.registerRule(n),hn}var vn,yn;function bn(){if(yn)return vn;yn=1;let e=Tt(),t=an(),n=Bt(),r=cn(),i=dn(),a=_n(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0){if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if(n===`{`){s=!0;break}if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}c.push(e)}else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`){if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a}i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;){if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1]}(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],c===`space`||c===`comment`);)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0){if(n===`;`){if(r){this.decl(s,o);return}break}if(n===`{`){this.rule(s);return}if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}n===`:`&&(r=!0)}else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],c===`space`||c===`comment`);)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`||t===`comment`);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],t===`space`||t===`comment`);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return vn=c,vn}var xn,Sn;function Cn(){if(Sn)return xn;Sn=1;let e=Ut(),t=bn(),n=Pt();function r(e,r){let i=new n(e,r),a=new t(i);try{a.parse()}catch(e){throw process.env.NODE_ENV!==`production`&&e.name===`CssSyntaxError`&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+=`
|
|
25
25
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(r.from)?e.message+=`
|
|
26
26
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(r.from)&&(e.message+=`
|
|
@@ -48,7 +48,7 @@ https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.p
|
|
|
48
48
|
`;this.css.includes(`\r
|
|
49
49
|
`)&&(t=`\r
|
|
50
50
|
`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&(a.sourcesContent=null)):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(`
|
|
51
|
-
`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(e=>e.annotation):this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(e=>e.inline)}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(e=>e.withContent()):this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return yr=u,yr}var Sr,Cr;function wr(){if(Cr)return Sr;Cr=1;let e=or();class t extends e{constructor(e){super(e),this.type=`comment`}}return Sr=t,t.default=t,Sr}var Tr,Er;function Dr(){if(Er)return Tr;Er=1;let{isClean:e,my:t}=Zn(),n=lr(),r=wr(),i=or(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{(!t.props||t.props.includes(r.prop))&&(!t.fast||r.value.includes(t.fast))&&(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,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]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},Tr=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},Tr}var Or,kr;function Ar(){if(kr)return Or;kr=1;let e=Dr(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Or=r,r.default=r,Or}var jr,Mr;function Nr(){if(Mr)return jr;Mr=1;let e={};return jr=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},jr}var Pr,Fr;function Ir(){if(Fr)return Pr;Fr=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return Pr=e,e.default=e,Pr}var Lr,Rr;function zr(){if(Rr)return Lr;Rr=1;let e=Ir();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return Lr=t,t.default=t,Lr}var Br,Vr;function Hr(){if(Vr)return Br;Vr=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return Br=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function T(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1){if(s||a){l=y;break}C(`bracket`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1){if(s||a){l=y+1;break}C(`string`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l)}return y++,_}function E(e){x.push(e)}return{back:E,endOfFile:w,nextToken:T,position:S}},Br}var Ur,Wr;function Gr(){if(Wr)return Ur;Wr=1;let e=Dr();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Ur=t,t.default=t,e.registerAtRule(t),Ur}var Kr,qr;function Jr(){if(qr)return Kr;qr=1;let e=Dr(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Kr=r,r.default=r,e.registerRoot(r),Kr}var Yr,Xr;function Zr(){if(Xr)return Yr;Xr=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,`
|
|
51
|
+
`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(e=>e.annotation):this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(e=>e.inline)}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(e=>e.withContent()):this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return yr=u,yr}var Sr,Cr;function wr(){if(Cr)return Sr;Cr=1;let e=or();class t extends e{constructor(e){super(e),this.type=`comment`}}return Sr=t,t.default=t,Sr}var Tr,Er;function Dr(){if(Er)return Tr;Er=1;let{isClean:e,my:t}=Zn(),n=lr(),r=wr(),i=or(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{(!t.props||t.props.includes(r.prop))&&(!t.fast||r.value.includes(t.fast))&&(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,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]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},Tr=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},Tr}var Or,kr;function Ar(){if(kr)return Or;kr=1;let e=Dr(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Or=r,r.default=r,Or}var jr,Mr;function Nr(){if(Mr)return jr;Mr=1;let e={};return jr=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},jr}var Pr,Fr;function Ir(){if(Fr)return Pr;Fr=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return Pr=e,e.default=e,Pr}var Lr,Rr;function zr(){if(Rr)return Lr;Rr=1;let e=Ir();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return Lr=t,t.default=t,Lr}var Br,Vr;function Hr(){if(Vr)return Br;Vr=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return Br=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function ee(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1){if(s||a){l=y;break}C(`bracket`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1){if(s||a){l=y+1;break}C(`string`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l)}return y++,_}function T(e){x.push(e)}return{back:T,endOfFile:w,nextToken:ee,position:S}},Br}var Ur,Wr;function Gr(){if(Wr)return Ur;Wr=1;let e=Dr();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Ur=t,t.default=t,e.registerAtRule(t),Ur}var Kr,qr;function Jr(){if(qr)return Kr;qr=1;let e=Dr(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Kr=r,r.default=r,e.registerRoot(r),Kr}var Yr,Xr;function Zr(){if(Xr)return Yr;Xr=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,`
|
|
52
52
|
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return Yr=e,e.default=e,Yr}var Qr,$r;function ei(){if($r)return Qr;$r=1;let e=Dr(),t=Zr();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return Qr=n,n.default=n,e.registerRule(n),Qr}var ti,ni;function ri(){if(ni)return ti;ni=1;let e=lr(),t=Hr(),n=wr(),r=Gr(),i=Jr(),a=ei(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0){if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if(n===`{`){s=!0;break}if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}c.push(e)}else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`){if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a}i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;){if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1]}(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],c===`space`||c===`comment`);)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0){if(n===`;`){if(r){this.decl(s,o);return}break}if(n===`{`){this.rule(s);return}if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}n===`:`&&(r=!0)}else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],c===`space`||c===`comment`);)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`||t===`comment`);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],t===`space`||t===`comment`);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return ti=c,ti}var ii,ai;function oi(){if(ai)return ii;ai=1;let e=Dr(),t=ri(),n=vr();function r(e,r){let i=new n(e,r),a=new t(i);try{a.parse()}catch(e){throw process.env.NODE_ENV!==`production`&&e.name===`CssSyntaxError`&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+=`
|
|
53
53
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(r.from)?e.message+=`
|
|
54
54
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(r.from)&&(e.message+=`
|
|
@@ -131,8 +131,8 @@ or you can use record.mirror to access the mirror instance during recording.`,Qi
|
|
|
131
131
|
};
|
|
132
132
|
})();
|
|
133
133
|
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
134
|
-
`,bo=typeof self<`u`&&self.Blob&&new Blob([yo],{type:`text/javascript;charset=utf-8`});function xo(e){let t;try{if(t=bo&&(self.URL||self.webkitURL).createObjectURL(bo),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(yo),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var So=class{constructor(e){n(this,`pendingCanvasMutations`,new Map),n(this,`rafStamps`,{latestId:0,invokeId:null}),n(this,`mirror`),n(this,`mutationCb`),n(this,`resetObservers`),n(this,`frozen`,!1),n(this,`locked`,!1),n(this,`processMutation`,(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});let{sampling:t=`all`,win:r,blockClass:i,blockSelector:a,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t===`all`&&this.initCanvasMutationObserver(r,i,a),o&&typeof t==`number`&&this.initCanvasFPSObserver(t,r,i,a,{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(e,t,n,r,i){let a=go(t,n,r,!0),o=new Map,s=new xo;s.onmessage=e=>{let{id:t}=e.data;if(o.set(t,!1),!(`base64`in e.data))return;let{base64:n,type:r,width:i,height:a}=e.data;this.mutationCb({id:t,type:ya[`2D`],commands:[{property:`clearRect`,args:[0,0,i,a]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:n}],type:r}]},0,0]}]})};let c=1e3/e,l=0,u,d=()=>{let e=[];return t.document.querySelectorAll(`canvas`).forEach(t=>{G(t,n,r,!0)||e.push(t)}),e},f=e=>{if(l&&e-l<c){u=requestAnimationFrame(f);return}l=e,d().forEach(async e=>{let t=this.mirror.getId(e);if(o.get(t)||e.width===0||e.height===0)return;if(o.set(t,!0),[`webgl`,`webgl2`].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}let n=await createImageBitmap(e);s.postMessage({id:t,bitmap:n,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[n])}),u=requestAnimationFrame(f)};u=requestAnimationFrame(f),this.resetObservers=()=>{a(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let r=go(e,t,n,!1),i=mo(this.processMutation.bind(this),e,t,n),a=vo(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),i(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}},Co=class{constructor(e){n(this,`trackedLinkElements`,new WeakSet),n(this,`mutationCb`),n(this,`adoptedStyleSheetCb`),n(this,`styleMirror`,new pa),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,n)=>({rule:F(e,t.href),index:n}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},wo=class{constructor(){n(this,`nodeMap`,new WeakMap),n(this,`active`,!1)}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},X,To,Eo,Do=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var Z=fe();function Oo(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,ignoreClass:o=`rr-ignore`,ignoreSelector:s=null,maskTextClass:c=`rr-mask`,maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:f,slimDOMOptions:p,maskInputFn:m,maskTextFn:h,hooks:g,packFn:_,sampling:v={},dataURLOptions:y={},mousemoveWait:b,recordDOM:x=!0,recordCanvas:S=!1,recordCrossOriginIframes:C=!1,recordAfter:w=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:T=!1,collectFonts:E=!1,inlineImages:D=!1,plugins:O,keepIframeSrcFn:ee=()=>!1,ignoreCSSAttributes:k=new Set([]),errorHandler:te}=e;ka(te);let A=!C||window.parent===window,j=!1;if(!A)try{window.parent.document&&(j=!1)}catch{j=!0}if(A&&!t)throw Error(`emit function is required`);if(!A&&!j)return()=>{};b!==void 0&&v.mousemove===void 0&&(v.mousemove=b),Z.reset();let ne=d===!0?{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}:f===void 0?{password:!0}:f,re=$e(p);la();let M,ie=0,ae=e=>{for(let t of O||[])t.eventProcessor&&(e=t.eventProcessor(e));return _&&!j&&(e=_(e)),e};X=(e,i)=>{let a=e;if(a.timestamp=Yi(),ja[0]?.isFrozen()&&a.type!==K.FullSnapshot&&(a.type!==K.IncrementalSnapshot||a.data.source!==q.Mutation)&&ja.forEach(e=>e.unfreeze()),A)t?.(ae(a),i);else if(j){let e={type:`rrweb`,event:ae(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===K.FullSnapshot)M=a,ie=0;else if(a.type===K.IncrementalSnapshot){if(a.data.source===q.Mutation&&a.data.isAttachIframe)return;ie++;let e=r&&ie>=r,t=n&&a.timestamp-M.timestamp>n;(e||t)&&To(!0)}};let N=e=>{X({type:K.IncrementalSnapshot,data:{source:q.Mutation,...e}})},oe=e=>X({type:K.IncrementalSnapshot,data:{source:q.Scroll,...e}}),se=e=>X({type:K.IncrementalSnapshot,data:{source:q.CanvasMutation,...e}}),P=new Co({mutationCb:N,adoptedStyleSheetCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.AdoptedStyleSheet,...e}})}),F=new to({mirror:Z,mutationCb:N,stylesheetManager:P,recordCrossOriginIframes:C,wrappedEmit:X});for(let e of O||[])e.getMirror&&e.getMirror({nodeMirror:Z,crossOriginIframeMirror:F.crossOriginIframeMirror,crossOriginIframeStyleMirror:F.crossOriginIframeStyleMirror});let ce=new wo;Eo=new So({recordCanvas:S,mutationCb:se,win:window,blockClass:i,blockSelector:a,mirror:Z,sampling:v.canvas,dataURLOptions:y});let le=new no({mutationCb:N,scrollCb:oe,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:ne,dataURLOptions:y,maskTextFn:h,maskInputFn:m,recordCanvas:S,inlineImages:D,sampling:v,slimDOMOptions:re,iframeManager:F,stylesheetManager:P,canvasManager:Eo,keepIframeSrcFn:ee,processedNodeManager:ce},mirror:Z});To=(e=!1)=>{if(!x)return;X({type:K.Meta,data:{href:window.location.href,width:ra(),height:na()}},e),P.reset(),le.init(),ja.forEach(e=>e.lock());let t=nt(document,{mirror:Z,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:ne,maskTextFn:h,maskInputFn:m,slimDOM:re,dataURLOptions:y,recordCanvas:S,inlineImages:D,onSerialize:e=>{ua(e,Z)&&F.addIframe(e),da(e,Z)&&P.trackLinkElement(e),fa(e)&&le.addShadowRoot(U.shadowRoot(e),document)},onIframeLoad:(e,t)=>{F.attachIframe(e,t),le.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{P.attachLinkElement(e,t)},keepIframeSrcFn:ee});if(!t)return console.warn(`Failed to snapshot the document`);X({type:K.FullSnapshot,data:{node:t,initialOffset:ta(window)}},e),ja.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&P.adoptStyleSheets(document.adoptedStyleSheets,Z.getId(document))};try{let e=[],t=e=>Y(Za)({mutationCb:N,mousemoveCb:(e,t)=>X({type:K.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.MouseInteraction,...e}}),scrollCb:oe,viewportResizeCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.ViewportResize,...e}}),inputCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.Input,...e}}),mediaInteractionCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.MediaInteraction,...e}}),styleSheetRuleCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.StyleSheetRule,...e}}),styleDeclarationCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.StyleDeclaration,...e}}),canvasMutationCb:se,fontCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.Font,...e}}),selectionCb:e=>{X({type:K.IncrementalSnapshot,data:{source:q.Selection,...e}})},customElementCb:e=>{X({type:K.IncrementalSnapshot,data:{source:q.CustomElement,...e}})},blockClass:i,ignoreClass:o,ignoreSelector:s,maskTextClass:c,maskTextSelector:l,maskInputOptions:ne,inlineStylesheet:u,sampling:v,recordDOM:x,recordCanvas:S,inlineImages:D,userTriggeredOnInput:T,collectFonts:E,doc:e,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:ee,blockSelector:a,slimDOMOptions:re,dataURLOptions:y,mirror:Z,iframeManager:F,stylesheetManager:P,shadowDomManager:le,processedNodeManager:ce,canvasManager:Eo,ignoreCSSAttributes:k,plugins:(O?.filter(e=>e.observer))?.map(e=>({observer:e.observer,options:e.options,callback:t=>X({type:K.Plugin,data:{plugin:e.name,payload:t}})}))||[]},g);F.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{To(),e.push(t(document)),Do=!0};return[`interactive`,`complete`].includes(document.readyState)?n():(e.push(W(`DOMContentLoaded`,()=>{X({type:K.DomContentLoaded,data:{}}),w===`DOMContentLoaded`&&n()})),e.push(W(`load`,()=>{X({type:K.Load,data:{}}),w===`load`&&n()},window))),()=>{e.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes(`cross-origin`)||console.warn(e)}}),ce.destroy(),Do=!1,Aa()}}catch(e){console.warn(e)}}Oo.addCustomEvent=(e,t)=>{if(!Do)throw Error(`please add custom event after start recording`);X({type:K.Custom,data:{tag:e,payload:t}})},Oo.freezePage=()=>{ja.forEach(e=>e.freeze())},Oo.takeFullSnapshot=e=>{if(!Do)throw Error(`please take full snapshot after start recording`);To(e)},Oo.mirror=Z;var ko;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(ko||={});var{addCustomEvent:Ao}=Oo,{freezePage:jo}=Oo,{takeFullSnapshot:Mo}=Oo,No=40,Po=7,Fo=6e4;async function Io(e){if(typeof CompressionStream>`u`)return null;try{return await new Response(new Blob([e]).stream().pipeThrough(new CompressionStream(`gzip`))).blob()}catch{return null}}function Lo({endpoint:e,onEvent:t=()=>{}}){let n=[],r=!1,i=null,a=!1,o=(e,r)=>{if(e.tries++,e.tries>=Po)return n.shift(),t({t:`drop`,b:e.b,reason:`retries`}),s();let a=r>0?r*1e3:Math.min(3e4,1e3*2**(e.tries-1))*(.75+Math.random()/2);i=setTimeout(()=>{i=null,s()},a)};async function s(){if(r||i||a||!n.length)return;r=!0;let c=n[0];try{let i=await Io(c.json),s=i||c.json,l=i?i.size:c.json.length,u=await fetch(e,{method:`POST`,body:s,credentials:`omit`,mode:`cors`,headers:{"Content-Type":`text/plain;charset=UTF-8`},keepalive:l<Fo});if(u.ok)n.shift(),t({t:`ack`,b:c.b});else{let e=``;try{e=(await u.json())?.code||``}catch{}if(e===`session_limit`||e===`session_key`)n.length=0,t({t:`rotate`,code:e});else if(e===`quota_exceeded`||e===`recording_disabled`||u.status===401||u.status===403)n.length=0,a=!0,t({t:`stop`,code:e||String(u.status)});else if(u.status===429||u.status>=500)return r=!1,o(c,Number(u.headers.get(`Retry-After`))||0);else n.shift(),t({t:`drop`,b:c.b,reason:String(u.status)})}}catch{return r=!1,o(c,0)}r=!1,s()}return{push(e){a||(n.push({...e,tries:0}),n.length>No&&t({t:`drop`,b:n.shift().b,reason:`overflow`}),s())},nudge(){i&&=(clearTimeout(i),null),s()},stop(){a=!0,n.length=0,i&&clearTimeout(i)},pending:()=>n.length}}var Ro=`https://specto.sh`,zo=/^(localhost|127(?:\.\d{1,3}){3}|\[::1\]|0\.0\.0\.0|[^/:]+\.localhost)(?::\d+)?(?:\/|$)/i;function Bo(e){let t=String(e??``).trim(),n=t.indexOf(`@`);return n<=0?{key:t,host:null}:{key:t.slice(0,n),host:t.slice(n+1).trim()||null}}function Vo(e){let t=String(e??``).trim().replace(/\/+$/,``);if(!t)throw Error(`Specto: host is empty`);/^[a-z][a-z0-9+.-]*:\/\//i.test(t)||(t=(zo.test(t)?`http://`:`https://`)+t);let n;try{n=new URL(t)}catch{throw Error(`Specto: "${e}" is not a host — use e.g. eu.specto.sh or https://replay.example.com`)}if(n.protocol!==`https:`&&n.protocol!==`http:`)throw Error(`Specto: host must be http(s) — got "${e}"`);return(n.origin+n.pathname).replace(/\/+$/,``)}function Ho(e={},{fallback:t=null,guessed:n=!1}={}){let{key:r,host:i}=Bo(e.key),a=t=>e.configUrl===!1?null:e.configUrl||String(t).replace(/\/api\/ingest$/,`/api/sdk/config`);if(e.endpoint){let t=String(e.endpoint);return{key:r,endpoint:t,configUrl:a(t),host:null,guessed:!1}}let o=e.host||i;if(!o&&!t)return{key:r,endpoint:`/api/ingest`,configUrl:a(`/api/ingest`),host:null,guessed:!1};let s=Vo(o||t),c=`${s}/api/ingest`;return{key:r,endpoint:c,configUrl:a(c),host:s,guessed:!o&&!!n}}var Uo=`0.2.4`,Wo=e=>(e=e.toLowerCase(),e.startsWith(`data-`)||e===`title`||e===`alt`||e===`placeholder`||e===`aria-label`||e===`value`);function Go(e){if(e&&typeof e==`object`)for(let t of Object.keys(e))Wo(t)&&typeof e[t]==`string`&&e[t]&&(e[t]=`***`)}function Ko(e){e&&typeof e==`object`&&(e.attributes&&Go(e.attributes),Array.isArray(e.childNodes)&&e.childNodes.forEach(Ko))}function qo(e,t){try{e.type===4&&typeof e.data?.href==`string`?e.data.href=$(e.data.href,t):e.type===2&&e.data?.node?Ko(e.data.node):e.type===3&&e.data&&(Array.isArray(e.data.adds)&&e.data.adds.forEach(e=>Ko(e.node)),Array.isArray(e.data.attributes)&&e.data.attributes.forEach(e=>Go(e.attributes)))}catch{}return e}var Jo=[[/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi,`[email]`],[/\beyJ[\w-]{6,}\.[\w-]{6,}\.[\w-]{6,}\b/g,`[jwt]`],[/\b(Bearer|Basic)\s+[\w.~+/=-]{8,}/gi,`$1 [token]`],[/\b(?:\d[ -]?){13,19}\b/g,`[number]`],[/\b(sk|pk|rk)_(live|test)_[\w]{8,}\b/g,`[key]`]];function Q(e){let t=String(e??``);for(let[e,n]of Jo)t=t.replace(e,n);return t}function Yo(e){return typeof e==`string`?e:e&&typeof e.href==`string`?e.href:e&&typeof e.url==`string`?e.url:e==null?``:String(e)}var Xo=600,Zo=/(?:^|[-_.])(token|secret|password|passwd|auth|authorization|key|apikey|api[-_]?key|session|sid|code|signature|credential|email)s?$/i,Qo=e=>e.split(/[?&=]/)[0];function $(e,t=!1){let n=String(e??``);try{let e=new URL(n,location.href),r=!1;(e.username||e.password)&&(e.username=``,e.password=``,r=!0),t&&(e.search||Qo(e.hash)!==e.hash)&&(e.search=``,e.hash=Qo(e.hash),r=!0);for(let t of[...e.searchParams.keys()])Zo.test(t)&&(e.searchParams.set(t,`***`),r=!0);if(e.hash){let t=e.hash.replace(/([?&#]|^)([^=&?#]+)=([^&#]*)/g,(e,t,n)=>Zo.test(n)?`${t}${n}=***`:e);t!==e.hash&&(e.hash=t,r=!0)}let i=Q(decodeURIComponent(e.pathname));return i!==decodeURIComponent(e.pathname)&&(e.pathname=i,r=!0),r?(/^[a-z][a-z0-9+.-]*:/i.test(n)?e.href:e.pathname+e.search+e.hash).slice(0,Xo):n.slice(0,Xo)}catch{return Q(t?n.split(`?`)[0]:n).slice(0,Xo)}}var $o=e=>{try{return new URL(e,location.href).href}catch{return String(e??``)}},es=[`content-type`,`content-length`,`content-encoding`,`cache-control`,`etag`,`vary`,`age`,`server-timing`,`x-request-id`];function ts(e){let t={};for(let n of es)try{let r=e(n);r&&(t[n]=String(r).slice(0,200))}catch{}return Object.keys(t).length?t:void 0}function ns(e,t){try{if(!e)return;if(typeof e.get==`function`)return e.get(t)||void 0;if(Array.isArray(e)){let n=e.find(e=>String(e?.[0]).toLowerCase()===t);return n?String(n[1]):void 0}for(let n of Object.keys(e))if(n.toLowerCase()===t)return String(e[n])}catch{}}function rs(e){try{return e==null?void 0:typeof e==`string`?e.length:typeof Blob<`u`&&e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof URLSearchParams<`u`&&e instanceof URLSearchParams?String(e).length:void 0}catch{return}}function is(e,t,n,r=()=>!0){typeof performance<`u`&&performance.getEntriesByName&&setTimeout(()=>{try{if(!r())return;let i=null;for(let e of performance.getEntriesByName(t,`resource`)){let t=Math.abs(e.startTime-n);t<1500&&(!i||t<Math.abs(i.startTime-n))&&(i=e)}if(!i)return;let a=e.detail||={};if(i.transferSize&&(a.xfer=Math.round(i.transferSize)),i.decodedBodySize&&a.resSize==null&&(a.resSize=Math.round(i.decodedBodySize)),i.responseStart>0){let e=i.secureConnectionStart>0?i.secureConnectionStart:i.connectEnd,t={dns:i.domainLookupEnd-i.domainLookupStart,tcp:e-i.connectStart,tls:i.secureConnectionStart>0?i.connectEnd-i.secureConnectionStart:0,ttfb:i.responseStart-i.requestStart,dl:i.responseEnd-i.responseStart};a.timing={};for(let e of Object.keys(t))t[e]>0&&(a.timing[e]=Math.round(t[e]*10)/10);Object.keys(a.timing).length||delete a.timing}}catch{}},300)}function as(e=`rec_`){return e+(typeof crypto<`u`&&crypto.getRandomValues?Array.from(crypto.getRandomValues(new Uint8Array(12))).map(e=>e.toString(16).padStart(2,`0`)).join(``):Math.abs(Date.now()^performance.now()*1e3|0).toString(16)+Math.random().toString(16).slice(2,10))}function os(){if(typeof crypto>`u`||!crypto.getRandomValues)return null;let e=crypto.getRandomValues(new Uint8Array(16));return btoa(String.fromCharCode(...e)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var ss={get(e,t){try{return JSON.parse(window[e].getItem(t))}catch{return null}},set(e,t,n){try{window[e].setItem(t,JSON.stringify(n))}catch{}},del(e,t){try{window[e].removeItem(t)}catch{}}},cs=`specto-optout`,ls=`specto-consent`,us=()=>ss.get(`localStorage`,cs)===!0,ds=()=>ss.get(`localStorage`,ls)===`granted`;function fs(){let e=ss.get(`localStorage`,`specto-vid`);return typeof e!=`string`&&(e=as(`v_`),ss.set(`localStorage`,`specto-vid`,e)),e}var ps=18e5,ms=144e5,hs=4e3;async function gs(e,t){if(!e)return null;try{let n=typeof AbortController<`u`?new AbortController:null,r=n&&setTimeout(()=>n.abort(),3e3),i=await fetch(`${e}?key=${encodeURIComponent(t)}`,{credentials:`omit`,signal:n?.signal});if(r&&clearTimeout(r),i.ok)return await i.json();let a=null;try{a=await i.json()}catch{}return i.status===404&&a?.error===`unknown key`?{unknownKey:!0}:{failed:!0}}catch{return{failed:!0}}}function _s(e={}){if(typeof window>`u`)return{disabled:!0,reason:`no window`,stop(){}};if(window.__spectoRec&&!window.__spectoRec.disabled)return window.__spectoRec;let t=Ho(e,{fallback:e._fallback||null,guessed:!!e._guessed});if(!t.key)throw Error(`Specto: a publishable key is required — copy it from your project's Install page`);let{key:n,endpoint:r,configUrl:i}=t,a={disabled:!0,reason:`starting`,sessionId:null,stop(){},flushNow(){},count:()=>0,identify(){},track(){},sessionUrl:()=>null};if(navigator.doNotTrack===`1`||navigator.globalPrivacyControl)return Object.assign(a,{reason:`dnt`});if(us())return Object.assign(a,{reason:`opted-out`});if(e.consent===`required`&&!ds())return Object.assign(a,{reason:`consent-required`});let o=bs(e,t);window.__spectoRec=o;let s=e=>gs(i,n).then(n=>{if(n?.failed&&t.guessed&&e<3)return setTimeout(()=>s(e+1),e*2e3);o._begin(n)});return s(1),o}var vs=e=>{try{console.warn(`[specto] ${e}`)}catch{}},ys={dom:4e3,console:200,network:300,event:300,identify:20};function bs(e,t){let{key:n,endpoint:r}=t,i=[],a=0,o=!1,s=!1,c=null,l=[],u=performance.now(),d=()=>Math.round(performance.now()-u),f=`specto-session:${n}`,p=null,m={strict:e.privacy===`strict`,console:e.console!==!1,networkDetails:e.networkDetails!==!1},h=null,g=()=>h||m,_=()=>{},v=typeof WeakSet<`u`?new WeakSet:null,y=null,b=!1,x=[],S=null,C=Date.now(),w=[],T={},E=!1,D=(t,n)=>{if(!s){if(!o){if((T[t]=(T[t]||0)+1)>(ys[t]??100)){t===`dom`&&(E=!0);return}w.push([t,n]);return}i.push({kind:t,payload:n}),a++,e.onUpdate?.({total:a,kind:t})}},O=()=>ss.set(`sessionStorage`,f,p);function ee(e){let t=Date.now(),n=e?null:ss.get(`sessionStorage`,f),r=!!(n&&typeof n.id==`string`&&t-n.active<ps&&t-n.started<ms);if(r)p=n;else{let e=Math.max(0,Math.min(1,h.sampleRate));p={id:as(),sk:os(),b:0,started:t,active:t,sampled:Math.random()<e}}return p.active=t,O(),r}function k(){if(j(),ee(!0),!p.sampled)return M.stop(`not-sampled`);try{Oo.takeFullSnapshot(!0)}catch{}}function te(e){if(!e.length||!p?.sampled)return;let t={b:p.b++,json:JSON.stringify({key:n,sessionId:p.id,...p.sk?{sk:p.sk}:{},b:p.b-1,sdk:Uo,meta:{page:$(location.pathname),userAgent:navigator.userAgent,visitorId:fs()},events:e})};p.active=Math.max(p.active,C),O(),y?(y.postMessage({t:`upload`,item:t}),b||x.push(t)):S.push(t)}function A(){if(!S){try{y?.terminate()}catch{}y=null,S=Lo({endpoint:r,onEvent:ne});for(let e of x.splice(0))S.push(e)}}function j(){if(!i.length)return;let e=i;i=[],te(e)}function ne(t){t.t===`stop`?M.stop(t.code):t.t===`rotate`&&k(),e.onDelivery?.(t)}function re(){if(!i.length||!navigator.sendBeacon||!p?.sampled)return;let e=i;i=[];let t=[],a=0,o=()=>{if(!t.length)return;let e=JSON.stringify({key:n,sessionId:p.id,...p.sk?{sk:p.sk}:{},b:p.b++,sdk:Uo,meta:{page:$(location.pathname)},events:t});try{navigator.sendBeacon(r,new Blob([e],{type:`text/plain;charset=UTF-8`}))}catch{}t=[],a=0};for(let n of e){let e=JSON.stringify(n).length;a+e>55e3&&o(),!(e>55e3)&&(t.push(n),a+=e)}o(),O()}let M={disabled:!1,get sessionId(){return p?.id||null},count:()=>a,flushNow:()=>j(),identify(e,t){e!=null&&e!==``&&D(`identify`,{id:String(e).slice(0,256),traits:t&&typeof t==`object`?t:void 0})},track(e,t){e&&D(`event`,{t:d(),type:`custom`,name:String(e).slice(0,120),props:t&&typeof t==`object`?JSON.parse(JSON.stringify(t,(e,t)=>typeof t==`string`?Q(t).slice(0,500):t)):void 0})},captureError(e,t){if(e&&typeof e==`object`&&v){if(v.has(e))return;v.add(e)}let n=Q(String(e&&e.message||e||`error`)).slice(0,500),r=xs(e?.stack),i=t?.componentStack?Q(String(t.componentStack)).split(`
|
|
134
|
+
`,bo=typeof self<`u`&&self.Blob&&new Blob([yo],{type:`text/javascript;charset=utf-8`});function xo(e){let t;try{if(t=bo&&(self.URL||self.webkitURL).createObjectURL(bo),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(yo),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var So=class{constructor(e){n(this,`pendingCanvasMutations`,new Map),n(this,`rafStamps`,{latestId:0,invokeId:null}),n(this,`mirror`),n(this,`mutationCb`),n(this,`resetObservers`),n(this,`frozen`,!1),n(this,`locked`,!1),n(this,`processMutation`,(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});let{sampling:t=`all`,win:r,blockClass:i,blockSelector:a,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t===`all`&&this.initCanvasMutationObserver(r,i,a),o&&typeof t==`number`&&this.initCanvasFPSObserver(t,r,i,a,{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(e,t,n,r,i){let a=go(t,n,r,!0),o=new Map,s=new xo;s.onmessage=e=>{let{id:t}=e.data;if(o.set(t,!1),!(`base64`in e.data))return;let{base64:n,type:r,width:i,height:a}=e.data;this.mutationCb({id:t,type:ya[`2D`],commands:[{property:`clearRect`,args:[0,0,i,a]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:n}],type:r}]},0,0]}]})};let c=1e3/e,l=0,u,d=()=>{let e=[];return t.document.querySelectorAll(`canvas`).forEach(t=>{G(t,n,r,!0)||e.push(t)}),e},f=e=>{if(l&&e-l<c){u=requestAnimationFrame(f);return}l=e,d().forEach(async e=>{let t=this.mirror.getId(e);if(o.get(t)||e.width===0||e.height===0)return;if(o.set(t,!0),[`webgl`,`webgl2`].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}let n=await createImageBitmap(e);s.postMessage({id:t,bitmap:n,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[n])}),u=requestAnimationFrame(f)};u=requestAnimationFrame(f),this.resetObservers=()=>{a(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let r=go(e,t,n,!1),i=mo(this.processMutation.bind(this),e,t,n),a=vo(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),i(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}},Co=class{constructor(e){n(this,`trackedLinkElements`,new WeakSet),n(this,`mutationCb`),n(this,`adoptedStyleSheetCb`),n(this,`styleMirror`,new pa),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,n)=>({rule:F(e,t.href),index:n}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},wo=class{constructor(){n(this,`nodeMap`,new WeakMap),n(this,`active`,!1)}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},X,To,Eo,Do=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var Z=fe();function Oo(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,ignoreClass:o=`rr-ignore`,ignoreSelector:s=null,maskTextClass:c=`rr-mask`,maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:f,slimDOMOptions:p,maskInputFn:m,maskTextFn:h,hooks:g,packFn:_,sampling:v={},dataURLOptions:y={},mousemoveWait:b,recordDOM:x=!0,recordCanvas:S=!1,recordCrossOriginIframes:C=!1,recordAfter:w=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ee=!1,collectFonts:T=!1,inlineImages:E=!1,plugins:D,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:k=new Set([]),errorHandler:te}=e;ka(te);let ne=!C||window.parent===window,A=!1;if(!ne)try{window.parent.document&&(A=!1)}catch{A=!0}if(ne&&!t)throw Error(`emit function is required`);if(!ne&&!A)return()=>{};b!==void 0&&v.mousemove===void 0&&(v.mousemove=b),Z.reset();let re=d===!0?{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}:f===void 0?{password:!0}:f,ie=$e(p);la();let j,M=0,ae=e=>{for(let t of D||[])t.eventProcessor&&(e=t.eventProcessor(e));return _&&!A&&(e=_(e)),e};X=(e,i)=>{let a=e;if(a.timestamp=Yi(),ja[0]?.isFrozen()&&a.type!==K.FullSnapshot&&(a.type!==K.IncrementalSnapshot||a.data.source!==q.Mutation)&&ja.forEach(e=>e.unfreeze()),ne)t?.(ae(a),i);else if(A){let e={type:`rrweb`,event:ae(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===K.FullSnapshot)j=a,M=0;else if(a.type===K.IncrementalSnapshot){if(a.data.source===q.Mutation&&a.data.isAttachIframe)return;M++;let e=r&&M>=r,t=n&&a.timestamp-j.timestamp>n;(e||t)&&To(!0)}};let N=e=>{X({type:K.IncrementalSnapshot,data:{source:q.Mutation,...e}})},oe=e=>X({type:K.IncrementalSnapshot,data:{source:q.Scroll,...e}}),se=e=>X({type:K.IncrementalSnapshot,data:{source:q.CanvasMutation,...e}}),P=new Co({mutationCb:N,adoptedStyleSheetCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.AdoptedStyleSheet,...e}})}),F=new to({mirror:Z,mutationCb:N,stylesheetManager:P,recordCrossOriginIframes:C,wrappedEmit:X});for(let e of D||[])e.getMirror&&e.getMirror({nodeMirror:Z,crossOriginIframeMirror:F.crossOriginIframeMirror,crossOriginIframeStyleMirror:F.crossOriginIframeStyleMirror});let ce=new wo;Eo=new So({recordCanvas:S,mutationCb:se,win:window,blockClass:i,blockSelector:a,mirror:Z,sampling:v.canvas,dataURLOptions:y});let le=new no({mutationCb:N,scrollCb:oe,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:re,dataURLOptions:y,maskTextFn:h,maskInputFn:m,recordCanvas:S,inlineImages:E,sampling:v,slimDOMOptions:ie,iframeManager:F,stylesheetManager:P,canvasManager:Eo,keepIframeSrcFn:O,processedNodeManager:ce},mirror:Z});To=(e=!1)=>{if(!x)return;X({type:K.Meta,data:{href:window.location.href,width:ra(),height:na()}},e),P.reset(),le.init(),ja.forEach(e=>e.lock());let t=nt(document,{mirror:Z,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:re,maskTextFn:h,maskInputFn:m,slimDOM:ie,dataURLOptions:y,recordCanvas:S,inlineImages:E,onSerialize:e=>{ua(e,Z)&&F.addIframe(e),da(e,Z)&&P.trackLinkElement(e),fa(e)&&le.addShadowRoot(U.shadowRoot(e),document)},onIframeLoad:(e,t)=>{F.attachIframe(e,t),le.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{P.attachLinkElement(e,t)},keepIframeSrcFn:O});if(!t)return console.warn(`Failed to snapshot the document`);X({type:K.FullSnapshot,data:{node:t,initialOffset:ta(window)}},e),ja.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&P.adoptStyleSheets(document.adoptedStyleSheets,Z.getId(document))};try{let e=[],t=e=>Y(Za)({mutationCb:N,mousemoveCb:(e,t)=>X({type:K.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.MouseInteraction,...e}}),scrollCb:oe,viewportResizeCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.ViewportResize,...e}}),inputCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.Input,...e}}),mediaInteractionCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.MediaInteraction,...e}}),styleSheetRuleCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.StyleSheetRule,...e}}),styleDeclarationCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.StyleDeclaration,...e}}),canvasMutationCb:se,fontCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.Font,...e}}),selectionCb:e=>{X({type:K.IncrementalSnapshot,data:{source:q.Selection,...e}})},customElementCb:e=>{X({type:K.IncrementalSnapshot,data:{source:q.CustomElement,...e}})},blockClass:i,ignoreClass:o,ignoreSelector:s,maskTextClass:c,maskTextSelector:l,maskInputOptions:re,inlineStylesheet:u,sampling:v,recordDOM:x,recordCanvas:S,inlineImages:E,userTriggeredOnInput:ee,collectFonts:T,doc:e,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:O,blockSelector:a,slimDOMOptions:ie,dataURLOptions:y,mirror:Z,iframeManager:F,stylesheetManager:P,shadowDomManager:le,processedNodeManager:ce,canvasManager:Eo,ignoreCSSAttributes:k,plugins:(D?.filter(e=>e.observer))?.map(e=>({observer:e.observer,options:e.options,callback:t=>X({type:K.Plugin,data:{plugin:e.name,payload:t}})}))||[]},g);F.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{To(),e.push(t(document)),Do=!0};return[`interactive`,`complete`].includes(document.readyState)?n():(e.push(W(`DOMContentLoaded`,()=>{X({type:K.DomContentLoaded,data:{}}),w===`DOMContentLoaded`&&n()})),e.push(W(`load`,()=>{X({type:K.Load,data:{}}),w===`load`&&n()},window))),()=>{e.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes(`cross-origin`)||console.warn(e)}}),ce.destroy(),Do=!1,Aa()}}catch(e){console.warn(e)}}Oo.addCustomEvent=(e,t)=>{if(!Do)throw Error(`please add custom event after start recording`);X({type:K.Custom,data:{tag:e,payload:t}})},Oo.freezePage=()=>{ja.forEach(e=>e.freeze())},Oo.takeFullSnapshot=e=>{if(!Do)throw Error(`please take full snapshot after start recording`);To(e)},Oo.mirror=Z;var ko;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(ko||={});var{addCustomEvent:Ao}=Oo,{freezePage:jo}=Oo,{takeFullSnapshot:Mo}=Oo,No=40,Po=7,Fo=6e4;async function Io(e){if(typeof CompressionStream>`u`)return null;try{return await new Response(new Blob([e]).stream().pipeThrough(new CompressionStream(`gzip`))).blob()}catch{return null}}function Lo({endpoint:e,onEvent:t=()=>{}}){let n=[],r=!1,i=null,a=!1,o=(e,r)=>{if(e.tries++,e.tries>=Po)return n.shift(),t({t:`drop`,b:e.b,reason:`retries`}),s();let a=r>0?r*1e3:Math.min(3e4,1e3*2**(e.tries-1))*(.75+Math.random()/2);i=setTimeout(()=>{i=null,s()},a)};async function s(){if(r||i||a||!n.length)return;r=!0;let c=n[0];try{let i=await Io(c.json),s=i||c.json,l=i?i.size:c.json.length,u=await fetch(e,{method:`POST`,body:s,credentials:`omit`,mode:`cors`,headers:{"Content-Type":`text/plain;charset=UTF-8`},keepalive:l<Fo});if(u.ok)n.shift(),t({t:`ack`,b:c.b});else{let e=``;try{e=(await u.json())?.code||``}catch{}if(e===`session_limit`||e===`session_key`)n.length=0,t({t:`rotate`,code:e});else if(e===`quota_exceeded`||e===`recording_disabled`||u.status===401||u.status===403)n.length=0,a=!0,t({t:`stop`,code:e||String(u.status)});else if(u.status===429||u.status>=500)return r=!1,o(c,Number(u.headers.get(`Retry-After`))||0);else n.shift(),t({t:`drop`,b:c.b,reason:String(u.status)})}}catch{return r=!1,o(c,0)}r=!1,s()}return{push(e){a||(n.push({...e,tries:0}),n.length>No&&t({t:`drop`,b:n.shift().b,reason:`overflow`}),s())},nudge(){i&&=(clearTimeout(i),null),s()},stop(){a=!0,n.length=0,i&&clearTimeout(i)},pending:()=>n.length}}var Ro=`https://specto.sh`,zo=/^(localhost|127(?:\.\d{1,3}){3}|\[::1\]|0\.0\.0\.0|[^/:]+\.localhost)(?::\d+)?(?:\/|$)/i;function Bo(e){let t=String(e??``).trim(),n=t.indexOf(`@`);return n<=0?{key:t,host:null}:{key:t.slice(0,n),host:t.slice(n+1).trim()||null}}function Vo(e){let t=String(e??``).trim().replace(/\/+$/,``);if(!t)throw Error(`Specto: host is empty`);/^[a-z][a-z0-9+.-]*:\/\//i.test(t)||(t=(zo.test(t)?`http://`:`https://`)+t);let n;try{n=new URL(t)}catch{throw Error(`Specto: "${e}" is not a host — use e.g. eu.specto.sh or https://replay.example.com`)}if(n.protocol!==`https:`&&n.protocol!==`http:`)throw Error(`Specto: host must be http(s) — got "${e}"`);return(n.origin+n.pathname).replace(/\/+$/,``)}function Ho(e={},{fallback:t=null,guessed:n=!1}={}){let{key:r,host:i}=Bo(e.key),a=t=>e.configUrl===!1?null:e.configUrl||String(t).replace(/\/api\/ingest$/,`/api/sdk/config`);if(e.endpoint){let t=String(e.endpoint);return{key:r,endpoint:t,configUrl:a(t),host:null,guessed:!1}}let o=e.host||i;if(!o&&!t)return{key:r,endpoint:`/api/ingest`,configUrl:a(`/api/ingest`),host:null,guessed:!1};let s=Vo(o||t),c=`${s}/api/ingest`;return{key:r,endpoint:c,configUrl:a(c),host:s,guessed:!o&&!!n}}var Uo=`0.2.5`,Wo=e=>(e=e.toLowerCase(),e.startsWith(`data-`)||e===`title`||e===`alt`||e===`placeholder`||e===`aria-label`||e===`value`);function Go(e){if(e&&typeof e==`object`)for(let t of Object.keys(e))Wo(t)&&typeof e[t]==`string`&&e[t]&&(e[t]=`***`)}function Ko(e){e&&typeof e==`object`&&(e.attributes&&Go(e.attributes),Array.isArray(e.childNodes)&&e.childNodes.forEach(Ko))}function qo(e,t){try{e.type===4&&typeof e.data?.href==`string`?e.data.href=$(e.data.href,t):e.type===2&&e.data?.node?Ko(e.data.node):e.type===3&&e.data&&(Array.isArray(e.data.adds)&&e.data.adds.forEach(e=>Ko(e.node)),Array.isArray(e.data.attributes)&&e.data.attributes.forEach(e=>Go(e.attributes)))}catch{}return e}var Jo=[[/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi,`[email]`],[/\beyJ[\w-]{6,}\.[\w-]{6,}\.[\w-]{6,}\b/g,`[jwt]`],[/\b(Bearer|Basic)\s+[\w.~+/=-]{8,}/gi,`$1 [token]`],[/\b(?:\d[ -]?){13,19}\b/g,`[number]`],[/\b(sk|pk|rk)_(live|test)_[\w]{8,}\b/g,`[key]`]];function Q(e){let t=String(e??``);for(let[e,n]of Jo)t=t.replace(e,n);return t}function Yo(e){return typeof e==`string`?e:e&&typeof e.href==`string`?e.href:e&&typeof e.url==`string`?e.url:e==null?``:String(e)}var Xo=600,Zo=/(?:^|[-_.])(token|secret|password|passwd|auth|authorization|key|apikey|api[-_]?key|session|sid|code|signature|credential|email)s?$/i,Qo=e=>e.split(/[?&=]/)[0];function $(e,t=!1){let n=String(e??``);try{let e=new URL(n,location.href),r=!1;(e.username||e.password)&&(e.username=``,e.password=``,r=!0),t&&(e.search||Qo(e.hash)!==e.hash)&&(e.search=``,e.hash=Qo(e.hash),r=!0);for(let t of[...e.searchParams.keys()])Zo.test(t)&&(e.searchParams.set(t,`***`),r=!0);if(e.hash){let t=e.hash.replace(/([?&#]|^)([^=&?#]+)=([^&#]*)/g,(e,t,n)=>Zo.test(n)?`${t}${n}=***`:e);t!==e.hash&&(e.hash=t,r=!0)}let i=Q(decodeURIComponent(e.pathname));return i!==decodeURIComponent(e.pathname)&&(e.pathname=i,r=!0),r?(/^[a-z][a-z0-9+.-]*:/i.test(n)?e.href:e.pathname+e.search+e.hash).slice(0,Xo):n.slice(0,Xo)}catch{return Q(t?n.split(`?`)[0]:n).slice(0,Xo)}}var $o=e=>{try{return new URL(e,location.href).href}catch{return String(e??``)}},es=[`content-type`,`content-length`,`content-encoding`,`cache-control`,`etag`,`vary`,`age`,`server-timing`,`x-request-id`];function ts(e){let t={};for(let n of es)try{let r=e(n);r&&(t[n]=String(r).slice(0,200))}catch{}return Object.keys(t).length?t:void 0}function ns(e,t){try{if(!e)return;if(typeof e.get==`function`)return e.get(t)||void 0;if(Array.isArray(e)){let n=e.find(e=>String(e?.[0]).toLowerCase()===t);return n?String(n[1]):void 0}for(let n of Object.keys(e))if(n.toLowerCase()===t)return String(e[n])}catch{}}function rs(e){try{return e==null?void 0:typeof e==`string`?e.length:typeof Blob<`u`&&e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof URLSearchParams<`u`&&e instanceof URLSearchParams?String(e).length:void 0}catch{return}}function is(e,t,n,r=()=>!0){typeof performance<`u`&&performance.getEntriesByName&&setTimeout(()=>{try{if(!r())return;let i=null;for(let e of performance.getEntriesByName(t,`resource`)){let t=Math.abs(e.startTime-n);t<1500&&(!i||t<Math.abs(i.startTime-n))&&(i=e)}if(!i)return;let a=e.detail||={};if(i.transferSize&&(a.xfer=Math.round(i.transferSize)),i.decodedBodySize&&a.resSize==null&&(a.resSize=Math.round(i.decodedBodySize)),i.responseStart>0){let e=i.secureConnectionStart>0?i.secureConnectionStart:i.connectEnd,t={dns:i.domainLookupEnd-i.domainLookupStart,tcp:e-i.connectStart,tls:i.secureConnectionStart>0?i.connectEnd-i.secureConnectionStart:0,ttfb:i.responseStart-i.requestStart,dl:i.responseEnd-i.responseStart};a.timing={};for(let e of Object.keys(t))t[e]>0&&(a.timing[e]=Math.round(t[e]*10)/10);Object.keys(a.timing).length||delete a.timing}}catch{}},300)}function as(e=`rec_`){return e+(typeof crypto<`u`&&crypto.getRandomValues?Array.from(crypto.getRandomValues(new Uint8Array(12))).map(e=>e.toString(16).padStart(2,`0`)).join(``):Math.abs(Date.now()^performance.now()*1e3|0).toString(16)+Math.random().toString(16).slice(2,10))}function os(){if(typeof crypto>`u`||!crypto.getRandomValues)return null;let e=crypto.getRandomValues(new Uint8Array(16));return btoa(String.fromCharCode(...e)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var ss={get(e,t){try{return JSON.parse(window[e].getItem(t))}catch{return null}},set(e,t,n){try{window[e].setItem(t,JSON.stringify(n))}catch{}},del(e,t){try{window[e].removeItem(t)}catch{}}},cs=`specto-optout`,ls=`specto-consent`,us=()=>ss.get(`localStorage`,cs)===!0,ds=()=>ss.get(`localStorage`,ls)===`granted`;function fs(){let e=ss.get(`localStorage`,`specto-vid`);return typeof e!=`string`&&(e=as(`v_`),ss.set(`localStorage`,`specto-vid`,e)),e}var ps=18e5,ms=144e5,hs=4e3;async function gs(e,t){if(!e)return null;try{let n=typeof AbortController<`u`?new AbortController:null,r=n&&setTimeout(()=>n.abort(),3e3),i=await fetch(`${e}?key=${encodeURIComponent(t)}`,{credentials:`omit`,signal:n?.signal});if(r&&clearTimeout(r),i.ok)return await i.json();let a=null;try{a=await i.json()}catch{}return i.status===404&&a?.error===`unknown key`?{unknownKey:!0}:{failed:!0}}catch{return{failed:!0}}}function _s(e={}){if(typeof window>`u`)return{disabled:!0,reason:`no window`,stop(){}};if(window.__spectoRec&&!window.__spectoRec.disabled)return window.__spectoRec;let t=Ho(e,{fallback:e._fallback||null,guessed:!!e._guessed});if(!t.key)throw Error(`Specto: a publishable key is required — copy it from your project's Install page`);let{key:n,endpoint:r,configUrl:i}=t,a={disabled:!0,reason:`starting`,sessionId:null,stop(){},flushNow(){},count:()=>0,identify(){},track(){},sessionUrl:()=>null};if(navigator.doNotTrack===`1`||navigator.globalPrivacyControl)return Object.assign(a,{reason:`dnt`});if(us())return Object.assign(a,{reason:`opted-out`});if(e.consent===`required`&&!ds())return Object.assign(a,{reason:`consent-required`});let o=bs(e,t);window.__spectoRec=o;let s=e=>gs(i,n).then(n=>{if(n?.failed&&t.guessed&&e<3)return setTimeout(()=>s(e+1),e*2e3);o._begin(n)});return s(1),o}var vs=e=>{try{console.warn(`[specto] ${e}`)}catch{}},ys={dom:4e3,console:200,network:300,event:300,identify:20};function bs(e,t){let{key:n,endpoint:r}=t,i=[],a=0,o=!1,s=!1,c=null,l=[],u=performance.now(),d=()=>Math.round(performance.now()-u),f=`specto-session:${n}`,p=null,m={strict:e.privacy===`strict`,console:e.console!==!1,networkDetails:e.networkDetails!==!1},h=null,g=()=>h||m,_=()=>{try{return $(location.pathname,g().strict).slice(0,300)}catch{return}},v=()=>{},y=typeof WeakSet<`u`?new WeakSet:null,b=null,x=!1,S=[],C=null,w=Date.now(),ee=[],T={},E=!1,D=(t,n)=>{if(!s){if(!o){if((T[t]=(T[t]||0)+1)>(ys[t]??100)){t===`dom`&&(E=!0);return}ee.push([t,n]);return}i.push({kind:t,payload:n}),a++,e.onUpdate?.({total:a,kind:t})}},O=()=>ss.set(`sessionStorage`,f,p);function k(e){let t=Date.now(),n=e?null:ss.get(`sessionStorage`,f),r=!!(n&&typeof n.id==`string`&&t-n.active<ps&&t-n.started<ms);if(r)p=n;else{let e=Math.max(0,Math.min(1,h.sampleRate));p={id:as(),sk:os(),b:0,started:t,active:t,sampled:Math.random()<e}}return p.active=t,O(),r}function te(){if(re(),k(!0),!p.sampled)return M.stop(`not-sampled`);try{Oo.takeFullSnapshot(!0)}catch{}}function ne(e){if(!e.length||!p?.sampled)return;let t={b:p.b++,json:JSON.stringify({key:n,sessionId:p.id,...p.sk?{sk:p.sk}:{},b:p.b-1,sdk:Uo,meta:{page:$(location.pathname),userAgent:navigator.userAgent,visitorId:fs()},events:e})};p.active=Math.max(p.active,w),O(),b?(b.postMessage({t:`upload`,item:t}),x||S.push(t)):C.push(t)}function A(){if(!C){try{b?.terminate()}catch{}b=null,C=Lo({endpoint:r,onEvent:ie});for(let e of S.splice(0))C.push(e)}}function re(){if(!i.length)return;let e=i;i=[],ne(e)}function ie(t){t.t===`stop`?M.stop(t.code):t.t===`rotate`&&te(),e.onDelivery?.(t)}function j(){if(!i.length||!navigator.sendBeacon||!p?.sampled)return;let e=i;i=[];let t=[],a=0,o=()=>{if(!t.length)return;let e=JSON.stringify({key:n,sessionId:p.id,...p.sk?{sk:p.sk}:{},b:p.b++,sdk:Uo,meta:{page:$(location.pathname)},events:t});try{navigator.sendBeacon(r,new Blob([e],{type:`text/plain;charset=UTF-8`}))}catch{}t=[],a=0};for(let n of e){let e=JSON.stringify(n).length;a+e>55e3&&o(),!(e>55e3)&&(t.push(n),a+=e)}o(),O()}let M={disabled:!1,get sessionId(){return p?.id||null},count:()=>a,flushNow:()=>re(),identify(e,t){e!=null&&e!==``&&D(`identify`,{id:String(e).slice(0,256),traits:t&&typeof t==`object`?t:void 0})},track(e,t){e&&D(`event`,{t:d(),type:`custom`,name:String(e).slice(0,120),props:t&&typeof t==`object`?JSON.parse(JSON.stringify(t,(e,t)=>typeof t==`string`?Q(t).slice(0,500):t)):void 0})},captureError(e,t){if(e&&typeof e==`object`&&y){if(y.has(e))return;y.add(e)}let n=Q(String(e&&e.message||e||`error`)).slice(0,500),r=xs(e?.stack),i=t?.componentStack?Q(String(t.componentStack)).split(`
|
|
135
135
|
`).map(e=>e.trim()).filter(Boolean).slice(0,8).join(`
|
|
136
|
-
`).slice(0,800):void 0;D(`event`,{t:d(),type:`error`,message:n,...r?{stack:r}:{},...i?{component:i}:{},...t?.source?{source:String(t.source).slice(0,40)}:{}})},sessionUrl(){try{return p?`${t.host||new URL(r,location.href).origin}/#replay/${p.id}`:null}catch{return null}},stop(e){if(s)return;s=!0,M.disabled=!0,M.reason=e||`stopped`;try{c?.()}catch{}for(let e of l.splice(0))try{e()}catch{}
|
|
136
|
+
`).slice(0,800):void 0;D(`event`,{t:d(),type:`error`,message:n,path:_(),...r?{stack:r}:{},...i?{component:i}:{},...t?.source?{source:String(t.source).slice(0,40)}:{}})},sessionUrl(){try{return p?`${t.host||new URL(r,location.href).origin}/#replay/${p.id}`:null}catch{return null}},stop(e){if(s)return;s=!0,M.disabled=!0,M.reason=e||`stopped`;try{c?.()}catch{}for(let e of l.splice(0))try{e()}catch{}re(),b&&!x&&S.length&&A();let t=b;t&&setTimeout(()=>t.terminate(),2e3),window.__spectoRec===M&&delete window.__spectoRec},_begin(i){if(s||o)return;let a=i&&typeof i==`object`?i:{},u=t.host||r;if(a.unknownKey)return M.stop(`unknown-key`),vs(`${u} has no project with the key ${n}, so nothing is recorded. Copy the key from the project's Install page${t.guessed?` — a self-hosted or EU-region project includes its host: pk_…@your-host`:``}.`);if(a.failed&&t.guessed)return M.stop(`unconfirmed`),vs(`couldn't reach ${u} to confirm the key ${n}, so this page isn't recorded.`);if(a.enabled===!1)return M.stop(`recording-disabled`);h={strict:e.privacy===`strict`||a.privacy===`strict`,console:e.console!==!1&&a.captureConsole!==!1,networkDetails:e.networkDetails!==!1&&a.captureNetworkDetails!==!1,sampleRate:Math.min(e.sampleRate??1,typeof a.sampleRate==`number`?a.sampleRate:1)};let d=k(!1);if(!p.sampled)return M.stop(`not-sampled`);let f=h.strict&&!m.strict,g=f||E;o=!0;for(let[e,t]of ee.splice(0)){let n=N(e,t,f,g);n&&D(e,n)}if(g){try{c?.()}catch{}c=ae()}try{if(b=e.createWorker?e.createWorker():null,b){b.onmessage=e=>{let t=e.data||{};if(t.t===`ready`){x=!0,S=[];return}ie(t)},b.onerror=()=>{x||A()},b.postMessage({t:`init`,endpoint:r});let e=setTimeout(()=>{x||A()},hs);l.push(()=>clearTimeout(e))}}catch{b=null}b||(C=Lo({endpoint:r,onEvent:ie})),P(d);let _=setInterval(re,2e3);l.push(()=>clearInterval(_))}};function ae(){let e=g().strict;return Oo({emit:e=>D(`dom`,qo(e,g().strict)),maskAllInputs:!0,maskInputOptions:{password:!0,email:!0,tel:!0,color:!1},maskTextClass:`specto-mask`,maskTextSelector:e?`*`:void 0,blockClass:`specto-block`,recordCanvas:!1,collectFonts:!1,checkoutEveryNms:3e5,sampling:{mousemove:50,scroll:150,input:`last`}})}function N(e,t,n,r){if(e===`dom`)return r?null:t;if(!t||typeof t!=`object`)return t;if(e===`console`){if(!h.console)return null;n&&(t.text=`[masked]`)}else e===`network`?(n&&t.url&&(t.url=$(t.url,!0)),h.networkDetails||delete t.detail):e===`event`&&t.type===`nav`&&n&&t.path&&(t.path=$(t.path,!0).slice(0,300));return t}function oe(){if(c=ae(),m.console)for(let e of[`log`,`info`,`warn`,`error`]){let t=console[e];console[e]=(...n)=>{try{g().console&&D(`console`,{t:d(),level:e,text:g().strict?`[masked]`:Q(n.map(Ts).join(` `)).slice(0,2e3)})}catch{}t.apply(console,n)},l.push(()=>{console[e]=t})}if(m.networkDetails)try{performance.setResourceTimingBufferSize?.(1e3)}catch{}let n=()=>g().networkDetails,i=window.fetch,a=e=>new URL(e,location.href).href.split(/[?#]/)[0],o=new Set;for(let e of[r,t.configUrl])try{e&&o.add(a(e))}catch{}let s=e=>{try{return o.has(a(e))}catch{return!1}},u=new Set((Array.isArray(e.traceOrigins)?e.traceOrigins:[]).map(e=>{try{return new URL(e).origin}catch{return null}}).filter(Boolean)),f=!!e.traces||u.size>0,p=e=>{if(!f)return!1;try{let t=new URL(e,location.href).origin;return t===location.origin||u.has(t)}catch{return!1}},h=e=>{try{let[t,n]=e,r=typeof Request<`u`&&t instanceof Request,i=new Headers(n?.headers??(r?t.headers:void 0)),a=Cs.exec(i.get(`traceparent`)||``);if(a)return[e,a[1].toLowerCase()];let o=Ss(16);return i.set(`traceparent`,`00-${o}-${Ss(8)}-01`),[[t,{...n,headers:i}],o]}catch{return[e,void 0]}};window.fetch=async(...e)=>{if(s(Yo(e[0])))return i.apply(window,e);let t=performance.now(),r=Yo(e[0]),a=$(r,g().strict),o=(e[1]?.method||typeof e[0]!=`string`&&e[0]?.method||`GET`).toUpperCase(),c;p(r)&&([e,c]=h(e));try{let s=await i.apply(window,e),l=c;try{l=l||s.headers.get(`x-trace-id`)||void 0}catch{}let u={t:d(),method:o,url:a,status:s.status,dur:Math.round(performance.now()-t),...l?{traceId:l}:{}};if(n()){let i={initiator:`fetch`};try{s.statusText&&(i.statusText=String(s.statusText).slice(0,80));let t=ts(e=>s.headers.get(e));t&&(i.headers=t),t?.[`content-type`]&&(i.resType=t[`content-type`].split(`;`)[0]);let n=Number(t?.[`content-length`]);t?.[`content-length`]!=null&&Number.isFinite(n)&&(i.resSize=n);let r=ns((e[1]||(typeof e[0]==`object`?e[0]:null))?.headers,`content-type`);r&&(i.reqType=r.split(`;`)[0].slice(0,80));let a=rs(e[1]?.body);a!=null&&(i.reqSize=a)}catch{}u.detail=i,is(u,$o(r),t,n)}return D(`network`,u),s}catch(e){throw D(`network`,{t:d(),method:o,url:a,status:0,dur:Math.round(performance.now()-t),error:!0,...n()?{detail:{initiator:`fetch`,message:Q(String(e?.message||e)).slice(0,200)}}:{}}),e}},l.push(()=>{window.fetch=i});let b=window.XMLHttpRequest,x=b.prototype.open,S=b.prototype.send,C=b.prototype.setRequestHeader;b.prototype.open=function(e,t){return this.__specto={method:String(e).toUpperCase(),url:$(t,g().strict),rawUrl:$o(t),started:0,trace:p(t)},x.apply(this,arguments)},b.prototype.setRequestHeader=function(e,t){let n=String(e).toLowerCase();if(this.__specto&&n===`content-type`&&(this.__specto.reqType=String(t).split(`;`)[0].slice(0,80)),this.__specto&&n===`traceparent`){let e=Cs.exec(String(t));e&&(this.__specto.traceId=e[1].toLowerCase()),this.__specto.trace=!1}return C.apply(this,arguments)},b.prototype.send=function(e){if(this.__specto){if(this.__specto.trace)try{let e=Ss(16);C.call(this,`traceparent`,`00-${e}-${Ss(8)}-01`),this.__specto.traceId=e}catch{}this.__specto.started=performance.now(),n()&&(this.__specto.reqSize=rs(e)),this.addEventListener(`loadend`,()=>{let e=this.__specto,t=e.traceId;try{t=t||this.getResponseHeader(`x-trace-id`)||void 0}catch{}let r={t:d(),method:e.method,url:e.url,status:this.status,dur:Math.round(performance.now()-e.started),...t?{traceId:t}:{},...this.status===0?{error:!0}:{}};if(n()){let t={initiator:`xhr`};try{this.statusText&&(t.statusText=String(this.statusText).slice(0,80));let n=ts(e=>this.getResponseHeader(e));n&&(t.headers=n),n?.[`content-type`]&&(t.resType=n[`content-type`].split(`;`)[0]);let r=Number(n?.[`content-length`]);n?.[`content-length`]!=null&&Number.isFinite(r)&&(t.resSize=r),e.reqType&&(t.reqType=e.reqType),e.reqSize!=null&&(t.reqSize=e.reqSize)}catch{}r.detail=t,is(r,e.rawUrl,e.started,n)}D(`network`,r)})}return S.apply(this,arguments)},l.push(()=>{b.prototype.open=x,b.prototype.send=S,b.prototype.setRequestHeader=C});let w=e=>{let t=e.error||e.reason,n=xs(t?.stack),r={t:d(),type:`error`,message:Q(String(e.message||t?.message||e.reason||`error`)).slice(0,500),path:_(),...n?{stack:n}:{}};setTimeout(()=>{if(t&&typeof t==`object`&&y){if(y.has(t))return;y.add(t)}D(`event`,r)},0)};window.addEventListener(`error`,w),window.addEventListener(`unhandledrejection`,w),l.push(()=>{window.removeEventListener(`error`,w),window.removeEventListener(`unhandledrejection`,w)}),se=()=>{v(),D(`event`,{t:d(),type:`nav`,path:$(location.pathname+location.search+location.hash,g().strict).slice(0,300)})};let ee=history.pushState,T=history.replaceState;history.pushState=function(...e){let t=ee.apply(this,e);try{se()}catch{}return t},history.replaceState=function(...e){let t=T.apply(this,e);try{se()}catch{}return t};let E=()=>se();window.addEventListener(`popstate`,E),window.addEventListener(`hashchange`,E),l.push(()=>{history.pushState=ee,history.replaceState=T,window.removeEventListener(`popstate`,E),window.removeEventListener(`hashchange`,E)})}let se=()=>{};function P(e){let t=()=>{let e=Date.now();if(e-w>ps){w=e,te();return}w=e};for(let e of[`click`,`keydown`,`scroll`,`pointerdown`])window.addEventListener(e,t,{capture:!0,passive:!0}),l.push(()=>window.removeEventListener(e,t,{capture:!0}));if(e||location.hash.length>1)try{se()}catch{}let n=[],r=e=>{let t=performance.now();if(n=n.filter(n=>t-n.t<800&&Math.abs(n.x-e.clientX)<40&&Math.abs(n.y-e.clientY)<40),n.push({t,x:e.clientX,y:e.clientY}),n.length>=3){let t=e.target?.tagName?e.target.tagName.toLowerCase()+(e.target.id?`#`+e.target.id:``):`element`;D(`event`,{t:d(),type:`rage`,target:t.slice(0,80),count:n.length,path:_()}),n=[]}};window.addEventListener(`click`,r,!0),l.push(()=>window.removeEventListener(`click`,r,!0));let i=()=>Math.max(document.documentElement?.scrollHeight||0,document.body?.scrollHeight||0),a=null,o=()=>{let e=i();a&&e>0&&(a.depth=Math.max(a.depth,Math.min(1,(window.scrollY+window.innerHeight)/e)))},s=()=>{a={id:Math.random().toString(36).slice(2,10),path:$(location.pathname,g().strict).slice(0,300),depth:0,clicks:0},o()},c=()=>{a&&D(`event`,{t:d(),type:`scroll`,path:a.path,pv:a.id,depth:Math.round(a.depth*1e3)/1e3,vw:window.innerWidth,dh:i()})};s(),v=()=>{$(location.pathname,g().strict).slice(0,300)!==a?.path&&(c(),s())};let u=!1,f=()=>{u||(u=!0,requestAnimationFrame(()=>{u=!1,o()}))},p=e=>{!a||a.clicks>=300||(a.clicks++,D(`event`,{t:d(),type:`click`,path:a.path,pv:a.id,x:Math.round(e.pageX),y:Math.round(e.pageY),vw:window.innerWidth,dh:i(),sel:ws(e.target)}))};window.addEventListener(`scroll`,f,{passive:!0,capture:!0}),window.addEventListener(`click`,p,!0),l.push(()=>{window.removeEventListener(`scroll`,f,{capture:!0}),window.removeEventListener(`click`,p,!0)});let m=()=>{c(),j()},h=()=>{document.visibilityState===`hidden`&&(c(),j())},y=()=>{b?b.postMessage({t:`nudge`}):C?.nudge()};window.addEventListener(`pagehide`,m),document.addEventListener(`visibilitychange`,h),window.addEventListener(`online`,y),l.push(()=>{window.removeEventListener(`pagehide`,m),document.removeEventListener(`visibilitychange`,h),window.removeEventListener(`online`,y)})}return oe(),M}function xs(e){if(e)return Q(String(e)).split(`
|
|
137
137
|
`).slice(0,6).map(e=>e.replace(/\?[^\s:)]*/g,``).slice(0,300)).join(`
|
|
138
138
|
`)}var Ss=e=>{let t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)},Cs=/^00-([0-9a-f]{32})-[0-9a-f]{16}-[0-9a-f]{2}$/i;function ws(e){let t=[];for(let n=e,r=0;n&&n.nodeType===1&&r<3&&n!==document.body&&n!==document.documentElement;n=n.parentElement,r++){let e=String(n.tagName||``).toLowerCase();if(n.id){t.unshift(`${e}#${n.id}`);break}let r=typeof n.className==`string`?n.className.trim().split(/\s+/).filter(e=>e&&!e.startsWith(`specto-`)).slice(0,2):[];t.unshift(r.length?`${e}.${r.join(`.`)}`:e)}return Q(t.join(` > `)||`body`).slice(0,160)}function Ts(e){if(typeof e==`string`)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}var Es='(function(){async function e(e){if(typeof CompressionStream>`u`)return null;try{return await new Response(new Blob([e]).stream().pipeThrough(new CompressionStream(`gzip`))).blob()}catch{return null}}function t({endpoint:t,onEvent:n=()=>{}}){let r=[],i=!1,a=null,o=!1,s=(e,t)=>{if(e.tries++,e.tries>=7)return r.shift(),n({t:`drop`,b:e.b,reason:`retries`}),c();let i=t>0?t*1e3:Math.min(3e4,1e3*2**(e.tries-1))*(.75+Math.random()/2);a=setTimeout(()=>{a=null,c()},i)};async function c(){if(i||a||o||!r.length)return;i=!0;let l=r[0];try{let a=await e(l.json),c=a||l.json,u=a?a.size:l.json.length,d=await fetch(t,{method:`POST`,body:c,credentials:`omit`,mode:`cors`,headers:{"Content-Type":`text/plain;charset=UTF-8`},keepalive:u<6e4});if(d.ok)r.shift(),n({t:`ack`,b:l.b});else{let e=``;try{e=(await d.json())?.code||``}catch{}if(e===`session_limit`||e===`session_key`)r.length=0,n({t:`rotate`,code:e});else if(e===`quota_exceeded`||e===`recording_disabled`||d.status===401||d.status===403)r.length=0,o=!0,n({t:`stop`,code:e||String(d.status)});else if(d.status===429||d.status>=500)return i=!1,s(l,Number(d.headers.get(`Retry-After`))||0);else r.shift(),n({t:`drop`,b:l.b,reason:String(d.status)})}}catch{return i=!1,s(l,0)}i=!1,c()}return{push(e){o||(r.push({...e,tries:0}),r.length>40&&n({t:`drop`,b:r.shift().b,reason:`overflow`}),c())},nudge(){a&&=(clearTimeout(a),null),c()},stop(){o=!0,r.length=0,a&&clearTimeout(a)},pending:()=>r.length}}let n=null;self.onmessage=e=>{let r=e.data||{};r.t===`init`?(n=t({endpoint:r.endpoint,onEvent:e=>self.postMessage(e)}),self.postMessage({t:`ready`})):r.t===`upload`?n?.push(r.item):r.t===`nudge`?n?.nudge():r.t===`stop`&&n?.stop()}})();',Ds=typeof self<`u`&&self.Blob&&new Blob([`(self.URL || self.webkitURL).revokeObjectURL(self.location.href);`,Es],{type:`text/javascript;charset=utf-8`});function Os(e){let t;try{if(t=Ds&&(self.URL||self.webkitURL).createObjectURL(Ds),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(Es),{name:e?.name})}}var ks=null;function As(e={}){if(!e.key)throw Error(`@spectosh/browser: opts.key is required — your pk_… key from the project's Install page`);return ks=e,_s({createWorker:()=>new Os,_fallback:Ro,_guessed:!0,...e})}var js=()=>typeof window<`u`?window.__spectoRec:null,Ms=(e,t)=>js()?.identify(e,t),Ns=(e,t)=>js()?.track(e,t),Ps=(e,t)=>js()?.captureError?.(e,t),Fs=()=>js()?.sessionUrl?.()||null,Is=()=>js()?.stop();function Ls(){try{localStorage.setItem(`specto-consent`,JSON.stringify(`granted`))}catch{}return ks?As(ks):null}function Rs(){try{localStorage.removeItem(`specto-consent`)}catch{}Is()}function zs(){try{localStorage.setItem(`specto-optout`,`true`)}catch{}Is()}function Bs(){try{localStorage.removeItem(`specto-optout`)}catch{}}var Vs={startRecording:As,identify:Ms,track:Ns,captureError:Ps,sessionUrl:Fs,stopRecording:Is,grantConsent:Ls,revokeConsent:Rs,optOut:zs,optIn:Bs};Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return Bo}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return zs}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Vs}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Ns}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Uo}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return Ro}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Bs}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return As}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return us}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Ls}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Rs}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return ds}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Ms}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Fs}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Ps}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Is}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectosh/browser",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Specto session-replay recorder for bundler users — rrweb DOM capture, console/network/error/rage signals, privacy-masked in the browser.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
package/src/recorder.js
CHANGED
|
@@ -33,7 +33,7 @@ import { record } from 'rrweb'
|
|
|
33
33
|
import { createUploader } from './uploader.js'
|
|
34
34
|
import { resolveDestination } from './destination.js'
|
|
35
35
|
|
|
36
|
-
export const SDK_VERSION = '0.2.
|
|
36
|
+
export const SDK_VERSION = '0.2.5'
|
|
37
37
|
|
|
38
38
|
// ---- privacy helpers --------------------------------------------------------
|
|
39
39
|
// Attribute scrubbing — rrweb masks text/inputs but NOT element attributes,
|
|
@@ -320,6 +320,8 @@ function createRecorder(opts, dest) {
|
|
|
320
320
|
const local = { strict: opts.privacy === 'strict', console: opts.console !== false, networkDetails: opts.networkDetails !== false }
|
|
321
321
|
let cfg = null
|
|
322
322
|
const now = () => cfg || local
|
|
323
|
+
// the page an error or rage click happened on (sessions span page loads)
|
|
324
|
+
const herePath = () => { try { return scrubUrl(location.pathname, now().strict).slice(0, 300) } catch { return undefined } }
|
|
323
325
|
let viewChanged = () => {} // heatmaps: a new path is a new page view (set once recording begins)
|
|
324
326
|
const seen = typeof WeakSet !== 'undefined' ? new WeakSet() : null // errors already reported (boundary + window)
|
|
325
327
|
let worker = null
|
|
@@ -457,7 +459,7 @@ function createRecorder(opts, dest) {
|
|
|
457
459
|
const component = info?.componentStack
|
|
458
460
|
? scrubText(String(info.componentStack)).split('\n').map((l) => l.trim()).filter(Boolean).slice(0, 8).join('\n').slice(0, 800)
|
|
459
461
|
: undefined
|
|
460
|
-
push('event', { t: rel(), type: 'error', message, ...(stack ? { stack } : {}), ...(component ? { component } : {}), ...(info?.source ? { source: String(info.source).slice(0, 40) } : {}) })
|
|
462
|
+
push('event', { t: rel(), type: 'error', message, path: herePath(), ...(stack ? { stack } : {}), ...(component ? { component } : {}), ...(info?.source ? { source: String(info.source).slice(0, 40) } : {}) })
|
|
461
463
|
},
|
|
462
464
|
sessionUrl() {
|
|
463
465
|
try { return session ? `${dest.host || new URL(endpoint, location.href).origin}/#replay/${session.id}` : null } catch { return null }
|
|
@@ -718,7 +720,7 @@ function createRecorder(opts, dest) {
|
|
|
718
720
|
const onError = (e) => {
|
|
719
721
|
const err = e.error || e.reason
|
|
720
722
|
const stack = framesOf(err?.stack)
|
|
721
|
-
const payload = { t: rel(), type: 'error', message: scrubText(String(e.message || err?.message || e.reason || 'error')).slice(0, 500), ...(stack ? { stack } : {}) }
|
|
723
|
+
const payload = { t: rel(), type: 'error', message: scrubText(String(e.message || err?.message || e.reason || 'error')).slice(0, 500), path: herePath(), ...(stack ? { stack } : {}) }
|
|
722
724
|
setTimeout(() => {
|
|
723
725
|
if (err && typeof err === 'object' && seen) { if (seen.has(err)) return; seen.add(err) }
|
|
724
726
|
push('event', payload)
|
|
@@ -774,7 +776,7 @@ function createRecorder(opts, dest) {
|
|
|
774
776
|
clicks.push({ t: now, x: e.clientX, y: e.clientY })
|
|
775
777
|
if (clicks.length >= 3) {
|
|
776
778
|
const sel = e.target?.tagName ? e.target.tagName.toLowerCase() + (e.target.id ? '#' + e.target.id : '') : 'element'
|
|
777
|
-
push('event', { t: rel(), type: 'rage', target: sel.slice(0, 80), count: clicks.length })
|
|
779
|
+
push('event', { t: rel(), type: 'rage', target: sel.slice(0, 80), count: clicks.length, path: herePath() })
|
|
778
780
|
clicks = []
|
|
779
781
|
}
|
|
780
782
|
}
|