@v-tilt/browser 1.13.0 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/all-external-dependencies.js.map +1 -1
  2. package/dist/array.chat.js +2 -0
  3. package/dist/array.chat.js.map +1 -0
  4. package/dist/array.chat.no-external.js +2 -0
  5. package/dist/array.chat.no-external.js.map +1 -0
  6. package/dist/array.full.chat.js +2 -0
  7. package/dist/array.full.chat.js.map +1 -0
  8. package/dist/array.full.chat.no-external.js +2 -0
  9. package/dist/array.full.chat.no-external.js.map +1 -0
  10. package/dist/array.full.js +1 -1
  11. package/dist/array.full.js.map +1 -1
  12. package/dist/array.full.no-external.js +2 -0
  13. package/dist/array.full.no-external.js.map +1 -0
  14. package/dist/array.js +1 -1
  15. package/dist/array.js.map +1 -1
  16. package/dist/array.no-external.js +1 -1
  17. package/dist/array.no-external.js.map +1 -1
  18. package/dist/chat.js +1 -1
  19. package/dist/chat.js.map +1 -1
  20. package/dist/entrypoints/all-external-dependencies.d.ts +10 -3
  21. package/dist/entrypoints/array.chat.d.ts +10 -0
  22. package/dist/entrypoints/array.chat.no-external.d.ts +6 -0
  23. package/dist/entrypoints/array.full.chat.d.ts +13 -0
  24. package/dist/entrypoints/array.full.chat.no-external.d.ts +7 -0
  25. package/dist/entrypoints/array.full.d.ts +5 -9
  26. package/dist/entrypoints/array.full.no-external.d.ts +12 -0
  27. package/dist/entrypoints/module.chat.es.d.ts +7 -0
  28. package/dist/entrypoints/module.full.chat.es.d.ts +12 -0
  29. package/dist/entrypoints/module.full.es.d.ts +12 -0
  30. package/dist/entrypoints/module.no-external.es.d.ts +1 -0
  31. package/dist/extensions/chat/bubble-drag.d.ts +20 -5
  32. package/dist/extensions/chat/chat-wrapper.d.ts +8 -2
  33. package/dist/extensions/chat/chat.d.ts +21 -351
  34. package/dist/extensions/chat/controller/__tests__/fakes/ably-realtime-fake.d.ts +84 -0
  35. package/dist/extensions/chat/controller/ably-client.d.ts +160 -0
  36. package/dist/extensions/chat/controller/ably-handlers.d.ts +95 -0
  37. package/dist/extensions/chat/controller/ably-token.d.ts +67 -0
  38. package/dist/extensions/chat/controller/chat-controller.d.ts +194 -0
  39. package/dist/extensions/chat/controller/message-delivery-status.d.ts +6 -0
  40. package/dist/extensions/chat/controller/message-order.d.ts +12 -0
  41. package/dist/extensions/chat/controller/message-stream.d.ts +49 -0
  42. package/dist/extensions/chat/lib/bubble-offset.d.ts +18 -0
  43. package/dist/extensions/chat/lib/merge-chat-config.d.ts +3 -0
  44. package/dist/extensions/chat/normalize-send-content.d.ts +2 -0
  45. package/dist/extensions/chat/outbox/message-delivery.d.ts +17 -0
  46. package/dist/extensions/chat/outbox/message-outbox.d.ts +57 -0
  47. package/dist/extensions/chat/store/chat-store.d.ts +122 -0
  48. package/dist/extensions/chat/types.d.ts +1 -19
  49. package/dist/extensions/chat/ui/ChannelItem.d.ts +12 -0
  50. package/dist/extensions/chat/ui/ChannelListView.d.ts +14 -0
  51. package/dist/extensions/chat/ui/ChatBubble.d.ts +14 -0
  52. package/dist/extensions/chat/ui/ChatHeader.d.ts +13 -0
  53. package/dist/extensions/chat/ui/ChatPanel.d.ts +14 -0
  54. package/dist/extensions/chat/ui/ChatRoot.d.ts +31 -0
  55. package/dist/extensions/chat/ui/ClosedBanner.d.ts +7 -0
  56. package/dist/extensions/chat/ui/ConnectionBanner.d.ts +32 -0
  57. package/dist/extensions/chat/ui/ConversationView.d.ts +14 -0
  58. package/dist/extensions/chat/ui/MessageBubble.d.ts +25 -0
  59. package/dist/extensions/chat/ui/MessageInput.d.ts +14 -0
  60. package/dist/extensions/chat/ui/MessageList.d.ts +19 -0
  61. package/dist/extensions/chat/ui/NewMessagesPill.d.ts +13 -0
  62. package/dist/extensions/chat/ui/Skeletons.d.ts +14 -0
  63. package/dist/extensions/chat/ui/TypingBubble.d.ts +23 -0
  64. package/dist/extensions/chat/ui/TypingIndicator.d.ts +12 -0
  65. package/dist/extensions/chat/ui/WidgetSlot.d.ts +20 -0
  66. package/dist/extensions/chat/ui/hooks/use-auto-mark-read.d.ts +18 -0
  67. package/dist/extensions/chat/ui/hooks/use-scroll-preservation.d.ts +33 -0
  68. package/dist/extensions/chat/ui/icons.d.ts +18 -0
  69. package/dist/extensions/chat/ui/message-render.d.ts +18 -0
  70. package/dist/extensions/chat/ui/shadow-styles.d.ts +13 -0
  71. package/dist/extensions/chat/ui/utils/mobile-body-scroll-lock.d.ts +14 -0
  72. package/dist/extensions/chat/widget-registry.d.ts +21 -5
  73. package/dist/extensions/chat/widgets/collect-email.d.ts +4 -2
  74. package/dist/extensions/chat/widgets/escalate-to-human.d.ts +2 -1
  75. package/dist/external-scripts-loader.js +1 -1
  76. package/dist/external-scripts-loader.js.map +1 -1
  77. package/dist/feature.d.ts +1 -0
  78. package/dist/lib/merge-vtilt-config.d.ts +9 -0
  79. package/dist/main.js +1 -1
  80. package/dist/main.js.map +1 -1
  81. package/dist/module.chat.d.ts +1788 -0
  82. package/dist/module.chat.js +2 -0
  83. package/dist/module.chat.js.map +1 -0
  84. package/dist/module.d.ts +48 -3
  85. package/dist/module.full.chat.d.ts +1792 -0
  86. package/dist/module.full.chat.js +2 -0
  87. package/dist/module.full.chat.js.map +1 -0
  88. package/dist/module.full.d.ts +1793 -0
  89. package/dist/module.full.js +2 -0
  90. package/dist/module.full.js.map +1 -0
  91. package/dist/module.js +1 -1
  92. package/dist/module.js.map +1 -1
  93. package/dist/module.no-external.d.ts +48 -3
  94. package/dist/module.no-external.js +1 -1
  95. package/dist/module.no-external.js.map +1 -1
  96. package/dist/recorder.js.map +1 -1
  97. package/dist/snippet-stub-methods.d.ts +14 -0
  98. package/dist/utils/globals.d.ts +53 -27
  99. package/dist/utils/index.d.ts +8 -0
  100. package/dist/vtilt.d.ts +6 -1
  101. package/dist/web-vitals.js.map +1 -1
  102. package/package.json +74 -71
  103. package/dist/extensions/chat/chat-styles.d.ts +0 -27
  104. package/dist/extensions/chat/message-content-styles.d.ts +0 -1
  105. package/dist/extensions/chat/message-html.d.ts +0 -6
  106. package/dist/extensions/chat/message-markdown.d.ts +0 -8
  107. package/dist/extensions/ga4-proxy.d.ts +0 -59
  108. package/dist/utils/type-utils.d.ts +0 -4
  109. package/dist/web-vitals.d.ts +0 -81
@@ -1,2 +1,2 @@
1
- !function(){"use strict";function t(t,e,i,r,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void i(t)}a.done?e(h):Promise.resolve(h).then(r,n)}function e(e){return function(){var i=this,r=arguments;return new Promise(function(n,s){var o=e.apply(i,r);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)})}}function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)({}).hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},i.apply(null,arguments)}function r(t,e){if(null==t)return{};var i={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;i[r]=t[r]}return i}var n,s=["inputs"],o=["inputId"],a=["inputs"],h=["inputId"],u=["type"],l=Object.defineProperty,c=(t,e,i)=>((t,e,i)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),d=Object.defineProperty,v=(t,e,i)=>((t,e,i)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),f=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(f||{}),p={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},g={};function b(t){if(g[t])return g[t];var e=globalThis[t],i=e.prototype,r=t in p?p[t]:void 0,n=Boolean(r&&r.every(t=>{var e,r;return Boolean(null==(r=null==(e=Object.getOwnPropertyDescriptor(i,t))?void 0:e.get)?void 0:r.toString().includes("[native code]"))})),s=t in m?m[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof i[t]&&(null==(e=i[t])?void 0:e.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return g[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?g[t]=u:i}catch(t){return i}}var y={};function w(t,e,i){var r,n=t+"."+String(i);if(y[n])return y[n].call(e);var s=b(t),o=null==(r=Object.getOwnPropertyDescriptor(s,i))?void 0:r.get;return o?(y[n]=o,o.call(e)):e[i]}var C={};function S(t,e,i){var r=t+"."+String(i);if(C[r])return C[r].bind(e);var n=b(t)[i];return"function"!=typeof n?e[i]:(C[r]=n,n.bind(e))}var k={ownerDocument:function(t){return w("Node",t,"ownerDocument")},childNodes:function(t){return w("Node",t,"childNodes")},parentNode:function(t){return w("Node",t,"parentNode")},parentElement:function(t){return w("Node",t,"parentElement")},textContent:function(t){return w("Node",t,"textContent")},contains:function(t,e){return S("Node",t,"contains")(e)},getRootNode:function(t){return S("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?w("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?w("Element",t,"shadowRoot"):null},querySelector:function(t,e){return w("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return w("Element",t,"querySelectorAll")(e)},mutationObserver:function(){return b("MutationObserver").constructor},patch:function(t,e,i){try{if(!(e in t))return()=>{};var r=t[e],n=i(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=n,()=>{t[e]=r}}catch(t){return()=>{}}}};function _(t){return t.nodeType===t.ELEMENT_NODE}function I(t){var e=t&&"host"in t&&"mode"in t&&k.host(t)||null;return Boolean(e&&"shadowRoot"in e&&k.shadowRoot(e)===t)}function x(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function A(t){try{var e=t.rules||t.cssRules;if(!e)return null;var i=t.href;!i&&t.ownerNode&&(i=t.ownerNode.baseURI);var r=Array.from(e,t=>M(t,i)).join("");return(n=r).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(t){return null}var n}function M(t,e){if(function(t){return"styleSheet"in t}(t)){var i;try{i=A(t.styleSheet)||function(t){var{cssText:e}=t;if(e.split('"').length<3)return e;var i=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?i.push("layer"):t.layerName&&i.push("layer("+t.layerName+")"),t.supportsText&&i.push("supports("+t.supportsText+")"),t.media.length&&i.push(t.media.mediaText),i.join(" ")+";"}(t)}catch(e){i=t.cssText}return t.styleSheet.href?P(i,t.styleSheet.href):i}var r,n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,n=n.replace(r,"$1\\$2")),e?P(n,e):n}class R{constructor(){v(this,"idNodeMap",new Map),v(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var i=null==(e=this.getMeta(t))?void 0:e.id;return null!=i?i:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){var i=e.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,e)}replace(t,e){var i=this.getNode(t);if(i){var r=this.nodeMetaMap.get(i);r&&this.nodeMetaMap.set(e,r)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function O(t){var{element:e,maskInputOptions:i,tagName:r,type:n,value:s,maskInputFn:o}=t,a=s||"",h=n&&E(n);return(i[r.toLowerCase()]||h&&i[h])&&(a=o?o(a,e):"*".repeat(a.length)),a}function E(t){return t.toLowerCase()}var T="__rrweb_original__";function L(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?E(e):null}function N(t,e){var i,r;try{r=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(i=null==n?void 0:n[1])&&void 0!==i?i:null}var B=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,D=/^www\..*/i,j=/^(data:)([^,]*),(.*)/i;function P(t,e){return(t||"").replace(B,(t,i,r,n,s,o)=>{var a,h=r||s||o,u=i||n||"";if(!h)return t;if(F.test(h)||D.test(h))return"url("+u+h+u+")";if(j.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),c=h.split("/");for(var d of(l.pop(),c))"."!==d&&(".."===d?l.pop():l.push(d));return"url("+u+l.join("/")+u+")"})}function U(t,e){return void 0===e&&(e=!1),e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function z(t,e){return function(t,e,i){void 0===i&&(i=!1);var r=Array.from(e.childNodes),n=[],s=0;if(r.length>1&&t&&"string"==typeof t)for(var o=U(t,i),a=o.length/t.length,h=1;h<r.length;h++)if(r[h].textContent&&"string"==typeof r[h].textContent){for(var u=U(r[h].textContent,i),l=3;l<u.length&&(u[l].match(/[a-zA-Z0-9]/)||-1!==u.indexOf(u.substring(0,l),1));l++);for(;l<u.length;l++){var c=u.substring(0,l),d=o.split(c),v=-1;if(2===d.length)v=d[0].length;else if(d.length>2&&""===d[0]&&""!==r[h-1].textContent)v=o.indexOf(c,1);else if(1===d.length){if(c=c.substring(0,c.length-1),(d=o.split(c)).length<=1)return n.push(t),n;l=101}else l===u.length-1&&(v=o.indexOf(c));if(d.length>=2&&l>100){var f=r[h-1].textContent;if(f&&"string"==typeof f){var p=U(f).length;v=o.indexOf(c,p)}-1===v&&(v=d[0].length)}if(-1!==v){for(var m=Math.floor(v/a);m>0&&m<t.length;){if((s+=1)>50*r.length)return n.push(t),n;var g=U(t.substring(0,m),i);if(g.length===v){n.push(t.substring(0,m)),t=t.substring(m),o=o.substring(v);break}g.length<v?m+=Math.max(1,Math.floor((v-g.length)/a)):m-=Math.max(1,Math.floor((g.length-v)*a))}break}}}return n.push(t),n}(t,e).join("/* rr_split */")}var W,G,Z=1,V=new RegExp("[^a-z0-9-_:]");function Y(){return Z++}var J=/^[^ \t\n\r\u000c]+/,X=/^[, \t\n\r\u000c]+/;var K=new WeakMap;function H(t,e){return e&&""!==e.trim()?Q(t,e):e}function q(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function Q(t,e){var i=K.get(t);if(i||(i=t.createElement("a"),K.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function tt(t,e,i,r){return r?"src"===i||"href"===i&&("use"!==e||"#"!==r[0])||"xlink:href"===i&&"#"!==r[0]||"background"===i&&["table","td","th"].includes(e)?H(t,r):"srcset"===i?function(t,e){if(""===e.trim())return e;var i=0;function r(t){var r,n=t.exec(e.substring(i));return n?(r=n[0],i+=r.length,r):""}for(var n=[];r(X),!(i>=e.length);){var s=r(J);if(","===s.slice(-1))s=H(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=H(t,s);for(var a=!1;;){var h=e.charAt(i);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){i+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,i+=1}}}return n.join(", ")}(t,r):"style"===i?P(r,Q(t)):"object"===e&&"data"===i?H(t,r):r:r}function et(t,e,i){return["video","audio"].includes(t)&&"autoplay"===e}function it(t,e,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!i&&it(k.parentNode(t),e,i);for(var r=t.classList.length;r--;){var n=t.classList[r];if(e.test(n))return!0}return!!i&&it(k.parentNode(t),e,i)}function rt(t,e,i,r){var n;if(_(t)){if(n=t,!k.childNodes(n).length)return!1}else{if(null===k.parentElement(t))return!1;n=k.parentElement(t)}try{if("string"==typeof e){if(r){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(it(n,e,r))return!0;if(i)if(r){if(n.closest(i))return!0}else if(n.matches(i))return!0}catch(t){}return!1}function nt(t,e){var{doc:i,mirror:r,blockClass:n,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:h={},maskTextFn:u,maskInputFn:l,dataURLOptions:c={},inlineImages:d,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:g=!1}=e,b=function(t,e){if(!e.hasNode(t))return;var i=e.getId(t);return 1===i?void 0:i}(i,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:f.Document,childNodes:[],compatMode:t.compatMode}:{type:f.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:f.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:b};case t.ELEMENT_NODE:return function(t,e){for(var i,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:h,dataURLOptions:u={},inlineImages:l,recordCanvas:c,keepIframeSrcFn:d,newlyAddedElement:v=!1,rootId:p}=e,m=function(t,e,i){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var r=t.classList.length;r--;){var n=t.classList[r];if(e.test(n))return!0}if(i)return t.matches(i)}catch(t){}return!1}(t,n,s),g=function(t){if(t instanceof HTMLFormElement)return"form";var e=E(t.tagName);return V.test(e)?"div":e}(t),b={},y=t.attributes.length,w=0;w<y;w++){var C=t.attributes[w];et(g,C.name,C.value)||(b[C.name]=tt(r,g,E(C.name),C.value))}if("link"===g&&o){var S=Array.from(r.styleSheets).find(e=>e.href===t.href),k=null;S&&(k=A(S)),k&&(delete b.rel,delete b.href,b._cssText=k)}if("style"===g&&t.sheet){var _=A(t.sheet);_&&(t.childNodes.length>1&&(_=z(_,t)),b._cssText=_)}if(["input","textarea","select"].includes(g)){var I=t.value,x=t.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&I?b.value=O({element:t,type:L(t),tagName:g,value:I,maskInputOptions:a,maskInputFn:h}):x&&(b.checked=x)}"option"===g&&(t.selected&&!a.select?b.selected=!0:delete b.selected);"dialog"===g&&t.open&&(b.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal");if("canvas"===g&&c)if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var i=0;i<t.width;i+=50)for(var r=0;r<t.height;r+=50){var n=e.getImageData,s=T in n?n[T]:n;if(new Uint32Array(s.call(e,i,r,Math.min(50,t.width-i),Math.min(50,t.height-r)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(b.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){var M=t.toDataURL(u.type,u.quality),R=r.createElement("canvas");R.width=t.width,R.height=t.height,M!==R.toDataURL(u.type,u.quality)&&(b.rr_dataURL=M)}if("img"===g&&l){W||(W=r.createElement("canvas"),G=W.getContext("2d"));var N=t,B=N.currentSrc||N.getAttribute("src")||"<unknown-src>",F=N.crossOrigin,D=()=>{N.removeEventListener("load",D);try{W.width=N.naturalWidth,W.height=N.naturalHeight,G.drawImage(N,0,0),b.rr_dataURL=W.toDataURL(u.type,u.quality)}catch(t){if("anonymous"!==N.crossOrigin)return N.crossOrigin="anonymous",void(N.complete&&0!==N.naturalWidth?D():N.addEventListener("load",D));console.warn("Cannot inline img src="+B+"! Error: "+t)}"anonymous"===N.crossOrigin&&(F?b.crossOrigin=F:N.removeAttribute("crossorigin"))};N.complete&&0!==N.naturalWidth?D():N.addEventListener("load",D)}if(["audio","video"].includes(g)){var j=b;j.rr_mediaState=t.paused?"paused":"played",j.rr_mediaCurrentTime=t.currentTime,j.rr_mediaPlaybackRate=t.playbackRate,j.rr_mediaMuted=t.muted,j.rr_mediaLoop=t.loop,j.rr_mediaVolume=t.volume}v||(t.scrollLeft&&(b.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(b.rr_scrollTop=t.scrollTop));if(m){var{width:P,height:U}=t.getBoundingClientRect();b={class:b.class,rr_width:P+"px",rr_height:U+"px"}}"iframe"!==g||d(b.src)||(t.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(g)&&(i=!0)}catch(t){}return{type:f.Element,tagName:g,attributes:b,childNodes:[],isSVG:q(t)||void 0,needBlock:m,rootId:p,isCustom:i}}(t,{doc:i,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:h,maskInputFn:l,dataURLOptions:c,inlineImages:d,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m,rootId:b});case t.TEXT_NODE:return function(t,e){var{needsMask:i,maskTextFn:r,rootId:n,cssCaptured:s}=e,o=k.parentNode(t),a=o&&o.tagName,h="",u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;l?h="SCRIPT_PLACEHOLDER":s||(h=k.textContent(t),u&&h&&(h=P(h,Q(e.doc))));!u&&!l&&h&&i&&(h=r?r(h,k.parentElement(t)):h.replace(/[\S]/g,"*"));return{type:f.Text,textContent:h||"",rootId:n}}(t,{doc:i,needsMask:o,maskTextFn:u,rootId:b,cssCaptured:g});case t.CDATA_SECTION_NODE:return{type:f.CDATA,textContent:"",rootId:b};case t.COMMENT_NODE:return{type:f.Comment,textContent:k.textContent(t)||"",rootId:b};default:return!1}}function st(t){return null==t?"":t.toLowerCase()}function ot(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:t||{}}function at(t,e){var{doc:i,mirror:r,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:h=!1,inlineStylesheet:u=!0,maskInputOptions:l={},maskTextFn:c,maskInputFn:d,slimDOMOptions:v,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:M=!1,cssCaptured:R=!1}=e,{needsMask:O}=e,{preserveWhiteSpace:E=!0}=e;O||(O=rt(t,o,a,void 0===O));var T,L=nt(t,{doc:i,mirror:r,blockClass:n,blockSelector:s,needsMask:O,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:A,newlyAddedElement:M,cssCaptured:R});if(!L)return console.warn(t,"not serialized"),null;T=r.hasNode(t)?r.getId(t):function(t,e){if(e.comment&&t.type===f.Comment)return!0;if(t.type===f.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===N(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(st(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===st(t.attributes.name)||"icon"===st(t.attributes.rel)||"apple-touch-icon"===st(t.attributes.rel)||"shortcut icon"===st(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&st(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(st(t.attributes.property).match(/^(og|twitter|fb):/)||st(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===st(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===st(t.attributes.name)||"googlebot"===st(t.attributes.name)||"bingbot"===st(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===st(t.attributes.name)||"generator"===st(t.attributes.name)||"framework"===st(t.attributes.name)||"publisher"===st(t.attributes.name)||"progid"===st(t.attributes.name)||st(t.attributes.property).match(/^article:/)||st(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===st(t.attributes.name)||"yandex-verification"===st(t.attributes.name)||"csrf-token"===st(t.attributes.name)||"p:domain_verify"===st(t.attributes.name)||"verify-v1"===st(t.attributes.name)||"verification"===st(t.attributes.name)||"shopify-checkout-api-token"===st(t.attributes.name)))return!0}}return!1}(L,v)||!E&&L.type===f.Text&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Y();var B=Object.assign(L,{id:T});if(r.add(t,B),-2===T)return null;b&&b(t);var F=!h;if(B.type===f.Element){F=F&&!B.needBlock,delete B.needBlock;var D=k.shadowRoot(t);D&&x(D)&&(B.isShadowHost=!0)}if((B.type===f.Document||B.type===f.Element)&&F){v.headWhitespace&&B.type===f.Element&&"head"===B.tagName&&(E=!1);var j={doc:i,mirror:r,blockClass:n,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:h,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:d,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:A,cssCaptured:!1};if(B.type===f.Element&&"textarea"===B.tagName&&void 0!==B.attributes.value);else for(var P of(B.type===f.Element&&void 0!==B.attributes._cssText&&"string"==typeof B.attributes._cssText&&(j.cssCaptured=!0),Array.from(k.childNodes(t)))){var U=at(P,j);U&&B.childNodes.push(U)}var z=null;if(_(t)&&(z=k.shadowRoot(t)))for(var W of Array.from(k.childNodes(z))){var G=at(W,j);G&&(x(z)&&(G.isShadow=!0),B.childNodes.push(G))}}var Z=k.parentNode(t);return Z&&I(Z)&&x(Z)&&(B.isShadow=!0),B.type===f.Element&&"iframe"===B.tagName&&function(t,e,i){var r=t.contentWindow;if(r){var n,s=!1;try{n=r.document.readyState}catch(t){return}if("complete"===n){var o="about:blank";if(r.location.href!==o||t.src===o||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}else{var a=setTimeout(()=>{s||(e(),s=!0)},i);t.addEventListener("load",()=>{clearTimeout(a),s=!0,e()})}}}(t,()=>{var e=t.contentDocument;if(e&&y){var i=at(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:d,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:A});i&&y(t,i)}},w),B.type===f.Element&&"link"===B.tagName&&"string"==typeof B.attributes.rel&&("stylesheet"===B.attributes.rel||"preload"===B.attributes.rel&&"string"==typeof B.attributes.href&&"css"===N(B.attributes.href))&&function(t,e,i){var r,n=!1;try{r=t.sheet}catch(t){return}if(!r){var s=setTimeout(()=>{n||(e(),n=!0)},i);t.addEventListener("load",()=>{clearTimeout(s),n=!0,e()})}}(t,()=>{if(C){var e=at(t,{doc:i,mirror:r,blockClass:n,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:d,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:A});e&&C(t,e)}},S),B}function ht(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ut(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),i}var lt={exports:{}},ct=String,dt=function(){return{isColorSupported:!1,reset:ct,bold:ct,dim:ct,italic:ct,underline:ct,inverse:ct,hidden:ct,strikethrough:ct,black:ct,red:ct,green:ct,yellow:ct,blue:ct,magenta:ct,cyan:ct,white:ct,gray:ct,bgBlack:ct,bgRed:ct,bgGreen:ct,bgYellow:ct,bgBlue:ct,bgMagenta:ct,bgCyan:ct,bgWhite:ct}};lt.exports=dt(),lt.exports.createColors=dt;var vt=lt.exports,ft=ut(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),pt=vt,mt=ft,gt=class t extends Error{constructor(e,i,r,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==i&&void 0!==r&&("number"==typeof i?(this.line=i,this.column=r):(this.line=i.line,this.column=i.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";var e=this.source;null==t&&(t=pt.isColorSupported),mt&&t&&(e=mt(e));var i,r,n=e.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(t){var{bold:h,gray:u,red:l}=pt.createColors(!0);i=t=>h(l(t)),r=t=>u(t)}else i=r=t=>t;return n.slice(s,o).map((t,e)=>{var n=s+1+e,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){var h=r(o.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(o)+t+"\n "+h+i("^")}return" "+r(o)+t}).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}},bt=gt;gt.default=gt;var yt={};yt.isClean=Symbol("isClean"),yt.my=Symbol("my");var wt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var Ct=class{constructor(t){this.builder=t}atrule(t,e){var i="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?i+=t.raws.afterName:r&&(i+=" "),t.nodes)this.block(t,i+r);else{var n=(t.raws.between||"")+(e?";":"");this.builder(i+r+n,t)}}beforeAfter(t,e){var i;i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var r=t.parent,n=0;r&&"root"!==r.type;)n+=1,r=r.parent;if(i.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;o<n;o++)i+=s}return i}block(t,e){var i,r=this.raw(t,"between","beforeOpen");this.builder(e+r+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(i),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var i=this.raw(t,"semicolon"),r=0;r<t.nodes.length;r++){var n=t.nodes[r],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==r||i)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon"),r=t.prop+i+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,i){var r;if(i||(i=e),e&&void 0!==(r=t.raws[e]))return r;var n=t.parent;if("before"===i){if(!n||"root"===n.type&&n.first===t)return"";if(n&&"document"===n.type)return""}if(!n)return wt[i];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[i])return s.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var o,a="raw"+((o=i)[0].toUpperCase()+o.slice(1));return this[a]?r=this[a](s,t):s.walk(t=>{if(void 0!==(r=t.raws[e]))return!1}),void 0===r&&(r=wt[i]),s.rawCache[i]=r,r}rawBeforeClose(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){var i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){var e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(t){var e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return(e=i.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){var e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk(i=>{var r=i.parent;if(r&&r!==t&&r.parent&&r.parent===t&&void 0!==i.raws.before){var n=i.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}}),e);var e}rawSemicolon(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],r=t.raws[e];return r&&r.value===i?r.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},St=Ct;Ct.default=Ct;var kt=St;function _t(t,e){new kt(e).stringify(t)}var It=_t;_t.default=_t;var{isClean:xt,my:At}=yt,Mt=bt,Rt=St,Ot=It;function Et(t,e){var i=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&"proxyCache"!==r){var n=t[r],s=typeof n;"parent"===r&&"object"===s?e&&(i[r]=e):"source"===r?i[r]=n:Array.isArray(n)?i[r]=n.map(t=>Et(t,i)):("object"===s&&null!==n&&(n=Et(n)),i[r]=n)}return i}var Tt=class{constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[xt]=!1,this[At]=!0,t)if("nodes"===e)for(var i of(this.nodes=[],t[e]))"function"==typeof i.clone?this.append(i.clone()):this.append(i);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=Et(this);for(var i in t)e[i]=t[i];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e){if(void 0===e&&(e={}),this.source){var{end:i,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:i.column,line:i.line},e)}return new Mt(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[xt]){this[xt]=!1;for(var t=this;t=t.parent;)t[xt]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t,e){var i=this.source.start;if(t.index)i=this.positionInside(t.index,e);else if(t.word){var r=(e=this.toString()).indexOf(t.word);-1!==r&&(i=this.positionInside(r,e))}return i}positionInside(t,e){for(var i=e||this.toString(),r=this.source.start.column,n=this.source.start.line,s=0;s<t;s++)"\n"===i[s]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){var e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){var r=this.toString(),n=r.indexOf(t.word);-1!==n&&(e=this.positionInside(n,r),i=this.positionInside(n+t.word.length,r))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(i.line<e.line||i.line===e.line&&i.column<=e.column)&&(i={column:e.column+1,line:e.line}),{end:i,start:e}}raw(t,e){return(new Rt).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];for(var s of r)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i={},r=null==e;e=e||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))i[s]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)i[s]=o.toJSON(null,e);else if("source"===s){var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),i[s]={end:o.end,inputId:a,start:o.start}}else i[s]=o}return r&&(i.inputs=[...e.keys()].map(t=>t.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=Ot),t.stringify&&(t=t.stringify);var e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var r={node:this};for(var n in i)r[n]=i[n];return t.warn(e,r)}get proxyOf(){return this}},Lt=Tt;Tt.default=Tt;var Nt=Lt,Bt=class extends Nt{constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=i({},t,{value:String(t.value)})),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},Ft=Bt;Bt.default=Bt;var Dt={nanoid:function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}},{SourceMapConsumer:jt,SourceMapGenerator:Pt}=ft,{existsSync:Ut,readFileSync:$t}=ft,{dirname:zt,join:Wt}=ft;var Gt=class{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,r=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=zt(this.mapFile)),r&&(this.text=r)}}consumer(){return this.consumerCache||(this.consumerCache=new jt(this.text)),this.consumerCache}decodeInline(t){var e;if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var i=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/gm);if(e){var i=t.lastIndexOf(e.pop()),r=t.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,r)))}}loadFile(t){if(this.root=zt(t),Ut(t))return this.mapFile=t,$t(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof jt)return Pt.fromSourceMap(e).toString();if(e instanceof Pt)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var r=this.loadFile(i);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return t&&(n=Wt(zt(t),n)),this.loadFile(n)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Zt=Gt;Gt.default=Gt;var{SourceMapConsumer:Vt,SourceMapGenerator:Yt}=ft,{fileURLToPath:Jt,pathToFileURL:Xt}=ft,{isAbsolute:Kt,resolve:Ht}=ft,{nanoid:qt}=Dt,Qt=ft,te=bt,ee=Zt,ie=Symbol("fromOffsetCache"),re=Boolean(Vt&&Yt),ne=Boolean(Ht&&Kt),se=class{constructor(t,e){if(void 0===e&&(e={}),null==t||"object"==typeof t&&!t.toString)throw new Error("PostCSS received "+t+" instead of CSS string");if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!ne||/^\w+:\/\//.test(e.from)||Kt(e.from)?this.file=e.from:this.file=Ht(e.from)),ne&&re){var i=new ee(this.css,e);if(i.text){this.map=i;var r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+qt(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,r){var n,s,o;if(void 0===r&&(r={}),e&&"object"==typeof e){var a=e,h=i;if("number"==typeof a.offset){var u=this.fromOffset(a.offset);e=u.line,i=u.col}else e=a.line,i=a.column;if("number"==typeof h.offset){var l=this.fromOffset(h.offset);s=l.line,o=l.col}else s=h.line,o=h.column}else if(!i){var c=this.fromOffset(e);e=c.line,i=c.col}var d=this.origin(e,i,s,o);return(n=d?new te(t,void 0===d.endLine?d.line:{column:d.column,line:d.line},void 0===d.endLine?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new te(t,void 0===s?e:{column:i,line:e},void 0===s?i:{column:o,line:s},this.css,this.file,r.plugin)).input={column:i,endColumn:o,endLine:s,line:e,source:this.css},this.file&&(Xt&&(n.input.url=Xt(this.file).toString()),n.input.file=this.file),n}fromOffset(t){var e;if(this[ie])e=this[ie];else{var i=this.css.split("\n");e=new Array(i.length);for(var r=0,n=0,s=i.length;n<s;n++)e[n]=r,r+=i[n].length+1;this[ie]=e}var o=0;if(t>=e[e.length-1])o=e.length-1;else for(var a,h=e.length-2;o<h;)if(t<e[a=o+(h-o>>1)])h=a-1;else{if(!(t>=e[a+1])){o=a;break}o=a+1}return{col:t-e[o]+1,line:o+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ht(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,r){if(!this.map)return!1;var n,s,o=this.map.consumer(),a=o.originalPositionFor({column:e,line:t});if(!a.source)return!1;"number"==typeof i&&(n=o.originalPositionFor({column:r,line:i})),s=Kt(a.source)?Xt(a.source):new URL(a.source,this.map.consumer().sourceRoot||Xt(this.map.mapFile));var h={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:s.toString()};if("file:"===s.protocol){if(!Jt)throw new Error("file: protocol is not available in this PostCSS build");h.file=Jt(s)}var u=o.sourceContentFor(a.source);return u&&(h.source=u),h}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=i({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}},oe=se;se.default=se,Qt&&Qt.registerInput&&Qt.registerInput(se);var{SourceMapConsumer:ae,SourceMapGenerator:he}=ft,{dirname:ue,relative:le,resolve:ce,sep:de}=ft,{pathToFileURL:ve}=ft,fe=oe,pe=Boolean(ae&&he),me=Boolean(ue&&ce&&le&&de),ge=class{constructor(t,e,i,r){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var t of this.previous()){var e=this.toUrl(this.path(t.file)),i=t.root||ue(t.file),r=void 0;!1===this.mapOpts.sourcesContent?(r=new ae(t.text)).sourcesContent&&(r.sourcesContent=null):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),me&&pe&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,e=>{t+=e}),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=he.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new he({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 he({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,i=1,r=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,h)=>{if(this.css+=o,a&&"end"!==h&&(s.generated.line=i,s.generated.column=r-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(t=o.match(/\n/g))?(i+=t.length,e=o.lastIndexOf("\n"),r=o.length-e):r+=o.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=i,s.generated.column=r-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=i,s.generated.column=r-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var i=this.opts.to?ue(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=ue(ce(i,this.mapOpts.annotation)));var r=le(i,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{var t=new fe(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk(e=>{if(e.source){var i=e.source.input.from;if(i&&!t[i]){t[i]=!0;var r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(ve){var i=ve(t).toString();return this.memoizedFileURLs.set(t,i),i}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===de&&(t=t.replace(/\\/g,"/"));var i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}},be=Lt,ye=class extends be{constructor(t){super(t),this.type="comment"}},we=ye;ye.default=ye;var Ce,Se,ke,_e,{isClean:Ie,my:xe}=yt,Ae=Ft,Me=we,Re=Lt;function Oe(t){return t.map(t=>(t.nodes&&(t.nodes=Oe(t.nodes)),delete t.source,t))}function Ee(t){if(t[Ie]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)Ee(e)}var Te=class t extends Re{append(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var r of e){var n=this.normalize(r,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,i,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(e=this.indexes[r],!1!==(i=t(this.proxyOf.nodes[e],e)));)this.indexes[r]+=1;return delete this.indexes[r],i}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return t[e](...r.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t))}:"every"===e||"some"===e?i=>t[e](function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return i(t.toProxy(),...r)}):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,r=this.index(t),n=this.normalize(e,this.proxyOf.nodes[r]).reverse();for(var s of(r=this.index(t),n))this.proxyOf.nodes.splice(r+1,0,s);for(var o in this.indexes)r<(i=this.indexes[o])&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(t,e){var i,r=this.index(t),n=0===r&&"prepend",s=this.normalize(e,this.proxyOf.nodes[r],n).reverse();for(var o of(r=this.index(t),s))this.proxyOf.nodes.splice(r,0,o);for(var a in this.indexes)r<=(i=this.indexes[a])&&(this.indexes[a]=i+s.length);return this.markDirty(),this}normalize(e,i){if("string"==typeof e)e=Oe(Ce(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var r of e=e.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if("root"===e.type&&"document"!==this.type)for(var n of e=e.nodes.slice(0))n.parent&&n.parent.removeChild(n,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Ae(e)]}else if(e.selector)e=[new Se(e)];else if(e.name)e=[new ke(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Me(e)]}var s=e.map(e=>(e[xe]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Ie]&&Ee(e),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e));return s}prepend(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var r of e=e.reverse()){var n=this.normalize(r,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)(e=this.indexes[i])>=t&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(r=>{e.props&&!e.props.includes(r.prop)||e.fast&&!r.value.includes(e.fast)||(r.value=r.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,i)=>{var r;try{r=t(e,i)}catch(t){throw e.addToError(t)}return!1!==r&&e.walk&&(r=e.walk(t)),r})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("atrule"===i.type&&t.test(i.name))return e(i,r)}):this.walk((i,r)=>{if("atrule"===i.type&&i.name===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("decl"===i.type&&t.test(i.prop))return e(i,r)}):this.walk((i,r)=>{if("decl"===i.type&&i.prop===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("rule"===i.type&&t.test(i.selector))return e(i,r)}):this.walk((i,r)=>{if("rule"===i.type&&i.selector===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Te.registerParse=t=>{Ce=t},Te.registerRule=t=>{Se=t},Te.registerAtRule=t=>{ke=t},Te.registerRoot=t=>{_e=t};var Le=Te;Te.default=Te,Te.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,ke.prototype):"rule"===t.type?Object.setPrototypeOf(t,Se.prototype):"decl"===t.type?Object.setPrototypeOf(t,Ae.prototype):"comment"===t.type?Object.setPrototypeOf(t,Me.prototype):"root"===t.type&&Object.setPrototypeOf(t,_e.prototype),t[xe]=!0,t.nodes&&t.nodes.forEach(t=>{Te.rebuild(t)})};var Ne,Be,Fe=Le,De=class extends Fe{constructor(t){super(i({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t){return void 0===t&&(t={}),new Ne(new Be,this,t).stringify()}};De.registerLazyResult=t=>{Ne=t},De.registerProcessor=t=>{Be=t};var je=De;De.default=De;var Pe={},Ue=function(t){Pe[t]||(Pe[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))},$e=class{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var i=e.node.rangeBy(e);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(var r in e)this[r]=e[r]}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}},ze=$e;$e.default=$e;var We=ze,Ge=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e){void 0===e&&(e={}),e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var i=new We(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},Ze=Ge;Ge.default=Ge;var Ve="'".charCodeAt(0),Ye='"'.charCodeAt(0),Je="\\".charCodeAt(0),Xe="/".charCodeAt(0),Ke="\n".charCodeAt(0),He=" ".charCodeAt(0),qe="\f".charCodeAt(0),Qe="\t".charCodeAt(0),ti="\r".charCodeAt(0),ei="[".charCodeAt(0),ii="]".charCodeAt(0),ri="(".charCodeAt(0),ni=")".charCodeAt(0),si="{".charCodeAt(0),oi="}".charCodeAt(0),ai=";".charCodeAt(0),hi="*".charCodeAt(0),ui=":".charCodeAt(0),li="@".charCodeAt(0),ci=/[\t\n\f\r "#'()/;[\\\]{}]/g,di=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vi=/.[\r\n"'(/\\]/,fi=/[\da-f]/i,pi=Le,mi=class extends pi{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}},gi=mi;mi.default=mi,pi.registerAtRule(mi);var bi,yi,wi=Le,Ci=class extends wi{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){var r=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of r)n.raws.before=e.raws.before;return r}removeChild(t,e){var i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t){return void 0===t&&(t={}),new bi(new yi,this,t).stringify()}};Ci.registerLazyResult=t=>{bi=t},Ci.registerProcessor=t=>{yi=t};var Si=Ci;Ci.default=Ci,wi.registerRoot(Ci);var ki={comma:t=>ki.split(t,[","],!0),space:t=>ki.split(t,[" ","\n","\t"]),split(t,e,i){var r=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&r.push(n.trim()),n="",s=!1):n+=l;return(i||""!==n)&&r.push(n.trim()),r}},_i=ki;ki.default=ki;var Ii=Le,xi=_i,Ai=class extends Ii{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return xi.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}},Mi=Ai;Ai.default=Ai,Ii.registerRule(Ai);var Ri=Ft,Oi=function(t,e){void 0===e&&(e={});var i,r,n,s,o,a,h,u,l,c,d=t.css.valueOf(),v=e.ignoreErrors,f=d.length,p=0,m=[],g=[];function b(e){throw t.error("Unclosed "+e,p)}return{back:function(t){g.push(t)},endOfFile:function(){return 0===g.length&&p>=f},nextToken:function(t){if(g.length)return g.pop();if(!(p>=f)){var e=!!t&&t.ignoreUnclosed;switch(i=d.charCodeAt(p)){case Ke:case He:case Qe:case ti:case qe:r=p;do{r+=1,i=d.charCodeAt(r)}while(i===He||i===Ke||i===Qe||i===ti||i===qe);c=["space",d.slice(p,r)],p=r-1;break;case ei:case ii:case si:case oi:case ui:case ai:case ni:var y=String.fromCharCode(i);c=[y,y,p];break;case ri:if(u=m.length?m.pop()[1]:"",l=d.charCodeAt(p+1),"url"===u&&l!==Ve&&l!==Ye&&l!==He&&l!==Ke&&l!==Qe&&l!==qe&&l!==ti){r=p;do{if(a=!1,-1===(r=d.indexOf(")",r+1))){if(v||e){r=p;break}b("bracket")}for(h=r;d.charCodeAt(h-1)===Je;)h-=1,a=!a}while(a);c=["brackets",d.slice(p,r+1),p,r],p=r}else r=d.indexOf(")",p+1),s=d.slice(p,r+1),-1===r||vi.test(s)?c=["(","(",p]:(c=["brackets",s,p,r],p=r);break;case Ve:case Ye:n=i===Ve?"'":'"',r=p;do{if(a=!1,-1===(r=d.indexOf(n,r+1))){if(v||e){r=p+1;break}b("string")}for(h=r;d.charCodeAt(h-1)===Je;)h-=1,a=!a}while(a);c=["string",d.slice(p,r+1),p,r],p=r;break;case li:ci.lastIndex=p+1,ci.test(d),r=0===ci.lastIndex?d.length-1:ci.lastIndex-2,c=["at-word",d.slice(p,r+1),p,r],p=r;break;case Je:for(r=p,o=!0;d.charCodeAt(r+1)===Je;)r+=1,o=!o;if(i=d.charCodeAt(r+1),o&&i!==Xe&&i!==He&&i!==Ke&&i!==Qe&&i!==ti&&i!==qe&&(r+=1,fi.test(d.charAt(r)))){for(;fi.test(d.charAt(r+1));)r+=1;d.charCodeAt(r+1)===He&&(r+=1)}c=["word",d.slice(p,r+1),p,r],p=r;break;default:i===Xe&&d.charCodeAt(p+1)===hi?(0===(r=d.indexOf("*/",p+2)+1)&&(v||e?r=d.length:b("comment")),c=["comment",d.slice(p,r+1),p,r],p=r):(di.lastIndex=p+1,di.test(d),r=0===di.lastIndex?d.length-1:di.lastIndex-2,c=["word",d.slice(p,r+1),p,r],m.push(c),p=r)}return p++,c}},position:function(){return p}}},Ei=we,Ti=gi,Li=Si,Ni=Mi,Bi={empty:!0,space:!0};var Fi=class{constructor(t){this.input=t,this.root=new Li,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i,r,n=new Ti;n.name=t[1].slice(1),""===n.name&&this.unnamedAtrule(n,t),this.init(n,t[2]);for(var s=!1,o=!1,a=[],h=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?h.push("("===e?")":"]"):"{"===e&&h.length>0?h.push("}"):e===h[h.length-1]&&h.pop(),0===h.length){if(";"===e){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(a.length>0){for(i=a[r=a.length-1];i&&"space"===i[0];)i=a[--r];i&&(n.source.end=this.getPosition(i[3]||i[2]),n.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),s&&(t=a[a.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var i,r=0,n=e-1;n>=0&&("space"===(i=t[n])[0]||2!==(r+=1));n--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){var e,i,r,n=0;for(var[s,o]of t.entries()){if("("===(i=(e=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(r){if("word"===r[0]&&"progid"===r[1])continue;return s}this.doubleColon(e)}r=e}return!1}comment(t){var e=new Ei;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))e.text="",e.raws.left=i,e.raws.right="";else{var r=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=Oi(this.input)}decl(t,e){var i=new Ri;this.init(i,t[0][2]);var r,n=t[t.length-1];for(";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var i=t[e],r=i[3]||i[2];if(r)return r}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(r=t.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var o,a=[];t.length&&("space"===(o=t[0][0])||"comment"===o);)a.push(t.shift());this.precheckMissedSemicolon(t);for(var h=t.length-1;h>=0;h--){if("!important"===(r=t[h])[1].toLowerCase()){i.important=!0;var u=this.stringFrom(t,h);" !important"!==(u=this.spacesFromEnd(t)+u)&&(i.raws.important=u);break}if("important"===r[1].toLowerCase()){for(var l=t.slice(0),c="",d=h;d>0;d--){var v=l[d][0];if(0===c.trim().indexOf("!")&&"space"!==v)break;c=l.pop()[1]+c}0===c.trim().indexOf("!")&&(i.important=!0,i.raws.important=c,t=l)}if("space"!==r[0]&&"comment"!==r[0])break}var f=t.some(t=>"space"!==t[0]&&"comment"!==t[0]);f&&(i.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(i,"value",a.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new Ni;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,i=null,r=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(i=h[0],a.push(h),"("===i||"["===i)n||(n=h),s.push("("===i?")":"]");else if(o&&r&&"{"===i)n||(n=h),s.push("}");else if(0===s.length){if(";"===i){if(r)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(r=!0)}else i===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&r){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,r){for(var n,s,o,a,h=i.length,u="",l=!0,c=0;c<h;c+=1)"space"!==(s=(n=i[c])[0])||c!==h-1||r?"comment"===s?(a=i[c-1]?i[c-1][0]:"empty",o=i[c+1]?i[c+1][0]:"empty",Bi[a]||Bi[o]||","===u.slice(-1)?l=!1:u+=n[1]):u+=n[1]:l=!1;if(!l){var d=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:d,value:u}}t[e]=u}rule(t){t.pop();var e=new Ni;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,i="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){for(var e,i="";t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var i="",r=e;r<t.length;r++)i+=t[r][1];return t.splice(e,t.length-e),i}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},Di=Le,ji=Fi,Pi=oe;function Ui(t,e){var i=new Pi(t,e),r=new ji(i);try{r.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}var $i=Ui;Ui.default=Ui,Di.registerParse(Ui);var{isClean:zi,my:Wi}=yt,Gi=ge,Zi=It,Vi=Le,Yi=je,Ji=Ue,Xi=Ze,Ki=$i,Hi=Si,qi={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Qi={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},tr={Once:!0,postcssPlugin:!0,prepare:!0};function er(t){return"object"==typeof t&&"function"==typeof t.then}function ir(t){var e=!1,i=qi[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function rr(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:ir(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function nr(t){return t[zi]=!1,t.nodes&&t.nodes.forEach(t=>nr(t)),t}var sr={},or=class t{constructor(e,r,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof t||r instanceof Xi)s=nr(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var o=Ki;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{s=o(r,n)}catch(t){this.processed=!0,this.error=t}s&&!s[Wi]&&Vi.rebuild(s)}else s=nr(r);this.result=new Xi(e,s,n),this.helpers=i({},sr,{postcss:sr,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?i({},t,t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion&&"production"!==process.env.NODE_ENV){var r=i.postcssPlugin,n=i.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+r+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(var e of this.plugins)if("object"==typeof e)for(var i in e){if(!Qi[i]&&/^[A-Z]/.test(i))throw new Error("Unknown event "+i+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!tr[i])if("object"==typeof e[i])for(var r in e[i])t(e,"*"===r?i:i+"-"+r.toLowerCase(),e[i][r]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e(function*(){t.plugin=0;for(var e=0;e<t.plugins.length;e++){var i=t.plugins[e],r=t.runOnRoot(i);if(er(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var n=t.result.root;!n[zi];){n[zi]=!0;for(var s=[rr(n)];s.length>0;){var o=t.visitTick(s);if(er(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=u;try{if("document"===n.type){var i=n.nodes.map(i=>e(i,t.helpers));yield Promise.all(i)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[u,l]of t.listeners.OnceExit)yield*h(l)}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return er(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=Zi;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var i=new Gi(e,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(er(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[zi];)e[zi]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Ji("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,r]of t){this.result.lastPlugin=i;var n=void 0;try{n=r(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(er(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:r}=e;if("root"===i.type||"document"===i.type||i.parent){if(r.length>0&&e.visitorIndex<r.length){var[n,s]=r[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===r.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[zi])return o[zi]=!0,void t.push(rr(o));e.iterator=0,delete i.indexes[a]}for(var h=e.events;e.eventIndex<h.length;){var u=h[e.eventIndex];if(e.eventIndex+=1,0===u)return void(i.nodes&&i.nodes.length&&(i[zi]=!0,e.iterator=i.getIterator()));if(this.listeners[u])return void(e.visitors=this.listeners[u])}t.pop()}else t.pop()}walkSync(t){t[zi]=!0;var e=ir(t);for(var i of e)if(0===i)t.nodes&&t.each(t=>{t[zi]||this.walkSync(t)});else{var r=this.listeners[i];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};or.registerPostcss=t=>{sr=t};var ar=or;or.default=or,Hi.registerLazyResult(or),Yi.registerLazyResult(or);var hr=ge,ur=It,lr=Ue,cr=$i,dr=Ze,vr=class{constructor(t,e,i){var r;e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=i,this._map=void 0;var n=ur;this.result=new dr(this._processor,r,this._opts),this.result.css=e;var s=this;Object.defineProperty(this.result,"root",{get:()=>s.root});var o=new hr(n,r,this._opts,e);if(o.isMap()){var[a,h]=o.generate();a&&(this.result.css=a),h&&(this.result.map=h)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||lr("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;var t,e=cr;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}},fr=vr;vr.default=vr;var pr=fr,mr=ar,gr=je,br=Si,yr=class{constructor(t){void 0===t&&(t=[]),this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else{if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,e){return void 0===e&&(e={}),this.plugins.length||e.parser||e.stringifier||e.syntax?new mr(this,t,e):new pr(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},wr=yr;yr.default=yr,br.registerProcessor(yr),gr.registerProcessor(yr);var Cr=Ft,Sr=Zt,kr=we,_r=gi,Ir=oe,xr=Si,Ar=Mi;function Mr(t,e){if(Array.isArray(t))return t.map(t=>Mr(t));var{inputs:n}=t,a=r(t,s);if(n)for(var h of(e=[],n)){var u=i({},h,{__proto__:Ir.prototype});u.map&&(u.map=i({},u.map,{__proto__:Sr.prototype})),e.push(u)}if(a.nodes&&(a.nodes=t.nodes.map(t=>Mr(t,e))),a.source){var l=a.source,{inputId:c}=l,d=r(l,o);a.source=d,null!=c&&(a.source.input=e[c])}if("root"===a.type)return new xr(a);if("decl"===a.type)return new Cr(a);if("rule"===a.type)return new Ar(a);if("comment"===a.type)return new kr(a);if("atrule"===a.type)return new _r(a);throw new Error("Unknown node type: "+t.type)}var Rr=Mr;Mr.default=Mr;var Or=bt,Er=Ft,Tr=ar,Lr=Le,Nr=wr,Br=It,Fr=Rr,Dr=je,jr=ze,Pr=we,Ur=gi,$r=Ze,zr=oe,Wr=$i,Gr=_i,Zr=Mi,Vr=Si,Yr=Lt;function Jr(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Nr(e)}Jr.plugin=function(t,e){var i,r=!1;function n(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var i=e(...arguments);return i.postcssPlugin=t,i.postcssVersion=(new Nr).version,i}return Object.defineProperty(n,"postcss",{get:()=>(i||(i=n()),i)}),n.process=function(t,e,i){return Jr([n(i)]).process(t,e)},n},Jr.stringify=Br,Jr.parse=Wr,Jr.fromJSON=Fr,Jr.list=Gr,Jr.comment=t=>new Pr(t),Jr.atRule=t=>new Ur(t),Jr.decl=t=>new Er(t),Jr.rule=t=>new Zr(t),Jr.root=t=>new Vr(t),Jr.document=t=>new Dr(t),Jr.CssSyntaxError=Or,Jr.Declaration=Er,Jr.Container=Lr,Jr.Processor=Nr,Jr.Document=Dr,Jr.Comment=Pr,Jr.Warning=jr,Jr.AtRule=Ur,Jr.Result=$r,Jr.Input=zr,Jr.Rule=Zr,Jr.Root=Vr,Jr.Node=Yr,Tr.registerPostcss(Jr);var Xr=Jr;Jr.default=Jr;var Kr=ht(Xr);Kr.stringify,Kr.fromJSON,Kr.plugin,Kr.parse,Kr.list,Kr.document,Kr.comment,Kr.atRule,Kr.rule,Kr.decl,Kr.root,Kr.CssSyntaxError,Kr.Declaration,Kr.Container,Kr.Processor,Kr.Document,Kr.Comment,Kr.Warning,Kr.AtRule,Kr.Result,Kr.Input,Kr.Rule,Kr.Root,Kr.Node;var Hr=Object.defineProperty,qr=(t,e,i)=>((t,e,i)=>e in t?Hr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i);function Qr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tn(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),i}var en={exports:{}},rn=String,nn=function(){return{isColorSupported:!1,reset:rn,bold:rn,dim:rn,italic:rn,underline:rn,inverse:rn,hidden:rn,strikethrough:rn,black:rn,red:rn,green:rn,yellow:rn,blue:rn,magenta:rn,cyan:rn,white:rn,gray:rn,bgBlack:rn,bgRed:rn,bgGreen:rn,bgYellow:rn,bgBlue:rn,bgMagenta:rn,bgCyan:rn,bgWhite:rn}};en.exports=nn(),en.exports.createColors=nn;var sn=en.exports,on=tn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),an=sn,hn=on,un=class t extends Error{constructor(e,i,r,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==i&&void 0!==r&&("number"==typeof i?(this.line=i,this.column=r):(this.line=i.line,this.column=i.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";var e=this.source;null==t&&(t=an.isColorSupported),hn&&t&&(e=hn(e));var i,r,n=e.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(t){var{bold:h,gray:u,red:l}=an.createColors(!0);i=t=>h(l(t)),r=t=>u(t)}else i=r=t=>t;return n.slice(s,o).map((t,e)=>{var n=s+1+e,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){var h=r(o.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(o)+t+"\n "+h+i("^")}return" "+r(o)+t}).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}},ln=un;un.default=un;var cn={};cn.isClean=Symbol("isClean"),cn.my=Symbol("my");var dn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var vn=class{constructor(t){this.builder=t}atrule(t,e){var i="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?i+=t.raws.afterName:r&&(i+=" "),t.nodes)this.block(t,i+r);else{var n=(t.raws.between||"")+(e?";":"");this.builder(i+r+n,t)}}beforeAfter(t,e){var i;i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var r=t.parent,n=0;r&&"root"!==r.type;)n+=1,r=r.parent;if(i.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;o<n;o++)i+=s}return i}block(t,e){var i,r=this.raw(t,"between","beforeOpen");this.builder(e+r+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(i),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var i=this.raw(t,"semicolon"),r=0;r<t.nodes.length;r++){var n=t.nodes[r],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==r||i)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon"),r=t.prop+i+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,i){var r;if(i||(i=e),e&&void 0!==(r=t.raws[e]))return r;var n=t.parent;if("before"===i){if(!n||"root"===n.type&&n.first===t)return"";if(n&&"document"===n.type)return""}if(!n)return dn[i];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[i])return s.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var o,a="raw"+((o=i)[0].toUpperCase()+o.slice(1));return this[a]?r=this[a](s,t):s.walk(t=>{if(void 0!==(r=t.raws[e]))return!1}),void 0===r&&(r=dn[i]),s.rawCache[i]=r,r}rawBeforeClose(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){var i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){var e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(t){var e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return(e=i.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){var e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk(i=>{var r=i.parent;if(r&&r!==t&&r.parent&&r.parent===t&&void 0!==i.raws.before){var n=i.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}}),e);var e}rawSemicolon(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],r=t.raws[e];return r&&r.value===i?r.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},fn=vn;vn.default=vn;var pn=fn;function mn(t,e){new pn(e).stringify(t)}var gn=mn;mn.default=mn;var{isClean:bn,my:yn}=cn,wn=ln,Cn=fn,Sn=gn;function kn(t,e){var i=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&"proxyCache"!==r){var n=t[r],s=typeof n;"parent"===r&&"object"===s?e&&(i[r]=e):"source"===r?i[r]=n:Array.isArray(n)?i[r]=n.map(t=>kn(t,i)):("object"===s&&null!==n&&(n=kn(n)),i[r]=n)}return i}var _n=class{constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[bn]=!1,this[yn]=!0,t)if("nodes"===e)for(var i of(this.nodes=[],t[e]))"function"==typeof i.clone?this.append(i.clone()):this.append(i);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=kn(this);for(var i in t)e[i]=t[i];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e){if(void 0===e&&(e={}),this.source){var{end:i,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:i.column,line:i.line},e)}return new wn(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[bn]){this[bn]=!1;for(var t=this;t=t.parent;)t[bn]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t,e){var i=this.source.start;if(t.index)i=this.positionInside(t.index,e);else if(t.word){var r=(e=this.toString()).indexOf(t.word);-1!==r&&(i=this.positionInside(r,e))}return i}positionInside(t,e){for(var i=e||this.toString(),r=this.source.start.column,n=this.source.start.line,s=0;s<t;s++)"\n"===i[s]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){var e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){var r=this.toString(),n=r.indexOf(t.word);-1!==n&&(e=this.positionInside(n,r),i=this.positionInside(n+t.word.length,r))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(i.line<e.line||i.line===e.line&&i.column<=e.column)&&(i={column:e.column+1,line:e.line}),{end:i,start:e}}raw(t,e){return(new Cn).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];for(var s of r)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i={},r=null==e;e=e||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))i[s]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)i[s]=o.toJSON(null,e);else if("source"===s){var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),i[s]={end:o.end,inputId:a,start:o.start}}else i[s]=o}return r&&(i.inputs=[...e.keys()].map(t=>t.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=Sn),t.stringify&&(t=t.stringify);var e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var r={node:this};for(var n in i)r[n]=i[n];return t.warn(e,r)}get proxyOf(){return this}},In=_n;_n.default=_n;var xn=In,An=class extends xn{constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=i({},t,{value:String(t.value)})),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},Mn=An;An.default=An;var Rn={nanoid:function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}},{SourceMapConsumer:On,SourceMapGenerator:En}=on,{existsSync:Tn,readFileSync:Ln}=on,{dirname:Nn,join:Bn}=on;var Fn=class{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,r=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Nn(this.mapFile)),r&&(this.text=r)}}consumer(){return this.consumerCache||(this.consumerCache=new On(this.text)),this.consumerCache}decodeInline(t){var e;if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var i=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/gm);if(e){var i=t.lastIndexOf(e.pop()),r=t.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,r)))}}loadFile(t){if(this.root=Nn(t),Tn(t))return this.mapFile=t,Ln(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof On)return En.fromSourceMap(e).toString();if(e instanceof En)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var r=this.loadFile(i);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return t&&(n=Bn(Nn(t),n)),this.loadFile(n)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Dn=Fn;Fn.default=Fn;var{SourceMapConsumer:jn,SourceMapGenerator:Pn}=on,{fileURLToPath:Un,pathToFileURL:$n}=on,{isAbsolute:zn,resolve:Wn}=on,{nanoid:Gn}=Rn,Zn=on,Vn=ln,Yn=Dn,Jn=Symbol("fromOffsetCache"),Xn=Boolean(jn&&Pn),Kn=Boolean(Wn&&zn),Hn=class{constructor(t,e){if(void 0===e&&(e={}),null==t||"object"==typeof t&&!t.toString)throw new Error("PostCSS received "+t+" instead of CSS string");if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!Kn||/^\w+:\/\//.test(e.from)||zn(e.from)?this.file=e.from:this.file=Wn(e.from)),Kn&&Xn){var i=new Yn(this.css,e);if(i.text){this.map=i;var r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+Gn(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,r){var n,s,o;if(void 0===r&&(r={}),e&&"object"==typeof e){var a=e,h=i;if("number"==typeof a.offset){var u=this.fromOffset(a.offset);e=u.line,i=u.col}else e=a.line,i=a.column;if("number"==typeof h.offset){var l=this.fromOffset(h.offset);s=l.line,o=l.col}else s=h.line,o=h.column}else if(!i){var c=this.fromOffset(e);e=c.line,i=c.col}var d=this.origin(e,i,s,o);return(n=d?new Vn(t,void 0===d.endLine?d.line:{column:d.column,line:d.line},void 0===d.endLine?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new Vn(t,void 0===s?e:{column:i,line:e},void 0===s?i:{column:o,line:s},this.css,this.file,r.plugin)).input={column:i,endColumn:o,endLine:s,line:e,source:this.css},this.file&&($n&&(n.input.url=$n(this.file).toString()),n.input.file=this.file),n}fromOffset(t){var e;if(this[Jn])e=this[Jn];else{var i=this.css.split("\n");e=new Array(i.length);for(var r=0,n=0,s=i.length;n<s;n++)e[n]=r,r+=i[n].length+1;this[Jn]=e}var o=0;if(t>=e[e.length-1])o=e.length-1;else for(var a,h=e.length-2;o<h;)if(t<e[a=o+(h-o>>1)])h=a-1;else{if(!(t>=e[a+1])){o=a;break}o=a+1}return{col:t-e[o]+1,line:o+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Wn(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,r){if(!this.map)return!1;var n,s,o=this.map.consumer(),a=o.originalPositionFor({column:e,line:t});if(!a.source)return!1;"number"==typeof i&&(n=o.originalPositionFor({column:r,line:i})),s=zn(a.source)?$n(a.source):new URL(a.source,this.map.consumer().sourceRoot||$n(this.map.mapFile));var h={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:s.toString()};if("file:"===s.protocol){if(!Un)throw new Error("file: protocol is not available in this PostCSS build");h.file=Un(s)}var u=o.sourceContentFor(a.source);return u&&(h.source=u),h}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=i({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}},qn=Hn;Hn.default=Hn,Zn&&Zn.registerInput&&Zn.registerInput(Hn);var{SourceMapConsumer:Qn,SourceMapGenerator:ts}=on,{dirname:es,relative:is,resolve:rs,sep:ns}=on,{pathToFileURL:ss}=on,os=qn,as=Boolean(Qn&&ts),hs=Boolean(es&&rs&&is&&ns),us=class{constructor(t,e,i,r){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var t of this.previous()){var e=this.toUrl(this.path(t.file)),i=t.root||es(t.file),r=void 0;!1===this.mapOpts.sourcesContent?(r=new Qn(t.text)).sourcesContent&&(r.sourcesContent=null):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),hs&&as&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,e=>{t+=e}),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=ts.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new ts({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 ts({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,i=1,r=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,h)=>{if(this.css+=o,a&&"end"!==h&&(s.generated.line=i,s.generated.column=r-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(t=o.match(/\n/g))?(i+=t.length,e=o.lastIndexOf("\n"),r=o.length-e):r+=o.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=i,s.generated.column=r-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=i,s.generated.column=r-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var i=this.opts.to?es(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=es(rs(i,this.mapOpts.annotation)));var r=is(i,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{var t=new os(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk(e=>{if(e.source){var i=e.source.input.from;if(i&&!t[i]){t[i]=!0;var r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(ss){var i=ss(t).toString();return this.memoizedFileURLs.set(t,i),i}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===ns&&(t=t.replace(/\\/g,"/"));var i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}},ls=In,cs=class extends ls{constructor(t){super(t),this.type="comment"}},ds=cs;cs.default=cs;var vs,fs,ps,ms,{isClean:gs,my:bs}=cn,ys=Mn,ws=ds,Cs=In;function Ss(t){return t.map(t=>(t.nodes&&(t.nodes=Ss(t.nodes)),delete t.source,t))}function ks(t){if(t[gs]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)ks(e)}var _s=class t extends Cs{append(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var r of e){var n=this.normalize(r,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,i,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(e=this.indexes[r],!1!==(i=t(this.proxyOf.nodes[e],e)));)this.indexes[r]+=1;return delete this.indexes[r],i}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return t[e](...r.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t))}:"every"===e||"some"===e?i=>t[e](function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return i(t.toProxy(),...r)}):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,r=this.index(t),n=this.normalize(e,this.proxyOf.nodes[r]).reverse();for(var s of(r=this.index(t),n))this.proxyOf.nodes.splice(r+1,0,s);for(var o in this.indexes)r<(i=this.indexes[o])&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(t,e){var i,r=this.index(t),n=0===r&&"prepend",s=this.normalize(e,this.proxyOf.nodes[r],n).reverse();for(var o of(r=this.index(t),s))this.proxyOf.nodes.splice(r,0,o);for(var a in this.indexes)r<=(i=this.indexes[a])&&(this.indexes[a]=i+s.length);return this.markDirty(),this}normalize(e,i){if("string"==typeof e)e=Ss(vs(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var r of e=e.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if("root"===e.type&&"document"!==this.type)for(var n of e=e.nodes.slice(0))n.parent&&n.parent.removeChild(n,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new ys(e)]}else if(e.selector)e=[new fs(e)];else if(e.name)e=[new ps(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new ws(e)]}var s=e.map(e=>(e[bs]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[gs]&&ks(e),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e));return s}prepend(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var r of e=e.reverse()){var n=this.normalize(r,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)(e=this.indexes[i])>=t&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(r=>{e.props&&!e.props.includes(r.prop)||e.fast&&!r.value.includes(e.fast)||(r.value=r.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,i)=>{var r;try{r=t(e,i)}catch(t){throw e.addToError(t)}return!1!==r&&e.walk&&(r=e.walk(t)),r})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("atrule"===i.type&&t.test(i.name))return e(i,r)}):this.walk((i,r)=>{if("atrule"===i.type&&i.name===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("decl"===i.type&&t.test(i.prop))return e(i,r)}):this.walk((i,r)=>{if("decl"===i.type&&i.prop===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("rule"===i.type&&t.test(i.selector))return e(i,r)}):this.walk((i,r)=>{if("rule"===i.type&&i.selector===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};_s.registerParse=t=>{vs=t},_s.registerRule=t=>{fs=t},_s.registerAtRule=t=>{ps=t},_s.registerRoot=t=>{ms=t};var Is=_s;_s.default=_s,_s.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,ps.prototype):"rule"===t.type?Object.setPrototypeOf(t,fs.prototype):"decl"===t.type?Object.setPrototypeOf(t,ys.prototype):"comment"===t.type?Object.setPrototypeOf(t,ws.prototype):"root"===t.type&&Object.setPrototypeOf(t,ms.prototype),t[bs]=!0,t.nodes&&t.nodes.forEach(t=>{_s.rebuild(t)})};var xs,As,Ms=Is,Rs=class extends Ms{constructor(t){super(i({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t){return void 0===t&&(t={}),new xs(new As,this,t).stringify()}};Rs.registerLazyResult=t=>{xs=t},Rs.registerProcessor=t=>{As=t};var Os=Rs;Rs.default=Rs;var Es={},Ts=function(t){Es[t]||(Es[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))},Ls=class{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var i=e.node.rangeBy(e);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(var r in e)this[r]=e[r]}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}},Ns=Ls;Ls.default=Ls;var Bs=Ns,Fs=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e){void 0===e&&(e={}),e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var i=new Bs(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},Ds=Fs;Fs.default=Fs;var js="'".charCodeAt(0),Ps='"'.charCodeAt(0),Us="\\".charCodeAt(0),$s="/".charCodeAt(0),zs="\n".charCodeAt(0),Ws=" ".charCodeAt(0),Gs="\f".charCodeAt(0),Zs="\t".charCodeAt(0),Vs="\r".charCodeAt(0),Ys="[".charCodeAt(0),Js="]".charCodeAt(0),Xs="(".charCodeAt(0),Ks=")".charCodeAt(0),Hs="{".charCodeAt(0),qs="}".charCodeAt(0),Qs=";".charCodeAt(0),to="*".charCodeAt(0),eo=":".charCodeAt(0),io="@".charCodeAt(0),ro=/[\t\n\f\r "#'()/;[\\\]{}]/g,no=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,so=/.[\r\n"'(/\\]/,oo=/[\da-f]/i,ao=Is,ho=class extends ao{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}},uo=ho;ho.default=ho,ao.registerAtRule(ho);var lo,co,vo=Is,fo=class extends vo{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){var r=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of r)n.raws.before=e.raws.before;return r}removeChild(t,e){var i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t){return void 0===t&&(t={}),new lo(new co,this,t).stringify()}};fo.registerLazyResult=t=>{lo=t},fo.registerProcessor=t=>{co=t};var po=fo;fo.default=fo,vo.registerRoot(fo);var mo={comma:t=>mo.split(t,[","],!0),space:t=>mo.split(t,[" ","\n","\t"]),split(t,e,i){var r=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&r.push(n.trim()),n="",s=!1):n+=l;return(i||""!==n)&&r.push(n.trim()),r}},go=mo;mo.default=mo;var bo=Is,yo=go,wo=class extends bo{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return yo.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}},Co=wo;wo.default=wo,bo.registerRule(wo);var So=Mn,ko=function(t,e){void 0===e&&(e={});var i,r,n,s,o,a,h,u,l,c,d=t.css.valueOf(),v=e.ignoreErrors,f=d.length,p=0,m=[],g=[];function b(e){throw t.error("Unclosed "+e,p)}return{back:function(t){g.push(t)},endOfFile:function(){return 0===g.length&&p>=f},nextToken:function(t){if(g.length)return g.pop();if(!(p>=f)){var e=!!t&&t.ignoreUnclosed;switch(i=d.charCodeAt(p)){case zs:case Ws:case Zs:case Vs:case Gs:r=p;do{r+=1,i=d.charCodeAt(r)}while(i===Ws||i===zs||i===Zs||i===Vs||i===Gs);c=["space",d.slice(p,r)],p=r-1;break;case Ys:case Js:case Hs:case qs:case eo:case Qs:case Ks:var y=String.fromCharCode(i);c=[y,y,p];break;case Xs:if(u=m.length?m.pop()[1]:"",l=d.charCodeAt(p+1),"url"===u&&l!==js&&l!==Ps&&l!==Ws&&l!==zs&&l!==Zs&&l!==Gs&&l!==Vs){r=p;do{if(a=!1,-1===(r=d.indexOf(")",r+1))){if(v||e){r=p;break}b("bracket")}for(h=r;d.charCodeAt(h-1)===Us;)h-=1,a=!a}while(a);c=["brackets",d.slice(p,r+1),p,r],p=r}else r=d.indexOf(")",p+1),s=d.slice(p,r+1),-1===r||so.test(s)?c=["(","(",p]:(c=["brackets",s,p,r],p=r);break;case js:case Ps:n=i===js?"'":'"',r=p;do{if(a=!1,-1===(r=d.indexOf(n,r+1))){if(v||e){r=p+1;break}b("string")}for(h=r;d.charCodeAt(h-1)===Us;)h-=1,a=!a}while(a);c=["string",d.slice(p,r+1),p,r],p=r;break;case io:ro.lastIndex=p+1,ro.test(d),r=0===ro.lastIndex?d.length-1:ro.lastIndex-2,c=["at-word",d.slice(p,r+1),p,r],p=r;break;case Us:for(r=p,o=!0;d.charCodeAt(r+1)===Us;)r+=1,o=!o;if(i=d.charCodeAt(r+1),o&&i!==$s&&i!==Ws&&i!==zs&&i!==Zs&&i!==Vs&&i!==Gs&&(r+=1,oo.test(d.charAt(r)))){for(;oo.test(d.charAt(r+1));)r+=1;d.charCodeAt(r+1)===Ws&&(r+=1)}c=["word",d.slice(p,r+1),p,r],p=r;break;default:i===$s&&d.charCodeAt(p+1)===to?(0===(r=d.indexOf("*/",p+2)+1)&&(v||e?r=d.length:b("comment")),c=["comment",d.slice(p,r+1),p,r],p=r):(no.lastIndex=p+1,no.test(d),r=0===no.lastIndex?d.length-1:no.lastIndex-2,c=["word",d.slice(p,r+1),p,r],m.push(c),p=r)}return p++,c}},position:function(){return p}}},_o=ds,Io=uo,xo=po,Ao=Co,Mo={empty:!0,space:!0};var Ro=class{constructor(t){this.input=t,this.root=new xo,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i,r,n=new Io;n.name=t[1].slice(1),""===n.name&&this.unnamedAtrule(n,t),this.init(n,t[2]);for(var s=!1,o=!1,a=[],h=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?h.push("("===e?")":"]"):"{"===e&&h.length>0?h.push("}"):e===h[h.length-1]&&h.pop(),0===h.length){if(";"===e){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(a.length>0){for(i=a[r=a.length-1];i&&"space"===i[0];)i=a[--r];i&&(n.source.end=this.getPosition(i[3]||i[2]),n.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),s&&(t=a[a.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var i,r=0,n=e-1;n>=0&&("space"===(i=t[n])[0]||2!==(r+=1));n--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){var e,i,r,n=0;for(var[s,o]of t.entries()){if("("===(i=(e=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(r){if("word"===r[0]&&"progid"===r[1])continue;return s}this.doubleColon(e)}r=e}return!1}comment(t){var e=new _o;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))e.text="",e.raws.left=i,e.raws.right="";else{var r=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=ko(this.input)}decl(t,e){var i=new So;this.init(i,t[0][2]);var r,n=t[t.length-1];for(";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var i=t[e],r=i[3]||i[2];if(r)return r}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(r=t.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var o,a=[];t.length&&("space"===(o=t[0][0])||"comment"===o);)a.push(t.shift());this.precheckMissedSemicolon(t);for(var h=t.length-1;h>=0;h--){if("!important"===(r=t[h])[1].toLowerCase()){i.important=!0;var u=this.stringFrom(t,h);" !important"!==(u=this.spacesFromEnd(t)+u)&&(i.raws.important=u);break}if("important"===r[1].toLowerCase()){for(var l=t.slice(0),c="",d=h;d>0;d--){var v=l[d][0];if(0===c.trim().indexOf("!")&&"space"!==v)break;c=l.pop()[1]+c}0===c.trim().indexOf("!")&&(i.important=!0,i.raws.important=c,t=l)}if("space"!==r[0]&&"comment"!==r[0])break}var f=t.some(t=>"space"!==t[0]&&"comment"!==t[0]);f&&(i.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(i,"value",a.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new Ao;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,i=null,r=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(i=h[0],a.push(h),"("===i||"["===i)n||(n=h),s.push("("===i?")":"]");else if(o&&r&&"{"===i)n||(n=h),s.push("}");else if(0===s.length){if(";"===i){if(r)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(r=!0)}else i===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&r){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,r){for(var n,s,o,a,h=i.length,u="",l=!0,c=0;c<h;c+=1)"space"!==(s=(n=i[c])[0])||c!==h-1||r?"comment"===s?(a=i[c-1]?i[c-1][0]:"empty",o=i[c+1]?i[c+1][0]:"empty",Mo[a]||Mo[o]||","===u.slice(-1)?l=!1:u+=n[1]):u+=n[1]:l=!1;if(!l){var d=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:d,value:u}}t[e]=u}rule(t){t.pop();var e=new Ao;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,i="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){for(var e,i="";t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var i="",r=e;r<t.length;r++)i+=t[r][1];return t.splice(e,t.length-e),i}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},Oo=Is,Eo=Ro,To=qn;function Lo(t,e){var i=new To(t,e),r=new Eo(i);try{r.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}var No=Lo;Lo.default=Lo,Oo.registerParse(Lo);var{isClean:Bo,my:Fo}=cn,Do=us,jo=gn,Po=Is,Uo=Os,$o=Ts,zo=Ds,Wo=No,Go=po,Zo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Vo={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Yo={Once:!0,postcssPlugin:!0,prepare:!0};function Jo(t){return"object"==typeof t&&"function"==typeof t.then}function Xo(t){var e=!1,i=Zo[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function Ko(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:Xo(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function Ho(t){return t[Bo]=!1,t.nodes&&t.nodes.forEach(t=>Ho(t)),t}var qo={},Qo=class t{constructor(e,r,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof t||r instanceof zo)s=Ho(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var o=Wo;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{s=o(r,n)}catch(t){this.processed=!0,this.error=t}s&&!s[Fo]&&Po.rebuild(s)}else s=Ho(r);this.result=new zo(e,s,n),this.helpers=i({},qo,{postcss:qo,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?i({},t,t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion&&"production"!==process.env.NODE_ENV){var r=i.postcssPlugin,n=i.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+r+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(var e of this.plugins)if("object"==typeof e)for(var i in e){if(!Vo[i]&&/^[A-Z]/.test(i))throw new Error("Unknown event "+i+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Yo[i])if("object"==typeof e[i])for(var r in e[i])t(e,"*"===r?i:i+"-"+r.toLowerCase(),e[i][r]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e(function*(){t.plugin=0;for(var e=0;e<t.plugins.length;e++){var i=t.plugins[e],r=t.runOnRoot(i);if(Jo(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var n=t.result.root;!n[Bo];){n[Bo]=!0;for(var s=[Ko(n)];s.length>0;){var o=t.visitTick(s);if(Jo(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=u;try{if("document"===n.type){var i=n.nodes.map(i=>e(i,t.helpers));yield Promise.all(i)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[u,l]of t.listeners.OnceExit)yield*h(l)}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return Jo(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=jo;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var i=new Do(e,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(Jo(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[Bo];)e[Bo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||$o("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,r]of t){this.result.lastPlugin=i;var n=void 0;try{n=r(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Jo(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:r}=e;if("root"===i.type||"document"===i.type||i.parent){if(r.length>0&&e.visitorIndex<r.length){var[n,s]=r[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===r.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[Bo])return o[Bo]=!0,void t.push(Ko(o));e.iterator=0,delete i.indexes[a]}for(var h=e.events;e.eventIndex<h.length;){var u=h[e.eventIndex];if(e.eventIndex+=1,0===u)return void(i.nodes&&i.nodes.length&&(i[Bo]=!0,e.iterator=i.getIterator()));if(this.listeners[u])return void(e.visitors=this.listeners[u])}t.pop()}else t.pop()}walkSync(t){t[Bo]=!0;var e=Xo(t);for(var i of e)if(0===i)t.nodes&&t.each(t=>{t[Bo]||this.walkSync(t)});else{var r=this.listeners[i];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Qo.registerPostcss=t=>{qo=t};var ta=Qo;Qo.default=Qo,Go.registerLazyResult(Qo),Uo.registerLazyResult(Qo);var ea=us,ia=gn,ra=Ts,na=No,sa=Ds,oa=class{constructor(t,e,i){var r;e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=i,this._map=void 0;var n=ia;this.result=new sa(this._processor,r,this._opts),this.result.css=e;var s=this;Object.defineProperty(this.result,"root",{get:()=>s.root});var o=new ea(n,r,this._opts,e);if(o.isMap()){var[a,h]=o.generate();a&&(this.result.css=a),h&&(this.result.map=h)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||ra("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;var t,e=na;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}},aa=oa;oa.default=oa;var ha=aa,ua=ta,la=Os,ca=po,da=class{constructor(t){void 0===t&&(t=[]),this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else{if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,e){return void 0===e&&(e={}),this.plugins.length||e.parser||e.stringifier||e.syntax?new ua(this,t,e):new ha(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},va=da;da.default=da,ca.registerProcessor(da),la.registerProcessor(da);var fa=Mn,pa=Dn,ma=ds,ga=uo,ba=qn,ya=po,wa=Co;function Ca(t,e){if(Array.isArray(t))return t.map(t=>Ca(t));var{inputs:n}=t,s=r(t,a);if(n)for(var o of(e=[],n)){var u=i({},o,{__proto__:ba.prototype});u.map&&(u.map=i({},u.map,{__proto__:pa.prototype})),e.push(u)}if(s.nodes&&(s.nodes=t.nodes.map(t=>Ca(t,e))),s.source){var l=s.source,{inputId:c}=l,d=r(l,h);s.source=d,null!=c&&(s.source.input=e[c])}if("root"===s.type)return new ya(s);if("decl"===s.type)return new fa(s);if("rule"===s.type)return new wa(s);if("comment"===s.type)return new ma(s);if("atrule"===s.type)return new ga(s);throw new Error("Unknown node type: "+t.type)}var Sa=Ca;Ca.default=Ca;var ka=ln,_a=Mn,Ia=ta,xa=Is,Aa=va,Ma=gn,Ra=Sa,Oa=Os,Ea=Ns,Ta=ds,La=uo,Na=Ds,Ba=qn,Fa=No,Da=go,ja=Co,Pa=po,Ua=In;function $a(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Aa(e)}$a.plugin=function(t,e){var i,r=!1;function n(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var i=e(...arguments);return i.postcssPlugin=t,i.postcssVersion=(new Aa).version,i}return Object.defineProperty(n,"postcss",{get:()=>(i||(i=n()),i)}),n.process=function(t,e,i){return $a([n(i)]).process(t,e)},n},$a.stringify=Ma,$a.parse=Fa,$a.fromJSON=Ra,$a.list=Da,$a.comment=t=>new Ta(t),$a.atRule=t=>new La(t),$a.decl=t=>new _a(t),$a.rule=t=>new ja(t),$a.root=t=>new Pa(t),$a.document=t=>new Oa(t),$a.CssSyntaxError=ka,$a.Declaration=_a,$a.Container=xa,$a.Processor=Aa,$a.Document=Oa,$a.Comment=Ta,$a.Warning=Ea,$a.AtRule=La,$a.Result=Na,$a.Input=Ba,$a.Rule=ja,$a.Root=Pa,$a.Node=Ua,Ia.registerPostcss($a);var za=$a;$a.default=$a;var Wa=Qr(za);Wa.stringify,Wa.fromJSON,Wa.plugin,Wa.parse,Wa.list,Wa.document,Wa.comment,Wa.atRule,Wa.rule,Wa.decl,Wa.root,Wa.CssSyntaxError,Wa.Declaration,Wa.Container,Wa.Processor,Wa.Document,Wa.Comment,Wa.Warning,Wa.AtRule,Wa.Result,Wa.Input,Wa.Rule,Wa.Root,Wa.Node;class Ga{constructor(){qr(this,"parentElement",null),qr(this,"parentNode",null),qr(this,"ownerDocument"),qr(this,"firstChild",null),qr(this,"lastChild",null),qr(this,"previousSibling",null),qr(this,"nextSibling",null),qr(this,"ELEMENT_NODE",1),qr(this,"TEXT_NODE",3),qr(this,"nodeType"),qr(this,"nodeName"),qr(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Ga))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var Za={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Va={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ya={};function Ja(t){if(Ya[t])return Ya[t];var e=globalThis[t],i=e.prototype,r=t in Za?Za[t]:void 0,n=Boolean(r&&r.every(t=>{var e,r;return Boolean(null==(r=null==(e=Object.getOwnPropertyDescriptor(i,t))?void 0:e.get)?void 0:r.toString().includes("[native code]"))})),s=t in Va?Va[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof i[t]&&(null==(e=i[t])?void 0:e.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return Ya[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?Ya[t]=u:i}catch(t){return i}}var Xa={};function Ka(t,e,i){var r,n=t+"."+String(i);if(Xa[n])return Xa[n].call(e);var s=Ja(t),o=null==(r=Object.getOwnPropertyDescriptor(s,i))?void 0:r.get;return o?(Xa[n]=o,o.call(e)):e[i]}var Ha={};function qa(t,e,i){var r=t+"."+String(i);if(Ha[r])return Ha[r].bind(e);var n=Ja(t)[i];return"function"!=typeof n?e[i]:(Ha[r]=n,n.bind(e))}function Qa(){return Ja("MutationObserver").constructor}function th(t,e,i){try{if(!(e in t))return()=>{};var r=t[e],n=i(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=n,()=>{t[e]=r}}catch(t){return()=>{}}}var eh={ownerDocument:function(t){return Ka("Node",t,"ownerDocument")},childNodes:function(t){return Ka("Node",t,"childNodes")},parentNode:function(t){return Ka("Node",t,"parentNode")},parentElement:function(t){return Ka("Node",t,"parentElement")},textContent:function(t){return Ka("Node",t,"textContent")},contains:function(t,e){return qa("Node",t,"contains")(e)},getRootNode:function(t){return qa("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?Ka("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?Ka("Element",t,"shadowRoot"):null},querySelector:function(t,e){return Ka("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return Ka("Element",t,"querySelectorAll")(e)},mutationObserver:Qa,patch:th};function ih(t,e,i){void 0===i&&(i=document);var r={capture:!0,passive:!0};return i.addEventListener(t,e,r),()=>i.removeEventListener(t,e,r)}var rh="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",nh={map:{},getId:()=>(console.error(rh),-1),getNode:()=>(console.error(rh),null),removeNodeFromMap(){console.error(rh)},has:()=>(console.error(rh),!1),reset(){console.error(rh)}};function sh(t,e,i){void 0===i&&(i={});var r=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];var h=Date.now();n||!1!==i.leading||(n=h);var u=e-(h-n),l=this;u<=0||u>e?(r&&(clearTimeout(r),r=null),n=h,t.apply(l,o)):r||!1===i.trailing||(r=setTimeout(()=>{n=!1===i.leading?0:Date.now(),r=null,t.apply(l,o)},u))}}function oh(t,e,i,r,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,r?i:{set(t){setTimeout(()=>{i.set.call(this,t)},0),s&&s.set&&s.set.call(this,t)}}),()=>oh(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(nh=new Proxy(nh,{get:(t,e,i)=>("map"===e&&console.error(rh),Reflect.get(t,e,i))}));var ah=Date.now;function hh(t){var e,i,r,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=eh.parentElement(s.body))?void 0:e.scrollLeft)||(null==(i=null==s?void 0:s.body)?void 0:i.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(r=eh.parentElement(s.body))?void 0:r.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function uh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function lh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ch(t){return t?t.nodeType===t.ELEMENT_NODE?t:eh.parentElement(t):null}function dh(t,e,i,r){if(!t)return!1;var n=ch(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(r&&null!==n.closest("."+e))return!0}else if(it(n,e,r))return!0}catch(t){}if(i){if(n.matches(i))return!0;if(r&&null!==n.closest(i))return!0}return!1}function vh(t,e,i){return!("TITLE"!==t.tagName||!i.headTitleMutations)||-2===e.getId(t)}function fh(t,e){if(I(t))return!1;var i=e.getId(t);if(!e.has(i))return!0;var r=eh.parentNode(t);return(!r||r.nodeType!==t.DOCUMENT_NODE)&&(!r||fh(r,e))}function ph(t){return Boolean(t.changedTouches)}function mh(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function gh(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function bh(t){return!!t&&(t instanceof Ga&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(eh.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ah=()=>(new Date).getTime());class yh{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i);var i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function wh(t){var e,i=null;return"getRootNode"in t&&(null==(e=eh.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&eh.host(eh.getRootNode(t))&&(i=eh.host(eh.getRootNode(t))),i}function Ch(t){var e=eh.ownerDocument(t);if(!e)return!1;var i=function(t){for(var e,i=t;e=wh(i);)i=e;return i}(t);return eh.contains(e,i)}function Sh(t){var e=eh.ownerDocument(t);return!!e&&(eh.contains(e,t)||Ch(t))}var kh=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(kh||{}),_h=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(_h||{}),Ih=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Ih||{}),xh=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(xh||{}),Ah=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Ah||{}),Mh=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Mh||{}),Rh=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Rh||{});function Oh(t){return"__ln"in t}class Eh{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,i=0;i<t;i++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Oh(t.previousSibling)){var i=t.previousSibling.__ln.next;e.next=i,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,i&&(i.previous=e)}else if(t.nextSibling&&Oh(t.nextSibling)&&t.nextSibling.__ln.previous){var r=t.nextSibling.__ln.previous;e.previous=r,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,r&&(r.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}var Th,Lh=(t,e)=>t+"@"+e;class Nh{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),c(this,"emit",()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,i=new Eh,r=t=>{for(var e=t,i=-2;-2===i;)i=(e=e&&e.nextSibling)&&this.mirror.getId(e);return i},n=n=>{var s=eh.parentNode(n);if(s&&Sh(n)){var o=!1;if(n.nodeType===Node.TEXT_NODE){var a=s.tagName;if("TEXTAREA"===a)return;"STYLE"===a&&this.addedSet.has(s)&&(o=!0)}var h=I(s)?this.mirror.getId(wh(n)):this.mirror.getId(s),u=r(n);if(-1===h||-1===u)return i.addNode(n);var l=at(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{mh(t,this.mirror)&&this.iframeManager.addIframe(t),gh(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),bh(n)&&this.shadowDomManager.addShadowRoot(eh.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},cssCaptured:o});l&&(t.push({parentId:h,nextId:u,node:l}),e.add(l.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)Fh(this.removesSubTreeCache,s,this.mirror)&&!this.movedSet.has(eh.parentNode(s))||n(s);for(var o of this.addedSet)Dh(this.droppedSet,o)||Fh(this.removesSubTreeCache,o,this.mirror)?Dh(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;i.length;){var h=null;if(a){var u=this.mirror.getId(eh.parentNode(a.value)),l=r(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var c=i.tail;c;){var d=c;if(c=c.previous,d){var v=this.mirror.getId(eh.parentNode(d.value));if(-1===r(d.value))continue;if(-1!==v){h=d;break}var f=d.value,p=eh.parentNode(f);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var m=eh.host(p);if(-1!==this.mirror.getId(m)){h=d;break}}}}if(!h){for(;i.head;)i.removeNode(i.head.value);break}a=h.previous,i.removeNode(h.value),n(h.value)}var g={texts:this.texts.map(t=>{var e=t.node,i=eh.parentNode(e);return i&&"TEXTAREA"===i.tagName&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{var{attributes:e}=t;if("string"==typeof e.style){var i=JSON.stringify(t.styleDiff),r=JSON.stringify(t._unchangedStyles);i.length<e.style.length&&(i+r).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(g))}}),c(this,"genTextAreaValueMutation",t=>{var e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(e),this.attributeMap.set(t,e));var i=Array.from(eh.childNodes(t),t=>eh.textContent(t)||"").join("");e.attributes.value=O({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:L(t),value:i,maskInputFn:this.maskInputFn})}),c(this,"processMutation",t=>{if(!vh(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=eh.textContent(t.target);dh(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:rt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,ch(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var i=t.target,r=t.attributeName,n=t.target.getAttribute(r);if("value"===r){var s=L(i);n=O({element:i,maskInputOptions:this.maskInputOptions,tagName:i.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(dh(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===i.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(i.contentDocument)return;r="rr_src"}if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),"type"===r&&"INPUT"===i.tagName&&"password"===(t.oldValue||"").toLowerCase()&&i.setAttribute("data-rr-is-password","true"),!et(i.tagName,r))if(o.attributes[r]=tt(this.doc,E(i.tagName),E(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&a.setAttribute("style",t.oldValue),Array.from(i.style))){var u=i.style.getPropertyValue(h),l=i.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var c of Array.from(a.style))""===i.style.getPropertyValue(c)&&(o.styleDiff[c]=!1)}else"open"===r&&"DIALOG"===i.tagName&&(i.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break;case"childList":if(dh(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{var i=this.mirror.getId(e),r=I(t.target)?this.mirror.getId(eh.host(t.target)):this.mirror.getId(t.target);dh(t.target,this.blockClass,this.blockSelector,!1)||vh(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Bh(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===i||fh(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Lh(i,r)]?Bh(this.movedSet,e):(this.removes.push({parentId:r,id:i,isShadow:!(!I(t.target)||!x(t.target))||void 0}),function(t,e){var i=[t];for(;i.length;){var r=i.pop();e.has(r)||(e.add(r),eh.childNodes(r).forEach(t=>i.push(t)))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))})}}),c(this,"genAdds",(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(vh(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var i=null;e&&this.mirror.hasNode(e)&&(i=this.mirror.getId(e)),i&&-1!==i&&(this.movedMap[Lh(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);dh(t,this.blockClass,this.blockSelector,!1)||(eh.childNodes(t).forEach(t=>this.genAdds(t)),bh(t)&&eh.childNodes(eh.shadowRoot(t)).forEach(e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Bh(t,e){t.delete(e),eh.childNodes(e).forEach(e=>Bh(t,e))}function Fh(t,e,i){return 0!==t.size&&function(t,e){var i=eh.parentNode(e);return!!i&&t.has(i)}(t,e)}function Dh(t,e){return 0!==t.size&&jh(t,e)}function jh(t,e){var i=eh.parentNode(e);return!!i&&(!!t.has(i)||jh(t,i))}var Ph=t=>{if(!Th)return t;return function(){try{return t(...arguments)}catch(t){if(Th&&!0===Th(t))return;throw t}}},Uh=[];function $h(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function zh(t,e){var i=new Nh;Uh.push(i),i.init(t);var r=new(Qa())(Ph(i.processMutations.bind(i)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Wh(t){var{mouseInteractionCb:e,doc:r,mirror:n,blockClass:s,blockSelector:o,sampling:a}=t;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Ih).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t]).forEach(t=>{var a=E(t),h=(t=>r=>{var a=$h(r);if(!dh(a,s,o,!0)){var h=null,u=t;if("pointerType"in r){switch(r.pointerType){case"mouse":h=xh.Mouse;break;case"touch":h=xh.Touch;break;case"pen":h=xh.Pen}h===xh.Touch?Ih[t]===Ih.MouseDown?u="TouchStart":Ih[t]===Ih.MouseUp&&(u="TouchEnd"):xh.Pen}else ph(r)&&(h=xh.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===xh.Touch||u.startsWith("Mouse")&&h===xh.Mouse)&&(h=null)):Ih[t]===Ih.Click&&(h=l,l=null);var c=ph(r)?r.changedTouches[0]:r;if(c){var d=n.getId(a),{clientX:v,clientY:f}=c;Ph(e)(i({type:Ih[u],id:d,x:v,y:f},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Ih[t]){case Ih.MouseDown:case Ih.MouseUp:a=a.replace("mouse","pointer");break;case Ih.TouchStart:case Ih.TouchEnd:return}u.push(ih(a,h,r))}),Ph(()=>{u.forEach(t=>t())})}function Gh(t){var{scrollCb:e,doc:i,mirror:r,blockClass:n,blockSelector:s,sampling:o}=t;return ih("scroll",Ph(sh(Ph(t=>{var o=$h(t);if(o&&!dh(o,n,s,!0)){var a=r.getId(o);if(o===i&&i.defaultView){var h=hh(i.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}}),o.scroll||100)),i)}var Zh=["INPUT","TEXTAREA","SELECT"],Vh=new WeakMap;function Yh(t){return function(t,e){if(Hh("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Hh("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Hh("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Hh("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){var i=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(i)}else if(t.parentStyleSheet){var r=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(r)}return e}(t,[])}function Jh(t,e,i){var r,n;return t?(t.ownerNode?r=e.getId(t.ownerNode):n=i.getId(t),{styleId:n,id:r}):{}}function Xh(t,e){var i,r,n,{mirror:s,stylesheetManager:o}=t,a=null;a="#document"===e.nodeName?s.getId(e):s.getId(eh.host(e));var h="#document"===e.nodeName?null==(i=e.defaultView)?void 0:i.Document:null==(n=null==(r=e.ownerDocument)?void 0:r.defaultView)?void 0:n.ShadowRoot,u=(null==h?void 0:h.prototype)?Object.getOwnPropertyDescriptor(null==h?void 0:h.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&h&&u?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var t;return null==(t=u.get)?void 0:t.call(this)},set(t){var e,i=null==(e=u.set)?void 0:e.call(this,t);if(null!==a&&-1!==a)try{o.adoptStyleSheets(t,a)}catch(t){}return i}}),Ph(()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})})):()=>{}}function Kh(t,e){void 0===e&&(e={});var r,n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){var{mutationCb:i,mousemoveCb:r,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:h,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:c,fontCb:d,selectionCb:v,customElementCb:f}=t;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),i(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),r(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),c(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),d(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),v(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),f(...arguments)}}(t,e),t.recordDOM&&(r=zh(t,t.doc));var s=function(t){var{mousemoveCb:e,sampling:i,doc:r,mirror:n}=t;if(!1===i.mousemove)return()=>{};var s,o="number"==typeof i.mousemove?i.mousemove:50,a="number"==typeof i.mousemoveCallback?i.mousemoveCallback:500,h=[],u=sh(Ph(t=>{var i=Date.now()-s;e(h.map(t=>(t.timeOffset-=i,t)),t),h=[],s=null}),a),l=Ph(sh(Ph(t=>{var e=$h(t),{clientX:i,clientY:r}=ph(t)?t.changedTouches[0]:t;s||(s=ah()),h.push({x:i,y:r,id:n.getId(e),timeOffset:ah()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?_h.Drag:t instanceof MouseEvent?_h.MouseMove:_h.TouchMove)}),o,{trailing:!1})),c=[ih("mousemove",l,r),ih("touchmove",l,r),ih("drag",l,r)];return Ph(()=>{c.forEach(t=>t())})}(t),o=Wh(t),a=Gh(t),h=function(t,e){var{viewportResizeCb:i}=t,{win:r}=e,n=-1,s=-1;return ih("resize",Ph(sh(Ph(()=>{var t=uh(),e=lh();n===t&&s===e||(i({width:Number(e),height:Number(t)}),n=t,s=e)}),200)),r)}(t,{win:n}),u=function(t){var{inputCb:e,doc:r,mirror:n,blockClass:s,blockSelector:o,ignoreClass:a,ignoreSelector:h,maskInputOptions:u,maskInputFn:l,sampling:c,userTriggeredOnInput:d}=t;function v(t){var e=$h(t),i=t.isTrusted,n=e&&e.tagName;if(e&&"OPTION"===n&&(e=eh.parentElement(e)),e&&n&&!(Zh.indexOf(n)<0)&&!dh(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var c=e.value,v=!1,p=L(e)||"";"radio"===p||"checkbox"===p?v=e.checked:(u[n.toLowerCase()]||u[p])&&(c=O({element:e,maskInputOptions:u,tagName:n,type:p,value:c,maskInputFn:l})),f(e,d?{text:c,isChecked:v,userTriggered:i}:{text:c,isChecked:v});var m=e.name;"radio"===p&&m&&v&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach(t=>{if(t!==e){var i=t.value;f(t,d?{text:i,isChecked:!v,userTriggered:!1}:{text:i,isChecked:!v})}})}}function f(t,r){var s=Vh.get(t);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){Vh.set(t,r);var o=n.getId(t);Ph(e)(i({},r,{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map(t=>ih(t,Ph(v),r)),m=r.defaultView;if(!m)return()=>{p.forEach(t=>t())};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...b.map(t=>oh(t[0],t[1],{set(){Ph(v)({target:this,isTrusted:!1})}},!1,m))),Ph(()=>{p.forEach(t=>t())})}(t),l=function(t){var{mediaInteractionCb:e,blockClass:i,blockSelector:r,mirror:n,sampling:s,doc:o}=t,a=Ph(t=>sh(Ph(s=>{var o=$h(s);if(o&&!dh(o,i,r,!0)){var{currentTime:a,volume:h,muted:u,playbackRate:l,loop:c}=o;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:c})}}),s.media||500)),h=[ih("play",a(Mh.Play),o),ih("pause",a(Mh.Pause),o),ih("seeked",a(Mh.Seeked),o),ih("volumechange",a(Mh.VolumeChange),o),ih("ratechange",a(Mh.RateChange),o)];return Ph(()=>{h.forEach(t=>t())})}(t),c=()=>{},d=()=>{},v=()=>{},f=()=>{};t.recordDOM&&(c=function(t,e){var{styleSheetRuleCb:i,mirror:r,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Ph((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=Jh(e,r,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&i({id:h,styleId:u,adds:[{rule:o,index:a}]}),t.apply(e,s)})}),s.CSSStyleSheet.prototype.addRule=function(t,e,i){void 0===i&&(i=this.cssRules.length);var r=t+" { "+e+" }";return s.CSSStyleSheet.prototype.insertRule.apply(this,[r,i])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:Ph((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Jh(e,r,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&i({id:a,styleId:h,removes:[{index:o}]}),t.apply(e,s)})}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:Ph((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Jh(e,r,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&i({id:a,styleId:h,replace:o}),t.apply(e,s)})})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:Ph((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Jh(e,r,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&i({id:a,styleId:h,replaceSync:o}),t.apply(e,s)})}));var l={};qh("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(qh("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),qh("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),qh("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(l).forEach(t=>{var[e,s]=t;c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:Ph((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=Jh(e.parentStyleSheet,r,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&i({id:h,styleId:u,adds:[{rule:o,index:[...Yh(e),a||0]}]}),t.apply(e,s)})}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:Ph((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Jh(e.parentStyleSheet,r,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&i({id:a,styleId:h,removes:[{index:[...Yh(e),o]}]}),t.apply(e,s)})})}),Ph(()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach(t=>{var[e,i]=t;i.prototype.insertRule=c[e].insertRule,i.prototype.deleteRule=c[e].deleteRule})})}(t,{win:n}),d=Xh(t,t.doc),v=function(t,e){var{styleDeclarationCb:i,mirror:r,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:o}=e,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Ph((t,e,o)=>{var h,[u,l,c]=o;if(n.has(u))return a.apply(e,[u,l,c]);var{id:d,styleId:v}=Jh(null==(h=e.parentRule)?void 0:h.parentStyleSheet,r,s.styleMirror);return(d&&-1!==d||v&&-1!==v)&&i({id:d,styleId:v,set:{property:u,value:l,priority:c},index:Yh(e.parentRule)}),t.apply(e,o)})});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:Ph((t,e,o)=>{var a,[u]=o;if(n.has(u))return h.apply(e,[u]);var{id:l,styleId:c}=Jh(null==(a=e.parentRule)?void 0:a.parentStyleSheet,r,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&i({id:l,styleId:c,remove:{property:u},index:Yh(e.parentRule)}),t.apply(e,o)})}),Ph(()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h})}(t,{win:n}),t.collectFonts&&(f=function(t){var{fontCb:e,doc:i}=t,r=i.defaultView;if(!r)return()=>{};var n=[],s=new WeakMap,o=r.FontFace;r.FontFace=function(t,e,i){var r=new o(t,e,i);return s.set(r,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};var a=th(i.fonts,"add",function(t){return function(i){return setTimeout(Ph(()=>{var t=s.get(i);t&&(e(t),s.delete(i))}),0),t.apply(this,[i])}});return n.push(()=>{r.FontFace=o}),n.push(a),Ph(()=>{n.forEach(t=>t())})}(t)));var p=function(t){var{doc:e,mirror:i,blockClass:r,blockSelector:n,selectionCb:s}=t,o=!0,a=Ph(()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;u<h;u++){var l=t.getRangeAt(u),{startContainer:c,startOffset:d,endContainer:v,endOffset:f}=l;dh(c,r,n,!0)||dh(v,r,n,!0)||a.push({start:i.getId(c),startOffset:d,end:i.getId(v),endOffset:f})}s({ranges:a})}});return a(),ih("selectionchange",a)}(t),m=function(t){var{doc:e,customElementCb:i}=t,r=e.defaultView;return r&&r.customElements?th(r.customElements,"define",function(t){return function(e,r,n){try{i({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return t.apply(this,[e,r,n])}}):()=>{}}(t),g=[];for(var b of t.plugins)g.push(b.observer(b.callback,n,b.options));return Ph(()=>{Uh.forEach(t=>t.reset()),null==r||r.disconnect(),s(),o(),a(),h(),u(),l(),c(),d(),v(),f(),p(),m(),g.forEach(t=>t())})}function Hh(t){return void 0!==window[t]}function qh(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Qh{constructor(t){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,r){var n=i||this.getIdToRemoteIdMap(t),s=r||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var i=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,i,r))}getRemoteId(t,e,i){var r=i||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;var n=r.get(e);return n||-1}getRemoteIds(t,e){var i=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,i))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class tu{constructor(t){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new Qh(Y)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Qh(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var i,r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(i=t.contentWindow)||i.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var i=this.crossOriginIframeMap.get(t.source);if(i){var r=this.transformCrossOriginEvent(i,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var i;switch(e.type){case kh.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var r=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(e.data.node,r),{timestamp:e.timestamp,type:kh.IncrementalSnapshot,data:{source:_h.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case kh.Meta:case kh.Load:case kh.DomContentLoaded:return!1;case kh.Plugin:return e;case kh.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case kh.IncrementalSnapshot:switch(e.data.source){case _h.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(e.node,i)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case _h.Drag:case _h.TouchMove:case _h.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case _h.ViewportResize:return!1;case _h.MediaInteraction:case _h.MouseInteraction:case _h.Scroll:case _h.CanvasMutation:case _h.Input:return this.replaceIds(e.data,t,["id"]),e;case _h.StyleSheetRule:case _h.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case _h.Font:return e;case _h.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case _h.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(i=e.data.styles)||i.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,i,r){for(var n of r)(Array.isArray(e[n])||"number"==typeof e[n])&&(Array.isArray(e[n])?e[n]=t.getIds(i,e[n]):e[n]=t.getId(i,e[n]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Rh.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class eu{constructor(t){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(x(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var r=zh(i({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Gh(i({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(eh.host(t))),this.restoreHandlers.push(Xh({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var i=this;this.restoreHandlers.push(th(t.prototype,"attachShadow",function(t){return function(r){var n=t.call(this,r),s=eh.shadowRoot(this);return s&&Sh(this)&&i.addShadowRoot(s,e),n}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var iu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ru="undefined"==typeof Uint8Array?[]:new Uint8Array(256),nu=0;nu<64;nu++)ru[iu.charCodeAt(nu)]=nu;var su=new Map;var ou=(t,e,i)=>{if(t&&(uu(t,e)||"object"==typeof t)){var r=function(t,e){var i=su.get(t);return i||(i=new Map,su.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(i,t.constructor.name),n=r.indexOf(t);return-1===n&&(n=r.length,r.push(t)),n}};function au(t,e,i){if(t instanceof Array)return t.map(t=>au(t,e,i));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,i=new Uint8Array(t),r=i.length,n="";for(e=0;e<r;e+=3)n+=iu[i[e]>>2],n+=iu[(3&i[e])<<4|i[e+1]>>4],n+=iu[(15&i[e+1])<<2|i[e+2]>>6],n+=iu[63&i[e+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[au(t.buffer,e,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var r=t.constructor.name,{src:n}=t;return{rr_type:r,src:n}}if(t instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:t.toDataURL()}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[au(t.data,e,i),t.width,t.height]}:uu(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:ou(t,e,i)}:t}var hu=(t,e,i)=>t.map(t=>au(t,e,i)),uu=(t,e)=>{var i=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(i.find(i=>t instanceof e[i]))};function lu(t,e,i,r){var n=[];try{var s=th(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];if(!dh(this,e,i,!0)){var h=function(t){return"experimental-webgl"===t?"webgl":t}(n);if("__context"in this||(this.__context=h),r&&["webgl","webgl2"].includes(h))if(o[0]&&"object"==typeof o[0]){var u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[n,...o])}});n.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(t=>t())}}function cu(t,e,i,r,n,s){var o=[],a=Object.getOwnPropertyNames(t),h=function(a){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return 0;try{if("function"!=typeof t[a])return 0;var h=th(t,a,function(t){return function(){for(var o=arguments.length,h=new Array(o),u=0;u<o;u++)h[u]=arguments[u];var l=t.apply(this,h);if(ou(l,s,this),"tagName"in this.canvas&&!dh(this.canvas,r,n,!0)){var c=hu(h,s,this),d={type:e,property:a,args:c};i(this.canvas,d)}return l}});o.push(h)}catch(r){var u=oh(t,a,{set(t){i(this.canvas,{type:e,property:a,args:[t],setter:!0})}});o.push(u)}};for(var u of a)h(u);return o}var du,vu,fu,pu,mu="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",gu="undefined"!=typeof window&&window.Blob&&new Blob([(du=mu,Uint8Array.from(atob(du),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function bu(t){var e;try{if(!(e=gu&&(window.URL||window.webkitURL).createObjectURL(gu)))throw"";var i=new Worker(e,{name:null==t?void 0:t.name});return i.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),i}catch(e){return new Worker("data:text/javascript;base64,"+mu,{name:null==t?void 0:t.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class yu{constructor(t){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"processMutation",(t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});var{sampling:e="all",win:i,blockClass:r,blockSelector:n,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(i,r,n),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,i,r,n,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,i,r,n,s){var o=this,a=lu(i,r,n,!0),h=new Map,u=new bu;u.onmessage=t=>{var{id:e}=t.data;if(h.set(e,!1),"base64"in t.data){var{base64:i,type:r,width:n,height:s}=t.data;this.mutationCb({id:e,type:Ah["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:r}]},0,0]}]})}};var l,c=1e3/t,d=0,v=t=>{var a;d&&t-d<c?l=requestAnimationFrame(v):(d=t,(a=[],i.document.querySelectorAll("canvas").forEach(t=>{dh(t,r,n,!0)||a.push(t)}),a).forEach(function(){var t=e(function*(t){var e,i=o.mirror.getId(t);if(!h.get(i)&&0!==t.width&&0!==t.height){if(h.set(i,!0),["webgl","webgl2"].includes(t.__context)){var r=t.getContext(t.__context);!1===(null==(e=null==r?void 0:r.getContextAttributes())?void 0:e.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}var n=yield createImageBitmap(t);u.postMessage({id:i,bitmap:n,width:t.width,height:t.height,dataURLOptions:s.dataURLOptions},[n])}});return function(e){return t.apply(this,arguments)}}()),l=requestAnimationFrame(v))};l=requestAnimationFrame(v),this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,e,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=lu(t,e,i,!1),n=function(t,e,i,r){var n=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),o=function(s){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[s])return 1;var o=th(e.CanvasRenderingContext2D.prototype,s,function(n){return function(){for(var o=arguments.length,a=new Array(o),h=0;h<o;h++)a[h]=arguments[h];return dh(this.canvas,i,r,!0)||setTimeout(()=>{var i=hu(a,e,this);t(this.canvas,{type:Ah["2D"],property:s,args:i})},0),n.apply(this,a)}});n.push(o)}catch(i){var a=oh(e.CanvasRenderingContext2D.prototype,s,{set(e){t(this.canvas,{type:Ah["2D"],property:s,args:[e],setter:!0})}});n.push(a)}};for(var a of s)o(a);return()=>{n.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i),s=function(t,e,i,r){var n=[];return n.push(...cu(e.WebGLRenderingContext.prototype,Ah.WebGL,t,i,r,e)),void 0!==e.WebGL2RenderingContext&&n.push(...cu(e.WebGL2RenderingContext.prototype,Ah.WebGL2,t,i,r,e)),()=>{n.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i);this.resetObservers=()=>{r(),n(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{var i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var i=this.pendingCanvasMutations.get(t);if(i&&-1!==e){var n=i.map(t=>r(t,u)),{type:s}=i[0];this.mutationCb({id:e,type:s,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class wu{constructor(t){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new yh),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var i=this;if(0!==t.length){var r={id:e,styleIds:[]},n=[],s=function(t){var e;i.styleMirror.has(t)?e=i.styleMirror.getId(t):(e=i.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,i)=>({rule:M(e,t.href),index:i}))})),r.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Cu{constructor(){c(this,"nodeMap",new WeakMap),c(this,"active",!1)}inOtherBuffer(t,e){var i=this.nodeMap.get(t);return i&&Array.from(i).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var Su=!1;try{if(2!==Array.from([1],t=>2*t)[0]){var ku=document.createElement("iframe");document.body.appendChild(ku),Array.from=(null==(n=ku.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(ku)}}catch(t){console.debug("Unable to override Array.from",t)}var _u,Iu,xu=new R;function Au(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:d,maskInputOptions:v,slimDOMOptions:f,maskInputFn:p,maskTextFn:m,hooks:g,packFn:b,sampling:y={},dataURLOptions:w={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:k=!1,recordCrossOriginIframes:_=!1,recordAfter:I=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:A=!1,inlineImages:M=!1,plugins:O,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:T=new Set([]),errorHandler:L}=t;Th=L;var N=!_||window.parent===window,B=!1;if(!N)try{window.parent.document&&(B=!1)}catch(t){B=!0}if(N&&!e)throw new Error("emit function is required");if(!N&&!B)return()=>{};void 0!==C&&void 0===y.mousemove&&(y.mousemove=C),xu.reset();var F,D=!0===d?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==v?v:{password:!0},j=ot(f);!function(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var P=0,U=t=>{for(var e of O||[])e.eventProcessor&&(t=e.eventProcessor(t));return b&&!B&&(t=b(t)),t};vu=(t,i)=>{var s,o=t;if(o.timestamp=ah(),!(null==(s=Uh[0])?void 0:s.isFrozen())||o.type===kh.FullSnapshot||o.type===kh.IncrementalSnapshot&&o.data.source===_h.Mutation||Uh.forEach(t=>t.unfreeze()),N)null==e||e(U(o),i);else if(B){var a={type:"rrweb",event:U(o),origin:window.location.origin,isCheckout:i};window.parent.postMessage(a,"*")}if(o.type===kh.FullSnapshot)F=o,P=0;else if(o.type===kh.IncrementalSnapshot){if(o.data.source===_h.Mutation&&o.data.isAttachIframe)return;P++;var h=n&&P>=n,u=r&&o.timestamp-F.timestamp>r;(h||u)&&fu(!0)}};var z=t=>{vu({type:kh.IncrementalSnapshot,data:i({source:_h.Mutation},t)})},W=t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.Scroll},t)}),G=t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.CanvasMutation},t)}),Z=new wu({mutationCb:z,adoptedStyleSheetCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.AdoptedStyleSheet},t)})}),V=new tu({mirror:xu,mutationCb:z,stylesheetManager:Z,recordCrossOriginIframes:_,wrappedEmit:vu});for(var Y of O||[])Y.getMirror&&Y.getMirror({nodeMirror:xu,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});var J=new Cu;pu=new yu({recordCanvas:k,mutationCb:G,win:window,blockClass:s,blockSelector:o,mirror:xu,sampling:y.canvas,dataURLOptions:w});var X=new eu({mutationCb:z,scrollCb:W,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:D,dataURLOptions:w,maskTextFn:m,maskInputFn:p,recordCanvas:k,inlineImages:M,sampling:y,slimDOMOptions:j,iframeManager:V,stylesheetManager:Z,canvasManager:pu,keepIframeSrcFn:E,processedNodeManager:J},mirror:xu});fu=function(t){if(void 0===t&&(t=!1),S){vu({type:kh.Meta,data:{href:window.location.href,width:lh(),height:uh()}},t),Z.reset(),X.init(),Uh.forEach(t=>t.lock());var e=function(t,e){var{mirror:i=new R,blockClass:r="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:h=!1,recordCanvas:u=!1,maskAllInputs:l=!1,maskTextFn:c,maskInputFn:d,slimDOM:v=!1,dataURLOptions:f,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:w,keepIframeSrcFn:C=()=>!1}=e||{};return at(t,{doc:t,mirror:i,blockClass:r,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===l?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===l?{password:!0}:l,maskTextFn:c,maskInputFn:d,slimDOMOptions:ot(v),dataURLOptions:f,inlineImages:h,recordCanvas:u,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:w,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:xu,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:D,maskTextFn:m,maskInputFn:p,slimDOM:j,dataURLOptions:w,recordCanvas:k,inlineImages:M,onSerialize:t=>{mh(t,xu)&&V.addIframe(t),gh(t,xu)&&Z.trackLinkElement(t),bh(t)&&X.addShadowRoot(eh.shadowRoot(t),document)},onIframeLoad:(t,e)=>{V.attachIframe(t,e),X.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{Z.attachLinkElement(t,e)},keepIframeSrcFn:E});if(!e)return console.warn("Failed to snapshot the document");vu({type:kh.FullSnapshot,data:{node:e,initialOffset:hh(window)}},t),Uh.forEach(t=>t.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,xu.getId(document))}};try{var K=[],H=t=>{var e;return Ph(Kh)({mutationCb:z,mousemoveCb:(t,e)=>vu({type:kh.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.MouseInteraction},t)}),scrollCb:W,viewportResizeCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.ViewportResize},t)}),inputCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.Input},t)}),mediaInteractionCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.MediaInteraction},t)}),styleSheetRuleCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.StyleSheetRule},t)}),styleDeclarationCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.StyleDeclaration},t)}),canvasMutationCb:G,fontCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.Font},t)}),selectionCb:t=>{vu({type:kh.IncrementalSnapshot,data:i({source:_h.Selection},t)})},customElementCb:t=>{vu({type:kh.IncrementalSnapshot,data:i({source:_h.CustomElement},t)})},blockClass:s,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:l,maskInputOptions:D,inlineStylesheet:c,sampling:y,recordDOM:S,recordCanvas:k,inlineImages:M,userTriggeredOnInput:x,collectFonts:A,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:E,blockSelector:o,slimDOMOptions:j,dataURLOptions:w,mirror:xu,iframeManager:V,stylesheetManager:Z,shadowDomManager:X,processedNodeManager:J,canvasManager:pu,ignoreCSSAttributes:T,plugins:(null==(e=null==O?void 0:O.filter(t=>t.observer))?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>vu({type:kh.Plugin,data:{plugin:t.name,payload:e}})})))||[]},g)};V.addLoadListener(t=>{try{K.push(H(t.contentDocument))}catch(t){console.warn(t)}});var q=()=>{fu(),K.push(H(document)),Su=!0};return["interactive","complete"].includes(document.readyState)?q():(K.push(ih("DOMContentLoaded",()=>{vu({type:kh.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&q()})),K.push(ih("load",()=>{vu({type:kh.Load,data:{}}),"load"===I&&q()},window))),()=>{K.forEach(t=>{try{t()}catch(t){String(t).toLowerCase().includes("cross-origin")||console.warn(t)}}),J.destroy(),Su=!1,Th=void 0}}catch(t){console.warn(t)}}Au.addCustomEvent=(t,e)=>{if(!Su)throw new Error("please add custom event after start recording");vu({type:kh.Custom,data:{tag:t,payload:e}})},Au.freezePage=()=>{Uh.forEach(t=>t.freeze())},Au.takeFullSnapshot=t=>{if(!Su)throw new Error("please take full snapshot after start recording");fu(t)},Au.mirror=xu,(Iu=_u||(_u={}))[Iu.NotStarted=0]="NotStarted",Iu[Iu.Running=1]="Running",Iu[Iu.Stopped=2]="Stopped";var Mu=Object.defineProperty,Ru=(t,e,i)=>((t,e,i)=>e in t?Mu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i);class Ou{constructor(t){Ru(this,"fileName"),Ru(this,"functionName"),Ru(this,"lineNumber"),Ru(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){var t=this.lineNumber||"",e=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+t+":"+e+")":this.fileName+":"+t+":"+e}}var Eu=/(^|@)\S+:\d+/,Tu=/^\s*at .*(\S+:\d+|\(native\))/m,Lu=/^(eval@)?(\[native code])?$/,Nu={parse:function(t){return t?void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(Tu)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):(console.warn("[console-record-plugin]: Failed to parse error object:",t),[]):[]},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));if(!e)throw new Error("Cannot parse given url: "+t);return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter(function(t){return!!t.match(Tu)},this).map(function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var e=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),i=e.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(e=i?e.replace(i[0],""):e).split(/\s+/).slice(1),n=this.extractLocation(i?i[1]:r.pop()),s=r.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Ou({functionName:s,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(t){return!t.match(Lu)},this).map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new Ou({functionName:t});var e=/((.*".+"[^@]*)?[^@]*)(?:@)/,i=t.match(e),r=i&&i[1]?i[1]:void 0,n=this.extractLocation(t.replace(e,""));return new Ou({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,i=t.message.split("\n"),r=[],n=2,s=i.length;n<s;n+=2){var o=e.exec(i[n]);o&&r.push(new Ou({fileName:o[2],lineNumber:parseFloat(o[1])}))}return r},parseOpera10:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,i=t.stacktrace.split("\n"),r=[],n=0,s=i.length;n<s;n+=2){var o=e.exec(i[n]);o&&r.push(new Ou({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return r},parseOpera11:function(t){return t.stack.split("\n").filter(function(t){return!!t.match(Eu)&&!t.match(/^Error created at/)},this).map(function(t){var e=t.split("@"),i=this.extractLocation(e.pop()),r=(e.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Ou({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)}};function Bu(t){if(!t||!t.outerHTML)return"";for(var e="";t.parentElement;){var i=t.localName;if(!i)break;i=i.toLowerCase();var r=t.parentElement,n=[];if(r.children&&r.children.length>0)for(var s=0;s<r.children.length;s++){var o=r.children[s];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===i&&n.push(o)}n.length>1&&(i+=":eq("+n.indexOf(t)+")"),e=i+(e?">"+e:""),t=r}return e}function Fu(t){return"[object Object]"===Object.prototype.toString.call(t)}function Du(t,e){if(0===e)return!0;var i=Object.keys(t);for(var r of i)if(Fu(t[r])&&Du(t[r],e-1))return!0;return!1}function ju(t,e){var i={numOfKeysLimit:50,depthOfLimit:4};Object.assign(i,e);var r=[],n=[];return JSON.stringify(t,function(t,e){if(r.length>0){var s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?n.splice(s,1/0,t):n.push(t),~r.indexOf(e)&&(e=r[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(e)).join(".")+"]")}else r.push(e);if(null===e)return e;if(void 0===e)return"undefined";if(function(t){if(Fu(t)&&Object.keys(t).length>i.numOfKeysLimit)return!0;if("function"==typeof t)return!0;if(Fu(t)&&Du(t,i.depthOfLimit))return!0;return!1}(e))return function(t){var e=t.toString();i.stringLengthLimit&&e.length>i.stringLengthLimit&&(e=e.slice(0,i.stringLengthLimit)+"...");return e}(e);if("bigint"==typeof e)return e.toString()+"n";if(e instanceof Event){var o={};for(var a in e){var h=e[a];Array.isArray(h)?o[a]=Bu(h.length?h[0]:null):o[a]=h}return o}return e instanceof Node?e instanceof HTMLElement?e?e.outerHTML:"":e.nodeName:e instanceof Error?e.stack?e.stack+"\nEnd of stack for Error object":e.name+": "+e.message:e})}var Pu={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Uu(t,e,i){var r,n=i?Object.assign({},Pu,i):Pu,s=n.logger;if(!s)return()=>{};r="string"==typeof s?e[s]:s;var o=0,a=!1,h=[];if(n.level.includes("error")){var u=e=>{var i=e.message,r=e.error,s=Nu.parse(r).map(t=>t.toString()),o=[ju(i,n.stringifyOptions)];t({level:"error",trace:s,payload:o})};e.addEventListener("error",u),h.push(()=>{e.removeEventListener("error",u)});var l=e=>{var i,r;e.reason instanceof Error?r=[ju("Uncaught (in promise) "+(i=e.reason).name+": "+i.message,n.stringifyOptions)]:(i=new Error,r=[ju("Uncaught (in promise)",n.stringifyOptions),ju(e.reason,n.stringifyOptions)]);var s=Nu.parse(i).map(t=>t.toString());t({level:"error",trace:s,payload:r})};e.addEventListener("unhandledrejection",l),h.push(()=>{e.removeEventListener("unhandledrejection",l)})}for(var c of n.level)h.push(d(r,c));return()=>{h.forEach(t=>t())};function d(e,i){var r=this;return e[i]?function(t,e,i){try{if(!(e in t))return()=>{};var r=t[e],n=i(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=n,()=>{t[e]=r}}catch(t){return()=>{}}}(e,i,e=>function(){for(var s=arguments.length,h=new Array(s),u=0;u<s;u++)h[u]=arguments[u];if(e.apply(r,h),!("assert"===i&&h[0]||a)){a=!0;try{var l=Nu.parse(new Error).map(t=>t.toString()).splice(1),c=("assert"===i?h.slice(1):h).map(t=>ju(t,n.stringifyOptions));++o<n.lengthThreshold?t({level:i,trace:l,payload:c}):o===n.lengthThreshold&&t({level:"warn",trace:[],payload:[ju("The number of log records reached the threshold.")]})}catch(t){e("rrweb logger error:",t,...h)}finally{a=!1}}}):()=>{}}}var $u="undefined"!=typeof window?window:void 0,zu="undefined"!=typeof globalThis?globalThis:$u,Wu=null==zu?void 0:zu.navigator,Gu=null==zu?void 0:zu.document,Zu=null==zu?void 0:zu.location,Vu=null==zu?void 0:zu.fetch;$u&&Gu&&Gu.createElement,null==zu||zu.XMLHttpRequest,null==zu||zu.AbortController;var Yu=null==Wu?void 0:Wu.userAgent,Ju=null!=$u?$u:{},Xu=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Xu||{}),Ku=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Ku||{});function Hu(t){return"string"==typeof t}function qu(t){return void 0===t}function Qu(t){return null==t}function tl(t){return Array.isArray(t)}function el(t){return"function"==typeof t}var il={none:0,error:1,warn:2,info:3,debug:4},rl="[vTilt]",nl=new Set(["none","error","warn","info","debug"]);function sl(){return"undefined"!=typeof console}function ol(t){var e=t.length>0&&"string"==typeof t[0]?t[0]:"",i=e?t.slice(1):t;return[e?rl+":"+e:rl,...i]}var al="warn",hl=!1;var ul=null;function ll(){return ul||(ul={setLevel(t,e){void 0===e&&(e=!1),al=t,e&&(hl=!0)},setLevelFromRemote(t){hl||t&&nl.has(t)&&(al=t)},getLevel:()=>al,isLockedByInit:()=>hl,debug(){if(!(il[al]<il.debug)&&sl()){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];console.log(...ol(e))}},info(){if(!(il[al]<il.info)&&sl()){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];console.log(...ol(e))}},warn(){if(!(il[al]<il.warn)&&sl()){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];console.warn(...ol(e))}},error(){if(!(il[al]<il.error)&&sl()){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];console.error(...ol(e))}}}),ul}function cl(t,e){void 0===e&&(e=!0);var i=void 0!==t.log_level||!!t.debug,r=function(t){return t.log_level&&nl.has(t.log_level)?t.log_level:t.debug?"debug":"warn"}(t);return ll().setLevel(r,e&&i),r}function dl(t,e){try{return t()}catch(t){return e}}var vl="x-api-key";function fl(t,e,i){void 0===i&&(i={});var{api_host:r,token:n}=t,s=""+(r?r.replace(/\/+$/gm,""):"")+e;if(i.includeTokenQuery&&n){var o=s.includes("?")?"&":"?";s=""+s+o+"token="+n}return s}function pl(t){return t.token?{[vl]:t.token}:{}}class ml{constructor(){this.o=new Map,this.m=new Map}on(t,e){return this.o.has(t)||this.o.set(t,new Set),this.o.get(t).add(e),()=>{var i;null===(i=this.o.get(t))||void 0===i||i.delete(e)}}once(t,e){return this.m.has(t)||this.m.set(t,new Set),this.m.get(t).add(e),()=>{var i;null===(i=this.m.get(t))||void 0===i||i.delete(e)}}emit(t,e){var i,r;null===(i=this.o.get(t))||void 0===i||i.forEach(i=>{try{i(e)}catch(e){ll().error("emitter",'error in event listener for "'+t+'":',e)}});var n=this.m.get(t);n&&(n.forEach(i=>{try{i(e)}catch(e){ll().error("emitter",'error in once listener for "'+t+'":',e)}}),this.m.delete(t)),null===(r=this.o.get("*"))||void 0===r||r.forEach(i=>{try{i({event:t,payload:e})}catch(t){ll().error("emitter","error in wildcard listener:",t)}})}off(t){t?(this.o.delete(t),this.m.delete(t)):(this.o.clear(),this.m.clear())}listenerCount(t){var e,i,r,n;return(null!==(i=null===(e=this.o.get(t))||void 0===e?void 0:e.size)&&void 0!==i?i:0)+(null!==(n=null===(r=this.m.get(t))||void 0===r?void 0:r.size)&&void 0!==n?n:0)}hasListeners(t){return this.listenerCount(t)>0}}var gl="sdk:initialized",bl="sdk:config_updated",yl="sdk:remote_config_loaded",wl="consent:updated",Cl="event:captured",Sl="recording:started",kl="recording:stopped",_l=0,Il=!1,xl=!1;function Al(t){(_l+=1)<2||(Il=!0,xl||(xl=!0,ll().warn(t,"vTilt network requests are being cancelled before reaching the server (likely an ad blocker, privacy extension, or DNS-level filter). Further retries and snapshots have been suspended for this page. Route SDK traffic through your own domain to avoid this — see https://www.vtilt.com/docs/browser/reverse-proxy.")))}function Ml(){_l=0}function Rl(){return Il}var Ol="23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function El(t){for(var e=(2<<31-Math.clz32(57))-1,i=Math.ceil(1.6*e*t/57),r="";r.length<t;)for(var n=crypto.getRandomValues(new Uint8Array(i)),s=0;s<i&&r.length<t;s++){var o=n[s]&e;o<57&&(r+=Ol[o])}return r}var Tl=1048576;function Ll(t,e,i){if(t)if(Array.isArray(t))t.forEach((t,r)=>{e.call(i,t,r)});else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(i,t[r],r)}function Nl(t,e,i,r){var{capture:n=!1,passive:s=!0}=null!=r?r:{};null==t||t.addEventListener(e,i,{capture:n,passive:s})}function Bl(t,e){if(!e)return t;for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function Fl(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];for(var n of i)for(var s of n)t.push(s);return t}function Dl(t){var e={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];null!=r&&""!==r&&(e[i]=r)}return e}var jl=[".sr-only",".visually-hidden",".w-condition-invisible",'[class*="w-condition-invisible"]','[class*="condition-invisible"]','input[type="hidden"]'].join(", ");function Pl(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];var n=function(){for(var t=new Set,e=[],i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];for(var s of r)if(s)for(var o of s.split(",")){var a=o.trim();a&&!t.has(a)&&(t.add(a),e.push(a))}return e}(...t?[]:[jl],...i);return n.length>0?n.join(", "):void 0}var Ul=[Ku.MouseMove,Ku.MouseInteraction,Ku.Scroll,Ku.ViewportResize,Ku.Input,Ku.TouchMove,Ku.MediaInteraction,Ku.Drag];function $l(t){try{return new Blob([JSON.stringify(t)]).size}catch(e){return 2*JSON.stringify(t).length}}function zl(t,e){if(void 0===e&&(e=6606028.8),t.size>=e&&t.data.length>1){var i=Math.floor(t.data.length/2),r=t.data.slice(0,i),n=t.data.slice(i);return[...zl({size:$l(r),data:r,sessionId:t.sessionId,windowId:t.windowId}),...zl({size:$l(n),data:n,sessionId:t.sessionId,windowId:t.windowId})]}return[t]}function Wl(t){return t.type===Xu.Custom&&"sessionIdle"===t.data.tag}function Gl(t){return 3===t.type&&Ul.includes(t.data.source)}function Zl(t,e,i,r,n){return t<e||t>i?(ll().warn("replay",r+" must be between "+e+" and "+i+". Using default: "+n),n):t}var Vl=Uint8Array,Yl=Uint16Array,Jl=Int32Array,Xl=new Vl([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Kl=new Vl([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Hl=new Vl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ql=function(t,e){for(var i=new Yl(31),r=0;r<31;++r)i[r]=e+=1<<t[r-1];var n=new Jl(i[30]);for(r=1;r<30;++r)for(var s=i[r];s<i[r+1];++s)n[s]=s-i[r]<<5|r;return{b:i,r:n}},Ql=ql(Xl,2),tc=Ql.b,ec=Ql.r;tc[28]=258,ec[258]=28;for(var ic=ql(Kl,0).r,rc=new Yl(32768),nc=0;nc<32768;++nc){var sc=(43690&nc)>>1|(21845&nc)<<1;sc=(61680&(sc=(52428&sc)>>2|(13107&sc)<<2))>>4|(3855&sc)<<4,rc[nc]=((65280&sc)>>8|(255&sc)<<8)>>1}var oc=function(t,e,i){for(var r=t.length,n=0,s=new Yl(e);n<r;++n)t[n]&&++s[t[n]-1];var o,a=new Yl(e);for(n=1;n<e;++n)a[n]=a[n-1]+s[n-1]<<1;if(i){o=new Yl(1<<e);var h=15-e;for(n=0;n<r;++n)if(t[n])for(var u=n<<4|t[n],l=e-t[n],c=a[t[n]-1]++<<l,d=c|(1<<l)-1;c<=d;++c)o[rc[c]>>h]=u}else for(o=new Yl(r),n=0;n<r;++n)t[n]&&(o[n]=rc[a[t[n]-1]++]>>15-t[n]);return o},ac=new Vl(288);for(nc=0;nc<144;++nc)ac[nc]=8;for(nc=144;nc<256;++nc)ac[nc]=9;for(nc=256;nc<280;++nc)ac[nc]=7;for(nc=280;nc<288;++nc)ac[nc]=8;var hc=new Vl(32);for(nc=0;nc<32;++nc)hc[nc]=5;var uc=oc(ac,9,0),lc=oc(hc,5,0),cc=function(t){return(t+7)/8|0},dc=function(t,e,i){return(null==i||i>t.length)&&(i=t.length),new Vl(t.subarray(e,i))},vc=function(t,e,i){i<<=7&e;var r=e/8|0;t[r]|=i,t[r+1]|=i>>8},fc=function(t,e,i){i<<=7&e;var r=e/8|0;t[r]|=i,t[r+1]|=i>>8,t[r+2]|=i>>16},pc=function(t,e){for(var i=[],r=0;r<t.length;++r)t[r]&&i.push({s:r,f:t[r]});var n=i.length,s=i.slice();if(!n)return{t:Sc,l:0};if(1==n){var o=new Vl(i[0].s+1);return o[i[0].s]=1,{t:o,l:1}}i.sort(function(t,e){return t.f-e.f}),i.push({s:-1,f:25001});var a=i[0],h=i[1],u=0,l=1,c=2;for(i[0]={s:-1,f:a.f+h.f,l:a,r:h};l!=n-1;)a=i[i[u].f<i[c].f?u++:c++],h=i[u!=l&&i[u].f<i[c].f?u++:c++],i[l++]={s:-1,f:a.f+h.f,l:a,r:h};var d=s[0].s;for(r=1;r<n;++r)s[r].s>d&&(d=s[r].s);var v=new Yl(d+1),f=mc(i[l-1],v,0);if(f>e){r=0;var p=0,m=f-e,g=1<<m;for(s.sort(function(t,e){return v[e.s]-v[t.s]||t.f-e.f});r<n;++r){var b=s[r].s;if(!(v[b]>e))break;p+=g-(1<<f-v[b]),v[b]=e}for(p>>=m;p>0;){var y=s[r].s;v[y]<e?p-=1<<e-v[y]++-1:++r}for(;r>=0&&p;--r){var w=s[r].s;v[w]==e&&(--v[w],++p)}f=e}return{t:new Vl(v),l:f}},mc=function(t,e,i){return-1==t.s?Math.max(mc(t.l,e,i+1),mc(t.r,e,i+1)):e[t.s]=i},gc=function(t){for(var e=t.length;e&&!t[--e];);for(var i=new Yl(++e),r=0,n=t[0],s=1,o=function(t){i[r++]=t},a=1;a<=e;++a)if(t[a]==n&&a!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=t[a]}return{c:i.subarray(0,r),n:e}},bc=function(t,e){for(var i=0,r=0;r<e.length;++r)i+=t[r]*e[r];return i},yc=function(t,e,i){var r=i.length,n=cc(e+2);t[n]=255&r,t[n+1]=r>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<r;++s)t[n+s+4]=i[s];return 8*(n+4+r)},wc=function(t,e,i,r,n,s,o,a,h,u,l){vc(e,l++,i),++n[256];for(var c=pc(n,15),d=c.t,v=c.l,f=pc(s,15),p=f.t,m=f.l,g=gc(d),b=g.c,y=g.n,w=gc(p),C=w.c,S=w.n,k=new Yl(19),_=0;_<b.length;++_)++k[31&b[_]];for(_=0;_<C.length;++_)++k[31&C[_]];for(var I=pc(k,7),x=I.t,A=I.l,M=19;M>4&&!x[Hl[M-1]];--M);var R,O,E,T,L=u+5<<3,N=bc(n,ac)+bc(s,hc)+o,B=bc(n,d)+bc(s,p)+o+14+3*M+bc(k,x)+2*k[16]+3*k[17]+7*k[18];if(h>=0&&L<=N&&L<=B)return yc(e,l,t.subarray(h,h+u));if(vc(e,l,1+(B<N)),l+=2,B<N){R=oc(d,v,0),O=d,E=oc(p,m,0),T=p;var F=oc(x,A,0);vc(e,l,y-257),vc(e,l+5,S-1),vc(e,l+10,M-4),l+=14;for(_=0;_<M;++_)vc(e,l+3*_,x[Hl[_]]);l+=3*M;for(var D=[b,C],j=0;j<2;++j){var P=D[j];for(_=0;_<P.length;++_){var U=31&P[_];vc(e,l,F[U]),l+=x[U],U>15&&(vc(e,l,P[_]>>5&127),l+=P[_]>>12)}}}else R=uc,O=ac,E=lc,T=hc;for(_=0;_<a;++_){var z=r[_];if(z>255){fc(e,l,R[(U=z>>18&31)+257]),l+=O[U+257],U>7&&(vc(e,l,z>>23&31),l+=Xl[U]);var W=31&z;fc(e,l,E[W]),l+=T[W],W>3&&(fc(e,l,z>>5&8191),l+=Kl[W])}else fc(e,l,R[z]),l+=O[z]}return fc(e,l,R[256]),l+O[256]},Cc=new Jl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Sc=new Vl(0),kc=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var i=e,r=9;--r;)i=(1&i&&-306674912)^i>>>1;t[e]=i}return t}(),_c=function(t,e,i,r,n){if(!n&&(n={l:1},e.dictionary)){var s=e.dictionary.subarray(-32768),o=new Vl(s.length+t.length);o.set(s),o.set(t,s.length),t=o,n.w=s.length}return function(t,e,i,r,n,s){var o=s.z||t.length,a=new Vl(r+o+5*(1+Math.ceil(o/7e3))+n),h=a.subarray(r,a.length-n),u=s.l,l=7&(s.r||0);if(e){l&&(h[0]=s.r>>3);for(var c=Cc[e-1],d=c>>13,v=8191&c,f=(1<<i)-1,p=s.p||new Yl(32768),m=s.h||new Yl(f+1),g=Math.ceil(i/3),b=2*g,y=function(e){return(t[e]^t[e+1]<<g^t[e+2]<<b)&f},w=new Jl(25e3),C=new Yl(288),S=new Yl(32),k=0,_=0,I=s.i||0,x=0,A=s.w||0,M=0;I+2<o;++I){var R=y(I),O=32767&I,E=m[R];if(p[O]=E,m[R]=O,A<=I){var T=o-I;if((k>7e3||x>24576)&&(T>423||!u)){l=wc(t,h,0,w,C,S,_,x,M,I-M,l),x=k=_=0,M=I;for(var L=0;L<286;++L)C[L]=0;for(L=0;L<30;++L)S[L]=0}var N=2,B=0,F=v,D=O-E&32767;if(T>2&&R==y(I-D))for(var j=Math.min(d,T)-1,P=Math.min(32767,I),U=Math.min(258,T);D<=P&&--F&&O!=E;){if(t[I+N]==t[I+N-D]){for(var z=0;z<U&&t[I+z]==t[I+z-D];++z);if(z>N){if(N=z,B=D,z>j)break;var W=Math.min(D,z-2),G=0;for(L=0;L<W;++L){var Z=I-D+L&32767,V=Z-p[Z]&32767;V>G&&(G=V,E=Z)}}}D+=(O=E)-(E=p[O])&32767}if(B){w[x++]=268435456|ec[N]<<18|ic[B];var Y=31&ec[N],J=31&ic[B];_+=Xl[Y]+Kl[J],++C[257+Y],++S[J],A=I+N,++k}else w[x++]=t[I],++C[t[I]]}}for(I=Math.max(I,A);I<o;++I)w[x++]=t[I],++C[t[I]];l=wc(t,h,u,w,C,S,_,x,M,I-M,l),u||(s.r=7&l|h[l/8|0]<<3,l-=7,s.h=m,s.p=p,s.i=I,s.w=A)}else{for(I=s.w||0;I<o+u;I+=65535){var X=I+65535;X>=o&&(h[l/8|0]=u,X=o),l=yc(h,l+1,t.subarray(I,X))}s.i=o}return dc(a,0,r+cc(l)+n)}(t,null==e.level?6:e.level,null==e.mem?n.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,i,r,n)},Ic=function(t,e,i){for(;i;++e)t[e]=i,i>>>=8};function xc(t,e){e||(e={});var i=function(){var t=-1;return{p:function(e){for(var i=t,r=0;r<e.length;++r)i=kc[255&i^e[r]]^i>>>8;t=i},d:function(){return~t}}}(),r=t.length;i.p(t);var n=_c(t,e,function(t){return 10+(t.filename?t.filename.length+1:0)}(e),8),s=n.length;return function(t,e){var i=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&Ic(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),i){t[3]=8;for(var r=0;r<=i.length;++r)t[r+10]=i.charCodeAt(r)}}(n,e),Ic(n,s-8,i.d()),Ic(n,s-4,r),n}var Ac="undefined"!=typeof TextEncoder&&new TextEncoder,Mc="undefined"!=typeof TextDecoder&&new TextDecoder;try{Mc.decode(Sc,{stream:!0})}catch(t){}function Rc(t,e){if(Ac)return Ac.encode(t);for(var i=t.length,r=new Vl(t.length+(t.length>>1)),n=0,s=function(t){r[n++]=t},o=0;o<i;++o){if(n+5>r.length){var a=new Vl(n+8+(i-o<<1));a.set(r),r=a}var h=t.charCodeAt(o);h<128||e?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return dc(r,0,n)}function Oc(t){if("undefined"==typeof btoa)throw new Error("btoa is not available in this environment");for(var e="",i=0;i<t.length;i+=32768){var r=Math.min(i+32768,t.length),n=t.subarray(i,r);e+=String.fromCharCode.apply(null,n)}return btoa(e)}var Ec="replay";function Tc(){var t,e;return null===(e=null===(t=null==Ju?void 0:Ju.__VTiltExtensions__)||void 0===t?void 0:t.rrweb)||void 0===e?void 0:e.record}function Lc(t,e){var i=t.includes("?")?"&":"?";return""+t+i+"compression="+e}function Nc(t){return{rrwebMethod:t,enqueuedAt:Date.now(),attempt:1}}class Bc{constructor(t,e){void 0===e&&(e={}),this.C="/api/s",this.S=!1,this.k="unknown",this.I=Date.now(),this.A="",this.M="",this.R=[],this.O=()=>{this.T()},this.L=()=>{this.T()},this.N=()=>{this.B("browser offline",{})},this.F=()=>{this.B("browser online",{})},this.D=()=>{if(null==Gu?void 0:Gu.visibilityState){var t="window "+Gu.visibilityState;this.B(t,{}),"hidden"===Gu.visibilityState&&this.T()}},this._instance=t,this.j=e,this.P=this.U()}get isStarted(){return this.S}get started(){return this.S}get sessionId(){return this.A}get status(){return this.S?!0===this.k?"paused":"active":"disabled"}start(t){this.$()?(this.W(t),$u&&(Nl($u,"beforeunload",this.O),Nl($u,"pagehide",this.L),Nl($u,"offline",this.N),Nl($u,"online",this.F),Nl($u,"visibilitychange",this.D))):this.stop()}stop(){this.S&&this.G&&(this.G(),this.G=void 0,this.S=!1,$u&&($u.removeEventListener("beforeunload",this.O),$u.removeEventListener("pagehide",this.L),$u.removeEventListener("offline",this.N),$u.removeEventListener("online",this.F),$u.removeEventListener("visibilitychange",this.D)),this.T(),this.U(),this.Z&&clearInterval(this.Z),ll().info(Ec,"stopped"))}stopRecording(){this.stop()}addCustomEvent(t,e){return this.B(t,e)}takeFullSnapshot(){return this.V()}log(t,e){void 0===e&&(e="log"),this.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:e,trace:[],payload:[JSON.stringify(t)]}},timestamp:Date.now()})}updateConfig(t){this.j=i({},this.j,t)}$(){return!!this.j.enabled&&!!$u}W(t){var e;if(void 0!==Object.assign&&void 0!==Array.from&&!this.S){this.S=!0;var i=this._instance.getSessionId();this.A=i||this.Y(),this.M=(null===(e=this._instance.sessionManager)||void 0===e?void 0:e.getWindowId())||this.Y(),Tc()?this.J():this.X(()=>{this.J()}),ll().info(Ec,"starting"),t&&this.K(t)}}X(t){var e,i=null===(e=Ju.__VTiltExtensions__)||void 0===e?void 0:e.loadExternalDependency;i?i(this._instance,"recorder",e=>{e?ll().error(Ec,"could not load recorder:",e):t()}):ll().error(Ec,"loadExternalDependency not available; make sure external-scripts-loader is initialized")}J(){var t,e,r=Tc();if(r){var n={blockClass:this.j.blockClass||"vt-no-capture",ignoreClass:this.j.ignoreClass||"vt-ignore-input",maskTextClass:this.j.maskTextClass||"vt-mask",maskTextSelector:this.j.maskTextSelector,maskTextFn:void 0,maskAllInputs:null===(t=this.j.maskAllInputs)||void 0===t||t,maskInputOptions:i({password:!0},this.j.maskInputOptions),maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},s=this.H();s.enabled&&(n.recordCanvas=!0,n.sampling={canvas:s.fps},n.dataURLOptions={type:"image/webp",quality:s.quality});var o=this.q();o&&(n.maskAllInputs=null===(e=o.maskAllInputs)||void 0===e||e,n.maskTextSelector=o.maskTextSelector),n.blockSelector=Pl(this.j.skipDefaultInvisibleBlocking,this.j.blockSelector,null==o?void 0:o.blockSelector);var a=this.tt();this.G=r(i({emit:t=>{this.onRRwebEmit(t)},plugins:a},n)),this.I=Date.now(),this.k="boolean"==typeof this.k?this.k:"unknown",this.B("$session_options",{sessionRecordingOptions:n,activePlugins:a.map(t=>null==t?void 0:t.name)})}else ll().error(Ec,"onScriptLoaded was called but rrwebRecord is not available")}tt(){var t,e,i=[];if(this.j.captureConsole)try{var r=null===(e=null===(t=Ju.__VTiltExtensions__)||void 0===t?void 0:t.rrwebPlugins)||void 0===e?void 0:e.getRecordConsolePlugin;r&&i.push(r())}catch(t){ll().warn(Ec,"failed to load console plugin",t)}return i}onRRwebEmit(t){if(this.et(),t&&"object"==typeof t){if(t.type===Xu.Meta){var e=t.data;this.it=e.href}if(function(t){return t.type===Xu.Custom&&"recording paused"===t.data.tag}(t)||Wl(t));else if(!0===this.k&&!Gl(t))return;t.type===Xu.FullSnapshot&&this.rt();var r=function(t){if(t.type!==Xu.Plugin||"rrweb/console@1"!==t.data.plugin)return t;var e=t.data.payload;if(!(null==e?void 0:e.payload))return t;var r=e.payload.map(t=>"string"==typeof t&&t.length>1e3?t.substring(0,1e3)+"... [truncated]":t);return i({},t,{data:i({},t.data,{payload:i({},e,{payload:r})})})}(t);if(this.nt(r),!0!==this.k||Wl(r)){var n={$snapshot_bytes:$l(r),$snapshot_data:r,$session_id:this.A,$window_id:this.M};"disabled"!==this.status?this.st(n):this.U()}}}et(){if(0!==this.R.length){var t=[...this.R];this.R=[],t.forEach(t=>{Date.now()-t.enqueuedAt<=2e3&&this.ot(t)})}}nt(t){var e,i=Gl(t);if(!i&&!this.k){var r=t.timestamp-this.I,n=this.j.sessionIdleThresholdMs||3e5;r>n&&(this.k=!0,this.Z&&clearInterval(this.Z),this.B("sessionIdle",{eventTimestamp:t.timestamp,lastActivityTimestamp:this.I,threshold:n,bufferLength:this.P.data.length,bufferSize:this.P.size}),this.ht())}var s=!1;if(i&&(this.I=t.timestamp,this.k)){var o="unknown"===this.k;this.k=!1,o||(this.B("sessionNoLongerIdle",{reason:"user activity",type:t.type}),s=!0)}if(!this.k){var a=this._instance.getSessionId();this.A&&a&&a!==this.A?(this.T(),this.U(),this.A=a,this.M=(null===(e=this._instance.sessionManager)||void 0===e?void 0:e.getWindowId())||this.Y(),this.P.sessionId=this.A,this.P.windowId=this.M,this.rt(),this.V(),this.K("session_id_changed")):s&&(this.rt(),this.V())}}U(){return this.P={size:0,data:[],sessionId:this.A,windowId:this.M},this.P}ht(){return this.ut&&(clearTimeout(this.ut),this.ut=void 0),"paused"===this.status||"disabled"===this.status?(this.ut=setTimeout(()=>{this.ht()},2e3),this.P):(this.lt(),this.U())}T(){this.ut&&(clearTimeout(this.ut),this.ut=void 0),this.lt()}lt(){this.P.data.length>0&&zl(this.P).forEach(t=>{this.ct({$snapshot_bytes:t.size,$snapshot_data:t.data,$session_id:t.sessionId,$window_id:t.windowId})})}st(t){var e,i=2+((null===(e=this.P)||void 0===e?void 0:e.data.length)||0),r=t.$snapshot_bytes;!this.k&&(this.P.size+r+i>943718.4||this.P.sessionId!==this.A)&&(this.P=this.ht()),this.P.size+=r,this.P.data.push(t.$snapshot_data),this.ut||this.k||(this.ut=setTimeout(()=>{this.ht()},2e3))}ct(t){var e=this._instance.getConfig(),i=e.token||"";if(i){if(!Rl()){var r=!1!==this.j.compressEvents,n={token:i,distinct_id:this._instance.getDistinctId()||this._instance.getAnonymousId()||"",$session_id:this.A,$window_id:this.M,$snapshot_data:t.$snapshot_data,$snapshot_bytes:t.$snapshot_bytes,$lib:"web",$lib_version:this._instance.version||"unknown",timestamp:Date.now()};this.dt(e,i,n,r)}}else ll().warn(Ec,"missing token, cannot send snapshot")}dt(t,e,i,r){var n=JSON.stringify(i),s=i.$snapshot_data,o=Array.isArray(s)&&s.some(t=>2===(null==t?void 0:t.type));if(n.length>61440||o){var a=fl(t,this.C);this.ft(a,e,n,r)}else{var h=fl(t,this.C,{includeTokenQuery:!0});this.gt(h,e,n,r)}}ft(t,e,i,r){if(r&&void 0!==$u)try{var n=xc(Rc(i));if(n.length>0){var s=new Blob([n],{type:"application/octet-stream"});if(s.size>0){var o=Lc(t,"gzip-js");return void this.bt(o,e,s,"application/octet-stream")}}}catch(t){ll().warn(Ec,"compression failed, sending uncompressed")}var a=new Blob([i],{type:"application/json"});this.bt(t,e,a,"application/json")}gt(t,e,i,r){if(r&&void 0!==$u)try{var n=xc(Rc(i));if(n.length>0){var s=Oc(n);if(s.length>0&&s.length<=61440){var o=Lc(t,"base64"),a=new Blob([s],{type:"text/plain"});if("undefined"!=typeof navigator&&navigator.sendBeacon&&navigator.sendBeacon(o,a))return;return void this.bt(o,"",a,"text/plain")}}}catch(t){ll().warn(Ec,"compression failed, sending uncompressed")}var h=new Blob([i],{type:"application/json"});"undefined"!=typeof navigator&&navigator.sendBeacon&&navigator.sendBeacon(t,h)||this.bt(t,"",h,"application/json")}bt(t,e,i,r,n){void 0===n&&(n=0);var s=i.size<6e4,o={"Content-Type":r};e&&(o[vl]=e),fetch(t,{method:"POST",body:i,headers:o,keepalive:s}).then(s=>{if(!s.ok)return s.status>=400&&s.status<500?(Ml(),void ll().warn(Ec,"snapshot rejected by server ("+s.status+"), not retrying")):void this.yt(t,e,i,r,n);Ml()}).catch(()=>{Al(Ec),this.yt(t,e,i,r,n)})}yt(t,e,i,r,n){if(n>=5)ll().error(Ec,"failed to send snapshot after 5 retries, giving up");else if(!Rl()){var s=3e3*Math.pow(2,n),o=Math.min(s,3e4),a=(Math.random()-.5)*o,h=Math.ceil(o+a);ll().warn(Ec,"snapshot send failed, retrying in "+Math.round(h/1e3)+"s (attempt "+(n+1)+"/5)"),setTimeout(()=>{this.bt(t,e,i,r,n+1)},h)}}rt(){if(this.Z&&clearInterval(this.Z),!0!==this.k){var t=this.j.fullSnapshotIntervalMs||3e5;this.Z=setInterval(()=>{this.V()},t)}}ot(t){try{return t.rrwebMethod(),!0}catch(e){return this.R.length<10?this.R.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt+1,rrwebMethod:t.rrwebMethod}):ll().warn(Ec,"could not emit queued rrweb event",e,t),!1}}B(t,e){return this.ot(Nc(()=>Tc().addCustomEvent(t,e)))}V(){return this.ot(Nc(()=>Tc().takeFullSnapshot()))}H(){var t,e,i,r=this.j.captureCanvas,n=null!==(t=null==r?void 0:r.recordCanvas)&&void 0!==t&&t,s=null!==(e=null==r?void 0:r.canvasFps)&&void 0!==e?e:4,o=null!==(i=null==r?void 0:r.canvasQuality)&&void 0!==i?i:.4;return{enabled:n,fps:Zl(s,0,12,"canvas recording fps",4),quality:Zl(o,0,1,"canvas recording quality",.4)}}q(){var t,e=this.j.masking;if(e)return{maskAllInputs:null===(t=e.maskAllInputs)||void 0===t||t,maskTextSelector:e.maskTextSelector,blockSelector:e.blockSelector}}Y(){return Math.random().toString(36).substring(2,15)}K(t,e){ll().info(Ec,t.replace(/_/g," "),e),"recording_initialized"!==t&&"session_id_changed"!==t&&this.B(t,e)}}Ju.__VTiltExtensions__=Ju.__VTiltExtensions__||{},Ju.__VTiltExtensions__.rrweb={record:Au,version:"v2"},Ju.__VTiltExtensions__.rrwebPlugins={getRecordConsolePlugin:t=>({name:"rrweb/console@1",observer:Uu,options:t})},Ju.__VTiltExtensions__.initSessionRecording=function(t,e){return new Bc(t,e)};var Fc,Dc=-1,jc=function(t){addEventListener("pageshow",function(e){e.persisted&&(Dc=e.timeStamp,t(e))},!0)},Pc=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Uc=function(){var t=Pc();return t&&t.activationStart||0},$c=function(t,e){var i=Pc(),r="navigate";return Dc>=0?r="back-forward-cache":i&&(document.prerendering||Uc()>0?r="prerender":document.wasDiscarded?r="restore":i.type&&(r=i.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zc=function(t,e,i){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(t){Promise.resolve().then(function(){e(t.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},i||{})),r}}catch(t){}},Wc=function(t,e,i,r){var n,s;return function(o){e.value>=0&&(o||r)&&((s=e.value-(n||0))||void 0===n)&&(n=e.value,e.delta=s,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,i),t(e))}},Gc=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Zc=function(t){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},Vc=function(t){var e=!1;return function(i){e||(t(i),e=!0)}},Yc=-1,Jc=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Xc=function(t){"hidden"===document.visibilityState&&Yc>-1&&(Yc="visibilitychange"===t.type?t.timeStamp:0,Hc())},Kc=function(){addEventListener("visibilitychange",Xc,!0),addEventListener("prerenderingchange",Xc,!0)},Hc=function(){removeEventListener("visibilitychange",Xc,!0),removeEventListener("prerenderingchange",Xc,!0)},qc=function(){return Yc<0&&(Yc=Jc(),Kc(),jc(function(){setTimeout(function(){Yc=Jc(),Kc()},0)})),{get firstHiddenTime(){return Yc}}},Qc=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},td=[1800,3e3],ed=function(t,e){e=e||{},Qc(function(){var i,r=qc(),n=$c("FCP"),s=zc("paint",function(t){t.forEach(function(t){"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime<r.firstHiddenTime&&(n.value=Math.max(t.startTime-Uc(),0),n.entries.push(t),i(!0)))})});s&&(i=Wc(t,n,td,e.reportAllChanges),jc(function(r){n=$c("FCP"),i=Wc(t,n,td,e.reportAllChanges),Gc(function(){n.value=performance.now()-r.timeStamp,i(!0)})}))})},id=[.1,.25],rd=0,nd=1/0,sd=0,od=function(t){t.forEach(function(t){t.interactionId&&(nd=Math.min(nd,t.interactionId),sd=Math.max(sd,t.interactionId),rd=sd?(sd-nd)/7+1:0)})},ad=function(){return Fc?rd:performance.interactionCount||0},hd=function(){"interactionCount"in performance||Fc||(Fc=zc("event",od,{type:"event",buffered:!0,durationThreshold:0}))},ud=[200,500],ld=0,cd=function(){return ad()-ld},dd=[],vd={},fd=function(t){var e=dd[dd.length-1],i=vd[t.interactionId];if(i||dd.length<10||t.duration>e.latency){if(i)i.entries.push(t),i.latency=Math.max(i.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};vd[r.id]=r,dd.push(r)}dd.sort(function(t,e){return e.latency-t.latency}),dd.splice(10).forEach(function(t){delete vd[t.id]})}},pd=[2500,4e3],md={},gd=[800,1800],bd=function t(e){document.prerendering?Qc(function(){return t(e)}):"complete"!==document.readyState?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},yd={onLCP:function(t,e){e=e||{},Qc(function(){var i,r=qc(),n=$c("LCP"),s=function(t){var e=t[t.length-1];e&&e.startTime<r.firstHiddenTime&&(n.value=Math.max(e.startTime-Uc(),0),n.entries=[e],i())},o=zc("largest-contentful-paint",s);if(o){i=Wc(t,n,pd,e.reportAllChanges);var a=Vc(function(){md[n.id]||(s(o.takeRecords()),o.disconnect(),md[n.id]=!0,i(!0))});["keydown","click"].forEach(function(t){addEventListener(t,function(){return setTimeout(a,0)},!0)}),Zc(a),jc(function(r){n=$c("LCP"),i=Wc(t,n,pd,e.reportAllChanges),Gc(function(){n.value=performance.now()-r.timeStamp,md[n.id]=!0,i(!0)})})}})},onCLS:function(t,e){e=e||{},ed(Vc(function(){var i,r=$c("CLS",0),n=0,s=[],o=function(t){t.forEach(function(t){if(!t.hadRecentInput){var e=s[0],i=s[s.length-1];n&&t.startTime-i.startTime<1e3&&t.startTime-e.startTime<5e3?(n+=t.value,s.push(t)):(n=t.value,s=[t])}}),n>r.value&&(r.value=n,r.entries=s,i())},a=zc("layout-shift",o);a&&(i=Wc(t,r,id,e.reportAllChanges),Zc(function(){o(a.takeRecords()),i(!0)}),jc(function(){n=0,r=$c("CLS",0),i=Wc(t,r,id,e.reportAllChanges),Gc(function(){return i()})}),setTimeout(i,0))}))},onFCP:ed,onINP:function(t,e){e=e||{},Qc(function(){var i;hd();var r,n=$c("INP"),s=function(t){t.forEach(function(t){t.interactionId&&fd(t),"first-input"===t.entryType&&!dd.some(function(e){return e.entries.some(function(e){return t.duration===e.duration&&t.startTime===e.startTime})})&&fd(t)});var e,i=(e=Math.min(dd.length-1,Math.floor(cd()/50)),dd[e]);i&&i.latency!==n.value&&(n.value=i.latency,n.entries=i.entries,r())},o=zc("event",s,{durationThreshold:null!==(i=e.durationThreshold)&&void 0!==i?i:40});r=Wc(t,n,ud,e.reportAllChanges),o&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),Zc(function(){s(o.takeRecords()),n.value<0&&cd()>0&&(n.value=0,n.entries=[]),r(!0)}),jc(function(){dd=[],ld=ad(),n=$c("INP"),r=Wc(t,n,ud,e.reportAllChanges)}))})},onTTFB:function(t,e){e=e||{};var i=$c("TTFB"),r=Wc(t,i,gd,e.reportAllChanges);bd(function(){var n=Pc();if(n){var s=n.responseStart;if(s<=0||s>performance.now())return;i.value=Math.max(s-Uc(),0),i.entries=[n],r(!0),jc(function(){i=$c("TTFB",0),(r=Wc(t,i,gd,e.reportAllChanges))(!0)})}})}};Ju.__VTiltExtensions__=Ju.__VTiltExtensions__||{},Ju.__VTiltExtensions__.webVitalsCallbacks=yd;var wd="external-scripts";Ju.__VTiltExtensions__=Ju.__VTiltExtensions__||{},Ju.__VTiltExtensions__.loadExternalDependency=(t,e,i)=>{var r=((t,e)=>{var i=t.getConfig();return i.script_host?i.script_host.replace(/\/+$/gm,"")+"/"+e+".js":i.api_host?i.api_host.replace(/\/+$/gm,"")+"/dist/"+e+".js":(ll().error(wd,"cannot load "+e+".js: api_host is required"),"")})(t,e);((t,e,i)=>{if(t.getConfig().disable_external_dependency_loading)return ll().warn(wd,e+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=null==Gu?void 0:Gu.querySelectorAll("script");if(r)for(var n,s=function(){if(r[o].src===e){var t=r[o];return t.__vtilt_loading_callback_fired?{v:i()}:(t.addEventListener("load",e=>{t.__vtilt_loading_callback_fired=!0,i(void 0,e)}),t.onerror=t=>i(t),{v:void 0})}},o=0;o<r.length;o++)if(n=s())return n.v;var a=()=>{var t;if(!Gu)return i("document not found");var r=Gu.createElement("script");r.type="text/javascript",r.crossOrigin="anonymous",r.src=e,r.onload=t=>{r.__vtilt_loading_callback_fired=!0,i(void 0,t)},r.onerror=t=>i(t);var n=Gu.querySelectorAll("body > script");n.length>0?null===(t=n[0].parentNode)||void 0===t||t.insertBefore(r,n[0]):Gu.body.appendChild(r)};(null==Gu?void 0:Gu.body)?a():null==Gu||Gu.addEventListener("DOMContentLoaded",a)})(t,r,i)};var Cd="1.13.0",Sd="__vt_session",kd="__vt_window_id",_d="__vt_primary_window",Id="__vt_user_state",xd="__vt_device_id",Ad="__vt_anonymous_id",Md="__vt_remote_config",Rd="__vt_distinct_id",Od="__vt_user_properties",Ed="localStorage",Td="localStorage+cookie",Ld="sessionStorage",Nd="memory",Bd="$initial_person_info",Fd="$pageview",Dd="$pageleave",jd="$identify",Pd="$alias",Ud="$set",$d="$performance_event",zd="$autocapture",Wd="$scroll_depth",Gd="$snapshot",Zd="$snapshot_items",Vd="$$client_ingestion_warning",Yd="$current_url",Jd="$pathname",Xd="$prev_pageview_duration",Kd="$prev_pageview_pathname",Hd="$prev_pageview_url",qd="$scroll_depth_pct",Qd="$scroll_depth_max_pct",tv="$prev_pageview_scroll_depth_pct";class ev{constructor(t){void 0===t&&(t={}),this.config=this.parseConfigFromScript(t)}parseConfigFromScript(t){if(!(null==Gu?void 0:Gu.currentScript))return i({token:t.token||""},t);var e=Gu.currentScript,r=i({token:""},t);r.api_host=e.getAttribute("data-api-host")||e.getAttribute("data-host")||t.api_host,r.script_host=e.getAttribute("data-script-host")||t.script_host,r.token=e.getAttribute("data-token")||t.token||"",r.domain=e.getAttribute("data-domain")||t.domain,r.storage=e.getAttribute("data-storage")||t.storage,r.stringifyPayload="false"!==e.getAttribute("data-stringify-payload");var n="true"===e.getAttribute("data-capture-performance");for(var s of(r.capture_performance=!!n||t.capture_performance,r.globalAttributes=i({},t.globalAttributes),Array.from(e.attributes)))s.name.startsWith("data-vt-")&&(r.globalAttributes[s.name.slice(8).replace(/-/g,"_")]=s.value);return r}getConfig(){return i({},this.config)}updateConfig(t){this.config=i({},this.config,t)}}var iv=[Ad,xd,Rd,Id],rv=31536e3,nv=["herokuapp.com","vercel.app","netlify.app"];function sv(t){var e;if(!t||"undefined"==typeof document)return"";var i=null===(e=document.location)||void 0===e?void 0:e.hostname;if(!i)return"";var r=i.match(/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i);return r?"."+r[0]:""}class ov{constructor(t){var e,i,r;this.memoryStorage=new Map,this.wt=null,this.method=t.method,this.cross_subdomain=null!==(e=t.cross_subdomain)&&void 0!==e?e:function(){var t;if("undefined"==typeof document)return!1;var e=null===(t=document.location)||void 0===t?void 0:t.hostname;if(!e)return!1;var i=e.split(".").slice(-2).join(".");return!nv.includes(i)}(),this.sameSite=null!==(i=t.sameSite)&&void 0!==i?i:"Lax",this.secure=null!==(r=t.secure)&&void 0!==r?r:"undefined"!=typeof location&&"https:"===location.protocol}isLocalStorageSupported(){if(null!==this.wt)return this.wt;if(void 0===$u||!$u.localStorage)return this.wt=!1,!1;try{var t="__vt_ls_test__";$u.localStorage.setItem(t,"1");var e="1"===$u.localStorage.getItem(t);return $u.localStorage.removeItem(t),this.wt=e,e||ll().warn("storage","localStorage unavailable, using cookies"),e}catch(t){return this.wt=!1,ll().warn("storage","localStorage unavailable, using cookies"),!1}}isCriticalProperty(t){return iv.includes(t)}get(t){var e;try{switch(this.method){case Nd:return null!==(e=this.memoryStorage.get(t))&&void 0!==e?e:null;case Td:return this.getLocalStoragePlusCookie(t);case Ed:return this.getLocalStorage(t);case Ld:return this.readFromSessionStorage(t);default:return this.getCookie(t)}}catch(e){return ll().warn("storage",'get error for "'+t+'":',e),null}}set(t,e,i){try{switch(this.method){case Nd:this.memoryStorage.set(t,e);break;case Td:this.setLocalStoragePlusCookie(t,e,i);break;case Ed:this.setLocalStorage(t,e);break;case Ld:this.writeToSessionStorage(t,e);break;default:this.setCookie(t,e,null!=i?i:rv)}}catch(e){ll().warn("storage",'set error for "'+t+'":',e)}}remove(t){try{switch(this.method){case Nd:this.memoryStorage.delete(t);break;case Td:this.removeLocalStoragePlusCookie(t);break;case Ed:this.removeLocalStorage(t);break;case Ld:this.removeFromSessionStorage(t);break;default:this.removeCookie(t)}}catch(e){ll().warn("storage",'remove error for "'+t+'":',e)}}getLocalStoragePlusCookie(t){if(this.isCriticalProperty(t)){var e=this.getCookie(t),i=this.getLocalStorage(t);if(null!==e){if(i!==e&&this.isLocalStorageSupported())try{null==$u||$u.localStorage.setItem(t,e)}catch(t){}return e}return null!==i?i:this.readFromSessionStorage(t)}return this.getLocalStorage(t)}setLocalStoragePlusCookie(t,e,i){this.setLocalStorage(t,e),this.isCriticalProperty(t)&&(this.setCookie(t,e,null!=i?i:rv),this.writeToSessionStorage(t,e))}removeLocalStoragePlusCookie(t){this.removeLocalStorage(t),this.isCriticalProperty(t)&&(this.removeCookie(t),this.removeFromSessionStorage(t))}getLocalStorage(t){var e;if(!this.isLocalStorageSupported())return null;try{return null!==(e=null==$u?void 0:$u.localStorage.getItem(t))&&void 0!==e?e:null}catch(t){return null}}setLocalStorage(t,e){if(this.isLocalStorageSupported())try{null==$u||$u.localStorage.setItem(t,e)}catch(t){ll().warn("storage","localStorage write error:",t)}}removeLocalStorage(t){if(this.isLocalStorageSupported())try{null==$u||$u.localStorage.removeItem(t)}catch(t){}}readFromSessionStorage(t){var e;try{return null!==(e=null==$u?void 0:$u.sessionStorage.getItem(t))&&void 0!==e?e:null}catch(t){return null}}writeToSessionStorage(t,e){try{null==$u||$u.sessionStorage.setItem(t,e)}catch(t){ll().warn("storage","sessionStorage write error:",t)}}removeFromSessionStorage(t){try{null==$u||$u.sessionStorage.removeItem(t)}catch(t){}}getCookie(t){if("undefined"==typeof document)return null;var e=t+"=";for(var i of document.cookie.split(";")){var r=i.trim();if(r.startsWith(e))try{return decodeURIComponent(r.slice(e.length))}catch(t){return r.slice(e.length)}}return null}setCookie(t,e,i){if("undefined"!=typeof document){var r=sv(this.cross_subdomain),n=t+"="+encodeURIComponent(e)+"; Max-Age="+i+"; path=/; SameSite="+this.sameSite;this.secure&&(n+="; Secure"),r&&(n+="; domain="+r),document.cookie=n}}removeCookie(t){if("undefined"!=typeof document){var e=sv(this.cross_subdomain);document.cookie=t+"=; Max-Age=0; path=/"+(e?"; domain="+e:""),document.cookie=t+"=; Max-Age=0; path=/"}}getWithExpiry(t){var e=this.get(t);if(!e)return null;try{var i=JSON.parse(e);return i.expiry&&Date.now()>i.expiry?(this.remove(t),null):i.value}catch(t){return null}}setWithExpiry(t,e,r){var n=i({value:e},r?{expiry:Date.now()+r}:{});this.set(t,JSON.stringify(n))}getJSON(t){var e=this.get(t);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}}setJSON(t,e,i){this.set(t,JSON.stringify(e),i)}canUseSessionStorage(){if(void 0===$u||!(null==$u?void 0:$u.sessionStorage))return!1;try{var t="__vt_ss_test__";return $u.sessionStorage.setItem(t,"1"),$u.sessionStorage.removeItem(t),!0}catch(t){return!1}}getSessionStorage(){var t;return this.canUseSessionStorage()&&null!==(t=null==$u?void 0:$u.sessionStorage)&&void 0!==t?t:null}setMethod(t){this.method=t}getMethod(){return this.method}}class av{constructor(t,e){void 0===t&&(t="cookie"),this.Ct=!1,this.storage=new ov({method:t,cross_subdomain:e,sameSite:"Lax"}),this.M=void 0,ll().debug("session","ctor")}hydrateFromStorage(){ll().debug("session","hydrate"),this.St()}getSessionId(){var t=this.kt();return t||(t=El(16),this._t(t),this.Ct=!0),t}setSessionId(){var t=this.kt(),e=t||El(16);return t||(this.Ct=!0),this._t(e),e}resetSessionId(){this.It(),this.Ct=!0,this.setSessionId(),this.xt(El(16))}consumeSessionStart(){return!!this.Ct&&(this.Ct=!1,!0)}kt(){return this.storage.get(Sd)}_t(t){this.storage.set(Sd,t,1800)}It(){this.storage.remove(Sd)}getWindowId(){if(this.M)return this.M;var t=this.storage.getSessionStorage();if(t){var e=t.getItem(kd);if(e)return this.M=e,e}var i=El(16);return this.xt(i),i}xt(t){if(t!==this.M){this.M=t;var e=this.storage.getSessionStorage();e&&e.setItem(kd,t)}}St(){var t=this.storage.getSessionStorage();if(t){var e=t.getItem(_d),i=t.getItem(kd);i&&!e?this.M=i:(i&&t.removeItem(kd),this.xt(El(16))),t.setItem(_d,"true"),this.At()}else this.M=El(16)}At(){var t=this.storage.getSessionStorage();$u&&t&&Nl($u,"beforeunload",()=>{var t=this.storage.getSessionStorage();t&&t.removeItem(_d)},{capture:!1})}updateStorageMethod(t,e){this.storage=new ov({method:t,cross_subdomain:e,sameSite:"Lax"})}}function hv(t){if(!Gu)return null;var e=Gu.createElement("a");return e.href=t,e}function uv(t){try{return decodeURIComponent(t).replace(/\+/g," ")}catch(e){return t.replace(/\+/g," ")}}function lv(t){for(var e={},i=function(t){return((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"")}(t).split("&"),r=0;r<i.length;r++){var n=i[r];if(n){var s=n.indexOf("="),o=-1===s?n:n.slice(0,s);if(o){var a=uv(o),h=-1===s?"":n.slice(s+1);e[a]=uv(h)}}}return e}function cv(t,e){var i;return null!==(i=lv(t)[e])&&void 0!==i?i:""}function dv(t,e,i){if(!t||!e||!e.length)return t;for(var r=t.split("#"),n=r[0]||"",s=r[1],o=n.split("?"),a=o[1],h=o[0],u=(a||"").split("&"),l=[],c=0;c<u.length;c++){var d=u[c].split("="),v=d[0],f=d.slice(1).join("=");-1!==e.indexOf(v)?l.push(v+"="+i):v&&l.push(v+(f?"="+f:""))}var p=l.join("&");return h+(p?"?"+p:"")+(s?"#"+s:"")}var vv="_fbp",fv="_fbc",pv=15552e3,mv=7776e3;function gv(){void 0!==Gu&&(function(){if(bv(vv))return;var t=Date.now(),e=Math.floor(1e9+9e9*Math.random());yv(vv,"fb.1."+t+"."+e,pv)}(),function(){if(!(null==Zu?void 0:Zu.search))return;try{var t=new URL(Zu.href).searchParams.get("fbclid");if(!(null==t?void 0:t.trim()))return;var e="fb.1."+Date.now()+"."+t.trim();yv(fv,e,mv)}catch(t){}}())}function bv(t){if(void 0===Gu||!(null==Gu?void 0:Gu.cookie))return null;var e=t+"=";for(var i of Gu.cookie.split(";")){var r=i.trim();if(r.startsWith(e))try{return decodeURIComponent(r.slice(e.length))}catch(t){return r.slice(e.length)}}return null}function yv(t,e,i){if(void 0!==Gu){var r=void 0!==Zu&&"https:"===Zu.protocol?"; Secure":"";Gu.cookie=t+"="+encodeURIComponent(e)+"; Max-Age="+i+"; path=/; SameSite=Lax"+r}}var wv="Mobile",Cv="iOS",Sv="Android",kv="Tablet",_v=Sv+" "+kv,Iv="iPad",xv="Apple",Av=xv+" Watch",Mv="Safari",Rv="BlackBerry",Ov="Samsung",Ev=Ov+"Browser",Tv=Ov+" Internet",Lv="Chrome",Nv=Lv+" OS",Bv=Lv+" "+Cv,Fv="Internet Explorer",Dv=Fv+" "+wv,jv="Opera",Pv=jv+" Mini",Uv="Edge",$v="Microsoft "+Uv,zv="Firefox",Wv=zv+" "+Cv,Gv="Nintendo",Zv="PlayStation",Vv="Xbox",Yv=Sv+" "+wv,Jv=wv+" "+Mv,Xv="Windows",Kv=Xv+" Phone",Hv="Nokia",qv="Ouya",Qv="Generic",tf=Qv+" "+wv.toLowerCase(),ef=Qv+" "+kv.toLowerCase(),rf="Konqueror",nf="(\\d+(\\.\\d+)?)",sf=new RegExp("Version/"+nf),of=new RegExp(Vv,"i"),af=new RegExp(Zv+" \\w+","i"),hf=new RegExp(Gv+" \\w+","i"),uf=new RegExp(Rv+"|PlayBook|BB10","i"),lf={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function cf(t,e){return t.toLowerCase().includes(e.toLowerCase())}var df=(t,e)=>e&&cf(e,xv)||function(t){return cf(t,Mv)&&!cf(t,Lv)&&!cf(t,Sv)}(t),vf=function(t,e){return e=e||"",cf(t," OPR/")&&cf(t,"Mini")?Pv:cf(t," OPR/")?jv:uf.test(t)?Rv:cf(t,"IE"+wv)||cf(t,"WPDesktop")?Dv:cf(t,Ev)?Tv:cf(t,Uv)||cf(t,"Edg/")?$v:cf(t,"FBIOS")?"Facebook "+wv:cf(t,"UCWEB")||cf(t,"UCBrowser")?"UC Browser":cf(t,"CriOS")?Bv:cf(t,"CrMo")||cf(t,Lv)?Lv:cf(t,Sv)&&cf(t,Mv)?Yv:cf(t,"FxiOS")?Wv:cf(t.toLowerCase(),rf.toLowerCase())?rf:df(t,e)?cf(t,wv)?Jv:Mv:cf(t,zv)?zv:cf(t,"MSIE")||cf(t,"Trident/")?Fv:cf(t,"Gecko")?zv:""},ff={[Dv]:[new RegExp("rv:"+nf)],[$v]:[new RegExp(Uv+"?\\/"+nf)],[Lv]:[new RegExp("("+Lv+"|CrMo)\\/"+nf)],[Bv]:[new RegExp("CriOS\\/"+nf)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+nf)],[Mv]:[sf],[Jv]:[sf],[jv]:[new RegExp("(Opera|OPR)\\/"+nf)],[zv]:[new RegExp(zv+"\\/"+nf)],[Wv]:[new RegExp("FxiOS\\/"+nf)],[rf]:[new RegExp("Konqueror[:/]?"+nf,"i")],[Rv]:[new RegExp(Rv+" "+nf),sf],[Yv]:[new RegExp("android\\s"+nf,"i")],[Tv]:[new RegExp(Ev+"\\/"+nf)],[Fv]:[new RegExp("(rv:|MSIE )"+nf)],Mozilla:[new RegExp("rv:"+nf)]},pf=function(t,e){var i=vf(t,e),r=ff[i];if(void 0===r)return null;for(var n=0;n<r.length;n++){var s=r[n],o=t.match(s);if(o)return parseFloat(o[o.length-2])}return null},mf=[[new RegExp(Vv+"; "+Vv+" (.*?)[);]","i"),t=>[Vv,t&&t[1]||""]],[new RegExp(Gv,"i"),[Gv,""]],[new RegExp(Zv,"i"),[Zv,""]],[uf,[Rv,""]],[new RegExp(Xv,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Kv,""];if(new RegExp(wv).test(e)&&!/IEMobile\b/.test(e))return[Xv+" "+wv,""];var i=/Windows NT ([0-9.]+)/i.exec(e);if(i&&i[1]){var r=i[1],n=lf[r]||"";return/arm/i.test(e)&&(n="RT"),[Xv,n]}return[Xv,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>{if(t&&t[3]){var e=[t[3],t[4],t[5]||"0"];return[Cv,e.join(".")]}return[Cv,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=void 0===t[2]?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Sv+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Sv+")","i"),t=>{if(t&&t[2]){var e=[t[2],t[3],t[4]||"0"];return[Sv,e.join(".")]}return[Sv,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];if(t&&t[1]){var i=[t[1],t[2],t[3]||"0"];e[1]=i.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Nv,""]],[/Linux|debian/i,["Linux",""]]],gf=function(t){return hf.test(t)?Gv:af.test(t)?Zv:of.test(t)?Vv:new RegExp(qv,"i").test(t)?qv:new RegExp("("+Kv+"|WPDesktop)","i").test(t)?Kv:/iPad/.test(t)?Iv:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?Av:uf.test(t)?Rv:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(Hv,"i").test(t)?Hv:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?!new RegExp(wv).test(t)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)?/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?Sv:_v:Sv:new RegExp("(pda|"+wv+")","i").test(t)?tf:new RegExp(kv,"i").test(t)&&!new RegExp(kv+" pc","i").test(t)?ef:""},bf="https?://(.*)",yf=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],wf=Fl(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],yf),Cf="<masked>";function Sf(t,e){var i=wf.concat([]),r=Bl({},function(t){var e={};return Ll(lv(t),function(t,i){"string"==typeof i&&i.startsWith("utm_")&&t&&(e[i]=t)}),e}(t));return Ll(i,function(e){if(e.startsWith("utm_")){if(!(e in r)){var i=cv(t,e);r[e]=i||null}}else{var n=cv(t,e);r[e]=n||null}}),r}function kf(t){var e=function(t){return t?0===t.search(bf+"google.([^/?]*)")?"google":0===t.search(bf+"bing.com")?"bing":0===t.search(bf+"yahoo.com")?"yahoo":0===t.search(bf+"duckduckgo.com")?"duckduckgo":null:null}(t),i="yahoo"!==e?"q":"p",r={};if(!function(t){return null===t}(e)){r.$search_engine=e;var n=Gu?cv(Gu.referrer,i):"";n.length&&(r.ph_keyword=n)}return r}function _f(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function If(){return(null==Gu?void 0:Gu.referrer)||"$direct"}function xf(){var t;return(null==Gu?void 0:Gu.referrer)&&(null===(t=hv(Gu.referrer))||void 0===t?void 0:t.host)||"$direct"}function Af(t){var e=function(t){var e,{r:i,u:r}=t,n={$referrer:i,$referring_domain:null==i?void 0:"$direct"===i?"$direct":null===(e=hv(i))||void 0===e?void 0:e.host};if(r){n.$current_url=r;var s=hv(r);n.$host=null==s?void 0:s.host,n.$pathname=null==s?void 0:s.pathname,Bl(n,Sf(r))}return i&&Bl(n,kf(i)),n}(t),i={};return Ll(e,function(t,e){var r;i["$initial_"+(r=String(e),r.startsWith("$")?r.substring(1):r)]=t}),i}function Mf(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return}}function Rf(){try{return(new Date).getTimezoneOffset()}catch(t){return}}function Of(t,e){if(!Yu)return{};var i,r,n,s=t?Fl([],yf,e||[]):[],[o,a]=function(t){for(var e=0;e<mf.length;e++){var[i,r]=mf[e],n=i.exec(t);if(n){var s="function"==typeof r?r(n,t):r;if(s)return s}}return["",""]}(Yu),h=bv(vv)||void 0,u=bv(fv)||void 0;return Bl(Dl({$os:o,$os_version:a,$browser:vf(Yu,navigator.vendor),$device:gf(Yu),$device_type:(r=Yu,n=gf(r),n===Iv||n===_v||"Kobo"===n||"Kindle Fire"===n||n===ef?kv:n===Gv||n===Vv||n===Zv||n===qv?"Console":n===Av?"Wearable":n?wv:"Desktop"),$timezone:Mf(),$timezone_offset:Rf(),$fb_browser_id:h,$fb_click_id:u}),{$current_url:dv(null==Zu?void 0:Zu.href,s,Cf),$host:null==Zu?void 0:Zu.host,$pathname:null==Zu?void 0:Zu.pathname,$raw_user_agent:Yu.length>1e3?Yu.substring(0,997)+"...":Yu,$browser_version:pf(Yu,navigator.vendor),$browser_language:_f(),$browser_language_prefix:(i=_f(),"string"==typeof i?i.split("-")[0]:void 0),$screen_height:null==$u?void 0:$u.screen.height,$screen_width:null==$u?void 0:$u.screen.width,$viewport_height:null==$u?void 0:$u.innerHeight,$viewport_width:null==$u?void 0:$u.innerWidth,$lib:"web",$lib_version:Cd,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10)})}class Ef{constructor(t,e){void 0===t&&(t="localStorage"),this.Mt=!1,this.storage=new ov({method:t,cross_subdomain:e,sameSite:"Lax"}),this.userIdentity=this.generateEphemeralIdentity(),ll().debug("user","ctor","ephemeral identity only")}hydrateFromStorage(){ll().debug("user","hydrate start"),this.userIdentity=this.loadUserIdentity();var t=this.userIdentity.anonymous_id,e=this.userIdentity.distinct_id;ll().debug("user","hydrate done","anonymous_id",t?t.slice(0,12)+"...":"n/a","distinct_id",e?e.slice(0,12)+"...":"null")}generateEphemeralIdentity(){return{distinct_id:null,anonymous_id:this.generateAnonymousId(),device_id:this.generateDeviceId(),properties:{},user_state:"anonymous"}}getUserIdentity(){return i({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){var t=this.userIdentity.anonymous_id;return t||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.storage.set(Ad,this.userIdentity.anonymous_id,rv),ll().debug("user","getAnonymousId generated (was missing)",this.userIdentity.anonymous_id.slice(0,12)+"..."),this.userIdentity.anonymous_id)}getUserProperties(){return i({},this.userIdentity.properties)}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}consumeFirstVisit(){return!!this.Mt&&(this.Mt=!1,!0)}applyUpdate(t){if(void 0!==t.distinct_id&&(this.userIdentity.distinct_id=t.distinct_id),void 0!==t.user_state&&(this.userIdentity.user_state=t.user_state),void 0!==t.device_id&&(this.userIdentity.device_id=t.device_id),t.properties_set&&(this.userIdentity.properties=i({},this.userIdentity.properties,t.properties_set)),t.properties_set_once)for(var e of Object.keys(t.properties_set_once))e in this.userIdentity.properties||(this.userIdentity.properties[e]=t.properties_set_once[e]);this.saveUserIdentity()}reset(t){this.userIdentity={distinct_id:null,anonymous_id:this.generateAnonymousId(),device_id:t?this.generateDeviceId():this.userIdentity.device_id,properties:{$last_vtilt_reset:(new Date).toISOString()},user_state:"anonymous"},this.saveUserIdentity()}set_initial_person_info(t,e){if(!this.getStoredUserProperties()[Bd]){var i=function(t,e){var i=t?Fl([],yf,e||[]):[],r=null==Zu?void 0:Zu.href.substring(0,1e3);return{r:If().substring(0,1e3),u:r?dv(r,i,Cf):void 0}}(t,e);this.register_once({[Bd]:i},void 0)}}get_initial_props(){var t=this.getStoredUserProperties()[Bd];return t?Af(t):{}}update_referrer_info(){var t={$referrer:If(),$referring_domain:xf()};this.register_once(t,void 0)}loadUserIdentity(){var t=this.storage.get(Ad),e=this.storage.get(xd),i=this.storage.get(Rd),r=this.storage.get(Id),n=this.getStoredUserProperties(),s=t||this.generateAnonymousId(),o=e||this.generateDeviceId(),a=i||null,h=r||"anonymous";t?ll().debug("user","hydrate","loaded from storage",t.slice(0,12)+"..."):(this.Mt=!0,ll().debug("user","hydrate","generated new anonymous_id"));var u=s||this.generateAnonymousId();return t||this.storage.set(Ad,u,rv),e||this.storage.set(xd,o,rv),r||this.storage.set(Id,h,rv),{distinct_id:a,anonymous_id:u,device_id:o,properties:n,user_state:h}}saveUserIdentity(){this.storage.set(Ad,this.userIdentity.anonymous_id,rv),this.storage.set(xd,this.userIdentity.device_id,rv),this.storage.set(Id,this.userIdentity.user_state,rv),this.userIdentity.distinct_id?this.storage.set(Rd,this.userIdentity.distinct_id,rv):this.storage.remove(Rd),this.setStoredUserProperties(this.userIdentity.properties)}getStoredUserProperties(){return this.storage.getJSON(Od)||{}}setStoredUserProperties(t){this.storage.setJSON(Od,t,rv)}register_once(t,e){var i=this.getStoredUserProperties(),r=!1;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(n in i||(i[n]=t[n],r=!0));if(e)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(s in i||(i[s]=e[s],r=!0));r&&this.setStoredUserProperties(i)}generateAnonymousId(){return"anon_"+El(16)}generateDeviceId(){return"device_"+El(16)}updateStorageMethod(t,e){this.storage=new ov({method:t,cross_subdomain:e,sameSite:"Lax"})}}var Tf=["LCP","CLS","FCP","INP"];class Lf{constructor(t,e){this.Rt=!1,this.Ot=!1,this.Et=!1,this.Tt=[],this._instance=t,this.j=e}get isEnabled(){return!1!==this.j.enabled}get isStarted(){return this.Rt}get isLoaded(){return!!this.Lt}Nt(t){var e;if(this.Lt)t(this.Lt);else if(!this.Ot){this.Ot=!0;var i=null===(e=Ju.__VTiltExtensions__)||void 0===e?void 0:e.loadExternalDependency;if(!i)return ll().error("feature",this.name,"loadExternalDependency not available"),void(this.Ot=!1);i(this._instance,this.scriptName,e=>{this.Ot=!1,e?ll().error("feature",this.name,"could not load "+this.scriptName+":",e):(this.Lt||(this.Lt=this.Bt()),t(this.Lt))})}}startIfEnabled(){this.isEnabled&&!this.Rt&&(this.Rt=!0,this.Nt(t=>this.Ft(t)))}Ft(t){}stop(){this.Rt=!1}updateConfig(t){this.j=i({},this.j,t)}Dt(t){this.Et?t():this.Tt.push(t)}jt(){if(!this.Et){this.Et=!0;var t=this.Tt;for(var e of(this.Tt=[],t))try{e()}catch(t){ll().error("feature",this.name,"deferred call error:",t)}}}Pt(){this.Et=!1,this.Tt=[]}}class Nf extends Lf{startIfEnabledOrStop(t){if(this.isEnabled){if(this.Rt&&this.Lt)return;this.Rt=!0,this.Nt(t=>this.Ft(t))}else this.stop()}}var Bf=9e5,Ff="web-vitals";class Df extends Lf{static extractConfig(t){var e=t.capture_performance;return"boolean"==typeof e?{web_vitals:e}:"object"==typeof e&&null!==e?e:{web_vitals:!1}}constructor(t,e){super(t,null!=e?e:Df.extractConfig(t.getConfig())),this.name="WebVitals",this.scriptName="web-vitals",this.P=this.Ut()}get isEnabled(){var t=null==Zu?void 0:Zu.protocol;return("http:"===t||"https:"===t)&&!0===this.j.web_vitals}startIfEnabled(){if(this.isEnabled&&!this.Rt&&$u){var t=this.$t();t?(this.Rt=!0,this.Lt=t,this.zt(t)):(this.Rt=!0,this.Nt(t=>this.Ft(t)))}}stop(){this.Rt&&(this.Wt(),this.Gt&&(clearTimeout(this.Gt),this.Gt=void 0),this.Rt=!1)}onConfigUpdate(t){var e=Df.extractConfig(t),i=this.isEnabled;this.j=e,i||!this.isEnabled||this.Rt?i&&!this.isEnabled&&this.Rt&&this.stop():this.startIfEnabled()}Bt(){var t=this.$t();if(!t)throw new Error("[vTilt:web-vitals] web-vitals loaded but callbacks not registered");return t}Ft(t){this.zt(t)}get allowedMetrics(){return this.j.web_vitals_allowed_metrics||Tf}get flushTimeoutMs(){return this.j.web_vitals_delayed_flush_ms||5e3}get maxAllowedValue(){var t=this.j.__web_vitals_max_value;return void 0===t?Bf:0===t?0:t<6e4?Bf:t}Ut(){return{url:void 0,pathname:void 0,metrics:[],firstMetricTimestamp:void 0}}$t(){var t;return null===(t=Ju.__VTiltExtensions__)||void 0===t?void 0:t.webVitalsCallbacks}zt(t){var e=this.allowedMetrics,i=this.Zt.bind(this);e.includes("LCP")&&t.onLCP&&t.onLCP(i),e.includes("CLS")&&t.onCLS&&t.onCLS(i,{reportAllChanges:!0}),e.includes("FCP")&&t.onFCP&&t.onFCP(i),e.includes("INP")&&t.onINP&&t.onINP(i),e.includes("TTFB")&&t.onTTFB&&t.onTTFB(i)}Vt(){var t;return null===(t=null==$u?void 0:$u.location)||void 0===t?void 0:t.href}Yt(){return null==Zu?void 0:Zu.pathname}Zt(t){var e,r,n;try{if(!$u||!Gu||!Zu)return;if(!(null==t?void 0:t.name)||void 0===(null==t?void 0:t.value))return void ll().warn(Ff,"invalid metric received",t);if(this.maxAllowedValue>0&&t.value>=this.maxAllowedValue&&"CLS"!==t.name)return void ll().warn(Ff,"ignoring "+t.name+" with value >= "+this.maxAllowedValue+"ms");var s=this.Vt(),o=this.Yt();if(!s)return void ll().warn(Ff,"could not determine current URL");this.P.url&&this.P.url!==s&&this.Wt(),this.P.url||(this.P.url=s,this.P.pathname=o),this.P.firstMetricTimestamp||(this.P.firstMetricTimestamp=Date.now());var a=this.Jt(t.attribution),h=null!==(n=null===(r=(e=this._instance).getSessionId)||void 0===r?void 0:r.call(e))&&void 0!==n?n:null,u=this.Xt(),l=i({},t,{attribution:a,timestamp:Date.now(),$current_url:s,$session_id:h,$window_id:u}),c=this.P.metrics.findIndex(e=>e.name===t.name);c>=0?this.P.metrics[c]=l:this.P.metrics.push(l),this.Kt(),this.P.metrics.length>=this.allowedMetrics.length&&this.Wt()}catch(t){ll().error(Ff,"error adding metric to buffer:",t)}}Jt(t){if(t){var e=i({},t);return"interactionTargetElement"in e&&delete e.interactionTargetElement,e}}Xt(){var t;try{return(null===(t=this._instance.sessionManager)||void 0===t?void 0:t.getWindowId())||null}catch(t){return null}}Kt(){this.Gt&&clearTimeout(this.Gt),this.Gt=setTimeout(()=>{this.Wt()},this.flushTimeoutMs)}Wt(){if(this.Gt&&(clearTimeout(this.Gt),this.Gt=void 0),0!==this.P.metrics.length){try{var t={$pathname:this.P.pathname,$current_url:this.P.url};for(var e of this.P.metrics)t["$web_vitals_"+e.name+"_value"]=e.value,t["$web_vitals_"+e.name+"_event"]={name:e.name,value:e.value,delta:e.delta,rating:e.rating,id:e.id,navigationType:e.navigationType,attribution:e.attribution,$session_id:e.$session_id,$window_id:e.$window_id};this._instance.capture("$web_vitals",t)}catch(t){ll().error(Ff,"error flushing metrics:",t)}this.P=this.Ut()}}}function jf(t,e,i){try{if(!(e in t))return()=>{};var r=t[e],n=i(r);return el(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),t[e]=n,()=>{t[e]=r}}catch(t){return()=>{}}}class Pf{constructor(t,e){var i;this.name="HistoryAutocapture",this.Rt=!1,this._instance=t,this.j=e||Pf.extractConfig(t.getConfig()),this.Ht=(null===(i=null==$u?void 0:$u.location)||void 0===i?void 0:i.pathname)||""}static extractConfig(t){return{enabled:!1!==t.capture_pageview}}get isEnabled(){return!1!==this.j.enabled&&!1!==this._instance.getConfig().capture_pageview}get isStarted(){return this.Rt}startIfEnabled(){this.isEnabled&&!this.Rt&&this.qt()}stop(){this.Rt&&(this.Qt&&(this.Qt(),this.Qt=void 0),this.Rt=!1)}onConfigUpdate(t){this.j=Pf.extractConfig(t),this.isEnabled&&!this.Rt?this.qt():!this.isEnabled&&this.Rt&&this.stop()}qt(){$u&&Zu&&(this.Ht=Zu.pathname||"",this.te(),this.ee(),this.Rt=!0,ll().info("history-autocapture","started"))}te(){var t,e;if(null==$u?void 0:$u.history){var i=this;(null===(t=$u.history.pushState)||void 0===t?void 0:t.__vtilt_wrapped__)||jf($u.history,"pushState",t=>function(e,r,n){i.ie(n),t.call(this,e,r,n),i.re("pushState")}),(null===(e=$u.history.replaceState)||void 0===e?void 0:e.__vtilt_wrapped__)||jf($u.history,"replaceState",t=>function(e,r,n){i.ie(n),t.call(this,e,r,n),i.re("replaceState")})}}ie(t){var e;if(Zu){var i=Zu.pathname||"",r=null!==(e=function(t){if(!Zu)return null;if(null==t||""===t)return Zu.pathname||null;try{return new URL(String(t),Zu.href).pathname}catch(t){return null}}(t))&&void 0!==e?e:i;r!==i&&this._instance.tryCapturePageleave("spa_transition")}}ee(){if(!this.Qt&&$u){var t=()=>{this.re("popstate")};Nl($u,"popstate",t),this.Qt=()=>{null==$u||$u.removeEventListener("popstate",t)}}}re(t){this.isEnabled&&this.Rt&&dl(()=>{var e,i=null===(e=null==$u?void 0:$u.location)||void 0===e?void 0:e.pathname;if(i&&Zu&&Gu)if(i!==this.Ht){ll().debug("history-autocapture",t,i),this.Ht=i;var r={navigation_type:t};this._instance.capture(Fd,r)}else this.Ht=i})}}var Uf=["a","button","form","input","select","textarea","label"],$f="$copy_autocapture",zf=['[id*="cookie" i]','[class*="cookie" i]','[id*="consent" i]','[class*="consent" i]','[id*="gdpr" i]','[class*="gdpr" i]','[id*="privacy-banner" i]','[class*="privacy-banner" i]','[id*="cookie-banner" i]','[class*="cookie-banner" i]','[id*="cookie-notice" i]','[class*="cookie-notice" i]',"#CybotCookiebotDialog",'[class^="CybotCookiebotDialog"]','[id^="onetrust"]','[class^="onetrust"]','[id^="cc-"]',".cc-banner",".cc-window",".cc-revoke",'[id^="cookieconsent"]','[class^="cookieconsent"]','[id^="gdpr-cookie"]','[id^="qc-cmp"]',"#termly-code-snippet-support",'[id^="iubenda"]','[id^="truste"]','[class^="truste"]',"#consent_blackbar",'[id^="didomi"]','[id^="usercentrics"]',"#uc-center-container",".klaro","#klaro","#cookiescript_injected",".cky-consent-container","#cky-consent","#cmplz-cookiebanner-container","#gdpr-cookie-message",'[class*="fs-cc"]','[class*="fc-cc"]',"[fs-cc]","[fs-cc-checkbox]",'[class*="cookie-preferences"]',"#cookie-preferences",'[role="dialog"][aria-label*="cookie" i]','[role="dialog"][aria-label*="consent" i]','[aria-describedby*="cookie" i]','[aria-label*="Cookie Preferences" i]'];function Wf(t){return t.replace(/^\s+|\s+$/g,"")}function Gf(t,e){return t.indexOf(e)>-1}function Zf(t){return 1===(null==t?void 0:t.nodeType)}function Vf(t){return 3===(null==t?void 0:t.nodeType)}function Yf(t,e){var i;return(null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase())===e}function Jf(t){return 11===(null==t?void 0:t.nodeType)}function Xf(t){return t?Wf(t).split(/\s+/):[]}function Kf(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className&&"string"==typeof t.className.baseVal?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return Xf(e)}function Hf(t){return Qu(t)?null:Wf(t).split(/(\s+)/).filter(t=>lp(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function qf(t){var e,i="";if(dp(t)&&!vp(t)&&t.childNodes&&t.childNodes.length)for(var r=0;r<t.childNodes.length;r++){var n=t.childNodes[r];Vf(n)&&n.textContent&&(i+=null!==(e=Hf(n.textContent))&&void 0!==e?e:"")}return Wf(i)}function Qf(t){var e,i="";if(t&&t.childNodes&&t.childNodes.length)for(var r=0;r<t.childNodes.length;r++){var n=t.childNodes[r];if(n&&"span"===(null===(e=n.tagName)||void 0===e?void 0:e.toLowerCase()))try{i=(i+" "+qf(n)).trim(),n.childNodes&&n.childNodes.length&&(i=(i+" "+Qf(n)).trim())}catch(t){}}return i}function tp(t){var e=qf(t);return lp(e=(e+" "+Qf(t)).trim())?e:""}function ep(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do{e=e.previousSibling}while(e&&!Zf(e));return e}function ip(t){var e=t.parentNode;return!(!e||!Zf(e))&&e}function rp(t){var e=null==$u?void 0:$u.location.href;return!!(e&&t&&t.some(t=>e.match(t)))}var np="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",sp=new RegExp("^(?:"+np+")$"),op=new RegExp(np),ap="\\d{3}-?\\d{2}-?\\d{4}",hp=new RegExp("^("+ap+")$"),up=new RegExp("("+ap+")");function lp(t,e){if(void 0===e&&(e=!0),Qu(t))return!1;if(Hu(t)){if(t=Wf(t),(e?sp:op).test((t||"").replace(/[- ]/g,"")))return!1;if((e?hp:up).test(t))return!1}return!0}function cp(t){return!!Hu(t)&&("_ngcontent"===t.substring(0,10)||"_nghost"===t.substring(0,7))}function dp(t){for(var e=t;e&&e.parentNode&&!Yf(e,"body");e=e.parentNode){var i=Kf(e);if(Gf(i,"vt-sensitive")||Gf(i,"vt-no-capture"))return!1}if(Gf(Kf(t),"vt-include"))return!0;var r=t.type||"";if(Hu(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var n=t.name||t.id||"";if(Hu(n)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function vp(t){return!!(Yf(t,"input")&&!["button","checkbox","submit","reset","radio"].includes(t.type)||Yf(t,"textarea")||"true"===t.getAttribute("contenteditable"))}function fp(t){if(!dp(t))return null;if(Yf(t,"input")){var e=t,i=(e.type||"text").toLowerCase();if("password"===i||"hidden"===i)return null;if("checkbox"===i||"radio"===i){var r={$el_value:e.checked?"true":"false"},n=function(t){var e=t.closest("label");if(e){var i=Wf(e.textContent||"");if(i&&lp(i))return Hf(i)||null}if(t.id)try{var r=null===document||void 0===document?void 0:document.querySelector('label[for="'+t.id+'"]');if(r){var n=Wf(r.textContent||"");if(n&&lp(n))return Hf(n)||null}}catch(t){}return null}(e);return n?r.$selected_text=n:e.value&&lp(e.value)&&(r.$selected_text=e.value),r}var s=e.value;if(s&&lp(s)){var o=Hf(s);if(o)return{$el_value:o}}return null}if(Yf(t,"select")){var a=t,h=a.selectedIndex;if(h>=0&&a.options[h]){var u=a.options[h],l={};u.value&&lp(u.value)&&(l.$el_value=u.value);var c=u.text;if(c&&lp(c)){var d=Hf(c);d&&(l.$selected_text=d)}if(l.$el_value||l.$selected_text)return l}return null}return Yf(t,"textarea"),null}function pp(t,e,i,r,n){if(void 0===i&&(i=void 0),!$u)return{capture:!1,reason:"no_window"};if(!t)return{capture:!1,reason:"no_element"};if(Yf(t,"html")||!Zf(t))return{capture:!1,reason:"html_element"};if((null==i?void 0:i.url_allowlist)&&!rp(i.url_allowlist))return{capture:!1,reason:"url_allowlist_miss"};if((null==i?void 0:i.url_ignorelist)&&rp(i.url_ignorelist))return{capture:!1,reason:"url_ignorelist_hit"};if(null==i?void 0:i.dom_event_allowlist){var s=i.dom_event_allowlist;if(s&&!s.some(t=>e.type===t))return{capture:!1,reason:"dom_event_not_allowed"}}for(var o=!1,a=[t],h=!0,u=t;u.parentNode&&!Yf(u,"body");)if(Jf(u.parentNode))a.push(u.parentNode.host),u=u.parentNode.host;else{if(!(h=ip(u)))break;if(r||Uf.indexOf(h.tagName.toLowerCase())>-1)o=!0;else{var l=$u.getComputedStyle(h);l&&"pointer"===l.getPropertyValue("cursor")&&(o=!0)}a.push(h),u=h}if(!function(t,e){var i=null==e?void 0:e.element_allowlist;if(qu(i))return!0;var r,n=function(t){if(i.some(e=>t.tagName.toLowerCase()===e))return{v:!0}};for(var s of t)if(r=n(s))return r.v;return!1}(a,i))return{capture:!1,reason:"element_allowlist_miss"};if(!function(t,e){var i=null==e?void 0:e.css_selector_allowlist;if(qu(i))return!0;var r,n=function(t){if(i.some(e=>t.matches(e)))return{v:!0}};for(var s of t)if(r=n(s))return r.v;return!1}(a,i))return{capture:!1,reason:"css_selector_allowlist_miss"};if(function(t,e){var i=null==e?void 0:e.css_selector_ignorelist,r=void 0===i?zf:i;if(0===r.length)return!1;for(var n of t)for(var s of r)try{if(n.matches(s))return!0}catch(t){}return!1}(a,i))return{capture:!1,reason:"css_selector_ignorelist_hit"};var c=$u.getComputedStyle(t);if(c&&"pointer"===c.getPropertyValue("cursor")&&"click"===e.type)return{capture:!0};var d=t.tagName.toLowerCase();switch(d){case"html":return{capture:!1,reason:"tag_html"};case"form":return(n||["submit"]).indexOf(e.type)>=0?{capture:!0}:{capture:!1,reason:"form_event_not_allowed"};case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(e.type)>=0?{capture:!0}:{capture:!1,reason:"input_event_not_allowed"};default:return o?(n||["click"]).indexOf(e.type)>=0?{capture:!0}:{capture:!1,reason:"dom_event_not_allowed"}:(n||["click"]).indexOf(e.type)>=0&&(Uf.indexOf(d)>-1||"true"===t.getAttribute("contenteditable"))?{capture:!0}:{capture:!1,reason:"tag_not_capturable"}}}function mp(t,e){return e.length>t?e.slice(0,t)+"...":e}function gp(t,e,i,r){var n=t.tagName.toLowerCase(),s={tag_name:n};Uf.indexOf(n)>-1&&!i&&(s.$el_text=mp(1024,"a"===n||"button"===n?tp(t):qf(t)));var o=Kf(t);o.length>0&&(s.classes=o.filter(t=>""!==t));for(var a=0;a<t.attributes.length;a++){var h=t.attributes[a];if((!vp(t)||-1!==["name","id","class","aria-label"].indexOf(h.name))&&(!(null==r?void 0:r.includes(h.name))&&!e&&lp(h.value)&&!cp(h.name))){var u=h.value;"class"===h.name&&(u=Xf(u).join(" ")),s["attr__"+h.name]=mp(1024,u)}}for(var l=1,c=1,d=t;d=ep(d);)l++,d.tagName===t.tagName&&c++;return s.nth_child=l,s.nth_of_type=c,s}function bp(t){if(!dp(t))return{};for(var e={},i=0;i<t.attributes.length;i++){var r=t.attributes[i];if(r.name&&0===r.name.indexOf("data-vt-capture-attribute")){var n=r.name.replace("data-vt-capture-attribute-",""),s=r.value;n&&s&&lp(s)&&(e[n]=s)}}return e}function yp(t){return t.replace(/"|\\"/g,'\\"')}function wp(t){var e=t.attr__class;return e?tl(e)?e:Xf(e):void 0}function Cp(t){return function(t){var e=t.map(t=>{var e,r,n="";if(t.tag_name&&(n+=t.tag_name),t.attr_class)for(var s of(t.attr_class.sort(),t.attr_class))n+="."+s.replace(/"/g,"");var o=i({},t.text?{text:t.text}:{},{"nth-child":null!==(e=t.nth_child)&&void 0!==e?e:0,"nth-of-type":null!==(r=t.nth_of_type)&&void 0!==r?r:0},t.href?{href:t.href}:{},t.attr_id?{attr_id:t.attr_id}:{},t.attributes),a={};return Object.entries(o).sort((t,e)=>{var[i]=t,[r]=e;return i.localeCompare(r)}).forEach(t=>{var[e,i]=t;return a[yp(e.toString())]=yp(String(i))}),(n+=":")+Object.entries(a).map(t=>{var[e,i]=t;return e+'="'+i+'"'}).join("")});return e.join(";")}(function(t){return t.map(t=>{var e,i,r={text:null===(e=t.$el_text)||void 0===e?void 0:e.slice(0,400),tag_name:t.tag_name,href:null===(i=t.attr__href)||void 0===i?void 0:i.slice(0,2048),attr_class:wp(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return Object.entries(t).filter(t=>{var[e]=t;return 0===e.indexOf("attr__")}).forEach(t=>{var[e,i]=t;return r.attributes[e]=i}),r})}(t))}var Sp=[25,50,75,100];function kp(t){var e;if(!t)return null;var i=t.milestones,r=!0===i||"object"==typeof i&&null!==i,n="object"==typeof i&&null!==i&&(null===(e=i.thresholds)||void 0===e?void 0:e.length)?[...i.thresholds].sort((t,e)=>t-e):[...Sp],s=!0===t.pageleave;return r||s?{milestones:r,thresholds:n,pageleave:s,scroll_root_selector:t.scroll_root_selector}:null}class _p{constructor(t){this.ne=t,this.se=0,this.oe=new Set,this.ae=null,this.he=null,this.ue=null,this.le=null}start(){this.stop(),this.he=function(t){if(!$u)return null;if(t){var e=Array.isArray(t)?t:[t];for(var i of e){var r=null==Gu?void 0:Gu.querySelector(i);if(r instanceof Element)return r}}return $u}(this.ne.scroll_root_selector),this.he&&(this.ae=()=>this.ce(),Nl(this.he,"scroll",this.ae,{passive:!0}),this.de(),this.le=this.ne.onPageview(()=>this.reset()))}stop(){this.le&&(this.le(),this.le=null),null!=this.ue&&$u&&($u.cancelAnimationFrame(this.ue),this.ue=null),this.ae&&this.he&&(this.he.removeEventListener("scroll",this.ae,{passive:!0}),this.ae=null,this.he=null)}reset(){this.se=0,this.oe.clear(),this.de()}getMaxPct(){return this.se}ce(){$u&&null==this.ue&&(this.ue=$u.requestAnimationFrame(()=>{this.ue=null,this.de()}))}de(){if(this.he){var t=function(t){var e,i,r,n,s,o;if(!t)return 0;if(t===$u){var a=null!==(e=$u.scrollY)&&void 0!==e?e:0,h=null!==(i=$u.innerHeight)&&void 0!==i?i:0,u=null==Gu?void 0:Gu.documentElement,l=null==Gu?void 0:Gu.body,c=Math.max(null!==(r=null==u?void 0:u.scrollHeight)&&void 0!==r?r:0,null!==(n=null==l?void 0:l.scrollHeight)&&void 0!==n?n:0,null!==(s=null==u?void 0:u.offsetHeight)&&void 0!==s?s:0,null!==(o=null==l?void 0:l.offsetHeight)&&void 0!==o?o:0)-h;return c<=0?100:Math.round(Math.min(100,a/c*100))}var d=t,v=d.scrollHeight-d.clientHeight;return v<=0?100:Math.round(Math.min(100,d.scrollTop/v*100))}(this.he);if(t>this.se&&(this.se=t),this.ne.milestones&&this.ne.isUrlAllowed())for(var e of this.ne.thresholds)this.se>=e&&!this.oe.has(e)&&(this.oe.add(e),this.ne.capture(Wd,{[qd]:e,[Qd]:this.se}))}}}function Ip(t,e){return t.indexOf(e)>-1}class xp{constructor(){this.clicks=[],this.RAGE_CLICK_THRESHOLD_PX=30,this.RAGE_CLICK_TIMEOUT_MS=1e3,this.RAGE_CLICK_CLICK_COUNT=3}isRageClick(t,e,i){if(this.clicks=this.clicks.filter(t=>i-t.timestamp<this.RAGE_CLICK_TIMEOUT_MS),this.clicks.length>0){var r=this.clicks[this.clicks.length-1];Math.sqrt(Math.pow(t-r.x,2)+Math.pow(e-r.y,2))>this.RAGE_CLICK_THRESHOLD_PX&&(this.clicks=[])}return this.clicks.push({x:t,y:e,timestamp:i}),this.clicks.length>=this.RAGE_CLICK_CLICK_COUNT}}function Ap(t,e){for(var i,r,n,s,{e:o,maskAllElementAttributes:a,maskAllText:h,elementAttributeIgnoreList:u,elementsChainAsString:l,captureElementValues:c}=e,d=[t],v=t;v.parentNode&&!Yf(v,"body");)Jf(v.parentNode)?(d.push(v.parentNode.host),v=v.parentNode.host):(d.push(v.parentNode),v=v.parentNode);var f,p=[],m={},g=!1,b=!1;for(var y of d){var w=dp(y);if("a"===y.tagName.toLowerCase()){var C=y.getAttribute("href");g=!!(w&&C&&lp(C))&&C}Ip(Kf(y),"vt-no-capture")&&(b=!0),p.push(gp(y,a,h,u));var S=bp(y);Object.assign(m,S)}if(b)return{props:{},explicitNoCapture:b};if(h||("a"===t.tagName.toLowerCase()||"button"===t.tagName.toLowerCase()?p[0].$el_text=tp(t):p[0].$el_text=qf(t)),"change"===o.type&&c){var k=fp(t);k&&(k.$el_value&&(p[0].$el_value=k.$el_value),k.$selected_text&&(p[0].$selected_text=k.$selected_text))}if(g){p[0].attr__href=g;var _=null===(i=hv(g))||void 0===i?void 0:i.host,I=null===(r=null==$u?void 0:$u.location)||void 0===r?void 0:r.host;_&&I&&_!==I&&(f=g)}var x=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return Object.assign({},...e)}({$event_type:o.type,$ce_version:1},l?{}:{$elements:p},{$elements_chain:Cp(p)},(null===(n=p[0])||void 0===n?void 0:n.$el_text)?{$el_text:null===(s=p[0])||void 0===s?void 0:s.$el_text}:{},f&&"click"===o.type?{$external_click_url:f}:{},m);return{props:x}}var Mp=["copy","cut"];class Rp{static extractConfig(t){return{enabled:!1!==t.autocapture}}constructor(t,e){this.name="Autocapture",this.ve=!1,this.fe=null,this.pe=null,this.me=null,this.ge=new xp,this.be=!0,this.ye=null,this.we=null,this.Ce=null,this.Se=null,this.ke=!1,this._e=null,this.Ie=null,this._instance=t}get j(){var t=this._instance.getConfig().autocapture;if(t===this.we&&this.ye)return this.ye;this.we=t;var e=function(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}(t)?t:{};return e.url_allowlist&&(e.url_allowlist=e.url_allowlist.map(t=>"string"==typeof t?new RegExp(t):t)),e.url_ignorelist&&(e.url_ignorelist=e.url_ignorelist.map(t=>"string"==typeof t?new RegExp(t):t)),this.ye=e,e}get isEnabled(){return this.xe().enabled}get isStarted(){return this.ve}startIfEnabled(){var{enabled:t,reason:e}=this.xe();t?this.ve?(this.Ae(),this.Me()):(this.Re(),this.ve=!0,ll().info("autocapture","started; listening for click/change/submit events")):this.ve?(ll().info("autocapture","stopping; reason:",null!=e?e:"unknown"),this.Oe(),this.ve=!1):(ll().debug("autocapture","not started; reason:",null!=e?e:"unknown"),this.Ee())}stop(){this.ve&&(this.Oe(),this.ve=!1,ll().info("autocapture","stopped (DOM listeners detached)")),this.Ee()}getMaxScrollDepthPctForPageleave(){var t=kp(this.j.scroll_depth);return(null==t?void 0:t.pageleave)&&this._e?this._e.getMaxPct():null}onConfigUpdate(t){var e=t;"boolean"==typeof e.elementsChainAsString&&(this.be=e.elementsChainAsString),void 0!==e.autocapture_opt_out&&(this.fe=!!e.autocapture_opt_out),this.startIfEnabled()}updateConfig(t){void 0!==t.enabled&&(this.pe=t.enabled,t.enabled&&(this.fe=!1),this.startIfEnabled())}getDiagnostics(){var t,e,i,{enabled:r,reason:n}=this.xe(),s=kp(this.j.scroll_depth);return{isEnabled:r,isStarted:this.ve,disabledReason:r?null:n,inputs:{configAutocapture:this._instance.getConfig().autocapture,isDisabledServerSide:null!==(t=this.fe)&&void 0!==t&&t,userOverride:this.pe,elementsChainAsString:this.be,captureCopiedText:!!this.j.capture_copied_text,scrollDepthMilestones:null!==(e=null==s?void 0:s.milestones)&&void 0!==e&&e,scrollDepthPageleave:null!==(i=null==s?void 0:s.pageleave)&&void 0!==i&&i,scrollDepthListenerAttached:null!==this._e}}}setElementSelectors(t){this.me=t}getElementSelectors(t){var e,i=[];return null===(e=this.me)||void 0===e||e.forEach(e=>{var r=null==Gu?void 0:Gu.querySelectorAll(e);null==r||r.forEach(r=>{t===r&&i.push(e)})}),i}xe(){if(!1===this.pe)return{enabled:!1,reason:"user_stop_called"};if(this.fe)return{enabled:!1,reason:"server_opt_out"};if(!0===this.pe)return{enabled:!0,reason:null};var t=this._instance.getConfig().autocapture;return!1===t?{enabled:!1,reason:"config_autocapture_false"}:null==t?{enabled:!1,reason:"config_autocapture_undefined"}:{enabled:!0,reason:null}}Re(){this.Te()?$u&&Gu&&(this.Ce=t=>{var e=t||(null==$u?void 0:$u.event);if(e)try{this.Le(e)}catch(t){ll().error("autocapture","capture handler threw",t)}},Nl(Gu,"submit",this.Ce,{capture:!0}),Nl(Gu,"change",this.Ce,{capture:!0}),Nl(Gu,"click",this.Ce,{capture:!0}),this.Ae(),this.Me()):ll().warn("autocapture","browser unsupported (no querySelectorAll)")}Oe(){Gu&&(this.Ce&&(Gu.removeEventListener("submit",this.Ce,!0),Gu.removeEventListener("change",this.Ce,!0),Gu.removeEventListener("click",this.Ce,!0),this.Ce=null),this.Se&&this.ke&&(Gu.removeEventListener("copy",this.Se,!0),Gu.removeEventListener("cut",this.Se,!0),this.ke=!1,this.Se=null),this.Ee())}Me(){var t,e=kp(this.j.scroll_depth),i=this.isEnabled&&null!==e&&null!==kp(null==(t=this.j)?void 0:t.scroll_depth);i&&!this._e?(this._e=new _p({milestones:e.milestones,pageleave:e.pageleave,thresholds:e.thresholds,scroll_root_selector:e.scroll_root_selector,capture:(t,e)=>this._instance.capture(t,e),isUrlAllowed:()=>{return t=this.j,!(!$u||(null==t?void 0:t.url_allowlist)&&!rp(t.url_allowlist)||(null==t?void 0:t.url_ignorelist)&&rp(t.url_ignorelist));var t},onPageview:t=>(this.Ie&&this.Ie(),this.Ie=this._instance.on(Cl,e=>{(null==e?void 0:e.event)===Fd&&t()}),()=>{var t;null===(t=this.Ie)||void 0===t||t.call(this),this.Ie=null})}),this._e.start(),ll().info("autocapture","scroll depth tracking started",{milestones:e.milestones,pageleave:e.pageleave})):i||this.Ee()}Ee(){this._e&&(this._e.stop(),this._e=null,ll().info("autocapture","scroll depth tracking stopped")),this.Ie&&(this.Ie(),this.Ie=null)}Ae(){if(Gu){var t=!!this.j.capture_copied_text;t&&!this.ke?(this.Se=t=>{var e=t||(null==$u?void 0:$u.event);if(e)try{this.Le(e,$f)}catch(t){ll().error("autocapture","copy handler threw",t)}},Nl(Gu,"copy",this.Se,{capture:!0}),Nl(Gu,"cut",this.Se,{capture:!0}),this.ke=!0):!t&&this.ke&&this.Se&&(Gu.removeEventListener("copy",this.Se,!0),Gu.removeEventListener("cut",this.Se,!0),this.ke=!1,this.Se=null)}}Le(t,e){var i,r,n,s,o,a,h,u;if(void 0===e&&(e="$autocapture"),this.isEnabled)if(t.isTrusted){var l=function(t){var e;return qu(t.target)?t.srcElement||null:(null===(e=t.target)||void 0===e?void 0:e.shadowRoot)?t.composedPath()[0]||null:t.target||null}(t);if(Vf(l)&&(l=l.parentNode||null),"$autocapture"===e&&"click"===t.type&&t instanceof MouseEvent)this._instance.getConfig().rageclick&&(null===(i=this.ge)||void 0===i?void 0:i.isRageClick(t.clientX,t.clientY,(new Date).getTime()))&&(ll().info("autocapture","$rageclick detected"),this.Le(t,"$rageclick"));var c=e===$f;if(l){var d=pp(l,t,this.j,c,c?[...Mp]:void 0);if(d.capture){var v=this._instance.getConfig(),{props:f,explicitNoCapture:p}=Ap(l,{e:t,maskAllElementAttributes:null!==(s=v.mask_all_element_attributes)&&void 0!==s&&s,maskAllText:null!==(o=v.mask_all_text)&&void 0!==o&&o,elementAttributeIgnoreList:this.j.element_attribute_ignorelist,elementsChainAsString:this.be,captureElementValues:null!==(a=this.j.capture_element_values)&&void 0!==a&&a});if(p)return ll().debug("autocapture","skip: vt-no-capture class on element chain",{tag:null===(h=l.tagName)||void 0===h?void 0:h.toLowerCase()}),!1;var m=this.getElementSelectors(l);if(m&&m.length>0&&(f.$element_selectors=m),e===$f){var g=Hf(null===(u=null==$u?void 0:$u.getSelection())||void 0===u?void 0:u.toString()),b=t.type||"clipboard";if(!g)return ll().debug("autocapture","skip copy: empty selection"),!1;f.$selected_content=g,f.$copy_type=b}return this._instance.capture(e,f),!0}ll().debug("autocapture","skip:",null!==(r=d.reason)&&void 0!==r?r:"unknown",{type:t.type,tag:null===(n=l.tagName)||void 0===n?void 0:n.toLowerCase()})}else ll().debug("autocapture","skip: no event target",{type:t.type})}else ll().debug("autocapture","skip: synthetic event (isTrusted=false)",{type:t.type})}Te(){return el(null==Gu?void 0:Gu.querySelectorAll)}}var Op="replay";class Ep extends Nf{constructor(t,e){super(t,e||Ep.extractConfig(t.getConfig())),this.name="SessionRecording",this.scriptName="recorder"}static extractConfig(t){var e,i,r,n=t.session_recording||{};return{enabled:null!==(e=n.enabled)&&void 0!==e&&e,sampleRate:n.sampleRate,minimumDurationMs:n.minimumDurationMs,sessionIdleThresholdMs:n.sessionIdleThresholdMs,fullSnapshotIntervalMs:n.fullSnapshotIntervalMs,captureConsole:null!==(i=n.captureConsole)&&void 0!==i&&i,captureNetwork:null!==(r=n.captureNetwork)&&void 0!==r&&r,captureCanvas:n.captureCanvas,blockClass:n.blockClass,blockSelector:n.blockSelector,skipDefaultInvisibleBlocking:n.skipDefaultInvisibleBlocking,ignoreClass:n.ignoreClass,maskTextClass:n.maskTextClass,maskTextSelector:n.maskTextSelector,maskAllInputs:n.maskAllInputs,maskInputOptions:n.maskInputOptions,masking:n.masking,recordHeaders:n.recordHeaders,recordBody:n.recordBody,compressEvents:n.compressEvents,__mutationThrottlerRefillRate:n.__mutationThrottlerRefillRate,__mutationThrottlerBucketSize:n.__mutationThrottlerBucketSize}}get isEnabled(){var t,e=this._instance.getConfig(),i=null!==(t=this.j.enabled)&&void 0!==t&&t,r=!e.disable_session_recording;return!!$u&&i&&r}get isStarted(){var t;return this.Rt&&!!(null===(t=this.Lt)||void 0===t?void 0:t.isStarted)}startIfEnabled(){this.startIfEnabledOrStop("recording_initialized")}startIfEnabledOrStop(t){var e;if(!this.isEnabled||!(null===(e=this.Lt)||void 0===e?void 0:e.isStarted)){var i=void 0!==Object.assign&&void 0!==Array.from;this.isEnabled&&i?(this.Rt=!0,this.Nt(e=>this.Ft(e,t)),ll().info(Op,"starting")):this.stop()}}stop(){dl(()=>{var t;null===(t=this.Lt)||void 0===t||t.stop(),this.Rt=!1})}onConfigUpdate(t){var e;this.j=Ep.extractConfig(t),null===(e=this.Lt)||void 0===e||e.updateConfig(this.j),this.startIfEnabledOrStop("config_updated")}Bt(){var t,e=null===(t=Ju.__VTiltExtensions__)||void 0===t?void 0:t.initSessionRecording;if(!e)throw new Error("[vTilt:replay] initSessionRecording not available after script load");return e(this._instance,this.j)}Ft(t,e){t.start(e)}get started(){return this.isStarted}get status(){var t;return(null===(t=this.Lt)||void 0===t?void 0:t.status)||"lazy_loading"}get sessionId(){var t;return(null===(t=this.Lt)||void 0===t?void 0:t.sessionId)||""}stopRecording(){this.stop()}log(t,e){var i;void 0===e&&(e="log"),(null===(i=this.Lt)||void 0===i?void 0:i.log)?this.Lt.log(t,e):ll().warn(Op,"log called before recorder was ready")}updateConfig(t){var e;this.j=i({},this.j,t),null===(e=this.Lt)||void 0===e||e.updateConfig(this.j)}}var Tp="vtilt-bubble-pos";function Lp(t,e,i){var r=t.getBoundingClientRect(),n=r.left-e,s=r.top-i,o=window.innerWidth-t.offsetWidth-n,a=-n,h=window.innerHeight-t.offsetHeight-s,u=-s;return{x:Math.min(Math.max(e,a),o),y:Math.min(Math.max(i,u),h)}}function Np(t,e,i){t.style.transform="translate3d("+e+"px, "+i+"px, 0)"}function Bp(t,e){var i=t,r=0,n=0,s=0,o=0,a=0,h=0,u=!1,l=!1,c=function(){try{var t=localStorage.getItem(Tp);if(!t)return null;var e=JSON.parse(t);if("number"==typeof e.x&&"number"==typeof e.y)return e}catch(t){}return null}();if(c){r=c.x,n=c.y;var d=t.style.transition;t.style.transition="none",Np(t,r,n);var v=Lp(t,r,n);r=v.x,n=v.y,Np(t,r,n),t.offsetHeight,t.style.transition=d}i.style.cursor="grab",i.style.touchAction="none";var f=e=>{0===e.button&&(u=!0,l=!1,s=e.clientX,o=e.clientY,a=r,h=n,i.setPointerCapture(e.pointerId),i.style.cursor="grabbing",t.style.transition="none")},p=e=>{if(u){var i=e.clientX-s,c=e.clientY-o;if(!(!l&&Math.abs(i)<5&&Math.abs(c)<5)){l=!0;var d={x:a+i,y:h+c},v=Lp(t,d.x,d.y);r=v.x,n=v.y,Np(t,r,n)}}},m=()=>{u&&(u=!1,i.style.cursor="grab",t.style.transition="",l&&function(t){try{localStorage.setItem(Tp,JSON.stringify(t))}catch(t){}}({x:r,y:n}))},g=t=>{l&&(t.stopPropagation(),t.preventDefault(),l=!1)},b=()=>{var e=Lp(t,r,n);r=e.x,n=e.y,Np(t,r,n)};return i.addEventListener("pointerdown",f),i.addEventListener("pointermove",p),i.addEventListener("pointerup",m),i.addEventListener("pointercancel",m),i.addEventListener("click",g,!0),window.addEventListener("resize",b),{destroy(){i.removeEventListener("pointerdown",f),i.removeEventListener("pointermove",p),i.removeEventListener("pointerup",m),i.removeEventListener("pointercancel",m),i.removeEventListener("click",g,!0),window.removeEventListener("resize",b)}}}var Fp="chat";class Dp extends Lf{constructor(t,e){super(t,e||Dp.extractConfig(t.getConfig())),this.name="Chat",this.scriptName="chat",this.Ne=null,this.Be=!1,this.Fe=null,this.De=null,this.je=[],this.Pe=[],this.Ue=[],this.$e=[],this.ze=[],this.We=!1,this.D=()=>{"visible"===document.visibilityState&&this.Ge()}}static extractConfig(t){var e,i=t.chat||{};return{enabled:i.enabled,autoConfig:null===(e=i.autoConfig)||void 0===e||e,position:i.position,greeting:i.greeting,color:i.color,aiMode:i.aiMode,aiGreeting:i.aiGreeting,preload:i.preload,offlineMessage:i.offlineMessage,collectEmailOffline:i.collectEmailOffline,bubble:i.bubble}}get isEnabled(){var t;return!1!==this.j.enabled&&(!0===this.j.enabled||!this._instance.getConfig().disable_chat&&!0===(null===(t=this.Ne)||void 0===t?void 0:t.enabled))}startIfEnabled(){ll().debug(Fp,"startIfEnabled"),this.Ze().catch(t=>{ll().error(Fp,"error starting:",t)})}stop(){this.destroy(),this.Rt=!1}onConfigUpdate(t){var e,i;this.j=Dp.extractConfig(t),this.Lt&&(null===(i=(e=this.Lt).updateConfig)||void 0===i||i.call(e,this.getMergedConfig()))}Bt(){var t,e,i,r=null===(t=Ju.__VTiltExtensions__)||void 0===t?void 0:t.initChat;if(!r)throw new Error("[vTilt:chat] initChat not available after script load");var n=this.getMergedConfig(),s=r(this._instance,n);this.We&&s.show(),this.Ue.forEach(t=>s.onMessage(t)),this.$e.forEach(t=>s.onTyping(t)),this.ze.forEach(t=>s.onConnectionChange(t)),null===(e=this.De)||void 0===e||e.destroy(),this.De=null;var o=null===(i=null==$u?void 0:$u.document)||void 0===i?void 0:i.getElementById("vtilt-chat-bubble");return o&&!o.closest("#vtilt-chat-container")&&o.remove(),s}Ft(t){this.Pe.forEach(t=>t()),this.Pe=[],ll().info(Fp,"loaded and ready")}Ze(){var t=this;return e(function*(){var e,i,r,n,s;try{if(!1===t.j.enabled)return void ll().info(Fp,"disabled by code config");if(t._instance.getConfig().disable_chat)return void ll().info(Fp,"disabled by disable_chat config");if(!1!==t.j.autoConfig&&(yield t.Ve()),!t.isEnabled)return void ll().info(Fp,"not enabled (check dashboard settings)");ll().debug(Fp,"startIfEnabled enabled"),t.Rt=!0,null!==(r=null!==(e=t.j.preload)&&void 0!==e?e:null===(i=t.Ne)||void 0===i?void 0:i.enabled)&&void 0!==r&&r&&t.Ye();var o=t.getMergedConfig();(null===(n=t.Ne)||void 0===n?void 0:n.enabled)&&!1!==(null===(s=o.bubble)||void 0===s?void 0:s.visible)&&t.Je(),ll().info(Fp,"ready (lazy-load on demand)")}finally{t.jt()}})()}get isOpen(){var t,e;return null!==(e=null===(t=this.Lt)||void 0===t?void 0:t.isOpen)&&void 0!==e&&e}get isConnected(){var t,e;return null!==(e=null===(t=this.Lt)||void 0===t?void 0:t.isConnected)&&void 0!==e&&e}get isLoading(){var t,e;return this.Ot||null!==(e=null===(t=this.Lt)||void 0===t?void 0:t.isLoading)&&void 0!==e&&e}get unreadCount(){var t,e;return null!==(e=null===(t=this.Lt)||void 0===t?void 0:t.unreadCount)&&void 0!==e?e:0}get channel(){var t,e;return null!==(e=null===(t=this.Lt)||void 0===t?void 0:t.channel)&&void 0!==e?e:null}get channels(){var t,e;return null!==(e=null===(t=this.Lt)||void 0===t?void 0:t.channels)&&void 0!==e?e:[]}get currentView(){var t,e;return null!==(e=null===(t=this.Lt)||void 0===t?void 0:t.currentView)&&void 0!==e?e:"list"}open(){this.Dt(()=>{this.Xe(()=>{var t;return null===(t=this.Lt)||void 0===t?void 0:t.open()})})}close(){this.Dt(()=>{this.Lt?this.Lt.close():this.Xe(()=>{var t;return null===(t=this.Lt)||void 0===t?void 0:t.close()})})}toggle(){this.Dt(()=>{this.Lt?this.Lt.toggle():this.open()})}show(){this.Dt(()=>{this.We=!0,this.Lt?this.Lt.show():this.Rt&&this.Je()})}hide(){this.Dt(()=>{var t;if(this.We=!1,this.Lt)this.Lt.hide();else{var e=null===(t=null==$u?void 0:$u.document)||void 0===t?void 0:t.getElementById("vtilt-chat-bubble");e&&(e.style.display="none")}})}getChannels(){this.Dt(()=>{this.Xe(()=>{var t;return null===(t=this.Lt)||void 0===t?void 0:t.getChannels()})})}selectChannel(t){this.Dt(()=>{this.Xe(()=>{var e;return null===(e=this.Lt)||void 0===e?void 0:e.selectChannel(t)})})}createChannel(){this.Dt(()=>{this.Xe(()=>{var t;return null===(t=this.Lt)||void 0===t?void 0:t.createChannel()})})}goToChannelList(){this.Dt(()=>{this.Lt?this.Lt.goToChannelList():this.Xe(()=>{var t;return null===(t=this.Lt)||void 0===t?void 0:t.goToChannelList()})})}sendMessage(t,e){this.Dt(()=>{this.Lt?this.Lt.sendMessage(t,e):(this.je.push({content:t,options:e}),this.Xe(()=>{this.je.forEach(t=>{var e,{content:i,options:r}=t;null===(e=this.Lt)||void 0===e||e.sendMessage(i,r)}),this.je=[]}))})}markAsRead(){this.Dt(()=>{this.Lt?this.Lt.markAsRead():this.Xe(()=>{var t;return null===(t=this.Lt)||void 0===t?void 0:t.markAsRead()})})}registerWidget(t){this.Dt(()=>{var e,i;this.Lt?null===(i=(e=this.Lt).registerWidget)||void 0===i||i.call(e,t):this.Xe(()=>{var e,i;null===(i=null===(e=this.Lt)||void 0===e?void 0:e.registerWidget)||void 0===i||i.call(e,t)})})}onMessage(t){return this.Ue.push(t),this.Lt?this.Lt.onMessage(t):()=>{var e=this.Ue.indexOf(t);e>-1&&this.Ue.splice(e,1)}}onTyping(t){return this.$e.push(t),this.Lt?this.Lt.onTyping(t):()=>{var e=this.$e.indexOf(t);e>-1&&this.$e.splice(e,1)}}onConnectionChange(t){return this.ze.push(t),this.Lt?this.Lt.onConnectionChange(t):()=>{var e=this.ze.indexOf(t);e>-1&&this.ze.splice(e,1)}}updateConfig(t){var e,r;this.j=i({},this.j,t),this.Lt&&(null===(r=(e=this.Lt).updateConfig)||void 0===r||r.call(e,this.getMergedConfig()))}getMergedConfig(){var t,e,i,r,n,s,o,a,h,u,l,c,d,v,f,p,m,g,b,y,w,C,S,k,_=this.Ne,I=this.j;return{enabled:null!==(e=null!==(t=I.enabled)&&void 0!==t?t:null==_?void 0:_.enabled)&&void 0!==e&&e,autoConfig:null===(i=I.autoConfig)||void 0===i||i,position:null!==(n=null!==(r=I.position)&&void 0!==r?r:null==_?void 0:_.position)&&void 0!==n?n:"bottom-right",greeting:null!==(s=I.greeting)&&void 0!==s?s:null==_?void 0:_.greeting,color:null!==(a=null!==(o=I.color)&&void 0!==o?o:null==_?void 0:_.color)&&void 0!==a?a:"#6366f1",aiMode:null===(u=null!==(h=I.aiMode)&&void 0!==h?h:null==_?void 0:_.ai_enabled)||void 0===u||u,aiGreeting:null!==(l=I.aiGreeting)&&void 0!==l?l:null==_?void 0:_.ai_greeting,preload:null!==(c=I.preload)&&void 0!==c&&c,theme:null!==(d=I.theme)&&void 0!==d?d:{primaryColor:null!==(f=null!==(v=I.color)&&void 0!==v?v:null==_?void 0:_.color)&&void 0!==f?f:"#6366f1"},offlineMessage:null!==(p=I.offlineMessage)&&void 0!==p?p:null==_?void 0:_.offline_message,collectEmailOffline:null===(g=null!==(m=I.collectEmailOffline)&&void 0!==m?m:null==_?void 0:_.collect_email_offline)||void 0===g||g,bubble:{draggable:null!==(w=null!==(y=null===(b=I.bubble)||void 0===b?void 0:b.draggable)&&void 0!==y?y:null==_?void 0:_.bubble_draggable)&&void 0!==w&&w,visible:null===(k=null!==(S=null===(C=I.bubble)||void 0===C?void 0:C.visible)&&void 0!==S?S:null==_?void 0:_.bubble_visible)||void 0===k||k}}}destroy(){dl(()=>{var t,e,i;document.removeEventListener("visibilitychange",this.D),null===(t=this.Lt)||void 0===t||t.destroy(),this.Lt=void 0,this.We=!1,this.je=[],this.Pe=[],this.Ue=[],this.$e=[],this.ze=[],this.Pt(),null===(e=this.De)||void 0===e||e.destroy(),this.De=null;var r=null===(i=null==$u?void 0:$u.document)||void 0===i?void 0:i.getElementById("vtilt-chat-bubble");r&&r.remove()})}Ve(){var t=this;return e(function*(){if(!t.Be){var e=t._instance.getConfig();if(!e.token)return ll().warn(Fp,"cannot fetch settings: missing token"),void(t.Be=!0);try{var i=fl(e,"/api/chat/settings"),r=yield fetch(i,{headers:pl(e)});if(!r.ok)return ll().warn(Fp,"failed to fetch settings: "+r.status),void(t.Be=!0);t.Ne=yield r.json(),t.Be=!0,ll().info(Fp,"loaded settings from dashboard")}catch(e){ll().warn(Fp,"error fetching settings:",e),t.Be=!0}}})()}Ge(){var t=this;return e(function*(){var e,i,r,n,s=t._instance.getConfig(),o=s.token,a=null!==(r=null===(i=(e=t._instance).getDistinctId)||void 0===i?void 0:i.call(e))&&void 0!==r?r:"";if(ll().debug("chat","fetchUnread","distinctId",a?a.slice(0,12)+"...":"empty"),o&&a)try{var h=fl(s,"/api/chat/widget/unread"),u=h.includes("?")?"&":"?",l=""+h+u+"distinct_id="+encodeURIComponent(a),c=yield fetch(l,{headers:pl(s)});if(!c.ok)return;var d=yield c.json(),v=Number(null!==(n=d.unread_count)&&void 0!==n?n:0),f=document.getElementById("vtilt-chat-bubble");if(!f)return;var p=f.querySelector(".vtilt-chat-bubble-badge");if(!p)return;v>0?(p.style.display="flex",p.textContent=v>99?"99+":String(v)):p.style.display="none"}catch(t){}else{var m=o?"missing distinctId":"missing token";ll().debug("chat","fetchUnread skip","reason",m)}})()}Je(){var t,e;if(null==$u?void 0:$u.document){var i=document.getElementById("vtilt-chat-bubble");if(i)i.style.display="flex";else{var r=this.getMergedConfig(),n=r.position||"bottom-right",s=r.color||"#6366f1",o=document.createElement("div");o.id="vtilt-chat-bubble",o.setAttribute("style",("\n position: fixed;\n bottom: 20px;\n "+("bottom-right"===n?"right: 20px;":"left: 20px;")+"\n width: 60px;\n height: 60px;\n border-radius: 50%;\n background: "+s+";\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n transition: transform 0.2s, box-shadow 0.2s;\n z-index: 999999;\n ").trim()),o.innerHTML='\n <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">\n <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>\n </svg>\n <div class="vtilt-chat-bubble-badge" style="\n display: none;\n position: absolute;\n top: -4px;\n right: -4px;\n background: #E53935;\n color: white;\n font-size: 11px;\n font-weight: 700;\n min-width: 20px;\n height: 20px;\n border-radius: 10px;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n box-sizing: border-box;\n border: 2px solid white;\n ">0</div>\n ';var a=!0===(null===(t=r.bubble)||void 0===t?void 0:t.draggable);a||(o.addEventListener("mouseenter",()=>{o.style.transform="scale(1.05)",o.style.boxShadow="0 6px 16px rgba(0, 0, 0, 0.2)"}),o.addEventListener("mouseleave",()=>{o.style.transform="scale(1)",o.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"})),o.addEventListener("click",()=>{this.open()}),document.body.appendChild(o),a&&(null===(e=this.De)||void 0===e||e.destroy(),this.De=Bp(o)),this.Ge(),document.addEventListener("visibilitychange",this.D)}}}Ye(){"undefined"!=typeof requestIdleCallback?requestIdleCallback(()=>this.Nt(()=>{}),{timeout:5e3}):setTimeout(()=>this.Nt(()=>{}),3e3)}Xe(t){this.Lt?t():(this.Pe.push(t),this.Nt(t=>this.Ft(t)))}}function jp(t,e){t("js",new Date);var{tagIds:r,configParams:n,sendPageView:s,debugMode:o,conversionLinker:a,linkerDomains:h}=e,u=i({},n||{});for(var l of(!1===s&&(u.send_page_view=!1),o&&(u.debug_mode=!0),!1===a&&(u.conversion_linker=!1),h&&h.length>0&&(u.linker={domains:h,decorate_forms:!0}),r))l&&t("config",l,u)}function Pp(t,e){var i,r=(t.tagIds||[]).filter(t=>!!t);if(0===r.length)return null;var n,s,o,a=null!==(i=t.proxyMode)&&void 0!==i?i:"proxied";if("direct"===a)n=$p,s=$p,o="";else{var h=function(t){var e,i=void 0!==$u&&(null===(e=null==$u?void 0:$u.location)||void 0===e?void 0:e.origin)?$u.location.origin:"";if(!t)return i?{base:i,absoluteBase:i}:null;var r=t.replace(/\/+$/g,"");if(!r)return i?{base:i,absoluteBase:i}:null;try{var n=new URL(r),s=n.pathname.replace(/\/$/,""),o=""+n.origin+s;return{base:o,absoluteBase:o}}catch(t){}if(r.startsWith("/"))return{base:r,absoluteBase:i?""+i+r:r};return i?{base:i,absoluteBase:i}:null}(e);if(!h)return null;n=h.base,s=h.absoluteBase,o=Up}var u={};if("direct"!==a){var l=function(t){if(!t)return"";var e=t.startsWith("/")?t:"/"+t;return e.replace(/\/$/,"")}(o);u.transport_url=""+s.replace(/\/$/,"")+l}return{origin:n,gatewayPath:o,primaryTagId:r.find(t=>t.startsWith("G-"))||r[0]||"",tagIds:r,configParams:u,sendPageView:!1!==t.capturePageview,debugMode:!!t.debugMode,conversionLinker:!1!==t.conversionLinker,linkerDomains:t.linkerDomains}}var Up="/gt",$p="https://www.googletagmanager.com";function zp(t,e){var r=!0===t.advertising,n={ad_storage:r?"granted":"denied",ad_user_data:r?"granted":"denied",ad_personalization:r?"granted":"denied",analytics_storage:!0===t.analytics?"granted":"denied"};if(!e)return n;var s=i({},n);return Object.keys(n).forEach(i=>{var r=e[i];void 0!==r&&(s[i]=function(t,e){return"granted"===e?"granted":"denied"===e?"denied":"follow_advertising"===e?!0===t.advertising?"granted":"denied":"follow_analytics"===e&&!0===t.analytics?"granted":"denied"}(t,r))}),s}function Wp(t){if(null==t)return null;var e=String(t).trim().toLowerCase();return e||null}function Gp(t,e){if(t&&e){var i=e.split("."),r=t;for(var n of i){if(null==r||"object"!=typeof r)return;r=r[n]}return r}}function Zp(t){if("number"==typeof t&&Number.isFinite(t))return t;if("string"==typeof t&&""!==t.trim()){var e=Number(t);if(Number.isFinite(e))return e}}function Vp(t){if(null!=t)return"string"==typeof t?t:"number"==typeof t||"boolean"==typeof t?String(t):void 0}function Yp(t){var{mapping:e,payload:i}=t,r={send_to:e.send_to},n=e.value_param_path||"value",s=e.currency_param_path||"currency",o=Zp(Gp(i,n));void 0!==o&&(r.value=o);var a=Vp(Gp(i,s))||e.default_currency||void 0;if(a&&(r.currency=a),!1!==e.send_transaction_id){var h=Vp(Gp(i,e.transaction_id_param_path||"transaction_id"));h&&(r.transaction_id=h)}return{send_to:e.send_to,params:r}}var Jp=[{source:"$pageview",destination:"page_view",buildParams:t=>{var e,i={},r=Vp(t.$current_url);r&&(i.page_location=r);var n=Vp(t.$pathname);n&&(i.page_path=n);var s=null!==(e=Vp(t.title))&&void 0!==e?e:Vp(t.$title);s&&(i.page_title=s);var o=Vp(t.$referrer);return o&&(i.page_referrer=o),i}},{source:"$pageleave",destination:"user_engagement",buildParams:t=>{var e,i,r={},n=Zp(null!==(i=null!==(e=t.$dwell_time_ms)&&void 0!==e?e:t.engagement_time_msec)&&void 0!==i?i:t.$time_on_page_ms);return void 0!==n&&(r.engagement_time_msec=Math.round(n)),r}}];function Xp(t,e,i){var r=e.split(".").filter(Boolean);if(0!==r.length)if(1!==r.length){for(var n=t,s=0;s<r.length-1;s++){var o=r[s],a=r[s+1];if(null==n||"object"!=typeof n||Array.isArray(n))return;var h=n;if(/^\d+$/.test(a)){var u=Array.isArray(h[o])?h[o]:[];Array.isArray(h[o])||(h[o]=u);for(var l=parseInt(a,10);u.length<=l;)u.push({});if(s+1===r.length-1)return void(u[l]=i);var c=u[l];c&&"object"==typeof c&&!Array.isArray(c)||(c={},u[l]=c),n=c,s++}else{var d=h[o];d&&"object"==typeof d&&!Array.isArray(d)||(d={},h[o]=d),n=d}}var v=r[r.length-1];n&&"object"==typeof n&&!Array.isArray(n)&&(n[v]=i)}else t[r[0]]=i}var Kp=new Set(["client_id","user_id","first_visit","session_start"]);function Hp(t,e,i,r){if(!function(t,e){return!(e&&(Array.isArray(e.exclude)&&e.exclude.includes(t)||Array.isArray(e.include)&&e.include.length>0&&!e.include.includes(t)))}(e,r.eventFilter))return{fired:!1};var n=(r.eventMappings||[]).find(t=>(null==t?void 0:t.source)===e);if(n&&n.destination){var{name:s,params:o}=function(t,e){var i={},r=Array.isArray(t.param_mappings)?t.param_mappings:[];for(var n of r){var s=null==n?void 0:n.source,o=null==n?void 0:n.destination;if(s&&o){var a=Gp(e,s);void 0!==a&&(o.includes(".")?Xp(i,o,a):i[o]=a)}}return{name:t.destination,params:i}}(n,i);return t("event",s,o),{fired:!0,eventName:s,params:o,source:"mapping"}}if(!1===r.autoForward)return{fired:!1};var a=Jp.find(t=>t.source===e);if(a){var h=a.buildParams(i);return t("event",a.destination,h),{fired:!0,eventName:a.destination,params:h,source:"preset"}}if(e.startsWith("$"))return{fired:!1};var u=function(t){var e={};for(var[i,r]of Object.entries(t))i.startsWith("$")||Kp.has(i)||void 0!==r&&(e[i]=r);return e}(i);return t("event",e,u),{fired:!0,eventName:e,params:u,source:"auto"}}function qp(){var t=null,e=[],i=[];return{call:function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];if((t=>{i.push(t),i.length>50&&i.shift()})(n),t)try{t(...n)}catch(t){}else e.push(n)},flush(i){for(t=i;e.length;){var r=e.shift();try{i(...r)}catch(t){}}},getRecentCalls:()=>i.slice()}}function Qp(t){return tm.apply(this,arguments)}function tm(){return tm=e(function*(t){try{var e="undefined"!=typeof crypto&&crypto.subtle?crypto.subtle:null;if(!e)return null;var i=(new TextEncoder).encode(t),r=yield e.digest("SHA-256",i),n=Array.from(new Uint8Array(r)).map(t=>t.toString(16).padStart(2,"0")).join("");return n}catch(t){return null}}),tm.apply(this,arguments)}function em(){return(em=e(function*(t){var e={},i=function(t){if(!t)return null;var e=String(t).trim().toLowerCase();if(!e)return null;if(!e.includes("@"))return null;var[i,r]=e.split("@");if(!i||!r)return null;if("gmail.com"===r||"googlemail.com"===r){var n=i.split("+")[0].replace(/\./g,"");return n?n+"@"+r:null}return i+"@"+r}(t.email),r=function(t){if(!t)return null;var e=String(t).trim();if(!e)return null;if(e.startsWith("+")){var i=e.slice(1).replace(/\D/g,"");return i?"+"+i:null}return null}(t.phone),n=Wp(t.first_name),s=Wp(t.last_name),o=Wp(t.street),a=Wp(t.city),h=Wp(t.region),u=function(t){if(!t)return null;var e=String(t).trim().toUpperCase().replace(/\s+/g,"");return e||null}(t.postal_code),l=Wp(t.country);if(i){var c=yield Qp(i);c&&(e.sha256_email_address=c)}if(r){var d=yield Qp(r);d&&(e.sha256_phone_number=d)}var v={};if(n){var f=yield Qp(n);f&&(v.sha256_first_name=f)}if(s){var p=yield Qp(s);p&&(v.sha256_last_name=p)}if(o){var m=yield Qp(o);m&&(v.sha256_street=m)}return a&&(v.city=a),h&&(v.region=h),u&&(v.postal_code=u),l&&(v.country=l),Object.keys(v).length>0&&(e.address=v),0===Object.keys(e).length?null:e})).apply(this,arguments)}class im{constructor(t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.Ke=t,this.He=[]}get length(){return this.He.length}enqueue(t){return!(this.He.length>=this.Ke)&&(this.He.push(t),!0)}takeAll(){if(0===this.He.length)return[];var t=this.He;return this.He=[],t}clear(){this.He=[]}}var rm="google-tag";class nm{constructor(t,e){this.name="GoogleTagGateway",this.Rt=!1,this.qe=!1,this.Qe=!1,this.ti=!1,this.ei=null,this.ii=null,this.ri=null,this.ni=null,this.si=[],this.oi=100,this.ai=new im(100),this._instance=t,this.j=e||nm.extractConfig(t.getConfig()),this.hi=qp(),this.ui()}static extractConfig(t){if(t.disable_google_tag)return{enabled:!1};var e=t.google_tag;return e?{enabled:(e.tagIds||[]).some(t=>!!t),remote:e}:{enabled:!1}}get isEnabled(){return!1!==this.j.enabled&&!!this.j.remote}get isStarted(){return this.Rt}get gtag(){return this.hi.call}get deliveryLog(){return this.si.slice()}startIfEnabled(){this.Rt||this.isEnabled&&this._instance.getConfig().__remote_config_loaded&&this.qt()}stop(){var t;this.Rt&&(null===(t=this.ni)||void 0===t||t.call(this),this.ni=null,this.Rt=!1)}onConfigUpdate(t){var e=nm.extractConfig(t),i=this.isEnabled;this.j=e;var r=!0===t.__remote_config_loaded;if(i&&!this.isEnabled)this.stop();else if(this.Rt&&e.remote&&this.ii){var n=Pp(e.remote,this._instance.getConfig().api_host);n&&(this.ii=n,jp(this.ei,n))}r&&!this.isEnabled&&this.ai.clear(),r&&this.isEnabled&&!this.Rt&&this.startIfEnabled()}setUserData(t){var i=this;return e(function*(){var e=i.j.remote;if(e&&e.enhancedConversions){var r=yield function(t){return em.apply(this,arguments)}(t);r&&i.hi.call("set","user_data",r)}})()}getRecentPublicCalls(){return this.hi.getRecentCalls()}qt(){var t=this.j.remote;if(t){var e=Pp(t,this._instance.getConfig().api_host);if(e){this.ii=e;var{gtag:i}=function(){var t,e,i=Ju,r=null!==(t=(e=i).dataLayer)&&void 0!==t?t:e.dataLayer=[],n=i.gtag;if(n)return{gtag:n,dataLayer:r};var s=function(){r.push(arguments)};return i.gtag=s,{gtag:s,dataLayer:r}}();this.ei=i,this.hi.flush(i),this.li(),jp(i,e),this.qe||(this.qe=!0,function(t,e,i){var r=null==$u?void 0:$u.document;if(!r)return null;var{origin:n,gatewayPath:s,primaryTagId:o}=t;if(!n||!o)return null;var a=""+n.replace(/\/$/,"")+(s?s.startsWith("/")?s.replace(/\/$/,""):"/"+s.replace(/\/$/,""):"")+"/gtag/js?id="+encodeURIComponent(o)+"&l=dataLayer",h=r.querySelector('script[data-vtilt-gtag-loader="'+o+'"]');if(h)return h;var u=r.createElement("script");u.async=!0,u.src=a,u.setAttribute("data-vtilt-gtag-loader",o),u.onload=()=>null==e?void 0:e(),u.onerror=()=>{var t=new Error("[GoogleTagGateway] failed to load "+a);null==i||i(t)},(r.head||r.body||r.documentElement).appendChild(u)}(e,()=>{this.Qe=!0},t=>{ll().warn(rm,t.message)})),this.ci(),this.Rt=!0,this.di()}else ll().warn(rm,"skipped — missing tag_ids or resolvable origin")}}di(){for(var t of this.ai.takeAll())this.fi(t.event,t.payload)}li(){var t;if(!this.ti&&this.ei){var e=dl(()=>this._instance.consentManager.getConsent());!function(t,e,r){t("consent","default",i({},zp(e,r),{wait_for_update:500}))}(this.ei,e||{},null===(t=this.j.remote)||void 0===t?void 0:t.consentOverride),this.ti=!0}}ui(){if(!this.ri){this.ri=this._instance._emitter.on(Cl,t=>{var e=t;e&&"string"==typeof e.event&&this.fi(e.event,e.payload||{})})}}fi(t,e){var i=this._instance.getConfig();if(!i.disable_google_tag)if(i.__remote_config_loaded){if(this.isEnabled&&(this.Rt||this.startIfEnabled(),this.ei&&this.j.remote&&this.Rt)){var r=this.j.remote,n=r.tagIds||[],s=Hp(this.ei,t,e,r);if(s.fired&&s.eventName&&this.pi({ts:Date.now(),tag_ids:n,event_name:t,send_to:"ga4:"+s.eventName,status:"fired",reason:s.source}),!1!==r.sendAdsConversions){var o=function(t,e,i,r){var n=(r.conversions||[]).filter(t=>t.event_name===e);if(0===n.length)return[];var s=[];for(var o of n){var a=Yp({mapping:o,payload:i});t("event","conversion",a.params),s.push(a)}return s}(this.ei,t,e,r);for(var a of o)this.pi({ts:Date.now(),tag_ids:n,event_name:t,send_to:a.send_to,status:"fired"})}}}else this.ai.enqueue({event:t,payload:e})}ci(){if(!this.ni){this.ni=this._instance._emitter.on(wl,t=>{var e;if(this.ei){var i,r,n,s=t;i=this.ei,r=s.consent||{},n=null===(e=this.j.remote)||void 0===e?void 0:e.consentOverride,i("consent","update",zp(r,n))}})}}pi(t){this.si.push(t),this.si.length>this.oi&&this.si.shift()}}var sm="vtd-overlay";class om{constructor(t,e){this.name="VtdOverlay",this.Rt=!1,this.mi=null,this.gi=null,this.Ot=!0,this.bi=null,this.yi=null,this.wi=null,this._instance=t,this.j=e||om.extractConfig(t.getConfig())}static extractConfig(t){return{enabled:!1!==t.vtd_overlay}}get isEnabled(){return!1!==this.j.enabled}get isStarted(){return this.Rt}startIfEnabled(){}stop(){this.Rt&&dl(()=>{this.Ci(),this.Rt=!1})}onConfigUpdate(t){this.j=om.extractConfig(t),!this.isEnabled&&this.Rt&&this.stop()}setDestinationUrl(t){var e;if(this.isEnabled)if(null==t?void 0:t.trim()){var i=t;try{i=decodeURIComponent(t)}catch(e){i=t}if(this.Si(i)){var r=this.ki(i);this.gi=i,this.mi=r,this.Ot=!0,this.Ii(),this.Rt=!0,this._instance.capture("$vtd_view",{$vtd_url:i,$vtd_embed_url:r!==i?r:void 0,$current_url:null===(e=null==$u?void 0:$u.location)||void 0===e?void 0:e.href})}else ll().warn(sm,"invalid URL: "+i)}else ll().warn(sm,"empty URL provided");else ll().warn(sm,"feature is disabled")}getDestinationUrl(){return this.mi}close(){this._instance.capture("$vtd_close",{$vtd_url:this.gi}),this.bi?(this.bi.classList.add("vtilt-vtd-closing"),setTimeout(()=>{this.Ci(),this.Rt=!1,this.mi=null,this.gi=null},200)):(this.Ci(),this.Rt=!1,this.mi=null,this.gi=null)}Si(t){try{var e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol}catch(t){return!1}}ki(t){try{var e=new URL(t),i=e.hostname.toLowerCase();if("youtube.com"===i||"www.youtube.com"===i||"m.youtube.com"===i){var r=e.searchParams.get("v");if(r){var n=e.searchParams.get("t"),s="https://www.youtube.com/embed/"+r+"?autoplay=1";return n&&(s+="&start="+n.replace("s","")),s}}if("youtu.be"===i){var o=e.pathname.slice(1);if(o){var a=e.searchParams.get("t"),h="https://www.youtube.com/embed/"+o+"?autoplay=1";return a&&(h+="&start="+a.replace("s","")),h}}if("vimeo.com"===i||"www.vimeo.com"===i){var u=e.pathname.match(/^\/(\d+)/);if(u)return"https://player.vimeo.com/video/"+u[1]+"?autoplay=1"}if("loom.com"===i||"www.loom.com"===i){var l=e.pathname.match(/^\/share\/([a-zA-Z0-9]+)/);if(l)return"https://www.loom.com/embed/"+l[1]+"?autoplay=1"}if(i.endsWith("wistia.com")){var c=e.pathname.match(/^\/medias\/([a-zA-Z0-9]+)/);if(c)return"https://fast.wistia.net/embed/iframe/"+c[1]+"?autoplay=1"}if("dailymotion.com"===i||"www.dailymotion.com"===i){var d=e.pathname.match(/^\/video\/([a-zA-Z0-9]+)/);if(d)return"https://www.dailymotion.com/embed/video/"+d[1]+"?autoplay=1"}if("open.spotify.com"===i){var v=e.pathname.match(/^\/(track|album|playlist|episode|show)\/([a-zA-Z0-9]+)/);if(v)return"https://open.spotify.com/embed/"+v[1]+"/"+v[2]}return"drive.google.com"===i&&e.pathname.includes("/view")?t.replace("/view","/preview"):t}catch(e){return t}}xi(t){try{return new URL(t).hostname}catch(e){return t}}Ai(t){try{return"https://www.google.com/s2/favicons?domain="+new URL(t).hostname+"&sz=32"}catch(t){return""}}Ii(){if(Gu&&this.mi){this.Ci(),this.bi=Gu.createElement("div"),this.bi.id="vtilt-vtd-overlay",this.bi.className="vtilt-vtd-opening",this.bi.setAttribute("style",this.Mi());var t=Gu.createElement("div");t.className="vtilt-vtd-modal",t.setAttribute("style",this.Ri());var e=Gu.createElement("div");e.className="vtilt-vtd-header",e.setAttribute("style",this.Oi()),e.innerHTML=this.Ei(),t.appendChild(e);var i=Gu.createElement("div");i.className="vtilt-vtd-iframe-wrapper",i.setAttribute("style",this.Ti()),this.wi=Gu.createElement("div"),this.wi.className="vtilt-vtd-loading",this.wi.setAttribute("style",this.Li()),this.wi.innerHTML=this.Ni(),i.appendChild(this.wi),this.yi=Gu.createElement("iframe"),this.yi.id="vtilt-vtd-iframe",this.yi.className="vtilt-vtd-iframe",this.yi.setAttribute("style",this.Bi()),this.yi.setAttribute("frameborder","0"),this.yi.setAttribute("allowfullscreen","true"),this.yi.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share");var r=()=>{this.Ot=!1,this.wi&&(this.wi.style.opacity="0",setTimeout(()=>{var t;(null===(t=this.wi)||void 0===t?void 0:t.parentNode)&&(this.wi.style.display="none")},300)),this.yi&&(this.yi.style.opacity="1")};this.yi.onload=r,this.yi.onerror=r,setTimeout(()=>{this.Ot&&r()},5e3),i.appendChild(this.yi),this.yi.src=this.mi,t.appendChild(i),this.bi.appendChild(t);var n=Gu.createElement("style");n.id="vtilt-vtd-styles",n.textContent=this.Fi(),Gu.head.appendChild(n),Gu.body.appendChild(this.bi),this.Di(),Gu.body.style.overflow="hidden"}}Ci(){var t;(null===(t=this.bi)||void 0===t?void 0:t.parentNode)&&(this.bi.parentNode.removeChild(this.bi),this.bi=null,this.yi=null,this.wi=null);var e=null==Gu?void 0:Gu.getElementById("vtilt-vtd-styles");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e),(null==Gu?void 0:Gu.body)&&(Gu.body.style.overflow="")}Di(){var t,e,i,r=null===(t=this.bi)||void 0===t?void 0:t.querySelector(".vtilt-vtd-close");null==r||r.addEventListener("click",()=>this.close());var n=null===(e=this.bi)||void 0===e?void 0:e.querySelector(".vtilt-vtd-open");null==n||n.addEventListener("click",()=>{this.gi&&(null==$u||$u.open(this.gi,"_blank"))}),null===(i=this.bi)||void 0===i||i.addEventListener("click",t=>{t.target===this.bi&&this.close()});var s=t=>{"Escape"===t.key&&(this.close(),null==Gu||Gu.removeEventListener("keydown",s))};null==Gu||Gu.addEventListener("keydown",s)}Mi(){return'\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147483647;\n background: rgba(0, 0, 0, 0.85);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n '}Ri(){return"\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: #0a0a0a;\n overflow: hidden;\n "}Oi(){return"\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 16px;\n height: 56px;\n background: linear-gradient(180deg, rgba(20, 20, 20, 1) 0%, rgba(15, 15, 15, 1) 100%);\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n flex-shrink: 0;\n gap: 16px;\n "}Ei(){var t=this.gi||this.mi,e=t?this.xi(t):"";return'\n <div style="display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;">\n <img \n src="'+(t?this.Ai(t):"")+'" \n alt="" \n style="width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0;"\n onerror="this.style.display=\'none\'"\n />\n <div style="\n display: flex;\n flex-direction: column;\n min-width: 0;\n gap: 2px;\n ">\n <div style="\n color: rgba(255, 255, 255, 0.95);\n font-size: 14px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.2;\n ">'+this.ji(e)+'</div>\n <div style="\n color: rgba(255, 255, 255, 0.45);\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.2;\n ">'+this.ji(this.Pi(t||"",50))+'</div>\n </div>\n </div>\n <div style="display: flex; align-items: center; gap: 8px; flex-shrink: 0;">\n <button class="vtilt-vtd-open vtilt-vtd-btn" title="Open in new tab">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>\n <polyline points="15 3 21 3 21 9"></polyline>\n <line x1="10" y1="14" x2="21" y2="3"></line>\n </svg>\n <span class="vtilt-vtd-btn-text">Open</span>\n </button>\n <button class="vtilt-vtd-close vtilt-vtd-btn vtilt-vtd-btn-primary" title="Close (Esc)">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n <span class="vtilt-vtd-btn-text">Close</span>\n </button>\n </div>\n '}Ti(){return"\n flex: 1;\n position: relative;\n background: #000;\n overflow: hidden;\n "}Li(){return"\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: #0a0a0a;\n z-index: 1;\n transition: opacity 0.3s ease;\n "}Ni(){var t=this.gi||this.mi,e=t?this.xi(t):"";return'\n <div class="vtilt-vtd-spinner"></div>\n <div style="\n margin-top: 20px;\n color: rgba(255, 255, 255, 0.7);\n font-size: 14px;\n font-weight: 500;\n ">Loading '+this.ji(e)+'...</div>\n <div style="\n margin-top: 8px;\n color: rgba(255, 255, 255, 0.35);\n font-size: 12px;\n ">Press <kbd style="\n display: inline-block;\n padding: 2px 6px;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 4px;\n font-family: inherit;\n font-size: 11px;\n ">Esc</kbd> to close</div>\n '}Bi(){return"\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n background: white;\n opacity: 0;\n transition: opacity 0.3s ease;\n "}Fi(){return"\n /* Animations */\n @keyframes vtilt-vtd-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n \n @keyframes vtilt-vtd-fade-out {\n from { opacity: 1; }\n to { opacity: 0; }\n }\n \n @keyframes vtilt-vtd-scale-in {\n from { opacity: 0; transform: scale(0.96); }\n to { opacity: 1; transform: scale(1); }\n }\n \n @keyframes vtilt-vtd-spin {\n to { transform: rotate(360deg); }\n }\n \n /* Container animations */\n #vtilt-vtd-overlay.vtilt-vtd-opening {\n animation: vtilt-vtd-fade-in 0.2s ease-out forwards;\n }\n \n #vtilt-vtd-overlay.vtilt-vtd-opening .vtilt-vtd-modal {\n animation: vtilt-vtd-scale-in 0.25s ease-out forwards;\n }\n \n #vtilt-vtd-overlay.vtilt-vtd-closing {\n animation: vtilt-vtd-fade-out 0.2s ease-in forwards;\n }\n \n /* Loading spinner */\n .vtilt-vtd-spinner {\n width: 40px;\n height: 40px;\n border: 3px solid rgba(255, 255, 255, 0.1);\n border-top-color: rgba(255, 255, 255, 0.8);\n border-radius: 50%;\n animation: vtilt-vtd-spin 0.8s linear infinite;\n }\n \n /* Button base styles */\n .vtilt-vtd-btn {\n background: rgba(255, 255, 255, 0.08);\n border: 1px solid rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.9);\n padding: 8px 14px;\n border-radius: 8px;\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 6px;\n transition: all 0.15s ease;\n -webkit-tap-highlight-color: transparent;\n outline: none;\n }\n \n .vtilt-vtd-btn:hover {\n background: rgba(255, 255, 255, 0.14);\n border-color: rgba(255, 255, 255, 0.18);\n }\n \n .vtilt-vtd-btn:active {\n background: rgba(255, 255, 255, 0.18);\n transform: scale(0.98);\n }\n \n .vtilt-vtd-btn:focus-visible {\n box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);\n }\n \n /* Primary button variant */\n .vtilt-vtd-btn-primary {\n background: rgba(255, 255, 255, 0.95);\n border-color: transparent;\n color: #0a0a0a;\n }\n \n .vtilt-vtd-btn-primary:hover {\n background: rgba(255, 255, 255, 1);\n border-color: transparent;\n }\n \n .vtilt-vtd-btn-primary:active {\n background: rgba(255, 255, 255, 0.85);\n }\n \n /* Desktop responsive - modal with margin */\n @media (min-width: 768px) {\n #vtilt-vtd-overlay {\n padding: 32px;\n }\n \n .vtilt-vtd-modal {\n max-width: 1200px;\n max-height: 90vh;\n width: 100%;\n height: auto;\n min-height: 500px;\n border-radius: 16px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);\n }\n \n .vtilt-vtd-header {\n border-radius: 16px 16px 0 0;\n }\n \n .vtilt-vtd-iframe-wrapper {\n border-radius: 0 0 16px 16px;\n min-height: 400px;\n }\n }\n \n /* Large desktop - bigger modal */\n @media (min-width: 1400px) {\n #vtilt-vtd-overlay {\n padding: 48px;\n }\n \n .vtilt-vtd-modal {\n max-width: 1400px;\n max-height: 85vh;\n }\n }\n \n /* Tablet */\n @media (min-width: 768px) and (max-width: 1024px) {\n #vtilt-vtd-overlay {\n padding: 24px;\n }\n \n .vtilt-vtd-modal {\n max-width: 95%;\n max-height: 90vh;\n }\n }\n \n /* Mobile - fullscreen */\n @media (max-width: 767px) {\n #vtilt-vtd-overlay {\n padding: 0 !important;\n background: #0a0a0a !important;\n }\n \n .vtilt-vtd-modal {\n width: 100% !important;\n height: 100% !important;\n max-width: none !important;\n max-height: none !important;\n border-radius: 0 !important;\n }\n \n .vtilt-vtd-header {\n border-radius: 0 !important;\n padding: 0 12px !important;\n height: 52px !important;\n }\n \n .vtilt-vtd-btn {\n padding: 8px 10px !important;\n }\n \n .vtilt-vtd-btn-text {\n display: none !important;\n }\n \n .vtilt-vtd-iframe-wrapper {\n border-radius: 0 !important;\n }\n }\n \n /* Reduced motion */\n @media (prefers-reduced-motion: reduce) {\n #vtilt-vtd-overlay,\n #vtilt-vtd-overlay *,\n .vtilt-vtd-spinner {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n }\n "}Pi(t,e){return t.length<=e?t:t.substring(0,e-3)+"..."}ji(t){if(void 0===Gu)return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");var e=Gu.createElement("div");return e.textContent=t,e.innerHTML}}var am,hm="text/plain",um=61440;!function(t){t.GZipJS="gzip-js",t.Base64="base64",t.None="none"}(am||(am={}));var lm=function(t,e){void 0===e&&(e="binary");var{data:i,compression:r}=t;if(i){var n=(t=>JSON.stringify(t,(t,e)=>"bigint"==typeof e?e.toString():e))(i),s=new Blob([n]).size;if(r===am.GZipJS&&s>=1024)try{var o=xc(Rc(n),{mtime:0});if("text-base64"===e){var a=Oc(o);if(a.length>0&&a.length<.95*s)return{contentType:hm,body:a,estimatedSize:a.length,compressionApplied:am.Base64}}else{var h=new Blob([o],{type:hm});if(h.size>0&&h.size<.95*s)return{contentType:hm,body:h,estimatedSize:h.size,compressionApplied:am.GZipJS}}}catch(t){}return{contentType:"application/json",body:n,estimatedSize:s,compressionApplied:null}}};function cm(t,e){return e.compressionApplied?function(t,e){var i=t.includes("?")?"&":"?";return""+t+i+"compression="+e}(t.url,e.compressionApplied):t.url}function dm(t,e){var i={};return e&&(i["Content-Type"]=e),t.headers&&Object.assign(i,t.headers),t.projectToken&&(i[vl]=t.projectToken),i}var vm=[{name:"fetch",isAvailable:()=>"undefined"!=typeof fetch,method:t=>{var i=lm(t,"binary");if(i){var{contentType:r,body:n,estimatedSize:s}=i,o=cm(t,i),a=dm(t,r),h=new AbortController,u=t.timeout?setTimeout(()=>h.abort(),t.timeout):null;fetch(o,{method:t.method||"POST",headers:a,body:n,keepalive:s<um,signal:h.signal}).then(function(){var i=e(function*(e){var i,r=yield e.text(),n={statusCode:e.status,text:r};if(200===e.status){Ml();try{n.json=JSON.parse(r)}catch(t){}}null===(i=t.callback)||void 0===i||i.call(t,n)});return function(t){return i.apply(this,arguments)}}()).catch(()=>{var e;Al("capture"),null===(e=t.callback)||void 0===e||e.call(t,{statusCode:0})}).finally(()=>{u&&clearTimeout(u)})}}},{name:"XHR",isAvailable:()=>"undefined"!=typeof XMLHttpRequest,method:t=>{var e=lm(t,"binary");if(e){var{contentType:i,body:r}=e,n=cm(t,e),s=dm(t,i),o=new XMLHttpRequest;for(var[a,h]of(o.open(t.method||"POST",n,!0),Object.entries(s)))o.setRequestHeader(a,h);t.timeout&&(o.timeout=t.timeout),o.onreadystatechange=()=>{var e;if(4===o.readyState){var i={statusCode:o.status,text:o.responseText};if(200===o.status){Ml();try{i.json=JSON.parse(o.responseText)}catch(t){}}null===(e=t.callback)||void 0===e||e.call(t,i)}},o.onerror=()=>{var e;Al("capture"),null===(e=t.callback)||void 0===e||e.call(t,{statusCode:0})},o.send(r)}}},{name:"sendBeacon",isAvailable:()=>"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:t=>{var e=lm(t,"text-base64");if(e){var{contentType:r,body:n,estimatedSize:s}=e;if(0!==s){var o=cm(t,e),a=t.projectToken?function(t,e){if(!e||/[?&]token=/.test(t))return t;var i=t.includes("?")?"&":"?";return""+t+i+"token="+e}(o,t.projectToken):o;if(s<=um)try{var h="string"==typeof n?new Blob([n],{type:r}):n;if("undefined"!=typeof navigator&&navigator.sendBeacon)if(navigator.sendBeacon(a,h))return}catch(t){}try{var u="string"==typeof n?new Blob([n],{type:r}):n,l=i({"Content-Type":r},t.headers||{});fetch(a,{method:t.method||"POST",headers:l,body:u,keepalive:s<um}).catch(()=>{})}catch(t){}}}}}],fm=t=>{var e,i;if(Rl())null===(e=t.callback)||void 0===e||e.call(t,{statusCode:0});else{var r=t.transport||"fetch",n=vm.find(t=>t.name===r&&t.isAvailable())||vm.find(t=>t.isAvailable());if(!n)return ll().error("request","no available transport method"),void(null===(i=t.callback)||void 0===i||i.call(t,{statusCode:0}));n.method(t)}};class pm{constructor(t,e){var i,r,n,s;this.Ui=!0,this.$i=[],this.zi=(i=(null==e?void 0:e.flush_interval_ms)||3e3,r=250,n=5e3,s=3e3,"number"!=typeof i||isNaN(i)?s:Math.min(Math.max(i,r),n)),this.Wi=t}get length(){return this.$i.length}enqueue(t){this.$i.push(t),this.Gi||this.Zi()}unload(){if(this.Vi(),0!==this.$i.length){var t=this.Yi();for(var e in t){var r=t[e];this.Wi(i({},r,{transport:"sendBeacon"}))}}}enable(){this.Ui=!1,this.Zi()}pause(){this.Ui=!0,this.Vi()}flush(){this.Vi(),this.Ji(),this.Zi()}Zi(){this.Ui||(this.Gi=setTimeout(()=>{this.Vi(),this.Ji(),this.$i.length>0&&this.Zi()},this.zi))}Vi(){this.Gi&&(clearTimeout(this.Gi),this.Gi=void 0)}Ji(){if(0!==this.$i.length){var t=this.Yi(),e=Date.now();for(var i in t){var r=t[i];r.events.forEach(t=>{var i=new Date(t.timestamp).getTime();t.$offset=Math.abs(i-e)}),this.Wi(r)}}}Yi(){var t={};return this.$i.forEach(e=>{var i=e.batchKey||e.url;t[i]||(t[i]={url:e.url,events:[],batchKey:e.batchKey}),t[i].events.push(e.event)}),this.$i=[],t}}class mm{constructor(t){this.Xi=!1,this.Ki=3e3,this.$i=[],this.Hi=!0,this.Wi=t.sendRequest,this.qi=t.sendBeacon,$u&&void 0!==Wu&&"onLine"in Wu&&(this.Hi=Wu.onLine,Nl($u,"online",()=>{this.Hi=!0,this.Wt()}),Nl($u,"offline",()=>{this.Hi=!1}))}get length(){return this.$i.length}enqueue(t,e){if(void 0===e&&(e=0),e>=10)ll().error("retry","request failed after 10 retries, giving up");else if(!Rl()){var i=function(t){var e=3e3*Math.pow(2,t),i=e/2,r=Math.min(18e5,e),n=(Math.random()-.5)*(r-i);return Math.ceil(r+n)}(e),r=Date.now()+i;this.$i.push({retryAt:r,request:t,retriesPerformedSoFar:e+1});var n="enqueued failed request for retry in "+Math.round(i/1e3)+"s";this.Hi||(n+=" (browser is offline)"),ll().warn("retry",n),this.Xi||(this.Xi=!0,this.Qi())}}retriableRequest(t){var i=this;return e(function*(){try{var e=yield i.Wi(t);200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&i.enqueue(t,0)}catch(e){i.enqueue(t,0)}})()}Qi(){this.tr&&clearTimeout(this.tr),this.tr=setTimeout(()=>{this.Hi&&this.$i.length>0&&this.Wt(),this.$i.length>0?this.Qi():this.Xi=!1},this.Ki)}Wt(){var t=this,i=Date.now(),r=[],n=[];this.$i.forEach(t=>{t.retryAt<i?n.push(t):r.push(t)}),this.$i=r,n.forEach(function(){var i=e(function*(e){var{request:i,retriesPerformedSoFar:r}=e;try{var n=yield t.Wi(i);200!==n.statusCode&&(n.statusCode<400||n.statusCode>=500)&&t.enqueue(i,r)}catch(e){t.enqueue(i,r)}});return function(t){return i.apply(this,arguments)}}())}unload(){this.tr&&(clearTimeout(this.tr),this.tr=void 0),this.$i.forEach(t=>{var{request:e}=t;try{this.qi(e)}catch(t){ll().error("retry","failed to send beacon on unload",t)}}),this.$i=[]}}var gm="vt_rate_limit";class bm{constructor(t){var e,i;void 0===t&&(t={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(e=t.eventsPerSecond)&&void 0!==e?e:10,this.eventsBurstLimit=Math.max(null!==(i=t.eventsBurstLimit)&&void 0!==i?i:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=t.persistence,this.captureWarning=t.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(t){var e,i,r,n;void 0===t&&(t=!1);var s=Date.now(),o=null!==(i=null===(e=this.persistence)||void 0===e?void 0:e.get(gm))&&void 0!==i?i:{tokens:this.eventsBurstLimit,last:s},a=(s-o.last)/1e3;o.tokens+=a*this.eventsPerSecond,o.last=s,o.tokens>this.eventsBurstLimit&&(o.tokens=this.eventsBurstLimit);var h=o.tokens<1;return h||t||(o.tokens=Math.max(0,o.tokens-1)),!h||this.lastEventRateLimited||t||null===(r=this.captureWarning)||void 0===r||r.call(this,"vTilt client rate limited. Config: "+this.eventsPerSecond+" events/second, "+this.eventsBurstLimit+" burst limit."),this.lastEventRateLimited=h,null===(n=this.persistence)||void 0===n||n.set(gm,o),{isRateLimited:h,remainingTokens:o.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}class ym{constructor(t){this.er=null,this.ir=null,this.rr=t}get config(){return this.er}onApply(t){this.nr=t}onLoad(t){this.sr=t}load(){var t,e=this.rr.getConfig();if(e.token){if(this.ir||(this.ir=i({},e)),null===(t=e.bootstrap)||void 0===t?void 0:t.remoteConfig)return this.er=e.bootstrap.remoteConfig,this.ar(this.er),void this.hr();var r=dl(()=>$u.__VTILT_BOOTSTRAP__);if(null==r?void 0:r.remoteConfig)return this.er=r.remoteConfig,this.ar(this.er),void this.hr();dl(()=>{var t=localStorage.getItem(Md+"_"+e.token);t&&(this.er=JSON.parse(t),this.ar(this.er,!0))}),this.hr()}}hr(){var t=this.rr.getConfig();if(t.token)if(Rl())this.rr.updateConfig({__remote_config_loaded:!0});else{var e=this.rr.buildEndpointUrl("/api/d"),r=new AbortController,n=setTimeout(()=>r.abort(),3e3);(Vu||fetch)(e,{method:"GET",signal:r.signal,headers:i({Accept:"application/json"},pl(t))}).then(t=>t.json()).then(e=>{var i;clearTimeout(n),Ml(),this.er=e,dl(()=>{localStorage.setItem(Md+"_"+t.token,JSON.stringify(e))}),this.ar(e),null===(i=this.sr)||void 0===i||i.call(this,e)}).catch(()=>{clearTimeout(n),Al("config"),this.rr.updateConfig({__remote_config_loaded:!0})})}}ar(t,e){var r,n,s,o;void 0===e&&(e=!1);var a=this.ir||this.rr.getConfig(),h={};for(var[,u]of this.rr.featureManager.getDescriptors())if(u.remoteConfig&&u.configKey){var l=t[u.remoteConfig.key];l&&void 0===a[u.configKey]&&(h[u.configKey]=u.remoteConfig.map(l))}if(t.analytics&&!e&&(void 0!==t.analytics.capturePageview&&void 0===a.capture_pageview&&(h.capture_pageview=t.analytics.capturePageview),void 0!==t.analytics.capturePageleave&&void 0===a.capture_pageleave&&(h.capture_pageleave=!!t.analytics.capturePageleave),void 0!==t.analytics.capturePerformance&&void 0===a.capture_performance&&(h.capture_performance=t.analytics.capturePerformance),void 0===a.autocapture)){var c=t.analytics.autocapture,d=t.analytics.scrollDepthMilestones,v=t.analytics.scrollDepthPageleave;void 0!==c&&(h.autocapture=c&&(d||v)?{scroll_depth:i({},d?{milestones:!0}:{},v?{pageleave:!0}:{})}:c)}e||(h.__remote_config_loaded=!0),void 0!==(null===(r=t.privacy)||void 0===r?void 0:r.respectDnt)&&void 0===a.respect_dnt&&(h.respect_dnt=t.privacy.respectDnt),void 0!==(null===(n=t.privacy)||void 0===n?void 0:n.requireConsent)&&void 0===a.require_consent&&(h.require_consent=t.privacy.requireConsent),void 0!==t.autocapture_opt_out&&(h.autocapture_opt_out=t.autocapture_opt_out),void 0!==t.elementsChainAsString&&(h.elementsChainAsString=t.elementsChainAsString),(null===(s=t.diagnostics)||void 0===s?void 0:s.defaultLogLevel)&&ll().setLevelFromRemote(t.diagnostics.defaultLogLevel),Object.keys(h).length>0&&this.rr.updateConfig(h),null===(o=this.nr)||void 0===o||o.call(this,t)}}var wm=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"];function Cm(t,e){if(void 0===e&&(e=[]),!t)return!1;var i=t.toLowerCase();return[...wm,...e].some(t=>-1!==i.indexOf(t.toLowerCase()))}function Sm(t,e){var i;if(void 0===e&&(e=[]),!t)return!1;var r=t.userAgent;if(r&&Cm(r,e))return!0;try{var n=t.userAgentData;if(null===(i=null==n?void 0:n.brands)||void 0===i?void 0:i.some(t=>Cm(null==t?void 0:t.brand,e)))return!0}catch(t){}return!!t.webdriver}var km=36e5;function _m(){var t,e,i;return null!==(i=null===(e=null===(t=null==$u?void 0:$u.performance)||void 0===t?void 0:t.now)||void 0===e?void 0:e.call(t))&&void 0!==i?i:Date.now()}class Im{constructor(){this.ur=_m(),this.lr=null,this.cr=_m(),this.dr="",this.vr="",this.pr="",this.mr=""}onAfterPageview(){var t=_m();this.ur=t,this.lr=t,this.mr="",Zu&&(this.dr=Zu.href||"",this.vr=Zu.pathname||""),Gu&&(this.pr=Gu.title||"")}peekEngagementSinceLastCaptureMs(){var t,e=_m(),i=null!==(t=this.lr)&&void 0!==t?t:this.cr,r=Math.round(e-i);return r<1&&(r=1),r>km&&(r=km),r}commitCaptureClock(){this.lr=_m()}gr(){return this.dr+"\0"+this.vr}clearLeaveDedupe(){this.mr=""}tryCapturePageleave(t,e,i,r){if(function(t){var e=t.capture_pageleave;return!1!==e&&(!0===e||!1!==t.capture_pageview)}(t)){var n=this.gr();if((this.dr||this.vr)&&n&&this.mr!==n){this.mr=n;var s=_m(),o=Math.round(s-this.ur);o<1&&(o=1),o>km&&(o=km);var a={navigation_type:i,engagement_time_msec:o,[Yd]:this.dr,[Jd]:this.vr,[Xd]:Math.round(o/1e3),[Kd]:this.vr,[Hd]:this.dr},h=this.dr?function(t){try{return new URL(t).host}catch(t){return""}}(this.dr):"";h&&(a.$host=h),this.pr&&(a.title=this.pr),r&&Object.assign(a,r),e(Dd,a,{skip_engagement:!0})}}}}var xm=[jd,Pd,Ud,Dd,Gd,Zd,$d,Vd],Am=new Set([jd,Pd,Ud]),Mm=new Set([Dd,Vd,Gd,Zd,$d]);class Rm{constructor(t){this.br=!1,this.yr=!1,this.wr=null,this.Cr=null,this.Sr=new Im,this.rr=t}setVtPersonId(t){this.Cr=t}capture(t,e,r){var n,s,o;this.rr.sessionManager.setSessionId();var a=this.rr.getConfig();if(a.opt_out_useragent_filter||!Sm(Wu,null!==(n=a.custom_blocked_useragents)&&void 0!==n?n:[]))if((null==Wu?void 0:Wu.userAgent)&&function(t){return!(t&&"string"==typeof t&&t.length>500)}(Wu.userAgent))if((null==r?void 0:r.skip_client_rate_limiting)||xm.includes(t)||this.rr.rateLimiter.shouldAllowEvent())if(!this.rr.getConfig().require_consent||Am.has(t)||(null===(s=this.rr.consentManager)||void 0===s?void 0:s.hasConsent())){var h=this.rr.buildUrl(),u=!0===(null==r?void 0:r.skip_engagement)||Mm.has(t),l=i({},e);u||"number"==typeof l.engagement_time_msec||(l=i({},l,{engagement_time_msec:this.Sr.peekEngagementSinceLastCaptureMs()}));var c=i({},this.kr(t,l),a.globalAttributes),d=JSON.stringify(c);if(!(v=d)||"string"!=typeof v||v.length<2||v.length>Tl)ll().debug("capture","dropped",t,{reason:"payload_invalid_size",bytes:d.length,limitBytes:Tl,hint:t===zd?"Trim global / event properties; $elements is already off by default in compact mode.":"Trim event properties; payload exceeded the runaway-guard cap."});else{var v,f=t===jd?this.rr.userManager.getAnonymousId():null!==(o=this.rr.userManager.getDistinctId())&&void 0!==o?o:this.rr.userManager.getAnonymousId(),p={timestamp:(new Date).toISOString(),event:t,payload:c,distinct_id:f,anonymous_id:this.rr.userManager.getAnonymousId()};this.rr.bufferEvent(t,h,p),ll().debug("capture","enqueued",t,i({distinct_id:f,$current_url:c.$current_url,$session_id:c.$session_id,$debug:c.$debug},t===zd&&"object"==typeof c&&null!==c?{$event_type:c.$event_type}:{})),this.Cr&&(this.Cr=null),t===Fd?this.Sr.onAfterPageview():this.Sr.commitCaptureClock()}}else ll().debug("capture","dropped",t,{reason:"require_consent_and_no_consent"});else ll().debug("capture","dropped",t,{reason:"client_rate_limited",hint:"Token bucket (~10/s, burst ~100). $autocapture counts toward the same limit as custom events."});else ll().debug("capture","dropped",t,{reason:"invalid_or_missing_user_agent"});else ll().debug("capture","dropped",t,{reason:"bot"})}captureInternal(t,e){this.capture(t,e,{skip_client_rate_limiting:!0})}captureInitialPageview(){Gu&&("visible"===Gu.visibilityState?this.yr||(this.yr=!0,setTimeout(()=>{Gu&&Zu&&!1!==this.rr.getConfig().capture_pageview&&this.capture(Fd,{navigation_type:"initial_load"})},300),this.wr&&(Gu.removeEventListener("visibilitychange",this.wr),this.wr=null)):this.wr||(this.wr=()=>this.captureInitialPageview(),Nl(Gu,"visibilitychange",this.wr)))}tryCapturePageleave(t,e){this.Sr.tryCapturePageleave(this.rr.getConfig(),(t,e,i)=>this.capture(t,e,i),t,e)}resetPageleaveDedupe(){this.Sr.clearLeaveDedupe()}_r(){if(this.rr.getConfig().debug)return!0;try{if(null==Zu?void 0:Zu.search)if("1"===new URLSearchParams(Zu.search).get("vtilt_debug"))return!0}catch(t){}return!1}kr(t,e){var r,n,s=this.rr.getConfig(),o=s.mask_personal_data_properties,a=s.custom_personal_data_properties,h=Of(o,a),u=Dl(function(t,e,i){if(!Gu)return{};var r=e?Fl([],yf,i||[]):[];return Bl({},Sf(dv(Gu.URL,r,Cf)))}(0,o,a)),l=this.rr.userManager.getUserProperties(),c=this.rr.userManager.get_initial_props(),d=this.rr.sessionManager.getSessionId(),v=this.rr.sessionManager.getWindowId(),f={};!this.br&&Object.keys(c).length>0&&Object.assign(f,c),e.$set_once&&Object.assign(f,e.$set_once);var p=i({},h,u,l,null!==(n=null===(r=this.rr.consentManager)||void 0===r?void 0:r.getConsentProperties())&&void 0!==n?n:{},{$session_id:d,$window_id:v},this.Cr?{$vt:this.Cr}:{},Object.keys(f).length>0?{$set_once:f}:{},e.$set?{$set:e.$set}:{},e);!this.br&&Object.keys(c).length>0&&(this.br=!0),t===Fd&&Gu&&(p.title=Gu.title),this._r()&&(p.$debug=!0);var m=this.rr.sessionManager.consumeSessionStart(),g=this.rr.userManager.consumeFirstVisit();return m&&(p.$session_start=!0),g&&(p.$first_visit=!0),p}}var Om=["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"];function Em(t){return!(!t||"string"!=typeof t)&&Om.includes(t.toLowerCase().trim())}class Tm{constructor(t){this.Ir=null,this.Ar=null,this.rr=t}identify(t,e,r){var n;if("number"==typeof t&&(t=String(t),ll().warn("identify","first argument should be a string, not a number")),t)if(Em(t))ll().error("identify",'"'+t+'" appears to be a hardcoded string');else if("COOKIELESS_SENTINEL_VALUE"!==t){var s=JSON.stringify([t,e,r]);if(this.Ir!==s){var o=this.rr.userManager,a=o.getDistinctId(),h=o.getAnonymousId(),u=o.getDeviceId();if(!("identified"===o.getUserState())&&h!==t||t!==a){this.rr.capture(jd,{distinct_id:t,$set:e||{},$set_once:r||{}});var l={user_state:"identified",distinct_id:t,properties_set:e,properties_set_once:r};if(!u){var c=a||h;l.device_id=c,l.properties_set=i({$had_persisted_distinct_id:!0,$device_id:c},l.properties_set||{})}o.applyUpdate(l),null===(n=this.rr._emitter)||void 0===n||n.emit("user:identified",{distinctId:t})}else(e||r)&&this.setUserProperties(e,r);this.Ir=s}}else ll().error("identify","cannot use sentinel value as distinct_id");else ll().error("identify","unique user id is required")}setUserProperties(t,e){var i,r;if(t||e){var n=this.rr.userManager,s=JSON.stringify([null!==(i=n.getDistinctId())&&void 0!==i?i:n.getAnonymousId(),t,e]);this.Ar!==s&&(n.applyUpdate({properties_set:t,properties_set_once:e}),this.rr.capture(Ud,{$set:t||{},$set_once:e||{}}),null===(r=this.rr._emitter)||void 0===r||r.emit("user:properties_set",{properties:t}),this.Ar=s)}}resetUser(t){var e;this.rr.sessionManager.resetSessionId(),this.rr.userManager.reset(t),this.Ir=null,this.Ar=null,null===(e=this.rr._emitter)||void 0===e||e.emit("user:reset")}alias(t,e){var i;if(t&&!Em(t)){var r=this.rr.userManager,n=null!==(i=null!=e?e:r.getDistinctId())&&void 0!==i?i:r.getAnonymousId();n&&!Em(n)?t!==n?this.rr.capture(Pd,{$original_id:n,$alias_id:t}):this.identify(t):ll().warn("alias","invalid original distinct ID")}else ll().warn("alias","invalid alias")}getUserIdentity(){return this.rr.userManager.getUserIdentity()}getDeviceId(){return this.rr.userManager.getDeviceId()}getUserState(){return this.rr.userManager.getUserState()}getDistinctId(){var t;return null!==(t=this.rr.userManager.getDistinctId())&&void 0!==t?t:this.rr.userManager.getAnonymousId()}getAnonymousId(){return this.rr.userManager.getAnonymousId()}}var Lm="_vtilt_consent";class Nm{constructor(t){this.Mr={},this.Rr=!1,this.rr=t,this.Or()}setConsent(t){var e;this.Mr=i({},this.Mr,t),this.Rr=!0,this.Er(),null===(e=this.rr._emitter)||void 0===e||e.emit("consent:updated",{consent:this.Mr})}getConsent(){return i({},this.Mr)}hasConsent(){return this.Rr}setDefaultGranted(){this.Rr||(this.Mr={analytics:!0,marketing:!0,advertising:!0},this.Rr=!0)}getConsentProperties(){var t={};return void 0!==this.Mr.analytics&&(t.$consent_analytics=this.Mr.analytics),void 0!==this.Mr.marketing&&(t.$consent_marketing=this.Mr.marketing),void 0!==this.Mr.advertising&&(t.$consent_advertising=this.Mr.advertising),t}reset(){this.Mr={},this.Rr=!1,this.Tr()}Or(){if(void 0!==Gu&&(null==Gu?void 0:Gu.cookie)){var t=Lm+"=";for(var e of Gu.cookie.split(";")){var i=e.trim();if(i.startsWith(t)){try{var r=decodeURIComponent(i.slice(15)),n=JSON.parse(r);n&&"object"==typeof n&&(this.Mr=n,this.Rr=!0)}catch(t){}return}}}}Er(){if(void 0!==Gu){var t=encodeURIComponent(JSON.stringify(this.Mr)),e="undefined"!=typeof location&&"https:"===location.protocol?"; Secure":"";Gu.cookie=Lm+"="+t+"; Max-Age=31536000; path=/; SameSite=Lax"+e}}Tr(){void 0!==Gu&&(Gu.cookie=Lm+"=; Max-Age=0; path=/")}}class Bm{constructor(t){this.Lr=new Map,this.Nr=new Map,this.rr=t}register(t){this.Lr.set(t.name,t)}createInstances(){var t=this,e=this.rr.getConfig(),i=function(i,r){return t.Nr.has(i)||t.Br(e,r)?0:void dl(()=>{var n=r.FeatureClass.extractConfig(e),s=new r.FeatureClass(t.rr,n);t.Nr.set(i,s)})};for(var[r,n]of this.Lr)i(r,n)}initAll(){this.createInstances();var t=function(t){dl(()=>{t.isStarted||t.startIfEnabled()})};for(var[,e]of this.Nr)t(e)}notifyAll(t){var e=function(e){e.onConfigUpdate&&dl(()=>e.onConfigUpdate(t))};for(var[,i]of this.Nr)e(i)}get(t){return this.Nr.get(t)}set(t,e){this.Nr.set(t,e)}getDescriptors(){return this.Lr}Br(t,e){if(e.disableKey&&!0===t[e.disableKey])return!0;if(e.configKey){var i=t[e.configKey];if(i&&"object"==typeof i&&!1===i.enabled)return!0}return!1}}class Fm{constructor(t){this.$i=new im,this.Fr=!1,this.Dr=!1,this.rr=t,this.jr(),this.Fr||(this.Pr=setTimeout(()=>this.forceFlush(),5e3))}push(t){this.Fr?this.Ur(t):this.$i.enqueue(t)}markConfigReady(){this.Dr||(this.Dr=!0,this.$r())}forceFlush(){this.zr(),this.Wt(),this.Fr=!0}jr(){this.Fr=this.Dr}$r(){this.jr(),this.Fr&&(this.zr(),this.Wt())}Wt(){var t=this.$i.takeAll();for(var e of t)this.Ur(e);t.length>0&&this.rr.requestQueue.flush()}Ur(t){if(this.Dr){if(this.Wr(t.name))return}else this.Gr(t.event);this.rr.sendRequest(t.url,t.event)}Wr(t){var e=this.rr.getConfig();switch(t){case Fd:return!1===e.capture_pageview;case Dd:return!1===e.capture_pageleave;case $d:return!1===e.capture_performance;case zd:case Wd:return!1===e.autocapture;default:return!1}}Gr(t){"object"==typeof t.payload&&null!==t.payload&&(t.payload.$config_pending=!0)}zr(){void 0!==this.Pr&&(clearTimeout(this.Pr),this.Pr=void 0)}}var Dm="vt";class jm{constructor(t){void 0===t&&(t={}),this.version=Cd,this.__loaded=!1,this.Zr=!1,this.Vr=!1,this.Yr=[],this.Jr=!1,ll().debug("ctor","start"),this._emitter=new ml,this.configManager=new ev(t);var e=this.configManager.getConfig();cl(e),this.sessionManager=new av(e.storage||"cookie",e.cross_subdomain_cookie),this.userManager=new Ef(e.persistence||"localStorage+cookie",e.cross_subdomain_cookie),this.rateLimiter=new bm({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:t=>{this.Xr.captureInternal(Vd,{$$client_ingestion_warning_message:t})}}),this.retryQueue=new mm({sendRequest:t=>this.Kr(t),sendBeacon:t=>this.Hr(t)}),this.requestQueue=new pm(t=>this.qr(t),{flush_interval_ms:3e3}),this.consentManager=new Nm(this),this.Xr=new Rm(this),this.Qr=new Tm(this),this.tn=new Bm(this),this.en=new ym(this),this.rn(),this.en.onLoad(t=>{this._emitter.emit(yl,{config:t})}),this.nn(),ll().debug("ctor","boot gate installed")}rn(){this.tn.register({name:"HistoryAutocapture",configKey:"capture_pageview",FeatureClass:Pf}),this.tn.register({name:"Autocapture",configKey:"autocapture",FeatureClass:Rp}),this.tn.register({name:"WebVitals",configKey:"capture_performance",FeatureClass:Df}),this.tn.register({name:"SessionRecording",configKey:"session_recording",disableKey:"disable_session_recording",remoteConfig:{key:"sessionRecording",map:t=>({enabled:t.enabled,sampleRate:t.sampleRate,minimumDurationMs:t.minimumDurationMs,fullSnapshotIntervalMs:t.fullSnapshotIntervalMs,maskAllInputs:t.maskAllInputs,captureConsole:t.captureConsole,captureCanvas:t.captureCanvas})},FeatureClass:Ep}),this.tn.register({name:"Chat",configKey:"chat",disableKey:"disable_chat",remoteConfig:{key:"chat",map:t=>({enabled:t.enabled,position:t.widgetPosition,color:t.widgetColor})},FeatureClass:Dp}),this.tn.register({name:"GoogleTagGateway",configKey:"google_tag",disableKey:"disable_google_tag",remoteConfig:{key:"googleTag",map:t=>t},FeatureClass:nm})}nn(){var t=this,e=function(e){var i=t[e];t[e]=function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];if(t.Vr)return i.apply(t,n);t.Yr.push([e,...n])}};for(var i of jm.BOOT_GATED_METHODS)e(i)}sn(){if(!this.Vr){for(var t of(this.Vr=!0,ll().debug("boot","start"),jm.BOOT_GATED_METHODS))delete this[t];ll().debug("boot","gate removed"),this.__loaded&&!this.Jr?(ll().debug("boot","running _runPostBootInit"),this.an()):ll().debug("boot","skipping _runPostBootInit","loaded?",this.__loaded,"postBootDone?",this.Jr),ll().debug("boot","flush pendingCalls",this.Yr.length),this._execute_array(this.Yr),this.Yr=[]}}init(t,e,i){var r;if(i&&i!==Dm){var n=null!==(r=$m[i])&&void 0!==r?r:new jm;return n._init(t,e,i),$m[i]=n,$m[Dm][i]=n,n}return this._init(t,e,i)}_init(t,e,r){if(void 0===e&&(e={}),this.__loaded)return ll().warn("init","already initialized; re-initializing is a no-op"),this;this.configManager.updateConfig(i({},e,{token:t||e.token,name:r}));var n=this.configManager.getConfig();return cl(n),this.__loaded=!0,ll().debug("init","start","token present?",!!n.token,"name",null!=r?r:"vt"),this.tn.createInstances(),this.Vr||void 0===Gu||"interactive"!==Gu.readyState&&"complete"!==Gu.readyState||(ll().debug("init","self-boot?",Gu.readyState),this.sn()),this.Vr&&!this.Jr&&this.an(),ll().debug("init","postBootInitDone",this.Jr),this}an(){if(!this.Jr){this.Jr=!0,ll().debug("postBoot","start");var t=this.configManager.getConfig();this.sessionManager=new av(t.storage||"cookie",t.cross_subdomain_cookie),this.sessionManager.hydrateFromStorage(),ll().debug("postBoot","sessionManager hydrated");var e=t.persistence||"localStorage+cookie";this.userManager.updateStorageMethod(e,t.cross_subdomain_cookie),this.userManager.hydrateFromStorage(),ll().debug("postBoot","userManager hydrated"),t.require_consent||this.consentManager.hasConsent()||this.consentManager.setDefaultGranted(),!0===this.consentManager.getConsent().advertising&&gv(),this._emitter.on("consent:updated",t=>{var e=t.consent;!0===e.advertising?gv():!1===e.advertising&&void 0!==Gu&&(Gu.cookie=vv+"=; Max-Age=0; path=/",Gu.cookie=fv+"=; Max-Age=0; path=/")}),this.hn(),this.userManager.set_initial_person_info(t.mask_personal_data_properties,t.custom_personal_data_properties),this.un=new Fm({sendRequest:(t,e)=>this.sendRequest(t,e),requestQueue:this.requestQueue,getConfig:()=>this.configManager.getConfig()}),this.tn.initAll(),ll().debug("postBoot","features inited"),this.en.load(),this.ln(),this.cn();var i=this.configManager.getConfig();!1!==i.capture_pageview&&this.Xr.captureInitialPageview(),this.tn.notifyAll(i),this._emitter.emit(gl,{config:i}),ll().debug("postBoot","done"),ll().info("init","SDK ready")}}startAutocapture(){var t=this.tn.get("Autocapture");if(!t){var e=Rp.extractConfig(this.configManager.getConfig());t=new Rp(this,e),this.tn.set("Autocapture",t)}t.updateConfig({enabled:!0})}stopAutocapture(){var t=this.tn.get("Autocapture");t&&t.updateConfig({enabled:!1})}isAutocaptureActive(){var t,e;return null!==(e=null===(t=this.tn.get("Autocapture"))||void 0===t?void 0:t.isStarted)&&void 0!==e&&e}getAutocaptureDiagnostics(){var t,e;return null!==(e=null===(t=this.tn.get("Autocapture"))||void 0===t?void 0:t.getDiagnostics())&&void 0!==e?e:null}startSessionRecording(){var t=this.tn.get("SessionRecording");t||(t=new Ep(this),this.tn.set("SessionRecording",t)),t.updateConfig({enabled:!0}),t.startIfEnabledOrStop("recording_initialized"),this._emitter.emit(Sl)}stopSessionRecording(){var t;null===(t=this.tn.get("SessionRecording"))||void 0===t||t.stop(),this._emitter.emit(kl)}isRecordingActive(){var t;return"active"===(null===(t=this.tn.get("SessionRecording"))||void 0===t?void 0:t.status)}getSessionRecordingId(){var t;return(null===(t=this.tn.get("SessionRecording"))||void 0===t?void 0:t.sessionId)||null}openChat(){var t=this.tn.get("Chat");t?t.open():ll().warn("chat","openChat: feature not available")}closeChat(){var t=this.tn.get("Chat");t?t.close():ll().warn("chat","closeChat: feature not available")}toggleChat(){var t=this.tn.get("Chat");t?t.toggle():ll().warn("chat","toggleChat: feature not available")}showChat(){var t=this.tn.get("Chat");t?t.show():ll().warn("chat","showChat: feature not available")}hideChat(){var t=this.tn.get("Chat");t?t.hide():ll().warn("chat","hideChat: feature not available")}sendChatMessage(t,e){var i=this.tn.get("Chat");i?i.sendMessage(t,e):ll().warn("chat","sendChatMessage: feature not available")}gtag(){for(var t=this.tn.get("GoogleTagGateway"),e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];t?t.gtag(...i):this.Yr.push(["gtag",...i])}setGoogleUserData(t){var e=this.tn.get("GoogleTagGateway");return e?e.setUserData(t):Promise.resolve()}get featureManager(){return this.tn}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}off(t){this._emitter.off(t)}_is_bot(){var t,e=this.getConfig();return!e.opt_out_useragent_filter&&Sm(Wu,null!==(t=e.custom_blocked_useragents)&&void 0!==t?t:[])}capture(t,e,i){this.Xr.capture(t,e,i),this._emitter.emit(Cl,{event:t,payload:e})}tryCapturePageleave(t){var e,i=null===(e=this.tn.get("Autocapture"))||void 0===e?void 0:e.getMaxScrollDepthPctForPageleave(),r=null!=i?{[tv]:i}:void 0;this.Xr.tryCapturePageleave(t,r)}identify(t,e,i){this.Qr.identify(t,e,i)}setUserProperties(t,e){this.Qr.setUserProperties(t,e)}resetUser(t){this.Qr.resetUser(t)}alias(t,e){this.Qr.alias(t,e)}setConsent(t){this.consentManager.setConsent(t)}getConsent(){return this.consentManager.getConsent()}getUserIdentity(){return this.Qr.getUserIdentity()}getDeviceId(){return this.Qr.getDeviceId()}getUserState(){return this.Qr.getUserState()}getConfig(){return this.configManager.getConfig()}getRemoteConfig(){return this.en.config}getSessionId(){return this.sessionManager.getSessionId()}getDistinctId(){return this.Qr.getDistinctId()}getAnonymousId(){return this.Qr.getAnonymousId()}toString(){var t,e=null!==(t=this.configManager.getConfig().name)&&void 0!==t?t:Dm;return e!==Dm&&(e="vt."+e),e}updateConfig(t){var e,i=this.configManager.getConfig();this.configManager.updateConfig(t);var r=this.configManager.getConfig();!i.__remote_config_loaded&&r.__remote_config_loaded&&(null===(e=this.un)||void 0===e||e.markConfigReady()),this.tn.notifyAll(r),this._emitter.emit(bl,{config:r})}buildUrl(){return this.buildEndpointUrl("/api/e")}buildEndpointUrl(t){return fl(this.configManager.getConfig(),t)}sendRequest(t,e){this.dn()&&this.requestQueue.enqueue({url:t,event:e})}bufferEvent(t,e,i){t!==Gd&&t!==Zd?this.un.push({name:t,url:e,event:i}):this.sendRequest(e,i)}dn(){return!!this.configManager.getConfig().token||(this.Zr||(ll().warn("config","token is required for tracking"),this.Zr=!0),!1)}qr(t){"sendBeacon"!==t.transport?this.retryQueue.retriableRequest(t):this.Hr(t)}Kr(t){return new Promise(e=>{var{url:i,events:r}=t,n=this.configManager.getConfig(),s=1===r.length?r[0]:{events:r},o=n.disable_compression?am.None:am.GZipJS;fm({url:i,data:s,method:"POST",transport:"XHR",compression:o,projectToken:n.token,callback:t=>e({statusCode:t.statusCode})})})}Hr(t){var{url:e,events:i}=t,r=this.configManager.getConfig(),n=1===i.length?i[0]:{events:i},s=r.disable_compression?am.None:am.GZipJS;fm({url:e,data:n,method:"POST",transport:"sendBeacon",compression:s,projectToken:r.token})}vn(t){this.sendRequest(t.url,t.event)}ln(){if($u){var t=()=>{this.un.forceFlush(),this.requestQueue.unload(),this.retryQueue.unload()};Nl($u,"beforeunload",t),Nl($u,"pagehide",()=>{this.Xr.tryCapturePageleave("pagehide"),t()}),Gu&&Nl(Gu,"visibilitychange",()=>{Gu&&("hidden"===Gu.visibilityState?this.Xr.tryCapturePageleave("visibility_hidden"):"visible"===Gu.visibilityState&&this.Xr.resetPageleaveDedupe())})}}cn(){this.requestQueue.enable()}hn(){dl(()=>{var t,e;if(void 0!==Zu&&Zu.search){var i=new URL(Zu.href),r=i.searchParams.get("vt"),n=i.searchParams.get("vtd");if((null==r?void 0:r.trim())&&(this.Xr.setVtPersonId(r.trim()),i.searchParams.delete("vt")),(null==n?void 0:n.trim())&&(this.fn(n.trim()),i.searchParams.delete("vtd")),(null==r?void 0:r.trim())||(null==n?void 0:n.trim())){var s=i.pathname+(i.search||"")+i.hash;null===(e=null===(t=null==$u?void 0:$u.history)||void 0===t?void 0:t.replaceState)||void 0===e||e.call(t,{},"",s)}}})}fn(t){this.vtdOverlay||(this.vtdOverlay=new om(this),this.vtdOverlay.setDestinationUrl(t))}_execute_array(t){tl(t)&&t.forEach(t=>{if(t&&tl(t)&&t.length>0){var e=t[0],i=t.slice(1);"function"==typeof this[e]&&dl(()=>this[e](...i))}})}_dom_loaded(){this.cn()}}jm.BOOT_GATED_METHODS=["capture","identify","setUserProperties","resetUser","alias","setConsent","startAutocapture","stopAutocapture","startSessionRecording","stopSessionRecording","openChat","closeChat","toggleChat","showChat","hideChat","sendChatMessage"];var Pm,Um,$m={};Pm=$m[Dm]=new jm,(Um=Ju.vt)&&Ll(Um._i,function(t){if(t&&tl(t)){var e=Pm.init(t[0],t[1],t[2]),i=Um[t[2]||"vt"]||Um;e&&e._execute_array(i)}}),Ju.vt=Pm,function(){function t(){if(!t.done){t.done=!0,ll().debug("dom","handler fired");var e=Object.keys($m);ll().debug("boot","instance count",e.length),Ll($m,(t,e)=>{ll().debug("boot","instance",e),t.sn(),t._dom_loaded()})}}if(Gu&&"function"==typeof Gu.addEventListener)return ll().debug("dom","readyState",Gu.readyState),void("complete"===Gu.readyState||"interactive"===Gu.readyState?(ll().debug("dom","running handler sync"),t()):(ll().debug("dom","registered DOMContentLoaded listener"),Nl(Gu,"DOMContentLoaded",t,{capture:!1})));$u&&ll().error("dom","browser doesn't support document.addEventListener")}()}();
1
+ !function(){"use strict";function t(t,e,i,r,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void i(t)}a.done?e(h):Promise.resolve(h).then(r,n)}function e(e){return function(){var i=this,r=arguments;return new Promise(function(n,s){var o=e.apply(i,r);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)})}}function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)({}).hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},i.apply(null,arguments)}function r(t,e){if(null==t)return{};var i={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;i[r]=t[r]}return i}var n,s=["inputs"],o=["inputId"],a=["inputs"],h=["inputId"],u=["type"],l=Object.defineProperty,c=(t,e,i)=>((t,e,i)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),d=Object.defineProperty,v=(t,e,i)=>((t,e,i)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),f=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(f||{}),p={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},g={};function b(t){if(g[t])return g[t];var e=globalThis[t],i=e.prototype,r=t in p?p[t]:void 0,n=Boolean(r&&r.every(t=>{var e,r;return Boolean(null==(r=null==(e=Object.getOwnPropertyDescriptor(i,t))?void 0:e.get)?void 0:r.toString().includes("[native code]"))})),s=t in m?m[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof i[t]&&(null==(e=i[t])?void 0:e.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return g[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?g[t]=u:i}catch(t){return i}}var y={};function w(t,e,i){var r,n=t+"."+String(i);if(y[n])return y[n].call(e);var s=b(t),o=null==(r=Object.getOwnPropertyDescriptor(s,i))?void 0:r.get;return o?(y[n]=o,o.call(e)):e[i]}var C={};function S(t,e,i){var r=t+"."+String(i);if(C[r])return C[r].bind(e);var n=b(t)[i];return"function"!=typeof n?e[i]:(C[r]=n,n.bind(e))}var k={ownerDocument:function(t){return w("Node",t,"ownerDocument")},childNodes:function(t){return w("Node",t,"childNodes")},parentNode:function(t){return w("Node",t,"parentNode")},parentElement:function(t){return w("Node",t,"parentElement")},textContent:function(t){return w("Node",t,"textContent")},contains:function(t,e){return S("Node",t,"contains")(e)},getRootNode:function(t){return S("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?w("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?w("Element",t,"shadowRoot"):null},querySelector:function(t,e){return w("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return w("Element",t,"querySelectorAll")(e)},mutationObserver:function(){return b("MutationObserver").constructor},patch:function(t,e,i){try{if(!(e in t))return()=>{};var r=t[e],n=i(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=n,()=>{t[e]=r}}catch(t){return()=>{}}}};function _(t){return t.nodeType===t.ELEMENT_NODE}function I(t){var e=t&&"host"in t&&"mode"in t&&k.host(t)||null;return Boolean(e&&"shadowRoot"in e&&k.shadowRoot(e)===t)}function x(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function A(t){try{var e=t.rules||t.cssRules;if(!e)return null;var i=t.href;!i&&t.ownerNode&&(i=t.ownerNode.baseURI);var r=Array.from(e,t=>M(t,i)).join("");return(n=r).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(t){return null}var n}function M(t,e){if(function(t){return"styleSheet"in t}(t)){var i;try{i=A(t.styleSheet)||function(t){var{cssText:e}=t;if(e.split('"').length<3)return e;var i=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?i.push("layer"):t.layerName&&i.push("layer("+t.layerName+")"),t.supportsText&&i.push("supports("+t.supportsText+")"),t.media.length&&i.push(t.media.mediaText),i.join(" ")+";"}(t)}catch(e){i=t.cssText}return t.styleSheet.href?P(i,t.styleSheet.href):i}var r,n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,n=n.replace(r,"$1\\$2")),e?P(n,e):n}class R{constructor(){v(this,"idNodeMap",new Map),v(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var i=null==(e=this.getMeta(t))?void 0:e.id;return null!=i?i:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){var i=e.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,e)}replace(t,e){var i=this.getNode(t);if(i){var r=this.nodeMetaMap.get(i);r&&this.nodeMetaMap.set(e,r)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function O(t){var{element:e,maskInputOptions:i,tagName:r,type:n,value:s,maskInputFn:o}=t,a=s||"",h=n&&E(n);return(i[r.toLowerCase()]||h&&i[h])&&(a=o?o(a,e):"*".repeat(a.length)),a}function E(t){return t.toLowerCase()}var T="__rrweb_original__";function L(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?E(e):null}function N(t,e){var i,r;try{r=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(i=null==n?void 0:n[1])&&void 0!==i?i:null}var B=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,D=/^www\..*/i,j=/^(data:)([^,]*),(.*)/i;function P(t,e){return(t||"").replace(B,(t,i,r,n,s,o)=>{var a,h=r||s||o,u=i||n||"";if(!h)return t;if(F.test(h)||D.test(h))return"url("+u+h+u+")";if(j.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),c=h.split("/");for(var d of(l.pop(),c))"."!==d&&(".."===d?l.pop():l.push(d));return"url("+u+l.join("/")+u+")"})}function U(t,e){return void 0===e&&(e=!1),e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function z(t,e){return function(t,e,i){void 0===i&&(i=!1);var r=Array.from(e.childNodes),n=[],s=0;if(r.length>1&&t&&"string"==typeof t)for(var o=U(t,i),a=o.length/t.length,h=1;h<r.length;h++)if(r[h].textContent&&"string"==typeof r[h].textContent){for(var u=U(r[h].textContent,i),l=3;l<u.length&&(u[l].match(/[a-zA-Z0-9]/)||-1!==u.indexOf(u.substring(0,l),1));l++);for(;l<u.length;l++){var c=u.substring(0,l),d=o.split(c),v=-1;if(2===d.length)v=d[0].length;else if(d.length>2&&""===d[0]&&""!==r[h-1].textContent)v=o.indexOf(c,1);else if(1===d.length){if(c=c.substring(0,c.length-1),(d=o.split(c)).length<=1)return n.push(t),n;l=101}else l===u.length-1&&(v=o.indexOf(c));if(d.length>=2&&l>100){var f=r[h-1].textContent;if(f&&"string"==typeof f){var p=U(f).length;v=o.indexOf(c,p)}-1===v&&(v=d[0].length)}if(-1!==v){for(var m=Math.floor(v/a);m>0&&m<t.length;){if((s+=1)>50*r.length)return n.push(t),n;var g=U(t.substring(0,m),i);if(g.length===v){n.push(t.substring(0,m)),t=t.substring(m),o=o.substring(v);break}g.length<v?m+=Math.max(1,Math.floor((v-g.length)/a)):m-=Math.max(1,Math.floor((g.length-v)*a))}break}}}return n.push(t),n}(t,e).join("/* rr_split */")}var W,G,Z=1,V=new RegExp("[^a-z0-9-_:]");function Y(){return Z++}var J=/^[^ \t\n\r\u000c]+/,X=/^[, \t\n\r\u000c]+/;var K=new WeakMap;function H(t,e){return e&&""!==e.trim()?Q(t,e):e}function q(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function Q(t,e){var i=K.get(t);if(i||(i=t.createElement("a"),K.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function tt(t,e,i,r){return r?"src"===i||"href"===i&&("use"!==e||"#"!==r[0])||"xlink:href"===i&&"#"!==r[0]||"background"===i&&["table","td","th"].includes(e)?H(t,r):"srcset"===i?function(t,e){if(""===e.trim())return e;var i=0;function r(t){var r,n=t.exec(e.substring(i));return n?(r=n[0],i+=r.length,r):""}for(var n=[];r(X),!(i>=e.length);){var s=r(J);if(","===s.slice(-1))s=H(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=H(t,s);for(var a=!1;;){var h=e.charAt(i);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){i+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,i+=1}}}return n.join(", ")}(t,r):"style"===i?P(r,Q(t)):"object"===e&&"data"===i?H(t,r):r:r}function et(t,e,i){return["video","audio"].includes(t)&&"autoplay"===e}function it(t,e,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!i&&it(k.parentNode(t),e,i);for(var r=t.classList.length;r--;){var n=t.classList[r];if(e.test(n))return!0}return!!i&&it(k.parentNode(t),e,i)}function rt(t,e,i,r){var n;if(_(t)){if(n=t,!k.childNodes(n).length)return!1}else{if(null===k.parentElement(t))return!1;n=k.parentElement(t)}try{if("string"==typeof e){if(r){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(it(n,e,r))return!0;if(i)if(r){if(n.closest(i))return!0}else if(n.matches(i))return!0}catch(t){}return!1}function nt(t,e){var{doc:i,mirror:r,blockClass:n,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:h={},maskTextFn:u,maskInputFn:l,dataURLOptions:c={},inlineImages:d,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:g=!1}=e,b=function(t,e){if(!e.hasNode(t))return;var i=e.getId(t);return 1===i?void 0:i}(i,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:f.Document,childNodes:[],compatMode:t.compatMode}:{type:f.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:f.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:b};case t.ELEMENT_NODE:return function(t,e){for(var i,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:h,dataURLOptions:u={},inlineImages:l,recordCanvas:c,keepIframeSrcFn:d,newlyAddedElement:v=!1,rootId:p}=e,m=function(t,e,i){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var r=t.classList.length;r--;){var n=t.classList[r];if(e.test(n))return!0}if(i)return t.matches(i)}catch(t){}return!1}(t,n,s),g=function(t){if(t instanceof HTMLFormElement)return"form";var e=E(t.tagName);return V.test(e)?"div":e}(t),b={},y=t.attributes.length,w=0;w<y;w++){var C=t.attributes[w];et(g,C.name,C.value)||(b[C.name]=tt(r,g,E(C.name),C.value))}if("link"===g&&o){var S=Array.from(r.styleSheets).find(e=>e.href===t.href),k=null;S&&(k=A(S)),k&&(delete b.rel,delete b.href,b._cssText=k)}if("style"===g&&t.sheet){var _=A(t.sheet);_&&(t.childNodes.length>1&&(_=z(_,t)),b._cssText=_)}if(["input","textarea","select"].includes(g)){var I=t.value,x=t.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&I?b.value=O({element:t,type:L(t),tagName:g,value:I,maskInputOptions:a,maskInputFn:h}):x&&(b.checked=x)}"option"===g&&(t.selected&&!a.select?b.selected=!0:delete b.selected);"dialog"===g&&t.open&&(b.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal");if("canvas"===g&&c)if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var i=0;i<t.width;i+=50)for(var r=0;r<t.height;r+=50){var n=e.getImageData,s=T in n?n[T]:n;if(new Uint32Array(s.call(e,i,r,Math.min(50,t.width-i),Math.min(50,t.height-r)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(b.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){var M=t.toDataURL(u.type,u.quality),R=r.createElement("canvas");R.width=t.width,R.height=t.height,M!==R.toDataURL(u.type,u.quality)&&(b.rr_dataURL=M)}if("img"===g&&l){W||(W=r.createElement("canvas"),G=W.getContext("2d"));var N=t,B=N.currentSrc||N.getAttribute("src")||"<unknown-src>",F=N.crossOrigin,D=()=>{N.removeEventListener("load",D);try{W.width=N.naturalWidth,W.height=N.naturalHeight,G.drawImage(N,0,0),b.rr_dataURL=W.toDataURL(u.type,u.quality)}catch(t){if("anonymous"!==N.crossOrigin)return N.crossOrigin="anonymous",void(N.complete&&0!==N.naturalWidth?D():N.addEventListener("load",D));console.warn("Cannot inline img src="+B+"! Error: "+t)}"anonymous"===N.crossOrigin&&(F?b.crossOrigin=F:N.removeAttribute("crossorigin"))};N.complete&&0!==N.naturalWidth?D():N.addEventListener("load",D)}if(["audio","video"].includes(g)){var j=b;j.rr_mediaState=t.paused?"paused":"played",j.rr_mediaCurrentTime=t.currentTime,j.rr_mediaPlaybackRate=t.playbackRate,j.rr_mediaMuted=t.muted,j.rr_mediaLoop=t.loop,j.rr_mediaVolume=t.volume}v||(t.scrollLeft&&(b.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(b.rr_scrollTop=t.scrollTop));if(m){var{width:P,height:U}=t.getBoundingClientRect();b={class:b.class,rr_width:P+"px",rr_height:U+"px"}}"iframe"!==g||d(b.src)||(t.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(g)&&(i=!0)}catch(t){}return{type:f.Element,tagName:g,attributes:b,childNodes:[],isSVG:q(t)||void 0,needBlock:m,rootId:p,isCustom:i}}(t,{doc:i,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:h,maskInputFn:l,dataURLOptions:c,inlineImages:d,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m,rootId:b});case t.TEXT_NODE:return function(t,e){var{needsMask:i,maskTextFn:r,rootId:n,cssCaptured:s}=e,o=k.parentNode(t),a=o&&o.tagName,h="",u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;l?h="SCRIPT_PLACEHOLDER":s||(h=k.textContent(t),u&&h&&(h=P(h,Q(e.doc))));!u&&!l&&h&&i&&(h=r?r(h,k.parentElement(t)):h.replace(/[\S]/g,"*"));return{type:f.Text,textContent:h||"",rootId:n}}(t,{doc:i,needsMask:o,maskTextFn:u,rootId:b,cssCaptured:g});case t.CDATA_SECTION_NODE:return{type:f.CDATA,textContent:"",rootId:b};case t.COMMENT_NODE:return{type:f.Comment,textContent:k.textContent(t)||"",rootId:b};default:return!1}}function st(t){return null==t?"":t.toLowerCase()}function ot(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:t||{}}function at(t,e){var{doc:i,mirror:r,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:h=!1,inlineStylesheet:u=!0,maskInputOptions:l={},maskTextFn:c,maskInputFn:d,slimDOMOptions:v,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:M=!1,cssCaptured:R=!1}=e,{needsMask:O}=e,{preserveWhiteSpace:E=!0}=e;O||(O=rt(t,o,a,void 0===O));var T,L=nt(t,{doc:i,mirror:r,blockClass:n,blockSelector:s,needsMask:O,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:A,newlyAddedElement:M,cssCaptured:R});if(!L)return console.warn(t,"not serialized"),null;T=r.hasNode(t)?r.getId(t):function(t,e){if(e.comment&&t.type===f.Comment)return!0;if(t.type===f.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===N(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(st(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===st(t.attributes.name)||"icon"===st(t.attributes.rel)||"apple-touch-icon"===st(t.attributes.rel)||"shortcut icon"===st(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&st(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(st(t.attributes.property).match(/^(og|twitter|fb):/)||st(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===st(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===st(t.attributes.name)||"googlebot"===st(t.attributes.name)||"bingbot"===st(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===st(t.attributes.name)||"generator"===st(t.attributes.name)||"framework"===st(t.attributes.name)||"publisher"===st(t.attributes.name)||"progid"===st(t.attributes.name)||st(t.attributes.property).match(/^article:/)||st(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===st(t.attributes.name)||"yandex-verification"===st(t.attributes.name)||"csrf-token"===st(t.attributes.name)||"p:domain_verify"===st(t.attributes.name)||"verify-v1"===st(t.attributes.name)||"verification"===st(t.attributes.name)||"shopify-checkout-api-token"===st(t.attributes.name)))return!0}}return!1}(L,v)||!E&&L.type===f.Text&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Y();var B=Object.assign(L,{id:T});if(r.add(t,B),-2===T)return null;b&&b(t);var F=!h;if(B.type===f.Element){F=F&&!B.needBlock,delete B.needBlock;var D=k.shadowRoot(t);D&&x(D)&&(B.isShadowHost=!0)}if((B.type===f.Document||B.type===f.Element)&&F){v.headWhitespace&&B.type===f.Element&&"head"===B.tagName&&(E=!1);var j={doc:i,mirror:r,blockClass:n,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:h,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:d,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:A,cssCaptured:!1};if(B.type===f.Element&&"textarea"===B.tagName&&void 0!==B.attributes.value);else for(var P of(B.type===f.Element&&void 0!==B.attributes._cssText&&"string"==typeof B.attributes._cssText&&(j.cssCaptured=!0),Array.from(k.childNodes(t)))){var U=at(P,j);U&&B.childNodes.push(U)}var z=null;if(_(t)&&(z=k.shadowRoot(t)))for(var W of Array.from(k.childNodes(z))){var G=at(W,j);G&&(x(z)&&(G.isShadow=!0),B.childNodes.push(G))}}var Z=k.parentNode(t);return Z&&I(Z)&&x(Z)&&(B.isShadow=!0),B.type===f.Element&&"iframe"===B.tagName&&function(t,e,i){var r=t.contentWindow;if(r){var n,s=!1;try{n=r.document.readyState}catch(t){return}if("complete"===n){var o="about:blank";if(r.location.href!==o||t.src===o||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}else{var a=setTimeout(()=>{s||(e(),s=!0)},i);t.addEventListener("load",()=>{clearTimeout(a),s=!0,e()})}}}(t,()=>{var e=t.contentDocument;if(e&&y){var i=at(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:d,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:A});i&&y(t,i)}},w),B.type===f.Element&&"link"===B.tagName&&"string"==typeof B.attributes.rel&&("stylesheet"===B.attributes.rel||"preload"===B.attributes.rel&&"string"==typeof B.attributes.href&&"css"===N(B.attributes.href))&&function(t,e,i){var r,n=!1;try{r=t.sheet}catch(t){return}if(!r){var s=setTimeout(()=>{n||(e(),n=!0)},i);t.addEventListener("load",()=>{clearTimeout(s),n=!0,e()})}}(t,()=>{if(C){var e=at(t,{doc:i,mirror:r,blockClass:n,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:d,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:A});e&&C(t,e)}},S),B}function ht(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ut(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),i}var lt={exports:{}},ct=String,dt=function(){return{isColorSupported:!1,reset:ct,bold:ct,dim:ct,italic:ct,underline:ct,inverse:ct,hidden:ct,strikethrough:ct,black:ct,red:ct,green:ct,yellow:ct,blue:ct,magenta:ct,cyan:ct,white:ct,gray:ct,bgBlack:ct,bgRed:ct,bgGreen:ct,bgYellow:ct,bgBlue:ct,bgMagenta:ct,bgCyan:ct,bgWhite:ct}};lt.exports=dt(),lt.exports.createColors=dt;var vt=lt.exports,ft=ut(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),pt=vt,mt=ft,gt=class t extends Error{constructor(e,i,r,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==i&&void 0!==r&&("number"==typeof i?(this.line=i,this.column=r):(this.line=i.line,this.column=i.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";var e=this.source;null==t&&(t=pt.isColorSupported),mt&&t&&(e=mt(e));var i,r,n=e.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(t){var{bold:h,gray:u,red:l}=pt.createColors(!0);i=t=>h(l(t)),r=t=>u(t)}else i=r=t=>t;return n.slice(s,o).map((t,e)=>{var n=s+1+e,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){var h=r(o.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(o)+t+"\n "+h+i("^")}return" "+r(o)+t}).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}},bt=gt;gt.default=gt;var yt={};yt.isClean=Symbol("isClean"),yt.my=Symbol("my");var wt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var Ct=class{constructor(t){this.builder=t}atrule(t,e){var i="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?i+=t.raws.afterName:r&&(i+=" "),t.nodes)this.block(t,i+r);else{var n=(t.raws.between||"")+(e?";":"");this.builder(i+r+n,t)}}beforeAfter(t,e){var i;i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var r=t.parent,n=0;r&&"root"!==r.type;)n+=1,r=r.parent;if(i.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;o<n;o++)i+=s}return i}block(t,e){var i,r=this.raw(t,"between","beforeOpen");this.builder(e+r+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(i),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var i=this.raw(t,"semicolon"),r=0;r<t.nodes.length;r++){var n=t.nodes[r],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==r||i)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon"),r=t.prop+i+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,i){var r;if(i||(i=e),e&&void 0!==(r=t.raws[e]))return r;var n=t.parent;if("before"===i){if(!n||"root"===n.type&&n.first===t)return"";if(n&&"document"===n.type)return""}if(!n)return wt[i];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[i])return s.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var o,a="raw"+((o=i)[0].toUpperCase()+o.slice(1));return this[a]?r=this[a](s,t):s.walk(t=>{if(void 0!==(r=t.raws[e]))return!1}),void 0===r&&(r=wt[i]),s.rawCache[i]=r,r}rawBeforeClose(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){var i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){var e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(t){var e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return(e=i.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){var e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk(i=>{var r=i.parent;if(r&&r!==t&&r.parent&&r.parent===t&&void 0!==i.raws.before){var n=i.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}}),e);var e}rawSemicolon(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],r=t.raws[e];return r&&r.value===i?r.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},St=Ct;Ct.default=Ct;var kt=St;function _t(t,e){new kt(e).stringify(t)}var It=_t;_t.default=_t;var{isClean:xt,my:At}=yt,Mt=bt,Rt=St,Ot=It;function Et(t,e){var i=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&"proxyCache"!==r){var n=t[r],s=typeof n;"parent"===r&&"object"===s?e&&(i[r]=e):"source"===r?i[r]=n:Array.isArray(n)?i[r]=n.map(t=>Et(t,i)):("object"===s&&null!==n&&(n=Et(n)),i[r]=n)}return i}var Tt=class{constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[xt]=!1,this[At]=!0,t)if("nodes"===e)for(var i of(this.nodes=[],t[e]))"function"==typeof i.clone?this.append(i.clone()):this.append(i);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=Et(this);for(var i in t)e[i]=t[i];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e){if(void 0===e&&(e={}),this.source){var{end:i,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:i.column,line:i.line},e)}return new Mt(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[xt]){this[xt]=!1;for(var t=this;t=t.parent;)t[xt]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t,e){var i=this.source.start;if(t.index)i=this.positionInside(t.index,e);else if(t.word){var r=(e=this.toString()).indexOf(t.word);-1!==r&&(i=this.positionInside(r,e))}return i}positionInside(t,e){for(var i=e||this.toString(),r=this.source.start.column,n=this.source.start.line,s=0;s<t;s++)"\n"===i[s]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){var e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){var r=this.toString(),n=r.indexOf(t.word);-1!==n&&(e=this.positionInside(n,r),i=this.positionInside(n+t.word.length,r))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(i.line<e.line||i.line===e.line&&i.column<=e.column)&&(i={column:e.column+1,line:e.line}),{end:i,start:e}}raw(t,e){return(new Rt).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];for(var s of r)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i={},r=null==e;e=e||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))i[s]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)i[s]=o.toJSON(null,e);else if("source"===s){var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),i[s]={end:o.end,inputId:a,start:o.start}}else i[s]=o}return r&&(i.inputs=[...e.keys()].map(t=>t.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=Ot),t.stringify&&(t=t.stringify);var e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var r={node:this};for(var n in i)r[n]=i[n];return t.warn(e,r)}get proxyOf(){return this}},Lt=Tt;Tt.default=Tt;var Nt=Lt,Bt=class extends Nt{constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=i({},t,{value:String(t.value)})),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},Ft=Bt;Bt.default=Bt;var Dt={nanoid:function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}},{SourceMapConsumer:jt,SourceMapGenerator:Pt}=ft,{existsSync:Ut,readFileSync:$t}=ft,{dirname:zt,join:Wt}=ft;var Gt=class{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,r=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=zt(this.mapFile)),r&&(this.text=r)}}consumer(){return this.consumerCache||(this.consumerCache=new jt(this.text)),this.consumerCache}decodeInline(t){var e;if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var i=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/gm);if(e){var i=t.lastIndexOf(e.pop()),r=t.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,r)))}}loadFile(t){if(this.root=zt(t),Ut(t))return this.mapFile=t,$t(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof jt)return Pt.fromSourceMap(e).toString();if(e instanceof Pt)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var r=this.loadFile(i);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return t&&(n=Wt(zt(t),n)),this.loadFile(n)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Zt=Gt;Gt.default=Gt;var{SourceMapConsumer:Vt,SourceMapGenerator:Yt}=ft,{fileURLToPath:Jt,pathToFileURL:Xt}=ft,{isAbsolute:Kt,resolve:Ht}=ft,{nanoid:qt}=Dt,Qt=ft,te=bt,ee=Zt,ie=Symbol("fromOffsetCache"),re=Boolean(Vt&&Yt),ne=Boolean(Ht&&Kt),se=class{constructor(t,e){if(void 0===e&&(e={}),null==t||"object"==typeof t&&!t.toString)throw new Error("PostCSS received "+t+" instead of CSS string");if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!ne||/^\w+:\/\//.test(e.from)||Kt(e.from)?this.file=e.from:this.file=Ht(e.from)),ne&&re){var i=new ee(this.css,e);if(i.text){this.map=i;var r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+qt(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,r){var n,s,o;if(void 0===r&&(r={}),e&&"object"==typeof e){var a=e,h=i;if("number"==typeof a.offset){var u=this.fromOffset(a.offset);e=u.line,i=u.col}else e=a.line,i=a.column;if("number"==typeof h.offset){var l=this.fromOffset(h.offset);s=l.line,o=l.col}else s=h.line,o=h.column}else if(!i){var c=this.fromOffset(e);e=c.line,i=c.col}var d=this.origin(e,i,s,o);return(n=d?new te(t,void 0===d.endLine?d.line:{column:d.column,line:d.line},void 0===d.endLine?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new te(t,void 0===s?e:{column:i,line:e},void 0===s?i:{column:o,line:s},this.css,this.file,r.plugin)).input={column:i,endColumn:o,endLine:s,line:e,source:this.css},this.file&&(Xt&&(n.input.url=Xt(this.file).toString()),n.input.file=this.file),n}fromOffset(t){var e;if(this[ie])e=this[ie];else{var i=this.css.split("\n");e=new Array(i.length);for(var r=0,n=0,s=i.length;n<s;n++)e[n]=r,r+=i[n].length+1;this[ie]=e}var o=0;if(t>=e[e.length-1])o=e.length-1;else for(var a,h=e.length-2;o<h;)if(t<e[a=o+(h-o>>1)])h=a-1;else{if(!(t>=e[a+1])){o=a;break}o=a+1}return{col:t-e[o]+1,line:o+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ht(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,r){if(!this.map)return!1;var n,s,o=this.map.consumer(),a=o.originalPositionFor({column:e,line:t});if(!a.source)return!1;"number"==typeof i&&(n=o.originalPositionFor({column:r,line:i})),s=Kt(a.source)?Xt(a.source):new URL(a.source,this.map.consumer().sourceRoot||Xt(this.map.mapFile));var h={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:s.toString()};if("file:"===s.protocol){if(!Jt)throw new Error("file: protocol is not available in this PostCSS build");h.file=Jt(s)}var u=o.sourceContentFor(a.source);return u&&(h.source=u),h}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=i({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}},oe=se;se.default=se,Qt&&Qt.registerInput&&Qt.registerInput(se);var{SourceMapConsumer:ae,SourceMapGenerator:he}=ft,{dirname:ue,relative:le,resolve:ce,sep:de}=ft,{pathToFileURL:ve}=ft,fe=oe,pe=Boolean(ae&&he),me=Boolean(ue&&ce&&le&&de),ge=class{constructor(t,e,i,r){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var t of this.previous()){var e=this.toUrl(this.path(t.file)),i=t.root||ue(t.file),r=void 0;!1===this.mapOpts.sourcesContent?(r=new ae(t.text)).sourcesContent&&(r.sourcesContent=null):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),me&&pe&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,e=>{t+=e}),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=he.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new he({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 he({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,i=1,r=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,h)=>{if(this.css+=o,a&&"end"!==h&&(s.generated.line=i,s.generated.column=r-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(t=o.match(/\n/g))?(i+=t.length,e=o.lastIndexOf("\n"),r=o.length-e):r+=o.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=i,s.generated.column=r-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=i,s.generated.column=r-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var i=this.opts.to?ue(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=ue(ce(i,this.mapOpts.annotation)));var r=le(i,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{var t=new fe(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk(e=>{if(e.source){var i=e.source.input.from;if(i&&!t[i]){t[i]=!0;var r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(ve){var i=ve(t).toString();return this.memoizedFileURLs.set(t,i),i}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===de&&(t=t.replace(/\\/g,"/"));var i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}},be=Lt,ye=class extends be{constructor(t){super(t),this.type="comment"}},we=ye;ye.default=ye;var Ce,Se,ke,_e,{isClean:Ie,my:xe}=yt,Ae=Ft,Me=we,Re=Lt;function Oe(t){return t.map(t=>(t.nodes&&(t.nodes=Oe(t.nodes)),delete t.source,t))}function Ee(t){if(t[Ie]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)Ee(e)}var Te=class t extends Re{append(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var r of e){var n=this.normalize(r,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,i,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(e=this.indexes[r],!1!==(i=t(this.proxyOf.nodes[e],e)));)this.indexes[r]+=1;return delete this.indexes[r],i}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return t[e](...r.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t))}:"every"===e||"some"===e?i=>t[e](function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return i(t.toProxy(),...r)}):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,r=this.index(t),n=this.normalize(e,this.proxyOf.nodes[r]).reverse();for(var s of(r=this.index(t),n))this.proxyOf.nodes.splice(r+1,0,s);for(var o in this.indexes)r<(i=this.indexes[o])&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(t,e){var i,r=this.index(t),n=0===r&&"prepend",s=this.normalize(e,this.proxyOf.nodes[r],n).reverse();for(var o of(r=this.index(t),s))this.proxyOf.nodes.splice(r,0,o);for(var a in this.indexes)r<=(i=this.indexes[a])&&(this.indexes[a]=i+s.length);return this.markDirty(),this}normalize(e,i){if("string"==typeof e)e=Oe(Ce(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var r of e=e.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if("root"===e.type&&"document"!==this.type)for(var n of e=e.nodes.slice(0))n.parent&&n.parent.removeChild(n,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Ae(e)]}else if(e.selector)e=[new Se(e)];else if(e.name)e=[new ke(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Me(e)]}var s=e.map(e=>(e[xe]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Ie]&&Ee(e),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e));return s}prepend(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var r of e=e.reverse()){var n=this.normalize(r,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)(e=this.indexes[i])>=t&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(r=>{e.props&&!e.props.includes(r.prop)||e.fast&&!r.value.includes(e.fast)||(r.value=r.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,i)=>{var r;try{r=t(e,i)}catch(t){throw e.addToError(t)}return!1!==r&&e.walk&&(r=e.walk(t)),r})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("atrule"===i.type&&t.test(i.name))return e(i,r)}):this.walk((i,r)=>{if("atrule"===i.type&&i.name===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("decl"===i.type&&t.test(i.prop))return e(i,r)}):this.walk((i,r)=>{if("decl"===i.type&&i.prop===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("rule"===i.type&&t.test(i.selector))return e(i,r)}):this.walk((i,r)=>{if("rule"===i.type&&i.selector===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Te.registerParse=t=>{Ce=t},Te.registerRule=t=>{Se=t},Te.registerAtRule=t=>{ke=t},Te.registerRoot=t=>{_e=t};var Le=Te;Te.default=Te,Te.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,ke.prototype):"rule"===t.type?Object.setPrototypeOf(t,Se.prototype):"decl"===t.type?Object.setPrototypeOf(t,Ae.prototype):"comment"===t.type?Object.setPrototypeOf(t,Me.prototype):"root"===t.type&&Object.setPrototypeOf(t,_e.prototype),t[xe]=!0,t.nodes&&t.nodes.forEach(t=>{Te.rebuild(t)})};var Ne,Be,Fe=Le,De=class extends Fe{constructor(t){super(i({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t){return void 0===t&&(t={}),new Ne(new Be,this,t).stringify()}};De.registerLazyResult=t=>{Ne=t},De.registerProcessor=t=>{Be=t};var je=De;De.default=De;var Pe={},Ue=function(t){Pe[t]||(Pe[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))},$e=class{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var i=e.node.rangeBy(e);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(var r in e)this[r]=e[r]}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}},ze=$e;$e.default=$e;var We=ze,Ge=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e){void 0===e&&(e={}),e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var i=new We(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},Ze=Ge;Ge.default=Ge;var Ve="'".charCodeAt(0),Ye='"'.charCodeAt(0),Je="\\".charCodeAt(0),Xe="/".charCodeAt(0),Ke="\n".charCodeAt(0),He=" ".charCodeAt(0),qe="\f".charCodeAt(0),Qe="\t".charCodeAt(0),ti="\r".charCodeAt(0),ei="[".charCodeAt(0),ii="]".charCodeAt(0),ri="(".charCodeAt(0),ni=")".charCodeAt(0),si="{".charCodeAt(0),oi="}".charCodeAt(0),ai=";".charCodeAt(0),hi="*".charCodeAt(0),ui=":".charCodeAt(0),li="@".charCodeAt(0),ci=/[\t\n\f\r "#'()/;[\\\]{}]/g,di=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vi=/.[\r\n"'(/\\]/,fi=/[\da-f]/i,pi=Le,mi=class extends pi{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}},gi=mi;mi.default=mi,pi.registerAtRule(mi);var bi,yi,wi=Le,Ci=class extends wi{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){var r=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of r)n.raws.before=e.raws.before;return r}removeChild(t,e){var i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t){return void 0===t&&(t={}),new bi(new yi,this,t).stringify()}};Ci.registerLazyResult=t=>{bi=t},Ci.registerProcessor=t=>{yi=t};var Si=Ci;Ci.default=Ci,wi.registerRoot(Ci);var ki={comma:t=>ki.split(t,[","],!0),space:t=>ki.split(t,[" ","\n","\t"]),split(t,e,i){var r=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&r.push(n.trim()),n="",s=!1):n+=l;return(i||""!==n)&&r.push(n.trim()),r}},_i=ki;ki.default=ki;var Ii=Le,xi=_i,Ai=class extends Ii{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return xi.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}},Mi=Ai;Ai.default=Ai,Ii.registerRule(Ai);var Ri=Ft,Oi=function(t,e){void 0===e&&(e={});var i,r,n,s,o,a,h,u,l,c,d=t.css.valueOf(),v=e.ignoreErrors,f=d.length,p=0,m=[],g=[];function b(e){throw t.error("Unclosed "+e,p)}return{back:function(t){g.push(t)},endOfFile:function(){return 0===g.length&&p>=f},nextToken:function(t){if(g.length)return g.pop();if(!(p>=f)){var e=!!t&&t.ignoreUnclosed;switch(i=d.charCodeAt(p)){case Ke:case He:case Qe:case ti:case qe:r=p;do{r+=1,i=d.charCodeAt(r)}while(i===He||i===Ke||i===Qe||i===ti||i===qe);c=["space",d.slice(p,r)],p=r-1;break;case ei:case ii:case si:case oi:case ui:case ai:case ni:var y=String.fromCharCode(i);c=[y,y,p];break;case ri:if(u=m.length?m.pop()[1]:"",l=d.charCodeAt(p+1),"url"===u&&l!==Ve&&l!==Ye&&l!==He&&l!==Ke&&l!==Qe&&l!==qe&&l!==ti){r=p;do{if(a=!1,-1===(r=d.indexOf(")",r+1))){if(v||e){r=p;break}b("bracket")}for(h=r;d.charCodeAt(h-1)===Je;)h-=1,a=!a}while(a);c=["brackets",d.slice(p,r+1),p,r],p=r}else r=d.indexOf(")",p+1),s=d.slice(p,r+1),-1===r||vi.test(s)?c=["(","(",p]:(c=["brackets",s,p,r],p=r);break;case Ve:case Ye:n=i===Ve?"'":'"',r=p;do{if(a=!1,-1===(r=d.indexOf(n,r+1))){if(v||e){r=p+1;break}b("string")}for(h=r;d.charCodeAt(h-1)===Je;)h-=1,a=!a}while(a);c=["string",d.slice(p,r+1),p,r],p=r;break;case li:ci.lastIndex=p+1,ci.test(d),r=0===ci.lastIndex?d.length-1:ci.lastIndex-2,c=["at-word",d.slice(p,r+1),p,r],p=r;break;case Je:for(r=p,o=!0;d.charCodeAt(r+1)===Je;)r+=1,o=!o;if(i=d.charCodeAt(r+1),o&&i!==Xe&&i!==He&&i!==Ke&&i!==Qe&&i!==ti&&i!==qe&&(r+=1,fi.test(d.charAt(r)))){for(;fi.test(d.charAt(r+1));)r+=1;d.charCodeAt(r+1)===He&&(r+=1)}c=["word",d.slice(p,r+1),p,r],p=r;break;default:i===Xe&&d.charCodeAt(p+1)===hi?(0===(r=d.indexOf("*/",p+2)+1)&&(v||e?r=d.length:b("comment")),c=["comment",d.slice(p,r+1),p,r],p=r):(di.lastIndex=p+1,di.test(d),r=0===di.lastIndex?d.length-1:di.lastIndex-2,c=["word",d.slice(p,r+1),p,r],m.push(c),p=r)}return p++,c}},position:function(){return p}}},Ei=we,Ti=gi,Li=Si,Ni=Mi,Bi={empty:!0,space:!0};var Fi=class{constructor(t){this.input=t,this.root=new Li,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i,r,n=new Ti;n.name=t[1].slice(1),""===n.name&&this.unnamedAtrule(n,t),this.init(n,t[2]);for(var s=!1,o=!1,a=[],h=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?h.push("("===e?")":"]"):"{"===e&&h.length>0?h.push("}"):e===h[h.length-1]&&h.pop(),0===h.length){if(";"===e){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(a.length>0){for(i=a[r=a.length-1];i&&"space"===i[0];)i=a[--r];i&&(n.source.end=this.getPosition(i[3]||i[2]),n.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),s&&(t=a[a.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var i,r=0,n=e-1;n>=0&&("space"===(i=t[n])[0]||2!==(r+=1));n--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){var e,i,r,n=0;for(var[s,o]of t.entries()){if("("===(i=(e=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(r){if("word"===r[0]&&"progid"===r[1])continue;return s}this.doubleColon(e)}r=e}return!1}comment(t){var e=new Ei;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))e.text="",e.raws.left=i,e.raws.right="";else{var r=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=Oi(this.input)}decl(t,e){var i=new Ri;this.init(i,t[0][2]);var r,n=t[t.length-1];for(";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var i=t[e],r=i[3]||i[2];if(r)return r}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(r=t.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var o,a=[];t.length&&("space"===(o=t[0][0])||"comment"===o);)a.push(t.shift());this.precheckMissedSemicolon(t);for(var h=t.length-1;h>=0;h--){if("!important"===(r=t[h])[1].toLowerCase()){i.important=!0;var u=this.stringFrom(t,h);" !important"!==(u=this.spacesFromEnd(t)+u)&&(i.raws.important=u);break}if("important"===r[1].toLowerCase()){for(var l=t.slice(0),c="",d=h;d>0;d--){var v=l[d][0];if(0===c.trim().indexOf("!")&&"space"!==v)break;c=l.pop()[1]+c}0===c.trim().indexOf("!")&&(i.important=!0,i.raws.important=c,t=l)}if("space"!==r[0]&&"comment"!==r[0])break}var f=t.some(t=>"space"!==t[0]&&"comment"!==t[0]);f&&(i.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(i,"value",a.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new Ni;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,i=null,r=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(i=h[0],a.push(h),"("===i||"["===i)n||(n=h),s.push("("===i?")":"]");else if(o&&r&&"{"===i)n||(n=h),s.push("}");else if(0===s.length){if(";"===i){if(r)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(r=!0)}else i===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&r){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,r){for(var n,s,o,a,h=i.length,u="",l=!0,c=0;c<h;c+=1)"space"!==(s=(n=i[c])[0])||c!==h-1||r?"comment"===s?(a=i[c-1]?i[c-1][0]:"empty",o=i[c+1]?i[c+1][0]:"empty",Bi[a]||Bi[o]||","===u.slice(-1)?l=!1:u+=n[1]):u+=n[1]:l=!1;if(!l){var d=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:d,value:u}}t[e]=u}rule(t){t.pop();var e=new Ni;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,i="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){for(var e,i="";t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var i="",r=e;r<t.length;r++)i+=t[r][1];return t.splice(e,t.length-e),i}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},Di=Le,ji=Fi,Pi=oe;function Ui(t,e){var i=new Pi(t,e),r=new ji(i);try{r.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}var $i=Ui;Ui.default=Ui,Di.registerParse(Ui);var{isClean:zi,my:Wi}=yt,Gi=ge,Zi=It,Vi=Le,Yi=je,Ji=Ue,Xi=Ze,Ki=$i,Hi=Si,qi={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Qi={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},tr={Once:!0,postcssPlugin:!0,prepare:!0};function er(t){return"object"==typeof t&&"function"==typeof t.then}function ir(t){var e=!1,i=qi[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function rr(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:ir(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function nr(t){return t[zi]=!1,t.nodes&&t.nodes.forEach(t=>nr(t)),t}var sr={},or=class t{constructor(e,r,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof t||r instanceof Xi)s=nr(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var o=Ki;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{s=o(r,n)}catch(t){this.processed=!0,this.error=t}s&&!s[Wi]&&Vi.rebuild(s)}else s=nr(r);this.result=new Xi(e,s,n),this.helpers=i({},sr,{postcss:sr,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?i({},t,t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion&&"production"!==process.env.NODE_ENV){var r=i.postcssPlugin,n=i.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+r+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(var e of this.plugins)if("object"==typeof e)for(var i in e){if(!Qi[i]&&/^[A-Z]/.test(i))throw new Error("Unknown event "+i+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!tr[i])if("object"==typeof e[i])for(var r in e[i])t(e,"*"===r?i:i+"-"+r.toLowerCase(),e[i][r]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e(function*(){t.plugin=0;for(var e=0;e<t.plugins.length;e++){var i=t.plugins[e],r=t.runOnRoot(i);if(er(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var n=t.result.root;!n[zi];){n[zi]=!0;for(var s=[rr(n)];s.length>0;){var o=t.visitTick(s);if(er(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=u;try{if("document"===n.type){var i=n.nodes.map(i=>e(i,t.helpers));yield Promise.all(i)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[u,l]of t.listeners.OnceExit)yield*h(l)}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return er(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=Zi;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var i=new Gi(e,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(er(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[zi];)e[zi]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Ji("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,r]of t){this.result.lastPlugin=i;var n=void 0;try{n=r(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(er(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:r}=e;if("root"===i.type||"document"===i.type||i.parent){if(r.length>0&&e.visitorIndex<r.length){var[n,s]=r[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===r.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[zi])return o[zi]=!0,void t.push(rr(o));e.iterator=0,delete i.indexes[a]}for(var h=e.events;e.eventIndex<h.length;){var u=h[e.eventIndex];if(e.eventIndex+=1,0===u)return void(i.nodes&&i.nodes.length&&(i[zi]=!0,e.iterator=i.getIterator()));if(this.listeners[u])return void(e.visitors=this.listeners[u])}t.pop()}else t.pop()}walkSync(t){t[zi]=!0;var e=ir(t);for(var i of e)if(0===i)t.nodes&&t.each(t=>{t[zi]||this.walkSync(t)});else{var r=this.listeners[i];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};or.registerPostcss=t=>{sr=t};var ar=or;or.default=or,Hi.registerLazyResult(or),Yi.registerLazyResult(or);var hr=ge,ur=It,lr=Ue,cr=$i,dr=Ze,vr=class{constructor(t,e,i){var r;e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=i,this._map=void 0;var n=ur;this.result=new dr(this._processor,r,this._opts),this.result.css=e;var s=this;Object.defineProperty(this.result,"root",{get:()=>s.root});var o=new hr(n,r,this._opts,e);if(o.isMap()){var[a,h]=o.generate();a&&(this.result.css=a),h&&(this.result.map=h)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||lr("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;var t,e=cr;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}},fr=vr;vr.default=vr;var pr=fr,mr=ar,gr=je,br=Si,yr=class{constructor(t){void 0===t&&(t=[]),this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else{if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,e){return void 0===e&&(e={}),this.plugins.length||e.parser||e.stringifier||e.syntax?new mr(this,t,e):new pr(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},wr=yr;yr.default=yr,br.registerProcessor(yr),gr.registerProcessor(yr);var Cr=Ft,Sr=Zt,kr=we,_r=gi,Ir=oe,xr=Si,Ar=Mi;function Mr(t,e){if(Array.isArray(t))return t.map(t=>Mr(t));var{inputs:n}=t,a=r(t,s);if(n)for(var h of(e=[],n)){var u=i({},h,{__proto__:Ir.prototype});u.map&&(u.map=i({},u.map,{__proto__:Sr.prototype})),e.push(u)}if(a.nodes&&(a.nodes=t.nodes.map(t=>Mr(t,e))),a.source){var l=a.source,{inputId:c}=l,d=r(l,o);a.source=d,null!=c&&(a.source.input=e[c])}if("root"===a.type)return new xr(a);if("decl"===a.type)return new Cr(a);if("rule"===a.type)return new Ar(a);if("comment"===a.type)return new kr(a);if("atrule"===a.type)return new _r(a);throw new Error("Unknown node type: "+t.type)}var Rr=Mr;Mr.default=Mr;var Or=bt,Er=Ft,Tr=ar,Lr=Le,Nr=wr,Br=It,Fr=Rr,Dr=je,jr=ze,Pr=we,Ur=gi,$r=Ze,zr=oe,Wr=$i,Gr=_i,Zr=Mi,Vr=Si,Yr=Lt;function Jr(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Nr(e)}Jr.plugin=function(t,e){var i,r=!1;function n(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var i=e(...arguments);return i.postcssPlugin=t,i.postcssVersion=(new Nr).version,i}return Object.defineProperty(n,"postcss",{get:()=>(i||(i=n()),i)}),n.process=function(t,e,i){return Jr([n(i)]).process(t,e)},n},Jr.stringify=Br,Jr.parse=Wr,Jr.fromJSON=Fr,Jr.list=Gr,Jr.comment=t=>new Pr(t),Jr.atRule=t=>new Ur(t),Jr.decl=t=>new Er(t),Jr.rule=t=>new Zr(t),Jr.root=t=>new Vr(t),Jr.document=t=>new Dr(t),Jr.CssSyntaxError=Or,Jr.Declaration=Er,Jr.Container=Lr,Jr.Processor=Nr,Jr.Document=Dr,Jr.Comment=Pr,Jr.Warning=jr,Jr.AtRule=Ur,Jr.Result=$r,Jr.Input=zr,Jr.Rule=Zr,Jr.Root=Vr,Jr.Node=Yr,Tr.registerPostcss(Jr);var Xr=Jr;Jr.default=Jr;var Kr=ht(Xr);Kr.stringify,Kr.fromJSON,Kr.plugin,Kr.parse,Kr.list,Kr.document,Kr.comment,Kr.atRule,Kr.rule,Kr.decl,Kr.root,Kr.CssSyntaxError,Kr.Declaration,Kr.Container,Kr.Processor,Kr.Document,Kr.Comment,Kr.Warning,Kr.AtRule,Kr.Result,Kr.Input,Kr.Rule,Kr.Root,Kr.Node;var Hr=Object.defineProperty,qr=(t,e,i)=>((t,e,i)=>e in t?Hr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i);function Qr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tn(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),i}var en={exports:{}},rn=String,nn=function(){return{isColorSupported:!1,reset:rn,bold:rn,dim:rn,italic:rn,underline:rn,inverse:rn,hidden:rn,strikethrough:rn,black:rn,red:rn,green:rn,yellow:rn,blue:rn,magenta:rn,cyan:rn,white:rn,gray:rn,bgBlack:rn,bgRed:rn,bgGreen:rn,bgYellow:rn,bgBlue:rn,bgMagenta:rn,bgCyan:rn,bgWhite:rn}};en.exports=nn(),en.exports.createColors=nn;var sn=en.exports,on=tn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),an=sn,hn=on,un=class t extends Error{constructor(e,i,r,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==i&&void 0!==r&&("number"==typeof i?(this.line=i,this.column=r):(this.line=i.line,this.column=i.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";var e=this.source;null==t&&(t=an.isColorSupported),hn&&t&&(e=hn(e));var i,r,n=e.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(t){var{bold:h,gray:u,red:l}=an.createColors(!0);i=t=>h(l(t)),r=t=>u(t)}else i=r=t=>t;return n.slice(s,o).map((t,e)=>{var n=s+1+e,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){var h=r(o.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(o)+t+"\n "+h+i("^")}return" "+r(o)+t}).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}},ln=un;un.default=un;var cn={};cn.isClean=Symbol("isClean"),cn.my=Symbol("my");var dn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var vn=class{constructor(t){this.builder=t}atrule(t,e){var i="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?i+=t.raws.afterName:r&&(i+=" "),t.nodes)this.block(t,i+r);else{var n=(t.raws.between||"")+(e?";":"");this.builder(i+r+n,t)}}beforeAfter(t,e){var i;i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var r=t.parent,n=0;r&&"root"!==r.type;)n+=1,r=r.parent;if(i.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;o<n;o++)i+=s}return i}block(t,e){var i,r=this.raw(t,"between","beforeOpen");this.builder(e+r+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(i),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var i=this.raw(t,"semicolon"),r=0;r<t.nodes.length;r++){var n=t.nodes[r],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==r||i)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon"),r=t.prop+i+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,i){var r;if(i||(i=e),e&&void 0!==(r=t.raws[e]))return r;var n=t.parent;if("before"===i){if(!n||"root"===n.type&&n.first===t)return"";if(n&&"document"===n.type)return""}if(!n)return dn[i];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[i])return s.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var o,a="raw"+((o=i)[0].toUpperCase()+o.slice(1));return this[a]?r=this[a](s,t):s.walk(t=>{if(void 0!==(r=t.raws[e]))return!1}),void 0===r&&(r=dn[i]),s.rawCache[i]=r,r}rawBeforeClose(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){var i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){var e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(t){var e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return(e=i.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){var e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk(i=>{var r=i.parent;if(r&&r!==t&&r.parent&&r.parent===t&&void 0!==i.raws.before){var n=i.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}}),e);var e}rawSemicolon(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],r=t.raws[e];return r&&r.value===i?r.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},fn=vn;vn.default=vn;var pn=fn;function mn(t,e){new pn(e).stringify(t)}var gn=mn;mn.default=mn;var{isClean:bn,my:yn}=cn,wn=ln,Cn=fn,Sn=gn;function kn(t,e){var i=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&"proxyCache"!==r){var n=t[r],s=typeof n;"parent"===r&&"object"===s?e&&(i[r]=e):"source"===r?i[r]=n:Array.isArray(n)?i[r]=n.map(t=>kn(t,i)):("object"===s&&null!==n&&(n=kn(n)),i[r]=n)}return i}var _n=class{constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[bn]=!1,this[yn]=!0,t)if("nodes"===e)for(var i of(this.nodes=[],t[e]))"function"==typeof i.clone?this.append(i.clone()):this.append(i);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=kn(this);for(var i in t)e[i]=t[i];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e){if(void 0===e&&(e={}),this.source){var{end:i,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:i.column,line:i.line},e)}return new wn(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[bn]){this[bn]=!1;for(var t=this;t=t.parent;)t[bn]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t,e){var i=this.source.start;if(t.index)i=this.positionInside(t.index,e);else if(t.word){var r=(e=this.toString()).indexOf(t.word);-1!==r&&(i=this.positionInside(r,e))}return i}positionInside(t,e){for(var i=e||this.toString(),r=this.source.start.column,n=this.source.start.line,s=0;s<t;s++)"\n"===i[s]?(r=1,n+=1):r+=1;return{column:r,line:n}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){var e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){var r=this.toString(),n=r.indexOf(t.word);-1!==n&&(e=this.positionInside(n,r),i=this.positionInside(n+t.word.length,r))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(i.line<e.line||i.line===e.line&&i.column<=e.column)&&(i={column:e.column+1,line:e.line}),{end:i,start:e}}raw(t,e){return(new Cn).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];for(var s of r)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i={},r=null==e;e=e||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))i[s]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)i[s]=o.toJSON(null,e);else if("source"===s){var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),i[s]={end:o.end,inputId:a,start:o.start}}else i[s]=o}return r&&(i.inputs=[...e.keys()].map(t=>t.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=Sn),t.stringify&&(t=t.stringify);var e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var r={node:this};for(var n in i)r[n]=i[n];return t.warn(e,r)}get proxyOf(){return this}},In=_n;_n.default=_n;var xn=In,An=class extends xn{constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=i({},t,{value:String(t.value)})),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},Mn=An;An.default=An;var Rn={nanoid:function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}},{SourceMapConsumer:On,SourceMapGenerator:En}=on,{existsSync:Tn,readFileSync:Ln}=on,{dirname:Nn,join:Bn}=on;var Fn=class{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,r=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Nn(this.mapFile)),r&&(this.text=r)}}consumer(){return this.consumerCache||(this.consumerCache=new On(this.text)),this.consumerCache}decodeInline(t){var e;if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var i=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/gm);if(e){var i=t.lastIndexOf(e.pop()),r=t.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,r)))}}loadFile(t){if(this.root=Nn(t),Tn(t))return this.mapFile=t,Ln(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof On)return En.fromSourceMap(e).toString();if(e instanceof En)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var r=this.loadFile(i);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return t&&(n=Bn(Nn(t),n)),this.loadFile(n)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Dn=Fn;Fn.default=Fn;var{SourceMapConsumer:jn,SourceMapGenerator:Pn}=on,{fileURLToPath:Un,pathToFileURL:$n}=on,{isAbsolute:zn,resolve:Wn}=on,{nanoid:Gn}=Rn,Zn=on,Vn=ln,Yn=Dn,Jn=Symbol("fromOffsetCache"),Xn=Boolean(jn&&Pn),Kn=Boolean(Wn&&zn),Hn=class{constructor(t,e){if(void 0===e&&(e={}),null==t||"object"==typeof t&&!t.toString)throw new Error("PostCSS received "+t+" instead of CSS string");if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!Kn||/^\w+:\/\//.test(e.from)||zn(e.from)?this.file=e.from:this.file=Wn(e.from)),Kn&&Xn){var i=new Yn(this.css,e);if(i.text){this.map=i;var r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+Gn(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,r){var n,s,o;if(void 0===r&&(r={}),e&&"object"==typeof e){var a=e,h=i;if("number"==typeof a.offset){var u=this.fromOffset(a.offset);e=u.line,i=u.col}else e=a.line,i=a.column;if("number"==typeof h.offset){var l=this.fromOffset(h.offset);s=l.line,o=l.col}else s=h.line,o=h.column}else if(!i){var c=this.fromOffset(e);e=c.line,i=c.col}var d=this.origin(e,i,s,o);return(n=d?new Vn(t,void 0===d.endLine?d.line:{column:d.column,line:d.line},void 0===d.endLine?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new Vn(t,void 0===s?e:{column:i,line:e},void 0===s?i:{column:o,line:s},this.css,this.file,r.plugin)).input={column:i,endColumn:o,endLine:s,line:e,source:this.css},this.file&&($n&&(n.input.url=$n(this.file).toString()),n.input.file=this.file),n}fromOffset(t){var e;if(this[Jn])e=this[Jn];else{var i=this.css.split("\n");e=new Array(i.length);for(var r=0,n=0,s=i.length;n<s;n++)e[n]=r,r+=i[n].length+1;this[Jn]=e}var o=0;if(t>=e[e.length-1])o=e.length-1;else for(var a,h=e.length-2;o<h;)if(t<e[a=o+(h-o>>1)])h=a-1;else{if(!(t>=e[a+1])){o=a;break}o=a+1}return{col:t-e[o]+1,line:o+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Wn(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,r){if(!this.map)return!1;var n,s,o=this.map.consumer(),a=o.originalPositionFor({column:e,line:t});if(!a.source)return!1;"number"==typeof i&&(n=o.originalPositionFor({column:r,line:i})),s=zn(a.source)?$n(a.source):new URL(a.source,this.map.consumer().sourceRoot||$n(this.map.mapFile));var h={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:s.toString()};if("file:"===s.protocol){if(!Un)throw new Error("file: protocol is not available in this PostCSS build");h.file=Un(s)}var u=o.sourceContentFor(a.source);return u&&(h.source=u),h}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=i({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}},qn=Hn;Hn.default=Hn,Zn&&Zn.registerInput&&Zn.registerInput(Hn);var{SourceMapConsumer:Qn,SourceMapGenerator:ts}=on,{dirname:es,relative:is,resolve:rs,sep:ns}=on,{pathToFileURL:ss}=on,os=qn,as=Boolean(Qn&&ts),hs=Boolean(es&&rs&&is&&ns),us=class{constructor(t,e,i,r){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var t of this.previous()){var e=this.toUrl(this.path(t.file)),i=t.root||es(t.file),r=void 0;!1===this.mapOpts.sourcesContent?(r=new Qn(t.text)).sourcesContent&&(r.sourcesContent=null):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),hs&&as&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,e=>{t+=e}),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=ts.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new ts({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 ts({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,i=1,r=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,h)=>{if(this.css+=o,a&&"end"!==h&&(s.generated.line=i,s.generated.column=r-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(t=o.match(/\n/g))?(i+=t.length,e=o.lastIndexOf("\n"),r=o.length-e):r+=o.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=i,s.generated.column=r-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=i,s.generated.column=r-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var i=this.opts.to?es(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=es(rs(i,this.mapOpts.annotation)));var r=is(i,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{var t=new os(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk(e=>{if(e.source){var i=e.source.input.from;if(i&&!t[i]){t[i]=!0;var r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(ss){var i=ss(t).toString();return this.memoizedFileURLs.set(t,i),i}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===ns&&(t=t.replace(/\\/g,"/"));var i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}},ls=In,cs=class extends ls{constructor(t){super(t),this.type="comment"}},ds=cs;cs.default=cs;var vs,fs,ps,ms,{isClean:gs,my:bs}=cn,ys=Mn,ws=ds,Cs=In;function Ss(t){return t.map(t=>(t.nodes&&(t.nodes=Ss(t.nodes)),delete t.source,t))}function ks(t){if(t[gs]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)ks(e)}var _s=class t extends Cs{append(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var r of e){var n=this.normalize(r,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,i,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(e=this.indexes[r],!1!==(i=t(this.proxyOf.nodes[e],e)));)this.indexes[r]+=1;return delete this.indexes[r],i}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return t[e](...r.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t))}:"every"===e||"some"===e?i=>t[e](function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return i(t.toProxy(),...r)}):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,i)=>(t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,r=this.index(t),n=this.normalize(e,this.proxyOf.nodes[r]).reverse();for(var s of(r=this.index(t),n))this.proxyOf.nodes.splice(r+1,0,s);for(var o in this.indexes)r<(i=this.indexes[o])&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(t,e){var i,r=this.index(t),n=0===r&&"prepend",s=this.normalize(e,this.proxyOf.nodes[r],n).reverse();for(var o of(r=this.index(t),s))this.proxyOf.nodes.splice(r,0,o);for(var a in this.indexes)r<=(i=this.indexes[a])&&(this.indexes[a]=i+s.length);return this.markDirty(),this}normalize(e,i){if("string"==typeof e)e=Ss(vs(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var r of e=e.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if("root"===e.type&&"document"!==this.type)for(var n of e=e.nodes.slice(0))n.parent&&n.parent.removeChild(n,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new ys(e)]}else if(e.selector)e=[new fs(e)];else if(e.name)e=[new ps(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new ws(e)]}var s=e.map(e=>(e[bs]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[gs]&&ks(e),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e));return s}prepend(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];for(var r of e=e.reverse()){var n=this.normalize(r,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)(e=this.indexes[i])>=t&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(r=>{e.props&&!e.props.includes(r.prop)||e.fast&&!r.value.includes(e.fast)||(r.value=r.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,i)=>{var r;try{r=t(e,i)}catch(t){throw e.addToError(t)}return!1!==r&&e.walk&&(r=e.walk(t)),r})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("atrule"===i.type&&t.test(i.name))return e(i,r)}):this.walk((i,r)=>{if("atrule"===i.type&&i.name===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("decl"===i.type&&t.test(i.prop))return e(i,r)}):this.walk((i,r)=>{if("decl"===i.type&&i.prop===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,r)=>{if("rule"===i.type&&t.test(i.selector))return e(i,r)}):this.walk((i,r)=>{if("rule"===i.type&&i.selector===t)return e(i,r)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};_s.registerParse=t=>{vs=t},_s.registerRule=t=>{fs=t},_s.registerAtRule=t=>{ps=t},_s.registerRoot=t=>{ms=t};var Is=_s;_s.default=_s,_s.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,ps.prototype):"rule"===t.type?Object.setPrototypeOf(t,fs.prototype):"decl"===t.type?Object.setPrototypeOf(t,ys.prototype):"comment"===t.type?Object.setPrototypeOf(t,ws.prototype):"root"===t.type&&Object.setPrototypeOf(t,ms.prototype),t[bs]=!0,t.nodes&&t.nodes.forEach(t=>{_s.rebuild(t)})};var xs,As,Ms=Is,Rs=class extends Ms{constructor(t){super(i({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t){return void 0===t&&(t={}),new xs(new As,this,t).stringify()}};Rs.registerLazyResult=t=>{xs=t},Rs.registerProcessor=t=>{As=t};var Os=Rs;Rs.default=Rs;var Es={},Ts=function(t){Es[t]||(Es[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))},Ls=class{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var i=e.node.rangeBy(e);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(var r in e)this[r]=e[r]}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}},Ns=Ls;Ls.default=Ls;var Bs=Ns,Fs=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e){void 0===e&&(e={}),e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var i=new Bs(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},Ds=Fs;Fs.default=Fs;var js="'".charCodeAt(0),Ps='"'.charCodeAt(0),Us="\\".charCodeAt(0),$s="/".charCodeAt(0),zs="\n".charCodeAt(0),Ws=" ".charCodeAt(0),Gs="\f".charCodeAt(0),Zs="\t".charCodeAt(0),Vs="\r".charCodeAt(0),Ys="[".charCodeAt(0),Js="]".charCodeAt(0),Xs="(".charCodeAt(0),Ks=")".charCodeAt(0),Hs="{".charCodeAt(0),qs="}".charCodeAt(0),Qs=";".charCodeAt(0),to="*".charCodeAt(0),eo=":".charCodeAt(0),io="@".charCodeAt(0),ro=/[\t\n\f\r "#'()/;[\\\]{}]/g,no=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,so=/.[\r\n"'(/\\]/,oo=/[\da-f]/i,ao=Is,ho=class extends ao{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}},uo=ho;ho.default=ho,ao.registerAtRule(ho);var lo,co,vo=Is,fo=class extends vo{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){var r=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of r)n.raws.before=e.raws.before;return r}removeChild(t,e){var i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t){return void 0===t&&(t={}),new lo(new co,this,t).stringify()}};fo.registerLazyResult=t=>{lo=t},fo.registerProcessor=t=>{co=t};var po=fo;fo.default=fo,vo.registerRoot(fo);var mo={comma:t=>mo.split(t,[","],!0),space:t=>mo.split(t,[" ","\n","\t"]),split(t,e,i){var r=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&r.push(n.trim()),n="",s=!1):n+=l;return(i||""!==n)&&r.push(n.trim()),r}},go=mo;mo.default=mo;var bo=Is,yo=go,wo=class extends bo{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return yo.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}},Co=wo;wo.default=wo,bo.registerRule(wo);var So=Mn,ko=function(t,e){void 0===e&&(e={});var i,r,n,s,o,a,h,u,l,c,d=t.css.valueOf(),v=e.ignoreErrors,f=d.length,p=0,m=[],g=[];function b(e){throw t.error("Unclosed "+e,p)}return{back:function(t){g.push(t)},endOfFile:function(){return 0===g.length&&p>=f},nextToken:function(t){if(g.length)return g.pop();if(!(p>=f)){var e=!!t&&t.ignoreUnclosed;switch(i=d.charCodeAt(p)){case zs:case Ws:case Zs:case Vs:case Gs:r=p;do{r+=1,i=d.charCodeAt(r)}while(i===Ws||i===zs||i===Zs||i===Vs||i===Gs);c=["space",d.slice(p,r)],p=r-1;break;case Ys:case Js:case Hs:case qs:case eo:case Qs:case Ks:var y=String.fromCharCode(i);c=[y,y,p];break;case Xs:if(u=m.length?m.pop()[1]:"",l=d.charCodeAt(p+1),"url"===u&&l!==js&&l!==Ps&&l!==Ws&&l!==zs&&l!==Zs&&l!==Gs&&l!==Vs){r=p;do{if(a=!1,-1===(r=d.indexOf(")",r+1))){if(v||e){r=p;break}b("bracket")}for(h=r;d.charCodeAt(h-1)===Us;)h-=1,a=!a}while(a);c=["brackets",d.slice(p,r+1),p,r],p=r}else r=d.indexOf(")",p+1),s=d.slice(p,r+1),-1===r||so.test(s)?c=["(","(",p]:(c=["brackets",s,p,r],p=r);break;case js:case Ps:n=i===js?"'":'"',r=p;do{if(a=!1,-1===(r=d.indexOf(n,r+1))){if(v||e){r=p+1;break}b("string")}for(h=r;d.charCodeAt(h-1)===Us;)h-=1,a=!a}while(a);c=["string",d.slice(p,r+1),p,r],p=r;break;case io:ro.lastIndex=p+1,ro.test(d),r=0===ro.lastIndex?d.length-1:ro.lastIndex-2,c=["at-word",d.slice(p,r+1),p,r],p=r;break;case Us:for(r=p,o=!0;d.charCodeAt(r+1)===Us;)r+=1,o=!o;if(i=d.charCodeAt(r+1),o&&i!==$s&&i!==Ws&&i!==zs&&i!==Zs&&i!==Vs&&i!==Gs&&(r+=1,oo.test(d.charAt(r)))){for(;oo.test(d.charAt(r+1));)r+=1;d.charCodeAt(r+1)===Ws&&(r+=1)}c=["word",d.slice(p,r+1),p,r],p=r;break;default:i===$s&&d.charCodeAt(p+1)===to?(0===(r=d.indexOf("*/",p+2)+1)&&(v||e?r=d.length:b("comment")),c=["comment",d.slice(p,r+1),p,r],p=r):(no.lastIndex=p+1,no.test(d),r=0===no.lastIndex?d.length-1:no.lastIndex-2,c=["word",d.slice(p,r+1),p,r],m.push(c),p=r)}return p++,c}},position:function(){return p}}},_o=ds,Io=uo,xo=po,Ao=Co,Mo={empty:!0,space:!0};var Ro=class{constructor(t){this.input=t,this.root=new xo,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i,r,n=new Io;n.name=t[1].slice(1),""===n.name&&this.unnamedAtrule(n,t),this.init(n,t[2]);for(var s=!1,o=!1,a=[],h=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?h.push("("===e?")":"]"):"{"===e&&h.length>0?h.push("}"):e===h[h.length-1]&&h.pop(),0===h.length){if(";"===e){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(a.length>0){for(i=a[r=a.length-1];i&&"space"===i[0];)i=a[--r];i&&(n.source.end=this.getPosition(i[3]||i[2]),n.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),s&&(t=a[a.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var i,r=0,n=e-1;n>=0&&("space"===(i=t[n])[0]||2!==(r+=1));n--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){var e,i,r,n=0;for(var[s,o]of t.entries()){if("("===(i=(e=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(r){if("word"===r[0]&&"progid"===r[1])continue;return s}this.doubleColon(e)}r=e}return!1}comment(t){var e=new _o;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))e.text="",e.raws.left=i,e.raws.right="";else{var r=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=ko(this.input)}decl(t,e){var i=new So;this.init(i,t[0][2]);var r,n=t[t.length-1];for(";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var i=t[e],r=i[3]||i[2];if(r)return r}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(r=t.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var o,a=[];t.length&&("space"===(o=t[0][0])||"comment"===o);)a.push(t.shift());this.precheckMissedSemicolon(t);for(var h=t.length-1;h>=0;h--){if("!important"===(r=t[h])[1].toLowerCase()){i.important=!0;var u=this.stringFrom(t,h);" !important"!==(u=this.spacesFromEnd(t)+u)&&(i.raws.important=u);break}if("important"===r[1].toLowerCase()){for(var l=t.slice(0),c="",d=h;d>0;d--){var v=l[d][0];if(0===c.trim().indexOf("!")&&"space"!==v)break;c=l.pop()[1]+c}0===c.trim().indexOf("!")&&(i.important=!0,i.raws.important=c,t=l)}if("space"!==r[0]&&"comment"!==r[0])break}var f=t.some(t=>"space"!==t[0]&&"comment"!==t[0]);f&&(i.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(i,"value",a.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new Ao;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,i=null,r=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(i=h[0],a.push(h),"("===i||"["===i)n||(n=h),s.push("("===i?")":"]");else if(o&&r&&"{"===i)n||(n=h),s.push("}");else if(0===s.length){if(";"===i){if(r)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(r=!0)}else i===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&r){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,r){for(var n,s,o,a,h=i.length,u="",l=!0,c=0;c<h;c+=1)"space"!==(s=(n=i[c])[0])||c!==h-1||r?"comment"===s?(a=i[c-1]?i[c-1][0]:"empty",o=i[c+1]?i[c+1][0]:"empty",Mo[a]||Mo[o]||","===u.slice(-1)?l=!1:u+=n[1]):u+=n[1]:l=!1;if(!l){var d=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:d,value:u}}t[e]=u}rule(t){t.pop();var e=new Ao;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,i="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){for(var e,i="";t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var i="",r=e;r<t.length;r++)i+=t[r][1];return t.splice(e,t.length-e),i}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},Oo=Is,Eo=Ro,To=qn;function Lo(t,e){var i=new To(t,e),r=new Eo(i);try{r.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}var No=Lo;Lo.default=Lo,Oo.registerParse(Lo);var{isClean:Bo,my:Fo}=cn,Do=us,jo=gn,Po=Is,Uo=Os,$o=Ts,zo=Ds,Wo=No,Go=po,Zo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Vo={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Yo={Once:!0,postcssPlugin:!0,prepare:!0};function Jo(t){return"object"==typeof t&&"function"==typeof t.then}function Xo(t){var e=!1,i=Zo[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function Ko(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:Xo(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function Ho(t){return t[Bo]=!1,t.nodes&&t.nodes.forEach(t=>Ho(t)),t}var qo={},Qo=class t{constructor(e,r,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof t||r instanceof zo)s=Ho(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var o=Wo;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{s=o(r,n)}catch(t){this.processed=!0,this.error=t}s&&!s[Fo]&&Po.rebuild(s)}else s=Ho(r);this.result=new zo(e,s,n),this.helpers=i({},qo,{postcss:qo,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?i({},t,t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion&&"production"!==process.env.NODE_ENV){var r=i.postcssPlugin,n=i.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+r+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(var e of this.plugins)if("object"==typeof e)for(var i in e){if(!Vo[i]&&/^[A-Z]/.test(i))throw new Error("Unknown event "+i+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Yo[i])if("object"==typeof e[i])for(var r in e[i])t(e,"*"===r?i:i+"-"+r.toLowerCase(),e[i][r]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e(function*(){t.plugin=0;for(var e=0;e<t.plugins.length;e++){var i=t.plugins[e],r=t.runOnRoot(i);if(Jo(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var n=t.result.root;!n[Bo];){n[Bo]=!0;for(var s=[Ko(n)];s.length>0;){var o=t.visitTick(s);if(Jo(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=u;try{if("document"===n.type){var i=n.nodes.map(i=>e(i,t.helpers));yield Promise.all(i)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[u,l]of t.listeners.OnceExit)yield*h(l)}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return Jo(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=jo;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var i=new Do(e,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(Jo(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[Bo];)e[Bo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||$o("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,r]of t){this.result.lastPlugin=i;var n=void 0;try{n=r(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Jo(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:r}=e;if("root"===i.type||"document"===i.type||i.parent){if(r.length>0&&e.visitorIndex<r.length){var[n,s]=r[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===r.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[Bo])return o[Bo]=!0,void t.push(Ko(o));e.iterator=0,delete i.indexes[a]}for(var h=e.events;e.eventIndex<h.length;){var u=h[e.eventIndex];if(e.eventIndex+=1,0===u)return void(i.nodes&&i.nodes.length&&(i[Bo]=!0,e.iterator=i.getIterator()));if(this.listeners[u])return void(e.visitors=this.listeners[u])}t.pop()}else t.pop()}walkSync(t){t[Bo]=!0;var e=Xo(t);for(var i of e)if(0===i)t.nodes&&t.each(t=>{t[Bo]||this.walkSync(t)});else{var r=this.listeners[i];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Qo.registerPostcss=t=>{qo=t};var ta=Qo;Qo.default=Qo,Go.registerLazyResult(Qo),Uo.registerLazyResult(Qo);var ea=us,ia=gn,ra=Ts,na=No,sa=Ds,oa=class{constructor(t,e,i){var r;e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=i,this._map=void 0;var n=ia;this.result=new sa(this._processor,r,this._opts),this.result.css=e;var s=this;Object.defineProperty(this.result,"root",{get:()=>s.root});var o=new ea(n,r,this._opts,e);if(o.isMap()){var[a,h]=o.generate();a&&(this.result.css=a),h&&(this.result.map=h)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||ra("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;var t,e=na;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}},aa=oa;oa.default=oa;var ha=aa,ua=ta,la=Os,ca=po,da=class{constructor(t){void 0===t&&(t=[]),this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else{if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,e){return void 0===e&&(e={}),this.plugins.length||e.parser||e.stringifier||e.syntax?new ua(this,t,e):new ha(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},va=da;da.default=da,ca.registerProcessor(da),la.registerProcessor(da);var fa=Mn,pa=Dn,ma=ds,ga=uo,ba=qn,ya=po,wa=Co;function Ca(t,e){if(Array.isArray(t))return t.map(t=>Ca(t));var{inputs:n}=t,s=r(t,a);if(n)for(var o of(e=[],n)){var u=i({},o,{__proto__:ba.prototype});u.map&&(u.map=i({},u.map,{__proto__:pa.prototype})),e.push(u)}if(s.nodes&&(s.nodes=t.nodes.map(t=>Ca(t,e))),s.source){var l=s.source,{inputId:c}=l,d=r(l,h);s.source=d,null!=c&&(s.source.input=e[c])}if("root"===s.type)return new ya(s);if("decl"===s.type)return new fa(s);if("rule"===s.type)return new wa(s);if("comment"===s.type)return new ma(s);if("atrule"===s.type)return new ga(s);throw new Error("Unknown node type: "+t.type)}var Sa=Ca;Ca.default=Ca;var ka=ln,_a=Mn,Ia=ta,xa=Is,Aa=va,Ma=gn,Ra=Sa,Oa=Os,Ea=Ns,Ta=ds,La=uo,Na=Ds,Ba=qn,Fa=No,Da=go,ja=Co,Pa=po,Ua=In;function $a(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Aa(e)}$a.plugin=function(t,e){var i,r=!1;function n(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var i=e(...arguments);return i.postcssPlugin=t,i.postcssVersion=(new Aa).version,i}return Object.defineProperty(n,"postcss",{get:()=>(i||(i=n()),i)}),n.process=function(t,e,i){return $a([n(i)]).process(t,e)},n},$a.stringify=Ma,$a.parse=Fa,$a.fromJSON=Ra,$a.list=Da,$a.comment=t=>new Ta(t),$a.atRule=t=>new La(t),$a.decl=t=>new _a(t),$a.rule=t=>new ja(t),$a.root=t=>new Pa(t),$a.document=t=>new Oa(t),$a.CssSyntaxError=ka,$a.Declaration=_a,$a.Container=xa,$a.Processor=Aa,$a.Document=Oa,$a.Comment=Ta,$a.Warning=Ea,$a.AtRule=La,$a.Result=Na,$a.Input=Ba,$a.Rule=ja,$a.Root=Pa,$a.Node=Ua,Ia.registerPostcss($a);var za=$a;$a.default=$a;var Wa=Qr(za);Wa.stringify,Wa.fromJSON,Wa.plugin,Wa.parse,Wa.list,Wa.document,Wa.comment,Wa.atRule,Wa.rule,Wa.decl,Wa.root,Wa.CssSyntaxError,Wa.Declaration,Wa.Container,Wa.Processor,Wa.Document,Wa.Comment,Wa.Warning,Wa.AtRule,Wa.Result,Wa.Input,Wa.Rule,Wa.Root,Wa.Node;class Ga{constructor(){qr(this,"parentElement",null),qr(this,"parentNode",null),qr(this,"ownerDocument"),qr(this,"firstChild",null),qr(this,"lastChild",null),qr(this,"previousSibling",null),qr(this,"nextSibling",null),qr(this,"ELEMENT_NODE",1),qr(this,"TEXT_NODE",3),qr(this,"nodeType"),qr(this,"nodeName"),qr(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Ga))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var Za={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Va={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ya={};function Ja(t){if(Ya[t])return Ya[t];var e=globalThis[t],i=e.prototype,r=t in Za?Za[t]:void 0,n=Boolean(r&&r.every(t=>{var e,r;return Boolean(null==(r=null==(e=Object.getOwnPropertyDescriptor(i,t))?void 0:e.get)?void 0:r.toString().includes("[native code]"))})),s=t in Va?Va[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof i[t]&&(null==(e=i[t])?void 0:e.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return Ya[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?Ya[t]=u:i}catch(t){return i}}var Xa={};function Ka(t,e,i){var r,n=t+"."+String(i);if(Xa[n])return Xa[n].call(e);var s=Ja(t),o=null==(r=Object.getOwnPropertyDescriptor(s,i))?void 0:r.get;return o?(Xa[n]=o,o.call(e)):e[i]}var Ha={};function qa(t,e,i){var r=t+"."+String(i);if(Ha[r])return Ha[r].bind(e);var n=Ja(t)[i];return"function"!=typeof n?e[i]:(Ha[r]=n,n.bind(e))}function Qa(){return Ja("MutationObserver").constructor}function th(t,e,i){try{if(!(e in t))return()=>{};var r=t[e],n=i(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=n,()=>{t[e]=r}}catch(t){return()=>{}}}var eh={ownerDocument:function(t){return Ka("Node",t,"ownerDocument")},childNodes:function(t){return Ka("Node",t,"childNodes")},parentNode:function(t){return Ka("Node",t,"parentNode")},parentElement:function(t){return Ka("Node",t,"parentElement")},textContent:function(t){return Ka("Node",t,"textContent")},contains:function(t,e){return qa("Node",t,"contains")(e)},getRootNode:function(t){return qa("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?Ka("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?Ka("Element",t,"shadowRoot"):null},querySelector:function(t,e){return Ka("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return Ka("Element",t,"querySelectorAll")(e)},mutationObserver:Qa,patch:th};function ih(t,e,i){void 0===i&&(i=document);var r={capture:!0,passive:!0};return i.addEventListener(t,e,r),()=>i.removeEventListener(t,e,r)}var rh="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",nh={map:{},getId:()=>(console.error(rh),-1),getNode:()=>(console.error(rh),null),removeNodeFromMap(){console.error(rh)},has:()=>(console.error(rh),!1),reset(){console.error(rh)}};function sh(t,e,i){void 0===i&&(i={});var r=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];var h=Date.now();n||!1!==i.leading||(n=h);var u=e-(h-n),l=this;u<=0||u>e?(r&&(clearTimeout(r),r=null),n=h,t.apply(l,o)):r||!1===i.trailing||(r=setTimeout(()=>{n=!1===i.leading?0:Date.now(),r=null,t.apply(l,o)},u))}}function oh(t,e,i,r,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,r?i:{set(t){setTimeout(()=>{i.set.call(this,t)},0),s&&s.set&&s.set.call(this,t)}}),()=>oh(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(nh=new Proxy(nh,{get:(t,e,i)=>("map"===e&&console.error(rh),Reflect.get(t,e,i))}));var ah=Date.now;function hh(t){var e,i,r,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=eh.parentElement(s.body))?void 0:e.scrollLeft)||(null==(i=null==s?void 0:s.body)?void 0:i.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(r=eh.parentElement(s.body))?void 0:r.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function uh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function lh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ch(t){return t?t.nodeType===t.ELEMENT_NODE?t:eh.parentElement(t):null}function dh(t,e,i,r){if(!t)return!1;var n=ch(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(r&&null!==n.closest("."+e))return!0}else if(it(n,e,r))return!0}catch(t){}if(i){if(n.matches(i))return!0;if(r&&null!==n.closest(i))return!0}return!1}function vh(t,e,i){return!("TITLE"!==t.tagName||!i.headTitleMutations)||-2===e.getId(t)}function fh(t,e){if(I(t))return!1;var i=e.getId(t);if(!e.has(i))return!0;var r=eh.parentNode(t);return(!r||r.nodeType!==t.DOCUMENT_NODE)&&(!r||fh(r,e))}function ph(t){return Boolean(t.changedTouches)}function mh(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function gh(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function bh(t){return!!t&&(t instanceof Ga&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(eh.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ah=()=>(new Date).getTime());class yh{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i);var i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function wh(t){var e,i=null;return"getRootNode"in t&&(null==(e=eh.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&eh.host(eh.getRootNode(t))&&(i=eh.host(eh.getRootNode(t))),i}function Ch(t){var e=eh.ownerDocument(t);if(!e)return!1;var i=function(t){for(var e,i=t;e=wh(i);)i=e;return i}(t);return eh.contains(e,i)}function Sh(t){var e=eh.ownerDocument(t);return!!e&&(eh.contains(e,t)||Ch(t))}var kh=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(kh||{}),_h=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(_h||{}),Ih=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Ih||{}),xh=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(xh||{}),Ah=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Ah||{}),Mh=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Mh||{}),Rh=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Rh||{});function Oh(t){return"__ln"in t}class Eh{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,i=0;i<t;i++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Oh(t.previousSibling)){var i=t.previousSibling.__ln.next;e.next=i,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,i&&(i.previous=e)}else if(t.nextSibling&&Oh(t.nextSibling)&&t.nextSibling.__ln.previous){var r=t.nextSibling.__ln.previous;e.previous=r,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,r&&(r.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}var Th,Lh=(t,e)=>t+"@"+e;class Nh{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),c(this,"emit",()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,i=new Eh,r=t=>{for(var e=t,i=-2;-2===i;)i=(e=e&&e.nextSibling)&&this.mirror.getId(e);return i},n=n=>{var s=eh.parentNode(n);if(s&&Sh(n)){var o=!1;if(n.nodeType===Node.TEXT_NODE){var a=s.tagName;if("TEXTAREA"===a)return;"STYLE"===a&&this.addedSet.has(s)&&(o=!0)}var h=I(s)?this.mirror.getId(wh(n)):this.mirror.getId(s),u=r(n);if(-1===h||-1===u)return i.addNode(n);var l=at(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{mh(t,this.mirror)&&this.iframeManager.addIframe(t),gh(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),bh(n)&&this.shadowDomManager.addShadowRoot(eh.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},cssCaptured:o});l&&(t.push({parentId:h,nextId:u,node:l}),e.add(l.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)Fh(this.removesSubTreeCache,s,this.mirror)&&!this.movedSet.has(eh.parentNode(s))||n(s);for(var o of this.addedSet)Dh(this.droppedSet,o)||Fh(this.removesSubTreeCache,o,this.mirror)?Dh(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;i.length;){var h=null;if(a){var u=this.mirror.getId(eh.parentNode(a.value)),l=r(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var c=i.tail;c;){var d=c;if(c=c.previous,d){var v=this.mirror.getId(eh.parentNode(d.value));if(-1===r(d.value))continue;if(-1!==v){h=d;break}var f=d.value,p=eh.parentNode(f);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var m=eh.host(p);if(-1!==this.mirror.getId(m)){h=d;break}}}}if(!h){for(;i.head;)i.removeNode(i.head.value);break}a=h.previous,i.removeNode(h.value),n(h.value)}var g={texts:this.texts.map(t=>{var e=t.node,i=eh.parentNode(e);return i&&"TEXTAREA"===i.tagName&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{var{attributes:e}=t;if("string"==typeof e.style){var i=JSON.stringify(t.styleDiff),r=JSON.stringify(t._unchangedStyles);i.length<e.style.length&&(i+r).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(g))}}),c(this,"genTextAreaValueMutation",t=>{var e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(e),this.attributeMap.set(t,e));var i=Array.from(eh.childNodes(t),t=>eh.textContent(t)||"").join("");e.attributes.value=O({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:L(t),value:i,maskInputFn:this.maskInputFn})}),c(this,"processMutation",t=>{if(!vh(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=eh.textContent(t.target);dh(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:rt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,ch(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var i=t.target,r=t.attributeName,n=t.target.getAttribute(r);if("value"===r){var s=L(i);n=O({element:i,maskInputOptions:this.maskInputOptions,tagName:i.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(dh(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===i.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(i.contentDocument)return;r="rr_src"}if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),"type"===r&&"INPUT"===i.tagName&&"password"===(t.oldValue||"").toLowerCase()&&i.setAttribute("data-rr-is-password","true"),!et(i.tagName,r))if(o.attributes[r]=tt(this.doc,E(i.tagName),E(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&a.setAttribute("style",t.oldValue),Array.from(i.style))){var u=i.style.getPropertyValue(h),l=i.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var c of Array.from(a.style))""===i.style.getPropertyValue(c)&&(o.styleDiff[c]=!1)}else"open"===r&&"DIALOG"===i.tagName&&(i.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break;case"childList":if(dh(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{var i=this.mirror.getId(e),r=I(t.target)?this.mirror.getId(eh.host(t.target)):this.mirror.getId(t.target);dh(t.target,this.blockClass,this.blockSelector,!1)||vh(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Bh(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===i||fh(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Lh(i,r)]?Bh(this.movedSet,e):(this.removes.push({parentId:r,id:i,isShadow:!(!I(t.target)||!x(t.target))||void 0}),function(t,e){var i=[t];for(;i.length;){var r=i.pop();e.has(r)||(e.add(r),eh.childNodes(r).forEach(t=>i.push(t)))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))})}}),c(this,"genAdds",(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(vh(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var i=null;e&&this.mirror.hasNode(e)&&(i=this.mirror.getId(e)),i&&-1!==i&&(this.movedMap[Lh(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);dh(t,this.blockClass,this.blockSelector,!1)||(eh.childNodes(t).forEach(t=>this.genAdds(t)),bh(t)&&eh.childNodes(eh.shadowRoot(t)).forEach(e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Bh(t,e){t.delete(e),eh.childNodes(e).forEach(e=>Bh(t,e))}function Fh(t,e,i){return 0!==t.size&&function(t,e){var i=eh.parentNode(e);return!!i&&t.has(i)}(t,e)}function Dh(t,e){return 0!==t.size&&jh(t,e)}function jh(t,e){var i=eh.parentNode(e);return!!i&&(!!t.has(i)||jh(t,i))}var Ph=t=>{if(!Th)return t;return function(){try{return t(...arguments)}catch(t){if(Th&&!0===Th(t))return;throw t}}},Uh=[];function $h(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function zh(t,e){var i=new Nh;Uh.push(i),i.init(t);var r=new(Qa())(Ph(i.processMutations.bind(i)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Wh(t){var{mouseInteractionCb:e,doc:r,mirror:n,blockClass:s,blockSelector:o,sampling:a}=t;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Ih).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t]).forEach(t=>{var a=E(t),h=(t=>r=>{var a=$h(r);if(!dh(a,s,o,!0)){var h=null,u=t;if("pointerType"in r){switch(r.pointerType){case"mouse":h=xh.Mouse;break;case"touch":h=xh.Touch;break;case"pen":h=xh.Pen}h===xh.Touch?Ih[t]===Ih.MouseDown?u="TouchStart":Ih[t]===Ih.MouseUp&&(u="TouchEnd"):xh.Pen}else ph(r)&&(h=xh.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===xh.Touch||u.startsWith("Mouse")&&h===xh.Mouse)&&(h=null)):Ih[t]===Ih.Click&&(h=l,l=null);var c=ph(r)?r.changedTouches[0]:r;if(c){var d=n.getId(a),{clientX:v,clientY:f}=c;Ph(e)(i({type:Ih[u],id:d,x:v,y:f},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Ih[t]){case Ih.MouseDown:case Ih.MouseUp:a=a.replace("mouse","pointer");break;case Ih.TouchStart:case Ih.TouchEnd:return}u.push(ih(a,h,r))}),Ph(()=>{u.forEach(t=>t())})}function Gh(t){var{scrollCb:e,doc:i,mirror:r,blockClass:n,blockSelector:s,sampling:o}=t;return ih("scroll",Ph(sh(Ph(t=>{var o=$h(t);if(o&&!dh(o,n,s,!0)){var a=r.getId(o);if(o===i&&i.defaultView){var h=hh(i.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}}),o.scroll||100)),i)}var Zh=["INPUT","TEXTAREA","SELECT"],Vh=new WeakMap;function Yh(t){return function(t,e){if(Hh("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Hh("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Hh("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Hh("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){var i=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(i)}else if(t.parentStyleSheet){var r=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(r)}return e}(t,[])}function Jh(t,e,i){var r,n;return t?(t.ownerNode?r=e.getId(t.ownerNode):n=i.getId(t),{styleId:n,id:r}):{}}function Xh(t,e){var i,r,n,{mirror:s,stylesheetManager:o}=t,a=null;a="#document"===e.nodeName?s.getId(e):s.getId(eh.host(e));var h="#document"===e.nodeName?null==(i=e.defaultView)?void 0:i.Document:null==(n=null==(r=e.ownerDocument)?void 0:r.defaultView)?void 0:n.ShadowRoot,u=(null==h?void 0:h.prototype)?Object.getOwnPropertyDescriptor(null==h?void 0:h.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&h&&u?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var t;return null==(t=u.get)?void 0:t.call(this)},set(t){var e,i=null==(e=u.set)?void 0:e.call(this,t);if(null!==a&&-1!==a)try{o.adoptStyleSheets(t,a)}catch(t){}return i}}),Ph(()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})})):()=>{}}function Kh(t,e){void 0===e&&(e={});var r,n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){var{mutationCb:i,mousemoveCb:r,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:h,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:c,fontCb:d,selectionCb:v,customElementCb:f}=t;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),i(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),r(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),c(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),d(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),v(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),f(...arguments)}}(t,e),t.recordDOM&&(r=zh(t,t.doc));var s=function(t){var{mousemoveCb:e,sampling:i,doc:r,mirror:n}=t;if(!1===i.mousemove)return()=>{};var s,o="number"==typeof i.mousemove?i.mousemove:50,a="number"==typeof i.mousemoveCallback?i.mousemoveCallback:500,h=[],u=sh(Ph(t=>{var i=Date.now()-s;e(h.map(t=>(t.timeOffset-=i,t)),t),h=[],s=null}),a),l=Ph(sh(Ph(t=>{var e=$h(t),{clientX:i,clientY:r}=ph(t)?t.changedTouches[0]:t;s||(s=ah()),h.push({x:i,y:r,id:n.getId(e),timeOffset:ah()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?_h.Drag:t instanceof MouseEvent?_h.MouseMove:_h.TouchMove)}),o,{trailing:!1})),c=[ih("mousemove",l,r),ih("touchmove",l,r),ih("drag",l,r)];return Ph(()=>{c.forEach(t=>t())})}(t),o=Wh(t),a=Gh(t),h=function(t,e){var{viewportResizeCb:i}=t,{win:r}=e,n=-1,s=-1;return ih("resize",Ph(sh(Ph(()=>{var t=uh(),e=lh();n===t&&s===e||(i({width:Number(e),height:Number(t)}),n=t,s=e)}),200)),r)}(t,{win:n}),u=function(t){var{inputCb:e,doc:r,mirror:n,blockClass:s,blockSelector:o,ignoreClass:a,ignoreSelector:h,maskInputOptions:u,maskInputFn:l,sampling:c,userTriggeredOnInput:d}=t;function v(t){var e=$h(t),i=t.isTrusted,n=e&&e.tagName;if(e&&"OPTION"===n&&(e=eh.parentElement(e)),e&&n&&!(Zh.indexOf(n)<0)&&!dh(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var c=e.value,v=!1,p=L(e)||"";"radio"===p||"checkbox"===p?v=e.checked:(u[n.toLowerCase()]||u[p])&&(c=O({element:e,maskInputOptions:u,tagName:n,type:p,value:c,maskInputFn:l})),f(e,d?{text:c,isChecked:v,userTriggered:i}:{text:c,isChecked:v});var m=e.name;"radio"===p&&m&&v&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach(t=>{if(t!==e){var i=t.value;f(t,d?{text:i,isChecked:!v,userTriggered:!1}:{text:i,isChecked:!v})}})}}function f(t,r){var s=Vh.get(t);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){Vh.set(t,r);var o=n.getId(t);Ph(e)(i({},r,{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map(t=>ih(t,Ph(v),r)),m=r.defaultView;if(!m)return()=>{p.forEach(t=>t())};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...b.map(t=>oh(t[0],t[1],{set(){Ph(v)({target:this,isTrusted:!1})}},!1,m))),Ph(()=>{p.forEach(t=>t())})}(t),l=function(t){var{mediaInteractionCb:e,blockClass:i,blockSelector:r,mirror:n,sampling:s,doc:o}=t,a=Ph(t=>sh(Ph(s=>{var o=$h(s);if(o&&!dh(o,i,r,!0)){var{currentTime:a,volume:h,muted:u,playbackRate:l,loop:c}=o;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:c})}}),s.media||500)),h=[ih("play",a(Mh.Play),o),ih("pause",a(Mh.Pause),o),ih("seeked",a(Mh.Seeked),o),ih("volumechange",a(Mh.VolumeChange),o),ih("ratechange",a(Mh.RateChange),o)];return Ph(()=>{h.forEach(t=>t())})}(t),c=()=>{},d=()=>{},v=()=>{},f=()=>{};t.recordDOM&&(c=function(t,e){var{styleSheetRuleCb:i,mirror:r,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Ph((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=Jh(e,r,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&i({id:h,styleId:u,adds:[{rule:o,index:a}]}),t.apply(e,s)})}),s.CSSStyleSheet.prototype.addRule=function(t,e,i){void 0===i&&(i=this.cssRules.length);var r=t+" { "+e+" }";return s.CSSStyleSheet.prototype.insertRule.apply(this,[r,i])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:Ph((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Jh(e,r,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&i({id:a,styleId:h,removes:[{index:o}]}),t.apply(e,s)})}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:Ph((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Jh(e,r,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&i({id:a,styleId:h,replace:o}),t.apply(e,s)})})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:Ph((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Jh(e,r,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&i({id:a,styleId:h,replaceSync:o}),t.apply(e,s)})}));var l={};qh("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(qh("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),qh("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),qh("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(l).forEach(t=>{var[e,s]=t;c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:Ph((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=Jh(e.parentStyleSheet,r,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&i({id:h,styleId:u,adds:[{rule:o,index:[...Yh(e),a||0]}]}),t.apply(e,s)})}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:Ph((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Jh(e.parentStyleSheet,r,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&i({id:a,styleId:h,removes:[{index:[...Yh(e),o]}]}),t.apply(e,s)})})}),Ph(()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach(t=>{var[e,i]=t;i.prototype.insertRule=c[e].insertRule,i.prototype.deleteRule=c[e].deleteRule})})}(t,{win:n}),d=Xh(t,t.doc),v=function(t,e){var{styleDeclarationCb:i,mirror:r,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:o}=e,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Ph((t,e,o)=>{var h,[u,l,c]=o;if(n.has(u))return a.apply(e,[u,l,c]);var{id:d,styleId:v}=Jh(null==(h=e.parentRule)?void 0:h.parentStyleSheet,r,s.styleMirror);return(d&&-1!==d||v&&-1!==v)&&i({id:d,styleId:v,set:{property:u,value:l,priority:c},index:Yh(e.parentRule)}),t.apply(e,o)})});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:Ph((t,e,o)=>{var a,[u]=o;if(n.has(u))return h.apply(e,[u]);var{id:l,styleId:c}=Jh(null==(a=e.parentRule)?void 0:a.parentStyleSheet,r,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&i({id:l,styleId:c,remove:{property:u},index:Yh(e.parentRule)}),t.apply(e,o)})}),Ph(()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h})}(t,{win:n}),t.collectFonts&&(f=function(t){var{fontCb:e,doc:i}=t,r=i.defaultView;if(!r)return()=>{};var n=[],s=new WeakMap,o=r.FontFace;r.FontFace=function(t,e,i){var r=new o(t,e,i);return s.set(r,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};var a=th(i.fonts,"add",function(t){return function(i){return setTimeout(Ph(()=>{var t=s.get(i);t&&(e(t),s.delete(i))}),0),t.apply(this,[i])}});return n.push(()=>{r.FontFace=o}),n.push(a),Ph(()=>{n.forEach(t=>t())})}(t)));var p=function(t){var{doc:e,mirror:i,blockClass:r,blockSelector:n,selectionCb:s}=t,o=!0,a=Ph(()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;u<h;u++){var l=t.getRangeAt(u),{startContainer:c,startOffset:d,endContainer:v,endOffset:f}=l;dh(c,r,n,!0)||dh(v,r,n,!0)||a.push({start:i.getId(c),startOffset:d,end:i.getId(v),endOffset:f})}s({ranges:a})}});return a(),ih("selectionchange",a)}(t),m=function(t){var{doc:e,customElementCb:i}=t,r=e.defaultView;return r&&r.customElements?th(r.customElements,"define",function(t){return function(e,r,n){try{i({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return t.apply(this,[e,r,n])}}):()=>{}}(t),g=[];for(var b of t.plugins)g.push(b.observer(b.callback,n,b.options));return Ph(()=>{Uh.forEach(t=>t.reset()),null==r||r.disconnect(),s(),o(),a(),h(),u(),l(),c(),d(),v(),f(),p(),m(),g.forEach(t=>t())})}function Hh(t){return void 0!==window[t]}function qh(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Qh{constructor(t){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,r){var n=i||this.getIdToRemoteIdMap(t),s=r||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var i=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,i,r))}getRemoteId(t,e,i){var r=i||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;var n=r.get(e);return n||-1}getRemoteIds(t,e){var i=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,i))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class tu{constructor(t){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new Qh(Y)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Qh(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var i,r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(i=t.contentWindow)||i.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var i=this.crossOriginIframeMap.get(t.source);if(i){var r=this.transformCrossOriginEvent(i,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var i;switch(e.type){case kh.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var r=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(e.data.node,r),{timestamp:e.timestamp,type:kh.IncrementalSnapshot,data:{source:_h.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case kh.Meta:case kh.Load:case kh.DomContentLoaded:return!1;case kh.Plugin:return e;case kh.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case kh.IncrementalSnapshot:switch(e.data.source){case _h.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(e.node,i)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case _h.Drag:case _h.TouchMove:case _h.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case _h.ViewportResize:return!1;case _h.MediaInteraction:case _h.MouseInteraction:case _h.Scroll:case _h.CanvasMutation:case _h.Input:return this.replaceIds(e.data,t,["id"]),e;case _h.StyleSheetRule:case _h.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case _h.Font:return e;case _h.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case _h.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(i=e.data.styles)||i.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,i,r){for(var n of r)(Array.isArray(e[n])||"number"==typeof e[n])&&(Array.isArray(e[n])?e[n]=t.getIds(i,e[n]):e[n]=t.getId(i,e[n]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Rh.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class eu{constructor(t){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(x(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var r=zh(i({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Gh(i({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(eh.host(t))),this.restoreHandlers.push(Xh({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var i=this;this.restoreHandlers.push(th(t.prototype,"attachShadow",function(t){return function(r){var n=t.call(this,r),s=eh.shadowRoot(this);return s&&Sh(this)&&i.addShadowRoot(s,e),n}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var iu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ru="undefined"==typeof Uint8Array?[]:new Uint8Array(256),nu=0;nu<64;nu++)ru[iu.charCodeAt(nu)]=nu;var su=new Map;var ou=(t,e,i)=>{if(t&&(uu(t,e)||"object"==typeof t)){var r=function(t,e){var i=su.get(t);return i||(i=new Map,su.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(i,t.constructor.name),n=r.indexOf(t);return-1===n&&(n=r.length,r.push(t)),n}};function au(t,e,i){if(t instanceof Array)return t.map(t=>au(t,e,i));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,i=new Uint8Array(t),r=i.length,n="";for(e=0;e<r;e+=3)n+=iu[i[e]>>2],n+=iu[(3&i[e])<<4|i[e+1]>>4],n+=iu[(15&i[e+1])<<2|i[e+2]>>6],n+=iu[63&i[e+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[au(t.buffer,e,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var r=t.constructor.name,{src:n}=t;return{rr_type:r,src:n}}if(t instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:t.toDataURL()}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[au(t.data,e,i),t.width,t.height]}:uu(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:ou(t,e,i)}:t}var hu=(t,e,i)=>t.map(t=>au(t,e,i)),uu=(t,e)=>{var i=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(i.find(i=>t instanceof e[i]))};function lu(t,e,i,r){var n=[];try{var s=th(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];if(!dh(this,e,i,!0)){var h=function(t){return"experimental-webgl"===t?"webgl":t}(n);if("__context"in this||(this.__context=h),r&&["webgl","webgl2"].includes(h))if(o[0]&&"object"==typeof o[0]){var u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[n,...o])}});n.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(t=>t())}}function cu(t,e,i,r,n,s){var o=[],a=Object.getOwnPropertyNames(t),h=function(a){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return 0;try{if("function"!=typeof t[a])return 0;var h=th(t,a,function(t){return function(){for(var o=arguments.length,h=new Array(o),u=0;u<o;u++)h[u]=arguments[u];var l=t.apply(this,h);if(ou(l,s,this),"tagName"in this.canvas&&!dh(this.canvas,r,n,!0)){var c=hu(h,s,this),d={type:e,property:a,args:c};i(this.canvas,d)}return l}});o.push(h)}catch(r){var u=oh(t,a,{set(t){i(this.canvas,{type:e,property:a,args:[t],setter:!0})}});o.push(u)}};for(var u of a)h(u);return o}var du,vu,fu,pu,mu="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",gu="undefined"!=typeof window&&window.Blob&&new Blob([(du=mu,Uint8Array.from(atob(du),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function bu(t){var e;try{if(!(e=gu&&(window.URL||window.webkitURL).createObjectURL(gu)))throw"";var i=new Worker(e,{name:null==t?void 0:t.name});return i.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),i}catch(e){return new Worker("data:text/javascript;base64,"+mu,{name:null==t?void 0:t.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class yu{constructor(t){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"processMutation",(t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});var{sampling:e="all",win:i,blockClass:r,blockSelector:n,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(i,r,n),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,i,r,n,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,i,r,n,s){var o=this,a=lu(i,r,n,!0),h=new Map,u=new bu;u.onmessage=t=>{var{id:e}=t.data;if(h.set(e,!1),"base64"in t.data){var{base64:i,type:r,width:n,height:s}=t.data;this.mutationCb({id:e,type:Ah["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:r}]},0,0]}]})}};var l,c=1e3/t,d=0,v=t=>{var a;d&&t-d<c?l=requestAnimationFrame(v):(d=t,(a=[],i.document.querySelectorAll("canvas").forEach(t=>{dh(t,r,n,!0)||a.push(t)}),a).forEach(function(){var t=e(function*(t){var e,i=o.mirror.getId(t);if(!h.get(i)&&0!==t.width&&0!==t.height){if(h.set(i,!0),["webgl","webgl2"].includes(t.__context)){var r=t.getContext(t.__context);!1===(null==(e=null==r?void 0:r.getContextAttributes())?void 0:e.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}var n=yield createImageBitmap(t);u.postMessage({id:i,bitmap:n,width:t.width,height:t.height,dataURLOptions:s.dataURLOptions},[n])}});return function(e){return t.apply(this,arguments)}}()),l=requestAnimationFrame(v))};l=requestAnimationFrame(v),this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,e,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=lu(t,e,i,!1),n=function(t,e,i,r){var n=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),o=function(s){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[s])return 1;var o=th(e.CanvasRenderingContext2D.prototype,s,function(n){return function(){for(var o=arguments.length,a=new Array(o),h=0;h<o;h++)a[h]=arguments[h];return dh(this.canvas,i,r,!0)||setTimeout(()=>{var i=hu(a,e,this);t(this.canvas,{type:Ah["2D"],property:s,args:i})},0),n.apply(this,a)}});n.push(o)}catch(i){var a=oh(e.CanvasRenderingContext2D.prototype,s,{set(e){t(this.canvas,{type:Ah["2D"],property:s,args:[e],setter:!0})}});n.push(a)}};for(var a of s)o(a);return()=>{n.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i),s=function(t,e,i,r){var n=[];return n.push(...cu(e.WebGLRenderingContext.prototype,Ah.WebGL,t,i,r,e)),void 0!==e.WebGL2RenderingContext&&n.push(...cu(e.WebGL2RenderingContext.prototype,Ah.WebGL2,t,i,r,e)),()=>{n.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i);this.resetObservers=()=>{r(),n(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{var i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var i=this.pendingCanvasMutations.get(t);if(i&&-1!==e){var n=i.map(t=>r(t,u)),{type:s}=i[0];this.mutationCb({id:e,type:s,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class wu{constructor(t){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new yh),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var i=this;if(0!==t.length){var r={id:e,styleIds:[]},n=[],s=function(t){var e;i.styleMirror.has(t)?e=i.styleMirror.getId(t):(e=i.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,i)=>({rule:M(e,t.href),index:i}))})),r.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Cu{constructor(){c(this,"nodeMap",new WeakMap),c(this,"active",!1)}inOtherBuffer(t,e){var i=this.nodeMap.get(t);return i&&Array.from(i).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var Su=!1;try{if(2!==Array.from([1],t=>2*t)[0]){var ku=document.createElement("iframe");document.body.appendChild(ku),Array.from=(null==(n=ku.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(ku)}}catch(t){console.debug("Unable to override Array.from",t)}var _u,Iu,xu=new R;function Au(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:d,maskInputOptions:v,slimDOMOptions:f,maskInputFn:p,maskTextFn:m,hooks:g,packFn:b,sampling:y={},dataURLOptions:w={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:k=!1,recordCrossOriginIframes:_=!1,recordAfter:I=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:A=!1,inlineImages:M=!1,plugins:O,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:T=new Set([]),errorHandler:L}=t;Th=L;var N=!_||window.parent===window,B=!1;if(!N)try{window.parent.document&&(B=!1)}catch(t){B=!0}if(N&&!e)throw new Error("emit function is required");if(!N&&!B)return()=>{};void 0!==C&&void 0===y.mousemove&&(y.mousemove=C),xu.reset();var F,D=!0===d?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==v?v:{password:!0},j=ot(f);!function(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var P=0,U=t=>{for(var e of O||[])e.eventProcessor&&(t=e.eventProcessor(t));return b&&!B&&(t=b(t)),t};vu=(t,i)=>{var s,o=t;if(o.timestamp=ah(),!(null==(s=Uh[0])?void 0:s.isFrozen())||o.type===kh.FullSnapshot||o.type===kh.IncrementalSnapshot&&o.data.source===_h.Mutation||Uh.forEach(t=>t.unfreeze()),N)null==e||e(U(o),i);else if(B){var a={type:"rrweb",event:U(o),origin:window.location.origin,isCheckout:i};window.parent.postMessage(a,"*")}if(o.type===kh.FullSnapshot)F=o,P=0;else if(o.type===kh.IncrementalSnapshot){if(o.data.source===_h.Mutation&&o.data.isAttachIframe)return;P++;var h=n&&P>=n,u=r&&o.timestamp-F.timestamp>r;(h||u)&&fu(!0)}};var z=t=>{vu({type:kh.IncrementalSnapshot,data:i({source:_h.Mutation},t)})},W=t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.Scroll},t)}),G=t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.CanvasMutation},t)}),Z=new wu({mutationCb:z,adoptedStyleSheetCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.AdoptedStyleSheet},t)})}),V=new tu({mirror:xu,mutationCb:z,stylesheetManager:Z,recordCrossOriginIframes:_,wrappedEmit:vu});for(var Y of O||[])Y.getMirror&&Y.getMirror({nodeMirror:xu,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});var J=new Cu;pu=new yu({recordCanvas:k,mutationCb:G,win:window,blockClass:s,blockSelector:o,mirror:xu,sampling:y.canvas,dataURLOptions:w});var X=new eu({mutationCb:z,scrollCb:W,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:D,dataURLOptions:w,maskTextFn:m,maskInputFn:p,recordCanvas:k,inlineImages:M,sampling:y,slimDOMOptions:j,iframeManager:V,stylesheetManager:Z,canvasManager:pu,keepIframeSrcFn:E,processedNodeManager:J},mirror:xu});fu=function(t){if(void 0===t&&(t=!1),S){vu({type:kh.Meta,data:{href:window.location.href,width:lh(),height:uh()}},t),Z.reset(),X.init(),Uh.forEach(t=>t.lock());var e=function(t,e){var{mirror:i=new R,blockClass:r="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:h=!1,recordCanvas:u=!1,maskAllInputs:l=!1,maskTextFn:c,maskInputFn:d,slimDOM:v=!1,dataURLOptions:f,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:w,keepIframeSrcFn:C=()=>!1}=e||{};return at(t,{doc:t,mirror:i,blockClass:r,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===l?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===l?{password:!0}:l,maskTextFn:c,maskInputFn:d,slimDOMOptions:ot(v),dataURLOptions:f,inlineImages:h,recordCanvas:u,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:w,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:xu,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:D,maskTextFn:m,maskInputFn:p,slimDOM:j,dataURLOptions:w,recordCanvas:k,inlineImages:M,onSerialize:t=>{mh(t,xu)&&V.addIframe(t),gh(t,xu)&&Z.trackLinkElement(t),bh(t)&&X.addShadowRoot(eh.shadowRoot(t),document)},onIframeLoad:(t,e)=>{V.attachIframe(t,e),X.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{Z.attachLinkElement(t,e)},keepIframeSrcFn:E});if(!e)return console.warn("Failed to snapshot the document");vu({type:kh.FullSnapshot,data:{node:e,initialOffset:hh(window)}},t),Uh.forEach(t=>t.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,xu.getId(document))}};try{var K=[],H=t=>{var e;return Ph(Kh)({mutationCb:z,mousemoveCb:(t,e)=>vu({type:kh.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.MouseInteraction},t)}),scrollCb:W,viewportResizeCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.ViewportResize},t)}),inputCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.Input},t)}),mediaInteractionCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.MediaInteraction},t)}),styleSheetRuleCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.StyleSheetRule},t)}),styleDeclarationCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.StyleDeclaration},t)}),canvasMutationCb:G,fontCb:t=>vu({type:kh.IncrementalSnapshot,data:i({source:_h.Font},t)}),selectionCb:t=>{vu({type:kh.IncrementalSnapshot,data:i({source:_h.Selection},t)})},customElementCb:t=>{vu({type:kh.IncrementalSnapshot,data:i({source:_h.CustomElement},t)})},blockClass:s,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:l,maskInputOptions:D,inlineStylesheet:c,sampling:y,recordDOM:S,recordCanvas:k,inlineImages:M,userTriggeredOnInput:x,collectFonts:A,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:E,blockSelector:o,slimDOMOptions:j,dataURLOptions:w,mirror:xu,iframeManager:V,stylesheetManager:Z,shadowDomManager:X,processedNodeManager:J,canvasManager:pu,ignoreCSSAttributes:T,plugins:(null==(e=null==O?void 0:O.filter(t=>t.observer))?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>vu({type:kh.Plugin,data:{plugin:t.name,payload:e}})})))||[]},g)};V.addLoadListener(t=>{try{K.push(H(t.contentDocument))}catch(t){console.warn(t)}});var q=()=>{fu(),K.push(H(document)),Su=!0};return["interactive","complete"].includes(document.readyState)?q():(K.push(ih("DOMContentLoaded",()=>{vu({type:kh.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&q()})),K.push(ih("load",()=>{vu({type:kh.Load,data:{}}),"load"===I&&q()},window))),()=>{K.forEach(t=>{try{t()}catch(t){String(t).toLowerCase().includes("cross-origin")||console.warn(t)}}),J.destroy(),Su=!1,Th=void 0}}catch(t){console.warn(t)}}Au.addCustomEvent=(t,e)=>{if(!Su)throw new Error("please add custom event after start recording");vu({type:kh.Custom,data:{tag:t,payload:e}})},Au.freezePage=()=>{Uh.forEach(t=>t.freeze())},Au.takeFullSnapshot=t=>{if(!Su)throw new Error("please take full snapshot after start recording");fu(t)},Au.mirror=xu,(Iu=_u||(_u={}))[Iu.NotStarted=0]="NotStarted",Iu[Iu.Running=1]="Running",Iu[Iu.Stopped=2]="Stopped";var Mu=Object.defineProperty,Ru=(t,e,i)=>((t,e,i)=>e in t?Mu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i);class Ou{constructor(t){Ru(this,"fileName"),Ru(this,"functionName"),Ru(this,"lineNumber"),Ru(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){var t=this.lineNumber||"",e=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+t+":"+e+")":this.fileName+":"+t+":"+e}}var Eu=/(^|@)\S+:\d+/,Tu=/^\s*at .*(\S+:\d+|\(native\))/m,Lu=/^(eval@)?(\[native code])?$/,Nu={parse:function(t){return t?void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(Tu)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):(console.warn("[console-record-plugin]: Failed to parse error object:",t),[]):[]},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));if(!e)throw new Error("Cannot parse given url: "+t);return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter(function(t){return!!t.match(Tu)},this).map(function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var e=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),i=e.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(e=i?e.replace(i[0],""):e).split(/\s+/).slice(1),n=this.extractLocation(i?i[1]:r.pop()),s=r.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Ou({functionName:s,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(t){return!t.match(Lu)},this).map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new Ou({functionName:t});var e=/((.*".+"[^@]*)?[^@]*)(?:@)/,i=t.match(e),r=i&&i[1]?i[1]:void 0,n=this.extractLocation(t.replace(e,""));return new Ou({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,i=t.message.split("\n"),r=[],n=2,s=i.length;n<s;n+=2){var o=e.exec(i[n]);o&&r.push(new Ou({fileName:o[2],lineNumber:parseFloat(o[1])}))}return r},parseOpera10:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,i=t.stacktrace.split("\n"),r=[],n=0,s=i.length;n<s;n+=2){var o=e.exec(i[n]);o&&r.push(new Ou({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return r},parseOpera11:function(t){return t.stack.split("\n").filter(function(t){return!!t.match(Eu)&&!t.match(/^Error created at/)},this).map(function(t){var e=t.split("@"),i=this.extractLocation(e.pop()),r=(e.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Ou({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)}};function Bu(t){if(!t||!t.outerHTML)return"";for(var e="";t.parentElement;){var i=t.localName;if(!i)break;i=i.toLowerCase();var r=t.parentElement,n=[];if(r.children&&r.children.length>0)for(var s=0;s<r.children.length;s++){var o=r.children[s];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===i&&n.push(o)}n.length>1&&(i+=":eq("+n.indexOf(t)+")"),e=i+(e?">"+e:""),t=r}return e}function Fu(t){return"[object Object]"===Object.prototype.toString.call(t)}function Du(t,e){if(0===e)return!0;var i=Object.keys(t);for(var r of i)if(Fu(t[r])&&Du(t[r],e-1))return!0;return!1}function ju(t,e){var i={numOfKeysLimit:50,depthOfLimit:4};Object.assign(i,e);var r=[],n=[];return JSON.stringify(t,function(t,e){if(r.length>0){var s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?n.splice(s,1/0,t):n.push(t),~r.indexOf(e)&&(e=r[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(e)).join(".")+"]")}else r.push(e);if(null===e)return e;if(void 0===e)return"undefined";if(function(t){if(Fu(t)&&Object.keys(t).length>i.numOfKeysLimit)return!0;if("function"==typeof t)return!0;if(Fu(t)&&Du(t,i.depthOfLimit))return!0;return!1}(e))return function(t){var e=t.toString();i.stringLengthLimit&&e.length>i.stringLengthLimit&&(e=e.slice(0,i.stringLengthLimit)+"...");return e}(e);if("bigint"==typeof e)return e.toString()+"n";if(e instanceof Event){var o={};for(var a in e){var h=e[a];Array.isArray(h)?o[a]=Bu(h.length?h[0]:null):o[a]=h}return o}return e instanceof Node?e instanceof HTMLElement?e?e.outerHTML:"":e.nodeName:e instanceof Error?e.stack?e.stack+"\nEnd of stack for Error object":e.name+": "+e.message:e})}var Pu={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Uu(t,e,i){var r,n=i?Object.assign({},Pu,i):Pu,s=n.logger;if(!s)return()=>{};r="string"==typeof s?e[s]:s;var o=0,a=!1,h=[];if(n.level.includes("error")){var u=e=>{var i=e.message,r=e.error,s=Nu.parse(r).map(t=>t.toString()),o=[ju(i,n.stringifyOptions)];t({level:"error",trace:s,payload:o})};e.addEventListener("error",u),h.push(()=>{e.removeEventListener("error",u)});var l=e=>{var i,r;e.reason instanceof Error?r=[ju("Uncaught (in promise) "+(i=e.reason).name+": "+i.message,n.stringifyOptions)]:(i=new Error,r=[ju("Uncaught (in promise)",n.stringifyOptions),ju(e.reason,n.stringifyOptions)]);var s=Nu.parse(i).map(t=>t.toString());t({level:"error",trace:s,payload:r})};e.addEventListener("unhandledrejection",l),h.push(()=>{e.removeEventListener("unhandledrejection",l)})}for(var c of n.level)h.push(d(r,c));return()=>{h.forEach(t=>t())};function d(e,i){var r=this;return e[i]?function(t,e,i){try{if(!(e in t))return()=>{};var r=t[e],n=i(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=n,()=>{t[e]=r}}catch(t){return()=>{}}}(e,i,e=>function(){for(var s=arguments.length,h=new Array(s),u=0;u<s;u++)h[u]=arguments[u];if(e.apply(r,h),!("assert"===i&&h[0]||a)){a=!0;try{var l=Nu.parse(new Error).map(t=>t.toString()).splice(1),c=("assert"===i?h.slice(1):h).map(t=>ju(t,n.stringifyOptions));++o<n.lengthThreshold?t({level:i,trace:l,payload:c}):o===n.lengthThreshold&&t({level:"warn",trace:[],payload:[ju("The number of log records reached the threshold.")]})}catch(t){e("rrweb logger error:",t,...h)}finally{a=!1}}}):()=>{}}}var $u="undefined"!=typeof window?window:void 0,zu="undefined"!=typeof globalThis?globalThis:$u,Wu=null==zu?void 0:zu.navigator,Gu=null==zu?void 0:zu.document,Zu=null==zu?void 0:zu.location,Vu=null==zu?void 0:zu.fetch;$u&&Gu&&Gu.createElement,null==zu||zu.XMLHttpRequest,null==zu||zu.AbortController;var Yu=null==Wu?void 0:Wu.userAgent,Ju=null!=$u?$u:{},Xu=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Xu||{}),Ku=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Ku||{});function Hu(t){return"string"==typeof t}function qu(t){return void 0===t}function Qu(t){return null==t}function tl(t){return Array.isArray(t)}function el(t){return"function"==typeof t}var il={none:0,error:1,warn:2,info:3,debug:4},rl="[vTilt]",nl=new Set(["none","error","warn","info","debug"]);function sl(){return"undefined"!=typeof console}function ol(t){var e=t.length>0&&"string"==typeof t[0]?t[0]:"",i=e?t.slice(1):t;return[e?rl+":"+e:rl,...i]}var al="warn",hl=!1;var ul=null;function ll(){return ul||(ul={setLevel(t,e){void 0===e&&(e=!1),al=t,e&&(hl=!0)},setLevelFromRemote(t){hl||t&&nl.has(t)&&(al=t)},getLevel:()=>al,isLockedByInit:()=>hl,debug(){if(!(il[al]<il.debug)&&sl()){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];console.log(...ol(e))}},info(){if(!(il[al]<il.info)&&sl()){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];console.log(...ol(e))}},warn(){if(!(il[al]<il.warn)&&sl()){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];console.warn(...ol(e))}},error(){if(!(il[al]<il.error)&&sl()){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];console.error(...ol(e))}}}),ul}function cl(t,e){void 0===e&&(e=!0);var i=void 0!==t.log_level||!!t.debug,r=function(t){return t.log_level&&nl.has(t.log_level)?t.log_level:t.debug?"debug":"warn"}(t);return ll().setLevel(r,e&&i),r}function dl(t,e){try{return t()}catch(t){return e}}var vl="x-api-key";function fl(t,e,i){void 0===i&&(i={});var{api_host:r,token:n}=t,s=""+(r?r.replace(/\/+$/gm,""):"")+e;if(i.includeTokenQuery&&n){var o=s.includes("?")?"&":"?";s=""+s+o+"token="+n}return s}function pl(t){return t.token?{[vl]:t.token}:{}}class ml{constructor(){this.o=new Map,this.m=new Map}on(t,e){return this.o.has(t)||this.o.set(t,new Set),this.o.get(t).add(e),()=>{var i;null===(i=this.o.get(t))||void 0===i||i.delete(e)}}once(t,e){return this.m.has(t)||this.m.set(t,new Set),this.m.get(t).add(e),()=>{var i;null===(i=this.m.get(t))||void 0===i||i.delete(e)}}emit(t,e){var i,r;null===(i=this.o.get(t))||void 0===i||i.forEach(i=>{try{i(e)}catch(e){ll().error("emitter",'error in event listener for "'+t+'":',e)}});var n=this.m.get(t);n&&(n.forEach(i=>{try{i(e)}catch(e){ll().error("emitter",'error in once listener for "'+t+'":',e)}}),this.m.delete(t)),null===(r=this.o.get("*"))||void 0===r||r.forEach(i=>{try{i({event:t,payload:e})}catch(t){ll().error("emitter","error in wildcard listener:",t)}})}off(t){t?(this.o.delete(t),this.m.delete(t)):(this.o.clear(),this.m.clear())}listenerCount(t){var e,i,r,n;return(null!==(i=null===(e=this.o.get(t))||void 0===e?void 0:e.size)&&void 0!==i?i:0)+(null!==(n=null===(r=this.m.get(t))||void 0===r?void 0:r.size)&&void 0!==n?n:0)}hasListeners(t){return this.listenerCount(t)>0}}var gl="sdk:initialized",bl="sdk:config_updated",yl="sdk:remote_config_loaded",wl="consent:updated",Cl="event:captured",Sl="recording:started",kl="recording:stopped",_l=0,Il=!1,xl=!1;function Al(t){(_l+=1)<2||(Il=!0,xl||(xl=!0,ll().warn(t,"vTilt network requests are being cancelled before reaching the server (likely an ad blocker, privacy extension, or DNS-level filter). Further retries and snapshots have been suspended for this page. Route SDK traffic through your own domain to avoid this — see https://www.vtilt.com/docs/browser/reverse-proxy.")))}function Ml(){_l=0}function Rl(){return Il}var Ol="23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function El(t){for(var e=(2<<31-Math.clz32(57))-1,i=Math.ceil(1.6*e*t/57),r="";r.length<t;)for(var n=crypto.getRandomValues(new Uint8Array(i)),s=0;s<i&&r.length<t;s++){var o=n[s]&e;o<57&&(r+=Ol[o])}return r}var Tl=1048576;function Ll(t,e,i){if(t)if(Array.isArray(t))t.forEach((t,r)=>{e.call(i,t,r)});else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(i,t[r],r)}function Nl(t,e,i,r){var{capture:n=!1,passive:s=!0}=null!=r?r:{};null==t||t.addEventListener(e,i,{capture:n,passive:s})}function Bl(t,e){if(!e)return t;for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function Fl(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];for(var n of i)for(var s of n)t.push(s);return t}function Dl(t){var e={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];null!=r&&""!==r&&(e[i]=r)}return e}var jl=[".sr-only",".visually-hidden",".w-condition-invisible",'[class*="w-condition-invisible"]','[class*="condition-invisible"]','input[type="hidden"]'].join(", ");function Pl(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];var n=function(){for(var t=new Set,e=[],i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];for(var s of r)if(s)for(var o of s.split(",")){var a=o.trim();a&&!t.has(a)&&(t.add(a),e.push(a))}return e}(...t?[]:[jl],...i);return n.length>0?n.join(", "):void 0}var Ul=[Ku.MouseMove,Ku.MouseInteraction,Ku.Scroll,Ku.ViewportResize,Ku.Input,Ku.TouchMove,Ku.MediaInteraction,Ku.Drag];function $l(t){try{return new Blob([JSON.stringify(t)]).size}catch(e){return 2*JSON.stringify(t).length}}function zl(t,e){if(void 0===e&&(e=6606028.8),t.size>=e&&t.data.length>1){var i=Math.floor(t.data.length/2),r=t.data.slice(0,i),n=t.data.slice(i);return[...zl({size:$l(r),data:r,sessionId:t.sessionId,windowId:t.windowId}),...zl({size:$l(n),data:n,sessionId:t.sessionId,windowId:t.windowId})]}return[t]}function Wl(t){return t.type===Xu.Custom&&"sessionIdle"===t.data.tag}function Gl(t){return 3===t.type&&Ul.includes(t.data.source)}function Zl(t,e,i,r,n){return t<e||t>i?(ll().warn("replay",r+" must be between "+e+" and "+i+". Using default: "+n),n):t}var Vl=Uint8Array,Yl=Uint16Array,Jl=Int32Array,Xl=new Vl([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Kl=new Vl([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Hl=new Vl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ql=function(t,e){for(var i=new Yl(31),r=0;r<31;++r)i[r]=e+=1<<t[r-1];var n=new Jl(i[30]);for(r=1;r<30;++r)for(var s=i[r];s<i[r+1];++s)n[s]=s-i[r]<<5|r;return{b:i,r:n}},Ql=ql(Xl,2),tc=Ql.b,ec=Ql.r;tc[28]=258,ec[258]=28;for(var ic=ql(Kl,0).r,rc=new Yl(32768),nc=0;nc<32768;++nc){var sc=(43690&nc)>>1|(21845&nc)<<1;sc=(61680&(sc=(52428&sc)>>2|(13107&sc)<<2))>>4|(3855&sc)<<4,rc[nc]=((65280&sc)>>8|(255&sc)<<8)>>1}var oc=function(t,e,i){for(var r=t.length,n=0,s=new Yl(e);n<r;++n)t[n]&&++s[t[n]-1];var o,a=new Yl(e);for(n=1;n<e;++n)a[n]=a[n-1]+s[n-1]<<1;if(i){o=new Yl(1<<e);var h=15-e;for(n=0;n<r;++n)if(t[n])for(var u=n<<4|t[n],l=e-t[n],c=a[t[n]-1]++<<l,d=c|(1<<l)-1;c<=d;++c)o[rc[c]>>h]=u}else for(o=new Yl(r),n=0;n<r;++n)t[n]&&(o[n]=rc[a[t[n]-1]++]>>15-t[n]);return o},ac=new Vl(288);for(nc=0;nc<144;++nc)ac[nc]=8;for(nc=144;nc<256;++nc)ac[nc]=9;for(nc=256;nc<280;++nc)ac[nc]=7;for(nc=280;nc<288;++nc)ac[nc]=8;var hc=new Vl(32);for(nc=0;nc<32;++nc)hc[nc]=5;var uc=oc(ac,9,0),lc=oc(hc,5,0),cc=function(t){return(t+7)/8|0},dc=function(t,e,i){return(null==i||i>t.length)&&(i=t.length),new Vl(t.subarray(e,i))},vc=function(t,e,i){i<<=7&e;var r=e/8|0;t[r]|=i,t[r+1]|=i>>8},fc=function(t,e,i){i<<=7&e;var r=e/8|0;t[r]|=i,t[r+1]|=i>>8,t[r+2]|=i>>16},pc=function(t,e){for(var i=[],r=0;r<t.length;++r)t[r]&&i.push({s:r,f:t[r]});var n=i.length,s=i.slice();if(!n)return{t:Sc,l:0};if(1==n){var o=new Vl(i[0].s+1);return o[i[0].s]=1,{t:o,l:1}}i.sort(function(t,e){return t.f-e.f}),i.push({s:-1,f:25001});var a=i[0],h=i[1],u=0,l=1,c=2;for(i[0]={s:-1,f:a.f+h.f,l:a,r:h};l!=n-1;)a=i[i[u].f<i[c].f?u++:c++],h=i[u!=l&&i[u].f<i[c].f?u++:c++],i[l++]={s:-1,f:a.f+h.f,l:a,r:h};var d=s[0].s;for(r=1;r<n;++r)s[r].s>d&&(d=s[r].s);var v=new Yl(d+1),f=mc(i[l-1],v,0);if(f>e){r=0;var p=0,m=f-e,g=1<<m;for(s.sort(function(t,e){return v[e.s]-v[t.s]||t.f-e.f});r<n;++r){var b=s[r].s;if(!(v[b]>e))break;p+=g-(1<<f-v[b]),v[b]=e}for(p>>=m;p>0;){var y=s[r].s;v[y]<e?p-=1<<e-v[y]++-1:++r}for(;r>=0&&p;--r){var w=s[r].s;v[w]==e&&(--v[w],++p)}f=e}return{t:new Vl(v),l:f}},mc=function(t,e,i){return-1==t.s?Math.max(mc(t.l,e,i+1),mc(t.r,e,i+1)):e[t.s]=i},gc=function(t){for(var e=t.length;e&&!t[--e];);for(var i=new Yl(++e),r=0,n=t[0],s=1,o=function(t){i[r++]=t},a=1;a<=e;++a)if(t[a]==n&&a!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=t[a]}return{c:i.subarray(0,r),n:e}},bc=function(t,e){for(var i=0,r=0;r<e.length;++r)i+=t[r]*e[r];return i},yc=function(t,e,i){var r=i.length,n=cc(e+2);t[n]=255&r,t[n+1]=r>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<r;++s)t[n+s+4]=i[s];return 8*(n+4+r)},wc=function(t,e,i,r,n,s,o,a,h,u,l){vc(e,l++,i),++n[256];for(var c=pc(n,15),d=c.t,v=c.l,f=pc(s,15),p=f.t,m=f.l,g=gc(d),b=g.c,y=g.n,w=gc(p),C=w.c,S=w.n,k=new Yl(19),_=0;_<b.length;++_)++k[31&b[_]];for(_=0;_<C.length;++_)++k[31&C[_]];for(var I=pc(k,7),x=I.t,A=I.l,M=19;M>4&&!x[Hl[M-1]];--M);var R,O,E,T,L=u+5<<3,N=bc(n,ac)+bc(s,hc)+o,B=bc(n,d)+bc(s,p)+o+14+3*M+bc(k,x)+2*k[16]+3*k[17]+7*k[18];if(h>=0&&L<=N&&L<=B)return yc(e,l,t.subarray(h,h+u));if(vc(e,l,1+(B<N)),l+=2,B<N){R=oc(d,v,0),O=d,E=oc(p,m,0),T=p;var F=oc(x,A,0);vc(e,l,y-257),vc(e,l+5,S-1),vc(e,l+10,M-4),l+=14;for(_=0;_<M;++_)vc(e,l+3*_,x[Hl[_]]);l+=3*M;for(var D=[b,C],j=0;j<2;++j){var P=D[j];for(_=0;_<P.length;++_){var U=31&P[_];vc(e,l,F[U]),l+=x[U],U>15&&(vc(e,l,P[_]>>5&127),l+=P[_]>>12)}}}else R=uc,O=ac,E=lc,T=hc;for(_=0;_<a;++_){var z=r[_];if(z>255){fc(e,l,R[(U=z>>18&31)+257]),l+=O[U+257],U>7&&(vc(e,l,z>>23&31),l+=Xl[U]);var W=31&z;fc(e,l,E[W]),l+=T[W],W>3&&(fc(e,l,z>>5&8191),l+=Kl[W])}else fc(e,l,R[z]),l+=O[z]}return fc(e,l,R[256]),l+O[256]},Cc=new Jl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Sc=new Vl(0),kc=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var i=e,r=9;--r;)i=(1&i&&-306674912)^i>>>1;t[e]=i}return t}(),_c=function(t,e,i,r,n){if(!n&&(n={l:1},e.dictionary)){var s=e.dictionary.subarray(-32768),o=new Vl(s.length+t.length);o.set(s),o.set(t,s.length),t=o,n.w=s.length}return function(t,e,i,r,n,s){var o=s.z||t.length,a=new Vl(r+o+5*(1+Math.ceil(o/7e3))+n),h=a.subarray(r,a.length-n),u=s.l,l=7&(s.r||0);if(e){l&&(h[0]=s.r>>3);for(var c=Cc[e-1],d=c>>13,v=8191&c,f=(1<<i)-1,p=s.p||new Yl(32768),m=s.h||new Yl(f+1),g=Math.ceil(i/3),b=2*g,y=function(e){return(t[e]^t[e+1]<<g^t[e+2]<<b)&f},w=new Jl(25e3),C=new Yl(288),S=new Yl(32),k=0,_=0,I=s.i||0,x=0,A=s.w||0,M=0;I+2<o;++I){var R=y(I),O=32767&I,E=m[R];if(p[O]=E,m[R]=O,A<=I){var T=o-I;if((k>7e3||x>24576)&&(T>423||!u)){l=wc(t,h,0,w,C,S,_,x,M,I-M,l),x=k=_=0,M=I;for(var L=0;L<286;++L)C[L]=0;for(L=0;L<30;++L)S[L]=0}var N=2,B=0,F=v,D=O-E&32767;if(T>2&&R==y(I-D))for(var j=Math.min(d,T)-1,P=Math.min(32767,I),U=Math.min(258,T);D<=P&&--F&&O!=E;){if(t[I+N]==t[I+N-D]){for(var z=0;z<U&&t[I+z]==t[I+z-D];++z);if(z>N){if(N=z,B=D,z>j)break;var W=Math.min(D,z-2),G=0;for(L=0;L<W;++L){var Z=I-D+L&32767,V=Z-p[Z]&32767;V>G&&(G=V,E=Z)}}}D+=(O=E)-(E=p[O])&32767}if(B){w[x++]=268435456|ec[N]<<18|ic[B];var Y=31&ec[N],J=31&ic[B];_+=Xl[Y]+Kl[J],++C[257+Y],++S[J],A=I+N,++k}else w[x++]=t[I],++C[t[I]]}}for(I=Math.max(I,A);I<o;++I)w[x++]=t[I],++C[t[I]];l=wc(t,h,u,w,C,S,_,x,M,I-M,l),u||(s.r=7&l|h[l/8|0]<<3,l-=7,s.h=m,s.p=p,s.i=I,s.w=A)}else{for(I=s.w||0;I<o+u;I+=65535){var X=I+65535;X>=o&&(h[l/8|0]=u,X=o),l=yc(h,l+1,t.subarray(I,X))}s.i=o}return dc(a,0,r+cc(l)+n)}(t,null==e.level?6:e.level,null==e.mem?n.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,i,r,n)},Ic=function(t,e,i){for(;i;++e)t[e]=i,i>>>=8};function xc(t,e){e||(e={});var i=function(){var t=-1;return{p:function(e){for(var i=t,r=0;r<e.length;++r)i=kc[255&i^e[r]]^i>>>8;t=i},d:function(){return~t}}}(),r=t.length;i.p(t);var n=_c(t,e,function(t){return 10+(t.filename?t.filename.length+1:0)}(e),8),s=n.length;return function(t,e){var i=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&Ic(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),i){t[3]=8;for(var r=0;r<=i.length;++r)t[r+10]=i.charCodeAt(r)}}(n,e),Ic(n,s-8,i.d()),Ic(n,s-4,r),n}var Ac="undefined"!=typeof TextEncoder&&new TextEncoder,Mc="undefined"!=typeof TextDecoder&&new TextDecoder;try{Mc.decode(Sc,{stream:!0})}catch(t){}function Rc(t,e){if(Ac)return Ac.encode(t);for(var i=t.length,r=new Vl(t.length+(t.length>>1)),n=0,s=function(t){r[n++]=t},o=0;o<i;++o){if(n+5>r.length){var a=new Vl(n+8+(i-o<<1));a.set(r),r=a}var h=t.charCodeAt(o);h<128||e?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return dc(r,0,n)}function Oc(t){if("undefined"==typeof btoa)throw new Error("btoa is not available in this environment");for(var e="",i=0;i<t.length;i+=32768){var r=Math.min(i+32768,t.length),n=t.subarray(i,r);e+=String.fromCharCode.apply(null,n)}return btoa(e)}var Ec="replay";function Tc(){var t,e;return null===(e=null===(t=null==Ju?void 0:Ju.__VTiltExtensions__)||void 0===t?void 0:t.rrweb)||void 0===e?void 0:e.record}function Lc(t,e){var i=t.includes("?")?"&":"?";return""+t+i+"compression="+e}function Nc(t){return{rrwebMethod:t,enqueuedAt:Date.now(),attempt:1}}class Bc{constructor(t,e){void 0===e&&(e={}),this.C="/api/s",this.S=!1,this.k="unknown",this.I=Date.now(),this.A="",this.M="",this.R=[],this.O=()=>{this.T()},this.L=()=>{this.T()},this.N=()=>{this.B("browser offline",{})},this.F=()=>{this.B("browser online",{})},this.D=()=>{if(null==Gu?void 0:Gu.visibilityState){var t="window "+Gu.visibilityState;this.B(t,{}),"hidden"===Gu.visibilityState&&this.T()}},this._instance=t,this.j=e,this.P=this.U()}get isStarted(){return this.S}get started(){return this.S}get sessionId(){return this.A}get status(){return this.S?!0===this.k?"paused":"active":"disabled"}start(t){this.$()?(this.W(t),$u&&(Nl($u,"beforeunload",this.O),Nl($u,"pagehide",this.L),Nl($u,"offline",this.N),Nl($u,"online",this.F),Nl($u,"visibilitychange",this.D))):this.stop()}stop(){this.S&&this.G&&(this.G(),this.G=void 0,this.S=!1,$u&&($u.removeEventListener("beforeunload",this.O),$u.removeEventListener("pagehide",this.L),$u.removeEventListener("offline",this.N),$u.removeEventListener("online",this.F),$u.removeEventListener("visibilitychange",this.D)),this.T(),this.U(),this.Z&&clearInterval(this.Z),ll().info(Ec,"stopped"))}stopRecording(){this.stop()}addCustomEvent(t,e){return this.B(t,e)}takeFullSnapshot(){return this.V()}log(t,e){void 0===e&&(e="log"),this.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:e,trace:[],payload:[JSON.stringify(t)]}},timestamp:Date.now()})}updateConfig(t){this.j=i({},this.j,t)}$(){return!!this.j.enabled&&!!$u}W(t){var e;if(void 0!==Object.assign&&void 0!==Array.from&&!this.S){this.S=!0;var i=this._instance.getSessionId();this.A=i||this.Y(),this.M=(null===(e=this._instance.sessionManager)||void 0===e?void 0:e.getWindowId())||this.Y(),Tc()?this.J():this.X(()=>{this.J()}),ll().info(Ec,"starting"),t&&this.K(t)}}X(t){var e,i=null===(e=Ju.__VTiltExtensions__)||void 0===e?void 0:e.loadExternalDependency;i?i(this._instance,"recorder",e=>{e?ll().error(Ec,"could not load recorder:",e):t()}):ll().error(Ec,"loadExternalDependency not available; make sure external-scripts-loader is initialized")}J(){var t,e,r=Tc();if(r){var n={blockClass:this.j.blockClass||"vt-no-capture",ignoreClass:this.j.ignoreClass||"vt-ignore-input",maskTextClass:this.j.maskTextClass||"vt-mask",maskTextSelector:this.j.maskTextSelector,maskTextFn:void 0,maskAllInputs:null===(t=this.j.maskAllInputs)||void 0===t||t,maskInputOptions:i({password:!0},this.j.maskInputOptions),maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},s=this.H();s.enabled&&(n.recordCanvas=!0,n.sampling={canvas:s.fps},n.dataURLOptions={type:"image/webp",quality:s.quality});var o=this.q();o&&(n.maskAllInputs=null===(e=o.maskAllInputs)||void 0===e||e,n.maskTextSelector=o.maskTextSelector),n.blockSelector=Pl(this.j.skipDefaultInvisibleBlocking,this.j.blockSelector,null==o?void 0:o.blockSelector);var a=this.tt();this.G=r(i({emit:t=>{this.onRRwebEmit(t)},plugins:a},n)),this.I=Date.now(),this.k="boolean"==typeof this.k?this.k:"unknown",this.B("$session_options",{sessionRecordingOptions:n,activePlugins:a.map(t=>null==t?void 0:t.name)})}else ll().error(Ec,"onScriptLoaded was called but rrwebRecord is not available")}tt(){var t,e,i=[];if(this.j.captureConsole)try{var r=null===(e=null===(t=Ju.__VTiltExtensions__)||void 0===t?void 0:t.rrwebPlugins)||void 0===e?void 0:e.getRecordConsolePlugin;r&&i.push(r())}catch(t){ll().warn(Ec,"failed to load console plugin",t)}return i}onRRwebEmit(t){if(this.et(),t&&"object"==typeof t){if(t.type===Xu.Meta){var e=t.data;this.it=e.href}if(function(t){return t.type===Xu.Custom&&"recording paused"===t.data.tag}(t)||Wl(t));else if(!0===this.k&&!Gl(t))return;t.type===Xu.FullSnapshot&&this.rt();var r=function(t){if(t.type!==Xu.Plugin||"rrweb/console@1"!==t.data.plugin)return t;var e=t.data.payload;if(!(null==e?void 0:e.payload))return t;var r=e.payload.map(t=>"string"==typeof t&&t.length>1e3?t.substring(0,1e3)+"... [truncated]":t);return i({},t,{data:i({},t.data,{payload:i({},e,{payload:r})})})}(t);if(this.nt(r),!0!==this.k||Wl(r)){var n={$snapshot_bytes:$l(r),$snapshot_data:r,$session_id:this.A,$window_id:this.M};"disabled"!==this.status?this.st(n):this.U()}}}et(){if(0!==this.R.length){var t=[...this.R];this.R=[],t.forEach(t=>{Date.now()-t.enqueuedAt<=2e3&&this.ot(t)})}}nt(t){var e,i=Gl(t);if(!i&&!this.k){var r=t.timestamp-this.I,n=this.j.sessionIdleThresholdMs||3e5;r>n&&(this.k=!0,this.Z&&clearInterval(this.Z),this.B("sessionIdle",{eventTimestamp:t.timestamp,lastActivityTimestamp:this.I,threshold:n,bufferLength:this.P.data.length,bufferSize:this.P.size}),this.ht())}var s=!1;if(i&&(this.I=t.timestamp,this.k)){var o="unknown"===this.k;this.k=!1,o||(this.B("sessionNoLongerIdle",{reason:"user activity",type:t.type}),s=!0)}if(!this.k){var a=this._instance.getSessionId();this.A&&a&&a!==this.A?(this.T(),this.U(),this.A=a,this.M=(null===(e=this._instance.sessionManager)||void 0===e?void 0:e.getWindowId())||this.Y(),this.P.sessionId=this.A,this.P.windowId=this.M,this.rt(),this.V(),this.K("session_id_changed")):s&&(this.rt(),this.V())}}U(){return this.P={size:0,data:[],sessionId:this.A,windowId:this.M},this.P}ht(){return this.ut&&(clearTimeout(this.ut),this.ut=void 0),"paused"===this.status||"disabled"===this.status?(this.ut=setTimeout(()=>{this.ht()},2e3),this.P):(this.lt(),this.U())}T(){this.ut&&(clearTimeout(this.ut),this.ut=void 0),this.lt()}lt(){this.P.data.length>0&&zl(this.P).forEach(t=>{this.ct({$snapshot_bytes:t.size,$snapshot_data:t.data,$session_id:t.sessionId,$window_id:t.windowId})})}st(t){var e,i=2+((null===(e=this.P)||void 0===e?void 0:e.data.length)||0),r=t.$snapshot_bytes;!this.k&&(this.P.size+r+i>943718.4||this.P.sessionId!==this.A)&&(this.P=this.ht()),this.P.size+=r,this.P.data.push(t.$snapshot_data),this.ut||this.k||(this.ut=setTimeout(()=>{this.ht()},2e3))}ct(t){var e=this._instance.getConfig(),i=e.token||"";if(i){if(!Rl()){var r=!1!==this.j.compressEvents,n={token:i,distinct_id:this._instance.getDistinctId()||this._instance.getAnonymousId()||"",$session_id:this.A,$window_id:this.M,$snapshot_data:t.$snapshot_data,$snapshot_bytes:t.$snapshot_bytes,$lib:"web",$lib_version:this._instance.version||"unknown",timestamp:Date.now()};this.dt(e,i,n,r)}}else ll().warn(Ec,"missing token, cannot send snapshot")}dt(t,e,i,r){var n=JSON.stringify(i),s=i.$snapshot_data,o=Array.isArray(s)&&s.some(t=>2===(null==t?void 0:t.type));if(n.length>61440||o){var a=fl(t,this.C);this.ft(a,e,n,r)}else{var h=fl(t,this.C,{includeTokenQuery:!0});this.gt(h,e,n,r)}}ft(t,e,i,r){if(r&&void 0!==$u)try{var n=xc(Rc(i));if(n.length>0){var s=new Blob([n],{type:"application/octet-stream"});if(s.size>0){var o=Lc(t,"gzip-js");return void this.bt(o,e,s,"application/octet-stream")}}}catch(t){ll().warn(Ec,"compression failed, sending uncompressed")}var a=new Blob([i],{type:"application/json"});this.bt(t,e,a,"application/json")}gt(t,e,i,r){if(r&&void 0!==$u)try{var n=xc(Rc(i));if(n.length>0){var s=Oc(n);if(s.length>0&&s.length<=61440){var o=Lc(t,"base64"),a=new Blob([s],{type:"text/plain"});if("undefined"!=typeof navigator&&navigator.sendBeacon&&navigator.sendBeacon(o,a))return;return void this.bt(o,"",a,"text/plain")}}}catch(t){ll().warn(Ec,"compression failed, sending uncompressed")}var h=new Blob([i],{type:"application/json"});"undefined"!=typeof navigator&&navigator.sendBeacon&&navigator.sendBeacon(t,h)||this.bt(t,"",h,"application/json")}bt(t,e,i,r,n){void 0===n&&(n=0);var s=i.size<6e4,o={"Content-Type":r};e&&(o[vl]=e),fetch(t,{method:"POST",body:i,headers:o,keepalive:s}).then(s=>{if(!s.ok)return s.status>=400&&s.status<500?(Ml(),void ll().warn(Ec,"snapshot rejected by server ("+s.status+"), not retrying")):void this.yt(t,e,i,r,n);Ml()}).catch(()=>{Al(Ec),this.yt(t,e,i,r,n)})}yt(t,e,i,r,n){if(n>=5)ll().error(Ec,"failed to send snapshot after 5 retries, giving up");else if(!Rl()){var s=3e3*Math.pow(2,n),o=Math.min(s,3e4),a=(Math.random()-.5)*o,h=Math.ceil(o+a);ll().warn(Ec,"snapshot send failed, retrying in "+Math.round(h/1e3)+"s (attempt "+(n+1)+"/5)"),setTimeout(()=>{this.bt(t,e,i,r,n+1)},h)}}rt(){if(this.Z&&clearInterval(this.Z),!0!==this.k){var t=this.j.fullSnapshotIntervalMs||3e5;this.Z=setInterval(()=>{this.V()},t)}}ot(t){try{return t.rrwebMethod(),!0}catch(e){return this.R.length<10?this.R.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt+1,rrwebMethod:t.rrwebMethod}):ll().warn(Ec,"could not emit queued rrweb event",e,t),!1}}B(t,e){return this.ot(Nc(()=>Tc().addCustomEvent(t,e)))}V(){return this.ot(Nc(()=>Tc().takeFullSnapshot()))}H(){var t,e,i,r=this.j.captureCanvas,n=null!==(t=null==r?void 0:r.recordCanvas)&&void 0!==t&&t,s=null!==(e=null==r?void 0:r.canvasFps)&&void 0!==e?e:4,o=null!==(i=null==r?void 0:r.canvasQuality)&&void 0!==i?i:.4;return{enabled:n,fps:Zl(s,0,12,"canvas recording fps",4),quality:Zl(o,0,1,"canvas recording quality",.4)}}q(){var t,e=this.j.masking;if(e)return{maskAllInputs:null===(t=e.maskAllInputs)||void 0===t||t,maskTextSelector:e.maskTextSelector,blockSelector:e.blockSelector}}Y(){return Math.random().toString(36).substring(2,15)}K(t,e){ll().info(Ec,t.replace(/_/g," "),e),"recording_initialized"!==t&&"session_id_changed"!==t&&this.B(t,e)}}Ju.__VTiltExtensions__=Ju.__VTiltExtensions__||{},Ju.__VTiltExtensions__.rrweb={record:Au,version:"v2"},Ju.__VTiltExtensions__.rrwebPlugins={getRecordConsolePlugin:t=>({name:"rrweb/console@1",observer:Uu,options:t})},Ju.__VTiltExtensions__.initSessionRecording=function(t,e){return new Bc(t,e)};var Fc,Dc=-1,jc=function(t){addEventListener("pageshow",function(e){e.persisted&&(Dc=e.timeStamp,t(e))},!0)},Pc=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Uc=function(){var t=Pc();return t&&t.activationStart||0},$c=function(t,e){var i=Pc(),r="navigate";return Dc>=0?r="back-forward-cache":i&&(document.prerendering||Uc()>0?r="prerender":document.wasDiscarded?r="restore":i.type&&(r=i.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zc=function(t,e,i){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(t){Promise.resolve().then(function(){e(t.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},i||{})),r}}catch(t){}},Wc=function(t,e,i,r){var n,s;return function(o){e.value>=0&&(o||r)&&((s=e.value-(n||0))||void 0===n)&&(n=e.value,e.delta=s,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,i),t(e))}},Gc=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Zc=function(t){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},Vc=function(t){var e=!1;return function(i){e||(t(i),e=!0)}},Yc=-1,Jc=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Xc=function(t){"hidden"===document.visibilityState&&Yc>-1&&(Yc="visibilitychange"===t.type?t.timeStamp:0,Hc())},Kc=function(){addEventListener("visibilitychange",Xc,!0),addEventListener("prerenderingchange",Xc,!0)},Hc=function(){removeEventListener("visibilitychange",Xc,!0),removeEventListener("prerenderingchange",Xc,!0)},qc=function(){return Yc<0&&(Yc=Jc(),Kc(),jc(function(){setTimeout(function(){Yc=Jc(),Kc()},0)})),{get firstHiddenTime(){return Yc}}},Qc=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},td=[1800,3e3],ed=function(t,e){e=e||{},Qc(function(){var i,r=qc(),n=$c("FCP"),s=zc("paint",function(t){t.forEach(function(t){"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime<r.firstHiddenTime&&(n.value=Math.max(t.startTime-Uc(),0),n.entries.push(t),i(!0)))})});s&&(i=Wc(t,n,td,e.reportAllChanges),jc(function(r){n=$c("FCP"),i=Wc(t,n,td,e.reportAllChanges),Gc(function(){n.value=performance.now()-r.timeStamp,i(!0)})}))})},id=[.1,.25],rd=0,nd=1/0,sd=0,od=function(t){t.forEach(function(t){t.interactionId&&(nd=Math.min(nd,t.interactionId),sd=Math.max(sd,t.interactionId),rd=sd?(sd-nd)/7+1:0)})},ad=function(){return Fc?rd:performance.interactionCount||0},hd=function(){"interactionCount"in performance||Fc||(Fc=zc("event",od,{type:"event",buffered:!0,durationThreshold:0}))},ud=[200,500],ld=0,cd=function(){return ad()-ld},dd=[],vd={},fd=function(t){var e=dd[dd.length-1],i=vd[t.interactionId];if(i||dd.length<10||t.duration>e.latency){if(i)i.entries.push(t),i.latency=Math.max(i.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};vd[r.id]=r,dd.push(r)}dd.sort(function(t,e){return e.latency-t.latency}),dd.splice(10).forEach(function(t){delete vd[t.id]})}},pd=[2500,4e3],md={},gd=[800,1800],bd=function t(e){document.prerendering?Qc(function(){return t(e)}):"complete"!==document.readyState?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},yd={onLCP:function(t,e){e=e||{},Qc(function(){var i,r=qc(),n=$c("LCP"),s=function(t){var e=t[t.length-1];e&&e.startTime<r.firstHiddenTime&&(n.value=Math.max(e.startTime-Uc(),0),n.entries=[e],i())},o=zc("largest-contentful-paint",s);if(o){i=Wc(t,n,pd,e.reportAllChanges);var a=Vc(function(){md[n.id]||(s(o.takeRecords()),o.disconnect(),md[n.id]=!0,i(!0))});["keydown","click"].forEach(function(t){addEventListener(t,function(){return setTimeout(a,0)},!0)}),Zc(a),jc(function(r){n=$c("LCP"),i=Wc(t,n,pd,e.reportAllChanges),Gc(function(){n.value=performance.now()-r.timeStamp,md[n.id]=!0,i(!0)})})}})},onCLS:function(t,e){e=e||{},ed(Vc(function(){var i,r=$c("CLS",0),n=0,s=[],o=function(t){t.forEach(function(t){if(!t.hadRecentInput){var e=s[0],i=s[s.length-1];n&&t.startTime-i.startTime<1e3&&t.startTime-e.startTime<5e3?(n+=t.value,s.push(t)):(n=t.value,s=[t])}}),n>r.value&&(r.value=n,r.entries=s,i())},a=zc("layout-shift",o);a&&(i=Wc(t,r,id,e.reportAllChanges),Zc(function(){o(a.takeRecords()),i(!0)}),jc(function(){n=0,r=$c("CLS",0),i=Wc(t,r,id,e.reportAllChanges),Gc(function(){return i()})}),setTimeout(i,0))}))},onFCP:ed,onINP:function(t,e){e=e||{},Qc(function(){var i;hd();var r,n=$c("INP"),s=function(t){t.forEach(function(t){t.interactionId&&fd(t),"first-input"===t.entryType&&!dd.some(function(e){return e.entries.some(function(e){return t.duration===e.duration&&t.startTime===e.startTime})})&&fd(t)});var e,i=(e=Math.min(dd.length-1,Math.floor(cd()/50)),dd[e]);i&&i.latency!==n.value&&(n.value=i.latency,n.entries=i.entries,r())},o=zc("event",s,{durationThreshold:null!==(i=e.durationThreshold)&&void 0!==i?i:40});r=Wc(t,n,ud,e.reportAllChanges),o&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),Zc(function(){s(o.takeRecords()),n.value<0&&cd()>0&&(n.value=0,n.entries=[]),r(!0)}),jc(function(){dd=[],ld=ad(),n=$c("INP"),r=Wc(t,n,ud,e.reportAllChanges)}))})},onTTFB:function(t,e){e=e||{};var i=$c("TTFB"),r=Wc(t,i,gd,e.reportAllChanges);bd(function(){var n=Pc();if(n){var s=n.responseStart;if(s<=0||s>performance.now())return;i.value=Math.max(s-Uc(),0),i.entries=[n],r(!0),jc(function(){i=$c("TTFB",0),(r=Wc(t,i,gd,e.reportAllChanges))(!0)})}})}};Ju.__VTiltExtensions__=Ju.__VTiltExtensions__||{},Ju.__VTiltExtensions__.webVitalsCallbacks=yd;var wd="external-scripts";Ju.__VTiltExtensions__=Ju.__VTiltExtensions__||{},Ju.__VTiltExtensions__.loadExternalDependency=(t,e,i)=>{if(function(t){var e=Ju.__VTiltExtensions__;if(!e)return!1;switch(t){case"chat":return!!e.initChat;case"recorder":return!!e.initSessionRecording;case"web-vitals":return!!e.webVitalsCallbacks;default:return!1}}(e))i();else{var r=((t,e)=>{var i=t.getConfig();return i.script_host?i.script_host.replace(/\/+$/gm,"")+"/"+e+".js":i.api_host?i.api_host.replace(/\/+$/gm,"")+"/dist/"+e+".js":(ll().error(wd,"cannot load "+e+".js: api_host is required"),"")})(t,e);((t,e,i)=>{if(t.getConfig().disable_external_dependency_loading)return ll().warn(wd,e+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=null==Gu?void 0:Gu.querySelectorAll("script");if(r)for(var n,s=function(){if(r[o].src===e){var t=r[o];return t.__vtilt_loading_callback_fired?{v:i()}:(t.addEventListener("load",e=>{t.__vtilt_loading_callback_fired=!0,i(void 0,e)}),t.onerror=t=>i(t),{v:void 0})}},o=0;o<r.length;o++)if(n=s())return n.v;var a=()=>{var t;if(!Gu)return i("document not found");var r=Gu.createElement("script");r.type="text/javascript",r.crossOrigin="anonymous",r.src=e,r.onload=t=>{r.__vtilt_loading_callback_fired=!0,i(void 0,t)},r.onerror=t=>i(t);var n=Gu.querySelectorAll("body > script");n.length>0?null===(t=n[0].parentNode)||void 0===t||t.insertBefore(r,n[0]):Gu.body.appendChild(r)};(null==Gu?void 0:Gu.body)?a():null==Gu||Gu.addEventListener("DOMContentLoaded",a)})(t,r,i)}};var Cd="1.13.1",Sd="__vt_session",kd="__vt_window_id",_d="__vt_primary_window",Id="__vt_user_state",xd="__vt_device_id",Ad="__vt_anonymous_id",Md="__vt_remote_config",Rd="__vt_distinct_id",Od="__vt_user_properties",Ed="localStorage",Td="localStorage+cookie",Ld="sessionStorage",Nd="memory",Bd="$initial_person_info",Fd="$pageview",Dd="$pageleave",jd="$identify",Pd="$alias",Ud="$set",$d="$performance_event",zd="$autocapture",Wd="$scroll_depth",Gd="$snapshot",Zd="$snapshot_items",Vd="$$client_ingestion_warning",Yd="$current_url",Jd="$pathname",Xd="$prev_pageview_duration",Kd="$prev_pageview_pathname",Hd="$prev_pageview_url",qd="$scroll_depth_pct",Qd="$scroll_depth_max_pct",tv="$prev_pageview_scroll_depth_pct";function ev(t,e){var r,n,s=e.bubble,o=null==t?void 0:t.bubble;if(s){var a=null===s.offset?void 0:void 0!==s.offset?i({},null===(r=null==t?void 0:t.bubble)||void 0===r?void 0:r.offset,s.offset):null===(n=null==t?void 0:t.bubble)||void 0===n?void 0:n.offset;o=i({},null==t?void 0:t.bubble,s,{offset:a})}return i({},t,e,{bubble:o})}class iv{constructor(t){void 0===t&&(t={}),this.config=this.parseConfigFromScript(t)}parseConfigFromScript(t){if(!(null==Gu?void 0:Gu.currentScript))return i({token:t.token||""},t);var e=Gu.currentScript,r=i({token:""},t);r.api_host=e.getAttribute("data-api-host")||e.getAttribute("data-host")||t.api_host,r.script_host=e.getAttribute("data-script-host")||t.script_host,r.token=e.getAttribute("data-token")||t.token||"",r.domain=e.getAttribute("data-domain")||t.domain,r.storage=e.getAttribute("data-storage")||t.storage,r.stringifyPayload="false"!==e.getAttribute("data-stringify-payload");var n="true"===e.getAttribute("data-capture-performance");for(var s of(r.capture_performance=!!n||t.capture_performance,r.globalAttributes=i({},t.globalAttributes),Array.from(e.attributes)))s.name.startsWith("data-vt-")&&(r.globalAttributes[s.name.slice(8).replace(/-/g,"_")]=s.value);return r}getConfig(){return i({},this.config)}updateConfig(t){var e=function(t,e){return void 0===e.chat?e:i({},e,{chat:ev(t.chat,e.chat)})}(this.config,t);this.config=i({},this.config,e)}}var rv=[Ad,xd,Rd,Id],nv=31536e3,sv=["herokuapp.com","vercel.app","netlify.app"];function ov(t){var e;if(!t||"undefined"==typeof document)return"";var i=null===(e=document.location)||void 0===e?void 0:e.hostname;if(!i)return"";var r=i.match(/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i);return r?"."+r[0]:""}class av{constructor(t){var e,i,r;this.memoryStorage=new Map,this.wt=null,this.method=t.method,this.cross_subdomain=null!==(e=t.cross_subdomain)&&void 0!==e?e:function(){var t;if("undefined"==typeof document)return!1;var e=null===(t=document.location)||void 0===t?void 0:t.hostname;if(!e)return!1;var i=e.split(".").slice(-2).join(".");return!sv.includes(i)}(),this.sameSite=null!==(i=t.sameSite)&&void 0!==i?i:"Lax",this.secure=null!==(r=t.secure)&&void 0!==r?r:"undefined"!=typeof location&&"https:"===location.protocol}isLocalStorageSupported(){if(null!==this.wt)return this.wt;if(void 0===$u||!$u.localStorage)return this.wt=!1,!1;try{var t="__vt_ls_test__";$u.localStorage.setItem(t,"1");var e="1"===$u.localStorage.getItem(t);return $u.localStorage.removeItem(t),this.wt=e,e||ll().warn("storage","localStorage unavailable, using cookies"),e}catch(t){return this.wt=!1,ll().warn("storage","localStorage unavailable, using cookies"),!1}}isCriticalProperty(t){return rv.includes(t)}get(t){var e;try{switch(this.method){case Nd:return null!==(e=this.memoryStorage.get(t))&&void 0!==e?e:null;case Td:return this.getLocalStoragePlusCookie(t);case Ed:return this.getLocalStorage(t);case Ld:return this.readFromSessionStorage(t);default:return this.getCookie(t)}}catch(e){return ll().warn("storage",'get error for "'+t+'":',e),null}}set(t,e,i){try{switch(this.method){case Nd:this.memoryStorage.set(t,e);break;case Td:this.setLocalStoragePlusCookie(t,e,i);break;case Ed:this.setLocalStorage(t,e);break;case Ld:this.writeToSessionStorage(t,e);break;default:this.setCookie(t,e,null!=i?i:nv)}}catch(e){ll().warn("storage",'set error for "'+t+'":',e)}}remove(t){try{switch(this.method){case Nd:this.memoryStorage.delete(t);break;case Td:this.removeLocalStoragePlusCookie(t);break;case Ed:this.removeLocalStorage(t);break;case Ld:this.removeFromSessionStorage(t);break;default:this.removeCookie(t)}}catch(e){ll().warn("storage",'remove error for "'+t+'":',e)}}getLocalStoragePlusCookie(t){if(this.isCriticalProperty(t)){var e=this.getCookie(t),i=this.getLocalStorage(t);if(null!==e){if(i!==e&&this.isLocalStorageSupported())try{null==$u||$u.localStorage.setItem(t,e)}catch(t){}return e}return null!==i?i:this.readFromSessionStorage(t)}return this.getLocalStorage(t)}setLocalStoragePlusCookie(t,e,i){this.setLocalStorage(t,e),this.isCriticalProperty(t)&&(this.setCookie(t,e,null!=i?i:nv),this.writeToSessionStorage(t,e))}removeLocalStoragePlusCookie(t){this.removeLocalStorage(t),this.isCriticalProperty(t)&&(this.removeCookie(t),this.removeFromSessionStorage(t))}getLocalStorage(t){var e;if(!this.isLocalStorageSupported())return null;try{return null!==(e=null==$u?void 0:$u.localStorage.getItem(t))&&void 0!==e?e:null}catch(t){return null}}setLocalStorage(t,e){if(this.isLocalStorageSupported())try{null==$u||$u.localStorage.setItem(t,e)}catch(t){ll().warn("storage","localStorage write error:",t)}}removeLocalStorage(t){if(this.isLocalStorageSupported())try{null==$u||$u.localStorage.removeItem(t)}catch(t){}}readFromSessionStorage(t){var e;try{return null!==(e=null==$u?void 0:$u.sessionStorage.getItem(t))&&void 0!==e?e:null}catch(t){return null}}writeToSessionStorage(t,e){try{null==$u||$u.sessionStorage.setItem(t,e)}catch(t){ll().warn("storage","sessionStorage write error:",t)}}removeFromSessionStorage(t){try{null==$u||$u.sessionStorage.removeItem(t)}catch(t){}}getCookie(t){if("undefined"==typeof document)return null;var e=t+"=";for(var i of document.cookie.split(";")){var r=i.trim();if(r.startsWith(e))try{return decodeURIComponent(r.slice(e.length))}catch(t){return r.slice(e.length)}}return null}setCookie(t,e,i){if("undefined"!=typeof document){var r=ov(this.cross_subdomain),n=t+"="+encodeURIComponent(e)+"; Max-Age="+i+"; path=/; SameSite="+this.sameSite;this.secure&&(n+="; Secure"),r&&(n+="; domain="+r),document.cookie=n}}removeCookie(t){if("undefined"!=typeof document){var e=ov(this.cross_subdomain);document.cookie=t+"=; Max-Age=0; path=/"+(e?"; domain="+e:""),document.cookie=t+"=; Max-Age=0; path=/"}}getWithExpiry(t){var e=this.get(t);if(!e)return null;try{var i=JSON.parse(e);return i.expiry&&Date.now()>i.expiry?(this.remove(t),null):i.value}catch(t){return null}}setWithExpiry(t,e,r){var n=i({value:e},r?{expiry:Date.now()+r}:{});this.set(t,JSON.stringify(n))}getJSON(t){var e=this.get(t);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}}setJSON(t,e,i){this.set(t,JSON.stringify(e),i)}canUseSessionStorage(){if(void 0===$u||!(null==$u?void 0:$u.sessionStorage))return!1;try{var t="__vt_ss_test__";return $u.sessionStorage.setItem(t,"1"),$u.sessionStorage.removeItem(t),!0}catch(t){return!1}}getSessionStorage(){var t;return this.canUseSessionStorage()&&null!==(t=null==$u?void 0:$u.sessionStorage)&&void 0!==t?t:null}setMethod(t){this.method=t}getMethod(){return this.method}}class hv{constructor(t,e){void 0===t&&(t="cookie"),this.Ct=!1,this.storage=new av({method:t,cross_subdomain:e,sameSite:"Lax"}),this.M=void 0,ll().debug("session","ctor")}hydrateFromStorage(){ll().debug("session","hydrate"),this.St()}getSessionId(){var t=this.kt();return t||(t=El(16),this._t(t),this.Ct=!0),t}setSessionId(){var t=this.kt(),e=t||El(16);return t||(this.Ct=!0),this._t(e),e}resetSessionId(){this.It(),this.Ct=!0,this.setSessionId(),this.xt(El(16))}consumeSessionStart(){return!!this.Ct&&(this.Ct=!1,!0)}kt(){return this.storage.get(Sd)}_t(t){this.storage.set(Sd,t,1800)}It(){this.storage.remove(Sd)}getWindowId(){if(this.M)return this.M;var t=this.storage.getSessionStorage();if(t){var e=t.getItem(kd);if(e)return this.M=e,e}var i=El(16);return this.xt(i),i}xt(t){if(t!==this.M){this.M=t;var e=this.storage.getSessionStorage();e&&e.setItem(kd,t)}}St(){var t=this.storage.getSessionStorage();if(t){var e=t.getItem(_d),i=t.getItem(kd);i&&!e?this.M=i:(i&&t.removeItem(kd),this.xt(El(16))),t.setItem(_d,"true"),this.At()}else this.M=El(16)}At(){var t=this.storage.getSessionStorage();$u&&t&&Nl($u,"beforeunload",()=>{var t=this.storage.getSessionStorage();t&&t.removeItem(_d)},{capture:!1})}updateStorageMethod(t,e){this.storage=new av({method:t,cross_subdomain:e,sameSite:"Lax"})}}function uv(t){if(!Gu)return null;var e=Gu.createElement("a");return e.href=t,e}function lv(t){try{return decodeURIComponent(t).replace(/\+/g," ")}catch(e){return t.replace(/\+/g," ")}}function cv(t){for(var e={},i=function(t){return((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"")}(t).split("&"),r=0;r<i.length;r++){var n=i[r];if(n){var s=n.indexOf("="),o=-1===s?n:n.slice(0,s);if(o){var a=lv(o),h=-1===s?"":n.slice(s+1);e[a]=lv(h)}}}return e}function dv(t,e){var i;return null!==(i=cv(t)[e])&&void 0!==i?i:""}function vv(t,e,i){if(!t||!e||!e.length)return t;for(var r=t.split("#"),n=r[0]||"",s=r[1],o=n.split("?"),a=o[1],h=o[0],u=(a||"").split("&"),l=[],c=0;c<u.length;c++){var d=u[c].split("="),v=d[0],f=d.slice(1).join("=");-1!==e.indexOf(v)?l.push(v+"="+i):v&&l.push(v+(f?"="+f:""))}var p=l.join("&");return h+(p?"?"+p:"")+(s?"#"+s:"")}var fv="_fbp",pv="_fbc",mv=15552e3,gv=7776e3;function bv(){void 0!==Gu&&(function(){if(yv(fv))return;var t=Date.now(),e=Math.floor(1e9+9e9*Math.random());wv(fv,"fb.1."+t+"."+e,mv)}(),function(){if(!(null==Zu?void 0:Zu.search))return;try{var t=new URL(Zu.href).searchParams.get("fbclid");if(!(null==t?void 0:t.trim()))return;var e="fb.1."+Date.now()+"."+t.trim();wv(pv,e,gv)}catch(t){}}())}function yv(t){if(void 0===Gu||!(null==Gu?void 0:Gu.cookie))return null;var e=t+"=";for(var i of Gu.cookie.split(";")){var r=i.trim();if(r.startsWith(e))try{return decodeURIComponent(r.slice(e.length))}catch(t){return r.slice(e.length)}}return null}function wv(t,e,i){if(void 0!==Gu){var r=void 0!==Zu&&"https:"===Zu.protocol?"; Secure":"";Gu.cookie=t+"="+encodeURIComponent(e)+"; Max-Age="+i+"; path=/; SameSite=Lax"+r}}var Cv="Mobile",Sv="iOS",kv="Android",_v="Tablet",Iv=kv+" "+_v,xv="iPad",Av="Apple",Mv=Av+" Watch",Rv="Safari",Ov="BlackBerry",Ev="Samsung",Tv=Ev+"Browser",Lv=Ev+" Internet",Nv="Chrome",Bv=Nv+" OS",Fv=Nv+" "+Sv,Dv="Internet Explorer",jv=Dv+" "+Cv,Pv="Opera",Uv=Pv+" Mini",$v="Edge",zv="Microsoft "+$v,Wv="Firefox",Gv=Wv+" "+Sv,Zv="Nintendo",Vv="PlayStation",Yv="Xbox",Jv=kv+" "+Cv,Xv=Cv+" "+Rv,Kv="Windows",Hv=Kv+" Phone",qv="Nokia",Qv="Ouya",tf="Generic",ef=tf+" "+Cv.toLowerCase(),rf=tf+" "+_v.toLowerCase(),nf="Konqueror",sf="(\\d+(\\.\\d+)?)",of=new RegExp("Version/"+sf),af=new RegExp(Yv,"i"),hf=new RegExp(Vv+" \\w+","i"),uf=new RegExp(Zv+" \\w+","i"),lf=new RegExp(Ov+"|PlayBook|BB10","i"),cf={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function df(t,e){return t.toLowerCase().includes(e.toLowerCase())}var vf=(t,e)=>e&&df(e,Av)||function(t){return df(t,Rv)&&!df(t,Nv)&&!df(t,kv)}(t),ff=function(t,e){return e=e||"",df(t," OPR/")&&df(t,"Mini")?Uv:df(t," OPR/")?Pv:lf.test(t)?Ov:df(t,"IE"+Cv)||df(t,"WPDesktop")?jv:df(t,Tv)?Lv:df(t,$v)||df(t,"Edg/")?zv:df(t,"FBIOS")?"Facebook "+Cv:df(t,"UCWEB")||df(t,"UCBrowser")?"UC Browser":df(t,"CriOS")?Fv:df(t,"CrMo")||df(t,Nv)?Nv:df(t,kv)&&df(t,Rv)?Jv:df(t,"FxiOS")?Gv:df(t.toLowerCase(),nf.toLowerCase())?nf:vf(t,e)?df(t,Cv)?Xv:Rv:df(t,Wv)?Wv:df(t,"MSIE")||df(t,"Trident/")?Dv:df(t,"Gecko")?Wv:""},pf={[jv]:[new RegExp("rv:"+sf)],[zv]:[new RegExp($v+"?\\/"+sf)],[Nv]:[new RegExp("("+Nv+"|CrMo)\\/"+sf)],[Fv]:[new RegExp("CriOS\\/"+sf)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+sf)],[Rv]:[of],[Xv]:[of],[Pv]:[new RegExp("(Opera|OPR)\\/"+sf)],[Wv]:[new RegExp(Wv+"\\/"+sf)],[Gv]:[new RegExp("FxiOS\\/"+sf)],[nf]:[new RegExp("Konqueror[:/]?"+sf,"i")],[Ov]:[new RegExp(Ov+" "+sf),of],[Jv]:[new RegExp("android\\s"+sf,"i")],[Lv]:[new RegExp(Tv+"\\/"+sf)],[Dv]:[new RegExp("(rv:|MSIE )"+sf)],Mozilla:[new RegExp("rv:"+sf)]},mf=function(t,e){var i=ff(t,e),r=pf[i];if(void 0===r)return null;for(var n=0;n<r.length;n++){var s=r[n],o=t.match(s);if(o)return parseFloat(o[o.length-2])}return null},gf=[[new RegExp(Yv+"; "+Yv+" (.*?)[);]","i"),t=>[Yv,t&&t[1]||""]],[new RegExp(Zv,"i"),[Zv,""]],[new RegExp(Vv,"i"),[Vv,""]],[lf,[Ov,""]],[new RegExp(Kv,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Hv,""];if(new RegExp(Cv).test(e)&&!/IEMobile\b/.test(e))return[Kv+" "+Cv,""];var i=/Windows NT ([0-9.]+)/i.exec(e);if(i&&i[1]){var r=i[1],n=cf[r]||"";return/arm/i.test(e)&&(n="RT"),[Kv,n]}return[Kv,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>{if(t&&t[3]){var e=[t[3],t[4],t[5]||"0"];return[Sv,e.join(".")]}return[Sv,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=void 0===t[2]?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+kv+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+kv+")","i"),t=>{if(t&&t[2]){var e=[t[2],t[3],t[4]||"0"];return[kv,e.join(".")]}return[kv,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];if(t&&t[1]){var i=[t[1],t[2],t[3]||"0"];e[1]=i.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Bv,""]],[/Linux|debian/i,["Linux",""]]],bf=function(t){return uf.test(t)?Zv:hf.test(t)?Vv:af.test(t)?Yv:new RegExp(Qv,"i").test(t)?Qv:new RegExp("("+Hv+"|WPDesktop)","i").test(t)?Hv:/iPad/.test(t)?xv:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?Mv:lf.test(t)?Ov:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(qv,"i").test(t)?qv:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?!new RegExp(Cv).test(t)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)?/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?kv:Iv:kv:new RegExp("(pda|"+Cv+")","i").test(t)?ef:new RegExp(_v,"i").test(t)&&!new RegExp(_v+" pc","i").test(t)?rf:""},yf="https?://(.*)",wf=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Cf=Fl(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],wf),Sf="<masked>";function kf(t,e){var i=Cf.concat([]),r=Bl({},function(t){var e={};return Ll(cv(t),function(t,i){"string"==typeof i&&i.startsWith("utm_")&&t&&(e[i]=t)}),e}(t));return Ll(i,function(e){if(e.startsWith("utm_")){if(!(e in r)){var i=dv(t,e);r[e]=i||null}}else{var n=dv(t,e);r[e]=n||null}}),r}function _f(t){var e=function(t){return t?0===t.search(yf+"google.([^/?]*)")?"google":0===t.search(yf+"bing.com")?"bing":0===t.search(yf+"yahoo.com")?"yahoo":0===t.search(yf+"duckduckgo.com")?"duckduckgo":null:null}(t),i="yahoo"!==e?"q":"p",r={};if(!function(t){return null===t}(e)){r.$search_engine=e;var n=Gu?dv(Gu.referrer,i):"";n.length&&(r.ph_keyword=n)}return r}function If(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function xf(){return(null==Gu?void 0:Gu.referrer)||"$direct"}function Af(){var t;return(null==Gu?void 0:Gu.referrer)&&(null===(t=uv(Gu.referrer))||void 0===t?void 0:t.host)||"$direct"}function Mf(t){var e=function(t){var e,{r:i,u:r}=t,n={$referrer:i,$referring_domain:null==i?void 0:"$direct"===i?"$direct":null===(e=uv(i))||void 0===e?void 0:e.host};if(r){n.$current_url=r;var s=uv(r);n.$host=null==s?void 0:s.host,n.$pathname=null==s?void 0:s.pathname,Bl(n,kf(r))}return i&&Bl(n,_f(i)),n}(t),i={};return Ll(e,function(t,e){var r;i["$initial_"+(r=String(e),r.startsWith("$")?r.substring(1):r)]=t}),i}function Rf(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return}}function Of(){try{return(new Date).getTimezoneOffset()}catch(t){return}}function Ef(t,e){if(!Yu)return{};var i,r,n,s=t?Fl([],wf,e||[]):[],[o,a]=function(t){for(var e=0;e<gf.length;e++){var[i,r]=gf[e],n=i.exec(t);if(n){var s="function"==typeof r?r(n,t):r;if(s)return s}}return["",""]}(Yu),h=yv(fv)||void 0,u=yv(pv)||void 0;return Bl(Dl({$os:o,$os_version:a,$browser:ff(Yu,navigator.vendor),$device:bf(Yu),$device_type:(r=Yu,n=bf(r),n===xv||n===Iv||"Kobo"===n||"Kindle Fire"===n||n===rf?_v:n===Zv||n===Yv||n===Vv||n===Qv?"Console":n===Mv?"Wearable":n?Cv:"Desktop"),$timezone:Rf(),$timezone_offset:Of(),$fb_browser_id:h,$fb_click_id:u}),{$current_url:vv(null==Zu?void 0:Zu.href,s,Sf),$host:null==Zu?void 0:Zu.host,$pathname:null==Zu?void 0:Zu.pathname,$raw_user_agent:Yu.length>1e3?Yu.substring(0,997)+"...":Yu,$browser_version:mf(Yu,navigator.vendor),$browser_language:If(),$browser_language_prefix:(i=If(),"string"==typeof i?i.split("-")[0]:void 0),$screen_height:null==$u?void 0:$u.screen.height,$screen_width:null==$u?void 0:$u.screen.width,$viewport_height:null==$u?void 0:$u.innerHeight,$viewport_width:null==$u?void 0:$u.innerWidth,$lib:"web",$lib_version:Cd,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10)})}class Tf{constructor(t,e){void 0===t&&(t="localStorage"),this.Mt=!1,this.storage=new av({method:t,cross_subdomain:e,sameSite:"Lax"}),this.userIdentity=this.generateEphemeralIdentity(),ll().debug("user","ctor","ephemeral identity only")}hydrateFromStorage(){ll().debug("user","hydrate start"),this.userIdentity=this.loadUserIdentity();var t=this.userIdentity.anonymous_id,e=this.userIdentity.distinct_id;ll().debug("user","hydrate done","anonymous_id",t?t.slice(0,12)+"...":"n/a","distinct_id",e?e.slice(0,12)+"...":"null")}generateEphemeralIdentity(){return{distinct_id:null,anonymous_id:this.generateAnonymousId(),device_id:this.generateDeviceId(),properties:{},user_state:"anonymous"}}getUserIdentity(){return i({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){var t=this.userIdentity.anonymous_id;return t||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.storage.set(Ad,this.userIdentity.anonymous_id,nv),ll().debug("user","getAnonymousId generated (was missing)",this.userIdentity.anonymous_id.slice(0,12)+"..."),this.userIdentity.anonymous_id)}getUserProperties(){return i({},this.userIdentity.properties)}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}consumeFirstVisit(){return!!this.Mt&&(this.Mt=!1,!0)}applyUpdate(t){if(void 0!==t.distinct_id&&(this.userIdentity.distinct_id=t.distinct_id),void 0!==t.user_state&&(this.userIdentity.user_state=t.user_state),void 0!==t.device_id&&(this.userIdentity.device_id=t.device_id),t.properties_set&&(this.userIdentity.properties=i({},this.userIdentity.properties,t.properties_set)),t.properties_set_once)for(var e of Object.keys(t.properties_set_once))e in this.userIdentity.properties||(this.userIdentity.properties[e]=t.properties_set_once[e]);this.saveUserIdentity()}reset(t){this.userIdentity={distinct_id:null,anonymous_id:this.generateAnonymousId(),device_id:t?this.generateDeviceId():this.userIdentity.device_id,properties:{$last_vtilt_reset:(new Date).toISOString()},user_state:"anonymous"},this.saveUserIdentity()}set_initial_person_info(t,e){if(!this.getStoredUserProperties()[Bd]){var i=function(t,e){var i=t?Fl([],wf,e||[]):[],r=null==Zu?void 0:Zu.href.substring(0,1e3);return{r:xf().substring(0,1e3),u:r?vv(r,i,Sf):void 0}}(t,e);this.register_once({[Bd]:i},void 0)}}get_initial_props(){var t=this.getStoredUserProperties()[Bd];return t?Mf(t):{}}update_referrer_info(){var t={$referrer:xf(),$referring_domain:Af()};this.register_once(t,void 0)}loadUserIdentity(){var t=this.storage.get(Ad),e=this.storage.get(xd),i=this.storage.get(Rd),r=this.storage.get(Id),n=this.getStoredUserProperties(),s=t||this.generateAnonymousId(),o=e||this.generateDeviceId(),a=i||null,h=r||"anonymous";t?ll().debug("user","hydrate","loaded from storage",t.slice(0,12)+"..."):(this.Mt=!0,ll().debug("user","hydrate","generated new anonymous_id"));var u=s||this.generateAnonymousId();return t||this.storage.set(Ad,u,nv),e||this.storage.set(xd,o,nv),r||this.storage.set(Id,h,nv),{distinct_id:a,anonymous_id:u,device_id:o,properties:n,user_state:h}}saveUserIdentity(){this.storage.set(Ad,this.userIdentity.anonymous_id,nv),this.storage.set(xd,this.userIdentity.device_id,nv),this.storage.set(Id,this.userIdentity.user_state,nv),this.userIdentity.distinct_id?this.storage.set(Rd,this.userIdentity.distinct_id,nv):this.storage.remove(Rd),this.setStoredUserProperties(this.userIdentity.properties)}getStoredUserProperties(){return this.storage.getJSON(Od)||{}}setStoredUserProperties(t){this.storage.setJSON(Od,t,nv)}register_once(t,e){var i=this.getStoredUserProperties(),r=!1;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(n in i||(i[n]=t[n],r=!0));if(e)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(s in i||(i[s]=e[s],r=!0));r&&this.setStoredUserProperties(i)}generateAnonymousId(){return"anon_"+El(16)}generateDeviceId(){return"device_"+El(16)}updateStorageMethod(t,e){this.storage=new av({method:t,cross_subdomain:e,sameSite:"Lax"})}}var Lf=["LCP","CLS","FCP","INP"];class Nf{constructor(t,e){this.Rt=!1,this.Ot=!1,this.Et=[],this.Tt=!1,this.Lt=[],this._instance=t,this.j=e}get isEnabled(){return!1!==this.j.enabled}get isStarted(){return this.Rt}get isLoaded(){return!!this.Nt}Bt(t){var e;if(this.Nt)t(this.Nt);else if(this.Et.push(t),!this.Ot){this.Ot=!0;var i=null===(e=Ju.__VTiltExtensions__)||void 0===e?void 0:e.loadExternalDependency;if(!i)return ll().error("feature",this.name,"loadExternalDependency not available"),this.Ot=!1,void(this.Et=[]);i(this._instance,this.scriptName,t=>{if(this.Ot=!1,t)return ll().error("feature",this.name,"could not load "+this.scriptName+":",t),void(this.Et=[]);this.Nt||(this.Nt=this.Ft());var e=this.Nt,i=this.Et;for(var r of(this.Et=[],i))try{r(e)}catch(t){ll().error("feature",this.name,"load callback error:",t)}})}}startIfEnabled(){this.isEnabled&&!this.Rt&&(this.Rt=!0,this.Bt(t=>this.Dt(t)))}Dt(t){}stop(){this.Rt=!1}updateConfig(t){this.j=i({},this.j,t)}jt(t){this.Tt?t():this.Lt.push(t)}Pt(){if(!this.Tt){this.Tt=!0;var t=this.Lt;for(var e of(this.Lt=[],t))try{e()}catch(t){ll().error("feature",this.name,"deferred call error:",t)}}}Ut(){this.Tt=!1,this.Lt=[]}}class Bf extends Nf{startIfEnabledOrStop(t){if(this.isEnabled){if(this.Rt&&this.Nt)return;this.Rt=!0,this.Bt(t=>this.Dt(t))}else this.stop()}}var Ff=9e5,Df="web-vitals";class jf extends Nf{static extractConfig(t){var e=t.capture_performance;return"boolean"==typeof e?{web_vitals:e}:"object"==typeof e&&null!==e?e:{web_vitals:!1}}constructor(t,e){super(t,null!=e?e:jf.extractConfig(t.getConfig())),this.name="WebVitals",this.scriptName="web-vitals",this.P=this.$t()}get isEnabled(){var t=null==Zu?void 0:Zu.protocol;return("http:"===t||"https:"===t)&&!0===this.j.web_vitals}startIfEnabled(){if(this.isEnabled&&!this.Rt&&$u){var t=this.zt();t?(this.Rt=!0,this.Nt=t,this.Wt(t)):(this.Rt=!0,this.Bt(t=>this.Dt(t)))}}stop(){this.Rt&&(this.Gt(),this.Zt&&(clearTimeout(this.Zt),this.Zt=void 0),this.Rt=!1)}onConfigUpdate(t){var e=jf.extractConfig(t),i=this.isEnabled;this.j=e,i||!this.isEnabled||this.Rt?i&&!this.isEnabled&&this.Rt&&this.stop():this.startIfEnabled()}Ft(){var t=this.zt();if(!t)throw new Error("[vTilt:web-vitals] web-vitals loaded but callbacks not registered");return t}Dt(t){this.Wt(t)}get allowedMetrics(){return this.j.web_vitals_allowed_metrics||Lf}get flushTimeoutMs(){return this.j.web_vitals_delayed_flush_ms||5e3}get maxAllowedValue(){var t=this.j.__web_vitals_max_value;return void 0===t?Ff:0===t?0:t<6e4?Ff:t}$t(){return{url:void 0,pathname:void 0,metrics:[],firstMetricTimestamp:void 0}}zt(){var t;return null===(t=Ju.__VTiltExtensions__)||void 0===t?void 0:t.webVitalsCallbacks}Wt(t){var e=this.allowedMetrics,i=this.Vt.bind(this);e.includes("LCP")&&t.onLCP&&t.onLCP(i),e.includes("CLS")&&t.onCLS&&t.onCLS(i,{reportAllChanges:!0}),e.includes("FCP")&&t.onFCP&&t.onFCP(i),e.includes("INP")&&t.onINP&&t.onINP(i),e.includes("TTFB")&&t.onTTFB&&t.onTTFB(i)}Yt(){var t;return null===(t=null==$u?void 0:$u.location)||void 0===t?void 0:t.href}Jt(){return null==Zu?void 0:Zu.pathname}Vt(t){var e,r,n;try{if(!$u||!Gu||!Zu)return;if(!(null==t?void 0:t.name)||void 0===(null==t?void 0:t.value))return void ll().warn(Df,"invalid metric received",t);if(this.maxAllowedValue>0&&t.value>=this.maxAllowedValue&&"CLS"!==t.name)return void ll().warn(Df,"ignoring "+t.name+" with value >= "+this.maxAllowedValue+"ms");var s=this.Yt(),o=this.Jt();if(!s)return void ll().warn(Df,"could not determine current URL");this.P.url&&this.P.url!==s&&this.Gt(),this.P.url||(this.P.url=s,this.P.pathname=o),this.P.firstMetricTimestamp||(this.P.firstMetricTimestamp=Date.now());var a=this.Xt(t.attribution),h=null!==(n=null===(r=(e=this._instance).getSessionId)||void 0===r?void 0:r.call(e))&&void 0!==n?n:null,u=this.Kt(),l=i({},t,{attribution:a,timestamp:Date.now(),$current_url:s,$session_id:h,$window_id:u}),c=this.P.metrics.findIndex(e=>e.name===t.name);c>=0?this.P.metrics[c]=l:this.P.metrics.push(l),this.Ht(),this.P.metrics.length>=this.allowedMetrics.length&&this.Gt()}catch(t){ll().error(Df,"error adding metric to buffer:",t)}}Xt(t){if(t){var e=i({},t);return"interactionTargetElement"in e&&delete e.interactionTargetElement,e}}Kt(){var t;try{return(null===(t=this._instance.sessionManager)||void 0===t?void 0:t.getWindowId())||null}catch(t){return null}}Ht(){this.Zt&&clearTimeout(this.Zt),this.Zt=setTimeout(()=>{this.Gt()},this.flushTimeoutMs)}Gt(){if(this.Zt&&(clearTimeout(this.Zt),this.Zt=void 0),0!==this.P.metrics.length){try{var t={$pathname:this.P.pathname,$current_url:this.P.url};for(var e of this.P.metrics)t["$web_vitals_"+e.name+"_value"]=e.value,t["$web_vitals_"+e.name+"_event"]={name:e.name,value:e.value,delta:e.delta,rating:e.rating,id:e.id,navigationType:e.navigationType,attribution:e.attribution,$session_id:e.$session_id,$window_id:e.$window_id};this._instance.capture("$web_vitals",t)}catch(t){ll().error(Df,"error flushing metrics:",t)}this.P=this.$t()}}}function Pf(t,e,i){try{if(!(e in t))return()=>{};var r=t[e],n=i(r);return el(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),t[e]=n,()=>{t[e]=r}}catch(t){return()=>{}}}class Uf{constructor(t,e){var i;this.name="HistoryAutocapture",this.Rt=!1,this._instance=t,this.j=e||Uf.extractConfig(t.getConfig()),this.qt=(null===(i=null==$u?void 0:$u.location)||void 0===i?void 0:i.pathname)||""}static extractConfig(t){return{enabled:!1!==t.capture_pageview}}get isEnabled(){return!1!==this.j.enabled&&!1!==this._instance.getConfig().capture_pageview}get isStarted(){return this.Rt}startIfEnabled(){this.isEnabled&&!this.Rt&&this.Qt()}stop(){this.Rt&&(this.te&&(this.te(),this.te=void 0),this.Rt=!1)}onConfigUpdate(t){this.j=Uf.extractConfig(t),this.isEnabled&&!this.Rt?this.Qt():!this.isEnabled&&this.Rt&&this.stop()}Qt(){$u&&Zu&&(this.qt=Zu.pathname||"",this.ee(),this.ie(),this.Rt=!0,ll().info("history-autocapture","started"))}ee(){var t,e;if(null==$u?void 0:$u.history){var i=this;(null===(t=$u.history.pushState)||void 0===t?void 0:t.__vtilt_wrapped__)||Pf($u.history,"pushState",t=>function(e,r,n){i.re(n),t.call(this,e,r,n),i.ne("pushState")}),(null===(e=$u.history.replaceState)||void 0===e?void 0:e.__vtilt_wrapped__)||Pf($u.history,"replaceState",t=>function(e,r,n){i.re(n),t.call(this,e,r,n),i.ne("replaceState")})}}re(t){var e;if(Zu){var i=Zu.pathname||"",r=null!==(e=function(t){if(!Zu)return null;if(null==t||""===t)return Zu.pathname||null;try{return new URL(String(t),Zu.href).pathname}catch(t){return null}}(t))&&void 0!==e?e:i;r!==i&&this._instance.tryCapturePageleave("spa_transition")}}ie(){if(!this.te&&$u){var t=()=>{this.ne("popstate")};Nl($u,"popstate",t),this.te=()=>{null==$u||$u.removeEventListener("popstate",t)}}}ne(t){this.isEnabled&&this.Rt&&dl(()=>{var e,i=null===(e=null==$u?void 0:$u.location)||void 0===e?void 0:e.pathname;if(i&&Zu&&Gu)if(i!==this.qt){ll().debug("history-autocapture",t,i),this.qt=i;var r={navigation_type:t};this._instance.capture(Fd,r)}else this.qt=i})}}var $f=["a","button","form","input","select","textarea","label"],zf="$copy_autocapture",Wf=['[id*="cookie" i]','[class*="cookie" i]','[id*="consent" i]','[class*="consent" i]','[id*="gdpr" i]','[class*="gdpr" i]','[id*="privacy-banner" i]','[class*="privacy-banner" i]','[id*="cookie-banner" i]','[class*="cookie-banner" i]','[id*="cookie-notice" i]','[class*="cookie-notice" i]',"#CybotCookiebotDialog",'[class^="CybotCookiebotDialog"]','[id^="onetrust"]','[class^="onetrust"]','[id^="cc-"]',".cc-banner",".cc-window",".cc-revoke",'[id^="cookieconsent"]','[class^="cookieconsent"]','[id^="gdpr-cookie"]','[id^="qc-cmp"]',"#termly-code-snippet-support",'[id^="iubenda"]','[id^="truste"]','[class^="truste"]',"#consent_blackbar",'[id^="didomi"]','[id^="usercentrics"]',"#uc-center-container",".klaro","#klaro","#cookiescript_injected",".cky-consent-container","#cky-consent","#cmplz-cookiebanner-container","#gdpr-cookie-message",'[class*="fs-cc"]','[class*="fc-cc"]',"[fs-cc]","[fs-cc-checkbox]",'[class*="cookie-preferences"]',"#cookie-preferences",'[role="dialog"][aria-label*="cookie" i]','[role="dialog"][aria-label*="consent" i]','[aria-describedby*="cookie" i]','[aria-label*="Cookie Preferences" i]'];function Gf(t){return t.replace(/^\s+|\s+$/g,"")}function Zf(t,e){return t.indexOf(e)>-1}function Vf(t){return 1===(null==t?void 0:t.nodeType)}function Yf(t){return 3===(null==t?void 0:t.nodeType)}function Jf(t,e){var i;return(null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase())===e}function Xf(t){return 11===(null==t?void 0:t.nodeType)}function Kf(t){return t?Gf(t).split(/\s+/):[]}function Hf(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className&&"string"==typeof t.className.baseVal?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return Kf(e)}function qf(t){return Qu(t)?null:Gf(t).split(/(\s+)/).filter(t=>cp(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Qf(t){var e,i="";if(vp(t)&&!fp(t)&&t.childNodes&&t.childNodes.length)for(var r=0;r<t.childNodes.length;r++){var n=t.childNodes[r];Yf(n)&&n.textContent&&(i+=null!==(e=qf(n.textContent))&&void 0!==e?e:"")}return Gf(i)}function tp(t){var e,i="";if(t&&t.childNodes&&t.childNodes.length)for(var r=0;r<t.childNodes.length;r++){var n=t.childNodes[r];if(n&&"span"===(null===(e=n.tagName)||void 0===e?void 0:e.toLowerCase()))try{i=(i+" "+Qf(n)).trim(),n.childNodes&&n.childNodes.length&&(i=(i+" "+tp(n)).trim())}catch(t){}}return i}function ep(t){var e=Qf(t);return cp(e=(e+" "+tp(t)).trim())?e:""}function ip(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do{e=e.previousSibling}while(e&&!Vf(e));return e}function rp(t){var e=t.parentNode;return!(!e||!Vf(e))&&e}function np(t){var e=null==$u?void 0:$u.location.href;return!!(e&&t&&t.some(t=>e.match(t)))}var sp="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",op=new RegExp("^(?:"+sp+")$"),ap=new RegExp(sp),hp="\\d{3}-?\\d{2}-?\\d{4}",up=new RegExp("^("+hp+")$"),lp=new RegExp("("+hp+")");function cp(t,e){if(void 0===e&&(e=!0),Qu(t))return!1;if(Hu(t)){if(t=Gf(t),(e?op:ap).test((t||"").replace(/[- ]/g,"")))return!1;if((e?up:lp).test(t))return!1}return!0}function dp(t){return!!Hu(t)&&("_ngcontent"===t.substring(0,10)||"_nghost"===t.substring(0,7))}function vp(t){for(var e=t;e&&e.parentNode&&!Jf(e,"body");e=e.parentNode){var i=Hf(e);if(Zf(i,"vt-sensitive")||Zf(i,"vt-no-capture"))return!1}if(Zf(Hf(t),"vt-include"))return!0;var r=t.type||"";if(Hu(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var n=t.name||t.id||"";if(Hu(n)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function fp(t){return!!(Jf(t,"input")&&!["button","checkbox","submit","reset","radio"].includes(t.type)||Jf(t,"textarea")||"true"===t.getAttribute("contenteditable"))}function pp(t){if(!vp(t))return null;if(Jf(t,"input")){var e=t,i=(e.type||"text").toLowerCase();if("password"===i||"hidden"===i)return null;if("checkbox"===i||"radio"===i){var r={$el_value:e.checked?"true":"false"},n=function(t){var e=t.closest("label");if(e){var i=Gf(e.textContent||"");if(i&&cp(i))return qf(i)||null}if(t.id)try{var r=null===document||void 0===document?void 0:document.querySelector('label[for="'+t.id+'"]');if(r){var n=Gf(r.textContent||"");if(n&&cp(n))return qf(n)||null}}catch(t){}return null}(e);return n?r.$selected_text=n:e.value&&cp(e.value)&&(r.$selected_text=e.value),r}var s=e.value;if(s&&cp(s)){var o=qf(s);if(o)return{$el_value:o}}return null}if(Jf(t,"select")){var a=t,h=a.selectedIndex;if(h>=0&&a.options[h]){var u=a.options[h],l={};u.value&&cp(u.value)&&(l.$el_value=u.value);var c=u.text;if(c&&cp(c)){var d=qf(c);d&&(l.$selected_text=d)}if(l.$el_value||l.$selected_text)return l}return null}return Jf(t,"textarea"),null}function mp(t,e,i,r,n){if(void 0===i&&(i=void 0),!$u)return{capture:!1,reason:"no_window"};if(!t)return{capture:!1,reason:"no_element"};if(Jf(t,"html")||!Vf(t))return{capture:!1,reason:"html_element"};if((null==i?void 0:i.url_allowlist)&&!np(i.url_allowlist))return{capture:!1,reason:"url_allowlist_miss"};if((null==i?void 0:i.url_ignorelist)&&np(i.url_ignorelist))return{capture:!1,reason:"url_ignorelist_hit"};if(null==i?void 0:i.dom_event_allowlist){var s=i.dom_event_allowlist;if(s&&!s.some(t=>e.type===t))return{capture:!1,reason:"dom_event_not_allowed"}}for(var o=!1,a=[t],h=!0,u=t;u.parentNode&&!Jf(u,"body");)if(Xf(u.parentNode))a.push(u.parentNode.host),u=u.parentNode.host;else{if(!(h=rp(u)))break;if(r||$f.indexOf(h.tagName.toLowerCase())>-1)o=!0;else{var l=$u.getComputedStyle(h);l&&"pointer"===l.getPropertyValue("cursor")&&(o=!0)}a.push(h),u=h}if(!function(t,e){var i=null==e?void 0:e.element_allowlist;if(qu(i))return!0;var r,n=function(t){if(i.some(e=>t.tagName.toLowerCase()===e))return{v:!0}};for(var s of t)if(r=n(s))return r.v;return!1}(a,i))return{capture:!1,reason:"element_allowlist_miss"};if(!function(t,e){var i=null==e?void 0:e.css_selector_allowlist;if(qu(i))return!0;var r,n=function(t){if(i.some(e=>t.matches(e)))return{v:!0}};for(var s of t)if(r=n(s))return r.v;return!1}(a,i))return{capture:!1,reason:"css_selector_allowlist_miss"};if(function(t,e){var i=null==e?void 0:e.css_selector_ignorelist,r=void 0===i?Wf:i;if(0===r.length)return!1;for(var n of t)for(var s of r)try{if(n.matches(s))return!0}catch(t){}return!1}(a,i))return{capture:!1,reason:"css_selector_ignorelist_hit"};var c=$u.getComputedStyle(t);if(c&&"pointer"===c.getPropertyValue("cursor")&&"click"===e.type)return{capture:!0};var d=t.tagName.toLowerCase();switch(d){case"html":return{capture:!1,reason:"tag_html"};case"form":return(n||["submit"]).indexOf(e.type)>=0?{capture:!0}:{capture:!1,reason:"form_event_not_allowed"};case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(e.type)>=0?{capture:!0}:{capture:!1,reason:"input_event_not_allowed"};default:return o?(n||["click"]).indexOf(e.type)>=0?{capture:!0}:{capture:!1,reason:"dom_event_not_allowed"}:(n||["click"]).indexOf(e.type)>=0&&($f.indexOf(d)>-1||"true"===t.getAttribute("contenteditable"))?{capture:!0}:{capture:!1,reason:"tag_not_capturable"}}}function gp(t,e){return e.length>t?e.slice(0,t)+"...":e}function bp(t,e,i,r){var n=t.tagName.toLowerCase(),s={tag_name:n};$f.indexOf(n)>-1&&!i&&(s.$el_text=gp(1024,"a"===n||"button"===n?ep(t):Qf(t)));var o=Hf(t);o.length>0&&(s.classes=o.filter(t=>""!==t));for(var a=0;a<t.attributes.length;a++){var h=t.attributes[a];if((!fp(t)||-1!==["name","id","class","aria-label"].indexOf(h.name))&&(!(null==r?void 0:r.includes(h.name))&&!e&&cp(h.value)&&!dp(h.name))){var u=h.value;"class"===h.name&&(u=Kf(u).join(" ")),s["attr__"+h.name]=gp(1024,u)}}for(var l=1,c=1,d=t;d=ip(d);)l++,d.tagName===t.tagName&&c++;return s.nth_child=l,s.nth_of_type=c,s}function yp(t){if(!vp(t))return{};for(var e={},i=0;i<t.attributes.length;i++){var r=t.attributes[i];if(r.name&&0===r.name.indexOf("data-vt-capture-attribute")){var n=r.name.replace("data-vt-capture-attribute-",""),s=r.value;n&&s&&cp(s)&&(e[n]=s)}}return e}function wp(t){return t.replace(/"|\\"/g,'\\"')}function Cp(t){var e=t.attr__class;return e?tl(e)?e:Kf(e):void 0}function Sp(t){return function(t){var e=t.map(t=>{var e,r,n="";if(t.tag_name&&(n+=t.tag_name),t.attr_class)for(var s of(t.attr_class.sort(),t.attr_class))n+="."+s.replace(/"/g,"");var o=i({},t.text?{text:t.text}:{},{"nth-child":null!==(e=t.nth_child)&&void 0!==e?e:0,"nth-of-type":null!==(r=t.nth_of_type)&&void 0!==r?r:0},t.href?{href:t.href}:{},t.attr_id?{attr_id:t.attr_id}:{},t.attributes),a={};return Object.entries(o).sort((t,e)=>{var[i]=t,[r]=e;return i.localeCompare(r)}).forEach(t=>{var[e,i]=t;return a[wp(e.toString())]=wp(String(i))}),(n+=":")+Object.entries(a).map(t=>{var[e,i]=t;return e+'="'+i+'"'}).join("")});return e.join(";")}(function(t){return t.map(t=>{var e,i,r={text:null===(e=t.$el_text)||void 0===e?void 0:e.slice(0,400),tag_name:t.tag_name,href:null===(i=t.attr__href)||void 0===i?void 0:i.slice(0,2048),attr_class:Cp(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return Object.entries(t).filter(t=>{var[e]=t;return 0===e.indexOf("attr__")}).forEach(t=>{var[e,i]=t;return r.attributes[e]=i}),r})}(t))}var kp=[25,50,75,100];function _p(t){var e;if(!t)return null;var i=t.milestones,r=!0===i||"object"==typeof i&&null!==i,n="object"==typeof i&&null!==i&&(null===(e=i.thresholds)||void 0===e?void 0:e.length)?[...i.thresholds].sort((t,e)=>t-e):[...kp],s=!0===t.pageleave;return r||s?{milestones:r,thresholds:n,pageleave:s,scroll_root_selector:t.scroll_root_selector}:null}class Ip{constructor(t){this.se=t,this.oe=0,this.ae=new Set,this.he=null,this.ue=null,this.le=null,this.ce=null}start(){this.stop(),this.ue=function(t){if(!$u)return null;if(t){var e=Array.isArray(t)?t:[t];for(var i of e){var r=null==Gu?void 0:Gu.querySelector(i);if(r instanceof Element)return r}}return $u}(this.se.scroll_root_selector),this.ue&&(this.he=()=>this.de(),Nl(this.ue,"scroll",this.he,{passive:!0}),this.ve(),this.ce=this.se.onPageview(()=>this.reset()))}stop(){this.ce&&(this.ce(),this.ce=null),null!=this.le&&$u&&($u.cancelAnimationFrame(this.le),this.le=null),this.he&&this.ue&&(this.ue.removeEventListener("scroll",this.he,{passive:!0}),this.he=null,this.ue=null)}reset(){this.oe=0,this.ae.clear(),this.ve()}getMaxPct(){return this.oe}de(){$u&&null==this.le&&(this.le=$u.requestAnimationFrame(()=>{this.le=null,this.ve()}))}ve(){if(this.ue){var t=function(t){var e,i,r,n,s,o;if(!t)return 0;if(t===$u){var a=null!==(e=$u.scrollY)&&void 0!==e?e:0,h=null!==(i=$u.innerHeight)&&void 0!==i?i:0,u=null==Gu?void 0:Gu.documentElement,l=null==Gu?void 0:Gu.body,c=Math.max(null!==(r=null==u?void 0:u.scrollHeight)&&void 0!==r?r:0,null!==(n=null==l?void 0:l.scrollHeight)&&void 0!==n?n:0,null!==(s=null==u?void 0:u.offsetHeight)&&void 0!==s?s:0,null!==(o=null==l?void 0:l.offsetHeight)&&void 0!==o?o:0)-h;return c<=0?100:Math.round(Math.min(100,a/c*100))}var d=t,v=d.scrollHeight-d.clientHeight;return v<=0?100:Math.round(Math.min(100,d.scrollTop/v*100))}(this.ue);if(t>this.oe&&(this.oe=t),this.se.milestones&&this.se.isUrlAllowed())for(var e of this.se.thresholds)this.oe>=e&&!this.ae.has(e)&&(this.ae.add(e),this.se.capture(Wd,{[qd]:e,[Qd]:this.oe}))}}}function xp(t,e){return t.indexOf(e)>-1}class Ap{constructor(){this.clicks=[],this.RAGE_CLICK_THRESHOLD_PX=30,this.RAGE_CLICK_TIMEOUT_MS=1e3,this.RAGE_CLICK_CLICK_COUNT=3}isRageClick(t,e,i){if(this.clicks=this.clicks.filter(t=>i-t.timestamp<this.RAGE_CLICK_TIMEOUT_MS),this.clicks.length>0){var r=this.clicks[this.clicks.length-1];Math.sqrt(Math.pow(t-r.x,2)+Math.pow(e-r.y,2))>this.RAGE_CLICK_THRESHOLD_PX&&(this.clicks=[])}return this.clicks.push({x:t,y:e,timestamp:i}),this.clicks.length>=this.RAGE_CLICK_CLICK_COUNT}}function Mp(t,e){for(var i,r,n,s,{e:o,maskAllElementAttributes:a,maskAllText:h,elementAttributeIgnoreList:u,elementsChainAsString:l,captureElementValues:c}=e,d=[t],v=t;v.parentNode&&!Jf(v,"body");)Xf(v.parentNode)?(d.push(v.parentNode.host),v=v.parentNode.host):(d.push(v.parentNode),v=v.parentNode);var f,p=[],m={},g=!1,b=!1;for(var y of d){var w=vp(y);if("a"===y.tagName.toLowerCase()){var C=y.getAttribute("href");g=!!(w&&C&&cp(C))&&C}xp(Hf(y),"vt-no-capture")&&(b=!0),p.push(bp(y,a,h,u));var S=yp(y);Object.assign(m,S)}if(b)return{props:{},explicitNoCapture:b};if(h||("a"===t.tagName.toLowerCase()||"button"===t.tagName.toLowerCase()?p[0].$el_text=ep(t):p[0].$el_text=Qf(t)),"change"===o.type&&c){var k=pp(t);k&&(k.$el_value&&(p[0].$el_value=k.$el_value),k.$selected_text&&(p[0].$selected_text=k.$selected_text))}if(g){p[0].attr__href=g;var _=null===(i=uv(g))||void 0===i?void 0:i.host,I=null===(r=null==$u?void 0:$u.location)||void 0===r?void 0:r.host;_&&I&&_!==I&&(f=g)}var x=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return Object.assign({},...e)}({$event_type:o.type,$ce_version:1},l?{}:{$elements:p},{$elements_chain:Sp(p)},(null===(n=p[0])||void 0===n?void 0:n.$el_text)?{$el_text:null===(s=p[0])||void 0===s?void 0:s.$el_text}:{},f&&"click"===o.type?{$external_click_url:f}:{},m);return{props:x}}var Rp=["copy","cut"];class Op{static extractConfig(t){return{enabled:!1!==t.autocapture}}constructor(t,e){this.name="Autocapture",this.fe=!1,this.pe=null,this.me=null,this.ge=null,this.be=new Ap,this.ye=!0,this.we=null,this.Ce=null,this.Se=null,this.ke=null,this._e=!1,this.Ie=null,this.xe=null,this._instance=t}get j(){var t=this._instance.getConfig().autocapture;if(t===this.Ce&&this.we)return this.we;this.Ce=t;var e=function(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}(t)?t:{};return e.url_allowlist&&(e.url_allowlist=e.url_allowlist.map(t=>"string"==typeof t?new RegExp(t):t)),e.url_ignorelist&&(e.url_ignorelist=e.url_ignorelist.map(t=>"string"==typeof t?new RegExp(t):t)),this.we=e,e}get isEnabled(){return this.Ae().enabled}get isStarted(){return this.fe}startIfEnabled(){var{enabled:t,reason:e}=this.Ae();t?this.fe?(this.Me(),this.Re()):(this.Oe(),this.fe=!0,ll().info("autocapture","started; listening for click/change/submit events")):this.fe?(ll().info("autocapture","stopping; reason:",null!=e?e:"unknown"),this.Ee(),this.fe=!1):(ll().debug("autocapture","not started; reason:",null!=e?e:"unknown"),this.Te())}stop(){this.fe&&(this.Ee(),this.fe=!1,ll().info("autocapture","stopped (DOM listeners detached)")),this.Te()}getMaxScrollDepthPctForPageleave(){var t=_p(this.j.scroll_depth);return(null==t?void 0:t.pageleave)&&this.Ie?this.Ie.getMaxPct():null}onConfigUpdate(t){var e=t;"boolean"==typeof e.elementsChainAsString&&(this.ye=e.elementsChainAsString),void 0!==e.autocapture_opt_out&&(this.pe=!!e.autocapture_opt_out),this.startIfEnabled()}updateConfig(t){void 0!==t.enabled&&(this.me=t.enabled,t.enabled&&(this.pe=!1),this.startIfEnabled())}getDiagnostics(){var t,e,i,{enabled:r,reason:n}=this.Ae(),s=_p(this.j.scroll_depth);return{isEnabled:r,isStarted:this.fe,disabledReason:r?null:n,inputs:{configAutocapture:this._instance.getConfig().autocapture,isDisabledServerSide:null!==(t=this.pe)&&void 0!==t&&t,userOverride:this.me,elementsChainAsString:this.ye,captureCopiedText:!!this.j.capture_copied_text,scrollDepthMilestones:null!==(e=null==s?void 0:s.milestones)&&void 0!==e&&e,scrollDepthPageleave:null!==(i=null==s?void 0:s.pageleave)&&void 0!==i&&i,scrollDepthListenerAttached:null!==this.Ie}}}setElementSelectors(t){this.ge=t}getElementSelectors(t){var e,i=[];return null===(e=this.ge)||void 0===e||e.forEach(e=>{var r=null==Gu?void 0:Gu.querySelectorAll(e);null==r||r.forEach(r=>{t===r&&i.push(e)})}),i}Ae(){if(!1===this.me)return{enabled:!1,reason:"user_stop_called"};if(this.pe)return{enabled:!1,reason:"server_opt_out"};if(!0===this.me)return{enabled:!0,reason:null};var t=this._instance.getConfig().autocapture;return!1===t?{enabled:!1,reason:"config_autocapture_false"}:null==t?{enabled:!1,reason:"config_autocapture_undefined"}:{enabled:!0,reason:null}}Oe(){this.Le()?$u&&Gu&&(this.Se=t=>{var e=t||(null==$u?void 0:$u.event);if(e)try{this.Ne(e)}catch(t){ll().error("autocapture","capture handler threw",t)}},Nl(Gu,"submit",this.Se,{capture:!0}),Nl(Gu,"change",this.Se,{capture:!0}),Nl(Gu,"click",this.Se,{capture:!0}),this.Me(),this.Re()):ll().warn("autocapture","browser unsupported (no querySelectorAll)")}Ee(){Gu&&(this.Se&&(Gu.removeEventListener("submit",this.Se,!0),Gu.removeEventListener("change",this.Se,!0),Gu.removeEventListener("click",this.Se,!0),this.Se=null),this.ke&&this._e&&(Gu.removeEventListener("copy",this.ke,!0),Gu.removeEventListener("cut",this.ke,!0),this._e=!1,this.ke=null),this.Te())}Re(){var t,e=_p(this.j.scroll_depth),i=this.isEnabled&&null!==e&&null!==_p(null==(t=this.j)?void 0:t.scroll_depth);i&&!this.Ie?(this.Ie=new Ip({milestones:e.milestones,pageleave:e.pageleave,thresholds:e.thresholds,scroll_root_selector:e.scroll_root_selector,capture:(t,e)=>this._instance.capture(t,e),isUrlAllowed:()=>{return t=this.j,!(!$u||(null==t?void 0:t.url_allowlist)&&!np(t.url_allowlist)||(null==t?void 0:t.url_ignorelist)&&np(t.url_ignorelist));var t},onPageview:t=>(this.xe&&this.xe(),this.xe=this._instance.on(Cl,e=>{(null==e?void 0:e.event)===Fd&&t()}),()=>{var t;null===(t=this.xe)||void 0===t||t.call(this),this.xe=null})}),this.Ie.start(),ll().info("autocapture","scroll depth tracking started",{milestones:e.milestones,pageleave:e.pageleave})):i||this.Te()}Te(){this.Ie&&(this.Ie.stop(),this.Ie=null,ll().info("autocapture","scroll depth tracking stopped")),this.xe&&(this.xe(),this.xe=null)}Me(){if(Gu){var t=!!this.j.capture_copied_text;t&&!this._e?(this.ke=t=>{var e=t||(null==$u?void 0:$u.event);if(e)try{this.Ne(e,zf)}catch(t){ll().error("autocapture","copy handler threw",t)}},Nl(Gu,"copy",this.ke,{capture:!0}),Nl(Gu,"cut",this.ke,{capture:!0}),this._e=!0):!t&&this._e&&this.ke&&(Gu.removeEventListener("copy",this.ke,!0),Gu.removeEventListener("cut",this.ke,!0),this._e=!1,this.ke=null)}}Ne(t,e){var i,r,n,s,o,a,h,u;if(void 0===e&&(e="$autocapture"),this.isEnabled)if(t.isTrusted){var l=function(t){var e;return qu(t.target)?t.srcElement||null:(null===(e=t.target)||void 0===e?void 0:e.shadowRoot)?t.composedPath()[0]||null:t.target||null}(t);if(Yf(l)&&(l=l.parentNode||null),"$autocapture"===e&&"click"===t.type&&t instanceof MouseEvent)this._instance.getConfig().rageclick&&(null===(i=this.be)||void 0===i?void 0:i.isRageClick(t.clientX,t.clientY,(new Date).getTime()))&&(ll().info("autocapture","$rageclick detected"),this.Ne(t,"$rageclick"));var c=e===zf;if(l){var d=mp(l,t,this.j,c,c?[...Rp]:void 0);if(d.capture){var v=this._instance.getConfig(),{props:f,explicitNoCapture:p}=Mp(l,{e:t,maskAllElementAttributes:null!==(s=v.mask_all_element_attributes)&&void 0!==s&&s,maskAllText:null!==(o=v.mask_all_text)&&void 0!==o&&o,elementAttributeIgnoreList:this.j.element_attribute_ignorelist,elementsChainAsString:this.ye,captureElementValues:null!==(a=this.j.capture_element_values)&&void 0!==a&&a});if(p)return ll().debug("autocapture","skip: vt-no-capture class on element chain",{tag:null===(h=l.tagName)||void 0===h?void 0:h.toLowerCase()}),!1;var m=this.getElementSelectors(l);if(m&&m.length>0&&(f.$element_selectors=m),e===zf){var g=qf(null===(u=null==$u?void 0:$u.getSelection())||void 0===u?void 0:u.toString()),b=t.type||"clipboard";if(!g)return ll().debug("autocapture","skip copy: empty selection"),!1;f.$selected_content=g,f.$copy_type=b}return this._instance.capture(e,f),!0}ll().debug("autocapture","skip:",null!==(r=d.reason)&&void 0!==r?r:"unknown",{type:t.type,tag:null===(n=l.tagName)||void 0===n?void 0:n.toLowerCase()})}else ll().debug("autocapture","skip: no event target",{type:t.type})}else ll().debug("autocapture","skip: synthetic event (isTrusted=false)",{type:t.type})}Le(){return el(null==Gu?void 0:Gu.querySelectorAll)}}var Ep="replay";class Tp extends Bf{constructor(t,e){super(t,e||Tp.extractConfig(t.getConfig())),this.name="SessionRecording",this.scriptName="recorder"}static extractConfig(t){var e,i,r,n=t.session_recording||{};return{enabled:null!==(e=n.enabled)&&void 0!==e&&e,sampleRate:n.sampleRate,minimumDurationMs:n.minimumDurationMs,sessionIdleThresholdMs:n.sessionIdleThresholdMs,fullSnapshotIntervalMs:n.fullSnapshotIntervalMs,captureConsole:null!==(i=n.captureConsole)&&void 0!==i&&i,captureNetwork:null!==(r=n.captureNetwork)&&void 0!==r&&r,captureCanvas:n.captureCanvas,blockClass:n.blockClass,blockSelector:n.blockSelector,skipDefaultInvisibleBlocking:n.skipDefaultInvisibleBlocking,ignoreClass:n.ignoreClass,maskTextClass:n.maskTextClass,maskTextSelector:n.maskTextSelector,maskAllInputs:n.maskAllInputs,maskInputOptions:n.maskInputOptions,masking:n.masking,recordHeaders:n.recordHeaders,recordBody:n.recordBody,compressEvents:n.compressEvents,__mutationThrottlerRefillRate:n.__mutationThrottlerRefillRate,__mutationThrottlerBucketSize:n.__mutationThrottlerBucketSize}}get isEnabled(){var t,e=this._instance.getConfig(),i=null!==(t=this.j.enabled)&&void 0!==t&&t,r=!e.disable_session_recording;return!!$u&&i&&r}get isStarted(){var t;return this.Rt&&!!(null===(t=this.Nt)||void 0===t?void 0:t.isStarted)}startIfEnabled(){this.startIfEnabledOrStop("recording_initialized")}startIfEnabledOrStop(t){var e;if(!this.isEnabled||!(null===(e=this.Nt)||void 0===e?void 0:e.isStarted)){var i=void 0!==Object.assign&&void 0!==Array.from;this.isEnabled&&i?(this.Rt=!0,this.Bt(e=>this.Dt(e,t)),ll().info(Ep,"starting")):this.stop()}}stop(){dl(()=>{var t;null===(t=this.Nt)||void 0===t||t.stop(),this.Rt=!1})}onConfigUpdate(t){var e;this.j=Tp.extractConfig(t),null===(e=this.Nt)||void 0===e||e.updateConfig(this.j),this.startIfEnabledOrStop("config_updated")}Ft(){var t,e=null===(t=Ju.__VTiltExtensions__)||void 0===t?void 0:t.initSessionRecording;if(!e)throw new Error("[vTilt:replay] initSessionRecording not available after script load");return e(this._instance,this.j)}Dt(t,e){t.start(e)}get started(){return this.isStarted}get status(){var t;return(null===(t=this.Nt)||void 0===t?void 0:t.status)||"lazy_loading"}get sessionId(){var t;return(null===(t=this.Nt)||void 0===t?void 0:t.sessionId)||""}stopRecording(){this.stop()}log(t,e){var i;void 0===e&&(e="log"),(null===(i=this.Nt)||void 0===i?void 0:i.log)?this.Nt.log(t,e):ll().warn(Ep,"log called before recorder was ready")}updateConfig(t){var e;this.j=i({},this.j,t),null===(e=this.Nt)||void 0===e||e.updateConfig(this.j)}}var Lp="vtilt-bubble-pos";function Np(t){try{localStorage.setItem(Lp,JSON.stringify(t))}catch(t){}}function Bp(t,e,i){var r=t.getBoundingClientRect(),n=r.left-e,s=r.top-i,o=window.innerWidth-t.offsetWidth-n,a=-n,h=window.innerHeight-t.offsetHeight-s,u=-s;return{x:Math.min(Math.max(e,a),o),y:Math.min(Math.max(i,u),h)}}function Fp(t,e,i){t.style.transform="translate3d("+e+"px, "+i+"px, 0)"}function Dp(t,e){var i=t,r=0,n=0,s=0,o=0,a=0,h=0,u=!1,l=!1,c=function(){try{var t=localStorage.getItem(Lp);if(!t)return null;var e=JSON.parse(t);if("number"==typeof e.x&&"number"==typeof e.y)return e}catch(t){}return null}();if(c){r=c.x,n=c.y;var d=t.style.transition;t.style.transition="none",Fp(t,r,n);var v=Bp(t,r,n);r=v.x,n=v.y,Fp(t,r,n),t.offsetHeight,t.style.transition=d}i.style.cursor="grab",i.style.touchAction="none";var f=e=>{0===e.button&&(u=!0,l=!1,s=e.clientX,o=e.clientY,a=r,h=n,i.setPointerCapture(e.pointerId),i.style.cursor="grabbing",t.style.transition="none")},p=e=>{if(u){var i=e.clientX-s,c=e.clientY-o;if(!(!l&&Math.abs(i)<5&&Math.abs(c)<5)){l=!0;var d={x:a+i,y:h+c},v=Bp(t,d.x,d.y);r=v.x,n=v.y,Fp(t,r,n)}}},m=()=>{u&&(u=!1,i.style.cursor="grab",t.style.transition="",l&&Np({x:r,y:n}))},g=t=>{l&&(t.stopPropagation(),t.preventDefault(),l=!1)},b=()=>{var e=r,i=n,s=Bp(t,r,n);r=s.x,n=s.y,Fp(t,r,n),e===r&&i===n||Np({x:r,y:n})};return i.addEventListener("pointerdown",f),i.addEventListener("pointermove",p),i.addEventListener("pointerup",m),i.addEventListener("pointercancel",m),i.addEventListener("click",g,!0),window.addEventListener("resize",b),{destroy(){i.removeEventListener("pointerdown",f),i.removeEventListener("pointermove",p),i.removeEventListener("pointerup",m),i.removeEventListener("pointercancel",m),i.removeEventListener("click",g,!0),window.removeEventListener("resize",b)}}}var jp={bottom:20,right:20,left:20};function Pp(t,e){return void 0!==t&&Number.isFinite(t)?Math.max(0,t):e}function Up(t){return null===t?i({},jp):{bottom:Pp(null==t?void 0:t.bottom,jp.bottom),right:Pp(null==t?void 0:t.right,jp.right),left:Pp(null==t?void 0:t.left,jp.left)}}function $p(t,e,i){t.style.bottom=i.bottom+"px","bottom-right"===e?(t.style.right=i.right+"px",t.style.left=""):(t.style.left=i.left+"px",t.style.right="")}var zp="chat";class Wp extends Nf{constructor(t,e){super(t,e||Wp.extractConfig(t.getConfig())),this.name="Chat",this.scriptName="chat",this.Be=null,this.Fe=!1,this.De=null,this.je=null,this.Pe=[],this.Ue=[],this.$e=[],this.ze=[],this.We=[],this.Ge=!1,this.Ze=null,this.D=()=>{if("visible"===document.visibilityState)return this.Ve(),void this.Ye();this.Je()}}static extractConfig(t){var e,i=t.chat||{};return{enabled:i.enabled,autoConfig:null===(e=i.autoConfig)||void 0===e||e,position:i.position,greeting:i.greeting,color:i.color,aiMode:i.aiMode,aiGreeting:i.aiGreeting,preload:i.preload,offlineMessage:i.offlineMessage,collectEmailOffline:i.collectEmailOffline,bubble:i.bubble}}get isEnabled(){var t;return!1!==this.j.enabled&&(!0===this.j.enabled||!this._instance.getConfig().disable_chat&&!0===(null===(t=this.Be)||void 0===t?void 0:t.enabled))}startIfEnabled(){ll().debug(zp,"startIfEnabled"),this.Xe().catch(t=>{ll().error(zp,"error starting:",t)})}stop(){this.destroy(),this.Rt=!1}onConfigUpdate(t){var e,i;this.j=Wp.extractConfig(t),this.Ke()||this.He(),this.Nt&&(null===(i=(e=this.Nt).updateConfig)||void 0===i||i.call(e,this.getMergedConfig()))}Ft(){var t,e,i,r=null===(t=Ju.__VTiltExtensions__)||void 0===t?void 0:t.initChat;if(!r)throw new Error("[vTilt:chat] initChat not available after script load");var n=this.getMergedConfig(),s=r(this._instance,n);this.Ge&&s.show(),this.$e.forEach(t=>s.onMessage(t)),this.ze.forEach(t=>s.onTyping(t)),this.We.forEach(t=>s.onConnectionChange(t)),null===(e=this.je)||void 0===e||e.destroy(),this.je=null;var o=null===(i=null==$u?void 0:$u.document)||void 0===i?void 0:i.getElementById("vtilt-chat-bubble");return o&&!o.closest("#vtilt-chat-container")&&o.remove(),s}Dt(t){this.Ue.forEach(t=>t()),this.Ue=[],t.isOpen||(this.Ve(),this.Ye()),ll().info(zp,"loaded and ready")}Xe(){var t=this;return e(function*(){var e,i;try{if(!1===t.j.enabled)return void ll().info(zp,"disabled by code config");if(t._instance.getConfig().disable_chat)return void ll().info(zp,"disabled by disable_chat config");if(!1!==t.j.autoConfig&&(yield t.qe()),!t.isEnabled)return void ll().info(zp,"not enabled (check dashboard settings)");ll().debug(zp,"startIfEnabled enabled"),t.Rt=!0,!0===t.j.preload&&t.Qe();var r=t.getMergedConfig();(null===(e=t.Be)||void 0===e?void 0:e.enabled)&&!1!==(null===(i=r.bubble)||void 0===i?void 0:i.visible)&&t.ti(),ll().info(zp,"ready (lazy-load on demand)")}finally{t.Pt()}})()}get isOpen(){var t,e;return null!==(e=null===(t=this.Nt)||void 0===t?void 0:t.isOpen)&&void 0!==e&&e}get isConnected(){var t,e;return null!==(e=null===(t=this.Nt)||void 0===t?void 0:t.isConnected)&&void 0!==e&&e}get isLoading(){var t,e;return this.Ot||null!==(e=null===(t=this.Nt)||void 0===t?void 0:t.isLoading)&&void 0!==e&&e}get unreadCount(){var t,e;return null!==(e=null===(t=this.Nt)||void 0===t?void 0:t.unreadCount)&&void 0!==e?e:0}get channel(){var t,e;return null!==(e=null===(t=this.Nt)||void 0===t?void 0:t.channel)&&void 0!==e?e:null}get channels(){var t,e;return null!==(e=null===(t=this.Nt)||void 0===t?void 0:t.channels)&&void 0!==e?e:[]}get currentView(){var t,e;return null!==(e=null===(t=this.Nt)||void 0===t?void 0:t.currentView)&&void 0!==e?e:"list"}open(){this.jt(()=>{this.Je(),this.ei(()=>{var t;return null===(t=this.Nt)||void 0===t?void 0:t.open()})})}close(){this.jt(()=>{this.Nt?(this.Nt.close(),this.Ve(),this.Ye()):this.ei(()=>{var t;null===(t=this.Nt)||void 0===t||t.close(),this.Ve(),this.Ye()})})}toggle(){this.jt(()=>{this.Nt?this.Nt.toggle():this.open()})}show(){this.jt(()=>{this.Ge=!0,this.Nt?this.Nt.show():this.Rt&&this.ti()})}hide(){this.jt(()=>{var t;if(this.Ge=!1,this.Nt)this.Nt.hide();else{var e=null===(t=null==$u?void 0:$u.document)||void 0===t?void 0:t.getElementById("vtilt-chat-bubble");e&&(e.style.display="none")}})}getChannels(){this.jt(()=>{this.ei(()=>{var t;return null===(t=this.Nt)||void 0===t?void 0:t.getChannels()})})}selectChannel(t){this.jt(()=>{this.ei(()=>{var e;return null===(e=this.Nt)||void 0===e?void 0:e.selectChannel(t)})})}createChannel(){this.jt(()=>{this.ei(()=>{var t;return null===(t=this.Nt)||void 0===t?void 0:t.createChannel()})})}goToChannelList(){this.jt(()=>{this.Nt?this.Nt.goToChannelList():this.ei(()=>{var t;return null===(t=this.Nt)||void 0===t?void 0:t.goToChannelList()})})}sendMessage(t,e){return this.Nt?this.Nt.sendMessage(t,e):new Promise((i,r)=>{this.jt(()=>{this.Nt?this.Nt.sendMessage(t,e).then(i).catch(r):(this.Pe.push({content:t,options:e,resolve:i,reject:r}),this.ei(()=>{var t,e=this.Pe;for(var i of(this.Pe=[],e))null===(t=this.Nt)||void 0===t||t.sendMessage(i.content,i.options).then(i.resolve).catch(i.reject)}))})})}markAsRead(){this.jt(()=>{this.Nt?this.Nt.markAsRead():this.ei(()=>{var t;return null===(t=this.Nt)||void 0===t?void 0:t.markAsRead()})})}registerWidget(t){this.jt(()=>{var e,i;this.Nt?null===(i=(e=this.Nt).registerWidget)||void 0===i||i.call(e,t):this.ei(()=>{var e,i;null===(i=null===(e=this.Nt)||void 0===e?void 0:e.registerWidget)||void 0===i||i.call(e,t)})})}onMessage(t){return this.$e.push(t),this.Nt?this.Nt.onMessage(t):()=>{var e=this.$e.indexOf(t);e>-1&&this.$e.splice(e,1)}}onTyping(t){return this.ze.push(t),this.Nt?this.Nt.onTyping(t):()=>{var e=this.ze.indexOf(t);e>-1&&this.ze.splice(e,1)}}onConnectionChange(t){return this.We.push(t),this.Nt?this.Nt.onConnectionChange(t):()=>{var e=this.We.indexOf(t);e>-1&&this.We.splice(e,1)}}Ke(){var t;return!0===(null===(t=this.getMergedConfig().bubble)||void 0===t?void 0:t.draggable)}getMergedConfig(){var t,e,i,r,n,s,o,a,h,u,l,c,d,v,f,p,m,g,b,y,w,C,S,k,_,I=this.Be,x=this.j;return{enabled:null!==(e=null!==(t=x.enabled)&&void 0!==t?t:null==I?void 0:I.enabled)&&void 0!==e&&e,autoConfig:null===(i=x.autoConfig)||void 0===i||i,position:null!==(n=null!==(r=x.position)&&void 0!==r?r:null==I?void 0:I.position)&&void 0!==n?n:"bottom-right",greeting:null!==(s=x.greeting)&&void 0!==s?s:null==I?void 0:I.greeting,color:null!==(a=null!==(o=x.color)&&void 0!==o?o:null==I?void 0:I.color)&&void 0!==a?a:"#6366f1",aiMode:null===(u=null!==(h=x.aiMode)&&void 0!==h?h:null==I?void 0:I.ai_enabled)||void 0===u||u,aiGreeting:null!==(l=x.aiGreeting)&&void 0!==l?l:null==I?void 0:I.ai_greeting,preload:null!==(c=x.preload)&&void 0!==c&&c,theme:null!==(d=x.theme)&&void 0!==d?d:{primaryColor:null!==(f=null!==(v=x.color)&&void 0!==v?v:null==I?void 0:I.color)&&void 0!==f?f:"#6366f1"},offlineMessage:null!==(p=x.offlineMessage)&&void 0!==p?p:null==I?void 0:I.offline_message,collectEmailOffline:null===(g=null!==(m=x.collectEmailOffline)&&void 0!==m?m:null==I?void 0:I.collect_email_offline)||void 0===g||g,bubble:{draggable:null!==(w=null!==(y=null===(b=x.bubble)||void 0===b?void 0:b.draggable)&&void 0!==y?y:null==I?void 0:I.bubble_draggable)&&void 0!==w&&w,visible:null===(k=null!==(S=null===(C=x.bubble)||void 0===C?void 0:C.visible)&&void 0!==S?S:null==I?void 0:I.bubble_visible)||void 0===k||k,offset:null===(_=x.bubble)||void 0===_?void 0:_.offset}}}He(){var t,e,i=this.getMergedConfig(),r=null!==(t=i.position)&&void 0!==t?t:"bottom-right",n=Up(null===(e=i.bubble)||void 0===e?void 0:e.offset),s=document.getElementById("vtilt-chat-bubble");s&&$p(s,r,n)}destroy(){dl(()=>{var t,e,i;this.Je(),document.removeEventListener("visibilitychange",this.D),null===(t=this.Nt)||void 0===t||t.destroy(),this.Nt=void 0,this.Ge=!1,this.Pe=[],this.Ue=[],this.$e=[],this.ze=[],this.We=[],this.Ut(),null===(e=this.je)||void 0===e||e.destroy(),this.je=null;var r=null===(i=null==$u?void 0:$u.document)||void 0===i?void 0:i.getElementById("vtilt-chat-bubble");r&&r.remove()})}qe(){var t=this;return e(function*(){if(!t.Fe){var e=t._instance.getConfig();if(!e.token)return ll().warn(zp,"cannot fetch settings: missing token"),void(t.Fe=!0);try{var i=fl(e,"/api/chat/settings"),r=yield fetch(i,{headers:pl(e)});if(!r.ok)return ll().warn(zp,"failed to fetch settings: "+r.status),void(t.Fe=!0);t.Be=yield r.json(),t.Fe=!0,ll().info(zp,"loaded settings from dashboard")}catch(e){ll().warn(zp,"error fetching settings:",e),t.Fe=!0}}})()}Ve(){var t=this;return e(function*(){var e,i,r,n,s,o,a=t._instance.getConfig(),h=a.token,u=null!==(r=null===(i=(e=t._instance).getDistinctId)||void 0===i?void 0:i.call(e))&&void 0!==r?r:"";if(ll().debug("chat","fetchUnread","distinctId",u?u.slice(0,12)+"...":"empty"),h&&u)try{var l=fl(a,"/api/chat/widget/unread"),c=l.includes("?")?"&":"?",d=""+l+c+"distinct_id="+encodeURIComponent(u),v=yield fetch(d,{headers:pl(a)});if(!v.ok)return;var f=yield v.json(),p=Number(null!==(n=f.unread_count)&&void 0!==n?n:0);null===(o=null===(s=t.Nt)||void 0===s?void 0:s.applyPolledUnreadCount)||void 0===o||o.call(s,p);var m=document.getElementById("vtilt-chat-bubble");if(!m)return;var g=m.querySelector(".vtilt-chat-bubble-badge");if(!g)return;p>0?(g.style.display="flex",g.textContent=p>99?"99+":String(p)):g.style.display="none"}catch(t){}else{var b=h?"missing distinctId":"missing token";ll().debug("chat","fetchUnread skip","reason",b)}})()}ti(){var t,e,i,r;if(null==$u?void 0:$u.document){var n=document.getElementById("vtilt-chat-bubble");if(n)return n.style.display="flex",void this.He();var s=this.getMergedConfig(),o=null!==(t=s.position)&&void 0!==t?t:"bottom-right",a=Up(null===(e=s.bubble)||void 0===e?void 0:e.offset),h=s.color||"#6366f1",u=document.createElement("div");u.id="vtilt-chat-bubble",u.setAttribute("style",("\n position: fixed;\n width: 60px;\n height: 60px;\n border-radius: 50%;\n background: "+h+";\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n transition: transform 0.2s, box-shadow 0.2s;\n z-index: 999999;\n ").trim()),$p(u,o,a),u.innerHTML='\n <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">\n <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>\n </svg>\n <div class="vtilt-chat-bubble-badge" style="\n display: none;\n position: absolute;\n top: -4px;\n right: -4px;\n background: #E53935;\n color: white;\n font-size: 11px;\n font-weight: 700;\n min-width: 20px;\n height: 20px;\n border-radius: 10px;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n box-sizing: border-box;\n border: 2px solid white;\n ">0</div>\n ';var l=!0===(null===(i=s.bubble)||void 0===i?void 0:i.draggable);l||(u.addEventListener("mouseenter",()=>{u.style.transform="scale(1.05)",u.style.boxShadow="0 6px 16px rgba(0, 0, 0, 0.2)"}),u.addEventListener("mouseleave",()=>{u.style.transform="scale(1)",u.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"})),u.addEventListener("click",()=>{this.open()}),document.body.appendChild(u),l&&(null===(r=this.je)||void 0===r||r.destroy(),this.je=Dp(u)),this.Ve(),this.Ye(),document.addEventListener("visibilitychange",this.D)}}ii(){return"undefined"!=typeof document&&("visible"===document.visibilityState&&(!!document.getElementById("vtilt-chat-bubble")||!(!this.Nt||this.Nt.isOpen)))}Ye(){this.ii()&&null===this.Ze&&(this.Ze=setInterval(()=>{this.Ve()},3e4))}Je(){null!==this.Ze&&(clearInterval(this.Ze),this.Ze=null)}Qe(){"undefined"!=typeof requestIdleCallback?requestIdleCallback(()=>this.Bt(()=>{}),{timeout:5e3}):setTimeout(()=>this.Bt(()=>{}),3e3)}ei(t){this.Nt?t():(this.Ue.push(t),this.Bt(t=>this.Dt(t)))}}function Gp(t,e){t("js",new Date);var{tagIds:r,configParams:n,sendPageView:s,debugMode:o,conversionLinker:a,linkerDomains:h}=e,u=i({},n||{});for(var l of(!1===s&&(u.send_page_view=!1),o&&(u.debug_mode=!0),!1===a&&(u.conversion_linker=!1),h&&h.length>0&&(u.linker={domains:h,decorate_forms:!0}),r))l&&t("config",l,u)}function Zp(t,e){var i,r=(t.tagIds||[]).filter(t=>!!t);if(0===r.length)return null;var n,s,o,a=null!==(i=t.proxyMode)&&void 0!==i?i:"proxied";if("direct"===a)n=Yp,s=Yp,o="";else{var h=function(t){var e,i=void 0!==$u&&(null===(e=null==$u?void 0:$u.location)||void 0===e?void 0:e.origin)?$u.location.origin:"";if(!t)return i?{base:i,absoluteBase:i}:null;var r=t.replace(/\/+$/g,"");if(!r)return i?{base:i,absoluteBase:i}:null;try{var n=new URL(r),s=n.pathname.replace(/\/$/,""),o=""+n.origin+s;return{base:o,absoluteBase:o}}catch(t){}if(r.startsWith("/"))return{base:r,absoluteBase:i?""+i+r:r};return i?{base:i,absoluteBase:i}:null}(e);if(!h)return null;n=h.base,s=h.absoluteBase,o=Vp}var u={};if("direct"!==a){var l=function(t){if(!t)return"";var e=t.startsWith("/")?t:"/"+t;return e.replace(/\/$/,"")}(o);u.transport_url=""+s.replace(/\/$/,"")+l}return{origin:n,gatewayPath:o,primaryTagId:r.find(t=>t.startsWith("G-"))||r[0]||"",tagIds:r,configParams:u,sendPageView:!1!==t.capturePageview,debugMode:!!t.debugMode,conversionLinker:!1!==t.conversionLinker,linkerDomains:t.linkerDomains}}var Vp="/gt",Yp="https://www.googletagmanager.com";function Jp(t,e){var r=!0===t.advertising,n={ad_storage:r?"granted":"denied",ad_user_data:r?"granted":"denied",ad_personalization:r?"granted":"denied",analytics_storage:!0===t.analytics?"granted":"denied"};if(!e)return n;var s=i({},n);return Object.keys(n).forEach(i=>{var r=e[i];void 0!==r&&(s[i]=function(t,e){return"granted"===e?"granted":"denied"===e?"denied":"follow_advertising"===e?!0===t.advertising?"granted":"denied":"follow_analytics"===e&&!0===t.analytics?"granted":"denied"}(t,r))}),s}function Xp(t){if(null==t)return null;var e=String(t).trim().toLowerCase();return e||null}function Kp(t,e){if(t&&e){var i=e.split("."),r=t;for(var n of i){if(null==r||"object"!=typeof r)return;r=r[n]}return r}}function Hp(t){if("number"==typeof t&&Number.isFinite(t))return t;if("string"==typeof t&&""!==t.trim()){var e=Number(t);if(Number.isFinite(e))return e}}function qp(t){if(null!=t)return"string"==typeof t?t:"number"==typeof t||"boolean"==typeof t?String(t):void 0}function Qp(t){var{mapping:e,payload:i}=t,r={send_to:e.send_to},n=e.value_param_path||"value",s=e.currency_param_path||"currency",o=Hp(Kp(i,n));void 0!==o&&(r.value=o);var a=qp(Kp(i,s))||e.default_currency||void 0;if(a&&(r.currency=a),!1!==e.send_transaction_id){var h=qp(Kp(i,e.transaction_id_param_path||"transaction_id"));h&&(r.transaction_id=h)}return{send_to:e.send_to,params:r}}var tm=[{source:"$pageview",destination:"page_view",buildParams:t=>{var e,i={},r=qp(t.$current_url);r&&(i.page_location=r);var n=qp(t.$pathname);n&&(i.page_path=n);var s=null!==(e=qp(t.title))&&void 0!==e?e:qp(t.$title);s&&(i.page_title=s);var o=qp(t.$referrer);return o&&(i.page_referrer=o),i}},{source:"$pageleave",destination:"user_engagement",buildParams:t=>{var e,i,r={},n=Hp(null!==(i=null!==(e=t.$dwell_time_ms)&&void 0!==e?e:t.engagement_time_msec)&&void 0!==i?i:t.$time_on_page_ms);return void 0!==n&&(r.engagement_time_msec=Math.round(n)),r}}];function em(t,e,i){var r=e.split(".").filter(Boolean);if(0!==r.length)if(1!==r.length){for(var n=t,s=0;s<r.length-1;s++){var o=r[s],a=r[s+1];if(null==n||"object"!=typeof n||Array.isArray(n))return;var h=n;if(/^\d+$/.test(a)){var u=Array.isArray(h[o])?h[o]:[];Array.isArray(h[o])||(h[o]=u);for(var l=parseInt(a,10);u.length<=l;)u.push({});if(s+1===r.length-1)return void(u[l]=i);var c=u[l];c&&"object"==typeof c&&!Array.isArray(c)||(c={},u[l]=c),n=c,s++}else{var d=h[o];d&&"object"==typeof d&&!Array.isArray(d)||(d={},h[o]=d),n=d}}var v=r[r.length-1];n&&"object"==typeof n&&!Array.isArray(n)&&(n[v]=i)}else t[r[0]]=i}var im=new Set(["client_id","user_id","first_visit","session_start"]);function rm(t,e,i,r){if(!function(t,e){return!(e&&(Array.isArray(e.exclude)&&e.exclude.includes(t)||Array.isArray(e.include)&&e.include.length>0&&!e.include.includes(t)))}(e,r.eventFilter))return{fired:!1};var n=(r.eventMappings||[]).find(t=>(null==t?void 0:t.source)===e);if(n&&n.destination){var{name:s,params:o}=function(t,e){var i={},r=Array.isArray(t.param_mappings)?t.param_mappings:[];for(var n of r){var s=null==n?void 0:n.source,o=null==n?void 0:n.destination;if(s&&o){var a=Kp(e,s);void 0!==a&&(o.includes(".")?em(i,o,a):i[o]=a)}}return{name:t.destination,params:i}}(n,i);return t("event",s,o),{fired:!0,eventName:s,params:o,source:"mapping"}}if(!1===r.autoForward)return{fired:!1};var a=tm.find(t=>t.source===e);if(a){var h=a.buildParams(i);return t("event",a.destination,h),{fired:!0,eventName:a.destination,params:h,source:"preset"}}if(e.startsWith("$"))return{fired:!1};var u=function(t){var e={};for(var[i,r]of Object.entries(t))i.startsWith("$")||im.has(i)||void 0!==r&&(e[i]=r);return e}(i);return t("event",e,u),{fired:!0,eventName:e,params:u,source:"auto"}}function nm(){var t=null,e=[],i=[];return{call:function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];if((t=>{i.push(t),i.length>50&&i.shift()})(n),t)try{t(...n)}catch(t){}else e.push(n)},flush(i){for(t=i;e.length;){var r=e.shift();try{i(...r)}catch(t){}}},getRecentCalls:()=>i.slice()}}function sm(t){return om.apply(this,arguments)}function om(){return om=e(function*(t){try{var e="undefined"!=typeof crypto&&crypto.subtle?crypto.subtle:null;if(!e)return null;var i=(new TextEncoder).encode(t),r=yield e.digest("SHA-256",i),n=Array.from(new Uint8Array(r)).map(t=>t.toString(16).padStart(2,"0")).join("");return n}catch(t){return null}}),om.apply(this,arguments)}function am(){return(am=e(function*(t){var e={},i=function(t){if(!t)return null;var e=String(t).trim().toLowerCase();if(!e)return null;if(!e.includes("@"))return null;var[i,r]=e.split("@");if(!i||!r)return null;if("gmail.com"===r||"googlemail.com"===r){var n=i.split("+")[0].replace(/\./g,"");return n?n+"@"+r:null}return i+"@"+r}(t.email),r=function(t){if(!t)return null;var e=String(t).trim();if(!e)return null;if(e.startsWith("+")){var i=e.slice(1).replace(/\D/g,"");return i?"+"+i:null}return null}(t.phone),n=Xp(t.first_name),s=Xp(t.last_name),o=Xp(t.street),a=Xp(t.city),h=Xp(t.region),u=function(t){if(!t)return null;var e=String(t).trim().toUpperCase().replace(/\s+/g,"");return e||null}(t.postal_code),l=Xp(t.country);if(i){var c=yield sm(i);c&&(e.sha256_email_address=c)}if(r){var d=yield sm(r);d&&(e.sha256_phone_number=d)}var v={};if(n){var f=yield sm(n);f&&(v.sha256_first_name=f)}if(s){var p=yield sm(s);p&&(v.sha256_last_name=p)}if(o){var m=yield sm(o);m&&(v.sha256_street=m)}return a&&(v.city=a),h&&(v.region=h),u&&(v.postal_code=u),l&&(v.country=l),Object.keys(v).length>0&&(e.address=v),0===Object.keys(e).length?null:e})).apply(this,arguments)}class hm{constructor(t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.ri=t,this.ni=[]}get length(){return this.ni.length}enqueue(t){return!(this.ni.length>=this.ri)&&(this.ni.push(t),!0)}takeAll(){if(0===this.ni.length)return[];var t=this.ni;return this.ni=[],t}clear(){this.ni=[]}}var um="google-tag";class lm{constructor(t,e){this.name="GoogleTagGateway",this.Rt=!1,this.si=!1,this.oi=!1,this.ai=!1,this.hi=null,this.ui=null,this.li=null,this.ci=null,this.di=[],this.fi=100,this.pi=new hm(100),this._instance=t,this.j=e||lm.extractConfig(t.getConfig()),this.mi=nm(),this.gi()}static extractConfig(t){if(t.disable_google_tag)return{enabled:!1};var e=t.google_tag;return e?{enabled:(e.tagIds||[]).some(t=>!!t),remote:e}:{enabled:!1}}get isEnabled(){return!1!==this.j.enabled&&!!this.j.remote}get isStarted(){return this.Rt}get gtag(){return this.mi.call}get deliveryLog(){return this.di.slice()}startIfEnabled(){this.Rt||this.isEnabled&&this._instance.getConfig().__remote_config_loaded&&this.Qt()}stop(){var t;this.Rt&&(null===(t=this.ci)||void 0===t||t.call(this),this.ci=null,this.Rt=!1)}onConfigUpdate(t){var e=lm.extractConfig(t),i=this.isEnabled;this.j=e;var r=!0===t.__remote_config_loaded;if(i&&!this.isEnabled)this.stop();else if(this.Rt&&e.remote&&this.ui){var n=Zp(e.remote,this._instance.getConfig().api_host);n&&(this.ui=n,Gp(this.hi,n))}r&&!this.isEnabled&&this.pi.clear(),r&&this.isEnabled&&!this.Rt&&this.startIfEnabled()}setUserData(t){var i=this;return e(function*(){var e=i.j.remote;if(e&&e.enhancedConversions){var r=yield function(t){return am.apply(this,arguments)}(t);r&&i.mi.call("set","user_data",r)}})()}getRecentPublicCalls(){return this.mi.getRecentCalls()}Qt(){var t=this.j.remote;if(t){var e=Zp(t,this._instance.getConfig().api_host);if(e){this.ui=e;var{gtag:i}=function(){var t,e,i=Ju,r=null!==(t=(e=i).dataLayer)&&void 0!==t?t:e.dataLayer=[],n=i.gtag;if(n)return{gtag:n,dataLayer:r};var s=function(){r.push(arguments)};return i.gtag=s,{gtag:s,dataLayer:r}}();this.hi=i,this.mi.flush(i),this.bi(),Gp(i,e),this.si||(this.si=!0,function(t,e,i){var r=null==$u?void 0:$u.document;if(!r)return null;var{origin:n,gatewayPath:s,primaryTagId:o}=t;if(!n||!o)return null;var a=""+n.replace(/\/$/,"")+(s?s.startsWith("/")?s.replace(/\/$/,""):"/"+s.replace(/\/$/,""):"")+"/gtag/js?id="+encodeURIComponent(o)+"&l=dataLayer",h=r.querySelector('script[data-vtilt-gtag-loader="'+o+'"]');if(h)return h;var u=r.createElement("script");u.async=!0,u.src=a,u.setAttribute("data-vtilt-gtag-loader",o),u.onload=()=>null==e?void 0:e(),u.onerror=()=>{var t=new Error("[GoogleTagGateway] failed to load "+a);null==i||i(t)},(r.head||r.body||r.documentElement).appendChild(u)}(e,()=>{this.oi=!0},t=>{ll().warn(um,t.message)})),this.yi(),this.Rt=!0,this.wi()}else ll().warn(um,"skipped — missing tag_ids or resolvable origin")}}wi(){for(var t of this.pi.takeAll())this.Ci(t.event,t.payload)}bi(){var t;if(!this.ai&&this.hi){var e=dl(()=>this._instance.consentManager.getConsent());!function(t,e,r){t("consent","default",i({},Jp(e,r),{wait_for_update:500}))}(this.hi,e||{},null===(t=this.j.remote)||void 0===t?void 0:t.consentOverride),this.ai=!0}}gi(){if(!this.li){this.li=this._instance._emitter.on(Cl,t=>{var e=t;e&&"string"==typeof e.event&&this.Ci(e.event,e.payload||{})})}}Ci(t,e){var i=this._instance.getConfig();if(!i.disable_google_tag)if(i.__remote_config_loaded){if(this.isEnabled&&(this.Rt||this.startIfEnabled(),this.hi&&this.j.remote&&this.Rt)){var r=this.j.remote,n=r.tagIds||[],s=rm(this.hi,t,e,r);if(s.fired&&s.eventName&&this.Si({ts:Date.now(),tag_ids:n,event_name:t,send_to:"ga4:"+s.eventName,status:"fired",reason:s.source}),!1!==r.sendAdsConversions){var o=function(t,e,i,r){var n=(r.conversions||[]).filter(t=>t.event_name===e);if(0===n.length)return[];var s=[];for(var o of n){var a=Qp({mapping:o,payload:i});t("event","conversion",a.params),s.push(a)}return s}(this.hi,t,e,r);for(var a of o)this.Si({ts:Date.now(),tag_ids:n,event_name:t,send_to:a.send_to,status:"fired"})}}}else this.pi.enqueue({event:t,payload:e})}yi(){if(!this.ci){this.ci=this._instance._emitter.on(wl,t=>{var e;if(this.hi){var i,r,n,s=t;i=this.hi,r=s.consent||{},n=null===(e=this.j.remote)||void 0===e?void 0:e.consentOverride,i("consent","update",Jp(r,n))}})}}Si(t){this.di.push(t),this.di.length>this.fi&&this.di.shift()}}var cm="vtd-overlay";class dm{constructor(t,e){this.name="VtdOverlay",this.Rt=!1,this.ki=null,this.Ii=null,this.Ot=!0,this.xi=null,this.Ai=null,this.Mi=null,this._instance=t,this.j=e||dm.extractConfig(t.getConfig())}static extractConfig(t){return{enabled:!1!==t.vtd_overlay}}get isEnabled(){return!1!==this.j.enabled}get isStarted(){return this.Rt}startIfEnabled(){}stop(){this.Rt&&dl(()=>{this.Ri(),this.Rt=!1})}onConfigUpdate(t){this.j=dm.extractConfig(t),!this.isEnabled&&this.Rt&&this.stop()}setDestinationUrl(t){var e;if(this.isEnabled)if(null==t?void 0:t.trim()){var i=t;try{i=decodeURIComponent(t)}catch(e){i=t}if(this.Oi(i)){var r=this.Ei(i);this.Ii=i,this.ki=r,this.Ot=!0,this.Ti(),this.Rt=!0,this._instance.capture("$vtd_view",{$vtd_url:i,$vtd_embed_url:r!==i?r:void 0,$current_url:null===(e=null==$u?void 0:$u.location)||void 0===e?void 0:e.href})}else ll().warn(cm,"invalid URL: "+i)}else ll().warn(cm,"empty URL provided");else ll().warn(cm,"feature is disabled")}getDestinationUrl(){return this.ki}close(){this._instance.capture("$vtd_close",{$vtd_url:this.Ii}),this.xi?(this.xi.classList.add("vtilt-vtd-closing"),setTimeout(()=>{this.Ri(),this.Rt=!1,this.ki=null,this.Ii=null},200)):(this.Ri(),this.Rt=!1,this.ki=null,this.Ii=null)}Oi(t){try{var e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol}catch(t){return!1}}Ei(t){try{var e=new URL(t),i=e.hostname.toLowerCase();if("youtube.com"===i||"www.youtube.com"===i||"m.youtube.com"===i){var r=e.searchParams.get("v");if(r){var n=e.searchParams.get("t"),s="https://www.youtube.com/embed/"+r+"?autoplay=1";return n&&(s+="&start="+n.replace("s","")),s}}if("youtu.be"===i){var o=e.pathname.slice(1);if(o){var a=e.searchParams.get("t"),h="https://www.youtube.com/embed/"+o+"?autoplay=1";return a&&(h+="&start="+a.replace("s","")),h}}if("vimeo.com"===i||"www.vimeo.com"===i){var u=e.pathname.match(/^\/(\d+)/);if(u)return"https://player.vimeo.com/video/"+u[1]+"?autoplay=1"}if("loom.com"===i||"www.loom.com"===i){var l=e.pathname.match(/^\/share\/([a-zA-Z0-9]+)/);if(l)return"https://www.loom.com/embed/"+l[1]+"?autoplay=1"}if(i.endsWith("wistia.com")){var c=e.pathname.match(/^\/medias\/([a-zA-Z0-9]+)/);if(c)return"https://fast.wistia.net/embed/iframe/"+c[1]+"?autoplay=1"}if("dailymotion.com"===i||"www.dailymotion.com"===i){var d=e.pathname.match(/^\/video\/([a-zA-Z0-9]+)/);if(d)return"https://www.dailymotion.com/embed/video/"+d[1]+"?autoplay=1"}if("open.spotify.com"===i){var v=e.pathname.match(/^\/(track|album|playlist|episode|show)\/([a-zA-Z0-9]+)/);if(v)return"https://open.spotify.com/embed/"+v[1]+"/"+v[2]}return"drive.google.com"===i&&e.pathname.includes("/view")?t.replace("/view","/preview"):t}catch(e){return t}}Li(t){try{return new URL(t).hostname}catch(e){return t}}Ni(t){try{return"https://www.google.com/s2/favicons?domain="+new URL(t).hostname+"&sz=32"}catch(t){return""}}Ti(){if(Gu&&this.ki){this.Ri(),this.xi=Gu.createElement("div"),this.xi.id="vtilt-vtd-overlay",this.xi.className="vtilt-vtd-opening",this.xi.setAttribute("style",this.Bi());var t=Gu.createElement("div");t.className="vtilt-vtd-modal",t.setAttribute("style",this.Fi());var e=Gu.createElement("div");e.className="vtilt-vtd-header",e.setAttribute("style",this.Di()),e.innerHTML=this.ji(),t.appendChild(e);var i=Gu.createElement("div");i.className="vtilt-vtd-iframe-wrapper",i.setAttribute("style",this.Pi()),this.Mi=Gu.createElement("div"),this.Mi.className="vtilt-vtd-loading",this.Mi.setAttribute("style",this.Ui()),this.Mi.innerHTML=this.$i(),i.appendChild(this.Mi),this.Ai=Gu.createElement("iframe"),this.Ai.id="vtilt-vtd-iframe",this.Ai.className="vtilt-vtd-iframe",this.Ai.setAttribute("style",this.zi()),this.Ai.setAttribute("frameborder","0"),this.Ai.setAttribute("allowfullscreen","true"),this.Ai.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share");var r=()=>{this.Ot=!1,this.Mi&&(this.Mi.style.opacity="0",setTimeout(()=>{var t;(null===(t=this.Mi)||void 0===t?void 0:t.parentNode)&&(this.Mi.style.display="none")},300)),this.Ai&&(this.Ai.style.opacity="1")};this.Ai.onload=r,this.Ai.onerror=r,setTimeout(()=>{this.Ot&&r()},5e3),i.appendChild(this.Ai),this.Ai.src=this.ki,t.appendChild(i),this.xi.appendChild(t);var n=Gu.createElement("style");n.id="vtilt-vtd-styles",n.textContent=this.Wi(),Gu.head.appendChild(n),Gu.body.appendChild(this.xi),this.Gi(),Gu.body.style.overflow="hidden"}}Ri(){var t;(null===(t=this.xi)||void 0===t?void 0:t.parentNode)&&(this.xi.parentNode.removeChild(this.xi),this.xi=null,this.Ai=null,this.Mi=null);var e=null==Gu?void 0:Gu.getElementById("vtilt-vtd-styles");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e),(null==Gu?void 0:Gu.body)&&(Gu.body.style.overflow="")}Gi(){var t,e,i,r=null===(t=this.xi)||void 0===t?void 0:t.querySelector(".vtilt-vtd-close");null==r||r.addEventListener("click",()=>this.close());var n=null===(e=this.xi)||void 0===e?void 0:e.querySelector(".vtilt-vtd-open");null==n||n.addEventListener("click",()=>{this.Ii&&(null==$u||$u.open(this.Ii,"_blank"))}),null===(i=this.xi)||void 0===i||i.addEventListener("click",t=>{t.target===this.xi&&this.close()});var s=t=>{"Escape"===t.key&&(this.close(),null==Gu||Gu.removeEventListener("keydown",s))};null==Gu||Gu.addEventListener("keydown",s)}Bi(){return'\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147483647;\n background: rgba(0, 0, 0, 0.85);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n '}Fi(){return"\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: #0a0a0a;\n overflow: hidden;\n "}Di(){return"\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 16px;\n height: 56px;\n background: linear-gradient(180deg, rgba(20, 20, 20, 1) 0%, rgba(15, 15, 15, 1) 100%);\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n flex-shrink: 0;\n gap: 16px;\n "}ji(){var t=this.Ii||this.ki,e=t?this.Li(t):"";return'\n <div style="display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;">\n <img \n src="'+(t?this.Ni(t):"")+'" \n alt="" \n style="width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0;"\n onerror="this.style.display=\'none\'"\n />\n <div style="\n display: flex;\n flex-direction: column;\n min-width: 0;\n gap: 2px;\n ">\n <div style="\n color: rgba(255, 255, 255, 0.95);\n font-size: 14px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.2;\n ">'+this.Zi(e)+'</div>\n <div style="\n color: rgba(255, 255, 255, 0.45);\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.2;\n ">'+this.Zi(this.Vi(t||"",50))+'</div>\n </div>\n </div>\n <div style="display: flex; align-items: center; gap: 8px; flex-shrink: 0;">\n <button class="vtilt-vtd-open vtilt-vtd-btn" title="Open in new tab">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>\n <polyline points="15 3 21 3 21 9"></polyline>\n <line x1="10" y1="14" x2="21" y2="3"></line>\n </svg>\n <span class="vtilt-vtd-btn-text">Open</span>\n </button>\n <button class="vtilt-vtd-close vtilt-vtd-btn vtilt-vtd-btn-primary" title="Close (Esc)">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n <span class="vtilt-vtd-btn-text">Close</span>\n </button>\n </div>\n '}Pi(){return"\n flex: 1;\n position: relative;\n background: #000;\n overflow: hidden;\n "}Ui(){return"\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: #0a0a0a;\n z-index: 1;\n transition: opacity 0.3s ease;\n "}$i(){var t=this.Ii||this.ki,e=t?this.Li(t):"";return'\n <div class="vtilt-vtd-spinner"></div>\n <div style="\n margin-top: 20px;\n color: rgba(255, 255, 255, 0.7);\n font-size: 14px;\n font-weight: 500;\n ">Loading '+this.Zi(e)+'...</div>\n <div style="\n margin-top: 8px;\n color: rgba(255, 255, 255, 0.35);\n font-size: 12px;\n ">Press <kbd style="\n display: inline-block;\n padding: 2px 6px;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 4px;\n font-family: inherit;\n font-size: 11px;\n ">Esc</kbd> to close</div>\n '}zi(){return"\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n background: white;\n opacity: 0;\n transition: opacity 0.3s ease;\n "}Wi(){return"\n /* Animations */\n @keyframes vtilt-vtd-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n \n @keyframes vtilt-vtd-fade-out {\n from { opacity: 1; }\n to { opacity: 0; }\n }\n \n @keyframes vtilt-vtd-scale-in {\n from { opacity: 0; transform: scale(0.96); }\n to { opacity: 1; transform: scale(1); }\n }\n \n @keyframes vtilt-vtd-spin {\n to { transform: rotate(360deg); }\n }\n \n /* Container animations */\n #vtilt-vtd-overlay.vtilt-vtd-opening {\n animation: vtilt-vtd-fade-in 0.2s ease-out forwards;\n }\n \n #vtilt-vtd-overlay.vtilt-vtd-opening .vtilt-vtd-modal {\n animation: vtilt-vtd-scale-in 0.25s ease-out forwards;\n }\n \n #vtilt-vtd-overlay.vtilt-vtd-closing {\n animation: vtilt-vtd-fade-out 0.2s ease-in forwards;\n }\n \n /* Loading spinner */\n .vtilt-vtd-spinner {\n width: 40px;\n height: 40px;\n border: 3px solid rgba(255, 255, 255, 0.1);\n border-top-color: rgba(255, 255, 255, 0.8);\n border-radius: 50%;\n animation: vtilt-vtd-spin 0.8s linear infinite;\n }\n \n /* Button base styles */\n .vtilt-vtd-btn {\n background: rgba(255, 255, 255, 0.08);\n border: 1px solid rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.9);\n padding: 8px 14px;\n border-radius: 8px;\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 6px;\n transition: all 0.15s ease;\n -webkit-tap-highlight-color: transparent;\n outline: none;\n }\n \n .vtilt-vtd-btn:hover {\n background: rgba(255, 255, 255, 0.14);\n border-color: rgba(255, 255, 255, 0.18);\n }\n \n .vtilt-vtd-btn:active {\n background: rgba(255, 255, 255, 0.18);\n transform: scale(0.98);\n }\n \n .vtilt-vtd-btn:focus-visible {\n box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);\n }\n \n /* Primary button variant */\n .vtilt-vtd-btn-primary {\n background: rgba(255, 255, 255, 0.95);\n border-color: transparent;\n color: #0a0a0a;\n }\n \n .vtilt-vtd-btn-primary:hover {\n background: rgba(255, 255, 255, 1);\n border-color: transparent;\n }\n \n .vtilt-vtd-btn-primary:active {\n background: rgba(255, 255, 255, 0.85);\n }\n \n /* Desktop responsive - modal with margin */\n @media (min-width: 768px) {\n #vtilt-vtd-overlay {\n padding: 32px;\n }\n \n .vtilt-vtd-modal {\n max-width: 1200px;\n max-height: 90vh;\n width: 100%;\n height: auto;\n min-height: 500px;\n border-radius: 16px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);\n }\n \n .vtilt-vtd-header {\n border-radius: 16px 16px 0 0;\n }\n \n .vtilt-vtd-iframe-wrapper {\n border-radius: 0 0 16px 16px;\n min-height: 400px;\n }\n }\n \n /* Large desktop - bigger modal */\n @media (min-width: 1400px) {\n #vtilt-vtd-overlay {\n padding: 48px;\n }\n \n .vtilt-vtd-modal {\n max-width: 1400px;\n max-height: 85vh;\n }\n }\n \n /* Tablet */\n @media (min-width: 768px) and (max-width: 1024px) {\n #vtilt-vtd-overlay {\n padding: 24px;\n }\n \n .vtilt-vtd-modal {\n max-width: 95%;\n max-height: 90vh;\n }\n }\n \n /* Mobile - fullscreen */\n @media (max-width: 767px) {\n #vtilt-vtd-overlay {\n padding: 0 !important;\n background: #0a0a0a !important;\n }\n \n .vtilt-vtd-modal {\n width: 100% !important;\n height: 100% !important;\n max-width: none !important;\n max-height: none !important;\n border-radius: 0 !important;\n }\n \n .vtilt-vtd-header {\n border-radius: 0 !important;\n padding: 0 12px !important;\n height: 52px !important;\n }\n \n .vtilt-vtd-btn {\n padding: 8px 10px !important;\n }\n \n .vtilt-vtd-btn-text {\n display: none !important;\n }\n \n .vtilt-vtd-iframe-wrapper {\n border-radius: 0 !important;\n }\n }\n \n /* Reduced motion */\n @media (prefers-reduced-motion: reduce) {\n #vtilt-vtd-overlay,\n #vtilt-vtd-overlay *,\n .vtilt-vtd-spinner {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n }\n "}Vi(t,e){return t.length<=e?t:t.substring(0,e-3)+"..."}Zi(t){if(void 0===Gu)return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");var e=Gu.createElement("div");return e.textContent=t,e.innerHTML}}var vm,fm="text/plain",pm=61440;!function(t){t.GZipJS="gzip-js",t.Base64="base64",t.None="none"}(vm||(vm={}));var mm=function(t,e){void 0===e&&(e="binary");var{data:i,compression:r}=t;if(i){var n=(t=>JSON.stringify(t,(t,e)=>"bigint"==typeof e?e.toString():e))(i),s=new Blob([n]).size;if(r===vm.GZipJS&&s>=1024)try{var o=xc(Rc(n),{mtime:0});if("text-base64"===e){var a=Oc(o);if(a.length>0&&a.length<.95*s)return{contentType:fm,body:a,estimatedSize:a.length,compressionApplied:vm.Base64}}else{var h=new Blob([o],{type:fm});if(h.size>0&&h.size<.95*s)return{contentType:fm,body:h,estimatedSize:h.size,compressionApplied:vm.GZipJS}}}catch(t){}return{contentType:"application/json",body:n,estimatedSize:s,compressionApplied:null}}};function gm(t,e){return e.compressionApplied?function(t,e){var i=t.includes("?")?"&":"?";return""+t+i+"compression="+e}(t.url,e.compressionApplied):t.url}function bm(t,e){var i={};return e&&(i["Content-Type"]=e),t.headers&&Object.assign(i,t.headers),t.projectToken&&(i[vl]=t.projectToken),i}var ym=[{name:"fetch",isAvailable:()=>"undefined"!=typeof fetch,method:t=>{var i=mm(t,"binary");if(i){var{contentType:r,body:n,estimatedSize:s}=i,o=gm(t,i),a=bm(t,r),h=new AbortController,u=t.timeout?setTimeout(()=>h.abort(),t.timeout):null;fetch(o,{method:t.method||"POST",headers:a,body:n,keepalive:s<pm,signal:h.signal}).then(function(){var i=e(function*(e){var i,r=yield e.text(),n={statusCode:e.status,text:r};if(200===e.status){Ml();try{n.json=JSON.parse(r)}catch(t){}}null===(i=t.callback)||void 0===i||i.call(t,n)});return function(t){return i.apply(this,arguments)}}()).catch(()=>{var e;Al("capture"),null===(e=t.callback)||void 0===e||e.call(t,{statusCode:0})}).finally(()=>{u&&clearTimeout(u)})}}},{name:"XHR",isAvailable:()=>"undefined"!=typeof XMLHttpRequest,method:t=>{var e=mm(t,"binary");if(e){var{contentType:i,body:r}=e,n=gm(t,e),s=bm(t,i),o=new XMLHttpRequest;for(var[a,h]of(o.open(t.method||"POST",n,!0),Object.entries(s)))o.setRequestHeader(a,h);t.timeout&&(o.timeout=t.timeout),o.onreadystatechange=()=>{var e;if(4===o.readyState){var i={statusCode:o.status,text:o.responseText};if(200===o.status){Ml();try{i.json=JSON.parse(o.responseText)}catch(t){}}null===(e=t.callback)||void 0===e||e.call(t,i)}},o.onerror=()=>{var e;Al("capture"),null===(e=t.callback)||void 0===e||e.call(t,{statusCode:0})},o.send(r)}}},{name:"sendBeacon",isAvailable:()=>"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:t=>{var e=mm(t,"text-base64");if(e){var{contentType:r,body:n,estimatedSize:s}=e;if(0!==s){var o=gm(t,e),a=t.projectToken?function(t,e){if(!e||/[?&]token=/.test(t))return t;var i=t.includes("?")?"&":"?";return""+t+i+"token="+e}(o,t.projectToken):o;if(s<=pm)try{var h="string"==typeof n?new Blob([n],{type:r}):n;if("undefined"!=typeof navigator&&navigator.sendBeacon)if(navigator.sendBeacon(a,h))return}catch(t){}try{var u="string"==typeof n?new Blob([n],{type:r}):n,l=i({"Content-Type":r},t.headers||{});fetch(a,{method:t.method||"POST",headers:l,body:u,keepalive:s<pm}).catch(()=>{})}catch(t){}}}}}],wm=t=>{var e,i;if(Rl())null===(e=t.callback)||void 0===e||e.call(t,{statusCode:0});else{var r=t.transport||"fetch",n=ym.find(t=>t.name===r&&t.isAvailable())||ym.find(t=>t.isAvailable());if(!n)return ll().error("request","no available transport method"),void(null===(i=t.callback)||void 0===i||i.call(t,{statusCode:0}));n.method(t)}};class Cm{constructor(t,e){var i,r,n,s;this.Yi=!0,this.Ji=[],this.Xi=(i=(null==e?void 0:e.flush_interval_ms)||3e3,r=250,n=5e3,s=3e3,"number"!=typeof i||isNaN(i)?s:Math.min(Math.max(i,r),n)),this.Ki=t}get length(){return this.Ji.length}enqueue(t){this.Ji.push(t),this.Hi||this.qi()}unload(){if(this.Qi(),0!==this.Ji.length){var t=this.tr();for(var e in t){var r=t[e];this.Ki(i({},r,{transport:"sendBeacon"}))}}}enable(){this.Yi=!1,this.qi()}pause(){this.Yi=!0,this.Qi()}flush(){this.Qi(),this.er(),this.qi()}qi(){this.Yi||(this.Hi=setTimeout(()=>{this.Qi(),this.er(),this.Ji.length>0&&this.qi()},this.Xi))}Qi(){this.Hi&&(clearTimeout(this.Hi),this.Hi=void 0)}er(){if(0!==this.Ji.length){var t=this.tr(),e=Date.now();for(var i in t){var r=t[i];r.events.forEach(t=>{var i=new Date(t.timestamp).getTime();t.$offset=Math.abs(i-e)}),this.Ki(r)}}}tr(){var t={};return this.Ji.forEach(e=>{var i=e.batchKey||e.url;t[i]||(t[i]={url:e.url,events:[],batchKey:e.batchKey}),t[i].events.push(e.event)}),this.Ji=[],t}}class Sm{constructor(t){this.ir=!1,this.rr=3e3,this.Ji=[],this.nr=!0,this.Ki=t.sendRequest,this.sr=t.sendBeacon,$u&&void 0!==Wu&&"onLine"in Wu&&(this.nr=Wu.onLine,Nl($u,"online",()=>{this.nr=!0,this.Gt()}),Nl($u,"offline",()=>{this.nr=!1}))}get length(){return this.Ji.length}enqueue(t,e){if(void 0===e&&(e=0),e>=10)ll().error("retry","request failed after 10 retries, giving up");else if(!Rl()){var i=function(t){var e=3e3*Math.pow(2,t),i=e/2,r=Math.min(18e5,e),n=(Math.random()-.5)*(r-i);return Math.ceil(r+n)}(e),r=Date.now()+i;this.Ji.push({retryAt:r,request:t,retriesPerformedSoFar:e+1});var n="enqueued failed request for retry in "+Math.round(i/1e3)+"s";this.nr||(n+=" (browser is offline)"),ll().warn("retry",n),this.ir||(this.ir=!0,this.ar())}}retriableRequest(t){var i=this;return e(function*(){try{var e=yield i.Ki(t);200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&i.enqueue(t,0)}catch(e){i.enqueue(t,0)}})()}ar(){this.hr&&clearTimeout(this.hr),this.hr=setTimeout(()=>{this.nr&&this.Ji.length>0&&this.Gt(),this.Ji.length>0?this.ar():this.ir=!1},this.rr)}Gt(){var t=this,i=Date.now(),r=[],n=[];this.Ji.forEach(t=>{t.retryAt<i?n.push(t):r.push(t)}),this.Ji=r,n.forEach(function(){var i=e(function*(e){var{request:i,retriesPerformedSoFar:r}=e;try{var n=yield t.Ki(i);200!==n.statusCode&&(n.statusCode<400||n.statusCode>=500)&&t.enqueue(i,r)}catch(e){t.enqueue(i,r)}});return function(t){return i.apply(this,arguments)}}())}unload(){this.hr&&(clearTimeout(this.hr),this.hr=void 0),this.Ji.forEach(t=>{var{request:e}=t;try{this.sr(e)}catch(t){ll().error("retry","failed to send beacon on unload",t)}}),this.Ji=[]}}var km="vt_rate_limit";class _m{constructor(t){var e,i;void 0===t&&(t={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(e=t.eventsPerSecond)&&void 0!==e?e:10,this.eventsBurstLimit=Math.max(null!==(i=t.eventsBurstLimit)&&void 0!==i?i:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=t.persistence,this.captureWarning=t.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(t){var e,i,r,n;void 0===t&&(t=!1);var s=Date.now(),o=null!==(i=null===(e=this.persistence)||void 0===e?void 0:e.get(km))&&void 0!==i?i:{tokens:this.eventsBurstLimit,last:s},a=(s-o.last)/1e3;o.tokens+=a*this.eventsPerSecond,o.last=s,o.tokens>this.eventsBurstLimit&&(o.tokens=this.eventsBurstLimit);var h=o.tokens<1;return h||t||(o.tokens=Math.max(0,o.tokens-1)),!h||this.lastEventRateLimited||t||null===(r=this.captureWarning)||void 0===r||r.call(this,"vTilt client rate limited. Config: "+this.eventsPerSecond+" events/second, "+this.eventsBurstLimit+" burst limit."),this.lastEventRateLimited=h,null===(n=this.persistence)||void 0===n||n.set(km,o),{isRateLimited:h,remainingTokens:o.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}class Im{constructor(t){this.ur=null,this.lr=null,this.cr=t}get config(){return this.ur}onApply(t){this.dr=t}onLoad(t){this.vr=t}load(){var t,e=this.cr.getConfig();if(e.token){if(this.lr||(this.lr=i({},e)),null===(t=e.bootstrap)||void 0===t?void 0:t.remoteConfig)return this.ur=e.bootstrap.remoteConfig,this.pr(this.ur),void this.mr();var r=dl(()=>$u.__VTILT_BOOTSTRAP__);if(null==r?void 0:r.remoteConfig)return this.ur=r.remoteConfig,this.pr(this.ur),void this.mr();dl(()=>{var t=localStorage.getItem(Md+"_"+e.token);t&&(this.ur=JSON.parse(t),this.pr(this.ur,!0))}),this.mr()}}mr(){var t=this.cr.getConfig();if(t.token)if(Rl())this.cr.updateConfig({__remote_config_loaded:!0});else{var e=this.cr.buildEndpointUrl("/api/d"),r=new AbortController,n=setTimeout(()=>r.abort(),3e3);(Vu||fetch)(e,{method:"GET",signal:r.signal,headers:i({Accept:"application/json"},pl(t))}).then(t=>t.json()).then(e=>{var i;clearTimeout(n),Ml(),this.ur=e,dl(()=>{localStorage.setItem(Md+"_"+t.token,JSON.stringify(e))}),this.pr(e),null===(i=this.vr)||void 0===i||i.call(this,e)}).catch(()=>{clearTimeout(n),Al("config"),this.cr.updateConfig({__remote_config_loaded:!0})})}}pr(t,e){var r,n,s,o;void 0===e&&(e=!1);var a=this.lr||this.cr.getConfig(),h={};for(var[,u]of this.cr.featureManager.getDescriptors())if(u.remoteConfig&&u.configKey){var l=t[u.remoteConfig.key];l&&void 0===a[u.configKey]&&(h[u.configKey]=u.remoteConfig.map(l))}if(t.analytics&&!e&&(void 0!==t.analytics.capturePageview&&void 0===a.capture_pageview&&(h.capture_pageview=t.analytics.capturePageview),void 0!==t.analytics.capturePageleave&&void 0===a.capture_pageleave&&(h.capture_pageleave=!!t.analytics.capturePageleave),void 0!==t.analytics.capturePerformance&&void 0===a.capture_performance&&(h.capture_performance=t.analytics.capturePerformance),void 0===a.autocapture)){var c=t.analytics.autocapture,d=t.analytics.scrollDepthMilestones,v=t.analytics.scrollDepthPageleave;void 0!==c&&(h.autocapture=c&&(d||v)?{scroll_depth:i({},d?{milestones:!0}:{},v?{pageleave:!0}:{})}:c)}e||(h.__remote_config_loaded=!0),void 0!==(null===(r=t.privacy)||void 0===r?void 0:r.respectDnt)&&void 0===a.respect_dnt&&(h.respect_dnt=t.privacy.respectDnt),void 0!==(null===(n=t.privacy)||void 0===n?void 0:n.requireConsent)&&void 0===a.require_consent&&(h.require_consent=t.privacy.requireConsent),void 0!==t.autocapture_opt_out&&(h.autocapture_opt_out=t.autocapture_opt_out),void 0!==t.elementsChainAsString&&(h.elementsChainAsString=t.elementsChainAsString),(null===(s=t.diagnostics)||void 0===s?void 0:s.defaultLogLevel)&&ll().setLevelFromRemote(t.diagnostics.defaultLogLevel),Object.keys(h).length>0&&this.cr.updateConfig(h),null===(o=this.dr)||void 0===o||o.call(this,t)}}var xm=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"];function Am(t,e){if(void 0===e&&(e=[]),!t)return!1;var i=t.toLowerCase();return[...xm,...e].some(t=>-1!==i.indexOf(t.toLowerCase()))}function Mm(t,e){var i;if(void 0===e&&(e=[]),!t)return!1;var r=t.userAgent;if(r&&Am(r,e))return!0;try{var n=t.userAgentData;if(null===(i=null==n?void 0:n.brands)||void 0===i?void 0:i.some(t=>Am(null==t?void 0:t.brand,e)))return!0}catch(t){}return!!t.webdriver}var Rm=36e5;function Om(){var t,e,i;return null!==(i=null===(e=null===(t=null==$u?void 0:$u.performance)||void 0===t?void 0:t.now)||void 0===e?void 0:e.call(t))&&void 0!==i?i:Date.now()}class Em{constructor(){this.gr=Om(),this.br=null,this.yr=Om(),this.wr="",this.Cr="",this.Sr="",this.kr=""}onAfterPageview(){var t=Om();this.gr=t,this.br=t,this.kr="",Zu&&(this.wr=Zu.href||"",this.Cr=Zu.pathname||""),Gu&&(this.Sr=Gu.title||"")}peekEngagementSinceLastCaptureMs(){var t,e=Om(),i=null!==(t=this.br)&&void 0!==t?t:this.yr,r=Math.round(e-i);return r<1&&(r=1),r>Rm&&(r=Rm),r}commitCaptureClock(){this.br=Om()}_r(){return this.wr+"\0"+this.Cr}clearLeaveDedupe(){this.kr=""}tryCapturePageleave(t,e,i,r){if(function(t){var e=t.capture_pageleave;return!1!==e&&(!0===e||!1!==t.capture_pageview)}(t)){var n=this._r();if((this.wr||this.Cr)&&n&&this.kr!==n){this.kr=n;var s=Om(),o=Math.round(s-this.gr);o<1&&(o=1),o>Rm&&(o=Rm);var a={navigation_type:i,engagement_time_msec:o,[Yd]:this.wr,[Jd]:this.Cr,[Xd]:Math.round(o/1e3),[Kd]:this.Cr,[Hd]:this.wr},h=this.wr?function(t){try{return new URL(t).host}catch(t){return""}}(this.wr):"";h&&(a.$host=h),this.Sr&&(a.title=this.Sr),r&&Object.assign(a,r),e(Dd,a,{skip_engagement:!0})}}}}var Tm=[jd,Pd,Ud,Dd,Gd,Zd,$d,Vd],Lm=new Set([jd,Pd,Ud]),Nm=new Set([Dd,Vd,Gd,Zd,$d]);class Bm{constructor(t){this.Ir=!1,this.Ar=!1,this.Mr=null,this.Rr=null,this.Or=new Em,this.cr=t}setVtPersonId(t){this.Rr=t}capture(t,e,r){var n,s,o;this.cr.sessionManager.setSessionId();var a=this.cr.getConfig();if(a.opt_out_useragent_filter||!Mm(Wu,null!==(n=a.custom_blocked_useragents)&&void 0!==n?n:[]))if((null==Wu?void 0:Wu.userAgent)&&function(t){return!(t&&"string"==typeof t&&t.length>500)}(Wu.userAgent))if((null==r?void 0:r.skip_client_rate_limiting)||Tm.includes(t)||this.cr.rateLimiter.shouldAllowEvent())if(!this.cr.getConfig().require_consent||Lm.has(t)||(null===(s=this.cr.consentManager)||void 0===s?void 0:s.hasConsent())){var h=this.cr.buildUrl(),u=!0===(null==r?void 0:r.skip_engagement)||Nm.has(t),l=i({},e);u||"number"==typeof l.engagement_time_msec||(l=i({},l,{engagement_time_msec:this.Or.peekEngagementSinceLastCaptureMs()}));var c=i({},this.Er(t,l),a.globalAttributes),d=JSON.stringify(c);if(!(v=d)||"string"!=typeof v||v.length<2||v.length>Tl)ll().debug("capture","dropped",t,{reason:"payload_invalid_size",bytes:d.length,limitBytes:Tl,hint:t===zd?"Trim global / event properties; $elements is already off by default in compact mode.":"Trim event properties; payload exceeded the runaway-guard cap."});else{var v,f=t===jd?this.cr.userManager.getAnonymousId():null!==(o=this.cr.userManager.getDistinctId())&&void 0!==o?o:this.cr.userManager.getAnonymousId(),p={timestamp:(new Date).toISOString(),event:t,payload:c,distinct_id:f,anonymous_id:this.cr.userManager.getAnonymousId()};this.cr.bufferEvent(t,h,p),ll().debug("capture","enqueued",t,i({distinct_id:f,$current_url:c.$current_url,$session_id:c.$session_id,$debug:c.$debug},t===zd&&"object"==typeof c&&null!==c?{$event_type:c.$event_type}:{})),this.Rr&&(this.Rr=null),t===Fd?this.Or.onAfterPageview():this.Or.commitCaptureClock()}}else ll().debug("capture","dropped",t,{reason:"require_consent_and_no_consent"});else ll().debug("capture","dropped",t,{reason:"client_rate_limited",hint:"Token bucket (~10/s, burst ~100). $autocapture counts toward the same limit as custom events."});else ll().debug("capture","dropped",t,{reason:"invalid_or_missing_user_agent"});else ll().debug("capture","dropped",t,{reason:"bot"})}captureInternal(t,e){this.capture(t,e,{skip_client_rate_limiting:!0})}captureInitialPageview(){Gu&&("visible"===Gu.visibilityState?this.Ar||(this.Ar=!0,setTimeout(()=>{Gu&&Zu&&!1!==this.cr.getConfig().capture_pageview&&this.capture(Fd,{navigation_type:"initial_load"})},300),this.Mr&&(Gu.removeEventListener("visibilitychange",this.Mr),this.Mr=null)):this.Mr||(this.Mr=()=>this.captureInitialPageview(),Nl(Gu,"visibilitychange",this.Mr)))}tryCapturePageleave(t,e){this.Or.tryCapturePageleave(this.cr.getConfig(),(t,e,i)=>this.capture(t,e,i),t,e)}resetPageleaveDedupe(){this.Or.clearLeaveDedupe()}Tr(){if(this.cr.getConfig().debug)return!0;try{if(null==Zu?void 0:Zu.search)if("1"===new URLSearchParams(Zu.search).get("vtilt_debug"))return!0}catch(t){}return!1}Er(t,e){var r,n,s=this.cr.getConfig(),o=s.mask_personal_data_properties,a=s.custom_personal_data_properties,h=Ef(o,a),u=Dl(function(t,e,i){if(!Gu)return{};var r=e?Fl([],wf,i||[]):[];return Bl({},kf(vv(Gu.URL,r,Sf)))}(0,o,a)),l=this.cr.userManager.getUserProperties(),c=this.cr.userManager.get_initial_props(),d=this.cr.sessionManager.getSessionId(),v=this.cr.sessionManager.getWindowId(),f={};!this.Ir&&Object.keys(c).length>0&&Object.assign(f,c),e.$set_once&&Object.assign(f,e.$set_once);var p=i({},h,u,l,null!==(n=null===(r=this.cr.consentManager)||void 0===r?void 0:r.getConsentProperties())&&void 0!==n?n:{},{$session_id:d,$window_id:v},this.Rr?{$vt:this.Rr}:{},Object.keys(f).length>0?{$set_once:f}:{},e.$set?{$set:e.$set}:{},e);!this.Ir&&Object.keys(c).length>0&&(this.Ir=!0),t===Fd&&Gu&&(p.title=Gu.title),this.Tr()&&(p.$debug=!0);var m=this.cr.sessionManager.consumeSessionStart(),g=this.cr.userManager.consumeFirstVisit();return m&&(p.$session_start=!0),g&&(p.$first_visit=!0),p}}var Fm=["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"];function Dm(t){return!(!t||"string"!=typeof t)&&Fm.includes(t.toLowerCase().trim())}class jm{constructor(t){this.Lr=null,this.Nr=null,this.cr=t}identify(t,e,r){var n;if("number"==typeof t&&(t=String(t),ll().warn("identify","first argument should be a string, not a number")),t)if(Dm(t))ll().error("identify",'"'+t+'" appears to be a hardcoded string');else if("COOKIELESS_SENTINEL_VALUE"!==t){var s=JSON.stringify([t,e,r]);if(this.Lr!==s){var o=this.cr.userManager,a=o.getDistinctId(),h=o.getAnonymousId(),u=o.getDeviceId();if(!("identified"===o.getUserState())&&h!==t||t!==a){this.cr.capture(jd,{distinct_id:t,$set:e||{},$set_once:r||{}});var l={user_state:"identified",distinct_id:t,properties_set:e,properties_set_once:r};if(!u){var c=a||h;l.device_id=c,l.properties_set=i({$had_persisted_distinct_id:!0,$device_id:c},l.properties_set||{})}o.applyUpdate(l),null===(n=this.cr._emitter)||void 0===n||n.emit("user:identified",{distinctId:t})}else(e||r)&&this.setUserProperties(e,r);this.Lr=s}}else ll().error("identify","cannot use sentinel value as distinct_id");else ll().error("identify","unique user id is required")}setUserProperties(t,e){var i,r;if(t||e){var n=this.cr.userManager,s=JSON.stringify([null!==(i=n.getDistinctId())&&void 0!==i?i:n.getAnonymousId(),t,e]);this.Nr!==s&&(n.applyUpdate({properties_set:t,properties_set_once:e}),this.cr.capture(Ud,{$set:t||{},$set_once:e||{}}),null===(r=this.cr._emitter)||void 0===r||r.emit("user:properties_set",{properties:t}),this.Nr=s)}}resetUser(t){var e;this.cr.sessionManager.resetSessionId(),this.cr.userManager.reset(t),this.Lr=null,this.Nr=null,null===(e=this.cr._emitter)||void 0===e||e.emit("user:reset")}alias(t,e){var i;if(t&&!Dm(t)){var r=this.cr.userManager,n=null!==(i=null!=e?e:r.getDistinctId())&&void 0!==i?i:r.getAnonymousId();n&&!Dm(n)?t!==n?this.cr.capture(Pd,{$original_id:n,$alias_id:t}):this.identify(t):ll().warn("alias","invalid original distinct ID")}else ll().warn("alias","invalid alias")}getUserIdentity(){return this.cr.userManager.getUserIdentity()}getDeviceId(){return this.cr.userManager.getDeviceId()}getUserState(){return this.cr.userManager.getUserState()}getDistinctId(){var t;return null!==(t=this.cr.userManager.getDistinctId())&&void 0!==t?t:this.cr.userManager.getAnonymousId()}getAnonymousId(){return this.cr.userManager.getAnonymousId()}}var Pm="_vtilt_consent";class Um{constructor(t){this.Br={},this.Fr=!1,this.cr=t,this.Dr()}setConsent(t){var e;this.Br=i({},this.Br,t),this.Fr=!0,this.jr(),null===(e=this.cr._emitter)||void 0===e||e.emit("consent:updated",{consent:this.Br})}getConsent(){return i({},this.Br)}hasConsent(){return this.Fr}setDefaultGranted(){this.Fr||(this.Br={analytics:!0,marketing:!0,advertising:!0},this.Fr=!0)}getConsentProperties(){var t={};return void 0!==this.Br.analytics&&(t.$consent_analytics=this.Br.analytics),void 0!==this.Br.marketing&&(t.$consent_marketing=this.Br.marketing),void 0!==this.Br.advertising&&(t.$consent_advertising=this.Br.advertising),t}reset(){this.Br={},this.Fr=!1,this.Pr()}Dr(){if(void 0!==Gu&&(null==Gu?void 0:Gu.cookie)){var t=Pm+"=";for(var e of Gu.cookie.split(";")){var i=e.trim();if(i.startsWith(t)){try{var r=decodeURIComponent(i.slice(15)),n=JSON.parse(r);n&&"object"==typeof n&&(this.Br=n,this.Fr=!0)}catch(t){}return}}}}jr(){if(void 0!==Gu){var t=encodeURIComponent(JSON.stringify(this.Br)),e="undefined"!=typeof location&&"https:"===location.protocol?"; Secure":"";Gu.cookie=Pm+"="+t+"; Max-Age=31536000; path=/; SameSite=Lax"+e}}Pr(){void 0!==Gu&&(Gu.cookie=Pm+"=; Max-Age=0; path=/")}}class $m{constructor(t){this.Ur=new Map,this.$r=new Map,this.cr=t}register(t){this.Ur.set(t.name,t)}createInstances(){var t=this,e=this.cr.getConfig(),i=function(i,r){return t.$r.has(i)||t.zr(e,r)?0:void dl(()=>{var n=r.FeatureClass.extractConfig(e),s=new r.FeatureClass(t.cr,n);t.$r.set(i,s)})};for(var[r,n]of this.Ur)i(r,n)}initAll(){this.createInstances();var t=function(t){dl(()=>{t.isStarted||t.startIfEnabled()})};for(var[,e]of this.$r)t(e)}notifyAll(t){var e=function(e){e.onConfigUpdate&&dl(()=>e.onConfigUpdate(t))};for(var[,i]of this.$r)e(i)}get(t){return this.$r.get(t)}set(t,e){this.$r.set(t,e)}getDescriptors(){return this.Ur}zr(t,e){if(e.disableKey&&!0===t[e.disableKey])return!0;if(e.configKey){var i=t[e.configKey];if(i&&"object"==typeof i&&!1===i.enabled)return!0}return!1}}class zm{constructor(t){this.Ji=new hm,this.Wr=!1,this.Gr=!1,this.cr=t,this.Zr(),this.Wr||(this.Vr=setTimeout(()=>this.forceFlush(),5e3))}push(t){this.Wr?this.Yr(t):this.Ji.enqueue(t)}markConfigReady(){this.Gr||(this.Gr=!0,this.Jr())}forceFlush(){this.Xr(),this.Gt(),this.Wr=!0}Zr(){this.Wr=this.Gr}Jr(){this.Zr(),this.Wr&&(this.Xr(),this.Gt())}Gt(){var t=this.Ji.takeAll();for(var e of t)this.Yr(e);t.length>0&&this.cr.requestQueue.flush()}Yr(t){if(this.Gr){if(this.Kr(t.name))return}else this.Hr(t.event);this.cr.sendRequest(t.url,t.event)}Kr(t){var e=this.cr.getConfig();switch(t){case Fd:return!1===e.capture_pageview;case Dd:return!1===e.capture_pageleave;case $d:return!1===e.capture_performance;case zd:case Wd:return!1===e.autocapture;default:return!1}}Hr(t){"object"==typeof t.payload&&null!==t.payload&&(t.payload.$config_pending=!0)}Xr(){void 0!==this.Vr&&(clearTimeout(this.Vr),this.Vr=void 0)}}var Wm="vt";class Gm{constructor(t){void 0===t&&(t={}),this.version=Cd,this.__loaded=!1,this.qr=!1,this.Qr=!1,this.tn=[],this.en=!1,ll().debug("ctor","start"),this._emitter=new ml,this.configManager=new iv(t);var e=this.configManager.getConfig();cl(e),this.sessionManager=new hv(e.storage||"cookie",e.cross_subdomain_cookie),this.userManager=new Tf(e.persistence||"localStorage+cookie",e.cross_subdomain_cookie),this.rateLimiter=new _m({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:t=>{this.rn.captureInternal(Vd,{$$client_ingestion_warning_message:t})}}),this.retryQueue=new Sm({sendRequest:t=>this.nn(t),sendBeacon:t=>this.sn(t)}),this.requestQueue=new Cm(t=>this.an(t),{flush_interval_ms:3e3}),this.consentManager=new Um(this),this.rn=new Bm(this),this.hn=new jm(this),this.un=new $m(this),this.ln=new Im(this),this.cn(),this.ln.onLoad(t=>{this._emitter.emit(yl,{config:t})}),this.dn(),ll().debug("ctor","boot gate installed")}cn(){this.un.register({name:"HistoryAutocapture",configKey:"capture_pageview",FeatureClass:Uf}),this.un.register({name:"Autocapture",configKey:"autocapture",FeatureClass:Op}),this.un.register({name:"WebVitals",configKey:"capture_performance",FeatureClass:jf}),this.un.register({name:"SessionRecording",configKey:"session_recording",disableKey:"disable_session_recording",remoteConfig:{key:"sessionRecording",map:t=>({enabled:t.enabled,sampleRate:t.sampleRate,minimumDurationMs:t.minimumDurationMs,fullSnapshotIntervalMs:t.fullSnapshotIntervalMs,maskAllInputs:t.maskAllInputs,captureConsole:t.captureConsole,captureCanvas:t.captureCanvas})},FeatureClass:Tp}),this.un.register({name:"Chat",configKey:"chat",disableKey:"disable_chat",remoteConfig:{key:"chat",map:t=>({enabled:t.enabled,position:t.widgetPosition,color:t.widgetColor})},FeatureClass:Wp}),this.un.register({name:"GoogleTagGateway",configKey:"google_tag",disableKey:"disable_google_tag",remoteConfig:{key:"googleTag",map:t=>t},FeatureClass:lm})}dn(){var t=this,e=function(e){var i=t[e];t[e]=function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];if(t.Qr)return i.apply(t,n);t.tn.push([e,...n])}};for(var i of Gm.BOOT_GATED_METHODS)e(i)}vn(){if(!this.Qr){for(var t of(this.Qr=!0,ll().debug("boot","start"),Gm.BOOT_GATED_METHODS))delete this[t];ll().debug("boot","gate removed"),this.__loaded&&!this.en?(ll().debug("boot","running _runPostBootInit"),this.fn()):ll().debug("boot","skipping _runPostBootInit","loaded?",this.__loaded,"postBootDone?",this.en),ll().debug("boot","flush pendingCalls",this.tn.length),this._execute_array(this.tn),this.tn=[]}}init(t,e,i){var r;if(i&&i!==Wm){var n=null!==(r=Ym[i])&&void 0!==r?r:new Gm;return n._init(t,e,i),Ym[i]=n,Ym[Wm][i]=n,n}return this._init(t,e,i)}_init(t,e,r){if(void 0===e&&(e={}),this.__loaded)return ll().warn("init","already initialized; re-initializing is a no-op"),this;this.configManager.updateConfig(i({},e,{token:t||e.token,name:r}));var n=this.configManager.getConfig();return cl(n),this.__loaded=!0,ll().debug("init","start","token present?",!!n.token,"name",null!=r?r:"vt"),this.un.createInstances(),this.Qr||void 0===Gu||"interactive"!==Gu.readyState&&"complete"!==Gu.readyState||(ll().debug("init","self-boot?",Gu.readyState),this.vn()),this.Qr&&!this.en&&this.fn(),ll().debug("init","postBootInitDone",this.en),this}fn(){if(!this.en){this.en=!0,ll().debug("postBoot","start");var t=this.configManager.getConfig();this.sessionManager=new hv(t.storage||"cookie",t.cross_subdomain_cookie),this.sessionManager.hydrateFromStorage(),ll().debug("postBoot","sessionManager hydrated");var e=t.persistence||"localStorage+cookie";this.userManager.updateStorageMethod(e,t.cross_subdomain_cookie),this.userManager.hydrateFromStorage(),ll().debug("postBoot","userManager hydrated"),t.require_consent||this.consentManager.hasConsent()||this.consentManager.setDefaultGranted(),!0===this.consentManager.getConsent().advertising&&bv(),this._emitter.on("consent:updated",t=>{var e=t.consent;!0===e.advertising?bv():!1===e.advertising&&void 0!==Gu&&(Gu.cookie=fv+"=; Max-Age=0; path=/",Gu.cookie=pv+"=; Max-Age=0; path=/")}),this.pn(),this.userManager.set_initial_person_info(t.mask_personal_data_properties,t.custom_personal_data_properties),this.mn=new zm({sendRequest:(t,e)=>this.sendRequest(t,e),requestQueue:this.requestQueue,getConfig:()=>this.configManager.getConfig()}),this.un.initAll(),ll().debug("postBoot","features inited"),this.ln.load(),this.gn(),this.bn();var i=this.configManager.getConfig();!1!==i.capture_pageview&&this.rn.captureInitialPageview(),this.un.notifyAll(i),this._emitter.emit(gl,{config:i}),ll().debug("postBoot","done"),ll().info("init","SDK ready")}}startAutocapture(){var t=this.un.get("Autocapture");if(!t){var e=Op.extractConfig(this.configManager.getConfig());t=new Op(this,e),this.un.set("Autocapture",t)}t.updateConfig({enabled:!0})}stopAutocapture(){var t=this.un.get("Autocapture");t&&t.updateConfig({enabled:!1})}isAutocaptureActive(){var t,e;return null!==(e=null===(t=this.un.get("Autocapture"))||void 0===t?void 0:t.isStarted)&&void 0!==e&&e}getAutocaptureDiagnostics(){var t,e;return null!==(e=null===(t=this.un.get("Autocapture"))||void 0===t?void 0:t.getDiagnostics())&&void 0!==e?e:null}startSessionRecording(){var t=this.un.get("SessionRecording");t||(t=new Tp(this),this.un.set("SessionRecording",t)),t.updateConfig({enabled:!0}),t.startIfEnabledOrStop("recording_initialized"),this._emitter.emit(Sl)}stopSessionRecording(){var t;null===(t=this.un.get("SessionRecording"))||void 0===t||t.stop(),this._emitter.emit(kl)}isRecordingActive(){var t;return"active"===(null===(t=this.un.get("SessionRecording"))||void 0===t?void 0:t.status)}getSessionRecordingId(){var t;return(null===(t=this.un.get("SessionRecording"))||void 0===t?void 0:t.sessionId)||null}openChat(){var t=this.un.get("Chat");t?t.open():ll().warn("chat","openChat: feature not available")}closeChat(){var t=this.un.get("Chat");t?t.close():ll().warn("chat","closeChat: feature not available")}toggleChat(){var t=this.un.get("Chat");t?t.toggle():ll().warn("chat","toggleChat: feature not available")}showChat(){var t=this.un.get("Chat");t?t.show():ll().warn("chat","showChat: feature not available")}hideChat(){var t=this.un.get("Chat");t?t.hide():ll().warn("chat","hideChat: feature not available")}sendChatMessage(t,e){var i=this.un.get("Chat");return i?i.sendMessage(t,e):(ll().warn("chat","sendChatMessage: feature not available"),Promise.resolve())}gtag(){for(var t=this.un.get("GoogleTagGateway"),e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];t?t.gtag(...i):this.tn.push(["gtag",...i])}setGoogleUserData(t){var e=this.un.get("GoogleTagGateway");return e?e.setUserData(t):Promise.resolve()}get featureManager(){return this.un}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}off(t){this._emitter.off(t)}_is_bot(){var t,e=this.getConfig();return!e.opt_out_useragent_filter&&Mm(Wu,null!==(t=e.custom_blocked_useragents)&&void 0!==t?t:[])}capture(t,e,i){this.rn.capture(t,e,i),this._emitter.emit(Cl,{event:t,payload:e})}tryCapturePageleave(t){var e,i=null===(e=this.un.get("Autocapture"))||void 0===e?void 0:e.getMaxScrollDepthPctForPageleave(),r=null!=i?{[tv]:i}:void 0;this.rn.tryCapturePageleave(t,r)}identify(t,e,i){this.hn.identify(t,e,i)}setUserProperties(t,e){this.hn.setUserProperties(t,e)}resetUser(t){this.hn.resetUser(t)}alias(t,e){this.hn.alias(t,e)}setConsent(t){this.consentManager.setConsent(t)}getConsent(){return this.consentManager.getConsent()}getUserIdentity(){return this.hn.getUserIdentity()}getDeviceId(){return this.hn.getDeviceId()}getUserState(){return this.hn.getUserState()}getConfig(){return this.configManager.getConfig()}getRemoteConfig(){return this.ln.config}getSessionId(){return this.sessionManager.getSessionId()}getDistinctId(){return this.hn.getDistinctId()}getAnonymousId(){return this.hn.getAnonymousId()}toString(){var t,e=null!==(t=this.configManager.getConfig().name)&&void 0!==t?t:Wm;return e!==Wm&&(e="vt."+e),e}updateConfig(t){var e,i=this.configManager.getConfig();this.configManager.updateConfig(t);var r=this.configManager.getConfig();!i.__remote_config_loaded&&r.__remote_config_loaded&&(null===(e=this.mn)||void 0===e||e.markConfigReady()),this.un.notifyAll(r),this._emitter.emit(bl,{config:r})}buildUrl(){return this.buildEndpointUrl("/api/e")}buildEndpointUrl(t){return fl(this.configManager.getConfig(),t)}sendRequest(t,e){this.yn()&&this.requestQueue.enqueue({url:t,event:e})}bufferEvent(t,e,i){t!==Gd&&t!==Zd?this.mn.push({name:t,url:e,event:i}):this.sendRequest(e,i)}yn(){return!!this.configManager.getConfig().token||(this.qr||(ll().warn("config","token is required for tracking"),this.qr=!0),!1)}an(t){"sendBeacon"!==t.transport?this.retryQueue.retriableRequest(t):this.sn(t)}nn(t){return new Promise(e=>{var{url:i,events:r}=t,n=this.configManager.getConfig(),s=1===r.length?r[0]:{events:r},o=n.disable_compression?vm.None:vm.GZipJS;wm({url:i,data:s,method:"POST",transport:"XHR",compression:o,projectToken:n.token,callback:t=>e({statusCode:t.statusCode})})})}sn(t){var{url:e,events:i}=t,r=this.configManager.getConfig(),n=1===i.length?i[0]:{events:i},s=r.disable_compression?vm.None:vm.GZipJS;wm({url:e,data:n,method:"POST",transport:"sendBeacon",compression:s,projectToken:r.token})}wn(t){this.sendRequest(t.url,t.event)}gn(){if($u){var t=()=>{this.mn.forceFlush(),this.requestQueue.unload(),this.retryQueue.unload()};Nl($u,"beforeunload",t),Nl($u,"pagehide",()=>{this.rn.tryCapturePageleave("pagehide"),t()}),Gu&&Nl(Gu,"visibilitychange",()=>{Gu&&("hidden"===Gu.visibilityState?this.rn.tryCapturePageleave("visibility_hidden"):"visible"===Gu.visibilityState&&this.rn.resetPageleaveDedupe())})}}bn(){this.requestQueue.enable()}pn(){dl(()=>{var t,e;if(void 0!==Zu&&Zu.search){var i=new URL(Zu.href),r=i.searchParams.get("vt"),n=i.searchParams.get("vtd");if((null==r?void 0:r.trim())&&(this.rn.setVtPersonId(r.trim()),i.searchParams.delete("vt")),(null==n?void 0:n.trim())&&(this.Cn(n.trim()),i.searchParams.delete("vtd")),(null==r?void 0:r.trim())||(null==n?void 0:n.trim())){var s=i.pathname+(i.search||"")+i.hash;null===(e=null===(t=null==$u?void 0:$u.history)||void 0===t?void 0:t.replaceState)||void 0===e||e.call(t,{},"",s)}}})}Cn(t){this.vtdOverlay||(this.vtdOverlay=new dm(this),this.vtdOverlay.setDestinationUrl(t))}_execute_array(t){tl(t)&&t.forEach(t=>{if(t&&tl(t)&&t.length>0){var e=t[0],i=t.slice(1);"function"==typeof this[e]&&dl(()=>this[e](...i))}})}_dom_loaded(){this.bn()}}Gm.BOOT_GATED_METHODS=["capture","identify","setUserProperties","resetUser","alias","setConsent","startAutocapture","stopAutocapture","startSessionRecording","stopSessionRecording","openChat","closeChat","toggleChat","showChat","hideChat","sendChatMessage"];var Zm,Vm,Ym={};Zm=Ym[Wm]=new Gm,(Vm=Ju.vt)&&Ll(Vm._i,function(t){if(t&&tl(t)){var e=Zm.init(t[0],t[1],t[2]),i=Vm[t[2]||"vt"]||Vm;e&&e._execute_array(i)}}),Ju.vt=Zm,function(){function t(){if(!t.done){t.done=!0,ll().debug("dom","handler fired");var e=Object.keys(Ym);ll().debug("boot","instance count",e.length),Ll(Ym,(t,e)=>{ll().debug("boot","instance",e),t.vn(),t._dom_loaded()})}}if(Gu&&"function"==typeof Gu.addEventListener)return ll().debug("dom","readyState",Gu.readyState),void("complete"===Gu.readyState||"interactive"===Gu.readyState?(ll().debug("dom","running handler sync"),t()):(ll().debug("dom","registered DOMContentLoaded listener"),Nl(Gu,"DOMContentLoaded",t,{capture:!1})));$u&&ll().error("dom","browser doesn't support document.addEventListener")}()}();
2
2
  //# sourceMappingURL=array.full.js.map