@w3kits-com/plugin-opendesign 0.1.14 → 0.1.16

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 (79) hide show
  1. package/dist/404/index.html +1 -1
  2. package/dist/404.html +1 -1
  3. package/dist/__next.$oc$slug.__PAGE__.txt +1 -1
  4. package/dist/__next.$oc$slug.txt +1 -1
  5. package/dist/__next._full.txt +1 -1
  6. package/dist/__next._head.txt +1 -1
  7. package/dist/__next._index.txt +1 -1
  8. package/dist/__next._tree.txt +1 -1
  9. package/dist/__w3kits/webcontainer-runtime/apps/daemon/dist/server.js +7 -4
  10. package/dist/__w3kits/webcontainer-runtime/apps/daemon/dist/server.js.map +1 -1
  11. package/dist/__w3kits/webcontainer-runtime/apps/web/out/404/index.html +1 -0
  12. package/dist/__w3kits/webcontainer-runtime/apps/web/out/404.html +1 -0
  13. package/dist/__w3kits/webcontainer-runtime/apps/web/out/__next.$oc$slug.__PAGE__.txt +6 -0
  14. package/dist/__w3kits/webcontainer-runtime/apps/web/out/__next.$oc$slug.txt +5 -0
  15. package/dist/__w3kits/webcontainer-runtime/apps/web/out/__next._full.txt +19 -0
  16. package/dist/__w3kits/webcontainer-runtime/apps/web/out/__next._head.txt +6 -0
  17. package/dist/__w3kits/webcontainer-runtime/apps/web/out/__next._index.txt +7 -0
  18. package/dist/__w3kits/webcontainer-runtime/apps/web/out/__next._tree.txt +2 -0
  19. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/03~yq9q893hmn.js +1 -0
  20. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/0axqck9-llseo.js +1 -0
  21. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/0jzvy---_kh9r.js +2485 -0
  22. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/0p.wvs8r3k6g7.js +1 -0
  23. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/0t2m~0~z4nk68.js +5 -0
  24. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/0vpcktbhmjn2u.js +1 -0
  25. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/0xfykg6_lmu3a.js +31 -0
  26. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/0xl644~f.h0hd.js +1 -0
  27. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/0xykzmwq7w9.b.js +1 -0
  28. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/0~_k3q5_py.u5.css +2 -0
  29. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/13.bzhieaq182.js +1 -0
  30. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_next/static/chunks/turbopack-0abv9cd._a~w..js +1 -0
  31. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_not-found/__next._full.txt +18 -0
  32. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_not-found/__next._head.txt +6 -0
  33. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_not-found/__next._index.txt +7 -0
  34. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_not-found/__next._not-found.__PAGE__.txt +5 -0
  35. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_not-found/__next._not-found.txt +5 -0
  36. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_not-found/__next._tree.txt +2 -0
  37. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_not-found/index.html +1 -0
  38. package/dist/__w3kits/webcontainer-runtime/apps/web/out/_not-found/index.txt +18 -0
  39. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/claude.svg +1 -0
  40. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/codex.svg +1 -0
  41. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/copilot.svg +1 -0
  42. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/cursor-agent.svg +1 -0
  43. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/deepseek.svg +1 -0
  44. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/devin.png +0 -0
  45. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/gemini.svg +1 -0
  46. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/hermes.svg +1 -0
  47. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/kilo.svg +1 -0
  48. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/kimi.svg +1 -0
  49. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/kiro.svg +1 -0
  50. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/mimo.svg +1 -0
  51. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/opencode.svg +1 -0
  52. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/pi.svg +1 -0
  53. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/qoder.svg +1 -0
  54. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/qwen.svg +1 -0
  55. package/dist/__w3kits/webcontainer-runtime/apps/web/out/agent-icons/vibe.svg +1 -0
  56. package/dist/__w3kits/webcontainer-runtime/apps/web/out/app-icon.svg +51 -0
  57. package/dist/__w3kits/webcontainer-runtime/apps/web/out/avatar.png +0 -0
  58. package/dist/__w3kits/webcontainer-runtime/apps/web/out/index.html +1 -0
  59. package/dist/__w3kits/webcontainer-runtime/apps/web/out/index.txt +19 -0
  60. package/dist/__w3kits/webcontainer-runtime/apps/web/out/logo.svg +15 -0
  61. package/dist/__w3kits/webcontainer-runtime/apps/web/out/od-notifications-sw.js +39 -0
  62. package/dist/_next/static/rnHoLZh5GpR0H5UoZURFv/_buildManifest.js +16 -0
  63. package/dist/_next/static/rnHoLZh5GpR0H5UoZURFv/_clientMiddlewareManifest.js +1 -0
  64. package/dist/_next/static/rnHoLZh5GpR0H5UoZURFv/_ssgManifest.js +1 -0
  65. package/dist/_not-found/__next._full.txt +1 -1
  66. package/dist/_not-found/__next._head.txt +1 -1
  67. package/dist/_not-found/__next._index.txt +1 -1
  68. package/dist/_not-found/__next._not-found.__PAGE__.txt +1 -1
  69. package/dist/_not-found/__next._not-found.txt +1 -1
  70. package/dist/_not-found/__next._tree.txt +1 -1
  71. package/dist/_not-found/index.html +1 -1
  72. package/dist/_not-found/index.txt +1 -1
  73. package/dist/browser-daemon.js +1 -34
  74. package/dist/index.html +1 -1
  75. package/dist/index.txt +1 -1
  76. package/package.json +1 -1
  77. /package/dist/{_next/static/E1c87KmPntk46WYNCyU0h → __w3kits/webcontainer-runtime/apps/web/out/_next/static/rnHoLZh5GpR0H5UoZURFv}/_buildManifest.js +0 -0
  78. /package/dist/{_next/static/E1c87KmPntk46WYNCyU0h → __w3kits/webcontainer-runtime/apps/web/out/_next/static/rnHoLZh5GpR0H5UoZURFv}/_clientMiddlewareManifest.js +0 -0
  79. /package/dist/{_next/static/E1c87KmPntk46WYNCyU0h → __w3kits/webcontainer-runtime/apps/web/out/_next/static/rnHoLZh5GpR0H5UoZURFv}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93583,e=>{"use strict";var t="u">typeof window?window:void 0,i="u">typeof globalThis?globalThis:t;"u"<typeof self&&(i.self=i),"u"<typeof File&&(i.File=function(){});var s=null==i?void 0:i.navigator,r=null==i?void 0:i.document,n=null==i?void 0:i.location,o=null==i?void 0:i.fetch,a=null!=i&&i.XMLHttpRequest&&"withCredentials"in new i.XMLHttpRequest?i.XMLHttpRequest:void 0,l=null==i?void 0:i.AbortController,u=null==i?void 0:i.CompressionStream,c=null==s?void 0:s.userAgent,h=null!=t?t:{},d="1.373.2",p={DEBUG:!1,LIB_VERSION:d,LIB_NAME:"web",JS_SDK_VERSION:d};function _(e,t,i,s,r,n,o){try{var a=e[n](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(s,r)}function g(e){return function(){var t=this,i=arguments;return new Promise(function(s,r){var n=e.apply(t,i);function o(e){_(n,s,r,o,a,"next",e)}function a(e){_(n,s,r,o,a,"throw",e)}o(void 0)})}}function v(){return(v=Object.assign.bind()).apply(null,arguments)}function f(e,t){if(null==e)return{};var i={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;i[s]=e[s]}return i}var m,y,b="NativeGzipValidationError",E=e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""),x=e=>{var t=Error("Native gzip produced invalid output: "+e);throw t.name=b,t},w=(m=g(function*(e,t){18>e.size&&x("too-short");var i=new Uint8Array((yield e.slice(0,10).arrayBuffer()));31===i[0]&&139===i[1]&&8===i[2]||x("invalid-header");var s=new DataView((yield e.slice(e.size-8).arrayBuffer()));s.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(y)return y;y=[];for(var e=0;256>e;e++){for(var t=e,i=0;8>i;i++)t=1&t?0xedb88320^t>>>1:t>>>1;y[e]=t>>>0}return y})(),i=0xffffffff,s=0;e.length>s;s++)i=t[255&(i^e[s])]^i>>>8;return(0xffffffff^i)>>>0})(t)&&x("invalid-crc");var r=t.length>>>0;s.getUint32(4,!0)!==r&&x("invalid-size")}),function(e,t){return m.apply(this,arguments)});function S(){return(S=g(function*(e,t,i){void 0===t&&(t=!0);try{var s,r=(new TextEncoder).encode(e),n=new CompressionStream("gzip"),o=n.writable.getWriter(),a=o.write(r).then(()=>o.close()).catch((s=g(function*(e){try{yield o.abort(e)}catch(e){}throw e}),function(e){return s.apply(this,arguments)})),l=new Response(n.readable).blob(),[u]=yield Promise.all([l,a]);return yield w(u,r),u}catch(e){if(null!=i&&i.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}})).apply(this,arguments)}var k=["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"],P=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return k.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})},T=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function R(e,t){return -1!==e.indexOf(t)}var $=function(e){return e.trim()},F=function(e){return e.replace(/^\$/,"")},I=Object.prototype,O=I.hasOwnProperty,C=I.toString,M=Array.isArray||function(e){return"[object Array]"===C.call(e)},A=e=>"function"==typeof e,L=e=>e===Object(e)&&!M(e),N=e=>{if(L(e)){for(var t in e)if(O.call(e,t))return!1;return!0}return!1},q=e=>void 0===e,D=e=>"[object String]"==C.call(e),U=e=>D(e)&&0===e.trim().length,j=e=>null===e,H=e=>q(e)||j(e),z=e=>"[object Number]"==C.call(e)&&e==e,B=e=>z(e)&&e>0,V=e=>"[object Boolean]"===C.call(e),W=e=>R(T,e);function G(e){return null===e||"object"!=typeof e}function Y(e,t){return({}).toString.call(e)==="[object "+t+"]"}function X(e){return"u">typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var K=[!0,"true",1,"1","yes"],J=[!1,"false",0,"0","no"];function Z(e,t,i,s,r){return t>i&&(s.warn("min cannot be greater than max."),t=i),z(e)?e>i?(s.warn(" cannot be greater than max: "+i+". Using max value instead."),i):t>e?(s.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(s.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+r),Z(r||i,t,i,s))}class Q{constructor(e){this.$t={},this.zt=e.zt,this.Zt=Z(e.bucketSize,0,100,e.Gt),this.Qt=Z(e.refillRate,0,this.Zt,e.Gt),this.Jt=Z(e.refillInterval,0,864e5,e.Gt)}Kt(e,t){var i=Math.floor((t-e.lastAccess)/this.Jt);i>0&&(e.tokens=Math.min(e.tokens+i*this.Qt,this.Zt),e.lastAccess=e.lastAccess+i*this.Jt)}consumeRateLimit(e){var t,i=Date.now(),s=String(e),r=this.$t[s];return r?this.Kt(r,i):this.$t[s]=r={tokens:this.Zt,lastAccess:i},0===r.tokens||(r.tokens--,0===r.tokens&&(null==(t=this.zt)||t.call(this,e)),0===r.tokens)}stop(){this.$t={}}}var ee,et,ei,es="Mobile",er="Android",en="Tablet",eo=er+" "+en,ea="iPad",el="Apple",eu=el+" Watch",ec="Safari",eh="BlackBerry",ed="Samsung",ep=ed+"Browser",e_=ed+" Internet",eg="Chrome",ev=eg+" OS",ef=eg+" iOS",em="Internet Explorer",ey=em+" "+es,eb="Opera",eE=eb+" Mini",ex="Edge",ew="Microsoft "+ex,eS="Firefox",ek=eS+" iOS",eP="Nintendo",eT="PlayStation",eR="Xbox",e$=er+" "+es,eF=es+" "+ec,eI="Windows",eO=eI+" Phone",eC="Nokia",eM="Ouya",eA="Generic",eL=eA+" "+es.toLowerCase(),eN=eA+" "+en.toLowerCase(),eq="Konqueror",eD="(\\d+(\\.\\d+)?)",eU=RegExp("Version/"+eD),ej=RegExp(eR,"i"),eH=RegExp(eT+" \\w+","i"),ez=RegExp(eP+" \\w+","i"),eB=RegExp(eh+"|PlayBook|BB10","i"),eV={"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"},eW=function(e,t){var i;return t=t||"",R(e," OPR/")&&R(e,"Mini")?eE:R(e," OPR/")?eb:eB.test(e)?eh:R(e,"IE"+es)||R(e,"WPDesktop")?ey:R(e,ep)?e_:R(e,ex)||R(e,"Edg/")?ew:R(e,"FBIOS")?"Facebook "+es:R(e,"UCWEB")||R(e,"UCBrowser")?"UC Browser":R(e,"CriOS")?ef:R(e,"CrMo")||R(e,eg)?eg:R(e,er)&&R(e,ec)?e$:R(e,"FxiOS")?ek:R(e.toLowerCase(),eq.toLowerCase())?eq:(i=t)&&R(i,el)||R(e,ec)&&!R(e,eg)&&!R(e,er)?R(e,es)?eF:ec:R(e,eS)?eS:R(e,"MSIE")||R(e,"Trident/")?em:R(e,"Gecko")?eS:""},eG={[ey]:[RegExp("rv:"+eD)],[ew]:[RegExp(ex+"?\\/"+eD)],[eg]:[RegExp("("+eg+"|CrMo)\\/"+eD)],[ef]:[RegExp("CriOS\\/"+eD)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+eD)],[ec]:[eU],[eF]:[eU],[eb]:[RegExp("(Opera|OPR)\\/"+eD)],[eS]:[RegExp(eS+"\\/"+eD)],[ek]:[RegExp("FxiOS\\/"+eD)],[eq]:[RegExp("Konqueror[:/]?"+eD,"i")],[eh]:[RegExp(eh+" "+eD),eU],[e$]:[RegExp("android\\s"+eD,"i")],[e_]:[RegExp(ep+"\\/"+eD)],[em]:[RegExp("(rv:|MSIE )"+eD)],Mozilla:[RegExp("rv:"+eD)]},eY=function(e,t){var i=eG[eW(e,t)];if(q(i))return null;for(var s=0;i.length>s;s++){var r=e.match(i[s]);if(r)return parseFloat(r[r.length-2])}return null},eX=[[RegExp(eR+"; "+eR+" (.*?)[);]","i"),e=>[eR,e&&e[1]||""]],[RegExp(eP,"i"),[eP,""]],[RegExp(eT,"i"),[eT,""]],[eB,[eh,""]],[RegExp(eI,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[eO,""];if(new RegExp(es).test(t)&&!/IEMobile\b/.test(t))return[eI+" "+es,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var s=eV[i[1]]||"";return/arm/i.test(t)&&(s="RT"),[eI,s]}return[eI,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=q(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+er+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+er+")","i"),e=>e&&e[2]?[er,[e[2],e[3],e[4]||"0"].join(".")]:[er,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ev,""]],[/Linux|debian/i,["Linux",""]]],eK=function(e){return ez.test(e)?eP:eH.test(e)?eT:ej.test(e)?eR:RegExp(eM,"i").test(e)?eM:RegExp("("+eO+"|WPDesktop)","i").test(e)?eO:/iPad/.test(e)?ea:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?eu:eB.test(e)?eh:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(eC,"i").test(e)?eC:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(es).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?er:eo:RegExp("(pda|"+es+")","i").test(e)?eL:RegExp(en,"i").test(e)&&!RegExp(en+" pc","i").test(e)?eN:""},eJ=e=>e instanceof Error,eZ={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},eQ=eZ.info;function e0(e){var t=[];for(var i in e){var s=e[i];j(s)||q(s)||t.push({key:i,value:function e(t){if(V(t))return{boolValue:t};if("number"==typeof t)return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if("string"==typeof t)return{stringValue:t};if(M(t))return{arrayValue:{values:t.map(t=>e(t))}};try{return{stringValue:JSON.stringify(t)}}catch(e){return{stringValue:String(t)}}}(s)})}return t}class e1{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,t,0).apply(e),r=this.buildParsingContext(t),n=this.parseStacktrace(s,r);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return g(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&M(i.stacktrace.frames)&&(i.stacktrace.frames=yield t.applyModifiers(i.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var i,s;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),v({},e,{cause:i,stack:s})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var i of this.coercers)if(i.match(e))return i.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return g(function*(){var i=e;for(var s of t.modifiers)i=yield s(i);return i})()}convertToExceptionList(e,t){var i,s,r,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(s=t.handled)||s,synthetic:null!=(r=e.synthetic)&&r}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var o=[n];return null!=e.cause&&o.push(...this.convertToExceptionList(e.cause,v({},t,{handled:!0}))),o}buildParsingContext(e){var t;return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return ei&&i.length===et||(et=i.length,ei=i.reduce((i,s)=>{ee||(ee={});var r=ee[s];if(r)i[r[0]]=r[1];else for(var n=e(s),o=n.length-1;o>=0;o--){var a=n[o],l=null==a?void 0:a.filename,u=t[s];if(l&&u){i[l]=u,ee[s]=[l,u];break}}return i},{})),ei}}(this.stackParser),skipFirstLines:null!=(t=e.skipFirstLines)?t:1}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var s=(i,s)=>{if(4>=s){var r=this.buildCoercingContext(e,t,s);return this.applyCoercers(i,r)}};return v({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>s(e,i),next:e=>s(e,i+1)})}}function e2(e,t,i,s,r){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!0};return q(s)||(n.lineno=s),q(r)||(n.colno=r),n}var e3=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),s=-1!==e.indexOf("safari-web-extension");return i||s?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},e5=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,e8=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,e6=/\((\S*)(?::(\d+))(?::(\d+))\)/,e4=(e,t)=>{var i=e5.exec(e);if(i){var[,s,r,n]=i;return e2(t,s,"?",+r,+n)}var o=e8.exec(e);if(o){if(o[2]&&0===o[2].indexOf("eval")){var a=e6.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,u]=e3(o[1]||"?",o[2]);return e2(t,u,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},e7=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,e9=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,te=(e,t)=>{var i=e7.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var s=e9.exec(i[3]);s&&(i[1]=i[1]||"eval",i[3]=s[1],i[4]=s[2],i[5]="")}var r=i[3],n=i[1]||"?";return[n,r]=e3(n,r),e2(t,r,n,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},tt=/\(error: (.*)\)/;class ti{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=D(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return Y(e,"DOMException")}isDOMError(e){return Y(e,"DOMError")}}class ts{match(e){return e instanceof Error}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var i=e.message;return String(i.error&&"string"==typeof i.error.message?i.error.message:i)}getStack(e){return e.stacktrace||e.stack||void 0}}class tr{match(e){return Y(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var i;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}var tn=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class to{match(e){return"string"==typeof e}coerce(e,t){var i,[s,r]=this.getInfos(e);return{type:null!=s?s:"Error",value:null!=r?r:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,s=e.match(tn);return s&&(t=s[1],i=s[2]),[t,i]}}var ta=["fatal","error","warning","log","info","debug"];function tl(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var s=i.length;s>0;s--){var r=i.slice(0,s).join(", ");if(t>=r.length)return s===i.length?r:r.length>t?r.slice(0,t)+"...":r}return""}class tu{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,s=this.getErrorPropertyFromObject(e);return s?t.apply(s):{type:this.getType(e),value:this.getValue(e),stack:null==(i=t.syntheticException)?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return X(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var i=this.getObjectClassName(e);return(i&&"Object"!==i?"'"+i+"'":"Object")+" captured as exception with keys: "+tl(e)}isSeverityLevel(e){return D(e)&&!U(e)&&ta.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(({}).hasOwnProperty.call(e,t)){var i=e[t];if(eJ(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class tc{match(e){return X(e)}coerce(e,t){var i,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+tl(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class th{match(e){return G(e)}coerce(e,t){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class td{match(e){return Y(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!X(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var i,s=this.getUnhandledRejectionReason(e);return G(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(s)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var tp="$message",t_="$timestamp",tg=new Set([tp,t_]),tv={enabled:!0,max_bytes:32768};function tf(e){var t;return e?{enabled:null!=(t=e.enabled)?t:tv.enabled,max_bytes:function(e,t){if(!z(e)||e===1/0||e===-1/0)return t;var i=Math.floor(e);return 0>i?t:i}(e.max_bytes,tv.max_bytes)}:v({},tv)}class tm{constructor(e){this.Yt=[],this.Xt=0,this.qt=tf(e)}setConfig(e){this.qt=tf(e),this.er()}add(e){var t=function(e){var t=function(e){var t=new WeakSet;try{return JSON.stringify(e,(e,i)=>{if("bigint"==typeof i)return i.toString();if("function"!=typeof i&&"symbol"!=typeof i){if(i instanceof Date)return i.toISOString();if(i instanceof Error)return{name:i.name,message:i.message,stack:i.stack};if(i&&"object"==typeof i){if(t.has(i))return"[Circular]";t.add(i)}return i}})}catch(e){return}}(e);if(t)try{var i=JSON.parse(t);if(!L(i))return;var s=i[tp],r=i[t_];if(!D(s)||0===s.trim().length||!D(r)&&!z(r))return;return{step:i,json:t}}catch(e){return}}(e);if(t){var i=function(e){if("u">typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),i=0,s=0;t.length>s;s++)"%"===t[s]?(i+=1,s+=2):i+=1;return i}(t.json);i>this.qt.max_bytes||(this.Yt.push({step:t.step,bytes:i}),this.Xt+=i,this.er())}}getAttachable(){return this.Yt.map(e=>e.step)}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var e=this.Yt.shift();e&&(this.Xt-=e.bytes)}}}var ty=function(e,i){var{debugEnabled:s}=void 0===i?{}:i,r={k(i){if(t&&(p.DEBUG||h.POSTHOG_DEBUG||s)&&!q(t.console)&&t.console){for(var r=("__rrweb_original__"in t.console[i])?t.console[i].__rrweb_original__:t.console[i],n=arguments.length,o=Array(n>1?n-1:0),a=1;n>a;a++)o[a-1]=arguments[a];r(e,...o)}},debug(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];r.k("debug",...t)},info(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];r.k("log",...t)},warn(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];r.k("warn",...t)},error(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];r.k("error",...t)},critical(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];console.error(e,...i)},uninitializedWarning(e){r.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>ty(e+" "+t,i)};return r},tb=ty("[PostHog.js]"),tE=tb.createLogger,tx=tE("[ExternalScriptsLoader]"),tw=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return tx.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var s=null==r?void 0:r.querySelectorAll("script");if(s){for(var n,o=0;s.length>o;o++)if(n=function(){if(s[o].src===t){var e=s[o];return e.__posthog_loading_callback_fired?{v:i()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,i(void 0,t)}),e.onerror=e=>i(e),{v:void 0})}}())return n.v}var a=()=>{if(!r)return i("document not found");var s=r.createElement("script");if(s.type="text/javascript",s.crossOrigin="anonymous",s.src=t,s.onload=e=>{s.__posthog_loading_callback_fired=!0,i(void 0,e)},s.onerror=e=>i(e),e.config.prepare_external_dependency_script&&(s=e.config.prepare_external_dependency_script(s)),!s)return i("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)r.head.appendChild(s);else{var n,o=r.querySelectorAll("body > script");o.length>0?null==(n=o[0].parentNode)||n.insertBefore(s,o[0]):r.body.appendChild(s)}};null!=r&&r.body?a():null==r||r.addEventListener("DOMContentLoaded",a)};h.__PosthogExtensions__=h.__PosthogExtensions__||{},h.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{if("remote-config"!==t){var s;if(e.config.__preview_external_dependency_versioned_paths)s=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var r="/static/"+t+".js?v="+e.version;"toolbar"===t&&(r=r+"&t="+3e5*Math.floor(Date.now()/3e5)),s=e.requestRouter.endpointFor("assets",r)}tw(e,s,i)}else{var n=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");tw(e,n,i)}},h.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var s=e.requestRouter.endpointFor("api",t);tw(e,s,i)};var tS="$people_distinct_id",tk="$device_id",tP="__alias",tT="__timers",tR="$autocapture_disabled_server_side",t$="$heatmaps_enabled_server_side",tF="$exception_capture_enabled_server_side",tI="$error_tracking_suppression_rules",tO="$error_tracking_capture_extension_exceptions",tC="$web_vitals_enabled_server_side",tM="$dead_clicks_enabled_server_side",tA="$product_tours_enabled_server_side",tL="$web_vitals_allowed_metrics",tN="$session_recording_remote_config",tq="$replay_override_sampling",tD="$replay_override_linked_flag",tU="$replay_override_url_trigger",tj="$replay_override_event_trigger",tH="$sesid",tz="$session_is_sampled",tB="$enabled_feature_flags",tV="$active_feature_flags",tW="$early_access_features",tG="$feature_flag_details",tY="$feature_flag_payloads",tX="$feature_flag_request_id",tK="$override_feature_flags",tJ="$override_feature_flag_payloads",tZ="$stored_person_properties",tQ="$stored_group_properties",t0="$surveys",t1="$surveys_activated",t2="ph_product_tours",t3="$flag_call_reported",t5="$flag_call_reported_session_id",t8="$feature_flag_errors",t6="$feature_flag_evaluated_at",t4="$user_state",t7="$client_session_props",t9="$capture_rate_limit",ie="$initial_campaign_params",it="$initial_referrer_info",ii="$initial_person_info",is="$epp",ir="__POSTHOG_TOOLBAR__",io="$posthog_cookieless",ia="$sdk_debug_extensions_init_method",il="$sdk_debug_extensions_init_time_ms",iu="$sdk_debug_recording_script_not_loaded",ic="PostHog loadExternalDependency extension not found.",ih="on_reject",id="always",ip="anonymous",i_="identified",ig="identified_only",iv="visibilitychange",im="beforeunload",iy="$pageview",ib="$pageleave",iE="$identify",ix="$groupidentify";function iw(e,t){M(e)&&e.forEach(t)}function iS(e,t){if(!H(e))if(M(e))e.forEach(t);else if(e instanceof FormData)e.forEach((e,i)=>t(e,i));else for(var i in e)O.call(e,i)&&t(e[i],i)}var ik=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];for(var r of i)for(var n in r)void 0!==r[n]&&(e[n]=r[n]);return e};function iP(e){for(var t=Object.keys(e),i=t.length,s=Array(i);i--;)s[i]=[t[i],e[t[i]]];return s}var iT=function(e){try{return e()}catch(e){return}},iR=function(e){return function(){try{for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,i)}catch(e){tb.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),tb.critical(e)}}},i$=function(e){var t={};return iS(e,function(e,i){(D(e)&&e.length>0||z(e))&&(t[i]=e)}),t},iF=["herokuapp.com","vercel.app","netlify.app"];function iI(e,t,i,s){var{capture:r=!1,passive:n=!0}=null!=s?s:{};null==e||e.addEventListener(t,i,{capture:r,passive:n})}function iO(e){return"ph_toolbar_internal"===e.name}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return z(e)&&isFinite(e)&&Math.floor(e)===e});class iC{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,s){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(s)||0>e||0>t||0>i||0>s||e>0xffffffffffff||t>4095||i>0x3fffffff||s>0xffffffff)throw RangeError("invalid field value");var r=new Uint8Array(16);return r[0]=e/0x10000000000,r[1]=e/0x100000000,r[2]=e/0x1000000,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|t>>>8,r[7]=t,r[8]=128|i>>>24,r[9]=i>>>16,r[10]=i>>>8,r[11]=i,r[12]=s>>>24,r[13]=s>>>16,r[14]=s>>>8,r[15]=s,new iC(r)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new iC(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var i=this.bytes[t]-e.bytes[t];if(0!==i)return Math.sign(i)}return 0}}class iM{constructor(){this.S=0,this.C=0,this.I=new iN}generate(){var e=this.generateOrAbort();if(q(e)){this.S=0;var t=this.generateOrAbort();if(q(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.T();else{if(this.S>=e+1e4)return;this.C++,this.C>0x3ffffffffff&&(this.S++,this.T())}return iC.fromFieldsV7(this.S,Math.trunc(this.C/0x40000000),0x3fffffff&this.C,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var iA,iL=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};t&&!q(t.crypto)&&crypto.getRandomValues&&(iL=e=>crypto.getRandomValues(e));class iN{constructor(){this.M=new Uint32Array(8),this.O=1/0}nextUint32(){return this.M.length>this.O||(iL(this.M),this.O=0),this.M[this.O++]}}var iq=()=>iD().toString(),iD=()=>(iA||(iA=new iM)).generate(),iU="",ij=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,iH={R:()=>!!r,D(e){tb.error("cookieStore error: "+e)},A(e){if(r){try{for(var t=e+"=",i=r.cookie.split(";").filter(e=>e.length),s=0;i.length>s;s++){for(var n=i[s];" "==n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}}catch(e){}return null}},F(e){var t;try{t=JSON.parse(iH.A(e))||{}}catch(e){}return t},N(e,t,i,s,n){if(r)try{var o="",a="",l=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=r),iU)return iU;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),s=Math.min(i.length,8),n="dmn_chk_"+iq();!iU&&s--;){var o=i.slice(s).join("."),a=n+"=1;domain=."+o+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(n)&&(t.cookie=a+";max-age=0",iU=o)}return iU}(e);if(!i){var s,n=(s=e.match(ij))?s[0]:"";n!==i&&tb.info("Warning: cookie subdomain discovery mismatch",n,i),i=n}return i?"; domain=."+i:""}return""}(r.location.hostname,s);if(i){var u=new Date;u.setTime(u.getTime()+864e5*i),o="; expires="+u.toUTCString()}n&&(a="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+o+"; SameSite=Lax; path=/"+l+a;return c.length>3686.4&&tb.warn("cookieStore warning: large cookie, len="+c.length),r.cookie=c,c}catch(e){return}},q(e,t){if(null!=r&&r.cookie)try{iH.N(e,"",-1,t)}catch(e){return}}},iz=null,iB={R(){if(!j(iz))return iz;var e=!0;if(q(t))e=!1;else try{var i="__mplssupport__";iB.N(i,"xyz"),'"xyz"'!==iB.A(i)&&(e=!1),iB.q(i)}catch(t){e=!1}return e||tb.error("localStorage unsupported; falling back to cookie store"),iz=e,e},D(e){tb.error("localStorage error: "+e)},A(e){try{return null==t?void 0:t.localStorage.getItem(e)}catch(e){iB.D(e)}return null},F(e){try{return JSON.parse(iB.A(e))||{}}catch(e){}return null},N(e,i){try{null==t||t.localStorage.setItem(e,JSON.stringify(i))}catch(e){iB.D(e)}},q(e){try{null==t||t.localStorage.removeItem(e)}catch(e){iB.D(e)}}},iV=[tk,"distinct_id",tH,tz,is,ii,t4],iW={},iG={R:()=>!0,D(e){tb.error("memoryStorage error: "+e)},A:e=>iW[e]||null,F:e=>iW[e]||null,N(e,t){iW[e]=t},q(e){delete iW[e]}},iY=null,iX={R(){if(!j(iY))return iY;if(iY=!0,q(t))iY=!1;else try{var e="__support__";iX.N(e,"xyz"),'"xyz"'!==iX.A(e)&&(iY=!1),iX.q(e)}catch(e){iY=!1}return iY},D(e){tb.error("sessionStorage error: ",e)},A(e){try{return null==t?void 0:t.sessionStorage.getItem(e)}catch(e){iX.D(e)}return null},F(e){try{return JSON.parse(iX.A(e))||null}catch(e){}return null},N(e,i){try{null==t||t.sessionStorage.setItem(e,JSON.stringify(i))}catch(e){iX.D(e)}},q(e){try{null==t||t.sessionStorage.removeItem(e)}catch(e){iX.D(e)}}};class iK{constructor(e){this._instance=e}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===id||this.isRejected()||-1===this.consent&&this.qt.cookieless_mode===ih}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.qt.opt_out_capturing_by_default}optInOut(e){this.nr.N(this.sr,+!!e,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:i}=this._instance.config;return i||(t?t+e:"__ph_opt_in_out_"+e)}get ir(){var e=this.nr.A(this.sr);return R(K,e)?1:R(J,e)?0:-1}get nr(){var e=this.qt.opt_out_capturing_persistence_type,t="localStorage"===e?iB:iH;if(!this.ar||this.ar!==t){this.ar=t;var i="localStorage"===e?iH:iB;i.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(R(K,i.A(this.sr))),i.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[null==s?void 0:s.doNotTrack,null==s?void 0:s.msDoNotTrack,h.doNotTrack].some(e=>R(K,e))}}var iJ=tE("[Dead Clicks]"),iZ=()=>!0,iQ=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(tM)),s=e.instance.config.capture_dead_clicks;return V(s)?s:!!L(s)||i};class i0{get lazyLoadedDeadClicksAutocapture(){return this.ur}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[tM]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.lr(()=>{this.hr()}):this.stop()}lr(e){var t,i;null!=(t=h.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=h.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?iJ.error("failed to load script",t):e()})}hr(){var e;if(r){if(!this.ur&&null!=(e=h.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=L(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.ur=h.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.ur.start(r),iJ.info("starting...")}}else iJ.error("`document` not found. Cannot start.")}stop(){this.ur&&(this.ur.stop(),this.ur=void 0,iJ.info("stopping..."))}}var i1=tE("[SegmentIntegration]"),i2="posthog-js";function i3(e,t){var{organization:i,projectId:s,prefix:r,severityAllowList:n=["error"],sendExceptionsToPostHog:o=!0}=void 0===t?{}:t;return t=>{if("*"!==n&&!n.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var a=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=a,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var l,u,c,h,d,p,_=(null==(l=t.exception)?void 0:l.values)||[],g=_.map(e=>v({},e,{stacktrace:e.stacktrace?v({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>v({},e,{platform:"web:javascript"}))}):void 0})),f={$exception_message:(null==(u=_[0])?void 0:u.value)||t.message,$exception_type:null==(c=_[0])?void 0:c.type,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(h=_[0])?void 0:h.value)||t.message,$sentry_exception_type:null==(d=_[0])?void 0:d.type,$sentry_tags:t.tags};return i&&s&&(f.$sentry_url=(r||"https://sentry.io/organizations/")+i+"/issues/?project="+s+"&query="+t.event_id),o&&(null==(p=e.exceptions)||p.sendExceptionEvent(f)),t}}class i5{constructor(e,t,i,s,r,n){this.name=i2,this.setupOnce=function(o){o(i3(e,{organization:t,projectId:i,prefix:s,severityAllowList:r,sendExceptionsToPostHog:null==n||n}))}}}class i8{constructor(e){this.cr=(e,t,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength)&&(tb.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:i}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.vr()}vr(){var e;this.pr=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.cr)}destroy(){var e;null==(e=this.pr)||e.call(this),this.pr=void 0}doPageView(e,i){var s,r=this.gr(e,i);return this.dr={pathname:null!=(s=null==t?void 0:t.location.pathname)?s:"",pageViewId:i,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.gr(e,null==(t=this.dr)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.dr)?void 0:e.pageViewId}}gr(e,t){var i=this.dr;if(!i)return{$pageview_id:t};var s={$pageview_id:t,$prev_pageview_id:i.pageViewId},r=this._instance.scrollManager.getContext();if(r&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:n,lastScrollY:o,maxScrollY:a,maxContentHeight:l,lastContentY:u,maxContentY:c}=r;if(!(q(n)||q(o)||q(a)||q(l)||q(u)||q(c))){n=Math.ceil(n),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c);var h=n>1?Z(o/n,0,1,tb):1,d=n>1?Z(a/n,0,1,tb):1,p=l>1?Z(u/l,0,1,tb):1,_=l>1?Z(c/l,0,1,tb):1;s=ik(s,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:d,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:_})}}return i.pathname&&(s.$prev_pageview_pathname=i.pathname),i.timestamp&&(s.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),s}}var i6={[tS]:{exposure:"hidden"},[tP]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[tT]:{exposure:"hidden"},[tR]:{exposure:"event"},[t$]:{exposure:"hidden"},[tF]:{exposure:"event"},[tI]:{exposure:"hidden"},[tO]:{exposure:"event"},[tC]:{exposure:"event"},[tM]:{exposure:"event"},[tA]:{exposure:"hidden"},[tL]:{exposure:"event"},[tN]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[tH]:{exposure:"hidden"},[tz]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[tB]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!L(e))return{};for(var t={},i=Object.keys(e),s=0;i.length>s;s++)t["$feature/"+i[s]]=e[i[s]];return t}},[tV]:{exposure:"event"},[tW]:{exposure:"hidden"},[tG]:{exposure:"hidden"},[tY]:{exposure:"event"},[tX]:{exposure:"event"},[tK]:{exposure:"event"},[tJ]:{exposure:"hidden"},[tZ]:{exposure:"hidden"},[tQ]:{exposure:"hidden"},[t0]:{exposure:"hidden"},[t1]:{exposure:"event"},[t2]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[t3]:{exposure:"hidden"},[t5]:{exposure:"hidden"},[t8]:{exposure:"hidden"},[t6]:{exposure:"hidden"},[t4]:{exposure:"hidden"},[t7]:{exposure:"hidden"},[t9]:{exposure:"hidden"},[ie]:{exposure:"hidden"},[it]:{exposure:"hidden"},[ii]:{exposure:"hidden"},[is]:{exposure:"hidden"},[tq]:{exposure:"event"},[tD]:{exposure:"event"},[tU]:{exposure:"event"},[tj]:{exposure:"event"},[ia]:{exposure:"event"},[il]:{exposure:"event"},[iu]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},i4=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],i7=e=>{var t=null==r?void 0:r.createElement("a");return q(t)?null:(t.href=e,t)},i9=function(e,t){for(var i,s=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;s.length>r;r++){var n=s[r].split("=");if(n[0]===t){i=n;break}}if(!M(i)||2>i.length)return"";var o=i[1];try{o=decodeURIComponent(o)}catch(e){tb.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},se=function(e,t,i){if(!e||!t||!t.length)return e;for(var s=e.split("#"),r=s[1],n=(s[0]||"").split("?"),o=n[1],a=n[0],l=(o||"").split("&"),u=[],c=0;l.length>c;c++){var h=l[c].split("=");M(h)&&(t.includes(h[0])?u.push(h[0]+"="+i):u.push(l[c]))}var d=a;return null!=o&&(d+="?"+u.join("&")),null!=r&&(d+="#"+r),d},st=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},si="https?://(.*)",ss=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],sr=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...ss],sn="<masked>",so=["li_fat_id"];function sa(e,t,i){if(!r)return{};var s,n=t?[...ss,...i||[]]:[],o=sl(se(r.URL,n,sn),e);return ik((s={},iS(so,function(e){var t=iH.A(e);s[e]=t||null}),s),o)}function sl(e,t){var i=sr.concat(t||[]),s={};return iS(i,function(t){var i=i9(e,t);s[t]=i||null}),s}function su(e){var t=e?0===e.search(si+"google.([^/?]*)")?"google":0===e.search(si+"bing.com")?"bing":0===e.search(si+"yahoo.com")?"yahoo":0===e.search(si+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!j(t)){i.$search_engine=t;var s=r?i9(r.referrer,"yahoo"!=t?"q":"p"):"";s.length&&(i.ph_keyword=s)}return i}function sc(){return navigator.language||navigator.userLanguage}var sh="$direct";function sd(){return(null==r?void 0:r.referrer)||sh}function sp(e,t){var i=e?[...ss,...t||[]]:[],s=null==n?void 0:n.href.substring(0,1e3);return{r:sd().substring(0,1e3),u:s?se(s,i,sn):void 0}}function s_(e){var t,{r:i,u:s}=e,r={$referrer:i,$referring_domain:null==i?void 0:i==sh?sh:null==(t=i7(i))?void 0:t.host};if(s){r.$current_url=s;var n=i7(s);r.$host=null==n?void 0:n.host,r.$pathname=null==n?void 0:n.pathname,ik(r,sl(s))}return i&&ik(r,su(i)),r}function sg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var sv=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class sf{constructor(e,t){this.qt=e,this.props={},this.mr=!1,this.yr=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.nr=this.br(e),this.load(),e.debug&&tb.info("Persistence loaded",e.persistence,v({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this._r}br(e){-1===sv.indexOf(e.persistence.toLowerCase())&&(tb.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var i,s,r=(void 0===(i=e.cookie_persisted_properties||[])&&(i=[]),s=[...iV,...i],v({},iB,{F(e){try{var t={};try{t=iH.F(e)||{}}catch(e){}var i=ik(t,JSON.parse(iB.A(e)||"{}"));return iB.N(e,i),i}catch(e){}return null},N(e,t,i,r,n,o){try{iB.N(e,t,void 0,void 0,o);var a={};s.forEach(e=>{t[e]&&(a[e]=t[e])}),Object.keys(a).length&&iH.N(e,a,i,r,n,o)}catch(e){iB.D(e)}},q(e,i){try{null==t||t.localStorage.removeItem(e),iH.q(e,i)}catch(e){iB.D(e)}}})),n=e.persistence.toLowerCase();return"localstorage"===n&&iB.R()?iB:"localstorage+cookie"===n&&r.R()?r:"sessionstorage"===n&&iX.R()?iX:"memory"===n?iG:"cookie"===n?iH:r.R()?r:iH}wr(e){var t=null!=e?e:this.qt.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var i=this.props[t6];return!i||"number"!=typeof i||Date.now()-i>t}properties(){var e={};return iS(this.props,(t,i)=>{var s=(e=>{var t=i6[e];if(t)return t;for(var[i,s]of i4)if(0===e.indexOf(i))return s})(i);if("derived"===(null==s?void 0:s.exposure)){if(null!=s.shouldSkipFromEventProperties&&s.shouldSkipFromEventProperties(t,i===tB?()=>this.wr():()=>!1))return;s.transformToEventProperties&&ik(e,s.transformToEventProperties(t))}else s&&"event"!==s.exposure||(e[i]=t)}),e}load(){if(!this._r){var e=this.nr.F(this.yr);e&&(this.props=ik({},e))}}save(){this._r||this.nr.N(this.yr,this.props,this.Sr,this.kr,this.Cr,this.qt.debug)}remove(){this.nr.q(this.yr,!1),this.nr.q(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(L(e)){q(t)&&(t="None"),this.Sr=q(i)?this.Ir:i;var s=!1;if(iS(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.Tr(i,e),s=!0)}),s)return this.save(),!0}return!1}register(e,t){if(L(e)){this.Sr=q(t)?this.Ir:t;var i=!1;if(iS(e,(t,s)=>{e.hasOwnProperty(s)&&this.props[s]!==t&&(this.Tr(s,t),i=!0)}),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.Er(e),this.save())}update_campaign_params(){if(!this.mr){var e=sa(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);N(i$(e))||this.register(e),this.mr=!0}}update_search_keyword(){var e;this.register((e=null==r?void 0:r.referrer)?su(e):{})}update_referrer_info(){var e;this.register_once({$referrer:sd(),$referring_domain:null!=r&&r.referrer&&(null==(e=i7(r.referrer))?void 0:e.host)||sh},void 0)}set_initial_person_info(){this.props[ie]||this.props[it]||this.register_once({[ii]:sp(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};iS([it,ie],t=>{var i=this.props[t];i&&iS(i,function(t,i){e["$initial_"+F(i)]=t})});var t,i,s=this.props[ii];return s&&ik(e,(t=s_(s),i={},iS(t,function(e,t){i["$initial_"+F(t)]=e}),i)),e}safe_merge(e){return iS(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){if(this.Ir=this.Sr=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var i=[...e].sort(),s=[...t].sort();return i.every((e,t)=>e===s[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var s=this.br(e),r=this.props;this.clear(),this.nr=s,this.props=r,this.save()}}set_disabled(e){this._r=e,this._r?this.remove():this.save()}set_cross_subdomain(e){e!==this.kr&&(this.kr=e,this.remove(),this.save())}set_secure(e){e!==this.Cr&&(this.Cr=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[tT]||{};i[e]=t,this.Tr(tT,i),this.save()}remove_event_timer(e){var t=this.props[tT]||{},i=t[e];return q(i)||(delete t[e],this.Tr(tT,t),this.save()),i}get_property(e){return this.props[e]}set_property(e,t){this.Tr(e,t),this.save()}Tr(e,t){this.props[e]=t}Er(e){delete this.props[e]}}var sm={Activation:"events",Cancellation:"cancelEvents"},sy={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},sb={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},sE={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_RESPONSE:"$survey_response",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_QUESTIONS:"$survey_questions",SURVEY_COMPLETED:"$survey_completed",PRODUCT_TOUR_ID:"$product_tour_id",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date",SURVEY_LANGUAGE:"$survey_language"},sx={Popover:"popover",Inline:"inline"},sw={SHOWN:"product tour shown",DISMISSED:"product tour dismissed",COMPLETED:"product tour completed",STEP_SHOWN:"product tour step shown",STEP_COMPLETED:"product tour step completed",BUTTON_CLICKED:"product tour button clicked",STEP_SELECTOR_FAILED:"product tour step selector failed",BANNER_CONTAINER_SELECTOR_FAILED:"product tour banner container selector failed",BANNER_ACTION_CLICKED:"product tour banner action clicked"},sS={TOUR_ID:"$product_tour_id",TOUR_NAME:"$product_tour_name",TOUR_ITERATION:"$product_tour_iteration",TOUR_RENDER_REASON:"$product_tour_render_reason",TOUR_STEP_ID:"$product_tour_step_id",TOUR_STEP_ORDER:"$product_tour_step_order",TOUR_STEP_TYPE:"$product_tour_step_type",TOUR_DISMISS_REASON:"$product_tour_dismiss_reason",TOUR_BUTTON_TEXT:"$product_tour_button_text",TOUR_BUTTON_ACTION:"$product_tour_button_action",TOUR_BUTTON_LINK:"$product_tour_button_link",TOUR_BUTTON_TOUR_ID:"$product_tour_button_tour_id",TOUR_STEPS_COUNT:"$product_tour_steps_count",TOUR_STEP_SELECTOR:"$product_tour_step_selector",TOUR_STEP_SELECTOR_FOUND:"$product_tour_step_selector_found",TOUR_STEP_ELEMENT_TAG:"$product_tour_step_element_tag",TOUR_STEP_ELEMENT_ID:"$product_tour_step_element_id",TOUR_STEP_ELEMENT_CLASSES:"$product_tour_step_element_classes",TOUR_STEP_ELEMENT_TEXT:"$product_tour_step_element_text",TOUR_ERROR:"$product_tour_error",TOUR_MATCHES_COUNT:"$product_tour_matches_count",TOUR_FAILURE_PHASE:"$product_tour_failure_phase",TOUR_WAITED_FOR_ELEMENT:"$product_tour_waited_for_element",TOUR_WAIT_DURATION_MS:"$product_tour_wait_duration_ms",TOUR_BANNER_SELECTOR:"$product_tour_banner_selector",TOUR_LINKED_SURVEY_ID:"$product_tour_linked_survey_id",USE_MANUAL_SELECTOR:"$use_manual_selector",INFERENCE_DATA_PRESENT:"$inference_data_present",TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},sk=tE("[RateLimiter]");class sP{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{sk.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void sk.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,s,{captureEventsBurstLimit:r,captureEventsPerSecond:n}=this,o=(new Date).getTime(),a=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(t9))?t:{tokens:r,last:o};a.tokens+=(o-a.last)/1e3*n,a.last=o,a.tokens>r&&(a.tokens=r);var l=1>a.tokens;return l||e||(a.tokens=Math.max(0,a.tokens-1)),!l||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+n+" events per second and "+r+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,null==(s=this.instance.persistence)||s.set_property(t9,a),{isRateLimited:l,remainingTokens:a.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var sT=tE("[RemoteConfig]");class sR{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=h._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Mr(e){var t,i;null!=(t=h.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=h.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}Pr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return sT.info("Using preloaded remote config",this.remoteConfig),this.Rr(this.remoteConfig),void this.Or();if(this._instance.Lr())return void sT.warn("Remote config is disabled. Falling back to local config.");this.Mr(e=>{e?(this.Rr(e),this.Or()):(sT.info("No config found after loading remote JS config. Falling back to JSON."),this.Pr(e=>{this.Rr(e),this.Or()}))})}catch(e){sT.error("Error loading remote config",e)}}stop(){this.Fr&&(clearInterval(this.Fr),this.Fr=void 0)}refresh(){!this._instance.Lr()&&r&&"hidden"!==r.visibilityState&&this._instance.reloadFeatureFlags()}Or(){var e;if(!this.Fr){var t=null!=(e=this._instance.config.remote_config_refresh_interval_ms)?e:3e5;0!==t&&(this.Fr=setInterval(()=>{this.refresh()},t))}}Rr(e){var t;e||sT.error("Failed to fetch remote config from PostHog."),this._instance.Rr(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())}}var s$={GZipJS:"gzip-js",Base64:"base64"},sF=Uint8Array,sI=Uint16Array,sO=Uint32Array,sC=new sF([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]),sM=new sF([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]),sA=new sF([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sL=function(e,t){for(var i=new sI(31),s=0;31>s;++s)i[s]=t+=1<<e[s-1];var r=new sO(i[30]);for(s=1;30>s;++s)for(var n=i[s];i[s+1]>n;++n)r[n]=n-i[s]<<5|s;return[i,r]},sN=sL(sC,2),sq=sN[1];sN[0][28]=258,sq[258]=28;for(var sD=sL(sM,0)[1],sU=new sI(32768),sj=0;32768>sj;++sj){var sH=(43690&sj)>>>1|(21845&sj)<<1;sU[sj]=((65280&(sH=(61680&(sH=(52428&sH)>>>2|(13107&sH)<<2))>>>4|(3855&sH)<<4))>>>8|(255&sH)<<8)>>>1}var sz=function(e,t,i){for(var s=e.length,r=0,n=new sI(t);s>r;++r)++n[e[r]-1];var o,a=new sI(t);for(r=0;t>r;++r)a[r]=a[r-1]+n[r-1]<<1;if(i){o=new sI(1<<t);var l=15-t;for(r=0;s>r;++r)if(e[r])for(var u=r<<4|e[r],c=t-e[r],h=a[e[r]-1]++<<c,d=h|(1<<c)-1;d>=h;++h)o[sU[h]>>>l]=u}else for(o=new sI(s),r=0;s>r;++r)o[r]=sU[a[e[r]-1]++]>>>15-e[r];return o},sB=new sF(288);for(sj=0;144>sj;++sj)sB[sj]=8;for(sj=144;256>sj;++sj)sB[sj]=9;for(sj=256;280>sj;++sj)sB[sj]=7;for(sj=280;288>sj;++sj)sB[sj]=8;var sV=new sF(32);for(sj=0;32>sj;++sj)sV[sj]=5;var sW=sz(sB,9,0),sG=sz(sV,5,0),sY=function(e){return(e/8|0)+(7&e&&1)},sX=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var s=new(e instanceof sI?sI:e instanceof sO?sO:sF)(i-t);return s.set(e.subarray(t,i)),s},sK=function(e,t,i){var s=t/8|0;e[s]|=i<<=7&t,e[s+1]|=i>>>8},sJ=function(e,t,i){var s=t/8|0;e[s]|=i<<=7&t,e[s+1]|=i>>>8,e[s+2]|=i>>>16},sZ=function(e,t){for(var i=[],s=0;e.length>s;++s)e[s]&&i.push({s:s,f:e[s]});var r=i.length,n=i.slice();if(!r)return[new sF(0),0];if(1==r){var o=new sF(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var a=i[0],l=i[1],u=0,c=1,h=2;for(i[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=r-1;)a=i[i[h].f>i[u].f?u++:h++],l=i[u!=c&&i[h].f>i[u].f?u++:h++],i[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=n[0].s;for(s=1;r>s;++s)n[s].s>d&&(d=n[s].s);var p=new sI(d+1),_=sQ(i[c-1],p,0);if(_>t){s=0;var g=0,v=_-t,f=1<<v;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r>s;++s){var m=n[s].s;if(t>=p[m])break;g+=f-(1<<_-p[m]),p[m]=t}for(g>>>=v;g>0;){var y=n[s].s;t>p[y]?g-=1<<t-p[y]++-1:++s}for(;s>=0&&g;--s){var b=n[s].s;p[b]==t&&(--p[b],++g)}_=t}return[new sF(p),_]},sQ=function(e,t,i){return -1==e.s?Math.max(sQ(e.l,t,i+1),sQ(e.r,t,i+1)):t[e.s]=i},s0=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new sI(++t),s=0,r=e[0],n=1,o=function(e){i[s++]=e},a=1;t>=a;++a)if(e[a]==r&&a!=t)++n;else{if(!r&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(r),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(r);n=1,r=e[a]}return[i.subarray(0,s),t]},s1=function(e,t){for(var i=0,s=0;t.length>s;++s)i+=e[s]*t[s];return i},s2=function(e,t,i){var s=i.length,r=sY(t+2);e[r]=255&s,e[r+1]=s>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var n=0;s>n;++n)e[r+n+4]=i[n];return 8*(r+4+s)},s3=function(e,t,i,s,r,n,o,a,l,u,c){sK(t,c++,i),++r[256];for(var h=sZ(r,15),d=h[0],p=h[1],_=sZ(n,15),g=_[0],v=_[1],f=s0(d),m=f[0],y=f[1],b=s0(g),E=b[0],x=b[1],w=new sI(19),S=0;m.length>S;++S)w[31&m[S]]++;for(S=0;E.length>S;++S)w[31&E[S]]++;for(var k=sZ(w,7),P=k[0],T=k[1],R=19;R>4&&!P[sA[R-1]];--R);var $,F,I,O,C=u+5<<3,M=s1(r,sB)+s1(n,sV)+o,A=s1(r,d)+s1(n,g)+o+14+3*R+s1(w,P)+(2*w[16]+3*w[17]+7*w[18]);if(M>=C&&A>=C)return s2(t,c,e.subarray(l,l+u));if(sK(t,c,1+(M>A)),c+=2,M>A){$=sz(d,p,0),F=d,I=sz(g,v,0),O=g;var L=sz(P,T,0);for(sK(t,c,y-257),sK(t,c+5,x-1),sK(t,c+10,R-4),c+=14,S=0;R>S;++S)sK(t,c+3*S,P[sA[S]]);c+=3*R;for(var N=[m,E],q=0;2>q;++q){var D=N[q];for(S=0;D.length>S;++S)sK(t,c,L[U=31&D[S]]),c+=P[U],U>15&&(sK(t,c,D[S]>>>5&127),c+=D[S]>>>12)}}else $=sW,F=sB,I=sG,O=sV;for(S=0;a>S;++S)if(s[S]>255){sJ(t,c,$[257+(U=s[S]>>>18&31)]),c+=F[U+257],U>7&&(sK(t,c,s[S]>>>23&31),c+=sC[U]);var U,j=31&s[S];sJ(t,c,I[j]),c+=O[j],j>3&&(sJ(t,c,s[S]>>>5&8191),c+=sM[j])}else sJ(t,c,$[s[S]]),c+=F[s[S]];return sJ(t,c,$[256]),c+F[256]},s5=new sO([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),s8=function(){for(var e=new sO(256),t=0;256>t;++t){for(var i=t,s=9;--s;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),s6=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},s4=!!a||!!o,s7="text/plain",s9=!1,re=function(e,t,i){void 0===i&&(i=!0);var s,r,n,o,a,[l,u]=e.split("?"),c=v({},t),h=null!=(a=null==u?void 0:u.split("&").map(e=>{var t,[s,r]=e.split("="),n=i&&null!=(t=c[s])?t:r;return delete c[s],s+"="+n}))?a:[],d=(void 0===s&&(s="&"),o=[],iS(c,function(e,t){q(e)||q(t)||"undefined"===t||(r=encodeURIComponent(e instanceof File?e.name:e.toString()),n=encodeURIComponent(t),o[o.length]=n+"="+r)}),o.join(s));return d&&h.push(d),l+"?"+h.join("&")},rt=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),ri=e=>{if(e.tr)return e.tr;var{data:t,compression:i}=e;if(t){if(i===s$.GZipJS){var s,r,n,o,a,l,u,c,h=(s=function(e){var t=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var i=new sF(e.length+(e.length>>>1)),s=0,r=function(e){i[s++]=e},n=0;t>n;++n){if(s+5>i.length){var o=new sF(s+8+(t-n<<1));o.set(i),i=o}var a=e.charCodeAt(n);128>a?r(a):(2048>a?r(192|a>>>6):(a>55295&&57344>a?(r(240|(a=65536+(1047552&a)|1023&e.charCodeAt(++n))>>>18),r(128|a>>>12&63)):r(224|a>>>12),r(128|a>>>6&63)),r(128|63&a))}return sX(i,0,s)}(rt(t)),r={mtime:0},n=0xffffffff,o={p(e){for(var t=n,i=0;e.length>i;++i)t=s8[255&t^e[i]]^t>>>8;n=t},d:()=>0xffffffff^n},a=s.length,o.p(s),c=(l=10+(r.filename&&r.filename.length+1||0),u=function(e,t,i,s){var r=e.length,n=new sF(s+r+5*(1+Math.floor(r/7e3))+8),o=n.subarray(s,n.length-8),a=0;if(!t||8>r)for(var l=0;r>=l;l+=65535){var u=l+65535;r>u?a=s2(o,a,e.subarray(l,u)):(o[l]=!0,a=s2(o,a,e.subarray(l,r)))}else{for(var c=s5[t-1],h=c>>>13,d=8191&c,p=(1<<i)-1,_=new sI(32768),g=new sI(p+1),v=Math.ceil(i/3),f=2*v,m=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<f)&p},y=new sO(25e3),b=new sI(288),E=new sI(32),x=0,w=0,S=(l=0,0),k=0,P=0;r>l;++l){var T=m(l),R=32767&l,$=g[T];if(_[R]=$,g[T]=R,l>=k){var F=r-l;if((x>7e3||S>24576)&&F>423){a=s3(e,o,0,y,b,E,w,S,P,l-P,a),S=x=w=0,P=l;for(var I=0;286>I;++I)b[I]=0;for(I=0;30>I;++I)E[I]=0}var O=2,C=0,M=d,A=R-$&32767;if(F>2&&T==m(l-A))for(var L=Math.min(h,F)-1,N=Math.min(32767,l),q=Math.min(258,F);N>=A&&--M&&R!=$;){if(e[l+O]==e[l+O-A]){for(var D=0;q>D&&e[l+D]==e[l+D-A];++D);if(D>O){if(O=D,C=A,D>L)break;var U=Math.min(A,D-2),j=0;for(I=0;U>I;++I){var H=l-A+I+32768&32767,z=H-_[H]+32768&32767;z>j&&(j=z,$=H)}}}A+=(R=$)-($=_[R])+32768&32767}if(C){y[S++]=0x10000000|sq[O]<<18|sD[C];var B=31&sq[O],V=31&sD[C];w+=sC[B]+sM[V],++b[257+B],++E[V],k=l+O,++x}else y[S++]=e[l],++b[e[l]]}}a=s3(e,o,!0,y,b,E,w,S,P,l-P,a)}return sX(n,0,s+sY(a)+8)}(s,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+r.mem,l)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:2*(9==t.level),e[9]=3,0!=t.mtime&&s6(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var s=0;i.length>=s;++s)e[s+10]=i.charCodeAt(s)}}(u,r),s6(u,c-8,o.d()),s6(u,c-4,a),u);return{contentType:s7,body:h.buffer.slice(h.byteOffset,h.byteOffset+h.byteLength),estimatedSize:h.byteLength}}if(i===s$.Base64){let e;var d,p="data="+encodeURIComponent("string"==typeof(e=(d=rt(t))?btoa(encodeURIComponent(d).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))):d)?e:rt(e));return{contentType:"application/x-www-form-urlencoded",body:p,estimatedSize:new Blob([p]).size}}var _=rt(t);return{contentType:"application/json",body:_,estimatedSize:new Blob([_]).size}}},rs=(rO=g(function*(e){var t=rt(e.data),i=yield function(e,t,i){return S.apply(this,arguments)}(t,p.DEBUG,{rethrow:!0});if(!i)return e;var s=yield i.arrayBuffer();return v({},e,{tr:{contentType:s7,body:s,estimatedSize:s.byteLength}})}),function(e){return rO.apply(this,arguments)}),rr=(e,t)=>re(e,{_:(new Date).getTime().toString(),ver:p.JS_SDK_VERSION,compression:t}),rn=[];o&&rn.push({transport:"fetch",method(e){var t,i,{contentType:s,body:r,estimatedSize:n}=null!=(t=ri(e))?t:{},a=new Headers;iS(e.headers,function(e,t){a.append(t,e)}),s&&a.append("Content-Type",s);var u=e.url,c=null;if(l){var h=new l;c={signal:h.signal,timeout:setTimeout(()=>h.abort(),e.timeout)}}o(u,v({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(n||0),body:r,signal:null==(i=c)?void 0:i.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var s={statusCode:t.status,text:i};if(200===t.status)try{s.json=JSON.parse(i)}catch(e){tb.error(e)}null==e.callback||e.callback(s)})).catch(t=>{tb.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>c?clearTimeout(c.timeout):null)}}),a&&rn.push({transport:"XHR",method(e){var t,i=new a;i.open(e.method||"GET",e.url,!0);var{contentType:s,body:r}=null!=(t=ri(e))?t:{};iS(e.headers,function(e,t){i.setRequestHeader(t,e)}),s&&i.setRequestHeader("Content-Type",s),e.timeout&&(i.timeout=e.timeout),e.disableXHRCredentials||(i.withCredentials=!0),i.onreadystatechange=()=>{if(4===i.readyState){var t={statusCode:i.status,text:i.responseText};if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(r)}}),null!=s&&s.sendBeacon&&rn.push({transport:"sendBeacon",method(e){var t=re(e.url,{beacon:"1"});try{var i,{contentType:r,body:n}=null!=(i=ri(e))?i:{};if(!n)return;var o=n instanceof Blob?n:new Blob([n],{type:r});s.sendBeacon(t,o)}catch(e){}}});class ro{constructor(e,t){this.Ar=!0,this.Nr=[],this.$r=Z((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,tb.createLogger("flush interval"),3e3),this.Dr=e}enqueue(e){this.Nr.push(e),this.qr||this.jr()}unload(){this.Hr();var e=Object.values(this.Nr.length>0?this.Ur():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Dr(v({},e,{transport:"sendBeacon"}))})}enable(){this.Ar=!1,this.jr()}jr(){var e=this;this.Ar||(this.qr=setTimeout(()=>{if(this.Hr(),this.Nr.length>0){var t=this.Ur();for(var i in t)!function(){var s=t[i],r=(new Date).getTime();s.data&&M(s.data)&&iS(s.data,e=>{e.offset=Math.abs(e.timestamp-r),delete e.timestamp}),e.Dr(s)}()}},this.$r))}Hr(){clearTimeout(this.qr),this.qr=void 0}Ur(){var e={};return iS(this.Nr,t=>{var i,s=(t?t.batchKey:null)||t.url;q(e[s])&&(e[s]=v({},t,{data:[]})),null==(i=e[s].data)||i.push(t.data)}),this.Nr=[],e}}var ra=["retriesPerformedSoFar"];class rl{constructor(e){this.Br=!1,this.zr=3e3,this.Nr=[],this._instance=e,this.Nr=[],this.Vr=!0,!q(t)&&"onLine"in t.navigator&&(this.Vr=t.navigator.onLine,this.Wr=()=>{this.Vr=!0,this.Zr()},this.Gr=()=>{this.Vr=!1},iI(t,"online",this.Wr),iI(t,"offline",this.Gr))}get length(){return this.Nr.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=f(e,ra);B(t)&&(i.url=re(i.url,{retry_count:t})),this._instance._send_request(v({},i,{callback:e=>{200===e.statusCode||e.statusCode>=400&&500>e.statusCode||(null!=t?t:0)>=10?null==i.callback||i.callback(e):this.Qr(v({retriesPerformedSoFar:t},i))}}))}Qr(e){var t,i,s=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=s+1;var r=Math.ceil((i=Math.min(18e5,t=3e3*Math.pow(2,s)))+(Math.random()-.5)*(i-t/2)),n=Date.now()+r;this.Nr.push({retryAt:n,requestOptions:e});var o="Enqueued failed request for retry in "+r;navigator.onLine||(o+=" (Browser is offline)"),tb.warn(o),this.Br||(this.Br=!0,this.Jr())}Jr(){(this.Kr&&clearTimeout(this.Kr),0===this.Nr.length)?(this.Br=!1,this.Kr=void 0):this.Kr=setTimeout(()=>{this.Vr&&this.Nr.length>0&&this.Zr(),this.Jr()},this.zr)}Zr(){var e=Date.now(),t=[],i=this.Nr.filter(i=>e>i.retryAt||(t.push(i),!1));if(this.Nr=t,i.length>0)for(var{requestOptions:s}of i)this.retriableRequest(s)}unload(){for(var{requestOptions:e}of(this.Kr&&(clearTimeout(this.Kr),this.Kr=void 0),this.Br=!1,q(t)||(this.Wr&&(t.removeEventListener("online",this.Wr),this.Wr=void 0),this.Gr&&(t.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Nr))try{this._instance._send_request(v({},e,{transport:"sendBeacon"}))}catch(e){tb.error(e)}this.Nr=[]}}class ru{constructor(e){this.Yr=()=>{this.Xr||(this.Xr={});var e,t,i,s,r=this.scrollElement(),n=this.scrollY(),o=r?Math.max(0,r.scrollHeight-r.clientHeight):0,a=n+((null==r?void 0:r.clientHeight)||0),l=(null==r?void 0:r.scrollHeight)||0;this.Xr.lastScrollY=Math.ceil(n),this.Xr.maxScrollY=Math.max(n,null!=(e=this.Xr.maxScrollY)?e:0),this.Xr.maxScrollHeight=Math.max(o,null!=(t=this.Xr.maxScrollHeight)?t:0),this.Xr.lastContentY=a,this.Xr.maxContentY=Math.max(a,null!=(i=this.Xr.maxContentY)?i:0),this.Xr.maxContentHeight=Math.max(l,null!=(s=this.Xr.maxContentHeight)?s:0)},this._instance=e}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Xr}resetContext(){var e=this.Xr;return setTimeout(this.Yr,0),e}startMeasuringScrollPosition(){iI(t,"scroll",this.Yr,{capture:!0}),iI(t,"scrollend",this.Yr,{capture:!0}),iI(t,"resize",this.Yr)}scrollElement(){if(!this.ei)return null==t?void 0:t.document.documentElement;for(var e of M(this.ei)?this.ei:[this.ei]){var i=null==t?void 0:t.document.querySelector(e);if(i)return i}}scrollY(){if(this.ei){var e=this.scrollElement();return e&&e.scrollTop||0}return t&&(t.scrollY||t.pageYOffset||t.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var e=this.scrollElement();return e&&e.scrollLeft||0}return t&&(t.scrollX||t.pageXOffset||t.document.documentElement.scrollLeft)||0}}var rc=e=>sp(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class rh{constructor(e,t,i,s){this.ti=e=>{var t=this.ri();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.ii(this._instance)};this.ni.register({[t7]:i})}},this._instance=e,this.si=t,this.ni=i,this.ii=s||rc,this.si.onSessionId(this.ti)}ri(){return this.ni.props[t7]}getSetOnceProps(){var e,t=null==(e=this.ri())?void 0:e.props;return t?"r"in t?s_(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return iS(i$(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+F(i)]=t}),e}}class rd{constructor(){this.oi={}}on(e,t){return this.oi[e]||(this.oi[e]=[]),this.oi[e].push(t),()=>{this.oi[e]=this.oi[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.oi[e]||[])i(t);for(var s of this.oi["*"]||[])s(e,t)}}var rp=tE("[SessionId]");class r_{on(e,t){return this.ai.on(e,t)}constructor(e,t,i){if(this.ui=[],this.li=void 0,this.ai=new rd,this.hi=(e,t)=>!(!B(e)||!B(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===id)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=e.config,this.ni=e.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=t||iq,this.fi=i||iq;var s,r=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*Z(this.qt.session_idle_timeout_seconds||1800,60,36e3,rp.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+r+"_window_id",this.mi="ph_"+r+"_primary_window_exists",this.yi()){var n=iX.F(this.gi),o=iX.F(this.mi);n&&!o?this.ci=n:iX.q(this.gi),iX.N(this.mi,!0)}if(null!=(s=this.qt.bootstrap)&&s.sessionID)try{var a=(e=>{var t=this.qt.bootstrap.sessionID.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})();this.bi(this.qt.bootstrap.sessionID,(new Date).getTime(),a)}catch(e){rp.error("Invalid sessionID in bootstrap",e)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return q(this.ui)&&(this.ui=[]),this.ui.push(e),this.di&&e(this.di,this.ci),()=>{this.ui=this.ui.filter(t=>t!==e)}}yi(){return"memory"!==this.qt.persistence&&!this.ni._r&&iX.R()}xi(e){e!==this.ci&&(this.ci=e,this.yi()&&iX.N(this.gi,e))}Si(){return this.ci?this.ci:this.yi()?iX.F(this.gi):null}bi(e,t,i){e===this.di&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.di=e,this.ni.register({[tH]:[t,e,i]}))}ki(){var e=this.ni.props[tH];return M(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.Ci),this.Ci=void 0,this.li&&t&&(t.removeEventListener(im,this.li,{capture:!1}),this.li=void 0),this.ui=[]}wi(){this.li=()=>{this.yi()&&iX.q(this.mi)},iI(t,im,this.li,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),this.qt.cookieless_mode===id)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[s,r,n]=this.ki(),o=this.Si(),a=B(n)&&Math.abs(i-n)>864e5,l=!1,u=!r,c=!u&&!e&&this.hi(i,s);u||c||a?(r=this.vi(),o=this.fi(),rp.info("new session ID generated",{sessionId:r,windowId:o,changeReason:{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}}),n=i,l=!0):o||(o=this.fi(),l=!0);var h=B(s)&&e&&!a?s:i,d=B(n)?n:(new Date).getTime();return this.xi(o),this.bi(r,h,d),e||this.pi(),l&&this.ui.forEach(e=>e(r,o,l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}:void 0)),{sessionId:r,windowId:o,sessionStartTimestamp:d,changeReason:l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}:void 0,lastActivityTimestamp:s}}pi(){clearTimeout(this.Ci),this.Ci=setTimeout(()=>{var[e]=this.ki();if(this.hi((new Date).getTime(),e)){var t=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var rg=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&P(i,t))return!0;try{var s=null==e?void 0:e.userAgentData;if(null!=s&&s.brands&&s.brands.some(e=>P(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},rv=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function rf(e,t,i){return rt({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var rm={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>rv(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!rv(t,e))),icontains:(e,t)=>t.map(ry).some(t=>e.map(ry).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(ry).every(t=>e.map(ry).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i<parseFloat(e))})},ry=e=>e.toLowerCase();function rb(e,t){return!e||Object.entries(e).every(e=>{var[i,s]=e,r=null==t?void 0:t[i];if(q(r)||j(r))return!1;var n=[String(r)],o=rm[s.operator];return!!o&&o(s.values,n)})}var rE="custom",rx="i.posthog.com",rw=/^\/static\//;class rS{constructor(e){this.Ii={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+rx,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.Ii[this.apiHost]||(this.Ii[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":rE),this.Ii[this.apiHost]}Ti(e){var t=this.instance.config.__preview_external_dependency_versioned_paths;if("string"==typeof t&&rw.test(e))return t.trim().replace(/\/$/,"")||void 0}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if("assets"===e){var i=this.Ti(t);if(i)return""+i+t}if(this.region===rE)return this.apiHost+t;var s=rx+t;switch(e){case"assets":return"https://"+this.region+"-assets."+s;case"api":return"https://"+this.region+"."+s}}}var rk=tE("[Surveys]"),rP="seenSurvey_",rT=[sy.Popover,sy.Widget,sy.API],rR={ignoreConditions:!1,ignoreDelay:!1,displayType:sx.Popover},r$=tE("[PostHog ExternalIntegrations]"),rF={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class rI{constructor(e){this._instance=e}lr(e,t){var i;null==(i=h.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return r$.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,s,n;!r||null!=(i=h.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.lr(rF[e],()=>{var i;null==(i=h.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!r&&null!=(s=h.__PosthogExtensions__)&&null!=(s=s.integrations)&&s[e]&&(null==(n=h.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[e])||n.stop())};for(var[s,r]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))i(s)}}var rO,rC,rM={},rA=0,rL=()=>{},rN='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',rq="Surveys module not available",rD="sanitize_properties is deprecated. Use before_send instead",rU="Invalid value for property_denylist config: ",rj="posthog",rH=!s4&&-1===(null==c?void 0:c.indexOf("MSIE"))&&-1===(null==c?void 0:c.indexOf("Mozilla")),rz=e=>{var i;return v({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!D(t))return!1;var i=t.split(".").slice(-2).join(".");for(var s of iF)if(i===s)return!1;return!0}(null==r?void 0:r.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:rL,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:n&&D(null==n?void 0:n.search)&&-1!==n.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==t||null==(i=t.location)?void 0:i.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(e){tb.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:ig,before_send:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:rL,__preview_eager_load_replay:!1},{rageclick:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0})},rB=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],rV=e=>{var t={};for(var[i,s]of rB)q(e[i])||(t[s]=e[i]);var r=ik({},t,e);return M(e.property_blacklist)&&(q(e.property_denylist)?r.property_denylist=e.property_blacklist:M(e.property_denylist)?r.property_denylist=[...e.property_blacklist,...e.property_denylist]:tb.error(rU+e.property_denylist)),r};class rW{constructor(){this.__forceAllowLocalhost=!1}get Ei(){return this.__forceAllowLocalhost}set Ei(e){tb.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class rG{Mi(e,t){if(e){var i=this.Pi.indexOf(e);-1!==i&&this.Pi.splice(i,1)}return this.Pi.push(t),null==t.initialize||t.initialize(),t}Ri(){return this.config.cookieless_mode===id||this.config.cookieless_mode===ih&&this.consent.isRejected()}get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new rW,this.Oi=!1,this.version=p.LIB_VERSION,this.Li=new rd,this.Pi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=rz(),this.SentryIntegration=i5,this.sentryIntegration=e=>{var t;return t=i3(this,e),{name:i2,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Fi=!1,this.Ai=null,this.Ni=null,this.$i=null,this.scrollManager=new ru(this),this.pageViewManager=new i8(this),this.rateLimiter=new sP(this),this.requestRouter=new rS(this),this.consent=new iK(this),this.externalIntegrations=new rI(this);var e,t=null!=(e=rG.__defaultExtensionClasses)?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,i)=>{var s=D(e)?{[e]:t}:e;this.setPersonProperties(s),null==i||i({})},set_once:(e,t,i)=>{var s=D(e)?{[e]:t}:e;this.setPersonProperties(void 0,s),null==i||i({})}},this.on("eventCaptured",e=>tb.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==rj){var s,r=null!=(s=rM[i])?s:new rG;return r._init(e,t,i),rM[i]=r,rM[rj][i]=r,r}return this._init(e,t,i)}_init(e,i,s){if(void 0===i&&(i={}),q(e)||U(e))return tb.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},i.debug=this.Di(i.debug),this.qi=i,this.ji=[],i.person_profiles?this.Ni=i.person_profiles:i.process_person&&(this.Ni=i.process_person),this.set_config(ik({},rz(i.defaults),rV(i),{name:s,token:e})),this.config.on_xhr_error&&tb.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=i.disable_compression?void 0:s$.GZipJS;var r,n,o=this.Hi();this.persistence=new sf(this.config,o),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sf(v({},this.config,{persistence:"sessionStorage"}),o);var a=v({},this.persistence.props),l=v({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Ui=new ro(e=>this.Bi(e),this.config.request_queue_config),this.zi=new rl(this),this.__request_queue=[];var u=this.Ri();if(u||(this.sessionManager=new r_(this),this.sessionPropsManager=new rh(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(tb.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Vi(u)},0)):(tb.info("Initializing extensions synchronously"),this.Vi(u)),p.DEBUG=p.DEBUG||this.config.debug,p.DEBUG&&tb.info("Starting in debug mode",{this:this,config:i,thisC:v({},this.config),p:a,s:l}),!this.config.identity_distinct_id||null!=(r=i.bootstrap)&&r.distinctID||(i.bootstrap=v({},i.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),void 0!==(null==(n=i.bootstrap)?void 0:n.distinctID)){var c=i.bootstrap.distinctID,h=this.get_distinct_id(),d=this.persistence.get_property(t4);if(i.bootstrap.isIdentifiedID&&null!=h&&h!==c&&d===ip)this.identify(c);else if(i.bootstrap.isIdentifiedID&&null!=h&&h!==c&&d===i_)tb.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var _=this.config.get_device_id(iq()),g=i.bootstrap.isIdentifiedID?_:c;this.persistence.set_property(t4,i.bootstrap.isIdentifiedID?i_:ip),this.register({distinct_id:c,$device_id:g})}}if(u)this.register_once({distinct_id:io,$device_id:null},"");else if(!this.get_distinct_id()){var f=this.config.get_device_id(iq());this.register_once({distinct_id:f,$device_id:f},""),this.persistence.set_property(t4,ip)}return iI(t,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),i.segment?function(e,t){var i=e.config.segment;if(!i)return t();!function(e,t){var i=e.config.segment;if(!i)return t();var s=i=>{var s=()=>i.anonymousId()||iq();e.config.get_device_id=s,i.id()&&(e.register({distinct_id:i.id(),$device_id:s()}),e.persistence.set_property(t4,i_)),t()},r=i.user();"then"in r&&A(r.then)?r.then(s):s(r)}(e,()=>{var s;i.register((Promise&&Promise.resolve||i1.warn("This browser does not have Promise support, and can not use the segment integration"),s=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(i1.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(i1.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var s=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},s,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>s(e,e.event.event),page:e=>s(e,iy),identify:e=>s(e,iE),screen:e=>s(e,"$screen")})).then(()=>{t()})})}(this,()=>this.Wi()):this.Wi(),A(this.config._onCapture)&&this.config._onCapture!==rL&&(tb.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&tb.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Vi(e){var t,i,s,r,n,o,a,l=performance.now(),u=v({},rG.__defaultExtensionClasses,this.config.__extensionClasses),c=[];u.featureFlags&&this.Pi.push(this.featureFlags=null!=(t=this.featureFlags)?t:new u.featureFlags(this)),u.exceptions&&this.Pi.push(this.exceptions=null!=(i=this.exceptions)?i:new u.exceptions(this)),u.historyAutocapture&&this.Pi.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.Pi.push(new u.tracingHeaders(this)),u.siteApps&&this.Pi.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.Pi.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||c.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),u.autocapture&&this.Pi.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.Pi.push(this.surveys=null!=(s=this.surveys)?s:new u.surveys(this)),u.logs&&this.Pi.push(this.logs=null!=(r=this.logs)?r:new u.logs(this)),u.conversations&&this.Pi.push(this.conversations=null!=(n=this.conversations)?n:new u.conversations(this)),u.productTours&&this.Pi.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.Pi.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.Pi.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.Pi.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.Pi.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,iQ)),u.toolbar&&this.Pi.push(this.toolbar=null!=(o=this.toolbar)?o:new u.toolbar(this)),u.experiments&&this.Pi.push(this.experiments=null!=(a=this.experiments)?a:new u.experiments(this)),this.Pi.forEach(e=>{e.initialize&&c.push(()=>{null==e.initialize||e.initialize()})}),c.push(()=>{if(this.Zi){var e=this.Zi;this.Zi=void 0,this.Rr(e)}}),this.Gi(c,l)}Gi(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Gi(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){tb.error("Error initializing extension:",e)}}var s=Math.round(performance.now()-t);this.register_for_session({[ia]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[il]:s}),this.config.__preview_deferred_init_extensions&&tb.info("PostHog extensions initialized ("+s+"ms)")}Rr(e){var t;r&&r.body?(this.config.__preview_deferred_init_extensions&&(this.Zi=e),this.Qi=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=R(e.supportedCompression,s$.GZipJS)?s$.GZipJS:R(e.supportedCompression,s$.Base64)?s$.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Ni?this.Ni:ig}),this.Pi.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))):(tb.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.Rr(e)},500))}Wi(){try{this.config.loaded(this)}catch(e){tb.critical("`loaded` function failed",e)}if(this.Ji(),this.config.internal_or_test_user_hostname&&null!=n&&n.hostname){var e=n.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.Ri())&&this.Ki()},1),this.Yi=new sR(this),this.Yi.load()}Ji(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Ui)||e.enable())}_dom_loaded(){this.is_capturing()&&iw(this.__request_queue,e=>this.Bi(e)),this.__request_queue=[],this.Ji()}_handle_unload(){var e,t,i,s;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this.Xi()&&this.capture(ib),null==(t=this.logs)||t.flushLogs("sendBeacon"),null==(i=this.Ui)||i.unload(),null==(s=this.zi)||s.unload()):this.Xi()&&this.capture(ib,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(rH?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=re(e.url,{ip:+!!this.config.ip}),e.headers=v({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t,i,s,r=v({},e);r.timeout=r.timeout||6e4,r.url=rr(r.url,r.compression);var n=null!=(t=r.transport)?t:"fetch",o=rn.filter(e=>!r.disableTransport||!e.transport||!r.disableTransport.includes(e.transport)),a=null!=(i=null==(s=function(e){for(var t=0;e.length>t;t++)if(e[t].transport===n)return e[t]}(o))?void 0:s.method)?i:o[0].method;if(!a)throw Error("No available transport method");"sendBeacon"!==n&&r.data&&r.compression===s$.GZipJS&&u&&!s9?rs(r).then(e=>{a(e)}).catch(t=>{E(t)?(s9=!0,a(v({},r,{compression:void 0,url:rr(e.url,void 0)}))):((e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return E(e)||t===b})(t)&&(s9=!0),a(r))}):a(r)})(v({},e,{callback:t=>{var i,s;this.rateLimiter.checkForLimiting(t),400>t.statusCode||null==(i=(s=this.config).on_request_error)||i.call(s,t),null==e.callback||e.callback(t)}}))))}Bi(e){this.zi?this.zi.retriableRequest(e):this._send_request(e)}_execute_array(e){rA++;try{var t,i=[],s=[],r=[];iw(e,e=>{if(e)if(M(t=e[0]))r.push(e);else if(A(e))try{e.call(this)}catch(t){tb.error("Error executing queued PostHog call",e,t)}else M(e)&&"alias"===t?i.push(e):M(e)&&-1!==t.indexOf("capture")&&A(this[t])?r.push(e):s.push(e)});var n=function(e,t){iw(e,function(e){try{if(M(e[0])){var i=t;iS(e,function(e){i=i[e[0]].apply(i,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){tb.error("Error executing queued PostHog call",e,t)}})};n(i,this),n(s,this),n(r,this)}finally{rA--}}push(e){if(rA>0&&M(e)&&D(e[0])){var t=rG.prototype[e[0]];A(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,i){var s,r,n,o,a;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ui){if(this.is_capturing())if(!q(e)&&D(e)){var l=!this.config.opt_out_useragent_filter&&this._is_bot();if(!l||this.config.__preview_capture_bot_pageviews){var u=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==u||!u.isRateLimited){null!=t&&t.$current_url&&!D(null==t?void 0:t.$current_url)&&(tb.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=i&&i.en||tb.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var c=new Date,h=(null==i?void 0:i.timestamp)||c,d=(null==i?void 0:i.uuid)||iq(),p={uuid:d,event:e,properties:this.calculateEventProperties(e,t||{},h,d)};e===iy&&this.config.__preview_capture_bot_pageviews&&l&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),u&&(p.properties.$lib_rate_limit_remaining_tokens=u.remainingTokens),(null==i?void 0:i.$set)&&(p.$set=null==i?void 0:i.$set);var _,g,f,m=this.tn(null==i?void 0:i.$set_once,e!==ix,e===iE);if(m&&(p.$set_once=m),null!=i&&i._noTruncate||(r=this.config.properties_string_max_length,n=p,o=e=>D(e)?e.slice(0,r):e,a=new Set,p=function e(t,i){var s;return t!==Object(t)?o?o(t):t:a.has(t)?void 0:(a.add(t),M(t)?(s=[],iw(t,t=>{s.push(e(t))})):(s={},iS(t,(t,i)=>{a.has(t)||(s[i]=e(t,i))})),s)}(n)),p.timestamp=h,q(null==i?void 0:i.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=c),e===sb.DISMISSED||e===sb.SENT){var y=null==t?void 0:t[sE.SURVEY_ID],b=null==t?void 0:t[sE.SURVEY_ITERATION];(e=>{try{var t,i=(t=""+rP+e.id,e.current_iteration&&e.current_iteration>0&&(t=""+rP+e.id+"_"+e.current_iteration),t);if(localStorage.getItem(i))return;localStorage.setItem(i,"true")}catch(e){rk.error("Failed to persist survey seen state",e)}})({id:y,current_iteration:b}),p.$set=v({},p.$set,{[(_={id:y,current_iteration:b},f="$survey_"+(g=e===sb.SENT?"responded":"dismissed")+"/"+_.id,_.current_iteration&&_.current_iteration>0&&(f="$survey_"+g+"/"+_.id+"/"+_.current_iteration),f)]:!0})}else e===sb.SHOWN&&(p.$set=v({},p.$set,{[sE.SURVEY_LAST_SEEN_DATE]:(new Date).toISOString()}));if(e===sw.SHOWN){var E=null==t?void 0:t[sS.TOUR_TYPE];E&&(p.$set=v({},p.$set,{[sS.TOUR_LAST_SEEN_DATE+"/"+E]:(new Date).toISOString()}))}var x=v({},p.properties.$set,p.$set);if(N(x)||this.setPersonPropertiesForFlags(x),!H(this.config.before_send)){var w=this.rn(p);if(!w)return;p=w}this.Li.emit("eventCaptured",p);var S={method:"POST",url:null!=(s=null==i?void 0:i._url)?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",batchKey:null==i?void 0:i._batchKey};return!this.config.request_batching||i&&(null==i||!i._batchKey)||null!=i&&i.send_instantly?this.Bi(S):this.Ui.enqueue(S),p}tb.critical("This capture call is ignored due to client rate limiting.")}}else tb.error("No event name provided to posthog.capture")}else tb.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,i,s,o,a){if(s=s||new Date,!this.persistence||!this.sessionPersistence)return i;var l,u=a?void 0:this.persistence.remove_event_timer(e),h=v({},i);if(h.token=this.config.token,h.$config_defaults=this.config.defaults,this.Ri()&&(h.$cookieless_mode=!0),"$snapshot"===e){var d=v({},this.persistence.properties(),this.sessionPersistence.properties());return h.distinct_id=d.distinct_id,(!D(h.distinct_id)&&!z(h.distinct_id)||U(h.distinct_id))&&tb.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),h}var _,g=function(e,i){if(!c)return{};var s,r,o,a,l,u,h,d,_,g,v,f=e?[...ss,...i||[]]:[],[m,y]=function(e){for(var t=0;eX.length>t;t++){var[i,s]=eX[t],r=i.exec(e),n=r&&(A(s)?s(r,e):s);if(n)return n}return["",""]}(c);return ik(i$({$os:m,$os_version:y,$browser:eW(c,navigator.vendor),$device:eK(c),$device_type:(u={userAgentDataPlatform:null==(s=navigator)||null==(s=s.userAgentData)?void 0:s.platform,maxTouchPoints:null==(r=navigator)?void 0:r.maxTouchPoints,screenWidth:null==t||null==(o=t.screen)?void 0:o.width,screenHeight:null==t||null==(a=t.screen)?void 0:a.height,devicePixelRatio:null==t?void 0:t.devicePixelRatio},(v=eK(c))===ea||v===eo||"Kobo"===v||"Kindle Fire"===v||v===eN?en:v===eP||v===eR||v===eT||v===eM?"Console":v===eu?"Wearable":v?es:"Android"===(null==u?void 0:u.userAgentDataPlatform)&&(null!=(h=null==u?void 0:u.maxTouchPoints)?h:0)>0?600>Math.min(null!=(d=null==u?void 0:u.screenWidth)?d:0,null!=(_=null==u?void 0:u.screenHeight)?_:0)/(null!=(g=null==u?void 0:u.devicePixelRatio)?g:1)?es:en:"Desktop"),$timezone:sg(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:se(null==n?void 0:n.href,f,sn),$host:null==n?void 0:n.host,$pathname:null==n?void 0:n.pathname,$raw_user_agent:c.length>1e3?c.substring(0,997)+"...":c,$browser_version:eY(c,navigator.vendor),$browser_language:sc(),$browser_language_prefix:"string"==typeof(l=sc())?l.split("-")[0]:void 0,$screen_height:null==t?void 0:t.screen.height,$screen_width:null==t?void 0:t.screen.width,$viewport_height:null==t?void 0:t.innerHeight,$viewport_width:null==t?void 0:t.innerWidth,$lib:p.LIB_NAME,$lib_version:p.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:f,windowId:m}=this.sessionManager.checkAndGetSessionAndWindowId(a,s.getTime());h.$session_id=f,h.$window_id=m}this.sessionPropsManager&&ik(h,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&ik(h,this.sessionRecording.sdkDebugProperties),h.$sdk_debug_retry_queue_size=null==(l=this.zi)?void 0:l.length}catch(e){h.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===rE&&(h.$lib_custom_api_host=this.config.api_host),_=e!==iy||a?e!==ib||a?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(s):this.pageViewManager.doPageView(s,o),h=ik(h,_),e===iy&&r&&(h.title=r.title),!q(u)){var y=s.getTime()-u;h.$duration=parseFloat((y/1e3).toFixed(3))}c&&this.config.opt_out_useragent_filter&&(h.$browser_type=this._is_bot()?"bot":"browser"),(h=ik({},g,this.persistence.properties(),this.sessionPersistence.properties(),h)).$is_identified=this._isIdentified(),M(this.config.property_denylist)?iS(this.config.property_denylist,function(e){delete h[e]}):tb.error(rU+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var b=this.config.sanitize_properties;b&&(tb.error(rD),h=b(h,e));var E=this.nn();return h.$process_person_profile=E,E&&!a&&this.sn("_calculate_event_properties"),h}tn(e,t,i){if(void 0===t&&(t=!0),void 0===i&&(i=!1),!this.persistence||!this.nn()||this.Oi&&!i)return e;var s,r=ik({},this.persistence.get_initial_props(),(null==(s=this.sessionPropsManager)?void 0:s.getSetOnceProps())||{},e||{}),n=this.config.sanitize_properties;return n&&(tb.error(rD),r=n(r,"$set_once")),t&&(this.Oi=!0),N(r)?void 0:r}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var s;null==(s=this.persistence)||s.register_once(e,t,i)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}an(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){var i;return null==(i=this.featureFlags)?void 0:i.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}updateFlags(e,t,i){var s;null==(s=this.featureFlags)||s.updateFlags(e,t,i)}updateEarlyAccessFeatureEnrollment(e,t,i){var s;null==(s=this.featureFlags)||s.updateEarlyAccessFeatureEnrollment(e,t,i)}getEarlyAccessFeatures(e,t,i){var s;return void 0===t&&(t=!1),null==(s=this.featureFlags)?void 0:s.getEarlyAccessFeatures(e,t,i)}on(e,t){return this.Li.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:rq}),()=>{})}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:rq})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:rq})}renderSurvey(e,t){var i;null==(i=this.surveys)||i.renderSurvey(e,t)}displaySurvey(e,t){var i;void 0===t&&(t=rR),null==(i=this.surveys)||i.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,i;return null!=(t=null==(i=this.surveys)?void 0:i.canRenderSurvey(e))?t:{visible:!1,disabledReason:rq}}canRenderSurveyAsync(e,t){var i,s;return void 0===t&&(t=!1),null!=(i=null==(s=this.surveys)?void 0:s.canRenderSurveyAsync(e,t))?i:Promise.resolve({visible:!1,disabledReason:rq})}un(e){return!e||U(e)?(tb.critical("Unique user id has not been set in posthog.identify"),!1):e===io?(tb.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(tb.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,i){if(!this.__loaded||!this.persistence)return tb.uninitializedWarning("posthog.identify");if(z(e)&&(e=e.toString(),tb.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.un(e)&&this.sn("posthog.identify")){var s=this.get_distinct_id();this.register({$user_id:e}),this.get_property(tk)||this.register_once({$had_persisted_distinct_id:!0,$device_id:s},""),e!==s&&e!==this.get_property(tP)&&(this.unregister(tP),this.register({distinct_id:e}));var r,n=(this.persistence.get_property(t4)||ip)===ip;e!==s&&n?(this.persistence.set_property(t4,i_),this.setPersonPropertiesForFlags({$set:t||{},$set_once:i||{}},!1),this.capture(iE,{distinct_id:e,$anon_distinct_id:s},{$set:t||{},$set_once:i||{}}),this.$i=rf(e,t,i),null==(r=this.featureFlags)||r.setAnonymousDistinctId(s)):(t||i)&&this.setPersonProperties(t,i),e!==s&&(this.reloadFeatureFlags(),this.unregister(t3))}}setPersonProperties(e,t){if((e||t)&&this.sn("posthog.setPersonProperties")){var i=rf(this.get_distinct_id(),e,t);this.$i!==i?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.$i=i):tb.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){var s=this.getGroups(),r=s[e]!==t;if(r&&this.resetGroupPropertiesForFlags(e),this.register({$groups:v({},s,{[e]:t})}),r||i){var n={$group_type:e,$group_key:t};i&&(n.$group_set=i),this.capture(ix,n)}i&&this.setGroupPropertiesForFlags({[e]:i}),r&&!i&&this.reloadFeatureFlags()}else tb.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),null==(i=this.featureFlags)||i.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){var e;null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),this.sn("posthog.setGroupPropertiesForFlags")&&(null==(i=this.featureFlags)||i.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){if(tb.info("reset"),!this.__loaded)return tb.uninitializedWarning("posthog.reset");var t,i,s,r,n,o,a,l,u=this.get_property(tk);if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(i=this.sessionPersistence)||i.clear(),null==(s=this.surveys)||s.reset(),null==(r=this.Yi)||r.stop(),null==(n=this.featureFlags)||n.reset(),null==(o=this.conversations)||o.reset(),null==(a=this.persistence)||a.set_property(t4,ip),null==(l=this.sessionManager)||l.resetSessionId(),this.$i=null,this.config.cookieless_mode===id)this.register_once({distinct_id:io,$device_id:null},"");else{var c=this.config.get_device_id(iq());this.register_once({distinct_id:c,$device_id:e?c:u},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,t){var i;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(i=this.conversations)||i.ln()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var r,n=null!=(r=e.timestampLookBack)?r:10;if(!i)return s;s+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return s}alias(e,t){return e===this.get_property(tS)?(tb.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(q(t)&&(t=this.get_distinct_id()),e!==t?(this.an(tP,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(tb.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=v({},this.config);if(L(e)){ik(this.config,rV(e));var i,s,r,n,o,a,l,u,c,h,d=this.Hi();null==(i=this.persistence)||i.update_config(this.config,t,d),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sf(v({},this.config,{persistence:"sessionStorage"}),d);var _=this.Di(this.config.debug);V(_)&&(this.config.debug=_),V(this.config.debug)&&(this.config.debug?(p.DEBUG=!0,iB.R()&&iB.N("ph_debug",!0),tb.info("set_config",{config:e,oldConfig:t,newConfig:v({},this.config)})):(p.DEBUG=!1,iB.R()&&iB.q("ph_debug"))),null==(s=this.exceptionObserver)||s.onConfigChange(),null==(r=this.exceptions)||r.onConfigChange(),null==(n=this.sessionRecording)||n.startIfEnabledOrStop(),null==(o=this.autocapture)||o.startIfEnabled(),null==(a=this.heatmaps)||a.startIfEnabled(),null==(l=this.exceptionObserver)||l.startIfEnabledOrStop(),null==(u=this.deadClicksAutocapture)||u.startIfEnabledOrStop(),null==(c=this.surveys)||c.loadIfEnabled(),this.cn(),null==(h=this.externalIntegrations)||h.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){p.LIB_NAME=e,p.LIB_VERSION=t}startSessionRecording(e){var t,i,s,r,n,o=!0===e,a={sampling:o||!(null==e||!e.sampling),linked_flag:o||!(null==e||!e.linked_flag),url_trigger:o||!(null==e||!e.url_trigger),event_trigger:o||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),a.linked_flag&&(null==(s=this.sessionRecording)||s.overrideLinkedFlag()),a.url_trigger&&(null==(r=this.sessionRecording)||r.overrideTrigger("url")),a.event_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){if(this.exceptions){var i=Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(v({},s,t))}}addExceptionStep(e,t){var i;null==(i=this.exceptions)||i.addExceptionStep(e,t)}captureLog(e){var t;null==(t=this.logs)||t.captureLog(e)}get logger(){var e,t;return null!=(e=null==(t=this.logs)?void 0:t.logger)?e:rG.dn}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,i;return null!=(t=null==(i=this.toolbar)?void 0:i.loadToolbar(e))&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:rj;return t!==rj&&(t=rj+"."+t),t}_isIdentified(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(t4))===i_||(null==(t=this.sessionPersistence)?void 0:t.get_property(t4))===i_}nn(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===ig&&!this._isIdentified()&&N(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[tP])&&(null==(t=this.persistence)||null==(t=t.props)||!t[is]))}Xi(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(e){return"never"===this.config.person_profiles?(tb.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(is,!0),!0)}Hi(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==ih)}cn(){var e,t,i,s,r=this.Hi();return(null==(e=this.persistence)?void 0:e._r)!==r&&(null==(i=this.persistence)||i.set_disabled(r)),(null==(t=this.sessionPersistence)?void 0:t._r)!==r&&(null==(s=this.sessionPersistence)||s.set_disabled(r)),r}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==id){if(this.Ri()){this.reset(!0),null==(r=this.sessionManager)||r.destroy(),null==(n=this.pageViewManager)||n.destroy(),this.sessionManager=new r_(this),this.pageViewManager=new i8(this),this.persistence&&(this.sessionPropsManager=new rh(this,this.sessionManager,this.persistence));var i,s,r,n,o,a,l,u,c=null!=(o=null==(a=this.config.__extensionClasses)?void 0:a.sessionRecording)?o:null==(l=rG.__defaultExtensionClasses)?void 0:l.sessionRecording;c&&(this.sessionRecording=this.Mi(this.sessionRecording,new c(this)),this.Qi&&(null==(u=this.sessionRecording)||null==u.onRemoteConfig||u.onRemoteConfig(this.Qi)))}this.consent.optInOut(!0),this.cn(),this.Ji(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),this.config.cookieless_mode==ih&&(null==(i=this.surveys)||i.loadIfEnabled()),(q(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(s=null==e?void 0:e.captureEventName)?s:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ki()}else tb.warn(rN)}opt_out_capturing(){var e,t,i;this.config.cookieless_mode!==id?(this.config.cookieless_mode===ih&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===ih&&(this.register({distinct_id:io,$device_id:null}),null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(i=this.pageViewManager)||i.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.Ki())):tb.warn(rN)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===id||(this.config.cookieless_mode===ih?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return s?rg(s,this.config.custom_blocked_useragents):void 0}Ki(){r&&("visible"===r.visibilityState?this.Fi||(this.Fi=!0,this.capture(iy,{title:r.title},{send_instantly:!0}),this.Ai&&(r.removeEventListener(iv,this.Ai),this.Ai=null)):this.Ai||(this.Ai=this.Ki.bind(this),iI(r,iv,this.Ai)))}debug(e){!1===e?(null==t||t.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==t||t.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Lr(){var e,t,i,s,r=this.qi||{};return"advanced_disable_flags"in r?!!r.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(tb.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in r&&!H(r[e]),s=t in r&&!H(r[t]),i?r[e]:!!s&&(tb&&tb.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),r[t]))}rn(e){if(H(this.config.before_send))return e;var t=M(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var s of t){if(H(i=s(i))){var r="Event '"+e.event+"' was rejected in beforeSend function";return W(e.event)?tb.warn(r+". This can cause unexpected behavior."):tb.info(r),null}i.properties&&!N(i.properties)||tb.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;return null==(e=this.pageViewManager.dr)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(i)})}Di(e){var t=V(e)&&!e,i=iB.R()&&"true"===iB.A("ph_debug");return!t&&(!!i||e)}}function rY(e){return e instanceof Element&&(e.id===ir||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function rX(e){return!!e&&1===e.nodeType}function rK(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function rJ(e){return!!e&&3===e.nodeType}function rZ(e){return!!e&&11===e.nodeType&&rX(e.host)}function rQ(e){return e?$(e).split(/\s+/):[]}function r0(e){var i=null==t?void 0:t.location.href;return!!(i&&e&&e.some(e=>i.match(e)))}function r1(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return rQ(t)}function r2(e){return H(e)?null:$(e).split(/(\s+)/).filter(e=>nc(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function r3(e){var t="";return ni(e)&&!ns(e)&&e.childNodes&&e.childNodes.length&&iS(e.childNodes,function(e){var i;rJ(e)&&e.textContent&&(t+=null!=(i=r2(e.textContent))?i:"")}),$(t)}function r5(e){var t;return q(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}rG.__defaultExtensionClasses={},rG.dn={trace:rC=()=>{},debug:rC,info:rC,warn:rC,error:rC,fatal:rC},function(e,t){for(var i=0;t.length>i;i++)e.prototype[t[i]]=iR(e.prototype[t[i]])}(rG,["identify"]);var r8=["a","button","form","input","select","textarea","label"];function r6(e,t){if(q(t))return!0;var i,s=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var r of e)if(i=s(r))return i.v;return!1}function r4(e){var t=e.parentNode;return!(!t||!rX(t))&&t}var r7=["next","previous","prev",">","<"],r9=[".ph-no-rageclick",".ph-no-capture"],ne=e=>!e||rK(e,"html")||!rX(e),nt=(e,i)=>{if(!t||ne(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var s=!1,r=[e],n=e;n.parentNode&&!rK(n,"body");)if(rZ(n.parentNode))r.push(n.parentNode.host),n=n.parentNode.host;else{var o=r4(n);if(!o)break;if(i||r8.indexOf(o.tagName.toLowerCase())>-1)s=!0;else{var a=t.getComputedStyle(o);a&&"pointer"===a.getPropertyValue("cursor")&&(s=!0)}r.push(o),n=o}return{parentIsUsefulElement:s,targetElementList:r}};function ni(e){for(var t=e;t.parentNode&&!rK(t,"body");t=t.parentNode){var i=r1(t);if(R(i,"ph-sensitive")||R(i,"ph-no-capture"))return!1}if(R(r1(e),"ph-include"))return!0;var s=e.type||"";if(D(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}var r=e.name||e.id||"";return!D(r)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,""))}function ns(e){return!!(rK(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||rK(e,"select")||rK(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var nr="(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})",nn=RegExp("^(?:"+nr+")$"),no=new RegExp(nr),na="\\d{3}-?\\d{2}-?\\d{4}",nl=RegExp("^("+na+")$"),nu=RegExp("("+na+")");function nc(e,t){return void 0===t&&(t=!0),!(H(e)||D(e)&&(e=$(e),(t?nn:no).test((e||"").replace(/[- ]/g,""))||(t?nl:nu).test(e)))&&!0}function nh(e){var t=r3(e);return nc(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&iS(t.childNodes,function(t){var s;if(t&&"span"===(null==(s=t.tagName)?void 0:s.toLowerCase()))try{var r=r3(t);i=(i+" "+r).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){tb.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function nd(e){return e.replace(/"|\\"/g,'\\"')}class np{constructor(e){this.disabled=!1===e;var t=L(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,i){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(t-s.y)<this.thresholdPx&&this.timeoutMs>i-s.timestamp){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var n_="$copy_autocapture",ng=tE("[AutoCapture]");function nv(e,t){return t.length>e?t.slice(0,e)+"...":t}var nf=tE("[ExceptionAutocapture]");function nm(e,t,i){try{if(!(t in e))return()=>{};var s=e[t],r=i(s);return A(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=r,()=>{e[t]=s}}catch(e){return()=>{}}}var ny=tE("[TracingHeaders]"),nb=tE("[Web Vitals]"),nE="disabled",nx="lazy_loading",nw="awaiting_config",nS="missing_config";tE("[SessionRecording]"),tE("[SessionRecording]");var nk="[SessionRecording]",nP=tE(nk),nT=tE("[Heatmaps]");function nR(e){return L(e)&&"clientX"in e&&"clientY"in e&&z(e.clientX)&&z(e.clientY)}var n$=tE("[Product Tours]"),nF=["$set_once","$set"],nI=tE("[SiteApps]"),nO="Error while initializing PostHog app with config id ";function nC(e,t,i){if(H(e))return!1;switch(i){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class nM{constructor(e){this.vn=new rd,this.fn=(e,t)=>this.pn(e,t)&&this.gn(e,t)&&this.mn(e,t)&&this.yn(e,t),this.pn=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.bn=new Set,this._n=new Set}init(){var e,t;q(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!q(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e=>{var t,i;null==(t=this._n)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.bn)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var s,r=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&r.add(null==e?void 0:e.selector)})}),null==(s=this._instance)||s.autocapture.setElementSelectors(r)}}on(e,t){var i;null!=t&&0!=e.length&&(this.bn.has(e)||this.bn.has(null==t?void 0:t.event))&&this._n&&(null==(i=this._n)?void 0:i.size)>0&&this._n.forEach(e=>{this.wn(t,e)&&this.vn.emit("actionCaptured",e.name)})}xn(e){this.onAction("actionCaptured",t=>e(t))}wn(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.fn(e,i))return!0;return!1}onAction(e,t){return this.vn.on(e,t)}gn(e,t){if(null!=t&&t.url){var i,s=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!s||"string"!=typeof s||!nC(s,t.url,t.url_matching||"contains"))return!1}return!0}mn(e,t){return!!this.Sn(e,t)&&!!this.kn(e,t)&&!!this.Cn(e,t)}Sn(e,t){if(null==t||!t.href)return!0;var i=this.In(e);if(i.length>0)return i.some(e=>nC(e.href,t.href,t.href_matching||"exact"));var s,r,n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!n&&nC((r=n.match(/(?::|")href="(.*?)"/))?r[1]:"",t.href,t.href_matching||"exact")}kn(e,t){if(null==t||!t.text)return!0;var i=this.In(e);if(i.length>0)return i.some(e=>nC(e.text,t.text,t.text_matching||"exact")||nC(e.$el_text,t.text,t.text_matching||"exact"));var s,r,n,o,a=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!a&&(r=function(e){for(var t,i=[],s=/(?::|")text="(.*?)"/g;!H(t=s.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(a),n=t.text,o=t.text_matching||"exact",r.some(e=>nC(e,n,o)))}Cn(e,t){if(null==t||!t.selector)return!0;var i,s,r=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=r&&r.includes(t.selector))return!0;var n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";if(t.selector_regex&&n)try{return new RegExp(t.selector_regex).test(n)}catch(e){}return!1}In(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}yn(e,t){return null==t||!t.properties||0===t.properties.length||rb(t.properties.reduce((e,t)=>{var i=M(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:i,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class nA{constructor(e){this._instance=e,this.Tn=new Map,this.En=new Map,this.Mn=new Map}Pn(e,t){return!!e&&rb(e.propertyFilters,null==t?void 0:t.properties)}Rn(e,t){var i=new Map;return e.forEach(e=>{var s;null==(s=e.conditions)||null==(s=s[t])||null==(s=s.values)||s.forEach(t=>{if(null!=t&&t.name){var s=i.get(t.name)||[];s.push(e.id),i.set(t.name,s)}})}),i}On(e,t,i){var s=(i===sm.Activation?this.Tn:this.En).get(e),r=[];return this.Ln(e=>{r=e.filter(e=>null==s?void 0:s.includes(e.id))}),r.filter(s=>{var r,n=null==(r=s.conditions)||null==(r=r[i])||null==(r=r.values)?void 0:r.find(t=>t.name===e);return this.Pn(n,t)})}register(e){var t;q(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.Fn(e),this.An(e))}An(e){var t=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0});0!==t.length&&(null==this.Nn&&(this.Nn=new nM(this._instance),this.Nn.init(),this.Nn.xn(e=>{this.onAction(e)})),t.forEach(e=>{var t,i,s,r,n;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)?void 0:s.length)>0&&(null==(r=this.Nn)||r.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEach(t=>{if(t&&t.name){var i=this.Mn.get(t.name);i&&i.push(e.id),this.Mn.set(t.name,i||[e.id])}}))}))}Fn(e){var t,i=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}),s=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(i=e.conditions)||null==(i=i.cancelEvents)||null==(i=i.values)?void 0:i.length)>0});0===i.length&&0===s.length||(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.Tn=this.Rn(e,sm.Activation),this.En=this.Rn(e,sm.Cancellation))}onEvent(e,t){var i,s=this.le(),r=this.$n(),n=this.Dn(),o=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[r])||[];if(n===e&&t&&o.length>0){s.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:o});var a,l,u=(null==t||null==(a=t.properties)?void 0:a.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(u){var c=o.indexOf(u);0>c||(o.splice(c,1),this.qn(o))}}else{if(this.En.has(e)){var h=this.On(e,t,sm.Cancellation);h.length>0&&(s.info("cancel event matched, cancelling items",{event:e,itemsToCancel:h.map(e=>e.id)}),h.forEach(e=>{var t=o.indexOf(e.id);0>t||o.splice(t,1),this.jn(e.id)}),this.qn(o))}if(this.Tn.has(e)){s.info("event name matched",{event:e,eventPayload:t,items:this.Tn.get(e)});var d=this.On(e,t,sm.Activation);this.qn(o.concat(d.map(e=>e.id)||[]))}}}onAction(e){var t,i=this.$n(),s=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[i])||[];this.Mn.has(e)&&this.qn(s.concat(this.Mn.get(e)||[]))}qn(e){var t=this.le(),i=[...new Set(e)].filter(e=>!this.Hn(e));t.info("updating activated items",{activatedItems:i}),this.Un(i)}getActivatedIds(){var e,t=this.$n();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.Tn}Bn(){return this.Nn}}class nL extends nA{constructor(e){super(e)}$n(){return t1}Dn(){return sb.SHOWN}Ln(e){var t;null==(t=this._instance)||t.getSurveys(e)}jn(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}le(){return rk}Un(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[t1]:e})}Hn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var nN="SDK is not enabled or survey functionality is not yet loaded",nq="Disabled. Not loading surveys.",nD=null!=t&&t.location?st(t.location.hash,"__posthog")||st(location.hash,"state"):null,nU="_postHogToolbarParams",nj=tE("[Toolbar]"),nH=tE("[FeatureFlags]"),nz=tE("[FeatureFlags]",{debugEnabled:!0}),nB="\" failed. Feature flags didn't load in time.",nV=e=>{for(var t={},i=0;e.length>i;i++)t[e[i]]=!0;return t},nW=e=>{var t={};for(var[i,s]of iP(e||{}))s&&(t[i]=s);return t},nG=tE("[Error tracking]"),nY="Refusing to render web experiment since the viewer is a likely bot",nX={icontains:(e,i)=>!!t&&i.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,i)=>!!t&&-1===i.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,i)=>!!t&&rv(i.href,e),not_regex:(e,i)=>!!t&&!rv(i.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class nK{get qt(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{nK.zn("retrieved web experiments from the server"),t.Vn=new Map,e.forEach(e=>{if(e.feature_flag_key){t.Vn&&(nK.zn("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.Vn)||i.set(e.feature_flag_key,e));var i,s=t._instance.getFeatureFlag(e.feature_flag_key);D(s)&&e.variants[s]&&t.Wn(e.name,s,e.variants[s].transforms)}else if(e.variants)for(var r in e.variants){var n=e.variants[r];nK.Zn(n)&&t.Wn(e.name,r,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())nK.zn(nY);else if(!this.qt.disable_web_experiments){if(H(this.Vn))return this.Vn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();nK.zn("applying feature flags",e),e.forEach(e=>{var t;if(this.Vn&&null!=(t=this.Vn)&&t.has(e)){var i,s=this._instance.getFeatureFlag(e),r=null==(i=this.Vn)?void 0:i.get(e);s&&null!=r&&r.variants[s]&&this.Wn(r.name,s,r.variants[s].transforms)}})}}previewWebExperiment(){var e=nK.getWindowLocation();if(null!=e&&e.search){var t=i9(null==e?void 0:e.search,"__experiment_id"),i=i9(null==e?void 0:e.search,"__experiment_variant");t&&i&&(nK.zn("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.Gn(parseInt(t),i,e)},!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,i){if(this.qt.disable_web_experiments&&!i)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!t)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:t=>e(200===t.statusCode&&t.json&&t.json.experiments||[])})}Gn(e,t,i){var s=i.filter(t=>t.id===e);s&&s.length>0&&(nK.zn("Previewing web experiment ["+s[0].name+"] with variant ["+t+"]"),this.Wn(s[0].name,t,s[0].variants[t].transforms))}static Zn(e){return!H(e.conditions)&&nK.Qn(e)&&nK.Jn(e)}static Qn(e){if(H(e.conditions)||H(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,s,r,n=nK.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||nX[null!=(s=null==(r=e.conditions)?void 0:r.urlMatchType)?s:"icontains"](e.conditions.url,n))}static getWindowLocation(){return null==t?void 0:t.location}static Jn(e){if(H(e.conditions)||H(null==(i=e.conditions)?void 0:i.utm))return!0;var t=sa();if(t.utm_source){var i,s,r,n,o,a,l,u,c,h=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_campaign||(null==(r=e.conditions)||null==(r=r.utm)?void 0:r.utm_campaign)==t.utm_campaign,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(o=e.conditions)||null==(o=o.utm)?void 0:o.utm_source)==t.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,_=null==(u=e.conditions)||null==(u=u.utm)||!u.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==t.utm_term;return h&&p&&_&&d}return!1}static zn(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];tb.info("[WebExperiments] "+e,i)}Wn(e,t,i){this._is_bot()?nK.zn(nY):"control"!==t?i.forEach(i=>{if(i.selector){nK.zn("applying transform of variant "+t+" for experiment "+e+" ",i);var s,r=null==(s=document)?void 0:s.querySelectorAll(i.selector);null==r||r.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):nK.zn("Control variants leave the page unmodified.")}_is_bot(){return s&&this._instance?rg(s,this.qt.custom_blocked_useragents):void 0}}var nJ=tE("[Conversations]"),nZ="Conversations not available yet.",nQ={featureFlags:class{constructor(e){this.Kn=!1,this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}us(){var e,t;return null!=(e=null==(t=this.ni)?void 0:t.wr(this.qt.feature_flag_cache_ttl_ms))&&e}ls(){return!!this.us()&&(this.ss||this.Xn||(this.ss=!0,nH.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=null!=(e=this.qt.evaluation_contexts)?e:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.ns||(nH.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||nH.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}cs(){return this.hs().length>0}initialize(){var e,t,{config:i}=this._instance,s=null!=(e=null==(t=i.bootstrap)?void 0:t.featureFlags)?e:{};if(Object.keys(s).length){var r,n,o=null!=(r=null==(n=i.bootstrap)?void 0:n.featureFlagPayloads)?r:{},a=Object.keys(s).filter(e=>!!s[e]).reduce((e,t)=>(e[t]=s[t]||!1,e),{}),l=Object.keys(o).filter(e=>a[e]).reduce((e,t)=>(o[t]&&(e[t]=o[t]),e),{});this.receivedFeatureFlags({featureFlags:a,featureFlagPayloads:l})}}updateFlags(e,t,i){var s=null!=i&&i.merge?this.getFlagVariants():{},r=null!=i&&i.merge?this.getFlagPayloads():{},n=v({},s,e),o=v({},r,t),a={};for(var[l,u]of Object.entries(n)){var c="string"==typeof u;a[l]={key:l,enabled:!!c||!!u,variant:c?u:void 0,reason:void 0,metadata:q(null==o?void 0:o[l])?void 0:{id:0,version:void 0,description:void 0,payload:o[l]}}}this.receivedFeatureFlags({flags:a})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(tG),t=this.os(tK),i=this.os(tJ);if(!i&&!t)return e||{};var s=ik({},e||{});for(var r of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,o,a=s[r],l=null==t?void 0:t[r],u=q(l)?null!=(n=null==a?void 0:a.enabled)&&n:!!l,c=q(l)?a.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[r],d=v({},a,{enabled:u,variant:u?null!=c?c:null==a?void 0:a.variant:void 0});u!==(null==a?void 0:a.enabled)&&(d.original_enabled=null==a?void 0:a.enabled),c!==(null==a?void 0:a.variant)&&(d.original_variant=null==a?void 0:a.variant),h&&(d.metadata=v({},null==a?void 0:a.metadata,{payload:h,original_payload:null==a||null==(o=a.metadata)?void 0:o.payload})),s[r]=d}return this.Kn||(nH.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:s}),this.Kn=!0),s}getFlagVariants(){var e=this.os(tB),t=this.os(tK);if(!t)return e||{};for(var i=ik({},e),s=Object.keys(t),r=0;s.length>r;r++)i[s[r]]=t[s[r]];return this.Kn||(nH.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.Kn=!0),i}getFlagPayloads(){var e=this.os(tY),t=this.os(tJ);if(!t)return e||{};for(var i=ik({},e||{}),s=Object.keys(t),r=0;s.length>r;r++)i[s[r]]=t[s[r]];return this.Kn||(nH.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.Kn=!0),i}reloadFeatureFlags(){this.es||this.qt.advanced_disable_feature_flags||this.ds||(this._instance.Li.emit("featureFlagsReloading",!0),this.ds=setTimeout(()=>{this.vs()},5))}fs(){clearTimeout(this.ds),this.ds=void 0}ensureFlagsLoaded(){this.Yn||this.Xn||this.ds||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}vs(e){var t;if(this.fs(),!this._instance.Lr())if(this.Xn)this.ts=!0;else{var i=this.qt.token,s=this.os(tk),r={token:i,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:v({},(null==(t=this.ni)?void 0:t.get_initial_props())||{},this.os(tZ)||{}),group_properties:this.os(tQ),timezone:sg()};j(s)||q(s)||(r.$device_id=s),(null!=e&&e.disableFlags||this.qt.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.cs()&&(r.evaluation_contexts=this.hs());var n=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Xn=!0,this._instance._send_request({method:"POST",url:n,data:r,compression:this.qt.disable_compression?void 0:s$.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback:e=>{var t,i,s,n=!0;if(200===e.statusCode&&(this.ts||(this.$anon_distinct_id=void 0),n=!1),this.Xn=!1,!r.disable_flags||this.ts){this.rs=!n;var o=[];e.error?e.error instanceof Error?o.push("AbortError"===e.error.name?"timeout":"connection_error"):o.push("unknown_error"):200!==e.statusCode&&o.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&o.push("errors_while_computing_flags");var a,l=!(null==(i=e.json)||null==(i=i.quotaLimited)||!i.includes("feature_flags"));(l&&o.push("quota_limited"),null==(s=this.ni)||s.register({[t8]:o}),l)?nH.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(r.disable_flags||this.receivedFeatureFlags(null!=(a=e.json)?a:{},n,{partialResponse:!!this.qt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(e,t){var i;if(void 0===t&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var s=this.getFeatureFlagResult(e,t);return null!=(i=null==s?void 0:s.variant)?i:null==s?void 0:s.enabled}}else nH.warn('getFeatureFlag for key "'+e+nB)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var i=this.getFlagVariants(),s=e in i,r=i[e],n=this.getFlagPayloads()[e],o=String(r),a=this.os(tX)||void 0,l=this.os(t6)||void 0,u=this.os(t3)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var c,h=this._instance.get_session_id(),d=this.os(t5);h&&h!==d&&(u={},null==(c=this.ni)||c.register({[t3]:u,[t5]:h}))}if((t.send_event||!("send_event"in t))&&(!(e in u)||!u[e].includes(o))){M(u[e])?u[e].push(o):u[e]=[o],null==(v=this.ni)||v.register({[t3]:u});var p=this.getFeatureFlagDetails(e),_=[...null!=(f=this.os(t8))?f:[]];q(r)&&_.push("flag_missing");var g={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:n||null,$feature_flag_request_id:a,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:(null==(m=this.qt.bootstrap)||null==(m=m.featureFlags)?void 0:m[e])||null,$feature_flag_bootstrapped_payload:(null==(y=this.qt.bootstrap)||null==(y=y.featureFlagPayloads)?void 0:y[e])||null,$used_bootstrap_value:!this.rs};q(null==p||null==(b=p.metadata)?void 0:b.version)||(g.$feature_flag_version=p.metadata.version);var v,f,m,y,b,E,x,w,S,k,P,T=null!=(E=null==p||null==(x=p.reason)?void 0:x.description)?E:null==p||null==(w=p.reason)?void 0:w.code;T&&(g.$feature_flag_reason=T),null!=p&&null!=(S=p.metadata)&&S.id&&(g.$feature_flag_id=p.metadata.id),q(null==p?void 0:p.original_variant)&&q(null==p?void 0:p.original_enabled)||(g.$feature_flag_original_response=q(p.original_variant)?p.original_enabled:p.original_variant),null!=p&&null!=(k=p.metadata)&&k.original_payload&&(g.$feature_flag_original_payload=null==p||null==(P=p.metadata)?void 0:P.original_payload),_.length&&(g.$feature_flag_error=_.join(",")),this._instance.capture("$feature_flag_called",g)}if(s){var R=n;if(!q(n))try{R=JSON.parse(n)}catch(e){}return{key:e,enabled:!!r,variant:"string"==typeof r?r:void 0,payload:R}}}}else nH.warn('getFeatureFlagResult for key "'+e+nB)}getRemoteConfigPayload(e,t){var i=this.qt.token,s={distinct_id:this._instance.get_distinct_id(),token:i};this.cs()&&(s.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:s,compression:this.qt.disable_compression?void 0:s$.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback(i){var s,r=null==(s=i.json)?void 0:s.featureFlagPayloads;t((null==r?void 0:r[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),!t.fresh||this.rs){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return q(i)?void 0:!!i}nH.warn('isFeatureEnabled for key "'+e+nB)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,i){if(this.ni){this.Yn=!0;var s=this.getFlagVariants(),r=this.getFlagPayloads(),n=this.getFlagsWithDetails();!function(e,t,i,s,r,n){void 0===i&&(i={}),void 0===s&&(s={}),void 0===r&&(r={});var o,a=((o=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(o).map(e=>{var t;return[e,null!=(t=o[e].variant)?t:o[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(o).filter(e=>o[e].enabled).filter(e=>{var t;return null==(t=o[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=o[e].metadata)?void 0:t.payload]}))):nH.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),l=a.flags,u=a.featureFlags,c=a.featureFlagPayloads;if(u){var h=e.requestId,d=e.evaluatedAt;if(M(u)){nH.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var p={};if(u)for(var _=0;u.length>_;_++)p[u[_]]=!0;t&&t.register({[tV]:u,[tB]:p})}else{var g=u,f=c,m=l;if(null!=n&&n.partialResponse)g=v({},i,g),f=v({},s,f),m=v({},r,m);else if(e.errorsWhileComputingFlags)if(l){var y=new Set(Object.keys(l).filter(e=>{var t;return!(null!=(t=l[e])&&t.failed)}));g=v({},i,Object.fromEntries(Object.entries(g).filter(e=>{var[t]=e;return y.has(t)}))),f=v({},s,Object.fromEntries(Object.entries(f||{}).filter(e=>{var[t]=e;return y.has(t)}))),m=v({},r,Object.fromEntries(Object.entries(m||{}).filter(e=>{var[t]=e;return y.has(t)})))}else g=v({},i,g),f=v({},s,f),m=v({},r,m);t&&t.register(v({[tV]:Object.keys(nW(g)),[tB]:g||{},[tY]:f||{},[tG]:m||{}},h?{[tX]:h}:{},d?{[t6]:d}:{}))}}}(e,this.ni,s,r,n,i),t||(this.ss=!1),this.ps(t)}}override(e,t){void 0===t&&(t=!1),nH.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return nH.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this.ni.unregister(tK),this.ni.unregister(tJ),this.ps(),nz.info("All overrides cleared");if(M(e)){var t,i=nV(e);return this.ni.register({[tK]:i}),this.ps(),nz.info("Flag overrides set",{flags:e})}if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){if(this.Kn=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this.ni.unregister(tK),nz.info("Flag overrides cleared");else if(e.flags){if(M(e.flags)){var s=nV(e.flags);this.ni.register({[tK]:s})}else this.ni.register({[tK]:e.flags});nz.info("Flag overrides set",{flags:e.flags})}}return"payloads"in e&&(!1===e.payloads?(this.ni.unregister(tJ),nz.info("Payload overrides cleared")):e.payloads&&(this.ni.register({[tJ]:e.payloads}),nz.info("Payload overrides set",{payloads:e.payloads}))),void this.ps()}if(e&&"object"==typeof e)return this.ni.register({[tK]:e}),this.ps(),nz.info("Flag overrides set",{flags:e});nH.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Yn){var{flags:t,flagVariants:i}=this.gs();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var s,r=(this.os(tW)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:n};r&&(o.$early_access_feature_name=r.name),i&&(o.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(n,!1);var a=v({},this.getFlagVariants(),{[e]:t});null==(s=this.ni)||s.register({[tV]:Object.keys(nW(a)),[tB]:a}),this.ps()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var s=this.os(tW),r=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(s&&!t)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+r),method:"GET",callback:t=>{var i,s;if(t.json){var r=t.json.earlyAccessFeatures;return null==(i=this.ni)||i.unregister(tW),null==(s=this.ni)||s.register({[tW]:r}),e(r)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,i)=>(e[i]=t[i],e),{})}}ps(e){var{flags:t,flagVariants:i}=this.gs();this.featureFlagEventHandlers.forEach(s=>s(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this.os(tZ)||{},s=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),r=null==e?void 0:e.$set_once,n={};if(r)for(var o in r)({}).hasOwnProperty.call(r,o)&&(o in i||(n[o]=r[o]));this._instance.register({[tZ]:v({},i,n,s)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(tZ)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this.os(tQ)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=v({},i[t],e[t]),delete e[t]}),this._instance.register({[tQ]:v({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(tQ)||{};this._instance.register({[tQ]:v({},t,{[e]:{}})})}else this._instance.unregister(tQ)}reset(){this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.fs(),this.Kn=!1}}},n0=v({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Eo=null,this.Mo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[tA]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Eo||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(tA)||this.lr(()=>this.Po())}lr(e){var t,i;null!=(t=h.__PosthogExtensions__)&&t.generateProductTours?e():null==(i=h.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"product-tours",t=>{t?n$.error("Could not load product tours script",t):e()})}Po(){var e;!this.Eo&&null!=(e=h.__PosthogExtensions__)&&e.generateProductTours&&(this.Eo=h.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!M(this.Mo)||t){var i=this.ni;if(i){var s=i.props[t2];if(M(s)&&!t)return this.Mo=s,void e(s,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var s=t.statusCode;if(200!==s||!t.json){var r="Product Tours API could not be loaded, status: "+s;return n$.error(r),void e([],{isLoaded:!1,error:r})}var n=M(t.json.product_tours)?t.json.product_tours:[];this.Mo=n,i&&i.register({[t2]:n}),e(n,{isLoaded:!0})}})}else e(this.Mo,{isLoaded:!0})}getActiveProductTours(e){H(this.Eo)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Eo.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.Eo)||t.showTourById(e)}previewTour(e){this.Eo?this.Eo.previewTour(e):this.lr(()=>{var t;this.Po(),null==(t=this.Eo)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.Eo)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Eo)||e.nextStep()}previousStep(){var e;null==(e=this.Eo)||e.previousStep()}clearCache(){var e;this.Mo=null,null==(e=this.ni)||e.unregister(t2)}resetTour(e){var t;null==(t=this.Eo)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Eo)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.Eo)||t.cancelPendingTour(e)}}},nQ),n1=v({surveys:class{get qt(){return this._instance.config}constructor(e){this.qo=void 0,this._surveyManager=null,this.jo=!1,this.Ho=[],this.Uo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.qt.disable_surveys){var t=e.surveys;if(H(t))return rk.warn("Flags not loaded yet. Not loading surveys.");var i=M(t);this.qo=i?t.length>0:t,rk.info("flags response received, isSurveysEnabled: "+this.qo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(rP)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.jo)rk.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)rk.info(nq);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())rk.info("Not loading surveys in cookieless mode without consent.");else{var e=null==h?void 0:h.__PosthogExtensions__;if(e){if(!q(this.qo)||this.qt.advanced_enable_surveys){var t=this.qo||this.qt.advanced_enable_surveys;this.jo=!0;try{var i=e.generateSurveys;if(i)return void this.Bo(i,t);var s=e.loadExternalDependency;if(!s)return void this.zo(ic);s(this._instance,"surveys",i=>{i||!e.generateSurveys?this.zo("Could not load surveys script",i):this.Bo(e.generateSurveys,t)})}catch(e){throw this.zo("Error initializing surveys",e),e}finally{this.jo=!1}}}else rk.error("PostHog Extensions not found.")}}Bo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new nL(this._instance),rk.info("Surveys loaded successfully"),this.Vo({isLoaded:!0})}zo(e,t){rk.error(e,t),this.Vo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Ho.push(e),this._surveyManager&&this.Vo({isLoaded:!0}),()=>{this.Ho=this.Ho.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this.qt.disable_surveys)return rk.info(nq),e([]);var i,s=this._instance.get_property(t0);if(s&&!t)return e(s,{isLoaded:!0});"u">typeof Promise&&this.Uo?this.Uo.then(t=>{var{surveys:i,context:s}=t;return e(i,s)}):("u">typeof Promise&&(this.Uo=new Promise(e=>{i=e})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:t=>{this.Uo=null;var s=t.statusCode;if(200!==s||!t.json){var r="Surveys API could not be loaded, status: "+s;rk.error(r);var n={isLoaded:!1,error:r};return e([],n),void(null==i||i({surveys:[],context:n}))}var o,a,l=t.json.surveys||[],u=l.filter(e=>{var t,i;return!(!e.start_date||e.end_date)&&(!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)||!(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)||!i.length))});u.length>0&&(null==(a=this._surveyEventReceiver)||a.register(u)),null==(o=this._instance.persistence)||o.register({[t0]:l});var c={isLoaded:!0};e(l,c),null==i||i({surveys:l,context:c})}}))}Vo(e){for(var t of this.Ho)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){rk.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!H(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);rk.warn("init was not called")}Wo(e){var t=null;return this.getSurveys(i=>{var s;t=null!=(s=i.find(t=>t.id===e))?s:null}),t}Zo(e){if(H(this._surveyManager))return{eligible:!1,reason:nN};var t="string"==typeof e?this.Wo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(H(this._surveyManager))return rk.warn("init was not called"),{visible:!1,disabledReason:nN};var t=this.Zo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return H(this._surveyManager)?(rk.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:nN})):new Promise(i=>{this.getSurveys(t=>{var s,r=null!=(s=t.find(t=>t.id===e))?s:null;if(r){var n=this.Zo(r);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,i){var s;if(H(this._surveyManager))rk.warn("init was not called");else{var n="string"==typeof e?this.Wo(e):e;if(null!=n&&n.id)if(rT.includes(n.type)){var o=null==r?void 0:r.querySelector(t);if(o)return null!=(s=n.appearance)&&s.surveyPopupDelaySeconds?(rk.info("Rendering survey "+n.id+" with delay of "+n.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;rk.info("Rendering survey "+n.id+" with delay of "+(null==(e=n.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(n,o,i),rk.info("Survey "+n.id+" rendered")},1e3*n.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(n,o,i);rk.warn("Survey element not found")}else rk.warn("Surveys of type "+n.type+" cannot be rendered in the app");else rk.warn("Survey not found")}}displaySurvey(e,t){var i;if(H(this._surveyManager))rk.warn("init was not called");else{var s=this.Wo(e);if(s){var r=s;if(null!=(i=s.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=v({},s,{appearance:v({},s.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==sx.Popover&&t.initialResponses&&rk.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var n=this.canRenderSurvey(s);if(!n.visible)return void rk.warn("Survey is not eligible to be displayed: ",n.disabledReason)}t.displayType!==sx.Inline?this._surveyManager.handlePopoverSurvey(r,t):this.renderSurvey(r,t.selector,t.properties)}else rk.warn("Survey not found")}}cancelPendingSurvey(e){H(this._surveyManager)?rk.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}},nQ),n2=v({experiments:nK},nQ),n3=v({},nQ,{sessionRecording:class{get qt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!(null==(e=this.ys)||!e.isStarted)}get status(){var e,t;return this.bs===nw||this.bs===nS?this.bs:null!=(e=null==(t=this.ys)?void 0:t.status)?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=nE,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw nP.error("started without valid sessionManager"),Error(nk+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===id)throw Error(nk+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,i=!(null==(e=this._instance.get_property(tN))||!e.enabled),s=!this.qt.disable_session_recording,r=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return t&&i&&s&&!r}startIfEnabledOrStop(e){var t;if(!this.ws||null==(t=this.ys)||!t.isStarted){var i=!q(Object.assign)&&!q(Array.from);this.ws&&i?(this.xs(e),nP.info("starting")):(this.bs=nE,this.stopRecording())}}xs(e){var t,i,s;this.ws&&(this.bs!==nw&&this.bs!==nS&&(this.bs=nx),null!=h&&null!=(t=h.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=h.__PosthogExtensions__)&&i.initSessionRecording?this.Ss(e):null==(s=h.__PosthogExtensions__)||null==s.loadExternalDependency||s.loadExternalDependency(this._instance,this.ks,t=>{if(t)return nP.error("could not load recorder",t);this.Ss(e)}))}stopRecording(){var e,t;null==(e=this._s)||e.call(this),this._s=void 0,null==(t=this.ys)||t.stop()}Cs(){var e,t;null==(e=this._s)||e.call(this),this._s=void 0,null==(t=this.ys)||t.discard()}Is(){var e;null==(e=this.ni)||e.unregister(tz)}Ts(e,t){if(H(e))return null;var i=z(e)?e:parseFloat(e);return"number"!=typeof i||!Number.isFinite(i)||0>i||i>1?(nP.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):i}Es(e){if(this.ni){var t,i,s=this.ni,r=()=>{var t,i=!1===e.sessionRecording?void 0:e.sessionRecording,r=this.Ts(null==(t=this.qt.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),n=this.Ts(null==i?void 0:i.sampleRate,"remote config sampleRate"),o=null!=r?r:n;H(o)&&this.Is();var a=null==i?void 0:i.minimumDurationMilliseconds;s.register({[tN]:v({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:v({capturePerformance:e.capturePerformance},null==i?void 0:i.networkPayloadCapture),canvasRecording:{enabled:null==i?void 0:i.recordCanvas,fps:null==i?void 0:i.canvasFps,quality:null==i?void 0:i.canvasQuality},sampleRate:o,minimumDurationMilliseconds:q(a)?null:a,endpoint:null==i?void 0:i.endpoint,triggerMatchType:null==i?void 0:i.triggerMatchType,masking:null==i?void 0:i.masking,urlTriggers:null==i?void 0:i.urlTriggers,version:null==i?void 0:i.version,triggerGroups:null==i?void 0:i.triggerGroups})})};r(),null==(t=this._s)||t.call(this),this._s=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(r)}}onRemoteConfig(e){return"sessionRecording"in e?!1===e.sessionRecording?(this.Es(e),void this.Cs()):(this.Es(e),void this.startIfEnabledOrStop()):(this.bs===nw&&(this.bs=nS,nP.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.ys)&&i.log?this.ys.log(e,t):nP.warn("log called before recorder was ready")}get ks(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(tN);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}Ms(){var e,t,i=this._instance.get_property(tN);if(!i)return!1;try{t="object"==typeof i?i:JSON.parse(i)}catch(e){return nP.warn("persisted remote config for session recording is invalid and will be ignored",e),!1}var s=null!=(e=t.cache_timestamp)?e:Date.now();return 36e5>=Date.now()-s}Ss(e){var t,i;if(null==(t=h.__PosthogExtensions__)||!t.initSessionRecording)return nP.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[iu]:!0});if(this.ys||(this.ys=null==(i=h.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ms()){if(this.bs===nS||this.bs===nw)return;return this.bs=nw,nP.info("persisted remote config is stale, requesting fresh config before starting"),void new sR(this._instance).load()}this.bs=nx,this.ys.start(e)}onRRwebEmit(e){var t;null==(t=this.ys)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||null==(t=this.ni)||t.register({[tD]:!0}),null==(e=this.ys)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||null==(t=this.ni)||t.register({[tq]:!0}),null==(e=this.ys)||e.overrideSampling()}overrideTrigger(e){var t,i;this.ys||null==(i=this.ni)||i.register({["url"===e?tU:tj]:!0}),null==(t=this.ys)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.ys)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.ys)||!i.tryAddCustomEvent(e,t))}}},{autocapture:class{constructor(e){this.Ps=!1,this.Rs=null,this.Os=!1,this.instance=e,this.rageclicks=new np(e.config.rageclick),this.Ls=null}initialize(){this.startIfEnabled()}get qt(){var e,t,i=L(this.instance.config.autocapture)?this.instance.config.autocapture:{};return i.url_allowlist=null==(e=i.url_allowlist)?void 0:e.map(e=>new RegExp(e)),i.url_ignorelist=null==(t=i.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),i}Fs(){if(this.isBrowserSupported()){if(t&&r){var e=e=>{e=e||(null==t?void 0:t.event);try{this.As(e)}catch(e){ng.error("Failed to capture event",e)}};if(iI(r,"submit",e,{capture:!0}),iI(r,"change",e,{capture:!0}),iI(r,"click",e,{capture:!0}),this.qt.capture_copied_text){var i=e=>{e=e||(null==t?void 0:t.event);try{this.As(e,n_)}catch(e){ng.error("Failed to capture copy/cut event",e)}};iI(r,"copy",i,{capture:!0}),iI(r,"cut",i,{capture:!0})}}}else ng.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Ps&&(this.Fs(),this.Ps=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Os=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[tR]:!!e.autocapture_opt_out}),this.Rs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Ls=e}getElementSelectors(e){var t,i=[];return null==(t=this.Ls)||t.forEach(t=>{var s=null==r?void 0:r.querySelectorAll(t);null==s||s.forEach(s=>{e===s&&i.push(t)})}),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[tR];if(j(this.Rs)&&!V(i)&&!this.instance.Lr())return!1;var s=null!=(t=this.Rs)?t:!!i;return!!this.instance.config.autocapture&&!s}As(e,i){if(void 0===i&&(i="$autocapture"),this.isEnabled){var s,r=r5(e);rJ(r)&&(r=r.parentNode||null),"$autocapture"===i&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(s=this.rageclicks)&&s.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,i){if(!t||ne(e)||(V(i)?(s=!!i&&r9,r=void 0):(s=null!=(n=null==i?void 0:i.css_selector_ignorelist)?n:r9,r=null==i?void 0:i.content_ignorelist),!1===s))return!1;var s,r,n,{targetElementList:o}=nt(e,!1);return!function(e,t){var i;if(!1===e||q(e))return!1;if(!0===e)i=r7;else{if(!M(e))return!1;if(e.length>10)return tb.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:s}=e;return i.some(e=>t.includes(e)||s.includes(e))})}(r,o.map(e=>{var t;return{safeText:r3(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!r6(o,s)}(r,this.instance.config.rageclick)&&this.As(e,"$rageclick");var n=i===n_;if(r&&function(e,i,s,r,n){if(void 0===s&&(s=void 0),!t||ne(e)||null!=(o=s)&&o.url_allowlist&&!r0(s.url_allowlist)||null!=(a=s)&&a.url_ignorelist&&r0(s.url_ignorelist))return!1;if(null!=(l=s)&&l.dom_event_allowlist){var o,a,l,u,c=s.dom_event_allowlist;if(c&&!c.some(e=>i.type===e))return!1}var{parentIsUsefulElement:h,targetElementList:d}=nt(e,r);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(q(i))return!0;var s,r=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(s=r(n))return s.v;return!1}(d,s)||!r6(d,null==(u=s)?void 0:u.css_selector_allowlist))return!1;var p=t.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===i.type)return!0;var _=e.tagName.toLowerCase();switch(_){case"html":return!1;case"form":return(n||["submit"]).indexOf(i.type)>=0;case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(i.type)>=0;default:return h?(n||["click"]).indexOf(i.type)>=0:(n||["click"]).indexOf(i.type)>=0&&(r8.indexOf(_)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.qt,n,n?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=function(e,i){var s,r,{e:n,maskAllElementAttributes:o,maskAllText:a,elementAttributeIgnoreList:l,elementsChainAsString:u}=i;if(!rX(e))return{props:{}};for(var c=[e],h=e;h.parentNode&&!rK(h,"body");)if(rZ(h.parentNode))c.push(h.parentNode.host),h=h.parentNode.host;else{if(!rX(h.parentNode))break;c.push(h.parentNode),h=h.parentNode}var d,p=[],_={},g=!1,f=!1;if(iS(c,e=>{var t=ni(e);if(rK(e,"a")){var i=e.getAttribute("href");g=t&&!!i&&nc(i)&&i}R(r1(e),"ph-no-capture")&&(f=!0),p.push(function(e,t,i,s){var r=e.tagName.toLowerCase(),n={tag_name:r};r8.indexOf(r)>-1&&!i&&(n.$el_text="a"===r.toLowerCase()||"button"===r.toLowerCase()?nv(1024,nh(e)):nv(1024,r3(e)));var o=r1(e);o.length>0&&(n.classes=o.filter(function(e){return""!==e})),iS(e.attributes,function(i){var r;if((!ns(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==s||!s.includes(i.name))&&!t&&nc(i.value)&&(!D(r=i.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))){var o=i.value;"class"===i.name&&(o=rQ(o).join(" ")),n["attr__"+i.name]=nv(1024,o)}});for(var a=1,l=1,u=e;u=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!rX(t))return t}(u);)a++,u.tagName===e.tagName&&l++;return n.nth_child=a,n.nth_of_type=l,n}(e,o,a,l)),ik(_,function(e){if(!ni(e))return{};var t={};return iS(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),s=e.value;i&&s&&nc(s)&&(t[i]=s)}}),t}(e))}),f)return{props:{},explicitNoCapture:f};if(a||(p[0].$el_text=rK(e,"a")||rK(e,"button")?nh(e):r3(e)),g){p[0].attr__href=g;var m,y,b=null==(m=i7(g))?void 0:m.host,E=null==t||null==(y=t.location)?void 0:y.host;b&&E&&b!==E&&(d=g)}return{props:ik({$event_type:n.type,$ce_version:1},u?{}:{$elements:p},{$elements_chain:p.map(e=>{var t,i,s,r={text:null==(i=e.$el_text)?void 0:i.slice(0,400),tag_name:e.tag_name,href:null==(s=e.attr__href)?void 0:s.slice(0,2048),attr_class:(t=e.attr__class)?M(t)?t:rQ(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return iP(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,i]=e;return r.attributes[t]=i}),r}).map(e=>{var t,i,s="";if(e.tag_name&&(s+=e.tag_name),e.attr_class)for(var r of(e.attr_class.sort(),e.attr_class))s+="."+r.replace(/"/g,"");var n=v({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),o={};return iP(n).sort((e,t)=>{var[i]=e,[s]=t;return i.localeCompare(s)}).forEach(e=>{var[t,i]=e;return o[nd(t.toString())]=nd(i.toString())}),(s+=":")+iP(o).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(s=p[0])&&s.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},d&&"click"===n.type?{$external_click_url:d}:{},_)}}(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsChainAsString:this.Os});if(a)return!1;var l=this.getElementSelectors(r);if(l&&l.length>0&&(o.$element_selectors=l),i===n_){var u,c=r2(null==t||null==(u=t.getSelection())?void 0:u.toString()),h=e.type||"clipboard";if(!c)return!1;o.$selected_content=c,o.$copy_type=h}return this.instance.capture(i,o),!0}}}isBrowserSupported(){return A(null==r?void 0:r.querySelectorAll)}},historyAutocapture:class{constructor(e){var i;this._instance=e,this.Ns=(null==t||null==(i=t.location)?void 0:i.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(tb.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.$s&&this.$s(),this.$s=void 0,tb.info("History API monitoring stopped")}monitorHistoryChanges(){var e,i;if(t&&t.history){var s=this;null!=(e=t.history.pushState)&&e.__posthog_wrapped__||nm(t.history,"pushState",e=>function(t,i,r){e.call(this,t,i,r),s.Ds("pushState")}),null!=(i=t.history.replaceState)&&i.__posthog_wrapped__||nm(t.history,"replaceState",e=>function(t,i,r){e.call(this,t,i,r),s.Ds("replaceState")}),this.qs()}}Ds(e){try{var i,s=null==t||null==(i=t.location)?void 0:i.pathname;if(!s)return;s!==this.Ns&&this.isEnabled&&this._instance.capture(iy,{navigation_type:e}),this.Ns=s}catch(t){tb.error("Error capturing "+e+" pageview",t)}}qs(){if(!this.$s){var e=()=>{this.Ds("popstate")};iI(t,"popstate",e),this.$s=()=>{t&&t.removeEventListener("popstate",e)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(e){var t;this.js=!1,this.Ps=!1,this.Hs=null,this.instance=e,this.js=!(null==(t=this.instance.persistence)||!t.props[t$]),this.rageclicks=new np(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return L(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(e=this.qt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return H(this.qt.capture_heatmaps)?H(this.qt.enable_heatmaps)?this.js:this.qt.enable_heatmaps:!1!==this.qt.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.Ps||(nT.info("starting..."),this.Us(),this.At());else{var e;clearInterval(null!=(e=this.Hs)?e:void 0),this.Bs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[t$]:t}),this.js=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.M;return this.M=void 0,e}zs(e){this.Mt(e.originalEvent,"deadclick")}At(){this.Hs&&clearInterval(this.Hs),this.Hs="visible"===(null==r?void 0:r.visibilityState)?setInterval(this.Zr.bind(this),this.flushIntervalMilliseconds):null}Us(){t&&r&&(this.Vs=this.Zr.bind(this),iI(t,im,this.Vs),this.Ws=e=>this.Mt(e||(null==t?void 0:t.event)),iI(r,"click",this.Ws,{capture:!0}),this.Zs=e=>this.Gs(e||(null==t?void 0:t.event)),iI(r,"mousemove",this.Zs,{capture:!0}),this.Qs=new i0(this.instance,iZ,this.zs.bind(this)),this.Qs.startIfEnabledOrStop(),this.Js=this.At.bind(this),iI(r,iv,this.Js),this.Ps=!0)}Bs(){var e;t&&r&&(this.Vs&&t.removeEventListener(im,this.Vs),this.Ws&&r.removeEventListener("click",this.Ws,{capture:!0}),this.Zs&&r.removeEventListener("mousemove",this.Zs,{capture:!0}),this.Js&&r.removeEventListener(iv,this.Js),clearTimeout(this.Ks),null==(e=this.Qs)||e.stop(),this.Ps=!1)}Ys(e,i){var s=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),o=function(e,i,s){for(var r=e;r&&rX(r)&&!rK(r,"body")&&r!==s;){if(R(i,null==t?void 0:t.getComputedStyle(r).position))return!0;r=r4(r)}return!1}(r5(e),["fixed","sticky"],n);return{x:e.clientX+(o?0:r),y:e.clientY+(o?0:s),target_fixed:o,type:i}}Mt(e,t){var i;if(void 0===t&&(t="click"),!rY(e.target)&&nR(e)){var s=this.Ys(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.Xs(v({},s,{type:"rageclick"})),this.Xs(s)}}Gs(e){!rY(e.target)&&nR(e)&&(clearTimeout(this.Ks),this.Ks=setTimeout(()=>{this.Xs(this.Ys(e,"mousemove"))},500))}Xs(e){if(t){var i=t.location.href,s=this.qt.custom_personal_data_properties,r=se(i,this.qt.mask_personal_data_properties?[...ss,...s||[]]:[],sn);this.M=this.M||{},this.M[r]||(this.M[r]=[]),this.M[r].push(e)}}Zr(){this.M&&!N(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:i0,webVitalsAutocapture:class{constructor(e){var t;this.js=!1,this.Ps=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.eo=()=>{clearTimeout(this.ro),0!==this.M.metrics.length&&(this._instance.capture("$web_vitals",this.M.metrics.reduce((e,t)=>v({},e,{["$web_vitals_"+t.name+"_event"]:v({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=e=>{var t,i=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(q(i))nb.error("Could not read session ID. Dropping metrics!");else{this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.io();q(s)||(H(null==e?void 0:e.name)||H(null==e?void 0:e.value)?nb.error("Invalid metric received",e):!this.no||this.no>e.value?(this.M.url!==s&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),q(this.M.url)&&(this.M.url=s),this.M.firstMetricTimestamp=q(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.M.metrics.push(v({},e,{$current_url:s,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.M.metrics.length===this.allowedMetrics.length&&this.eo()):nb.error("Ignoring metric with value >= "+this.no,e))}},this.so=()=>{if(!this.Ps){var e,t,i,s,r=h.__PosthogExtensions__;q(r)||q(r.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:s}=r.postHogWebVitalsCallbacks),e&&t&&i&&s?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.ht.bind(this)),this.Ps=!0):nb.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.js=!(null==(t=this._instance.persistence)||!t.props[tC]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,i=L(this.oo)?null==(e=this.oo)?void 0:e.web_vitals_allowed_metrics:void 0;return H(i)?(null==(t=this._instance.persistence)?void 0:t.props[tL])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(L(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=L(this.oo)?this.oo.web_vitals_attribution:void 0;return null!=e&&e}get no(){var e=L(this.oo)&&z(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:9e5;return e>0&&6e4>=e?9e5:e}get isEnabled(){var e=null==n?void 0:n.protocol;if("http:"!==e&&"https:"!==e)return nb.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=L(this.oo)?this.oo.web_vitals:V(this.oo)?this.oo:void 0;return V(t)?t:this.js}startIfEnabled(){this.isEnabled&&!this.Ps&&(nb.info("enabled, starting..."),this.lr(this.so))}onRemoteConfig(e){if("capturePerformance"in e){var t=L(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=L(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[tC]:t}),this._instance.persistence.register({[tL]:i})),this.js=t,this.startIfEnabled()}}lr(e){var t,i;null!=(t=h.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks?e():null==(i=h.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",t=>{t?nb.error("failed to load script",t):e()})}io(){var e=t?t.location.href:void 0;if(e){var i=this._instance.config.custom_personal_data_properties;return se(e,this._instance.config.mask_personal_data_properties?[...ss,...i||[]]:[],sn)}nb.error("Could not determine current URL")}}},{exceptionObserver:class{constructor(e){var i,s,r;this.so=()=>{var e;if(t&&this.isEnabled&&null!=(e=h.__PosthogExtensions__)&&e.errorWrappingFunctions){var i=h.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,s=h.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=h.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.qt.capture_unhandled_errors&&(this.ao=i(this.captureException.bind(this))),!this.uo&&this.qt.capture_unhandled_rejections&&(this.uo=s(this.captureException.bind(this))),!this.lo&&this.qt.capture_console_errors&&(this.lo=r(this.captureException.bind(this)))}catch(e){nf.error("failed to start",e),this.ho()}}},this._instance=e,this.co=!(null==(i=this._instance.persistence)||!i.props[tF]),this.do=new Q({refillRate:null!=(s=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?s:1,bucketSize:null!=(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?r:10,refillInterval:1e4,Gt:nf}),this.qt=this.vo(),this.startIfEnabledOrStop()}vo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return L(e)?t=v({},t,e):(q(e)?this.co:e)&&(t=v({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(nf.info("enabled"),this.ho(),this.lr(this.so)):this.ho()}lr(e){var t,i;null!=(t=h.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=h.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return nf.error("failed to load script",t);e()})}ho(){var e,t,i;null==(e=this.ao)||e.call(this),this.ao=void 0,null==(t=this.uo)||t.call(this),this.uo=void 0,null==(i=this.lo)||i.call(this),this.lo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.co=!!e.autocaptureExceptions,this._instance.persistence&&this._instance.persistence.register({[tF]:this.co}),this.qt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.vo()}captureException(e){var t,i,s,r=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";this.do.consumeRateLimit(r)?nf.info("Skipping exception capture because of client rate limiting.",{exception:r}):null==(s=this._instance.exceptions)||s.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,i;this.fo=[],this.po=new e1([new ti,new td,new tr,new ts,new tc,new tu,new to,new th],function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];return function(t,s){void 0===s&&(s=0);for(var r=[],n=t.split("\n"),o=s;n.length>o;o++){var a=n[o];if(1024>=a.length){var l=tt.test(a)?a.replace(tt,"$1"):a;if(!l.match(/\S*Error: /)){for(var u of i){var c=u(l,e);if(c){r.push(c);break}}if(r.length>=50)break}}}if(!r.length)return[];var h=Array.from(r);return h.reverse(),h.slice(0,50).map(e=>v({},e,{filename:e.filename||(h[h.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",e4,te)),this._instance=e,this.fo=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(tI))?t:[],this.mo=tf(this.yo()),this.bo=new tm(this.mo)}onConfigChange(){this.mo=tf(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,i,s;if("errorTracking"in e){var r=null!=(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)?t:[],n=null==(s=e.errorTracking)?void 0:s.captureExtensionExceptions;this.fo=r,this._instance.persistence&&this._instance.persistence.register({[tI]:this.fo,[tO]:n})}}get _o(){var e,t=!!this._instance.get_property(tO),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.po.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}addExceptionStep(e,t){if(this.mo.enabled)try{if(!D(e)||0===e.trim().length)return void nG.warn("Ignoring exception step because message must be a non-empty string");var i=this.wo(t),{sanitizedProperties:s,droppedKeys:r}=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((i,s)=>(tg.has(s)?t.push(s):i[s]=e[s],i),{}),droppedKeys:t}}(i);r.length>0&&nG.warn("Ignoring reserved exception step fields",{droppedKeys:r}),this.bo.add(v({[tp]:e,[t_]:(new Date).toISOString()},s))}catch(e){nG.error("Failed to add exception step. Ignoring breadcrumb.",e)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.xo(t)){if(this.So(t))return this.ko("Exception dropped: matched a suppression rule"),void nG.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.Co(t))return this.ko("Exception dropped: thrown by a browser extension"),void nG.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Io(t))return this.ko("Exception dropped: thrown by the PostHog SDK"),void nG.info("Skipping exception capture because it was thrown by the PostHog SDK")}var i=this.mo.enabled&&H(e.$exception_steps)?this.To(e):e;try{var s=this._instance.capture("$exception",i,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return s&&this.bo.clear(),s}catch(e){return nG.error("Failed to capture exception event. Dropping this exception.",e),void this.bo.clear()}}catch(e){return void nG.error("Failed to process exception event. Ignoring this exception.",e)}}To(e){try{var t=this.bo.getAttachable();return 0===t.length?e:v({},e,{$exception_steps:t})}catch(t){return nG.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}}ko(e){this.mo.enabled&&this.bo.add({[tp]:e,[t_]:(new Date).toISOString()})}wo(e){return L(e)?v({},e):{}}yo(){var e,t;return null!=(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)?e:{}}So(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>{var{type:i,value:s}=t;return D(i)&&i.length>0&&e.$exception_types.push(i),D(s)&&s.length>0&&e.$exception_values.push(s),e},{$exception_types:[],$exception_values:[]});return this.fo.some(e=>{var i=e.values.map(e=>{var i,s=rm[e.operator],r=M(e.value)?e.value:[e.value],n=null!=(i=t[e.key])?i:[];return r.length>0&&s(r,n)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}Co(e){return e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}Io(e){if(e.length>0){var t,i,s,r,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],o=n[n.length-1];return null!=(s=null==o||null==(r=o.filename)?void 0:r.includes("posthog.com/static"))&&s}return!1}xo(e){return!H(e)&&M(e)}}},n0,{siteApps:class{constructor(e){this._instance=e,this.Ro=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Oo(e,t){if(t){var i=this.globalsForEvent(t);this.Ro.push(i),this.Ro.length>1e3&&(this.Ro=this.Ro.slice(10))}}get siteAppLoaders(){var e;return null==(e=h._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Oo.bind(this));this.Lo=()=>{e(),this.Ro=[],this.Lo=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,s,r,n,o,a,l={},u=this._instance.get_property("$groups")||[];for(var[c,h]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[c]={id:u[c],type:c,properties:h};var{$set_once:d,$set:p}=e;return{event:v({},f(e,nF),{properties:v({},e.properties,p?{$set:v({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:v({},null!=(s=null==(r=e.properties)?void 0:r.$set_once)?s:{},d)}:{}),elements_chain:null!=(n=null==(o=e.properties)?void 0:o.$elements_chain)?n:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.Ro.length&&(nI.info("Processing "+this.Ro.length+" events for site app with id "+e.id),this.Ro.forEach(e=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.Lo)||i.call(this))},s=!1,r=r=>{t.errored=!r,t.loaded=!0,nI.info("Site app with id "+e.id+" "+(r?"loaded":"errored")),s&&i()};try{var{processEvent:n}=e.init({posthog:this._instance,callback(e){r(e)}});n&&(t.processEvent=n),s=!0}catch(t){nI.error(nO+e.id,t),r(!1)}if(s&&t.loaded)try{i()}catch(i){nI.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}Fo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}Ao(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var i of Object.values(this.apps))try{null==i.processEvent||i.processEvent(t)}catch(t){nI.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,s,r=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.Fo(),void this._instance.on("eventCaptured",e=>this.Ao(e))):void nI.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.Lo)||i.call(this),null!=(s=e.siteApps)&&s.length)if(this.isEnabled){var n=function(e){var t;h["__$$ph_site_app_"+e]=r._instance,null==(t=h.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(r._instance,a,t=>{if(t)return nI.error(nO+e,t)})};for(var{id:o,url:a}of e.siteApps)n(o)}else nI.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},n1,{tracingHeaders:class{constructor(e){this.No=void 0,this.$o=void 0,this.so=()=>{var e,t,i=this.Do()||[];q(this.No)&&(null==(e=h.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(i,this._instance.get_distinct_id(),this._instance.sessionManager)),q(this.$o)&&(null==(t=h.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(i,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}lr(e){var t,i;null!=(t=h.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=h.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return ny.error("failed to load script",t);e()})}Do(){var e;return null!=(e=this._instance.config.addTracingHeaders)?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.Do()?this.lr(this.so):(null==(e=this.No)||e.call(this),null==(t=this.$o)||t.call(this),this.No=void 0,this.$o=void 0)}}},{toolbar:class{constructor(e){this.instance=e}Go(e){h.ph_toolbar_state=e}Qo(){var e;return null!=(e=h.ph_toolbar_state)?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,i,s){if(void 0===e&&(e=void 0),void 0===i&&(i=void 0),void 0===s&&(s=void 0),iO(this.instance.config)||!t||!r)return!1;e=null!=e?e:t.location,s=null!=s?s:t.history;try{if(!i){try{t.localStorage.setItem("test","test"),t.localStorage.removeItem("test")}catch(e){return!1}i=null==t?void 0:t.localStorage}var n,o=nD||st(e.hash,"__posthog")||st(e.hash,"state"),a=o?iT(()=>JSON.parse(atob(decodeURIComponent(o))))||iT(()=>JSON.parse(decodeURIComponent(o))):null;return a&&"ph_authorize"===a.action?((n=a).source="url",n&&Object.keys(n).length>0&&(a.desiredHash?e.hash=a.desiredHash:s?s.replaceState(s.state,"",e.pathname+e.search):e.hash="")):((n=JSON.parse(i.getItem(nU)||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token||(this.loadToolbar(n),0))}catch(e){return!1}}Jo(e){var t=h.ph_load_toolbar||h.ph_load_editor;!H(t)&&A(t)?t(e,this.instance):nj.warn("No toolbar load function found")}loadToolbar(e){var i,s=!(null==r||!r.getElementById(ir));if(!t||s)return!1;var n="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,o=v({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});return(t.localStorage.setItem(nU,JSON.stringify(v({},o,{source:void 0}))),2===this.Qo())?this.Jo(o):0===this.Qo()&&(this.Go(1),null==(i=h.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"toolbar",e=>{e?(nj.error("[Toolbar] Failed to load",e),this.Go(0)):(this.Go(2),this.Jo(o))}),iI(t,"turbolinks:load",()=>{this.Go(0),this.loadToolbar(o)})),!0}Ko(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,i){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.maybeLoadToolbar(e,t,i)}}},n2,{conversations:class{constructor(e){this.Yo=void 0,this._conversationsManager=null,this.Xo=!1,this.ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;H(t)||(V(t)?this.Yo=t:(this.Yo=t.enabled,this.ea=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.Yo=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Xo||this._instance.config.disable_conversations||iO(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==h?void 0:h.__PosthogExtensions__;if(e&&!q(this.Yo)&&this.Yo)if(this.ea&&this.ea.token){this.Xo=!0;try{var t=e.initConversations;if(t)return this.ta(t),void(this.Xo=!1);var i=e.loadExternalDependency;if(!i)return void this.ra(ic);i(this._instance,"conversations",t=>{t||!e.initConversations?this.ra("Could not load conversations script",t):this.ta(e.initConversations),this.Xo=!1})}catch(e){this.ra("Error initializing conversations",e),this.Xo=!1}}else nJ.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),nJ.info("Conversations loaded successfully")}catch(e){this.ra("Error completing conversations initialization",e)}else nJ.error("Cannot complete initialization: remote config is null")}ra(e,t){nJ.error(e,t),this._conversationsManager=null,this.Xo=!1}show(){this._conversationsManager?this._conversationsManager.show():nJ.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.Yo&&!j(this._conversationsManager)}isVisible(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&e}sendMessage(e,t,i){var s=this;return g(function*(){return s._conversationsManager?s._conversationsManager.sendMessage(e,t,i):(nJ.warn(nZ),null)})()}getMessages(e,t){var i=this;return g(function*(){return i._conversationsManager?i._conversationsManager.getMessages(e,t):(nJ.warn(nZ),null)})()}markAsRead(e){var t=this;return g(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(nJ.warn(nZ),null)})()}getTickets(e){var t=this;return g(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(nJ.warn(nZ),null)})()}requestRestoreLink(e){var t=this;return g(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(nJ.warn(nZ),null)})()}restoreFromToken(e){var t=this;return g(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(nJ.warn(nZ),null)})()}restoreFromUrlToken(){var e=this;return g(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(nJ.warn(nZ),null)})()}getCurrentTicketId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())?e:null}getWidgetSessionId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())?e:null}ln(){var e;null==(e=this._conversationsManager)||e.setIdentity()}hn(){var e;null==(e=this._conversationsManager)||e.clearIdentity()}}},{logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=tE("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.ua=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,i=null==(t=e.logs)?void 0:t.captureConsoleLogs;!H(i)&&i&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.oa=0,this.aa=0,this.ua=!1}loadIfEnabled(){if(this.ia&&!this.na){var e=null==h?void 0:h.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",t=>{var i;t||null==(i=e.logs)||!i.initializeLogs?this.Gt.error("Could not load logs script",t):(e.logs.initializeLogs(this._instance),this.na=!0)}):this.Gt.error(ic)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,i,s,r,n,o;if(this._instance.is_capturing())if(e&&e.body){var a=null!=(t=null==(i=this._instance.config.logs)?void 0:i.flushIntervalMs)?t:3e3,l=null!=(s=null==(r=this._instance.config.logs)?void 0:r.maxLogsPerInterval)?s:1e3,u=Date.now();if(a>u-this.aa||(this.aa=u,this.oa=0,this.ua=!1),l>this.oa){this.oa++;var c=function(e,t){var{text:i,number:s}=eZ[e.level||"info"]||eQ,r=String(Date.now())+"000000",n={};t.distinctId&&(n.posthogDistinctId=t.distinctId),t.sessionId&&(n.sessionId=t.sessionId),t.currentUrl&&(n["url.full"]=t.currentUrl),t.screenName&&(n["screen.name"]=t.screenName),t.appState&&(n["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(n.feature_flags=t.activeFeatureFlags);var o=v({},n,e.attributes||{}),a={timeUnixNano:r,observedTimeUnixNano:r,severityNumber:s,severityText:i,body:{stringValue:e.body},attributes:e0(o)};return e.trace_id&&(a.traceId=e.trace_id),e.span_id&&(a.spanId=e.span_id),q(e.trace_flags)||(a.flags=e.trace_flags),a}(e,this.la());this.sa.push({record:c}),(null!=(n=null==(o=this._instance.config.logs)?void 0:o.maxBufferSize)?n:100)>this.sa.length?this.ha():this.flushLogs()}else this.ua||(this.Gt.warn("captureLog dropping logs: exceeded "+l+" logs per "+a+"ms"),this.ua=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.ca}flushLogs(e){if(this.qr&&(clearTimeout(this.qr),this.qr=void 0),0!==this.sa.length){var t,i,s,r=this.sa;this.sa=[];var n=this._instance.config.logs,o=v({"service.name":(null==n?void 0:n.serviceName)||"unknown_service"},(null==n?void 0:n.environment)&&{"deployment.environment":n.environment},(null==n?void 0:n.serviceVersion)&&{"service.version":n.serviceVersion},null==n?void 0:n.resourceAttributes),a=(t=r.map(e=>e.record),i=p.LIB_NAME,s=p.LIB_VERSION,{resourceLogs:[{resource:{attributes:e0(o)},scopeLogs:[{scope:{name:i,version:s},logRecords:t}]}]}),l=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Bi({method:"POST",url:l,data:a,compression:"best-available",batchKey:"logs",transport:e})}}ha(){var e,t;this.qr||(this.qr=setTimeout(()=>{this.qr=void 0,this.flushLogs()},null!=(e=null==(t=this._instance.config.logs)?void 0:t.flushIntervalMs)?e:3e3))}la(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:i}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=i}if(null!=h&&null!=(e=h.location)&&e.href&&(t.currentUrl=h.location.href),this._instance.featureFlags){var s=this._instance.featureFlags.getFlags();s&&s.length>0&&(t.activeFeatureFlags=s)}return t}}});rG.__defaultExtensionClasses=v({},n3);var n5,n8=(n5=rM[rj]=new rG,function(){function e(){e.done||(e.done=!0,rH=!1,iS(rM,function(e){e._dom_loaded()}))}null!=r&&r.addEventListener?"complete"===r.readyState?e():iI(r,"DOMContentLoaded",e,{capture:!1}):t&&tb.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),n5);e.s(["Compression",0,s$,"DEFAULT_PRODUCT_TOUR_APPEARANCE",0,{backgroundColor:"#ffffff",textColor:"#1d1f27",buttonColor:"#1d1f27",borderRadius:8,buttonBorderRadius:6,borderColor:"#e5e7eb",fontFamily:"system-ui",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",showOverlay:!0,whiteLabel:!1,dismissOnClickOutside:!0,zIndex:0x7ffffffe},"DisplaySurveyType",0,sx,"PostHog",0,rG,"ProductTourEventName",0,sw,"ProductTourEventProperties",0,sS,"SurveyEventName",0,sb,"SurveyEventProperties",0,sE,"SurveyEventType",0,sm,"SurveyPosition",0,{TopLeft:"top_left",TopRight:"top_right",TopCenter:"top_center",MiddleLeft:"middle_left",MiddleRight:"middle_right",MiddleCenter:"middle_center",Left:"left",Center:"center",Right:"right",NextToTrigger:"next_to_trigger"},"SurveyQuestionBranchingType",0,{NextQuestion:"next_question",End:"end",ResponseBased:"response_based",SpecificQuestion:"specific_question"},"SurveyQuestionType",0,{Open:"open",MultipleChoice:"multiple_choice",SingleChoice:"single_choice",Rating:"rating",Link:"link"},"SurveySchedule",0,{Once:"once",Recurring:"recurring",Always:"always"},"SurveyTabPosition",0,{Top:"top",Left:"left",Right:"right",Bottom:"bottom"},"SurveyType",0,sy,"SurveyWidgetType",0,{Button:"button",Tab:"tab",Selector:"selector"},"default",0,n8,"posthog",0,n8,"severityLevels",0,["fatal","error","warning","log","info","debug"]])}]);
@@ -0,0 +1,31 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13884,(e,t,r)=>{"use strict";var n=e.r(62174);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(o(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal"),a=Symbol.for("react.optimistic_key"),c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,r.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==n?null:n===a?a:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},r.flushSync=function(e){var t=c.T,r=u.p;try{if(c.T=null,u.p=2,e)return e()}finally{c.T=t,u.p=r,u.d.f()}},r.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,u.d.C(e,t))},r.prefetchDNS=function(e){"string"==typeof e&&u.d.D(e)},r.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,n=l(r,t.crossOrigin),o="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?u.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:n,integrity:o,fetchPriority:i}):"script"===r&&u.d.X(e,{crossOrigin:n,integrity:o,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},r.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=l(t.as,t.crossOrigin);u.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&u.d.M(e)},r.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,n=l(r,t.crossOrigin);u.d.L(e,r,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},r.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=l(t.as,t.crossOrigin);u.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else u.d.m(e)},r.requestFormReset=function(e){u.d.r(e)},r.unstable_batchedUpdates=function(e,t){return e(t)},r.useFormState=function(e,t,r){return c.H.useFormState(e,t,r)},r.useFormStatus=function(){return c.H.useHostTransitionStatus()},r.version="19.3.0-canary-3f0b9e61-20260317"},19101,(e,t,r)=>{"use strict";!function e(){if("u">typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),t.exports=e.r(13884)},36114,(e,t,r)=>{"use strict";let n;Object.defineProperty(r,"__esModule",{value:!0});var o={getAssetToken:function(){return a},getAssetTokenQuery:function(){return c},getDeploymentId:function(){return u},getDeploymentIdQuery:function(){return s}};for(var i in o)Object.defineProperty(r,i,{enumerable:!0,get:o[i]});function u(){return n}function s(e=!1){let t=n;return t?`${e?"&":"?"}dpl=${t}`:""}function a(){return!1}function c(e=!1){return""}"u">typeof window?(n=document.documentElement.dataset.dplId,delete document.documentElement.dataset.dplId):n=void 0},40594,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={BailoutToCSRError:function(){return u},isBailoutToCSRError:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i="BAILOUT_TO_CLIENT_SIDE_RENDERING";class u extends Error{constructor(e){super(`Bail out to client-side rendering: ${e}`),this.reason=e,this.digest=i}}function s(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===i}},59023,(e,t,r)=>{var n={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var a=[],c=!1,l=-1;function f(){c&&n&&(c=!1,n.length?a=n.concat(a):l=-1,a.length&&d())}function d(){if(!c){var e=s(f);c=!0;for(var t=a.length;t;){for(n=a,a=[];++l<t;)n&&n[l].run();l=-1,t=a.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];a.push(new p(e,t)),1!==a.length||c||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},u=!0;try{n[e](r,r.exports,i),u=!1}finally{u&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/next@16.2.5_@opentelemetry+api@1.9.1_@playwright+test@1.59.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/process/",t.exports=i(229)},6862,(e,t,r)=>{"use strict";var n,o;t.exports=(null==(n=e.g.process)?void 0:n.env)&&"object"==typeof(null==(o=e.g.process)?void 0:o.env)?e.g.process:e.r(59023)},38923,(e,t,r)=>{"use strict";var n=Symbol.for("react.transitional.element");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return{$$typeof:n,type:e,key:o,ref:void 0!==(t=r.ref)?t:null,props:r}}r.Fragment=Symbol.for("react.fragment"),r.jsx=o,r.jsxs=o},17580,(e,t,r)=>{"use strict";t.exports=e.r(38923)},90499,(e,t,r)=>{"use strict";var n=e.i(6862),o=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),h=Symbol.for("react.view_transition"),b=Symbol.iterator,v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,_={};function x(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||v}function S(){}function O(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||v}x.prototype.isReactComponent={},x.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},x.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=x.prototype;var E=O.prototype=new S;E.constructor=O,m(E,x.prototype),E.isPureReactComponent=!0;var j=Array.isArray;function T(){}var w={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function C(e,t,r){var n=r.ref;return{$$typeof:o,type:e,key:t,ref:void 0!==n?n:null,props:r}}function A(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var k=/\/+/g;function H(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function P(e,t,r){if(null==e)return e;var n=[],u=0;return!function e(t,r,n,u,s){var a,c,l,f=typeof t;("undefined"===f||"boolean"===f)&&(t=null);var d=!1;if(null===t)d=!0;else switch(f){case"bigint":case"string":case"number":d=!0;break;case"object":switch(t.$$typeof){case o:case i:d=!0;break;case y:return e((d=t._init)(t._payload),r,n,u,s)}}if(d)return s=s(t),d=""===u?"."+H(t,0):u,j(s)?(n="",null!=d&&(n=d.replace(k,"$&/")+"/"),e(s,r,n,"",function(e){return e})):null!=s&&(A(s)&&(a=s,c=n+(null==s.key||t&&t.key===s.key?"":(""+s.key).replace(k,"$&/")+"/")+d,s=C(a.type,c,a.props)),r.push(s)),1;d=0;var p=""===u?".":u+":";if(j(t))for(var g=0;g<t.length;g++)f=p+H(u=t[g],g),d+=e(u,r,n,f,s);else if("function"==typeof(g=null===(l=t)||"object"!=typeof l?null:"function"==typeof(l=b&&l[b]||l["@@iterator"])?l:null))for(t=g.call(t),g=0;!(u=t.next()).done;)f=p+H(u=u.value,g++),d+=e(u,r,n,f,s);else if("object"===f){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(T,T):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),r,n,u,s);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(r=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return d}(e,n,"","",function(e){return t.call(r,e,u++)}),n}function I(e){if(-1===e._status){var t=(0,e._result)();t.then(function(r){(0===e._status||-1===e._status)&&(e._status=1,e._result=r,void 0===t.status&&(t.status="fulfilled",t.value=r))},function(r){(0===e._status||-1===e._status)&&(e._status=2,e._result=r,void 0===t.status&&(t.status="rejected",t.reason=r))}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var M="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof n.default&&"function"==typeof n.default.emit)return void n.default.emit("uncaughtException",e);console.error(e)};function L(e){var t=w.T,r={};r.types=null!==t?t.types:null,w.T=r;try{var n=e(),o=w.S;null!==o&&o(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(T,M)}catch(e){M(e)}finally{null!==t&&null!==r.types&&(t.types=r.types),w.T=t}}function N(e){var t=w.T;if(null!==t){var r=t.types;null===r?t.types=[e]:-1===r.indexOf(e)&&r.push(e)}else L(N.bind(null,e))}r.Activity=g,r.Children={map:P,forEach:function(e,t,r){P(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},r.Component=x,r.Fragment=u,r.Profiler=a,r.PureComponent=O,r.StrictMode=s,r.Suspense=d,r.ViewTransition=h,r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,r.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},r.addTransitionType=N,r.cache=function(e){return function(){return e.apply(null,arguments)}},r.cacheSignal=function(){return null},r.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=m({},e.props),o=e.key;if(null!=t)for(i in void 0!==t.key&&(o=""+t.key),t)R.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&("ref"!==i||void 0!==t.ref)&&(n[i]=t[i]);var i=arguments.length-2;if(1===i)n.children=r;else if(1<i){for(var u=Array(i),s=0;s<i;s++)u[s]=arguments[s+2];n.children=u}return C(e.type,o,n)},r.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:c,_context:e},e},r.createElement=function(e,t,r){var n,o={},i=null;if(null!=t)for(n in void 0!==t.key&&(i=""+t.key),t)R.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(o[n]=t[n]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var s=Array(u),a=0;a<u;a++)s[a]=arguments[a+2];o.children=s}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===o[n]&&(o[n]=u[n]);return C(e,i,o)},r.createRef=function(){return{current:null}},r.forwardRef=function(e){return{$$typeof:f,render:e}},r.isValidElement=A,r.lazy=function(e){return{$$typeof:y,_payload:{_status:-1,_result:e},_init:I}},r.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},r.startTransition=L,r.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},r.use=function(e){return w.H.use(e)},r.useActionState=function(e,t,r){return w.H.useActionState(e,t,r)},r.useCallback=function(e,t){return w.H.useCallback(e,t)},r.useContext=function(e){return w.H.useContext(e)},r.useDebugValue=function(){},r.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},r.useEffect=function(e,t){return w.H.useEffect(e,t)},r.useEffectEvent=function(e){return w.H.useEffectEvent(e)},r.useId=function(){return w.H.useId()},r.useImperativeHandle=function(e,t,r){return w.H.useImperativeHandle(e,t,r)},r.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},r.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},r.useMemo=function(e,t){return w.H.useMemo(e,t)},r.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},r.useReducer=function(e,t,r){return w.H.useReducer(e,t,r)},r.useRef=function(e){return w.H.useRef(e)},r.useState=function(e){return w.H.useState(e)},r.useSyncExternalStore=function(e,t,r){return w.H.useSyncExternalStore(e,t,r)},r.useTransition=function(){return w.H.useTransition()},r.version="19.3.0-canary-3f0b9e61-20260317"},62174,(e,t,r)=>{"use strict";t.exports=e.r(90499)},81258,(e,t,r)=>{"use strict";r._=function(e){return e&&e.__esModule?e:{default:e}}},45729,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return c},createAsyncLocalStorage:function(){return a},createSnapshot:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class u{disable(){throw i}getStore(){}run(){throw i}exit(){throw i}enterWith(){throw i}static bind(e){return e}}let s="u">typeof globalThis&&globalThis.AsyncLocalStorage;function a(){return s?new s:new u}function c(e){return s?s.bind(e):u.bind(e)}function l(){return s?s.snapshot():function(e,...t){return e(...t)}}},59926,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(45729).createAsyncLocalStorage)()},45891,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=e.r(59926)},29561,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"handleISRError",{enumerable:!0,get:function(){return o}});let n="u"<typeof window?e.r(45891).workAsyncStorage:void 0;function o({error:e}){if(n){let t=n.getStore();if(t?.isStaticGeneration)throw e&&console.error(e),e}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},87667,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={WarningIcon:function(){return a},errorStyles:function(){return u},errorThemeCss:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});e.r(81258);let i=e.r(17580);e.r(62174);let u={container:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},card:{marginTop:"-32px",maxWidth:"325px",padding:"32px 28px",textAlign:"left"},icon:{marginBottom:"24px"},title:{fontSize:"24px",fontWeight:500,letterSpacing:"-0.02em",lineHeight:"32px",margin:"0 0 12px 0",color:"var(--next-error-title)"},message:{fontSize:"14px",fontWeight:400,lineHeight:"21px",margin:"0 0 20px 0",color:"var(--next-error-message)"},form:{margin:0},buttonGroup:{display:"flex",gap:"8px",alignItems:"center"},button:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"32px",padding:"0 12px",fontSize:"14px",fontWeight:500,lineHeight:"20px",borderRadius:"6px",cursor:"pointer",color:"var(--next-error-btn-text)",background:"var(--next-error-btn-bg)",border:"var(--next-error-btn-border)"},buttonSecondary:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"32px",padding:"0 12px",fontSize:"14px",fontWeight:500,lineHeight:"20px",borderRadius:"6px",cursor:"pointer",color:"var(--next-error-btn-secondary-text)",background:"var(--next-error-btn-secondary-bg)",border:"var(--next-error-btn-secondary-border)"},digestFooter:{position:"fixed",bottom:"32px",left:"0",right:"0",textAlign:"center",fontFamily:'ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace',fontSize:"12px",lineHeight:"18px",fontWeight:400,margin:"0",color:"var(--next-error-digest)"}},s=`
2
+ :root {
3
+ --next-error-bg: #fff;
4
+ --next-error-text: #171717;
5
+ --next-error-title: #171717;
6
+ --next-error-message: #171717;
7
+ --next-error-digest: #666666;
8
+ --next-error-btn-text: #fff;
9
+ --next-error-btn-bg: #171717;
10
+ --next-error-btn-border: none;
11
+ --next-error-btn-secondary-text: #171717;
12
+ --next-error-btn-secondary-bg: transparent;
13
+ --next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);
14
+ }
15
+ @media (prefers-color-scheme: dark) {
16
+ :root {
17
+ --next-error-bg: #0a0a0a;
18
+ --next-error-text: #ededed;
19
+ --next-error-title: #ededed;
20
+ --next-error-message: #ededed;
21
+ --next-error-digest: #a0a0a0;
22
+ --next-error-btn-text: #0a0a0a;
23
+ --next-error-btn-bg: #ededed;
24
+ --next-error-btn-border: none;
25
+ --next-error-btn-secondary-text: #ededed;
26
+ --next-error-btn-secondary-bg: transparent;
27
+ --next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);
28
+ }
29
+ }
30
+ body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }
31
+ `.replace(/\n\s*/g,"");function a(){return(0,i.jsx)("svg",{width:"32",height:"32",viewBox:"-0.2 -1.5 32 32",fill:"none",style:u.icon,children:(0,i.jsx)("path",{d:"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z",fill:"var(--next-error-title)"})})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},23091,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return u}}),e.r(81258);let n=e.r(17580);e.r(62174);let o=e.r(29561),i=e.r(87667),u=function({error:e}){let t=e?.digest,r=!!t;return(0,o.handleISRError)({error:e}),(0,n.jsxs)("html",{id:"__next_error__",children:[(0,n.jsx)("head",{children:(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:i.errorThemeCss}})}),(0,n.jsxs)("body",{children:[(0,n.jsx)("div",{style:i.errorStyles.container,children:(0,n.jsxs)("div",{style:i.errorStyles.card,children:[(0,n.jsx)(i.WarningIcon,{}),(0,n.jsx)("h1",{style:i.errorStyles.title,children:"This page couldn’t load"}),(0,n.jsx)("p",{style:i.errorStyles.message,children:r?"A server error occurred. Reload to try again.":"Reload to try again, or go back."}),(0,n.jsxs)("div",{style:i.errorStyles.buttonGroup,children:[(0,n.jsx)("form",{style:i.errorStyles.form,children:(0,n.jsx)("button",{type:"submit",style:i.errorStyles.button,children:"Reload"})}),!r&&(0,n.jsx)("button",{type:"button",style:i.errorStyles.buttonSecondary,onClick:()=>{window.history.length>1?window.history.back():window.location.href="/"},children:"Back"})]})]})}),t&&(0,n.jsxs)("p",{style:i.errorStyles.digestFooter,children:["ERROR ",t]})]})]})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);