@firefox-devtools/profiler-cli 0.1.0-alpha.2 → 0.1.0-alpha.4

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.
@@ -2,34 +2,34 @@
2
2
 
3
3
  // Polyfill browser globals for Node.js
4
4
  globalThis.self = globalThis;
5
- "use strict";var rR=Object.create;var Sf=Object.defineProperty;var nR=Object.getOwnPropertyDescriptor;var oR=Object.getOwnPropertyNames;var aR=Object.getPrototypeOf,iR=Object.prototype.hasOwnProperty;var No=(e,t)=>()=>(e&&(t=e(e=0)),t);var O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qy=(e,t)=>{for(var r in t)Sf(e,r,{get:t[r],enumerable:!0})},sR=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of oR(t))!iR.call(e,o)&&o!==r&&Sf(e,o,{get:()=>t[o],enumerable:!(n=nR(t,o))||n.enumerable});return e};var ce=(e,t,r)=>(r=e!=null?rR(aR(e)):{},sR(t||!e||!e.__esModule?Sf(r,"default",{value:e,enumerable:!0}):r,e));var Bi=O(If=>{var Zl=class extends Error{constructor(t,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},xf=class extends Zl{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};If.CommanderError=Zl;If.InvalidArgumentError=xf});var Jl=O(wf=>{var{InvalidArgumentError:lR}=Bi(),vf=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new lR(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function cR(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}wf.Argument=vf;wf.humanReadableArgName=cR});var Cf=O(_f=>{var{humanReadableArgName:uR}=Jl(),kf=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(o=>!o._hidden),n=t._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((o,a)=>o.name().localeCompare(a.name())),r}compareOptions(t,r){let n=o=>o.short?o.short.replace(/^-/,""):o.long.replace(/^--/,"");return n(t).localeCompare(n(r))}visibleOptions(t){let r=t.options.filter(o=>!o.hidden),n=t._getHelpOption();if(n&&!n.hidden){let o=n.short&&t._findOption(n.short),a=n.long&&t._findOption(n.long);!o&&!a?r.push(n):n.long&&!a?r.push(t.createOption(n.long,n.description)):n.short&&!o&&r.push(t.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let n=t.parent;n;n=n.parent){let o=n.options.filter(a=>!a.hidden);r.push(...o)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(n=>uR(n)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((n,o)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(o)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((n,o)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(o)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((n,o)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(o)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((n,o)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(o)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let n="";for(let o=t.parent;o;o=o.parent)n=o.name()+" "+n;return n+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}formatItemList(t,r,n){return r.length===0?[]:[n.styleTitle(t),...r,""]}groupItems(t,r,n){let o=new Map;return t.forEach(a=>{let i=n(a);o.has(i)||o.set(i,[])}),r.forEach(a=>{let i=n(a);o.has(i)||o.set(i,[]),o.get(i).push(a)}),o}formatHelp(t,r){let n=r.padWidth(t,r),o=r.helpWidth??80;function a(d,f){return r.formatItem(d,n,f,r)}let i=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],s=r.commandDescription(t);s.length>0&&(i=i.concat([r.boxWrap(r.styleCommandDescription(s),o),""]));let l=r.visibleArguments(t).map(d=>a(r.styleArgumentTerm(r.argumentTerm(d)),r.styleArgumentDescription(r.argumentDescription(d))));if(i=i.concat(this.formatItemList("Arguments:",l,r)),this.groupItems(t.options,r.visibleOptions(t),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let p=d.map(h=>a(r.styleOptionTerm(r.optionTerm(h)),r.styleOptionDescription(r.optionDescription(h))));i=i.concat(this.formatItemList(f,p,r))}),r.showGlobalOptions){let d=r.visibleGlobalOptions(t).map(f=>a(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));i=i.concat(this.formatItemList("Global Options:",d,r))}return this.groupItems(t.commands,r.visibleCommands(t),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let p=d.map(h=>a(r.styleSubcommandTerm(r.subcommandTerm(h)),r.styleSubcommandDescription(r.subcommandDescription(h))));i=i.concat(this.formatItemList(f,p,r))}),i.join(`
6
- `)}displayWidth(t){return zy(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,n,o){let i=" ".repeat(2);if(!n)return i+t;let s=t.padEnd(r+t.length-o.displayWidth(t)),l=2,u=(this.helpWidth??80)-r-l-2,d;return u<this.minWidthToWrap||o.preformatted(n)?d=n:d=o.boxWrap(n,u).replace(/\n/g,`
5
+ "use strict";var sR=Object.create;var vf=Object.defineProperty;var lR=Object.getOwnPropertyDescriptor;var cR=Object.getOwnPropertyNames;var uR=Object.getPrototypeOf,dR=Object.prototype.hasOwnProperty;var No=(e,t)=>()=>(e&&(t=e(e=0)),t);var O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zy=(e,t)=>{for(var r in t)vf(e,r,{get:t[r],enumerable:!0})},fR=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of cR(t))!dR.call(e,o)&&o!==r&&vf(e,o,{get:()=>t[o],enumerable:!(n=lR(t,o))||n.enumerable});return e};var ce=(e,t,r)=>(r=e!=null?sR(uR(e)):{},fR(t||!e||!e.__esModule?vf(r,"default",{value:e,enumerable:!0}):r,e));var $i=O(kf=>{var Jl=class extends Error{constructor(t,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},wf=class extends Jl{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};kf.CommanderError=Jl;kf.InvalidArgumentError=wf});var Yl=O(Cf=>{var{InvalidArgumentError:pR}=$i(),_f=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new pR(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function hR(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}Cf.Argument=_f;Cf.humanReadableArgName=hR});var Af=O(Nf=>{var{humanReadableArgName:mR}=Yl(),Ef=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(o=>!o._hidden),n=t._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((o,a)=>o.name().localeCompare(a.name())),r}compareOptions(t,r){let n=o=>o.short?o.short.replace(/^-/,""):o.long.replace(/^--/,"");return n(t).localeCompare(n(r))}visibleOptions(t){let r=t.options.filter(o=>!o.hidden),n=t._getHelpOption();if(n&&!n.hidden){let o=n.short&&t._findOption(n.short),a=n.long&&t._findOption(n.long);!o&&!a?r.push(n):n.long&&!a?r.push(t.createOption(n.long,n.description)):n.short&&!o&&r.push(t.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let n=t.parent;n;n=n.parent){let o=n.options.filter(a=>!a.hidden);r.push(...o)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(n=>mR(n)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((n,o)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(o)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((n,o)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(o)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((n,o)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(o)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((n,o)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(o)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let n="";for(let o=t.parent;o;o=o.parent)n=o.name()+" "+n;return n+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}formatItemList(t,r,n){return r.length===0?[]:[n.styleTitle(t),...r,""]}groupItems(t,r,n){let o=new Map;return t.forEach(a=>{let i=n(a);o.has(i)||o.set(i,[])}),r.forEach(a=>{let i=n(a);o.has(i)||o.set(i,[]),o.get(i).push(a)}),o}formatHelp(t,r){let n=r.padWidth(t,r),o=r.helpWidth??80;function a(d,f){return r.formatItem(d,n,f,r)}let i=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],s=r.commandDescription(t);s.length>0&&(i=i.concat([r.boxWrap(r.styleCommandDescription(s),o),""]));let l=r.visibleArguments(t).map(d=>a(r.styleArgumentTerm(r.argumentTerm(d)),r.styleArgumentDescription(r.argumentDescription(d))));if(i=i.concat(this.formatItemList("Arguments:",l,r)),this.groupItems(t.options,r.visibleOptions(t),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let p=d.map(h=>a(r.styleOptionTerm(r.optionTerm(h)),r.styleOptionDescription(r.optionDescription(h))));i=i.concat(this.formatItemList(f,p,r))}),r.showGlobalOptions){let d=r.visibleGlobalOptions(t).map(f=>a(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));i=i.concat(this.formatItemList("Global Options:",d,r))}return this.groupItems(t.commands,r.visibleCommands(t),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let p=d.map(h=>a(r.styleSubcommandTerm(r.subcommandTerm(h)),r.styleSubcommandDescription(r.subcommandDescription(h))));i=i.concat(this.formatItemList(f,p,r))}),i.join(`
6
+ `)}displayWidth(t){return Jy(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,n,o){let i=" ".repeat(2);if(!n)return i+t;let s=t.padEnd(r+t.length-o.displayWidth(t)),l=2,u=(this.helpWidth??80)-r-l-2,d;return u<this.minWidthToWrap||o.preformatted(n)?d=n:d=o.boxWrap(n,u).replace(/\n/g,`
7
7
  `+" ".repeat(r+l)),i+s+" ".repeat(l)+d.replace(/\n/g,`
8
8
  ${i}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let n=t.split(/\r\n|\n/),o=/[\s]*[^\s]+/g,a=[];return n.forEach(i=>{let s=i.match(o);if(s===null){a.push("");return}let l=[s.shift()],c=this.displayWidth(l[0]);s.forEach(u=>{let d=this.displayWidth(u);if(c+d<=r){l.push(u),c+=d;return}a.push(l.join(""));let f=u.trimStart();l=[f],c=this.displayWidth(f)}),a.push(l.join(""))}),a.join(`
9
- `)}};function zy(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}_f.Help=kf;_f.stripColor=zy});var Pf=O(Af=>{var{InvalidArgumentError:dR}=Bi(),Ef=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let n=fR(t);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new dR(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Ky(this.name().replace(/^no-/,"")):Ky(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Nf=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(t,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let o=this.negativeOptions.get(n).presetArg,a=o!==void 0?o:!1;return r.negate===(a===t)}};function Ky(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function fR(e){let t,r,n=/^-[^-]$/,o=/^--[^-]/,a=e.split(/[ |,]+/).concat("guard");if(n.test(a[0])&&(t=a.shift()),o.test(a[0])&&(r=a.shift()),!t&&n.test(a[0])&&(t=a.shift()),!t&&o.test(a[0])&&(t=r,r=a.shift()),a[0].startsWith("-")){let i=a[0],s=`option creation failed due to '${i}' in option flags '${e}'`;throw/^-[^-][^-]/.test(i)?new Error(`${s}
9
+ `)}};function Jy(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Nf.Help=Ef;Nf.stripColor=Jy});var Ff=O(Mf=>{var{InvalidArgumentError:gR}=$i(),Pf=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let n=yR(t);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new gR(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Yy(this.name().replace(/^no-/,"")):Yy(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Rf=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(t,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let o=this.negativeOptions.get(n).presetArg,a=o!==void 0?o:!1;return r.negate===(a===t)}};function Yy(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function yR(e){let t,r,n=/^-[^-]$/,o=/^--[^-]/,a=e.split(/[ |,]+/).concat("guard");if(n.test(a[0])&&(t=a.shift()),o.test(a[0])&&(r=a.shift()),!t&&n.test(a[0])&&(t=a.shift()),!t&&o.test(a[0])&&(t=r,r=a.shift()),a[0].startsWith("-")){let i=a[0],s=`option creation failed due to '${i}' in option flags '${e}'`;throw/^-[^-][^-]/.test(i)?new Error(`${s}
10
10
  - a short flag is a single dash and a single character
11
11
  - either use a single dash and a single character (for a short flag)
12
12
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(i)?new Error(`${s}
13
13
  - too many short flags`):o.test(i)?new Error(`${s}
14
14
  - too many long flags`):new Error(`${s}
15
- - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}Af.Option=Ef;Af.DualOptions=Nf});var Jy=O(Zy=>{function pR(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let n=0;n<=e.length;n++)r[n]=[n];for(let n=0;n<=t.length;n++)r[0][n]=n;for(let n=1;n<=t.length;n++)for(let o=1;o<=e.length;o++){let a=1;e[o-1]===t[n-1]?a=0:a=1,r[o][n]=Math.min(r[o-1][n]+1,r[o][n-1]+1,r[o-1][n-1]+a),o>1&&n>1&&e[o-1]===t[n-2]&&e[o-2]===t[n-1]&&(r[o][n]=Math.min(r[o][n],r[o-2][n-2]+1))}return r[e.length][t.length]}function hR(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(i=>i.slice(2)));let n=[],o=3,a=.4;return t.forEach(i=>{if(i.length<=1)return;let s=pR(e,i),l=Math.max(e.length,i.length);(l-s)/l>a&&(s<o?(o=s,n=[i]):s===o&&n.push(i))}),n.sort((i,s)=>i.localeCompare(s)),r&&(n=n.map(i=>`--${i}`)),n.length>1?`
15
+ - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}Mf.Option=Pf;Mf.DualOptions=Rf});var Qy=O(Xy=>{function bR(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let n=0;n<=e.length;n++)r[n]=[n];for(let n=0;n<=t.length;n++)r[0][n]=n;for(let n=1;n<=t.length;n++)for(let o=1;o<=e.length;o++){let a=1;e[o-1]===t[n-1]?a=0:a=1,r[o][n]=Math.min(r[o-1][n]+1,r[o][n-1]+1,r[o-1][n-1]+a),o>1&&n>1&&e[o-1]===t[n-2]&&e[o-2]===t[n-1]&&(r[o][n]=Math.min(r[o][n],r[o-2][n-2]+1))}return r[e.length][t.length]}function TR(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(i=>i.slice(2)));let n=[],o=3,a=.4;return t.forEach(i=>{if(i.length<=1)return;let s=bR(e,i),l=Math.max(e.length,i.length);(l-s)/l>a&&(s<o?(o=s,n=[i]):s===o&&n.push(i))}),n.sort((i,s)=>i.localeCompare(s)),r&&(n=n.map(i=>`--${i}`)),n.length>1?`
16
16
  (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
17
- (Did you mean ${n[0]}?)`:""}Zy.suggestSimilar=hR});var eb=O(Lf=>{var mR=require("node:events").EventEmitter,Rf=require("node:child_process"),Tn=require("node:path"),Yl=require("node:fs"),Ue=require("node:process"),{Argument:gR,humanReadableArgName:yR}=Jl(),{CommanderError:Mf}=Bi(),{Help:bR,stripColor:TR}=Cf(),{Option:Yy,DualOptions:SR}=Pf(),{suggestSimilar:Xy}=Jy(),Ff=class e extends mR{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>Ue.stdout.write(r),writeErr:r=>Ue.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>Ue.stdout.isTTY?Ue.stdout.columns:void 0,getErrHelpWidth:()=>Ue.stderr.isTTY?Ue.stderr.columns:void 0,getOutHasColors:()=>{var r,n;return Of()??(Ue.stdout.isTTY&&((n=(r=Ue.stdout).hasColors)==null?void 0:n.call(r)))},getErrHasColors:()=>{var r,n;return Of()??(Ue.stderr.isTTY&&((n=(r=Ue.stderr).hasColors)==null?void 0:n.call(r)))},stripColor:r=>TR(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,n){let o=r,a=n;typeof o=="object"&&o!==null&&(a=o,o=null),a=a||{};let[,i,s]=t.match(/([^ ]+) *(.*)/),l=this.createCommand(i);return o&&(l.description(o),l._executableHandler=!0),a.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(a.noHelp||a.hidden),l._executableFile=a.executableFile||null,s&&l.arguments(s),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),o?this:l}createCommand(t){return new e(t)}createHelp(){return Object.assign(new bR,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
18
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new gR(t,r)}argument(t,r,n,o){let a=this.createArgument(t,r);return typeof n=="function"?a.default(o).argParser(n):a.default(n),this.addArgument(a),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r!=null&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=t??"help [command]",[,o,a]=n.match(/([^ ]+) *(.*)/),i=r??"display help for command",s=this.createCommand(o);return s.helpOption(!1),a&&s.arguments(a),i&&s.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=s,(t||r)&&this._initCommandGroup(s),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
19
- Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,n){this._exitCallback&&this._exitCallback(new Mf(t,r,n)),Ue.exit(t)}action(t){let r=n=>{let o=this.registeredArguments.length,a=n.slice(0,o);return this._storeOptionsAsProperties?a[o]=this:a[o]=this.opts(),a.push(this),t.apply(this,a)};return this._actionHandler=r,this}createOption(t,r){return new Yy(t,r)}_callParseArg(t,r,n,o){try{return t.parseArg(r,n)}catch(a){if(a.code==="commander.invalidArgument"){let i=`${o} ${a.message}`;this.error(i,{exitCode:a.exitCode,code:a.code})}throw a}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let n=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
20
- - already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=o=>[o.name()].concat(o.aliases()),n=r(t).find(o=>this._findCommand(o));if(n){let o=r(this._findCommand(n)).join("|"),a=r(t).join("|");throw new Error(`cannot add command '${a}' as already have command '${o}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),n=t.attributeName();if(t.negate){let a=t.long.replace(/^--no-/,"--");this._findOption(a)||this.setOptionValueWithSource(n,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(n,t.defaultValue,"default");let o=(a,i,s)=>{a==null&&t.presetArg!==void 0&&(a=t.presetArg);let l=this.getOptionValue(n);a!==null&&t.parseArg?a=this._callParseArg(t,a,l,i):a!==null&&t.variadic&&(a=t._collectValue(a,l)),a==null&&(t.negate?a=!1:t.isBoolean()||t.optional?a=!0:a=""),this.setOptionValueWithSource(n,a,s)};return this.on("option:"+r,a=>{let i=`error: option '${t.flags}' argument '${a}' is invalid.`;o(a,i,"cli")}),t.envVar&&this.on("optionEnv:"+r,a=>{let i=`error: option '${t.flags}' value '${a}' from env '${t.envVar}' is invalid.`;o(a,i,"env")}),this}_optionEx(t,r,n,o,a){if(typeof r=="object"&&r instanceof Yy)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let i=this.createOption(r,n);if(i.makeOptionMandatory(!!t.mandatory),typeof o=="function")i.default(a).argParser(o);else if(o instanceof RegExp){let s=o;o=(l,c)=>{let u=s.exec(l);return u?u[0]:c},i.default(a).argParser(o)}else i.default(o);return this.addOption(i)}option(t,r,n,o){return this._optionEx({},t,r,n,o)}requiredOption(t,r,n,o){return this._optionEx({mandatory:!0},t,r,n,o)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,n){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=n,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(t)!==void 0&&(r=n.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){var o;if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){(o=Ue.versions)!=null&&o.electron&&(r.from="electron");let a=Ue.execArgv??[];(a.includes("-e")||a.includes("--eval")||a.includes("-p")||a.includes("--print"))&&(r.from="eval")}t===void 0&&(t=Ue.argv),this.rawArgs=t.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=t[1],n=t.slice(2);break;case"electron":Ue.defaultApp?(this._scriptPath=t[1],n=t.slice(2)):n=t.slice(1);break;case"user":n=t.slice(0);break;case"eval":n=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(t,r){this._prepareForParse();let n=this._prepareUserArgs(t,r);return this._parseCommand([],n),this}async parseAsync(t,r){this._prepareForParse();let n=this._prepareUserArgs(t,r);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
21
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,n){if(Yl.existsSync(t))return;let o=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",a=`'${t}' does not exist
17
+ (Did you mean ${n[0]}?)`:""}Xy.suggestSimilar=TR});var nb=O(Uf=>{var SR=require("node:events").EventEmitter,Of=require("node:child_process"),Tn=require("node:path"),Xl=require("node:fs"),Ue=require("node:process"),{Argument:xR,humanReadableArgName:IR}=Yl(),{CommanderError:Lf}=$i(),{Help:vR,stripColor:wR}=Af(),{Option:eb,DualOptions:kR}=Ff(),{suggestSimilar:tb}=Qy(),Df=class e extends SR{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>Ue.stdout.write(r),writeErr:r=>Ue.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>Ue.stdout.isTTY?Ue.stdout.columns:void 0,getErrHelpWidth:()=>Ue.stderr.isTTY?Ue.stderr.columns:void 0,getOutHasColors:()=>{var r,n;return Bf()??(Ue.stdout.isTTY&&((n=(r=Ue.stdout).hasColors)==null?void 0:n.call(r)))},getErrHasColors:()=>{var r,n;return Bf()??(Ue.stderr.isTTY&&((n=(r=Ue.stderr).hasColors)==null?void 0:n.call(r)))},stripColor:r=>wR(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,n){let o=r,a=n;typeof o=="object"&&o!==null&&(a=o,o=null),a=a||{};let[,i,s]=t.match(/([^ ]+) *(.*)/),l=this.createCommand(i);return o&&(l.description(o),l._executableHandler=!0),a.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(a.noHelp||a.hidden),l._executableFile=a.executableFile||null,s&&l.arguments(s),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),o?this:l}createCommand(t){return new e(t)}createHelp(){return Object.assign(new vR,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
18
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new xR(t,r)}argument(t,r,n,o){let a=this.createArgument(t,r);return typeof n=="function"?a.default(o).argParser(n):a.default(n),this.addArgument(a),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r!=null&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=t??"help [command]",[,o,a]=n.match(/([^ ]+) *(.*)/),i=r??"display help for command",s=this.createCommand(o);return s.helpOption(!1),a&&s.arguments(a),i&&s.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=s,(t||r)&&this._initCommandGroup(s),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
19
+ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,n){this._exitCallback&&this._exitCallback(new Lf(t,r,n)),Ue.exit(t)}action(t){let r=n=>{let o=this.registeredArguments.length,a=n.slice(0,o);return this._storeOptionsAsProperties?a[o]=this:a[o]=this.opts(),a.push(this),t.apply(this,a)};return this._actionHandler=r,this}createOption(t,r){return new eb(t,r)}_callParseArg(t,r,n,o){try{return t.parseArg(r,n)}catch(a){if(a.code==="commander.invalidArgument"){let i=`${o} ${a.message}`;this.error(i,{exitCode:a.exitCode,code:a.code})}throw a}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let n=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
20
+ - already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=o=>[o.name()].concat(o.aliases()),n=r(t).find(o=>this._findCommand(o));if(n){let o=r(this._findCommand(n)).join("|"),a=r(t).join("|");throw new Error(`cannot add command '${a}' as already have command '${o}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),n=t.attributeName();if(t.negate){let a=t.long.replace(/^--no-/,"--");this._findOption(a)||this.setOptionValueWithSource(n,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(n,t.defaultValue,"default");let o=(a,i,s)=>{a==null&&t.presetArg!==void 0&&(a=t.presetArg);let l=this.getOptionValue(n);a!==null&&t.parseArg?a=this._callParseArg(t,a,l,i):a!==null&&t.variadic&&(a=t._collectValue(a,l)),a==null&&(t.negate?a=!1:t.isBoolean()||t.optional?a=!0:a=""),this.setOptionValueWithSource(n,a,s)};return this.on("option:"+r,a=>{let i=`error: option '${t.flags}' argument '${a}' is invalid.`;o(a,i,"cli")}),t.envVar&&this.on("optionEnv:"+r,a=>{let i=`error: option '${t.flags}' value '${a}' from env '${t.envVar}' is invalid.`;o(a,i,"env")}),this}_optionEx(t,r,n,o,a){if(typeof r=="object"&&r instanceof eb)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let i=this.createOption(r,n);if(i.makeOptionMandatory(!!t.mandatory),typeof o=="function")i.default(a).argParser(o);else if(o instanceof RegExp){let s=o;o=(l,c)=>{let u=s.exec(l);return u?u[0]:c},i.default(a).argParser(o)}else i.default(o);return this.addOption(i)}option(t,r,n,o){return this._optionEx({},t,r,n,o)}requiredOption(t,r,n,o){return this._optionEx({mandatory:!0},t,r,n,o)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,n){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=n,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(t)!==void 0&&(r=n.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){var o;if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){(o=Ue.versions)!=null&&o.electron&&(r.from="electron");let a=Ue.execArgv??[];(a.includes("-e")||a.includes("--eval")||a.includes("-p")||a.includes("--print"))&&(r.from="eval")}t===void 0&&(t=Ue.argv),this.rawArgs=t.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=t[1],n=t.slice(2);break;case"electron":Ue.defaultApp?(this._scriptPath=t[1],n=t.slice(2)):n=t.slice(1);break;case"user":n=t.slice(0);break;case"eval":n=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(t,r){this._prepareForParse();let n=this._prepareUserArgs(t,r);return this._parseCommand([],n),this}async parseAsync(t,r){this._prepareForParse();let n=this._prepareUserArgs(t,r);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
21
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,n){if(Xl.existsSync(t))return;let o=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",a=`'${t}' does not exist
22
22
  - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
23
23
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
24
- - ${o}`;throw new Error(a)}_executeSubCommand(t,r){r=r.slice();let n=!1,o=[".js",".ts",".tsx",".mjs",".cjs"];function a(u,d){let f=Tn.resolve(u,d);if(Yl.existsSync(f))return f;if(o.includes(Tn.extname(d)))return;let p=o.find(h=>Yl.existsSync(`${f}${h}`));if(p)return`${f}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=t._executableFile||`${this._name}-${t._name}`,s=this._executableDir||"";if(this._scriptPath){let u;try{u=Yl.realpathSync(this._scriptPath)}catch{u=this._scriptPath}s=Tn.resolve(Tn.dirname(u),s)}if(s){let u=a(s,i);if(!u&&!t._executableFile&&this._scriptPath){let d=Tn.basename(this._scriptPath,Tn.extname(this._scriptPath));d!==this._name&&(u=a(s,`${d}-${t._name}`))}i=u||i}n=o.includes(Tn.extname(i));let l;Ue.platform!=="win32"?n?(r.unshift(i),r=Qy(Ue.execArgv).concat(r),l=Rf.spawn(Ue.argv[0],r,{stdio:"inherit"})):l=Rf.spawn(i,r,{stdio:"inherit"}):(this._checkForMissingExecutable(i,s,t._name),r.unshift(i),r=Qy(Ue.execArgv).concat(r),l=Rf.spawn(Ue.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{Ue.on(d,()=>{l.killed===!1&&l.exitCode===null&&l.kill(d)})});let c=this._exitCallback;l.on("close",u=>{u=u??1,c?c(new Mf(u,"commander.executeSubCommandAsync","(close)")):Ue.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(i,s,t._name);else if(u.code==="EACCES")throw new Error(`'${i}' not executable`);if(!c)Ue.exit(1);else{let d=new Mf(1,"commander.executeSubCommandAsync","(error)");d.nestedError=u,c(d)}}),this.runningCommand=l}_dispatchSubcommand(t,r,n){let o=this._findCommand(t);o||this.help({error:!0}),o._prepareForParse();let a;return a=this._chainOrCallSubCommandHook(a,o,"preSubcommand"),a=this._chainOrCall(a,()=>{if(o._executableHandler)this._executeSubCommand(o,r.concat(n));else return o._parseCommand(r,n)}),a}_dispatchHelpCommand(t){var n,o;t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[((n=this._getHelpOption())==null?void 0:n.long)??((o=this._getHelpOption())==null?void 0:o.short)??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(n,o,a)=>{let i=o;if(o!==null&&n.parseArg){let s=`error: command-argument value '${o}' is invalid for argument '${n.name()}'.`;i=this._callParseArg(n,o,a,s)}return i};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,o)=>{let a=n.defaultValue;n.variadic?o<this.args.length?(a=this.args.slice(o),n.parseArg&&(a=a.reduce((i,s)=>t(n,s,i),n.defaultValue))):a===void 0&&(a=[]):o<this.args.length&&(a=this.args[o],n.parseArg&&(a=t(n,a,n.defaultValue))),r[o]=a}),this.processedArgs=r}_chainOrCall(t,r){return t!=null&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let n=t,o=[];return this._getCommandAndAncestors().reverse().filter(a=>a._lifeCycleHooks[r]!==void 0).forEach(a=>{a._lifeCycleHooks[r].forEach(i=>{o.push({hookedCommand:a,callback:i})})}),r==="postAction"&&o.reverse(),o.forEach(a=>{n=this._chainOrCall(n,()=>a.callback(a.hookedCommand,this))}),n}_chainOrCallSubCommandHook(t,r,n){let o=t;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(a=>{o=this._chainOrCall(o,()=>a(this,r))}),o}_parseCommand(t,r){var i;let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(n.operands),r=n.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},a=`command:${this.name()}`;if(this._actionHandler){o(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(a,t,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if((i=this.parent)!=null&&i.listenerCount(a))o(),this._processArguments(),this.parent.emit(a,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(o(),this._processArguments())}else this.commands.length?(o(),this.help({error:!0})):(o(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(n=>{let o=n.attributeName();return this.getOptionValue(o)===void 0?!1:this.getOptionValueSource(o)!=="default"});t.filter(n=>n.conflictsWith.length>0).forEach(n=>{let o=t.find(a=>n.conflictsWith.includes(a.attributeName()));o&&this._conflictingOption(n,o)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],n=[],o=r;function a(u){return u.length>1&&u[0]==="-"}let i=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(d=>d.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,s=null,l=null,c=0;for(;c<t.length||l;){let u=l??t[c++];if(l=null,u==="--"){o===n&&o.push(u),o.push(...t.slice(c));break}if(s&&(!a(u)||i(u))){this.emit(`option:${s.name()}`,u);continue}if(s=null,a(u)){let d=this._findOption(u);if(d){if(d.required){let f=t[c++];f===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,f)}else if(d.optional){let f=null;c<t.length&&(!a(t[c])||i(t[c]))&&(f=t[c++]),this.emit(`option:${d.name()}`,f)}else this.emit(`option:${d.name()}`);s=d.variadic?d:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let d=this._findOption(`-${u[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,u.slice(2)):(this.emit(`option:${d.name()}`),l=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let d=u.indexOf("="),f=this._findOption(u.slice(0,d));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,u.slice(d+1));continue}}if(o===r&&a(u)&&!(this.commands.length===0&&i(u))&&(o=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(u)){r.push(u),n.push(...t.slice(c));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u,...t.slice(c));break}else if(this._defaultCommandName){n.push(u,...t.slice(c));break}}if(this._passThroughOptions){o.push(u,...t.slice(c));break}o.push(u)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let n=0;n<r;n++){let o=this.options[n].attributeName();t[o]=o===this._versionOptionName?this._version:this[o]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
24
+ - ${o}`;throw new Error(a)}_executeSubCommand(t,r){r=r.slice();let n=!1,o=[".js",".ts",".tsx",".mjs",".cjs"];function a(u,d){let f=Tn.resolve(u,d);if(Xl.existsSync(f))return f;if(o.includes(Tn.extname(d)))return;let p=o.find(h=>Xl.existsSync(`${f}${h}`));if(p)return`${f}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=t._executableFile||`${this._name}-${t._name}`,s=this._executableDir||"";if(this._scriptPath){let u;try{u=Xl.realpathSync(this._scriptPath)}catch{u=this._scriptPath}s=Tn.resolve(Tn.dirname(u),s)}if(s){let u=a(s,i);if(!u&&!t._executableFile&&this._scriptPath){let d=Tn.basename(this._scriptPath,Tn.extname(this._scriptPath));d!==this._name&&(u=a(s,`${d}-${t._name}`))}i=u||i}n=o.includes(Tn.extname(i));let l;Ue.platform!=="win32"?n?(r.unshift(i),r=rb(Ue.execArgv).concat(r),l=Of.spawn(Ue.argv[0],r,{stdio:"inherit"})):l=Of.spawn(i,r,{stdio:"inherit"}):(this._checkForMissingExecutable(i,s,t._name),r.unshift(i),r=rb(Ue.execArgv).concat(r),l=Of.spawn(Ue.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{Ue.on(d,()=>{l.killed===!1&&l.exitCode===null&&l.kill(d)})});let c=this._exitCallback;l.on("close",u=>{u=u??1,c?c(new Lf(u,"commander.executeSubCommandAsync","(close)")):Ue.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(i,s,t._name);else if(u.code==="EACCES")throw new Error(`'${i}' not executable`);if(!c)Ue.exit(1);else{let d=new Lf(1,"commander.executeSubCommandAsync","(error)");d.nestedError=u,c(d)}}),this.runningCommand=l}_dispatchSubcommand(t,r,n){let o=this._findCommand(t);o||this.help({error:!0}),o._prepareForParse();let a;return a=this._chainOrCallSubCommandHook(a,o,"preSubcommand"),a=this._chainOrCall(a,()=>{if(o._executableHandler)this._executeSubCommand(o,r.concat(n));else return o._parseCommand(r,n)}),a}_dispatchHelpCommand(t){var n,o;t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[((n=this._getHelpOption())==null?void 0:n.long)??((o=this._getHelpOption())==null?void 0:o.short)??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(n,o,a)=>{let i=o;if(o!==null&&n.parseArg){let s=`error: command-argument value '${o}' is invalid for argument '${n.name()}'.`;i=this._callParseArg(n,o,a,s)}return i};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,o)=>{let a=n.defaultValue;n.variadic?o<this.args.length?(a=this.args.slice(o),n.parseArg&&(a=a.reduce((i,s)=>t(n,s,i),n.defaultValue))):a===void 0&&(a=[]):o<this.args.length&&(a=this.args[o],n.parseArg&&(a=t(n,a,n.defaultValue))),r[o]=a}),this.processedArgs=r}_chainOrCall(t,r){return t!=null&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let n=t,o=[];return this._getCommandAndAncestors().reverse().filter(a=>a._lifeCycleHooks[r]!==void 0).forEach(a=>{a._lifeCycleHooks[r].forEach(i=>{o.push({hookedCommand:a,callback:i})})}),r==="postAction"&&o.reverse(),o.forEach(a=>{n=this._chainOrCall(n,()=>a.callback(a.hookedCommand,this))}),n}_chainOrCallSubCommandHook(t,r,n){let o=t;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(a=>{o=this._chainOrCall(o,()=>a(this,r))}),o}_parseCommand(t,r){var i;let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(n.operands),r=n.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},a=`command:${this.name()}`;if(this._actionHandler){o(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(a,t,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if((i=this.parent)!=null&&i.listenerCount(a))o(),this._processArguments(),this.parent.emit(a,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(o(),this._processArguments())}else this.commands.length?(o(),this.help({error:!0})):(o(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(n=>{let o=n.attributeName();return this.getOptionValue(o)===void 0?!1:this.getOptionValueSource(o)!=="default"});t.filter(n=>n.conflictsWith.length>0).forEach(n=>{let o=t.find(a=>n.conflictsWith.includes(a.attributeName()));o&&this._conflictingOption(n,o)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],n=[],o=r;function a(u){return u.length>1&&u[0]==="-"}let i=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(d=>d.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,s=null,l=null,c=0;for(;c<t.length||l;){let u=l??t[c++];if(l=null,u==="--"){o===n&&o.push(u),o.push(...t.slice(c));break}if(s&&(!a(u)||i(u))){this.emit(`option:${s.name()}`,u);continue}if(s=null,a(u)){let d=this._findOption(u);if(d){if(d.required){let f=t[c++];f===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,f)}else if(d.optional){let f=null;c<t.length&&(!a(t[c])||i(t[c]))&&(f=t[c++]),this.emit(`option:${d.name()}`,f)}else this.emit(`option:${d.name()}`);s=d.variadic?d:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let d=this._findOption(`-${u[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,u.slice(2)):(this.emit(`option:${d.name()}`),l=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let d=u.indexOf("="),f=this._findOption(u.slice(0,d));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,u.slice(d+1));continue}}if(o===r&&a(u)&&!(this.commands.length===0&&i(u))&&(o=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(u)){r.push(u),n.push(...t.slice(c));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u,...t.slice(c));break}else if(this._defaultCommandName){n.push(u,...t.slice(c));break}}if(this._passThroughOptions){o.push(u,...t.slice(c));break}o.push(u)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let n=0;n<r;n++){let o=this.options[n].attributeName();t[o]=o===this._versionOptionName?this._version:this[o]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
25
25
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
26
26
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
27
- `),this.outputHelp({error:!0}));let n=r||{},o=n.exitCode||1,a=n.code||"commander.error";this._exit(o,a,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in Ue.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,Ue.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new SR(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&t.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(o=>!r(o)).forEach(o=>{this.setOptionValueWithSource(o,n.implied[o],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let n=i=>{let s=i.attributeName(),l=this.getOptionValue(s),c=this.options.find(d=>d.negate&&s===d.attributeName()),u=this.options.find(d=>!d.negate&&s===d.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:u||i},o=i=>{let s=n(i),l=s.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},a=`error: ${o(t)} cannot be used with ${o(r)}`;this.error(a,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let o=[],a=this;do{let i=a.createHelp().visibleOptions(a).filter(s=>s.long).map(s=>s.long);o=o.concat(i),a=a.parent}while(a&&!a._enablePositionalOptions);r=Xy(t,o)}let n=`error: unknown option '${t}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",a=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${t.length}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let o=[];this.createHelp().visibleCommands(this).forEach(a=>{o.push(a.name()),a.alias()&&o.push(a.alias())}),r=Xy(t,o)}let n=`error: unknown command '${t}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(t,r,n){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",n=n||"output the version number";let o=this.createOption(r,n);return this._versionOptionName=o.attributeName(),this._registerOption(o),this.on("option:"+o.name(),()=>{this._outputConfiguration.writeOut(`${t}
28
- `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){var o;if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let n=(o=this.parent)==null?void 0:o._findCommand(t);if(n){let a=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${a}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>yR(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=Tn.basename(t,Tn.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),n=this._getOutputContext(t);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let o=r.formatHelp(this,r);return n.hasColors?o:this._outputConfiguration.stripColor(o)}_getOutputContext(t){t=t||{};let r=!!t.error,n,o,a;return r?(n=s=>this._outputConfiguration.writeErr(s),o=this._outputConfiguration.getErrHasColors(),a=this._outputConfiguration.getErrHelpWidth()):(n=s=>this._outputConfiguration.writeOut(s),o=this._outputConfiguration.getOutHasColors(),a=this._outputConfiguration.getOutHelpWidth()),{error:r,write:s=>(o||(s=this._outputConfiguration.stripColor(s)),n(s)),hasColors:o,helpWidth:a}}outputHelp(t){var i;let r;typeof t=="function"&&(r=t,t=void 0);let n=this._getOutputContext(t),o={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",o)),this.emit("beforeHelp",o);let a=this.helpInformation({error:n.error});if(r&&(a=r(a),typeof a!="string"&&!Buffer.isBuffer(a)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(a),(i=this._getHelpOption())!=null&&i.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",o),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",o))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(Ue.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(t))throw new Error(`Unexpected value for position to addHelpText.
27
+ `),this.outputHelp({error:!0}));let n=r||{},o=n.exitCode||1,a=n.code||"commander.error";this._exit(o,a,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in Ue.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,Ue.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new kR(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&t.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(o=>!r(o)).forEach(o=>{this.setOptionValueWithSource(o,n.implied[o],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let n=i=>{let s=i.attributeName(),l=this.getOptionValue(s),c=this.options.find(d=>d.negate&&s===d.attributeName()),u=this.options.find(d=>!d.negate&&s===d.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:u||i},o=i=>{let s=n(i),l=s.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},a=`error: ${o(t)} cannot be used with ${o(r)}`;this.error(a,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let o=[],a=this;do{let i=a.createHelp().visibleOptions(a).filter(s=>s.long).map(s=>s.long);o=o.concat(i),a=a.parent}while(a&&!a._enablePositionalOptions);r=tb(t,o)}let n=`error: unknown option '${t}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",a=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${t.length}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let o=[];this.createHelp().visibleCommands(this).forEach(a=>{o.push(a.name()),a.alias()&&o.push(a.alias())}),r=tb(t,o)}let n=`error: unknown command '${t}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(t,r,n){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",n=n||"output the version number";let o=this.createOption(r,n);return this._versionOptionName=o.attributeName(),this._registerOption(o),this.on("option:"+o.name(),()=>{this._outputConfiguration.writeOut(`${t}
28
+ `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){var o;if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let n=(o=this.parent)==null?void 0:o._findCommand(t);if(n){let a=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${a}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>IR(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=Tn.basename(t,Tn.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),n=this._getOutputContext(t);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let o=r.formatHelp(this,r);return n.hasColors?o:this._outputConfiguration.stripColor(o)}_getOutputContext(t){t=t||{};let r=!!t.error,n,o,a;return r?(n=s=>this._outputConfiguration.writeErr(s),o=this._outputConfiguration.getErrHasColors(),a=this._outputConfiguration.getErrHelpWidth()):(n=s=>this._outputConfiguration.writeOut(s),o=this._outputConfiguration.getOutHasColors(),a=this._outputConfiguration.getOutHelpWidth()),{error:r,write:s=>(o||(s=this._outputConfiguration.stripColor(s)),n(s)),hasColors:o,helpWidth:a}}outputHelp(t){var i;let r;typeof t=="function"&&(r=t,t=void 0);let n=this._getOutputContext(t),o={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",o)),this.emit("beforeHelp",o);let a=this.helpInformation({error:n.error});if(r&&(a=r(a),typeof a!="string"&&!Buffer.isBuffer(a)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(a),(i=this._getHelpOption())!=null&&i.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",o),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",o))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(Ue.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(t))throw new Error(`Unexpected value for position to addHelpText.
29
29
  Expecting one of '${n.join("', '")}'`);let o=`${t}Help`;return this.on(o,a=>{let i;typeof r=="function"?i=r({error:a.error,command:a.command}):i=r,i&&a.write(`${i}
30
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(o=>r.is(o))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Qy(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,n="127.0.0.1",o="9229",a;return(a=t.match(/^(--inspect(-brk)?)$/))!==null?r=a[1]:(a=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=a[1],/^\d+$/.test(a[3])?o=a[3]:n=a[3]):(a=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=a[1],n=a[3],o=a[4]),r&&o!=="0"?`${r}=${n}:${parseInt(o)+1}`:t})}function Of(){if(Ue.env.NO_COLOR||Ue.env.FORCE_COLOR==="0"||Ue.env.FORCE_COLOR==="false")return!1;if(Ue.env.FORCE_COLOR||Ue.env.CLICOLOR_FORCE!==void 0)return!0}Lf.Command=Ff;Lf.useColor=Of});var ob=O(Sr=>{var{Argument:tb}=Jl(),{Command:Df}=eb(),{CommanderError:xR,InvalidArgumentError:rb}=Bi(),{Help:IR}=Cf(),{Option:nb}=Pf();Sr.program=new Df;Sr.createCommand=e=>new Df(e);Sr.createOption=(e,t)=>new nb(e,t);Sr.createArgument=(e,t)=>new tb(e,t);Sr.Command=Df;Sr.Option=nb;Sr.Argument=tb;Sr.Help=IR;Sr.CommanderError=xR;Sr.InvalidArgumentError=rb;Sr.InvalidOptionArgumentError=rb});var db=O(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.createCacheKeyComparator=ub;Sa.defaultEqualityCheck=void 0;Sa.defaultMemoize=CR;var Xl="NOT_FOUND";function kR(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:Xl},put:function(n,o){t={key:n,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function _R(e,t){var r=[];function n(s){var l=r.findIndex(function(u){return t(s,u.key)});if(l>-1){var c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return Xl}function o(s,l){n(s)===Xl&&(r.unshift({key:s,value:l}),r.length>e&&r.pop())}function a(){return r}function i(){r=[]}return{get:n,put:o,getEntries:a,clear:i}}var cb=function(t,r){return t===r};Sa.defaultEqualityCheck=cb;function ub(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;for(var o=r.length,a=0;a<o;a++)if(!e(r[a],n[a]))return!1;return!0}}function CR(e,t){var r=typeof t=="object"?t:{equalityCheck:t},n=r.equalityCheck,o=n===void 0?cb:n,a=r.maxSize,i=a===void 0?1:a,s=r.resultEqualityCheck,l=ub(o),c=i===1?kR(l):_R(i,l);function u(){var d=c.get(arguments);if(d===Xl){if(d=e.apply(null,arguments),s){var f=c.getEntries(),p=f.find(function(h){return s(h.value,d)});p&&(d=p.value)}c.put(arguments,d)}return d}return u.clearCache=function(){return c.clear()},u}});var Kt=O(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.createSelector=void 0;xn.createSelectorCreator=fb;xn.createStructuredSelector=void 0;Object.defineProperty(xn,"defaultEqualityCheck",{enumerable:!0,get:function(){return Bf.defaultEqualityCheck}});Object.defineProperty(xn,"defaultMemoize",{enumerable:!0,get:function(){return Bf.defaultMemoize}});var Bf=db();function ER(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(n){return typeof n=="function"})){var r=t.map(function(n){return typeof n=="function"?"function "+(n.name||"unnamed")+"()":typeof n}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function fb(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];var c=0,u,d={memoizeOptions:void 0},f=s.pop();if(typeof f=="object"&&(d=f,f=s.pop()),typeof f!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof f+"]");var p=d,h=p.memoizeOptions,y=h===void 0?r:h,b=Array.isArray(y)?y:[y],m=ER(s),g=e.apply(void 0,[function(){return c++,f.apply(null,arguments)}].concat(b)),T=e(function(){for(var I=[],v=m.length,w=0;w<v;w++)I.push(m[w].apply(null,arguments));return u=g.apply(null,I),u});return Object.assign(T,{resultFunc:f,memoizedResultFunc:g,dependencies:m,lastResult:function(){return u},recomputations:function(){return c},resetRecomputations:function(){return c=0}}),T};return o}var pb=fb(Bf.defaultMemoize);xn.createSelector=pb;var NR=function(t,r){if(r===void 0&&(r=pb),typeof t!="object")throw new Error("createStructuredSelector expects first argument to be an object "+("where each property is a selector, instead received a "+typeof t));var n=Object.keys(t),o=r(n.map(function(a){return t[a]}),function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return i.reduce(function(l,c,u){return l[n[u]]=c,l},{})});return o};xn.createStructuredSelector=NR});var gb=O((Ql,mb)=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var AR=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function hb(e){e&&"limit"in e&&(this._limit=e.limit),this.clear()}hb.prototype={toString:function(){return"[object TupleMap]"},_hash:function(t){if(t===this._lastTuple)return this._lastHash;for(var r=t.length,n=[],o=0;o<r;o++){var a=t[o],i=typeof a>"u"?"undefined":AR(a);if(a!==null&&(i==="object"||i==="function"))if(this._idMap.has(a))n.push(this._idMap.get(a));else{var s="#"+this._id++;this._idMap.set(a,s),n.push(s)}else n.push(i==="string"?'"'+a+'"':""+a)}return this._lastTuple=t,this._lastHash=n.join("/<[MI_SEP]>/"),this._lastHash},has:function(t){var r=this._hash(t);return this._cache.has(r)},set:function(t,r){var n=this._hash(t);return this._limit!==void 0&&this._cache.delete(n),this._cache.set(n,r),this._limit!==void 0&&this._cache.size>this._limit&&this._cache.delete(this._cache.keys().next().value),this},get:function(t){var r=this._hash(t);if(this._limit!==void 0&&this._cache.has(r)){var n=this._cache.get(r);return this._cache.delete(r),this._cache.set(r,n),n}return this._cache.get(r)},clear:function(){this._cache=new Map,this._idMap=new WeakMap,this._id=0,delete this._lastTuple,delete this._lastHash}};Ql.default=hb;mb.exports=Ql.default});var xa=O((ec,yb)=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var PR=gb(),RR=MR(PR);function MR(e){return e&&e.__esModule?e:{default:e}}if(typeof WeakMap>"u"||typeof Map>"u")throw new Error("This lib requires an implementation of WeakMap and Map");function FR(e,t){var r=t&&t.cache||new RR.default(t),n=void 0;return/^\[object (Weak|LRU|NamedTuple)?Map\]$/.test(r.toString())?n=function(a){if(!r.has(a)){var i=e.call(this,a);return r.set(a,i),i}return r.get(a)}:n=function(){if(!r.has(arguments)){var a=e.apply(this,arguments);return r.set(arguments,a),a}return r.get(arguments)},e.name&&(n.displayName=e.name+"Memoized"),n}ec.default=FR;yb.exports=ec.default});var Uf=O((tc,Tb)=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var OR=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function bb(){this.clear()}bb.prototype={toString:function(){return"[object MixedTupleMap]"},_hash:function(t){if(t===this._lastTuple)return this._lastHash;for(var r=t.length,n=[],o=[],a=[],i=0;i<r;i++){var s=t[i],l=typeof s>"u"?"undefined":OR(s);l!==null&&(l==="object"||l==="function")?a.push(i):(n.push(l==="string"?'"'+s+'"':""+s),o.push(i))}if(a.length===0)throw new Error("Tuple must have at least one non-primitive part");return n.push("["+a.concat(o).join()+"]"),this._lastTuple=t,this._lastHash={nonPrimOrder:a,primHash:n.join("/<[MI_SEP]>/")},this._lastHash},has:function(t){for(var r=this._cache,n=this._hash(t),o=n.nonPrimOrder.length,a=0;a<o;a++){var i=t[n.nonPrimOrder[a]];if(r.has&&r.has(i))r=r.get(i);else return!1}return(r.has||!1)&&r.has(n.primHash)},set:function(t,r){for(var n=this._cache,o=this._hash(t),a=o.nonPrimOrder.length,i=!1,s=0;s<a;s++){var l=t[o.nonPrimOrder[s]];!i&&n.has(l)?n=n.get(l):(i=!0,n.set(l,n=s<a-1?new WeakMap:new Map))}return n.set(o.primHash,r),this},get:function(t){for(var r=this._cache,n=this._hash(t),o=n.nonPrimOrder.length,a=0;a<o;a++){var i=t[n.nonPrimOrder[a]],s=r.get&&r.get(i);if(s===void 0)return s;r=s}return r.get&&r.get(n.primHash)},clear:function(){this._cache=new WeakMap,delete this._lastTuple,delete this._lastHash}};tc.default=bb;Tb.exports=tc.default});var xb=O((rc,Sb)=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var LR=(function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}})(),DR=BR(["",""],["",""]);function BR(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function UR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var $R=(function(){function e(){for(var t=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return UR(this,e),this.tag=function(a){for(var i=arguments.length,s=Array(i>1?i-1:0),l=1;l<i;l++)s[l-1]=arguments[l];return typeof a=="function"?t.interimTag.bind(t,a):typeof a=="string"?t.transformEndResult(a):(a=a.map(t.transformString.bind(t)),t.transformEndResult(a.reduce(t.processSubstitutions.bind(t,s))))},n.length>0&&Array.isArray(n[0])&&(n=n[0]),this.transformers=n.map(function(a){return typeof a=="function"?a():a}),this.tag}return LR(e,[{key:"interimTag",value:function(r,n){for(var o=arguments.length,a=Array(o>2?o-2:0),i=2;i<o;i++)a[i-2]=arguments[i];return this.tag(DR,r.apply(void 0,[n].concat(a)))}},{key:"processSubstitutions",value:function(r,n,o){var a=this.transformSubstitution(r.shift(),n);return"".concat(n,a,o)}},{key:"transformString",value:function(r){var n=function(a,i){return i.onString?i.onString(a):a};return this.transformers.reduce(n,r)}},{key:"transformSubstitution",value:function(r,n){var o=function(i,s){return s.onSubstitution?s.onSubstitution(i,n):i};return this.transformers.reduce(o,r)}},{key:"transformEndResult",value:function(r){var n=function(a,i){return i.onEndResult?i.onEndResult(a):a};return this.transformers.reduce(n,r)}}]),e})();rc.default=$R;Sb.exports=rc.default});var Bt=O((Ui,Ib)=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.default=void 0;var GR=xb(),WR=HR(GR);function HR(e){return e&&e.__esModule?e:{default:e}}Ui.default=WR.default;Ib.exports=Ui.default});var wb=O((nc,vb)=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var VR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(n){if(t==="")return n.trim();if(t=t.toLowerCase(),t==="start"||t==="left")return n.replace(/^\s*/,"");if(t==="end"||t==="right")return n.replace(/\s*$/,"");throw new Error("Side not supported: "+t)}}};nc.default=VR;vb.exports=nc.default});var Ut=O(($i,kb)=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.default=void 0;var jR=wb(),qR=zR(jR);function zR(e){return e&&e.__esModule?e:{default:e}}$i.default=qR.default;kb.exports=$i.default});var Cb=O((oc,_b)=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});function KR(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else return Array.from(e)}var ZR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(n){if(t==="initial"){var o=n.match(/^[^\S\n]*(?=\S)/gm),a=o&&Math.min.apply(Math,KR(o.map(function(s){return s.length})));if(a){var i=new RegExp("^.{"+a+"}","gm");return n.replace(i,"")}return n}if(t==="all")return n.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+t)}}};oc.default=ZR;_b.exports=oc.default});var rn=O((Gi,Eb)=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.default=void 0;var JR=Cb(),YR=XR(JR);function XR(e){return e&&e.__esModule?e:{default:e}}Gi.default=YR.default;Eb.exports=Gi.default});var Ab=O((ac,Nb)=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var QR=function(t,r){return{onEndResult:function(o){if(t==null||r==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return o.replace(t,r)}}};ac.default=QR;Nb.exports=ac.default});var Yn=O((Wi,Pb)=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.default=void 0;var eM=Ab(),tM=rM(eM);function rM(e){return e&&e.__esModule?e:{default:e}}Wi.default=tM.default;Pb.exports=Wi.default});var Mb=O((ic,Rb)=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var nM=function(t,r){return{onSubstitution:function(o,a){if(t==null||r==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return o==null?o:o.toString().replace(t,r)}}};ic.default=nM;Rb.exports=ic.default});var $f=O((Hi,Fb)=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.default=void 0;var oM=Mb(),aM=iM(oM);function iM(e){return e&&e.__esModule?e:{default:e}}Hi.default=aM.default;Fb.exports=Hi.default});var Lb=O((sc,Ob)=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var sM=function(t,r){return{onString:function(o){if(t==null||r==null)throw new Error("replaceStringTransformer requires at least 2 arguments.");return o.replace(t,r)}}};sc.default=sM;Ob.exports=sc.default});var Bb=O((Vi,Db)=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.default=void 0;var lM=Lb(),cM=uM(lM);function uM(e){return e&&e.__esModule?e:{default:e}}Vi.default=cM.default;Db.exports=Vi.default});var $b=O((lc,Ub)=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var dM={separator:"",conjunction:"",serial:!1},fM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dM;return{onSubstitution:function(n,o){if(Array.isArray(n)){var a=n.length,i=t.separator,s=t.conjunction,l=t.serial,c=o.match(/(\n?[^\S\n]+)$/);if(c?n=n.join(i+c[1]):n=n.join(i+" "),s&&a>1){var u=n.lastIndexOf(i);n=n.slice(0,u)+(l?i:"")+" "+s+n.slice(u+1)}}return n}}};lc.default=fM;Ub.exports=lc.default});var xr=O((ji,Gb)=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.default=void 0;var pM=$b(),hM=mM(pM);function mM(e){return e&&e.__esModule?e:{default:e}}ji.default=hM.default;Gb.exports=ji.default});var Hb=O((cc,Wb)=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var gM=function(t){return{onSubstitution:function(n,o){if(t!=null&&typeof t=="string")typeof n=="string"&&n.includes(t)&&(n=n.split(t));else throw new Error("You need to specify a string character to split by.");return n}}};cc.default=gM;Wb.exports=cc.default});var uc=O((qi,Vb)=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.default=void 0;var yM=Hb(),bM=TM(yM);function TM(e){return e&&e.__esModule?e:{default:e}}qi.default=bM.default;Vb.exports=qi.default});var zb=O((dc,qb)=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var jb=function(t){return t!=null&&!Number.isNaN(t)&&typeof t!="boolean"},SM=function(){return{onSubstitution:function(r){return Array.isArray(r)?r.filter(jb):jb(r)?r:""}}};dc.default=SM;qb.exports=dc.default});var Gf=O((zi,Kb)=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.default=void 0;var xM=zb(),IM=vM(xM);function vM(e){return e&&e.__esModule?e:{default:e}}zi.default=IM.default;Kb.exports=zi.default});var Jb=O((pc,Zb)=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var wM=Bt(),kM=fc(wM),_M=rn(),CM=fc(_M),EM=xr(),NM=fc(EM),AM=Ut(),PM=fc(AM);function fc(e){return e&&e.__esModule?e:{default:e}}var RM=new kM.default((0,NM.default)({separator:","}),CM.default,PM.default);pc.default=RM;Zb.exports=pc.default});var Xb=O((Ki,Yb)=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.default=void 0;var MM=Jb(),FM=OM(MM);function OM(e){return e&&e.__esModule?e:{default:e}}Ki.default=FM.default;Yb.exports=Ki.default});var eT=O((mc,Qb)=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var LM=Bt(),DM=hc(LM),BM=rn(),UM=hc(BM),$M=xr(),GM=hc($M),WM=Ut(),HM=hc(WM);function hc(e){return e&&e.__esModule?e:{default:e}}var VM=new DM.default((0,GM.default)({separator:",",conjunction:"and"}),UM.default,HM.default);mc.default=VM;Qb.exports=mc.default});var rT=O((Zi,tT)=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.default=void 0;var jM=eT(),qM=zM(jM);function zM(e){return e&&e.__esModule?e:{default:e}}Zi.default=qM.default;tT.exports=Zi.default});var oT=O((yc,nT)=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var KM=Bt(),ZM=gc(KM),JM=rn(),YM=gc(JM),XM=xr(),QM=gc(XM),eF=Ut(),tF=gc(eF);function gc(e){return e&&e.__esModule?e:{default:e}}var rF=new ZM.default((0,QM.default)({separator:",",conjunction:"or"}),YM.default,tF.default);yc.default=rF;nT.exports=yc.default});var iT=O((Ji,aT)=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=void 0;var nF=oT(),oF=aF(nF);function aF(e){return e&&e.__esModule?e:{default:e}}Ji.default=oF.default;aT.exports=Ji.default});var lT=O((bc,sT)=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var iF=Bt(),sF=Ia(iF),lF=rn(),cF=Ia(lF),uF=xr(),dF=Ia(uF),fF=Ut(),pF=Ia(fF),hF=uc(),mF=Ia(hF),gF=Gf(),yF=Ia(gF);function Ia(e){return e&&e.__esModule?e:{default:e}}var bF=new sF.default((0,mF.default)(`
31
- `),yF.default,dF.default,cF.default,pF.default);bc.default=bF;sT.exports=bc.default});var Tc=O((Yi,cT)=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=void 0;var TF=lT(),SF=xF(TF);function xF(e){return e&&e.__esModule?e:{default:e}}Yi.default=SF.default;cT.exports=Yi.default});var dT=O((Xi,uT)=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.default=void 0;var IF=Tc(),vF=wF(IF);function wF(e){return e&&e.__esModule?e:{default:e}}Xi.default=vF.default;uT.exports=Xi.default});var pT=O((Qi,fT)=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.default=void 0;var kF=Tc(),_F=CF(kF);function CF(e){return e&&e.__esModule?e:{default:e}}Qi.default=_F.default;fT.exports=Qi.default});var mT=O((Sc,hT)=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var EF=Bt(),NF=wa(EF),AF=rn(),PF=wa(AF),RF=xr(),MF=wa(RF),FF=Ut(),OF=wa(FF),LF=uc(),DF=wa(LF),BF=$f(),va=wa(BF);function wa(e){return e&&e.__esModule?e:{default:e}}var UF=new NF.default((0,DF.default)(`
32
- `),MF.default,PF.default,OF.default,(0,va.default)(/&/g,"&amp;"),(0,va.default)(/</g,"&lt;"),(0,va.default)(/>/g,"&gt;"),(0,va.default)(/"/g,"&quot;"),(0,va.default)(/'/g,"&#x27;"),(0,va.default)(/`/g,"&#x60;"));Sc.default=UF;hT.exports=Sc.default});var yT=O((es,gT)=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.default=void 0;var $F=mT(),GF=WF($F);function WF(e){return e&&e.__esModule?e:{default:e}}es.default=GF.default;gT.exports=es.default});var TT=O((xc,bT)=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var HF=Bt(),VF=Wf(HF),jF=Ut(),qF=Wf(jF),zF=Yn(),KF=Wf(zF);function Wf(e){return e&&e.__esModule?e:{default:e}}var ZF=new VF.default((0,KF.default)(/(?:\n(?:\s*))+/g," "),qF.default);xc.default=ZF;bT.exports=xc.default});var xT=O((ts,ST)=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.default=void 0;var JF=TT(),YF=XF(JF);function XF(e){return e&&e.__esModule?e:{default:e}}ts.default=YF.default;ST.exports=ts.default});var vT=O((Ic,IT)=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var QF=Bt(),eO=Hf(QF),tO=Ut(),rO=Hf(tO),nO=Yn(),oO=Hf(nO);function Hf(e){return e&&e.__esModule?e:{default:e}}var aO=new eO.default((0,oO.default)(/(?:\n\s*)/g,""),rO.default);Ic.default=aO;IT.exports=Ic.default});var kT=O((rs,wT)=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.default=void 0;var iO=vT(),sO=lO(iO);function lO(e){return e&&e.__esModule?e:{default:e}}rs.default=sO.default;wT.exports=rs.default});var CT=O((wc,_T)=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var cO=Bt(),uO=vc(cO),dO=xr(),fO=vc(dO),pO=Ut(),hO=vc(pO),mO=Yn(),gO=vc(mO);function vc(e){return e&&e.__esModule?e:{default:e}}var yO=new uO.default((0,fO.default)({separator:","}),(0,gO.default)(/(?:\s+)/g," "),hO.default);wc.default=yO;_T.exports=wc.default});var NT=O((ns,ET)=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.default=void 0;var bO=CT(),TO=SO(bO);function SO(e){return e&&e.__esModule?e:{default:e}}ns.default=TO.default;ET.exports=ns.default});var PT=O((_c,AT)=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var xO=Bt(),IO=kc(xO),vO=xr(),wO=kc(vO),kO=Ut(),_O=kc(kO),CO=Yn(),EO=kc(CO);function kc(e){return e&&e.__esModule?e:{default:e}}var NO=new IO.default((0,wO.default)({separator:",",conjunction:"or"}),(0,EO.default)(/(?:\s+)/g," "),_O.default);_c.default=NO;AT.exports=_c.default});var MT=O((os,RT)=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.default=void 0;var AO=PT(),PO=RO(AO);function RO(e){return e&&e.__esModule?e:{default:e}}os.default=PO.default;RT.exports=os.default});var OT=O((Ec,FT)=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var MO=Bt(),FO=Cc(MO),OO=xr(),LO=Cc(OO),DO=Ut(),BO=Cc(DO),UO=Yn(),$O=Cc(UO);function Cc(e){return e&&e.__esModule?e:{default:e}}var GO=new FO.default((0,LO.default)({separator:",",conjunction:"and"}),(0,$O.default)(/(?:\s+)/g," "),BO.default);Ec.default=GO;FT.exports=Ec.default});var DT=O((as,LT)=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.default=void 0;var WO=OT(),HO=VO(WO);function VO(e){return e&&e.__esModule?e:{default:e}}as.default=HO.default;LT.exports=as.default});var UT=O((Ac,BT)=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var jO=Bt(),qO=Nc(jO),zO=rn(),KO=Nc(zO),ZO=xr(),JO=Nc(ZO),YO=Ut(),XO=Nc(YO);function Nc(e){return e&&e.__esModule?e:{default:e}}var QO=new qO.default(JO.default,KO.default,XO.default);Ac.default=QO;BT.exports=Ac.default});var GT=O((is,$T)=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.default=void 0;var e1=UT(),t1=r1(e1);function r1(e){return e&&e.__esModule?e:{default:e}}is.default=t1.default;$T.exports=is.default});var HT=O((Rc,WT)=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var n1=Bt(),o1=Pc(n1),a1=xr(),i1=Pc(a1),s1=Ut(),l1=Pc(s1),c1=Yn(),u1=Pc(c1);function Pc(e){return e&&e.__esModule?e:{default:e}}var d1=new o1.default(i1.default,(0,u1.default)(/(?:\s+)/g," "),l1.default);Rc.default=d1;WT.exports=Rc.default});var jT=O((ss,VT)=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.default=void 0;var f1=HT(),p1=h1(f1);function h1(e){return e&&e.__esModule?e:{default:e}}ss.default=p1.default;VT.exports=ss.default});var zT=O((Mc,qT)=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var m1=Bt(),g1=Vf(m1),y1=rn(),b1=Vf(y1),T1=Ut(),S1=Vf(T1);function Vf(e){return e&&e.__esModule?e:{default:e}}var x1=new g1.default(b1.default,S1.default);Mc.default=x1;qT.exports=Mc.default});var ZT=O((ls,KT)=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.default=void 0;var I1=zT(),v1=w1(I1);function w1(e){return e&&e.__esModule?e:{default:e}}ls.default=v1.default;KT.exports=ls.default});var YT=O((Fc,JT)=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var k1=Bt(),_1=jf(k1),C1=rn(),E1=jf(C1),N1=Ut(),A1=jf(N1);function jf(e){return e&&e.__esModule?e:{default:e}}var P1=new _1.default((0,E1.default)("all"),A1.default);Fc.default=P1;JT.exports=Fc.default});var QT=O((cs,XT)=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.default=void 0;var R1=YT(),M1=F1(R1);function F1(e){return e&&e.__esModule?e:{default:e}}cs.default=M1.default;XT.exports=cs.default});var Ir=O(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.stripIndents=pe.stripIndent=pe.oneLineInlineLists=pe.inlineLists=pe.oneLineCommaListsAnd=pe.oneLineCommaListsOr=pe.oneLineCommaLists=pe.oneLineTrim=pe.oneLine=pe.safeHtml=pe.source=pe.codeBlock=pe.html=pe.commaListsOr=pe.commaListsAnd=pe.commaLists=pe.removeNonPrintingValuesTransformer=pe.splitStringTransformer=pe.inlineArrayTransformer=pe.replaceStringTransformer=pe.replaceSubstitutionTransformer=pe.replaceResultTransformer=pe.stripIndentTransformer=pe.trimResultTransformer=pe.TemplateTag=void 0;var O1=Bt(),L1=Xe(O1),D1=Ut(),B1=Xe(D1),U1=rn(),$1=Xe(U1),G1=Yn(),W1=Xe(G1),H1=$f(),V1=Xe(H1),j1=Bb(),q1=Xe(j1),z1=xr(),K1=Xe(z1),Z1=uc(),J1=Xe(Z1),Y1=Gf(),X1=Xe(Y1),Q1=Xb(),eL=Xe(Q1),tL=rT(),rL=Xe(tL),nL=iT(),oL=Xe(nL),aL=Tc(),iL=Xe(aL),sL=dT(),lL=Xe(sL),cL=pT(),uL=Xe(cL),dL=yT(),fL=Xe(dL),pL=xT(),hL=Xe(pL),mL=kT(),gL=Xe(mL),yL=NT(),bL=Xe(yL),TL=MT(),SL=Xe(TL),xL=DT(),IL=Xe(xL),vL=GT(),wL=Xe(vL),kL=jT(),_L=Xe(kL),CL=ZT(),EL=Xe(CL),NL=QT(),AL=Xe(NL);function Xe(e){return e&&e.__esModule?e:{default:e}}pe.TemplateTag=L1.default;pe.trimResultTransformer=B1.default;pe.stripIndentTransformer=$1.default;pe.replaceResultTransformer=W1.default;pe.replaceSubstitutionTransformer=V1.default;pe.replaceStringTransformer=q1.default;pe.inlineArrayTransformer=K1.default;pe.splitStringTransformer=J1.default;pe.removeNonPrintingValuesTransformer=X1.default;pe.commaLists=eL.default;pe.commaListsAnd=rL.default;pe.commaListsOr=oL.default;pe.html=iL.default;pe.codeBlock=lL.default;pe.source=uL.default;pe.safeHtml=fL.default;pe.oneLine=hL.default;pe.oneLineTrim=gL.default;pe.oneLineCommaLists=bL.default;pe.oneLineCommaListsOr=SL.default;pe.oneLineCommaListsAnd=IL.default;pe.inlineLists=wL.default;pe.oneLineInlineLists=_L.default;pe.stripIndent=EL.default;pe.stripIndents=AL.default});var eS,us,cr=No(()=>{"use strict";eS="profile-store",us="https://symbolication.services.mozilla.com"});function tS(){return{weightType:"samples",weight:null,stack:[],time:[],length:0}}function nn(){return{frame:[],prefix:[],length:0}}function ka(){return{weightType:"samples",weight:null,eventDelay:[],stack:[],time:[],length:0}}function _a(){return{address:[],inlineDepth:[],category:[],subcategory:[],func:[],nativeSymbol:[],innerWindowID:[],line:[],column:[],length:0}}function Oc(e){return{address:e.address.slice(),inlineDepth:e.inlineDepth.slice(),category:e.category.slice(),subcategory:e.subcategory.slice(),func:e.func.slice(),nativeSymbol:e.nativeSymbol.slice(),innerWindowID:e.innerWindowID.slice(),line:e.line.slice(),column:e.column.slice(),length:e.length}}function Ca(){return{isJS:[],relevantForJS:[],name:[],resource:[],source:[],lineNumber:[],columnNumber:[],length:0}}function Ea(e){return{isJS:e.isJS.slice(),relevantForJS:e.relevantForJS.slice(),name:e.name.slice(),resource:e.resource.slice(),source:e.source.slice(),lineNumber:e.lineNumber.slice(),columnNumber:e.columnNumber.slice(),length:e.length}}function rS(e){return{libIndex:e.libIndex.slice(),address:e.address.slice(),name:e.name.slice(),functionSize:e.functionSize.slice(),length:e.length}}function Na(){return{lib:[],name:[],host:[],type:[],length:0}}function Aa(){return{libIndex:[],address:[],name:[],functionSize:[],length:0}}function Ur(){return{data:[],name:[],startTime:[],endTime:[],phase:[],category:[],length:0}}function nS(){return{time:[],className:[],typeName:[],coarseType:[],weight:[],weightType:"bytes",inNursery:[],stack:[],length:0}}function Lc(){return{time:[],weight:[],weightType:"bytes",stack:[],length:0}}function qf(e){return{data:e.data.slice(),name:e.name.slice(),startTime:e.startTime.slice(),endTime:e.endTime.slice(),phase:e.phase.slice(),category:e.category.slice(),length:e.length}}function ds(){return{id:[],name:[],baseURL:[],length:0}}function zf(){return[{name:"Other",color:"grey",subcategories:["Other"]},{name:"Idle",color:"transparent",subcategories:["Other"]},{name:"Layout",color:"purple",subcategories:["Other"]},{name:"JavaScript",color:"yellow",subcategories:["Other"]},{name:"GC / CC",color:"orange",subcategories:["Other"]},{name:"Network",color:"lightblue",subcategories:["Other"]},{name:"Graphics",color:"green",subcategories:["Other"]},{name:"DOM",color:"blue",subcategories:["Other"]}]}function Pa(){return{id:[],filename:[],startLine:[],startColumn:[],sourceMapURL:[],length:0}}function Ra(e){return{...{processType:"default",processStartupTime:0,processShutdownTime:null,registerTime:0,unregisterTime:null,pausedRanges:[],name:"Empty",isMainThread:!1,pid:"0",tid:0,samples:ka(),markers:Ur()},...e}}function PL(){return{stackTable:nn(),frameTable:_a(),funcTable:Ca(),resourceTable:Na(),nativeSymbols:Aa(),sources:Pa(),stringArray:[]}}function Po(){return{meta:{interval:1,startTime:0,abi:"",misc:"",oscpu:"",platform:"",processType:0,extensions:ds(),categories:zf(),product:"Firefox",stackwalk:0,toolkit:"",version:34,preprocessedProfileVersion:62,appBuildID:"",sourceURL:"",physicalCPUs:0,logicalCPUs:0,CPUName:"",symbolicated:!0,markerSchema:[]},libs:[],pages:[],shared:PL(),threads:[]}}function oS(){return{prefix:new Int32Array(0),subtreeRangeEnd:new Uint32Array(0),nextSibling:new Int32Array(0),func:new Int32Array(0),category:new Int32Array(0),subcategory:new Int32Array(0),innerWindowID:new Float64Array(0),sourceFramesInlinedIntoSymbol:new Int32Array(0),depth:new Int32Array(0),maxDepth:-1,length:0}}var rr=No(()=>{"use strict";cr()});function ae(e,t=`There was an unhandled case for the value: "${e}"`){throw new Error(t)}function lS(e,...t){return Object.assign({},e,...t)}function cS(e){let t=e;switch(t){case"calltree":case"stack-chart":case"marker-chart":case"network-chart":case"marker-table":case"flame-graph":case"js-tracer":return t;default:return null}}function uS(e){let t=cS(e);if(!t)throw new Error(`Attempted to assert that "${e}" is a valid TransformType, and it was not.`);return t}function dS(e){let t=e;switch(t){case"merge-call-node":case"merge-function":case"focus-subtree":case"focus-function":case"focus-category":case"drop-category":case"focus-self":case"collapse-resource":case"collapse-direct-recursion":case"collapse-recursion":case"collapse-function-subtree":case"drop-function":case"filter-samples":return t;default:return null}}function fs(e){return Object.entries(e)}function Dc(e,t){let r={};for(let[n,o]of fs(e))r[n]=t(o,n);return r}function W(e,t){if(e===null)throw new Error(t||"Expected an item to exist, and it was null.");if(e===void 0)throw new Error(t||"Expected an item to exist, and it was undefined.");return e}function vn(e){return e.values().next().value}var xe=No(()=>{"use strict"});var ex,$e,ur=No(()=>{"use strict";ex=new WeakMap,$e=class e{_array;_stringToIndex;constructor(t){this._array=t,this._stringToIndex=new Map;for(let r=0;r<t.length;r++)this._stringToIndex.set(t[r],r)}static withBackingArray(t){let r=ex.get(t);return r===void 0&&(r=new e(t),ex.set(t,r)),r}getString(t,r){if(!this.hasIndex(t)){if(r)return console.warn(`index ${t} not in StringTable`),r;throw new Error(`index ${t} not in StringTable`)}return this._array[t]}hasIndex(t){return t in this._array}hasString(t){return this._stringToIndex.has(t)}indexForString(t){let r=this._stringToIndex.get(t);return r===void 0&&(r=this._array.length,this._stringToIndex.set(t,r),this._array.push(t)),r}getBackingArray(){return this._array}}});var rx=O((wz,tx)=>{"use strict";tx.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}});var Dx=O((Jc,Lx)=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var FD=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Ox(e){e&&"limit"in e&&(this._limit=e.limit),this.clear()}Ox.prototype={toString:function(){return"[object NamedTupleMap]"},_hash:function(t){if(t===this._lastTuple)return this._lastHash;for(var r=Object.keys(t),n=r.length,o=[],a=0;a<n;a++){var i=r[a],s=t[i],l=typeof s>"u"?"undefined":FD(s);if(s!==null&&(l==="object"||l==="function"))if(this._idMap.has(s))o.push(this._idMap.get(s));else{var c="#"+this._id++;this._idMap.set(s,c),o.push(c)}else o.push(l==="string"?'"'+s+'"':""+s)}return o.push('{"'+r.join('","')+'"}'),this._lastTuple=t,this._lastHash=o.join("/<[MI_SEP]>/"),this._lastHash},has:function(t){var r=this._hash(t);return this._cache.has(r)},set:function(t,r){var n=this._hash(t);return this._limit!==void 0&&this._cache.delete(n),this._cache.set(n,r),this._limit!==void 0&&this._cache.size>this._limit&&this._cache.delete(this._cache.keys().next().value),this},get:function(t){var r=this._hash(t);if(this._limit!==void 0&&this._cache.has(r)){var n=this._cache.get(r);return this._cache.delete(r),this._cache.set(r,n),n}return this._cache.get(r)},clear:function(){this._cache=new Map,this._idMap=new WeakMap,this._id=0,delete this._lastTuple,delete this._lastHash}};Jc.default=Ox;Lx.exports=Jc.default});var uv=O((du,cv)=>{(function(e,t){typeof du=="object"&&typeof cv<"u"?t(du):typeof define=="function"&&define.amd?define("@fluent/sequence",["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FluentSequence={}))})(du,(function(e){"use strict";function t(o,a){return Array.isArray(a)?a.map(i=>r(o,i)):r(o,a)}function r(o,a){for(let i of o)if(i.hasMessage(a))return i;return null}async function n(o,a){if(!Array.isArray(a)){for await(let l of o)if(l.hasMessage(a))return l;return null}let i=new Array(a.length).fill(null),s=a.length;for await(let l of o)for(let[c,u]of a.entries())if(!i[c]&&l.hasMessage(u)&&(i[c]=l,s--),s===0)return i;return i}e.mapBundleAsync=n,e.mapBundleSync=t}))});var Iv=O(we=>{"use strict";var Rs=Symbol.for("react.element"),KU=Symbol.for("react.portal"),ZU=Symbol.for("react.fragment"),JU=Symbol.for("react.strict_mode"),YU=Symbol.for("react.profiler"),XU=Symbol.for("react.provider"),QU=Symbol.for("react.context"),e$=Symbol.for("react.forward_ref"),t$=Symbol.for("react.suspense"),r$=Symbol.for("react.memo"),n$=Symbol.for("react.lazy"),dv=Symbol.iterator;function o$(e){return e===null||typeof e!="object"?null:(e=dv&&e[dv]||e["@@iterator"],typeof e=="function"?e:null)}var hv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mv=Object.assign,gv={};function ja(e,t,r){this.props=e,this.context=t,this.refs=gv,this.updater=r||hv}ja.prototype.isReactComponent={};ja.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};ja.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function yv(){}yv.prototype=ja.prototype;function Yp(e,t,r){this.props=e,this.context=t,this.refs=gv,this.updater=r||hv}var Xp=Yp.prototype=new yv;Xp.constructor=Yp;mv(Xp,ja.prototype);Xp.isPureReactComponent=!0;var fv=Array.isArray,bv=Object.prototype.hasOwnProperty,Qp={current:null},Tv={key:!0,ref:!0,__self:!0,__source:!0};function Sv(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)bv.call(t,n)&&!Tv.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:Rs,type:e,key:a,ref:i,props:o,_owner:Qp.current}}function a$(e,t){return{$$typeof:Rs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function eh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Rs}function i$(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var pv=/\/+/g;function Jp(e,t){return typeof e=="object"&&e!==null&&e.key!=null?i$(""+e.key):t.toString(36)}function pu(e,t,r,n,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Rs:case KU:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+Jp(i,0):n,fv(o)?(r="",e!=null&&(r=e.replace(pv,"$&/")+"/"),pu(o,t,r,"",function(c){return c})):o!=null&&(eh(o)&&(o=a$(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(pv,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",fv(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+Jp(a,s);i+=pu(a,t,r,l,o)}else if(l=o$(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+Jp(a,s++),i+=pu(a,t,r,l,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function fu(e,t,r){if(e==null)return e;var n=[],o=0;return pu(e,n,"","",function(a){return t.call(r,a,o++)}),n}function s$(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Zt={current:null},hu={transition:null},l$={ReactCurrentDispatcher:Zt,ReactCurrentBatchConfig:hu,ReactCurrentOwner:Qp};function xv(){throw Error("act(...) is not supported in production builds of React.")}we.Children={map:fu,forEach:function(e,t,r){fu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return fu(e,function(){t++}),t},toArray:function(e){return fu(e,function(t){return t})||[]},only:function(e){if(!eh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=ja;we.Fragment=ZU;we.Profiler=YU;we.PureComponent=Yp;we.StrictMode=JU;we.Suspense=t$;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=l$;we.act=xv;we.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=mv({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=Qp.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)bv.call(t,l)&&!Tv.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:Rs,type:e.type,key:o,ref:a,props:n,_owner:i}};we.createContext=function(e){return e={$$typeof:QU,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:XU,_context:e},e.Consumer=e};we.createElement=Sv;we.createFactory=function(e){var t=Sv.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:e$,render:e}};we.isValidElement=eh;we.lazy=function(e){return{$$typeof:n$,_payload:{_status:-1,_result:e},_init:s$}};we.memo=function(e,t){return{$$typeof:r$,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=hu.transition;hu.transition={};try{e()}finally{hu.transition=t}};we.unstable_act=xv;we.useCallback=function(e,t){return Zt.current.useCallback(e,t)};we.useContext=function(e){return Zt.current.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e){return Zt.current.useDeferredValue(e)};we.useEffect=function(e,t){return Zt.current.useEffect(e,t)};we.useId=function(){return Zt.current.useId()};we.useImperativeHandle=function(e,t,r){return Zt.current.useImperativeHandle(e,t,r)};we.useInsertionEffect=function(e,t){return Zt.current.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return Zt.current.useLayoutEffect(e,t)};we.useMemo=function(e,t){return Zt.current.useMemo(e,t)};we.useReducer=function(e,t,r){return Zt.current.useReducer(e,t,r)};we.useRef=function(e){return Zt.current.useRef(e)};we.useState=function(e){return Zt.current.useState(e)};we.useSyncExternalStore=function(e,t,r){return Zt.current.useSyncExternalStore(e,t,r)};we.useTransition=function(){return Zt.current.useTransition()};we.version="18.3.1"});var vv=O((ke,mu)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e="18.3.1",t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function b(x){if(x===null||typeof x!="object")return null;var C=h&&x[h]||x[y];return typeof C=="function"?C:null}var m={current:null},g={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},S={current:null},I={},v=null;function w(x){v=x}I.setExtraStackFrame=function(x){v=x},I.getCurrentStack=null,I.getStackAddendum=function(){var x="";v&&(x+=v);var C=I.getCurrentStack;return C&&(x+=C()||""),x};var k=!1,N=!1,R=!1,F=!1,G=!1,B={ReactCurrentDispatcher:m,ReactCurrentBatchConfig:g,ReactCurrentOwner:S};B.ReactDebugCurrentFrame=I,B.ReactCurrentActQueue=T;function Z(x){{for(var C=arguments.length,L=new Array(C>1?C-1:0),U=1;U<C;U++)L[U-1]=arguments[U];_e("warn",x,L)}}function X(x){{for(var C=arguments.length,L=new Array(C>1?C-1:0),U=1;U<C;U++)L[U-1]=arguments[U];_e("error",x,L)}}function _e(x,C,L){{var U=B.ReactDebugCurrentFrame,ee=U.getStackAddendum();ee!==""&&(C+="%s",L=L.concat([ee]));var he=L.map(function(ie){return String(ie)});he.unshift("Warning: "+C),Function.prototype.apply.call(console[x],console,he)}}var D={};function re(x,C){{var L=x.constructor,U=L&&(L.displayName||L.name)||"ReactClass",ee=U+"."+C;if(D[ee])return;X("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",C,U),D[ee]=!0}}var E={isMounted:function(x){return!1},enqueueForceUpdate:function(x,C,L){re(x,"forceUpdate")},enqueueReplaceState:function(x,C,L,U){re(x,"replaceState")},enqueueSetState:function(x,C,L,U){re(x,"setState")}},A=Object.assign,M={};Object.freeze(M);function P(x,C,L){this.props=x,this.context=C,this.refs=M,this.updater=L||E}P.prototype.isReactComponent={},P.prototype.setState=function(x,C){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,C,"setState")},P.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};{var $={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},J=function(x,C){Object.defineProperty(P.prototype,x,{get:function(){Z("%s(...) is deprecated in plain JavaScript React classes. %s",C[0],C[1])}})};for(var H in $)$.hasOwnProperty(H)&&J(H,$[H])}function z(){}z.prototype=P.prototype;function se(x,C,L){this.props=x,this.context=C,this.refs=M,this.updater=L||E}var de=se.prototype=new z;de.constructor=se,A(de,P.prototype),de.isPureReactComponent=!0;function ue(){var x={current:null};return Object.seal(x),x}var fe=Array.isArray;function be(x){return fe(x)}function V(x){{var C=typeof Symbol=="function"&&Symbol.toStringTag,L=C&&x[Symbol.toStringTag]||x.constructor.name||"Object";return L}}function te(x){try{return q(x),!1}catch{return!0}}function q(x){return""+x}function Q(x){if(te(x))return X("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",V(x)),q(x)}function Te(x,C,L){var U=x.displayName;if(U)return U;var ee=C.displayName||C.name||"";return ee!==""?L+"("+ee+")":L}function Ne(x){return x.displayName||"Context"}function qe(x){if(x==null)return null;if(typeof x.tag=="number"&&X("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case s:var C=x;return Ne(C)+".Consumer";case i:var L=x;return Ne(L._context)+".Provider";case l:return Te(x,x.render,"ForwardRef");case d:var U=x.displayName||null;return U!==null?U:qe(x.type)||"Memo";case f:{var ee=x,he=ee._payload,ie=ee._init;try{return qe(ie(he))}catch{return null}}}return null}var lt=Object.prototype.hasOwnProperty,et={key:!0,ref:!0,__self:!0,__source:!0},br,Qt,qt;qt={};function Ot(x){if(lt.call(x,"ref")){var C=Object.getOwnPropertyDescriptor(x,"ref").get;if(C&&C.isReactWarning)return!1}return x.ref!==void 0}function gt(x){if(lt.call(x,"key")){var C=Object.getOwnPropertyDescriptor(x,"key").get;if(C&&C.isReactWarning)return!1}return x.key!==void 0}function zt(x,C){var L=function(){br||(br=!0,X("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};L.isReactWarning=!0,Object.defineProperty(x,"key",{get:L,configurable:!0})}function Lt(x,C){var L=function(){Qt||(Qt=!0,X("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};L.isReactWarning=!0,Object.defineProperty(x,"ref",{get:L,configurable:!0})}function er(x){if(typeof x.ref=="string"&&S.current&&x.__self&&S.current.stateNode!==x.__self){var C=qe(S.current.type);qt[C]||(X('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C,x.ref),qt[C]=!0)}}var Tr=function(x,C,L,U,ee,he,ie){var ye={$$typeof:t,type:x,key:C,ref:L,props:ie,_owner:he};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:U}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function pa(x,C,L){var U,ee={},he=null,ie=null,ye=null,Re=null;if(C!=null){Ot(C)&&(ie=C.ref,er(C)),gt(C)&&(Q(C.key),he=""+C.key),ye=C.__self===void 0?null:C.__self,Re=C.__source===void 0?null:C.__source;for(U in C)lt.call(C,U)&&!et.hasOwnProperty(U)&&(ee[U]=C[U])}var Ze=arguments.length-2;if(Ze===1)ee.children=L;else if(Ze>1){for(var tt=Array(Ze),rt=0;rt<Ze;rt++)tt[rt]=arguments[rt+2];Object.freeze&&Object.freeze(tt),ee.children=tt}if(x&&x.defaultProps){var it=x.defaultProps;for(U in it)ee[U]===void 0&&(ee[U]=it[U])}if(he||ie){var yt=typeof x=="function"?x.displayName||x.name||"Unknown":x;he&&zt(ee,yt),ie&&Lt(ee,yt)}return Tr(x,he,ie,ye,Re,S.current,ee)}function Co(x,C){var L=Tr(x.type,C,x.ref,x._self,x._source,x._owner,x.props);return L}function Oi(x,C,L){if(x==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+x+".");var U,ee=A({},x.props),he=x.key,ie=x.ref,ye=x._self,Re=x._source,Ze=x._owner;if(C!=null){Ot(C)&&(ie=C.ref,Ze=S.current),gt(C)&&(Q(C.key),he=""+C.key);var tt;x.type&&x.type.defaultProps&&(tt=x.type.defaultProps);for(U in C)lt.call(C,U)&&!et.hasOwnProperty(U)&&(C[U]===void 0&&tt!==void 0?ee[U]=tt[U]:ee[U]=C[U])}var rt=arguments.length-2;if(rt===1)ee.children=L;else if(rt>1){for(var it=Array(rt),yt=0;yt<rt;yt++)it[yt]=arguments[yt+2];ee.children=it}return Tr(x.type,he,ie,ye,Re,Ze,ee)}function tn(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}var ha=".",nf=":";function of(x){var C=/[=:]/g,L={"=":"=0",":":"=2"},U=x.replace(C,function(ee){return L[ee]});return"$"+U}var Ml=!1,af=/\/+/g;function ma(x){return x.replace(af,"$&/")}function ga(x,C){return typeof x=="object"&&x!==null&&x.key!=null?(Q(x.key),of(""+x.key)):C.toString(36)}function Dr(x,C,L,U,ee){var he=typeof x;(he==="undefined"||he==="boolean")&&(x=null);var ie=!1;if(x===null)ie=!0;else switch(he){case"string":case"number":ie=!0;break;case"object":switch(x.$$typeof){case t:case r:ie=!0}}if(ie){var ye=x,Re=ee(ye),Ze=U===""?ha+ga(ye,0):U;if(be(Re)){var tt="";Ze!=null&&(tt=ma(Ze)+"/"),Dr(Re,C,tt,"",function(tR){return tR})}else Re!=null&&(tn(Re)&&(Re.key&&(!ye||ye.key!==Re.key)&&Q(Re.key),Re=Co(Re,L+(Re.key&&(!ye||ye.key!==Re.key)?ma(""+Re.key)+"/":"")+Ze)),C.push(Re));return 1}var rt,it,yt=0,At=U===""?ha:U+nf;if(be(x))for(var Kl=0;Kl<x.length;Kl++)rt=x[Kl],it=At+ga(rt,Kl),yt+=Dr(rt,C,L,it,ee);else{var Tf=b(x);if(typeof Tf=="function"){var Hy=x;Tf===Hy.entries&&(Ml||Z("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ml=!0);for(var QP=Tf.call(Hy),Vy,eR=0;!(Vy=QP.next()).done;)rt=Vy.value,it=At+ga(rt,eR++),yt+=Dr(rt,C,L,it,ee)}else if(he==="object"){var jy=String(x);throw new Error("Objects are not valid as a React child (found: "+(jy==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":jy)+"). If you meant to render a collection of children, use an array instead.")}}return yt}function Kn(x,C,L){if(x==null)return x;var U=[],ee=0;return Dr(x,U,"","",function(he){return C.call(L,he,ee++)}),U}function Li(x){var C=0;return Kn(x,function(){C++}),C}function Fl(x,C,L){Kn(x,function(){C.apply(this,arguments)},L)}function sf(x){return Kn(x,function(C){return C})||[]}function Ol(x){if(!tn(x))throw new Error("React.Children.only expected to receive a single React element child.");return x}function lf(x){var C={$$typeof:s,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};C.Provider={$$typeof:i,_context:C};var L=!1,U=!1,ee=!1;{var he={$$typeof:s,_context:C};Object.defineProperties(he,{Provider:{get:function(){return U||(U=!0,X("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),C.Provider},set:function(ie){C.Provider=ie}},_currentValue:{get:function(){return C._currentValue},set:function(ie){C._currentValue=ie}},_currentValue2:{get:function(){return C._currentValue2},set:function(ie){C._currentValue2=ie}},_threadCount:{get:function(){return C._threadCount},set:function(ie){C._threadCount=ie}},Consumer:{get:function(){return L||(L=!0,X("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),C.Consumer}},displayName:{get:function(){return C.displayName},set:function(ie){ee||(Z("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",ie),ee=!0)}}}),C.Consumer=he}return C._currentRenderer=null,C._currentRenderer2=null,C}var Zn=-1,ya=0,Ll=1,cf=2;function Dl(x){if(x._status===Zn){var C=x._result,L=C();if(L.then(function(he){if(x._status===ya||x._status===Zn){var ie=x;ie._status=Ll,ie._result=he}},function(he){if(x._status===ya||x._status===Zn){var ie=x;ie._status=cf,ie._result=he}}),x._status===Zn){var U=x;U._status=ya,U._result=L}}if(x._status===Ll){var ee=x._result;return ee===void 0&&X(`lazy: Expected the result of a dynamic import() call. Instead received: %s
30
+ `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(o=>r.is(o))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function rb(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,n="127.0.0.1",o="9229",a;return(a=t.match(/^(--inspect(-brk)?)$/))!==null?r=a[1]:(a=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=a[1],/^\d+$/.test(a[3])?o=a[3]:n=a[3]):(a=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=a[1],n=a[3],o=a[4]),r&&o!=="0"?`${r}=${n}:${parseInt(o)+1}`:t})}function Bf(){if(Ue.env.NO_COLOR||Ue.env.FORCE_COLOR==="0"||Ue.env.FORCE_COLOR==="false")return!1;if(Ue.env.FORCE_COLOR||Ue.env.CLICOLOR_FORCE!==void 0)return!0}Uf.Command=Df;Uf.useColor=Bf});var sb=O(Sr=>{var{Argument:ob}=Yl(),{Command:$f}=nb(),{CommanderError:_R,InvalidArgumentError:ab}=$i(),{Help:CR}=Af(),{Option:ib}=Ff();Sr.program=new $f;Sr.createCommand=e=>new $f(e);Sr.createOption=(e,t)=>new ib(e,t);Sr.createArgument=(e,t)=>new ob(e,t);Sr.Command=$f;Sr.Option=ib;Sr.Argument=ob;Sr.Help=CR;Sr.CommanderError=_R;Sr.InvalidArgumentError=ab;Sr.InvalidOptionArgumentError=ab});var hb=O(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.createCacheKeyComparator=pb;xa.defaultEqualityCheck=void 0;xa.defaultMemoize=RR;var Ql="NOT_FOUND";function AR(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:Ql},put:function(n,o){t={key:n,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function PR(e,t){var r=[];function n(s){var l=r.findIndex(function(u){return t(s,u.key)});if(l>-1){var c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return Ql}function o(s,l){n(s)===Ql&&(r.unshift({key:s,value:l}),r.length>e&&r.pop())}function a(){return r}function i(){r=[]}return{get:n,put:o,getEntries:a,clear:i}}var fb=function(t,r){return t===r};xa.defaultEqualityCheck=fb;function pb(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;for(var o=r.length,a=0;a<o;a++)if(!e(r[a],n[a]))return!1;return!0}}function RR(e,t){var r=typeof t=="object"?t:{equalityCheck:t},n=r.equalityCheck,o=n===void 0?fb:n,a=r.maxSize,i=a===void 0?1:a,s=r.resultEqualityCheck,l=pb(o),c=i===1?AR(l):PR(i,l);function u(){var d=c.get(arguments);if(d===Ql){if(d=e.apply(null,arguments),s){var f=c.getEntries(),p=f.find(function(h){return s(h.value,d)});p&&(d=p.value)}c.put(arguments,d)}return d}return u.clearCache=function(){return c.clear()},u}});var Kt=O(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.createSelector=void 0;xn.createSelectorCreator=mb;xn.createStructuredSelector=void 0;Object.defineProperty(xn,"defaultEqualityCheck",{enumerable:!0,get:function(){return Gf.defaultEqualityCheck}});Object.defineProperty(xn,"defaultMemoize",{enumerable:!0,get:function(){return Gf.defaultMemoize}});var Gf=hb();function MR(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(n){return typeof n=="function"})){var r=t.map(function(n){return typeof n=="function"?"function "+(n.name||"unnamed")+"()":typeof n}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function mb(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];var c=0,u,d={memoizeOptions:void 0},f=s.pop();if(typeof f=="object"&&(d=f,f=s.pop()),typeof f!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof f+"]");var p=d,h=p.memoizeOptions,y=h===void 0?r:h,b=Array.isArray(y)?y:[y],g=MR(s),m=e.apply(void 0,[function(){return c++,f.apply(null,arguments)}].concat(b)),T=e(function(){for(var I=[],v=g.length,w=0;w<v;w++)I.push(g[w].apply(null,arguments));return u=m.apply(null,I),u});return Object.assign(T,{resultFunc:f,memoizedResultFunc:m,dependencies:g,lastResult:function(){return u},recomputations:function(){return c},resetRecomputations:function(){return c=0}}),T};return o}var gb=mb(Gf.defaultMemoize);xn.createSelector=gb;var FR=function(t,r){if(r===void 0&&(r=gb),typeof t!="object")throw new Error("createStructuredSelector expects first argument to be an object "+("where each property is a selector, instead received a "+typeof t));var n=Object.keys(t),o=r(n.map(function(a){return t[a]}),function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return i.reduce(function(l,c,u){return l[n[u]]=c,l},{})});return o};xn.createStructuredSelector=FR});var Tb=O((ec,bb)=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var OR=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function yb(e){e&&"limit"in e&&(this._limit=e.limit),this.clear()}yb.prototype={toString:function(){return"[object TupleMap]"},_hash:function(t){if(t===this._lastTuple)return this._lastHash;for(var r=t.length,n=[],o=0;o<r;o++){var a=t[o],i=typeof a>"u"?"undefined":OR(a);if(a!==null&&(i==="object"||i==="function"))if(this._idMap.has(a))n.push(this._idMap.get(a));else{var s="#"+this._id++;this._idMap.set(a,s),n.push(s)}else n.push(i==="string"?'"'+a+'"':""+a)}return this._lastTuple=t,this._lastHash=n.join("/<[MI_SEP]>/"),this._lastHash},has:function(t){var r=this._hash(t);return this._cache.has(r)},set:function(t,r){var n=this._hash(t);return this._limit!==void 0&&this._cache.delete(n),this._cache.set(n,r),this._limit!==void 0&&this._cache.size>this._limit&&this._cache.delete(this._cache.keys().next().value),this},get:function(t){var r=this._hash(t);if(this._limit!==void 0&&this._cache.has(r)){var n=this._cache.get(r);return this._cache.delete(r),this._cache.set(r,n),n}return this._cache.get(r)},clear:function(){this._cache=new Map,this._idMap=new WeakMap,this._id=0,delete this._lastTuple,delete this._lastHash}};ec.default=yb;bb.exports=ec.default});var Ia=O((tc,Sb)=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var LR=Tb(),DR=BR(LR);function BR(e){return e&&e.__esModule?e:{default:e}}if(typeof WeakMap>"u"||typeof Map>"u")throw new Error("This lib requires an implementation of WeakMap and Map");function UR(e,t){var r=t&&t.cache||new DR.default(t),n=void 0;return/^\[object (Weak|LRU|NamedTuple)?Map\]$/.test(r.toString())?n=function(a){if(!r.has(a)){var i=e.call(this,a);return r.set(a,i),i}return r.get(a)}:n=function(){if(!r.has(arguments)){var a=e.apply(this,arguments);return r.set(arguments,a),a}return r.get(arguments)},e.name&&(n.displayName=e.name+"Memoized"),n}tc.default=UR;Sb.exports=tc.default});var Wf=O((rc,Ib)=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var $R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function xb(){this.clear()}xb.prototype={toString:function(){return"[object MixedTupleMap]"},_hash:function(t){if(t===this._lastTuple)return this._lastHash;for(var r=t.length,n=[],o=[],a=[],i=0;i<r;i++){var s=t[i],l=typeof s>"u"?"undefined":$R(s);l!==null&&(l==="object"||l==="function")?a.push(i):(n.push(l==="string"?'"'+s+'"':""+s),o.push(i))}if(a.length===0)throw new Error("Tuple must have at least one non-primitive part");return n.push("["+a.concat(o).join()+"]"),this._lastTuple=t,this._lastHash={nonPrimOrder:a,primHash:n.join("/<[MI_SEP]>/")},this._lastHash},has:function(t){for(var r=this._cache,n=this._hash(t),o=n.nonPrimOrder.length,a=0;a<o;a++){var i=t[n.nonPrimOrder[a]];if(r.has&&r.has(i))r=r.get(i);else return!1}return(r.has||!1)&&r.has(n.primHash)},set:function(t,r){for(var n=this._cache,o=this._hash(t),a=o.nonPrimOrder.length,i=!1,s=0;s<a;s++){var l=t[o.nonPrimOrder[s]];!i&&n.has(l)?n=n.get(l):(i=!0,n.set(l,n=s<a-1?new WeakMap:new Map))}return n.set(o.primHash,r),this},get:function(t){for(var r=this._cache,n=this._hash(t),o=n.nonPrimOrder.length,a=0;a<o;a++){var i=t[n.nonPrimOrder[a]],s=r.get&&r.get(i);if(s===void 0)return s;r=s}return r.get&&r.get(n.primHash)},clear:function(){this._cache=new WeakMap,delete this._lastTuple,delete this._lastHash}};rc.default=xb;Ib.exports=rc.default});var wb=O((nc,vb)=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var GR=(function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}})(),WR=HR(["",""],["",""]);function HR(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function VR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var jR=(function(){function e(){for(var t=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return VR(this,e),this.tag=function(a){for(var i=arguments.length,s=Array(i>1?i-1:0),l=1;l<i;l++)s[l-1]=arguments[l];return typeof a=="function"?t.interimTag.bind(t,a):typeof a=="string"?t.transformEndResult(a):(a=a.map(t.transformString.bind(t)),t.transformEndResult(a.reduce(t.processSubstitutions.bind(t,s))))},n.length>0&&Array.isArray(n[0])&&(n=n[0]),this.transformers=n.map(function(a){return typeof a=="function"?a():a}),this.tag}return GR(e,[{key:"interimTag",value:function(r,n){for(var o=arguments.length,a=Array(o>2?o-2:0),i=2;i<o;i++)a[i-2]=arguments[i];return this.tag(WR,r.apply(void 0,[n].concat(a)))}},{key:"processSubstitutions",value:function(r,n,o){var a=this.transformSubstitution(r.shift(),n);return"".concat(n,a,o)}},{key:"transformString",value:function(r){var n=function(a,i){return i.onString?i.onString(a):a};return this.transformers.reduce(n,r)}},{key:"transformSubstitution",value:function(r,n){var o=function(i,s){return s.onSubstitution?s.onSubstitution(i,n):i};return this.transformers.reduce(o,r)}},{key:"transformEndResult",value:function(r){var n=function(a,i){return i.onEndResult?i.onEndResult(a):a};return this.transformers.reduce(n,r)}}]),e})();nc.default=jR;vb.exports=nc.default});var Bt=O((Gi,kb)=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.default=void 0;var qR=wb(),zR=KR(qR);function KR(e){return e&&e.__esModule?e:{default:e}}Gi.default=zR.default;kb.exports=Gi.default});var Cb=O((oc,_b)=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var ZR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(n){if(t==="")return n.trim();if(t=t.toLowerCase(),t==="start"||t==="left")return n.replace(/^\s*/,"");if(t==="end"||t==="right")return n.replace(/\s*$/,"");throw new Error("Side not supported: "+t)}}};oc.default=ZR;_b.exports=oc.default});var Ut=O((Wi,Eb)=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.default=void 0;var JR=Cb(),YR=XR(JR);function XR(e){return e&&e.__esModule?e:{default:e}}Wi.default=YR.default;Eb.exports=Wi.default});var Ab=O((ac,Nb)=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});function QR(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else return Array.from(e)}var eM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(n){if(t==="initial"){var o=n.match(/^[^\S\n]*(?=\S)/gm),a=o&&Math.min.apply(Math,QR(o.map(function(s){return s.length})));if(a){var i=new RegExp("^.{"+a+"}","gm");return n.replace(i,"")}return n}if(t==="all")return n.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+t)}}};ac.default=eM;Nb.exports=ac.default});var rn=O((Hi,Pb)=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.default=void 0;var tM=Ab(),rM=nM(tM);function nM(e){return e&&e.__esModule?e:{default:e}}Hi.default=rM.default;Pb.exports=Hi.default});var Mb=O((ic,Rb)=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var oM=function(t,r){return{onEndResult:function(o){if(t==null||r==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return o.replace(t,r)}}};ic.default=oM;Rb.exports=ic.default});var Yn=O((Vi,Fb)=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.default=void 0;var aM=Mb(),iM=sM(aM);function sM(e){return e&&e.__esModule?e:{default:e}}Vi.default=iM.default;Fb.exports=Vi.default});var Lb=O((sc,Ob)=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var lM=function(t,r){return{onSubstitution:function(o,a){if(t==null||r==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return o==null?o:o.toString().replace(t,r)}}};sc.default=lM;Ob.exports=sc.default});var Hf=O((ji,Db)=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.default=void 0;var cM=Lb(),uM=dM(cM);function dM(e){return e&&e.__esModule?e:{default:e}}ji.default=uM.default;Db.exports=ji.default});var Ub=O((lc,Bb)=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var fM=function(t,r){return{onString:function(o){if(t==null||r==null)throw new Error("replaceStringTransformer requires at least 2 arguments.");return o.replace(t,r)}}};lc.default=fM;Bb.exports=lc.default});var Gb=O((qi,$b)=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.default=void 0;var pM=Ub(),hM=mM(pM);function mM(e){return e&&e.__esModule?e:{default:e}}qi.default=hM.default;$b.exports=qi.default});var Hb=O((cc,Wb)=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var gM={separator:"",conjunction:"",serial:!1},yM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gM;return{onSubstitution:function(n,o){if(Array.isArray(n)){var a=n.length,i=t.separator,s=t.conjunction,l=t.serial,c=o.match(/(\n?[^\S\n]+)$/);if(c?n=n.join(i+c[1]):n=n.join(i+" "),s&&a>1){var u=n.lastIndexOf(i);n=n.slice(0,u)+(l?i:"")+" "+s+n.slice(u+1)}}return n}}};cc.default=yM;Wb.exports=cc.default});var xr=O((zi,Vb)=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.default=void 0;var bM=Hb(),TM=SM(bM);function SM(e){return e&&e.__esModule?e:{default:e}}zi.default=TM.default;Vb.exports=zi.default});var qb=O((uc,jb)=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var xM=function(t){return{onSubstitution:function(n,o){if(t!=null&&typeof t=="string")typeof n=="string"&&n.includes(t)&&(n=n.split(t));else throw new Error("You need to specify a string character to split by.");return n}}};uc.default=xM;jb.exports=uc.default});var dc=O((Ki,zb)=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.default=void 0;var IM=qb(),vM=wM(IM);function wM(e){return e&&e.__esModule?e:{default:e}}Ki.default=vM.default;zb.exports=Ki.default});var Jb=O((fc,Zb)=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var Kb=function(t){return t!=null&&!Number.isNaN(t)&&typeof t!="boolean"},kM=function(){return{onSubstitution:function(r){return Array.isArray(r)?r.filter(Kb):Kb(r)?r:""}}};fc.default=kM;Zb.exports=fc.default});var Vf=O((Zi,Yb)=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.default=void 0;var _M=Jb(),CM=EM(_M);function EM(e){return e&&e.__esModule?e:{default:e}}Zi.default=CM.default;Yb.exports=Zi.default});var Qb=O((hc,Xb)=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var NM=Bt(),AM=pc(NM),PM=rn(),RM=pc(PM),MM=xr(),FM=pc(MM),OM=Ut(),LM=pc(OM);function pc(e){return e&&e.__esModule?e:{default:e}}var DM=new AM.default((0,FM.default)({separator:","}),RM.default,LM.default);hc.default=DM;Xb.exports=hc.default});var tT=O((Ji,eT)=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=void 0;var BM=Qb(),UM=$M(BM);function $M(e){return e&&e.__esModule?e:{default:e}}Ji.default=UM.default;eT.exports=Ji.default});var nT=O((gc,rT)=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var GM=Bt(),WM=mc(GM),HM=rn(),VM=mc(HM),jM=xr(),qM=mc(jM),zM=Ut(),KM=mc(zM);function mc(e){return e&&e.__esModule?e:{default:e}}var ZM=new WM.default((0,qM.default)({separator:",",conjunction:"and"}),VM.default,KM.default);gc.default=ZM;rT.exports=gc.default});var aT=O((Yi,oT)=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=void 0;var JM=nT(),YM=XM(JM);function XM(e){return e&&e.__esModule?e:{default:e}}Yi.default=YM.default;oT.exports=Yi.default});var sT=O((bc,iT)=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var QM=Bt(),eF=yc(QM),tF=rn(),rF=yc(tF),nF=xr(),oF=yc(nF),aF=Ut(),iF=yc(aF);function yc(e){return e&&e.__esModule?e:{default:e}}var sF=new eF.default((0,oF.default)({separator:",",conjunction:"or"}),rF.default,iF.default);bc.default=sF;iT.exports=bc.default});var cT=O((Xi,lT)=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.default=void 0;var lF=sT(),cF=uF(lF);function uF(e){return e&&e.__esModule?e:{default:e}}Xi.default=cF.default;lT.exports=Xi.default});var dT=O((Tc,uT)=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var dF=Bt(),fF=va(dF),pF=rn(),hF=va(pF),mF=xr(),gF=va(mF),yF=Ut(),bF=va(yF),TF=dc(),SF=va(TF),xF=Vf(),IF=va(xF);function va(e){return e&&e.__esModule?e:{default:e}}var vF=new fF.default((0,SF.default)(`
31
+ `),IF.default,gF.default,hF.default,bF.default);Tc.default=vF;uT.exports=Tc.default});var Sc=O((Qi,fT)=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.default=void 0;var wF=dT(),kF=_F(wF);function _F(e){return e&&e.__esModule?e:{default:e}}Qi.default=kF.default;fT.exports=Qi.default});var hT=O((es,pT)=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.default=void 0;var CF=Sc(),EF=NF(CF);function NF(e){return e&&e.__esModule?e:{default:e}}es.default=EF.default;pT.exports=es.default});var gT=O((ts,mT)=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.default=void 0;var AF=Sc(),PF=RF(AF);function RF(e){return e&&e.__esModule?e:{default:e}}ts.default=PF.default;mT.exports=ts.default});var bT=O((xc,yT)=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var MF=Bt(),FF=ka(MF),OF=rn(),LF=ka(OF),DF=xr(),BF=ka(DF),UF=Ut(),$F=ka(UF),GF=dc(),WF=ka(GF),HF=Hf(),wa=ka(HF);function ka(e){return e&&e.__esModule?e:{default:e}}var VF=new FF.default((0,WF.default)(`
32
+ `),BF.default,LF.default,$F.default,(0,wa.default)(/&/g,"&amp;"),(0,wa.default)(/</g,"&lt;"),(0,wa.default)(/>/g,"&gt;"),(0,wa.default)(/"/g,"&quot;"),(0,wa.default)(/'/g,"&#x27;"),(0,wa.default)(/`/g,"&#x60;"));xc.default=VF;yT.exports=xc.default});var ST=O((rs,TT)=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.default=void 0;var jF=bT(),qF=zF(jF);function zF(e){return e&&e.__esModule?e:{default:e}}rs.default=qF.default;TT.exports=rs.default});var IT=O((Ic,xT)=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var KF=Bt(),ZF=jf(KF),JF=Ut(),YF=jf(JF),XF=Yn(),QF=jf(XF);function jf(e){return e&&e.__esModule?e:{default:e}}var eO=new ZF.default((0,QF.default)(/(?:\n(?:\s*))+/g," "),YF.default);Ic.default=eO;xT.exports=Ic.default});var wT=O((ns,vT)=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.default=void 0;var tO=IT(),rO=nO(tO);function nO(e){return e&&e.__esModule?e:{default:e}}ns.default=rO.default;vT.exports=ns.default});var _T=O((vc,kT)=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var oO=Bt(),aO=qf(oO),iO=Ut(),sO=qf(iO),lO=Yn(),cO=qf(lO);function qf(e){return e&&e.__esModule?e:{default:e}}var uO=new aO.default((0,cO.default)(/(?:\n\s*)/g,""),sO.default);vc.default=uO;kT.exports=vc.default});var ET=O((os,CT)=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.default=void 0;var dO=_T(),fO=pO(dO);function pO(e){return e&&e.__esModule?e:{default:e}}os.default=fO.default;CT.exports=os.default});var AT=O((kc,NT)=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var hO=Bt(),mO=wc(hO),gO=xr(),yO=wc(gO),bO=Ut(),TO=wc(bO),SO=Yn(),xO=wc(SO);function wc(e){return e&&e.__esModule?e:{default:e}}var IO=new mO.default((0,yO.default)({separator:","}),(0,xO.default)(/(?:\s+)/g," "),TO.default);kc.default=IO;NT.exports=kc.default});var RT=O((as,PT)=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.default=void 0;var vO=AT(),wO=kO(vO);function kO(e){return e&&e.__esModule?e:{default:e}}as.default=wO.default;PT.exports=as.default});var FT=O((Cc,MT)=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var _O=Bt(),CO=_c(_O),EO=xr(),NO=_c(EO),AO=Ut(),PO=_c(AO),RO=Yn(),MO=_c(RO);function _c(e){return e&&e.__esModule?e:{default:e}}var FO=new CO.default((0,NO.default)({separator:",",conjunction:"or"}),(0,MO.default)(/(?:\s+)/g," "),PO.default);Cc.default=FO;MT.exports=Cc.default});var LT=O((is,OT)=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.default=void 0;var OO=FT(),LO=DO(OO);function DO(e){return e&&e.__esModule?e:{default:e}}is.default=LO.default;OT.exports=is.default});var BT=O((Nc,DT)=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var BO=Bt(),UO=Ec(BO),$O=xr(),GO=Ec($O),WO=Ut(),HO=Ec(WO),VO=Yn(),jO=Ec(VO);function Ec(e){return e&&e.__esModule?e:{default:e}}var qO=new UO.default((0,GO.default)({separator:",",conjunction:"and"}),(0,jO.default)(/(?:\s+)/g," "),HO.default);Nc.default=qO;DT.exports=Nc.default});var $T=O((ss,UT)=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.default=void 0;var zO=BT(),KO=ZO(zO);function ZO(e){return e&&e.__esModule?e:{default:e}}ss.default=KO.default;UT.exports=ss.default});var WT=O((Pc,GT)=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var JO=Bt(),YO=Ac(JO),XO=rn(),QO=Ac(XO),e1=xr(),t1=Ac(e1),r1=Ut(),n1=Ac(r1);function Ac(e){return e&&e.__esModule?e:{default:e}}var o1=new YO.default(t1.default,QO.default,n1.default);Pc.default=o1;GT.exports=Pc.default});var VT=O((ls,HT)=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.default=void 0;var a1=WT(),i1=s1(a1);function s1(e){return e&&e.__esModule?e:{default:e}}ls.default=i1.default;HT.exports=ls.default});var qT=O((Mc,jT)=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var l1=Bt(),c1=Rc(l1),u1=xr(),d1=Rc(u1),f1=Ut(),p1=Rc(f1),h1=Yn(),m1=Rc(h1);function Rc(e){return e&&e.__esModule?e:{default:e}}var g1=new c1.default(d1.default,(0,m1.default)(/(?:\s+)/g," "),p1.default);Mc.default=g1;jT.exports=Mc.default});var KT=O((cs,zT)=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.default=void 0;var y1=qT(),b1=T1(y1);function T1(e){return e&&e.__esModule?e:{default:e}}cs.default=b1.default;zT.exports=cs.default});var JT=O((Fc,ZT)=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var S1=Bt(),x1=zf(S1),I1=rn(),v1=zf(I1),w1=Ut(),k1=zf(w1);function zf(e){return e&&e.__esModule?e:{default:e}}var _1=new x1.default(v1.default,k1.default);Fc.default=_1;ZT.exports=Fc.default});var XT=O((us,YT)=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.default=void 0;var C1=JT(),E1=N1(C1);function N1(e){return e&&e.__esModule?e:{default:e}}us.default=E1.default;YT.exports=us.default});var eS=O((Oc,QT)=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var A1=Bt(),P1=Kf(A1),R1=rn(),M1=Kf(R1),F1=Ut(),O1=Kf(F1);function Kf(e){return e&&e.__esModule?e:{default:e}}var L1=new P1.default((0,M1.default)("all"),O1.default);Oc.default=L1;QT.exports=Oc.default});var rS=O((ds,tS)=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});ds.default=void 0;var D1=eS(),B1=U1(D1);function U1(e){return e&&e.__esModule?e:{default:e}}ds.default=B1.default;tS.exports=ds.default});var Ir=O(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.stripIndents=pe.stripIndent=pe.oneLineInlineLists=pe.inlineLists=pe.oneLineCommaListsAnd=pe.oneLineCommaListsOr=pe.oneLineCommaLists=pe.oneLineTrim=pe.oneLine=pe.safeHtml=pe.source=pe.codeBlock=pe.html=pe.commaListsOr=pe.commaListsAnd=pe.commaLists=pe.removeNonPrintingValuesTransformer=pe.splitStringTransformer=pe.inlineArrayTransformer=pe.replaceStringTransformer=pe.replaceSubstitutionTransformer=pe.replaceResultTransformer=pe.stripIndentTransformer=pe.trimResultTransformer=pe.TemplateTag=void 0;var $1=Bt(),G1=Xe($1),W1=Ut(),H1=Xe(W1),V1=rn(),j1=Xe(V1),q1=Yn(),z1=Xe(q1),K1=Hf(),Z1=Xe(K1),J1=Gb(),Y1=Xe(J1),X1=xr(),Q1=Xe(X1),eL=dc(),tL=Xe(eL),rL=Vf(),nL=Xe(rL),oL=tT(),aL=Xe(oL),iL=aT(),sL=Xe(iL),lL=cT(),cL=Xe(lL),uL=Sc(),dL=Xe(uL),fL=hT(),pL=Xe(fL),hL=gT(),mL=Xe(hL),gL=ST(),yL=Xe(gL),bL=wT(),TL=Xe(bL),SL=ET(),xL=Xe(SL),IL=RT(),vL=Xe(IL),wL=LT(),kL=Xe(wL),_L=$T(),CL=Xe(_L),EL=VT(),NL=Xe(EL),AL=KT(),PL=Xe(AL),RL=XT(),ML=Xe(RL),FL=rS(),OL=Xe(FL);function Xe(e){return e&&e.__esModule?e:{default:e}}pe.TemplateTag=G1.default;pe.trimResultTransformer=H1.default;pe.stripIndentTransformer=j1.default;pe.replaceResultTransformer=z1.default;pe.replaceSubstitutionTransformer=Z1.default;pe.replaceStringTransformer=Y1.default;pe.inlineArrayTransformer=Q1.default;pe.splitStringTransformer=tL.default;pe.removeNonPrintingValuesTransformer=nL.default;pe.commaLists=aL.default;pe.commaListsAnd=sL.default;pe.commaListsOr=cL.default;pe.html=dL.default;pe.codeBlock=pL.default;pe.source=mL.default;pe.safeHtml=yL.default;pe.oneLine=TL.default;pe.oneLineTrim=xL.default;pe.oneLineCommaLists=vL.default;pe.oneLineCommaListsOr=kL.default;pe.oneLineCommaListsAnd=CL.default;pe.inlineLists=NL.default;pe.oneLineInlineLists=PL.default;pe.stripIndent=ML.default;pe.stripIndents=OL.default});var nS,Ao,rr=No(()=>{"use strict";nS="profile-store",Ao="https://symbolication.services.mozilla.com"});function oS(){return{weightType:"samples",weight:null,stack:[],time:[],length:0}}function nn(){return{frame:[],prefix:[],length:0}}function _a(){return{weightType:"samples",weight:null,eventDelay:[],stack:[],time:[],length:0}}function Ca(){return{address:[],inlineDepth:[],category:[],subcategory:[],func:[],nativeSymbol:[],innerWindowID:[],line:[],column:[],length:0}}function Lc(e){return{address:e.address.slice(),inlineDepth:e.inlineDepth.slice(),category:e.category.slice(),subcategory:e.subcategory.slice(),func:e.func.slice(),nativeSymbol:e.nativeSymbol.slice(),innerWindowID:e.innerWindowID.slice(),line:e.line.slice(),column:e.column.slice(),length:e.length}}function Ea(){return{isJS:[],relevantForJS:[],name:[],resource:[],source:[],lineNumber:[],columnNumber:[],length:0}}function Na(e){return{isJS:e.isJS.slice(),relevantForJS:e.relevantForJS.slice(),name:e.name.slice(),resource:e.resource.slice(),source:e.source.slice(),lineNumber:e.lineNumber.slice(),columnNumber:e.columnNumber.slice(),length:e.length}}function aS(e){return{libIndex:e.libIndex.slice(),address:e.address.slice(),name:e.name.slice(),functionSize:e.functionSize.slice(),length:e.length}}function Aa(){return{lib:[],name:[],host:[],type:[],length:0}}function Pa(){return{libIndex:[],address:[],name:[],functionSize:[],length:0}}function Ur(){return{data:[],name:[],startTime:[],endTime:[],phase:[],category:[],length:0}}function iS(){return{time:[],className:[],typeName:[],coarseType:[],weight:[],weightType:"bytes",inNursery:[],stack:[],length:0}}function Dc(){return{time:[],weight:[],weightType:"bytes",stack:[],length:0}}function Zf(e){return{data:e.data.slice(),name:e.name.slice(),startTime:e.startTime.slice(),endTime:e.endTime.slice(),phase:e.phase.slice(),category:e.category.slice(),length:e.length}}function fs(){return{id:[],name:[],baseURL:[],length:0}}function Jf(){return[{name:"Other",color:"grey",subcategories:["Other"]},{name:"Idle",color:"transparent",subcategories:["Other"]},{name:"Layout",color:"purple",subcategories:["Other"]},{name:"JavaScript",color:"yellow",subcategories:["Other"]},{name:"GC / CC",color:"orange",subcategories:["Other"]},{name:"Network",color:"lightblue",subcategories:["Other"]},{name:"Graphics",color:"green",subcategories:["Other"]},{name:"DOM",color:"blue",subcategories:["Other"]}]}function Ra(){return{id:[],filename:[],startLine:[],startColumn:[],sourceMapURL:[],length:0}}function Ma(e){return{...{processType:"default",processStartupTime:0,processShutdownTime:null,registerTime:0,unregisterTime:null,pausedRanges:[],name:"Empty",isMainThread:!1,pid:"0",tid:0,samples:_a(),markers:Ur()},...e}}function LL(){return{stackTable:nn(),frameTable:Ca(),funcTable:Ea(),resourceTable:Aa(),nativeSymbols:Pa(),sources:Ra(),stringArray:[]}}function Ro(){return{meta:{interval:1,startTime:0,abi:"",misc:"",oscpu:"",platform:"",processType:0,extensions:fs(),categories:Jf(),product:"Firefox",stackwalk:0,toolkit:"",version:34,preprocessedProfileVersion:62,appBuildID:"",sourceURL:"",physicalCPUs:0,logicalCPUs:0,CPUName:"",symbolicated:!0,markerSchema:[]},libs:[],pages:[],shared:LL(),threads:[]}}function sS(){return{prefix:new Int32Array(0),subtreeRangeEnd:new Uint32Array(0),nextSibling:new Int32Array(0),func:new Int32Array(0),category:new Int32Array(0),subcategory:new Int32Array(0),innerWindowID:new Float64Array(0),sourceFramesInlinedIntoSymbol:new Int32Array(0),depth:new Int32Array(0),maxDepth:-1,length:0}}var nr=No(()=>{"use strict";rr()});function ae(e,t=`There was an unhandled case for the value: "${e}"`){throw new Error(t)}function dS(e,...t){return Object.assign({},e,...t)}function fS(e){let t=e;switch(t){case"calltree":case"stack-chart":case"marker-chart":case"network-chart":case"marker-table":case"flame-graph":case"js-tracer":return t;default:return null}}function pS(e){let t=fS(e);if(!t)throw new Error(`Attempted to assert that "${e}" is a valid TransformType, and it was not.`);return t}function hS(e){let t=e;switch(t){case"merge-call-node":case"merge-function":case"focus-subtree":case"focus-function":case"focus-category":case"drop-category":case"focus-self":case"collapse-resource":case"collapse-direct-recursion":case"collapse-recursion":case"collapse-function-subtree":case"drop-function":case"filter-samples":return t;default:return null}}function ps(e){return Object.entries(e)}function Bc(e,t){let r={};for(let[n,o]of ps(e))r[n]=t(o,n);return r}function W(e,t){if(e===null)throw new Error(t||"Expected an item to exist, and it was null.");if(e===void 0)throw new Error(t||"Expected an item to exist, and it was undefined.");return e}function vn(e){return e.values().next().value}var xe=No(()=>{"use strict"});var ox,$e,ur=No(()=>{"use strict";ox=new WeakMap,$e=class e{_array;_stringToIndex;constructor(t){this._array=t,this._stringToIndex=new Map;for(let r=0;r<t.length;r++)this._stringToIndex.set(t[r],r)}static withBackingArray(t){let r=ox.get(t);return r===void 0&&(r=new e(t),ox.set(t,r)),r}getString(t,r){if(!this.hasIndex(t)){if(r)return console.warn(`index ${t} not in StringTable`),r;throw new Error(`index ${t} not in StringTable`)}return this._array[t]}hasIndex(t){return t in this._array}hasString(t){return this._stringToIndex.has(t)}indexForString(t){let r=this._stringToIndex.get(t);return r===void 0&&(r=this._array.length,this._stringToIndex.set(t,r),this._array.push(t)),r}getBackingArray(){return this._array}}});var ix=O((Nz,ax)=>{"use strict";ax.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}});var Gx=O((Yc,$x)=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var $D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Ux(e){e&&"limit"in e&&(this._limit=e.limit),this.clear()}Ux.prototype={toString:function(){return"[object NamedTupleMap]"},_hash:function(t){if(t===this._lastTuple)return this._lastHash;for(var r=Object.keys(t),n=r.length,o=[],a=0;a<n;a++){var i=r[a],s=t[i],l=typeof s>"u"?"undefined":$D(s);if(s!==null&&(l==="object"||l==="function"))if(this._idMap.has(s))o.push(this._idMap.get(s));else{var c="#"+this._id++;this._idMap.set(s,c),o.push(c)}else o.push(l==="string"?'"'+s+'"':""+s)}return o.push('{"'+r.join('","')+'"}'),this._lastTuple=t,this._lastHash=o.join("/<[MI_SEP]>/"),this._lastHash},has:function(t){var r=this._hash(t);return this._cache.has(r)},set:function(t,r){var n=this._hash(t);return this._limit!==void 0&&this._cache.delete(n),this._cache.set(n,r),this._limit!==void 0&&this._cache.size>this._limit&&this._cache.delete(this._cache.keys().next().value),this},get:function(t){var r=this._hash(t);if(this._limit!==void 0&&this._cache.has(r)){var n=this._cache.get(r);return this._cache.delete(r),this._cache.set(r,n),n}return this._cache.get(r)},clear:function(){this._cache=new Map,this._idMap=new WeakMap,this._id=0,delete this._lastTuple,delete this._lastHash}};Yc.default=Ux;$x.exports=Yc.default});var fv=O((hu,dv)=>{(function(e,t){typeof hu=="object"&&typeof dv<"u"?t(hu):typeof define=="function"&&define.amd?define("@fluent/sequence",["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FluentSequence={}))})(hu,(function(e){"use strict";function t(o,a){return Array.isArray(a)?a.map(i=>r(o,i)):r(o,a)}function r(o,a){for(let i of o)if(i.hasMessage(a))return i;return null}async function n(o,a){if(!Array.isArray(a)){for await(let l of o)if(l.hasMessage(a))return l;return null}let i=new Array(a.length).fill(null),s=a.length;for await(let l of o)for(let[c,u]of a.entries())if(!i[c]&&l.hasMessage(u)&&(i[c]=l,s--),s===0)return i;return i}e.mapBundleAsync=n,e.mapBundleSync=t}))});var wv=O(we=>{"use strict";var Ms=Symbol.for("react.element"),e$=Symbol.for("react.portal"),t$=Symbol.for("react.fragment"),r$=Symbol.for("react.strict_mode"),n$=Symbol.for("react.profiler"),o$=Symbol.for("react.provider"),a$=Symbol.for("react.context"),i$=Symbol.for("react.forward_ref"),s$=Symbol.for("react.suspense"),l$=Symbol.for("react.memo"),c$=Symbol.for("react.lazy"),pv=Symbol.iterator;function u$(e){return e===null||typeof e!="object"?null:(e=pv&&e[pv]||e["@@iterator"],typeof e=="function"?e:null)}var gv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yv=Object.assign,bv={};function qa(e,t,r){this.props=e,this.context=t,this.refs=bv,this.updater=r||gv}qa.prototype.isReactComponent={};qa.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};qa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tv(){}Tv.prototype=qa.prototype;function eh(e,t,r){this.props=e,this.context=t,this.refs=bv,this.updater=r||gv}var th=eh.prototype=new Tv;th.constructor=eh;yv(th,qa.prototype);th.isPureReactComponent=!0;var hv=Array.isArray,Sv=Object.prototype.hasOwnProperty,rh={current:null},xv={key:!0,ref:!0,__self:!0,__source:!0};function Iv(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)Sv.call(t,n)&&!xv.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:Ms,type:e,key:a,ref:i,props:o,_owner:rh.current}}function d$(e,t){return{$$typeof:Ms,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function nh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ms}function f$(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var mv=/\/+/g;function Qp(e,t){return typeof e=="object"&&e!==null&&e.key!=null?f$(""+e.key):t.toString(36)}function gu(e,t,r,n,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Ms:case e$:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+Qp(i,0):n,hv(o)?(r="",e!=null&&(r=e.replace(mv,"$&/")+"/"),gu(o,t,r,"",function(c){return c})):o!=null&&(nh(o)&&(o=d$(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(mv,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",hv(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+Qp(a,s);i+=gu(a,t,r,l,o)}else if(l=u$(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+Qp(a,s++),i+=gu(a,t,r,l,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function mu(e,t,r){if(e==null)return e;var n=[],o=0;return gu(e,n,"","",function(a){return t.call(r,a,o++)}),n}function p$(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Zt={current:null},yu={transition:null},h$={ReactCurrentDispatcher:Zt,ReactCurrentBatchConfig:yu,ReactCurrentOwner:rh};function vv(){throw Error("act(...) is not supported in production builds of React.")}we.Children={map:mu,forEach:function(e,t,r){mu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return mu(e,function(){t++}),t},toArray:function(e){return mu(e,function(t){return t})||[]},only:function(e){if(!nh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=qa;we.Fragment=t$;we.Profiler=n$;we.PureComponent=eh;we.StrictMode=r$;we.Suspense=s$;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h$;we.act=vv;we.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=yv({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=rh.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)Sv.call(t,l)&&!xv.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:Ms,type:e.type,key:o,ref:a,props:n,_owner:i}};we.createContext=function(e){return e={$$typeof:a$,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o$,_context:e},e.Consumer=e};we.createElement=Iv;we.createFactory=function(e){var t=Iv.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:i$,render:e}};we.isValidElement=nh;we.lazy=function(e){return{$$typeof:c$,_payload:{_status:-1,_result:e},_init:p$}};we.memo=function(e,t){return{$$typeof:l$,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=yu.transition;yu.transition={};try{e()}finally{yu.transition=t}};we.unstable_act=vv;we.useCallback=function(e,t){return Zt.current.useCallback(e,t)};we.useContext=function(e){return Zt.current.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e){return Zt.current.useDeferredValue(e)};we.useEffect=function(e,t){return Zt.current.useEffect(e,t)};we.useId=function(){return Zt.current.useId()};we.useImperativeHandle=function(e,t,r){return Zt.current.useImperativeHandle(e,t,r)};we.useInsertionEffect=function(e,t){return Zt.current.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return Zt.current.useLayoutEffect(e,t)};we.useMemo=function(e,t){return Zt.current.useMemo(e,t)};we.useReducer=function(e,t,r){return Zt.current.useReducer(e,t,r)};we.useRef=function(e){return Zt.current.useRef(e)};we.useState=function(e){return Zt.current.useState(e)};we.useSyncExternalStore=function(e,t,r){return Zt.current.useSyncExternalStore(e,t,r)};we.useTransition=function(){return Zt.current.useTransition()};we.version="18.3.1"});var kv=O((ke,bu)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e="18.3.1",t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function b(x){if(x===null||typeof x!="object")return null;var C=h&&x[h]||x[y];return typeof C=="function"?C:null}var g={current:null},m={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},S={current:null},I={},v=null;function w(x){v=x}I.setExtraStackFrame=function(x){v=x},I.getCurrentStack=null,I.getStackAddendum=function(){var x="";v&&(x+=v);var C=I.getCurrentStack;return C&&(x+=C()||""),x};var k=!1,E=!1,R=!1,F=!1,G=!1,B={ReactCurrentDispatcher:g,ReactCurrentBatchConfig:m,ReactCurrentOwner:S};B.ReactDebugCurrentFrame=I,B.ReactCurrentActQueue=T;function Z(x){{for(var C=arguments.length,L=new Array(C>1?C-1:0),U=1;U<C;U++)L[U-1]=arguments[U];_e("warn",x,L)}}function X(x){{for(var C=arguments.length,L=new Array(C>1?C-1:0),U=1;U<C;U++)L[U-1]=arguments[U];_e("error",x,L)}}function _e(x,C,L){{var U=B.ReactDebugCurrentFrame,ee=U.getStackAddendum();ee!==""&&(C+="%s",L=L.concat([ee]));var he=L.map(function(ie){return String(ie)});he.unshift("Warning: "+C),Function.prototype.apply.call(console[x],console,he)}}var D={};function re(x,C){{var L=x.constructor,U=L&&(L.displayName||L.name)||"ReactClass",ee=U+"."+C;if(D[ee])return;X("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",C,U),D[ee]=!0}}var N={isMounted:function(x){return!1},enqueueForceUpdate:function(x,C,L){re(x,"forceUpdate")},enqueueReplaceState:function(x,C,L,U){re(x,"replaceState")},enqueueSetState:function(x,C,L,U){re(x,"setState")}},A=Object.assign,M={};Object.freeze(M);function P(x,C,L){this.props=x,this.context=C,this.refs=M,this.updater=L||N}P.prototype.isReactComponent={},P.prototype.setState=function(x,C){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,C,"setState")},P.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};{var $={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},J=function(x,C){Object.defineProperty(P.prototype,x,{get:function(){Z("%s(...) is deprecated in plain JavaScript React classes. %s",C[0],C[1])}})};for(var H in $)$.hasOwnProperty(H)&&J(H,$[H])}function z(){}z.prototype=P.prototype;function se(x,C,L){this.props=x,this.context=C,this.refs=M,this.updater=L||N}var de=se.prototype=new z;de.constructor=se,A(de,P.prototype),de.isPureReactComponent=!0;function ue(){var x={current:null};return Object.seal(x),x}var fe=Array.isArray;function be(x){return fe(x)}function V(x){{var C=typeof Symbol=="function"&&Symbol.toStringTag,L=C&&x[Symbol.toStringTag]||x.constructor.name||"Object";return L}}function te(x){try{return q(x),!1}catch{return!0}}function q(x){return""+x}function Q(x){if(te(x))return X("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",V(x)),q(x)}function Te(x,C,L){var U=x.displayName;if(U)return U;var ee=C.displayName||C.name||"";return ee!==""?L+"("+ee+")":L}function Ne(x){return x.displayName||"Context"}function qe(x){if(x==null)return null;if(typeof x.tag=="number"&&X("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case s:var C=x;return Ne(C)+".Consumer";case i:var L=x;return Ne(L._context)+".Provider";case l:return Te(x,x.render,"ForwardRef");case d:var U=x.displayName||null;return U!==null?U:qe(x.type)||"Memo";case f:{var ee=x,he=ee._payload,ie=ee._init;try{return qe(ie(he))}catch{return null}}}return null}var lt=Object.prototype.hasOwnProperty,et={key:!0,ref:!0,__self:!0,__source:!0},br,Qt,qt;qt={};function Ot(x){if(lt.call(x,"ref")){var C=Object.getOwnPropertyDescriptor(x,"ref").get;if(C&&C.isReactWarning)return!1}return x.ref!==void 0}function gt(x){if(lt.call(x,"key")){var C=Object.getOwnPropertyDescriptor(x,"key").get;if(C&&C.isReactWarning)return!1}return x.key!==void 0}function zt(x,C){var L=function(){br||(br=!0,X("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};L.isReactWarning=!0,Object.defineProperty(x,"key",{get:L,configurable:!0})}function Lt(x,C){var L=function(){Qt||(Qt=!0,X("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};L.isReactWarning=!0,Object.defineProperty(x,"ref",{get:L,configurable:!0})}function er(x){if(typeof x.ref=="string"&&S.current&&x.__self&&S.current.stateNode!==x.__self){var C=qe(S.current.type);qt[C]||(X('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C,x.ref),qt[C]=!0)}}var Tr=function(x,C,L,U,ee,he,ie){var ye={$$typeof:t,type:x,key:C,ref:L,props:ie,_owner:he};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:U}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function ha(x,C,L){var U,ee={},he=null,ie=null,ye=null,Re=null;if(C!=null){Ot(C)&&(ie=C.ref,er(C)),gt(C)&&(Q(C.key),he=""+C.key),ye=C.__self===void 0?null:C.__self,Re=C.__source===void 0?null:C.__source;for(U in C)lt.call(C,U)&&!et.hasOwnProperty(U)&&(ee[U]=C[U])}var Ze=arguments.length-2;if(Ze===1)ee.children=L;else if(Ze>1){for(var tt=Array(Ze),rt=0;rt<Ze;rt++)tt[rt]=arguments[rt+2];Object.freeze&&Object.freeze(tt),ee.children=tt}if(x&&x.defaultProps){var it=x.defaultProps;for(U in it)ee[U]===void 0&&(ee[U]=it[U])}if(he||ie){var yt=typeof x=="function"?x.displayName||x.name||"Unknown":x;he&&zt(ee,yt),ie&&Lt(ee,yt)}return Tr(x,he,ie,ye,Re,S.current,ee)}function Co(x,C){var L=Tr(x.type,C,x.ref,x._self,x._source,x._owner,x.props);return L}function Di(x,C,L){if(x==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+x+".");var U,ee=A({},x.props),he=x.key,ie=x.ref,ye=x._self,Re=x._source,Ze=x._owner;if(C!=null){Ot(C)&&(ie=C.ref,Ze=S.current),gt(C)&&(Q(C.key),he=""+C.key);var tt;x.type&&x.type.defaultProps&&(tt=x.type.defaultProps);for(U in C)lt.call(C,U)&&!et.hasOwnProperty(U)&&(C[U]===void 0&&tt!==void 0?ee[U]=tt[U]:ee[U]=C[U])}var rt=arguments.length-2;if(rt===1)ee.children=L;else if(rt>1){for(var it=Array(rt),yt=0;yt<rt;yt++)it[yt]=arguments[yt+2];ee.children=it}return Tr(x.type,he,ie,ye,Re,Ze,ee)}function tn(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}var ma=".",sf=":";function lf(x){var C=/[=:]/g,L={"=":"=0",":":"=2"},U=x.replace(C,function(ee){return L[ee]});return"$"+U}var Fl=!1,cf=/\/+/g;function ga(x){return x.replace(cf,"$&/")}function ya(x,C){return typeof x=="object"&&x!==null&&x.key!=null?(Q(x.key),lf(""+x.key)):C.toString(36)}function Dr(x,C,L,U,ee){var he=typeof x;(he==="undefined"||he==="boolean")&&(x=null);var ie=!1;if(x===null)ie=!0;else switch(he){case"string":case"number":ie=!0;break;case"object":switch(x.$$typeof){case t:case r:ie=!0}}if(ie){var ye=x,Re=ee(ye),Ze=U===""?ma+ya(ye,0):U;if(be(Re)){var tt="";Ze!=null&&(tt=ga(Ze)+"/"),Dr(Re,C,tt,"",function(iR){return iR})}else Re!=null&&(tn(Re)&&(Re.key&&(!ye||ye.key!==Re.key)&&Q(Re.key),Re=Co(Re,L+(Re.key&&(!ye||ye.key!==Re.key)?ga(""+Re.key)+"/":"")+Ze)),C.push(Re));return 1}var rt,it,yt=0,At=U===""?ma:U+sf;if(be(x))for(var Zl=0;Zl<x.length;Zl++)rt=x[Zl],it=At+ya(rt,Zl),yt+=Dr(rt,C,L,it,ee);else{var If=b(x);if(typeof If=="function"){var qy=x;If===qy.entries&&(Fl||Z("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Fl=!0);for(var oR=If.call(qy),zy,aR=0;!(zy=oR.next()).done;)rt=zy.value,it=At+ya(rt,aR++),yt+=Dr(rt,C,L,it,ee)}else if(he==="object"){var Ky=String(x);throw new Error("Objects are not valid as a React child (found: "+(Ky==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":Ky)+"). If you meant to render a collection of children, use an array instead.")}}return yt}function Kn(x,C,L){if(x==null)return x;var U=[],ee=0;return Dr(x,U,"","",function(he){return C.call(L,he,ee++)}),U}function Bi(x){var C=0;return Kn(x,function(){C++}),C}function Ol(x,C,L){Kn(x,function(){C.apply(this,arguments)},L)}function uf(x){return Kn(x,function(C){return C})||[]}function Ll(x){if(!tn(x))throw new Error("React.Children.only expected to receive a single React element child.");return x}function df(x){var C={$$typeof:s,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};C.Provider={$$typeof:i,_context:C};var L=!1,U=!1,ee=!1;{var he={$$typeof:s,_context:C};Object.defineProperties(he,{Provider:{get:function(){return U||(U=!0,X("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),C.Provider},set:function(ie){C.Provider=ie}},_currentValue:{get:function(){return C._currentValue},set:function(ie){C._currentValue=ie}},_currentValue2:{get:function(){return C._currentValue2},set:function(ie){C._currentValue2=ie}},_threadCount:{get:function(){return C._threadCount},set:function(ie){C._threadCount=ie}},Consumer:{get:function(){return L||(L=!0,X("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),C.Consumer}},displayName:{get:function(){return C.displayName},set:function(ie){ee||(Z("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",ie),ee=!0)}}}),C.Consumer=he}return C._currentRenderer=null,C._currentRenderer2=null,C}var Zn=-1,ba=0,Dl=1,ff=2;function Bl(x){if(x._status===Zn){var C=x._result,L=C();if(L.then(function(he){if(x._status===ba||x._status===Zn){var ie=x;ie._status=Dl,ie._result=he}},function(he){if(x._status===ba||x._status===Zn){var ie=x;ie._status=ff,ie._result=he}}),x._status===Zn){var U=x;U._status=ba,U._result=L}}if(x._status===Dl){var ee=x._result;return ee===void 0&&X(`lazy: Expected the result of a dynamic import() call. Instead received: %s
33
33
 
34
34
  Your code should look like:
35
35
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -37,36 +37,36 @@ Your code should look like:
37
37
  Did you accidentally put curly braces around the import?`,ee),"default"in ee||X(`lazy: Expected the result of a dynamic import() call. Instead received: %s
38
38
 
39
39
  Your code should look like:
40
- const MyComponent = lazy(() => import('./MyComponent'))`,ee),ee.default}else throw x._result}function Bl(x){var C={_status:Zn,_result:x},L={$$typeof:f,_payload:C,_init:Dl};{var U,ee;Object.defineProperties(L,{defaultProps:{configurable:!0,get:function(){return U},set:function(he){X("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),U=he,Object.defineProperty(L,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return ee},set:function(he){X("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),ee=he,Object.defineProperty(L,"propTypes",{enumerable:!0})}}})}return L}function uf(x){x!=null&&x.$$typeof===d?X("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof x!="function"?X("forwardRef requires a render function but was given %s.",x===null?"null":typeof x):x.length!==0&&x.length!==2&&X("forwardRef render functions accept exactly two parameters: props and ref. %s",x.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),x!=null&&(x.defaultProps!=null||x.propTypes!=null)&&X("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var C={$$typeof:l,render:x};{var L;Object.defineProperty(C,"displayName",{enumerable:!1,configurable:!0,get:function(){return L},set:function(U){L=U,!x.name&&!x.displayName&&(x.displayName=U)}})}return C}var Ul;Ul=Symbol.for("react.module.reference");function $l(x){return!!(typeof x=="string"||typeof x=="function"||x===n||x===a||G||x===o||x===c||x===u||F||x===p||k||N||R||typeof x=="object"&&x!==null&&(x.$$typeof===f||x.$$typeof===d||x.$$typeof===i||x.$$typeof===s||x.$$typeof===l||x.$$typeof===Ul||x.getModuleId!==void 0))}function df(x,C){$l(x)||X("memo: The first argument must be a component. Instead received: %s",x===null?"null":typeof x);var L={$$typeof:d,type:x,compare:C===void 0?null:C};{var U;Object.defineProperty(L,"displayName",{enumerable:!1,configurable:!0,get:function(){return U},set:function(ee){U=ee,!x.name&&!x.displayName&&(x.displayName=ee)}})}return L}function _(){var x=m.current;return x===null&&X(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
40
+ const MyComponent = lazy(() => import('./MyComponent'))`,ee),ee.default}else throw x._result}function Ul(x){var C={_status:Zn,_result:x},L={$$typeof:f,_payload:C,_init:Bl};{var U,ee;Object.defineProperties(L,{defaultProps:{configurable:!0,get:function(){return U},set:function(he){X("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),U=he,Object.defineProperty(L,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return ee},set:function(he){X("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),ee=he,Object.defineProperty(L,"propTypes",{enumerable:!0})}}})}return L}function pf(x){x!=null&&x.$$typeof===d?X("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof x!="function"?X("forwardRef requires a render function but was given %s.",x===null?"null":typeof x):x.length!==0&&x.length!==2&&X("forwardRef render functions accept exactly two parameters: props and ref. %s",x.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),x!=null&&(x.defaultProps!=null||x.propTypes!=null)&&X("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var C={$$typeof:l,render:x};{var L;Object.defineProperty(C,"displayName",{enumerable:!1,configurable:!0,get:function(){return L},set:function(U){L=U,!x.name&&!x.displayName&&(x.displayName=U)}})}return C}var $l;$l=Symbol.for("react.module.reference");function Gl(x){return!!(typeof x=="string"||typeof x=="function"||x===n||x===a||G||x===o||x===c||x===u||F||x===p||k||E||R||typeof x=="object"&&x!==null&&(x.$$typeof===f||x.$$typeof===d||x.$$typeof===i||x.$$typeof===s||x.$$typeof===l||x.$$typeof===$l||x.getModuleId!==void 0))}function hf(x,C){Gl(x)||X("memo: The first argument must be a component. Instead received: %s",x===null?"null":typeof x);var L={$$typeof:d,type:x,compare:C===void 0?null:C};{var U;Object.defineProperty(L,"displayName",{enumerable:!1,configurable:!0,get:function(){return U},set:function(ee){U=ee,!x.name&&!x.displayName&&(x.displayName=ee)}})}return L}function _(){var x=g.current;return x===null&&X(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
41
41
  1. You might have mismatching versions of React and the renderer (such as React DOM)
42
42
  2. You might be breaking the Rules of Hooks
43
43
  3. You might have more than one copy of React in the same app
44
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),x}function K(x){var C=_();if(x._context!==void 0){var L=x._context;L.Consumer===x?X("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):L.Provider===x&&X("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return C.useContext(x)}function ne(x){var C=_();return C.useState(x)}function me(x,C,L){var U=_();return U.useReducer(x,C,L)}function Fe(x){var C=_();return C.useRef(x)}function ze(x,C){var L=_();return L.useEffect(x,C)}function Ce(x,C){var L=_();return L.useInsertionEffect(x,C)}function ve(x,C){var L=_();return L.useLayoutEffect(x,C)}function Nt(x,C){var L=_();return L.useCallback(x,C)}function at(x,C){var L=_();return L.useMemo(x,C)}function ct(x,C,L){var U=_();return U.useImperativeHandle(x,C,L)}function tr(x,C){{var L=_();return L.useDebugValue(x,C)}}function Jn(){var x=_();return x.useTransition()}function bn(x){var C=_();return C.useDeferredValue(x)}function Dt(){var x=_();return x.useId()}function Di(x,C,L){var U=_();return U.useSyncExternalStore(x,C,L)}var Eo=0,Gl,vy,wy,ky,_y,Cy,Ey;function Ny(){}Ny.__reactDisabledLog=!0;function OP(){{if(Eo===0){Gl=console.log,vy=console.info,wy=console.warn,ky=console.error,_y=console.group,Cy=console.groupCollapsed,Ey=console.groupEnd;var x={configurable:!0,enumerable:!0,value:Ny,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}Eo++}}function LP(){{if(Eo--,Eo===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},x,{value:Gl}),info:A({},x,{value:vy}),warn:A({},x,{value:wy}),error:A({},x,{value:ky}),group:A({},x,{value:_y}),groupCollapsed:A({},x,{value:Cy}),groupEnd:A({},x,{value:Ey})})}Eo<0&&X("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ff=B.ReactCurrentDispatcher,pf;function Wl(x,C,L){{if(pf===void 0)try{throw Error()}catch(ee){var U=ee.stack.trim().match(/\n( *(at )?)/);pf=U&&U[1]||""}return`
45
- `+pf+x}}var hf=!1,Hl;{var DP=typeof WeakMap=="function"?WeakMap:Map;Hl=new DP}function Ay(x,C){if(!x||hf)return"";{var L=Hl.get(x);if(L!==void 0)return L}var U;hf=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var he;he=ff.current,ff.current=null,OP();try{if(C){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(At){U=At}Reflect.construct(x,[],ie)}else{try{ie.call()}catch(At){U=At}x.call(ie.prototype)}}else{try{throw Error()}catch(At){U=At}x()}}catch(At){if(At&&U&&typeof At.stack=="string"){for(var ye=At.stack.split(`
44
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),x}function K(x){var C=_();if(x._context!==void 0){var L=x._context;L.Consumer===x?X("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):L.Provider===x&&X("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return C.useContext(x)}function ne(x){var C=_();return C.useState(x)}function me(x,C,L){var U=_();return U.useReducer(x,C,L)}function Oe(x){var C=_();return C.useRef(x)}function ze(x,C){var L=_();return L.useEffect(x,C)}function Ce(x,C){var L=_();return L.useInsertionEffect(x,C)}function ve(x,C){var L=_();return L.useLayoutEffect(x,C)}function Nt(x,C){var L=_();return L.useCallback(x,C)}function at(x,C){var L=_();return L.useMemo(x,C)}function ct(x,C,L){var U=_();return U.useImperativeHandle(x,C,L)}function tr(x,C){{var L=_();return L.useDebugValue(x,C)}}function Jn(){var x=_();return x.useTransition()}function bn(x){var C=_();return C.useDeferredValue(x)}function Dt(){var x=_();return x.useId()}function Ui(x,C,L){var U=_();return U.useSyncExternalStore(x,C,L)}var Eo=0,Wl,_y,Cy,Ey,Ny,Ay,Py;function Ry(){}Ry.__reactDisabledLog=!0;function $P(){{if(Eo===0){Wl=console.log,_y=console.info,Cy=console.warn,Ey=console.error,Ny=console.group,Ay=console.groupCollapsed,Py=console.groupEnd;var x={configurable:!0,enumerable:!0,value:Ry,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}Eo++}}function GP(){{if(Eo--,Eo===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},x,{value:Wl}),info:A({},x,{value:_y}),warn:A({},x,{value:Cy}),error:A({},x,{value:Ey}),group:A({},x,{value:Ny}),groupCollapsed:A({},x,{value:Ay}),groupEnd:A({},x,{value:Py})})}Eo<0&&X("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var mf=B.ReactCurrentDispatcher,gf;function Hl(x,C,L){{if(gf===void 0)try{throw Error()}catch(ee){var U=ee.stack.trim().match(/\n( *(at )?)/);gf=U&&U[1]||""}return`
45
+ `+gf+x}}var yf=!1,Vl;{var WP=typeof WeakMap=="function"?WeakMap:Map;Vl=new WP}function My(x,C){if(!x||yf)return"";{var L=Vl.get(x);if(L!==void 0)return L}var U;yf=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var he;he=mf.current,mf.current=null,$P();try{if(C){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(At){U=At}Reflect.construct(x,[],ie)}else{try{ie.call()}catch(At){U=At}x.call(ie.prototype)}}else{try{throw Error()}catch(At){U=At}x()}}catch(At){if(At&&U&&typeof At.stack=="string"){for(var ye=At.stack.split(`
46
46
  `),Re=U.stack.split(`
47
47
  `),Ze=ye.length-1,tt=Re.length-1;Ze>=1&&tt>=0&&ye[Ze]!==Re[tt];)tt--;for(;Ze>=1&&tt>=0;Ze--,tt--)if(ye[Ze]!==Re[tt]){if(Ze!==1||tt!==1)do if(Ze--,tt--,tt<0||ye[Ze]!==Re[tt]){var rt=`
48
- `+ye[Ze].replace(" at new "," at ");return x.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",x.displayName)),typeof x=="function"&&Hl.set(x,rt),rt}while(Ze>=1&&tt>=0);break}}}finally{hf=!1,ff.current=he,LP(),Error.prepareStackTrace=ee}var it=x?x.displayName||x.name:"",yt=it?Wl(it):"";return typeof x=="function"&&Hl.set(x,yt),yt}function BP(x,C,L){return Ay(x,!1)}function UP(x){var C=x.prototype;return!!(C&&C.isReactComponent)}function Vl(x,C,L){if(x==null)return"";if(typeof x=="function")return Ay(x,UP(x));if(typeof x=="string")return Wl(x);switch(x){case c:return Wl("Suspense");case u:return Wl("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case l:return BP(x.render);case d:return Vl(x.type,C,L);case f:{var U=x,ee=U._payload,he=U._init;try{return Vl(he(ee),C,L)}catch{}}}return""}var Py={},Ry=B.ReactDebugCurrentFrame;function jl(x){if(x){var C=x._owner,L=Vl(x.type,x._source,C?C.type:null);Ry.setExtraStackFrame(L)}else Ry.setExtraStackFrame(null)}function $P(x,C,L,U,ee){{var he=Function.call.bind(lt);for(var ie in x)if(he(x,ie)){var ye=void 0;try{if(typeof x[ie]!="function"){var Re=Error((U||"React class")+": "+L+" type `"+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[ie]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Re.name="Invariant Violation",Re}ye=x[ie](C,ie,U,L,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ze){ye=Ze}ye&&!(ye instanceof Error)&&(jl(ee),X("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",U||"React class",L,ie,typeof ye),jl(null)),ye instanceof Error&&!(ye.message in Py)&&(Py[ye.message]=!0,jl(ee),X("Failed %s type: %s",L,ye.message),jl(null))}}}function ba(x){if(x){var C=x._owner,L=Vl(x.type,x._source,C?C.type:null);w(L)}else w(null)}var mf;mf=!1;function My(){if(S.current){var x=qe(S.current.type);if(x)return`
48
+ `+ye[Ze].replace(" at new "," at ");return x.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",x.displayName)),typeof x=="function"&&Vl.set(x,rt),rt}while(Ze>=1&&tt>=0);break}}}finally{yf=!1,mf.current=he,GP(),Error.prepareStackTrace=ee}var it=x?x.displayName||x.name:"",yt=it?Hl(it):"";return typeof x=="function"&&Vl.set(x,yt),yt}function HP(x,C,L){return My(x,!1)}function VP(x){var C=x.prototype;return!!(C&&C.isReactComponent)}function jl(x,C,L){if(x==null)return"";if(typeof x=="function")return My(x,VP(x));if(typeof x=="string")return Hl(x);switch(x){case c:return Hl("Suspense");case u:return Hl("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case l:return HP(x.render);case d:return jl(x.type,C,L);case f:{var U=x,ee=U._payload,he=U._init;try{return jl(he(ee),C,L)}catch{}}}return""}var Fy={},Oy=B.ReactDebugCurrentFrame;function ql(x){if(x){var C=x._owner,L=jl(x.type,x._source,C?C.type:null);Oy.setExtraStackFrame(L)}else Oy.setExtraStackFrame(null)}function jP(x,C,L,U,ee){{var he=Function.call.bind(lt);for(var ie in x)if(he(x,ie)){var ye=void 0;try{if(typeof x[ie]!="function"){var Re=Error((U||"React class")+": "+L+" type `"+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[ie]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Re.name="Invariant Violation",Re}ye=x[ie](C,ie,U,L,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ze){ye=Ze}ye&&!(ye instanceof Error)&&(ql(ee),X("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",U||"React class",L,ie,typeof ye),ql(null)),ye instanceof Error&&!(ye.message in Fy)&&(Fy[ye.message]=!0,ql(ee),X("Failed %s type: %s",L,ye.message),ql(null))}}}function Ta(x){if(x){var C=x._owner,L=jl(x.type,x._source,C?C.type:null);w(L)}else w(null)}var bf;bf=!1;function Ly(){if(S.current){var x=qe(S.current.type);if(x)return`
49
49
 
50
- Check the render method of \``+x+"`."}return""}function GP(x){if(x!==void 0){var C=x.fileName.replace(/^.*[\\\/]/,""),L=x.lineNumber;return`
50
+ Check the render method of \``+x+"`."}return""}function qP(x){if(x!==void 0){var C=x.fileName.replace(/^.*[\\\/]/,""),L=x.lineNumber;return`
51
51
 
52
- Check your code at `+C+":"+L+"."}return""}function WP(x){return x!=null?GP(x.__source):""}var Fy={};function HP(x){var C=My();if(!C){var L=typeof x=="string"?x:x.displayName||x.name;L&&(C=`
52
+ Check your code at `+C+":"+L+"."}return""}function zP(x){return x!=null?qP(x.__source):""}var Dy={};function KP(x){var C=Ly();if(!C){var L=typeof x=="string"?x:x.displayName||x.name;L&&(C=`
53
53
 
54
- Check the top-level render call using <`+L+">.")}return C}function Oy(x,C){if(!(!x._store||x._store.validated||x.key!=null)){x._store.validated=!0;var L=HP(C);if(!Fy[L]){Fy[L]=!0;var U="";x&&x._owner&&x._owner!==S.current&&(U=" It was passed a child from "+qe(x._owner.type)+"."),ba(x),X('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',L,U),ba(null)}}}function Ly(x,C){if(typeof x=="object"){if(be(x))for(var L=0;L<x.length;L++){var U=x[L];tn(U)&&Oy(U,C)}else if(tn(x))x._store&&(x._store.validated=!0);else if(x){var ee=b(x);if(typeof ee=="function"&&ee!==x.entries)for(var he=ee.call(x),ie;!(ie=he.next()).done;)tn(ie.value)&&Oy(ie.value,C)}}}function Dy(x){{var C=x.type;if(C==null||typeof C=="string")return;var L;if(typeof C=="function")L=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===d))L=C.propTypes;else return;if(L){var U=qe(C);$P(L,x.props,"prop",U,x)}else if(C.PropTypes!==void 0&&!mf){mf=!0;var ee=qe(C);X("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&X("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function VP(x){{for(var C=Object.keys(x.props),L=0;L<C.length;L++){var U=C[L];if(U!=="children"&&U!=="key"){ba(x),X("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",U),ba(null);break}}x.ref!==null&&(ba(x),X("Invalid attribute `ref` supplied to `React.Fragment`."),ba(null))}}function By(x,C,L){var U=$l(x);if(!U){var ee="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(ee+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var he=WP(C);he?ee+=he:ee+=My();var ie;x===null?ie="null":be(x)?ie="array":x!==void 0&&x.$$typeof===t?(ie="<"+(qe(x.type)||"Unknown")+" />",ee=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof x,X("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,ee)}var ye=pa.apply(this,arguments);if(ye==null)return ye;if(U)for(var Re=2;Re<arguments.length;Re++)Ly(arguments[Re],x);return x===n?VP(ye):Dy(ye),ye}var Uy=!1;function jP(x){var C=By.bind(null,x);return C.type=x,Uy||(Uy=!0,Z("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(C,"type",{enumerable:!1,get:function(){return Z("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:x}),x}}),C}function qP(x,C,L){for(var U=Oi.apply(this,arguments),ee=2;ee<arguments.length;ee++)Ly(arguments[ee],U.type);return Dy(U),U}function zP(x,C){var L=g.transition;g.transition={};var U=g.transition;g.transition._updatedFibers=new Set;try{x()}finally{if(g.transition=L,L===null&&U._updatedFibers){var ee=U._updatedFibers.size;ee>10&&Z("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),U._updatedFibers.clear()}}}var $y=!1,ql=null;function KP(x){if(ql===null)try{var C=("require"+Math.random()).slice(0,7),L=mu&&mu[C];ql=L.call(mu,"timers").setImmediate}catch{ql=function(ee){$y===!1&&($y=!0,typeof MessageChannel>"u"&&X("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var he=new MessageChannel;he.port1.onmessage=ee,he.port2.postMessage(void 0)}}return ql(x)}var Ta=0,Gy=!1;function Wy(x){{var C=Ta;Ta++,T.current===null&&(T.current=[]);var L=T.isBatchingLegacy,U;try{if(T.isBatchingLegacy=!0,U=x(),!L&&T.didScheduleLegacyUpdate){var ee=T.current;ee!==null&&(T.didScheduleLegacyUpdate=!1,bf(ee))}}catch(it){throw zl(C),it}finally{T.isBatchingLegacy=L}if(U!==null&&typeof U=="object"&&typeof U.then=="function"){var he=U,ie=!1,ye={then:function(it,yt){ie=!0,he.then(function(At){zl(C),Ta===0?gf(At,it,yt):it(At)},function(At){zl(C),yt(At)})}};return!Gy&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){ie||(Gy=!0,X("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),ye}else{var Re=U;if(zl(C),Ta===0){var Ze=T.current;Ze!==null&&(bf(Ze),T.current=null);var tt={then:function(it,yt){T.current===null?(T.current=[],gf(Re,it,yt)):it(Re)}};return tt}else{var rt={then:function(it,yt){it(Re)}};return rt}}}}function zl(x){x!==Ta-1&&X("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Ta=x}function gf(x,C,L){{var U=T.current;if(U!==null)try{bf(U),KP(function(){U.length===0?(T.current=null,C(x)):gf(x,C,L)})}catch(ee){L(ee)}else C(x)}}var yf=!1;function bf(x){if(!yf){yf=!0;var C=0;try{for(;C<x.length;C++){var L=x[C];do L=L(!0);while(L!==null)}x.length=0}catch(U){throw x=x.slice(C+1),U}finally{yf=!1}}}var ZP=By,JP=qP,YP=jP,XP={map:Kn,forEach:Fl,count:Li,toArray:sf,only:Ol};ke.Children=XP,ke.Component=P,ke.Fragment=n,ke.Profiler=a,ke.PureComponent=se,ke.StrictMode=o,ke.Suspense=c,ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,ke.act=Wy,ke.cloneElement=JP,ke.createContext=lf,ke.createElement=ZP,ke.createFactory=YP,ke.createRef=ue,ke.forwardRef=uf,ke.isValidElement=tn,ke.lazy=Bl,ke.memo=df,ke.startTransition=zP,ke.unstable_act=Wy,ke.useCallback=Nt,ke.useContext=K,ke.useDebugValue=tr,ke.useDeferredValue=bn,ke.useEffect=ze,ke.useId=Dt,ke.useImperativeHandle=ct,ke.useInsertionEffect=Ce,ke.useLayoutEffect=ve,ke.useMemo=at,ke.useReducer=me,ke.useRef=Fe,ke.useState=ne,ke.useSyncExternalStore=Di,ke.useTransition=Jn,ke.version=e,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()});var gu=O((J5,th)=>{"use strict";process.env.NODE_ENV==="production"?th.exports=Iv():th.exports=vv()});var kv=O((yu,wv)=>{(function(e,t){typeof yu=="object"&&typeof wv<"u"?t(yu):typeof define=="function"&&define.amd?define("cached-iterable",["exports"],t):t(e.CachedIterable={})})(yu,(function(e){"use strict";class t extends Array{static from(a){return a instanceof this?a:new this(a)}}class r extends t{constructor(a){if(super(),Symbol.iterator in Object(a))this.iterator=a[Symbol.iterator]();else throw new TypeError("Argument must implement the iteration protocol.")}[Symbol.iterator](){let a=this,i=0;return{next(){return a.length<=i&&a.push(a.iterator.next()),a[i++]}}}touchNext(a=1){let i=0;for(;i++<a;){let s=this[this.length-1];if(s&&s.done)break;this.push(this.iterator.next())}return this[this.length-1]}}class n extends t{constructor(a){if(super(),Symbol.asyncIterator in Object(a))this.iterator=a[Symbol.asyncIterator]();else if(Symbol.iterator in Object(a))this.iterator=a[Symbol.iterator]();else throw new TypeError("Argument must implement the iteration protocol.")}[Symbol.asyncIterator](){let a=this,i=0;return{async next(){return a.length<=i&&a.push(a.iterator.next()),a[i++]}}}async touchNext(a=1){let i=0;for(;i++<a;){let s=this[this.length-1];if(s&&(await s).done)break;this.push(this.iterator.next())}return this[this.length-1]}}e.CachedSyncIterable=r,e.CachedAsyncIterable=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var Cv=O((bu,_v)=>{(function(e,t){typeof bu=="object"&&typeof _v<"u"?t(bu,uv(),gu(),kv()):typeof define=="function"&&define.amd?define("@fluent/react",["exports","@fluent/sequence","react","cached-iterable"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FluentReact={},e.FluentSequence,e.React,e.CachedIterable))})(bu,(function(e,t,r,n){"use strict";let o;function a(){if(typeof document>"u")throw new Error("`document` is undefined. Without it, translations cannot be safely sanitized. Consult the documentation at https://github.com/projectfluent/fluent.js/wiki/React-Overlays.");if(!o){let m=document.createElement("template");o=function(T){return m.innerHTML=T,Array.from(m.content.childNodes)}}return o}var i={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},s={menuitem:!0,...i};let l=/<|&#?\w+;/,c=m=>{console.warn(`[@fluent/react] ${m.name}: ${m.message}`)};class u{constructor(g,T=a(),S){this.bundles=n.CachedSyncIterable.from(g),this.parseMarkup=T,this.reportError=S||c}getBundle(g){return t.mapBundleSync(this.bundles,g)}areBundlesEmpty(){return!!this.bundles[Symbol.iterator]().next().done}getString(g,T,S){let I=this.getBundle(g);if(I){let v=I.getMessage(g);if(v&&v.value){let w=[],k=I.formatPattern(v.value,T,w);for(let N of w)this.reportError(N);return k}}else this.areBundlesEmpty()?this.reportError(new Error("Attempting to get a string when no localization bundles are present.")):this.reportError(new Error(`The id "${g}" did not match any messages in the localization bundles.`));return S||g}getElement(g,T,S={}){let I=this.getBundle(T);if(I===null)return T?this.areBundlesEmpty()?this.reportError(new Error("Attempting to get a localized element when no localization bundles are present.")):this.reportError(new Error(`The id "${T}" did not match any messages in the localization bundles.`)):this.reportError(new Error("No string id was provided when localizing a component.")),r.createElement(r.Fragment,null,g);let v=I.getMessage(T),w=[],k;if(S.attrs&&v.attributes){k={},w=[];for(let[B,Z]of Object.entries(S.attrs))Z&&B in v.attributes&&(k[B]=I.formatPattern(v.attributes[B],S.vars,w));for(let B of w)this.reportError(B)}if(typeof g.type=="string"&&g.type in s||v.value===null)return r.cloneElement(g,k);w=[];let N=I.formatPattern(v.value,S.vars,w);for(let B of w)this.reportError(B);if(!l.test(N)||this.parseMarkup===null)return r.cloneElement(g,k,N);let R;if(S.elems){R=new Map;for(let[B,Z]of Object.entries(S.elems))r.isValidElement(Z)&&R.set(B.toLowerCase(),Z)}let G=this.parseMarkup(N).map(({nodeName:B,textContent:Z})=>{if(B==="#text")return Z;let X=B.toLowerCase(),_e=R==null?void 0:R.get(X);return _e?typeof _e.type=="string"&&_e.type in s?_e:r.cloneElement(_e,void 0,Z):Z});return r.cloneElement(g,k,...G)}}let d=r.createContext(null);function f(m){return r.createElement(d.Provider,{value:m.l10n},m.children)}function p(m){function g(T){let S=r.useContext(d);if(!S)throw new Error("withLocalization was used without wrapping it in a <LocalizationProvider />.");let I=S.getString.bind(S);return r.createElement(m,{getString:I,...T})}return g.displayName=`WithLocalization(${h(m)})`,g}function h(m){return m.displayName||m.name||"Component"}function y(m){let{id:g,attrs:T,vars:S,elems:I,children:v}=m,w=r.useContext(d);if(!w)throw new Error("The <Localized /> component was not properly wrapped in a <LocalizationProvider />.");let k;if(Array.isArray(v)){if(v.length>1)throw new Error("Expected to receive a single React element to localize.");k=v[0]}else k=v??null;if(!r.isValidElement(k)){let N=typeof k=="string"?k:void 0,R=w.getString(g,S,N);return r.createElement(r.Fragment,null,R)}return w.getElement(k,g,{attrs:T,vars:S,elems:I})}let b=()=>{let m=r.useContext(d);if(!m)throw new Error("useLocalization was used without wrapping it in a <LocalizationProvider />.");return{l10n:m}};e.LocalizationProvider=f,e.Localized=y,e.ReactLocalization=u,e.useLocalization=b,e.withLocalization=p}))});function Cu(e,t){return new TextDecoder("utf8").decode(t.slice(0,e.length))===e}var Ds,lh=No(()=>{"use strict";Ds="SIMPLEPERF"});var gw=O((rZ,mw)=>{"use strict";mw.exports=K$;function K$(e,t){for(var r=new Array(arguments.length-1),n=0,o=2,a=!0;o<arguments.length;)r[n++]=arguments[o++];return new Promise(function(s,l){r[n]=function(u){if(a)if(a=!1,u)l(u);else{for(var d=new Array(arguments.length-1),f=0;f<d.length;)d[f++]=arguments[f];s.apply(null,d)}};try{e.apply(t||null,r)}catch(c){a&&(a=!1,l(c))}})}});var Sw=O(Tw=>{"use strict";var Nu=Tw;Nu.length=function(t){var r=t.length;if(!r)return 0;for(var n=0;--r%4>1&&t.charAt(r)==="=";)++n;return Math.ceil(t.length*3)/4-n};var Za=new Array(64),bw=new Array(123);for(Wr=0;Wr<64;)bw[Za[Wr]=Wr<26?Wr+65:Wr<52?Wr+71:Wr<62?Wr-4:Wr-59|43]=Wr++;var Wr;Nu.encode=function(t,r,n){for(var o=null,a=[],i=0,s=0,l;r<n;){var c=t[r++];switch(s){case 0:a[i++]=Za[c>>2],l=(c&3)<<4,s=1;break;case 1:a[i++]=Za[l|c>>4],l=(c&15)<<2,s=2;break;case 2:a[i++]=Za[l|c>>6],a[i++]=Za[c&63],s=0;break}i>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),i=0)}return s&&(a[i++]=Za[l],a[i++]=61,s===1&&(a[i++]=61)),o?(i&&o.push(String.fromCharCode.apply(String,a.slice(0,i))),o.join("")):String.fromCharCode.apply(String,a.slice(0,i))};var yw="invalid encoding";Nu.decode=function(t,r,n){for(var o=n,a=0,i,s=0;s<t.length;){var l=t.charCodeAt(s++);if(l===61&&a>1)break;if((l=bw[l])===void 0)throw Error(yw);switch(a){case 0:i=l,a=1;break;case 1:r[n++]=i<<2|(l&48)>>4,i=l,a=2;break;case 2:r[n++]=(i&15)<<4|(l&60)>>2,i=l,a=3;break;case 3:r[n++]=(i&3)<<6|l,a=0;break}}if(a===1)throw Error(yw);return n-o};Nu.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var Iw=O((oZ,xw)=>{"use strict";xw.exports=Au;function Au(){this._listeners={}}Au.prototype.on=function(t,r,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:n||this}),this};Au.prototype.off=function(t,r){if(t===void 0)this._listeners={};else if(r===void 0)this._listeners[t]=[];else for(var n=this._listeners[t],o=0;o<n.length;)n[o].fn===r?n.splice(o,1):++o;return this};Au.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var n=[],o=1;o<arguments.length;)n.push(arguments[o++]);for(o=0;o<r.length;)r[o].fn.apply(r[o++].ctx,n)}return this}});var Nw=O((aZ,Ew)=>{"use strict";Ew.exports=vw(vw);function vw(e){return typeof Float32Array<"u"?(function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=r[3]===128;function o(l,c,u){t[0]=l,c[u]=r[0],c[u+1]=r[1],c[u+2]=r[2],c[u+3]=r[3]}function a(l,c,u){t[0]=l,c[u]=r[3],c[u+1]=r[2],c[u+2]=r[1],c[u+3]=r[0]}e.writeFloatLE=n?o:a,e.writeFloatBE=n?a:o;function i(l,c){return r[0]=l[c],r[1]=l[c+1],r[2]=l[c+2],r[3]=l[c+3],t[0]}function s(l,c){return r[3]=l[c],r[2]=l[c+1],r[1]=l[c+2],r[0]=l[c+3],t[0]}e.readFloatLE=n?i:s,e.readFloatBE=n?s:i})():(function(){function t(n,o,a,i){var s=o<0?1:0;if(s&&(o=-o),o===0)n(1/o>0?0:2147483648,a,i);else if(isNaN(o))n(2143289344,a,i);else if(o>34028234663852886e22)n((s<<31|2139095040)>>>0,a,i);else if(o<11754943508222875e-54)n((s<<31|Math.round(o/1401298464324817e-60))>>>0,a,i);else{var l=Math.floor(Math.log(o)/Math.LN2),c=Math.round(o*Math.pow(2,-l)*8388608)&8388607;n((s<<31|l+127<<23|c)>>>0,a,i)}}e.writeFloatLE=t.bind(null,ww),e.writeFloatBE=t.bind(null,kw);function r(n,o,a){var i=n(o,a),s=(i>>31)*2+1,l=i>>>23&255,c=i&8388607;return l===255?c?NaN:s*(1/0):l===0?s*1401298464324817e-60*c:s*Math.pow(2,l-150)*(c+8388608)}e.readFloatLE=r.bind(null,_w),e.readFloatBE=r.bind(null,Cw)})(),typeof Float64Array<"u"?(function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=r[7]===128;function o(l,c,u){t[0]=l,c[u]=r[0],c[u+1]=r[1],c[u+2]=r[2],c[u+3]=r[3],c[u+4]=r[4],c[u+5]=r[5],c[u+6]=r[6],c[u+7]=r[7]}function a(l,c,u){t[0]=l,c[u]=r[7],c[u+1]=r[6],c[u+2]=r[5],c[u+3]=r[4],c[u+4]=r[3],c[u+5]=r[2],c[u+6]=r[1],c[u+7]=r[0]}e.writeDoubleLE=n?o:a,e.writeDoubleBE=n?a:o;function i(l,c){return r[0]=l[c],r[1]=l[c+1],r[2]=l[c+2],r[3]=l[c+3],r[4]=l[c+4],r[5]=l[c+5],r[6]=l[c+6],r[7]=l[c+7],t[0]}function s(l,c){return r[7]=l[c],r[6]=l[c+1],r[5]=l[c+2],r[4]=l[c+3],r[3]=l[c+4],r[2]=l[c+5],r[1]=l[c+6],r[0]=l[c+7],t[0]}e.readDoubleLE=n?i:s,e.readDoubleBE=n?s:i})():(function(){function t(n,o,a,i,s,l){var c=i<0?1:0;if(c&&(i=-i),i===0)n(0,s,l+o),n(1/i>0?0:2147483648,s,l+a);else if(isNaN(i))n(0,s,l+o),n(2146959360,s,l+a);else if(i>17976931348623157e292)n(0,s,l+o),n((c<<31|2146435072)>>>0,s,l+a);else{var u;if(i<22250738585072014e-324)u=i/5e-324,n(u>>>0,s,l+o),n((c<<31|u/4294967296)>>>0,s,l+a);else{var d=Math.floor(Math.log(i)/Math.LN2);d===1024&&(d=1023),u=i*Math.pow(2,-d),n(u*4503599627370496>>>0,s,l+o),n((c<<31|d+1023<<20|u*1048576&1048575)>>>0,s,l+a)}}}e.writeDoubleLE=t.bind(null,ww,0,4),e.writeDoubleBE=t.bind(null,kw,4,0);function r(n,o,a,i,s){var l=n(i,s+o),c=n(i,s+a),u=(c>>31)*2+1,d=c>>>20&2047,f=4294967296*(c&1048575)+l;return d===2047?f?NaN:u*(1/0):d===0?u*5e-324*f:u*Math.pow(2,d-1075)*(f+4503599627370496)}e.readDoubleLE=r.bind(null,_w,0,4),e.readDoubleBE=r.bind(null,Cw,4,0)})(),e}function ww(e,t,r){t[r]=e&255,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function kw(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=e&255}function _w(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function Cw(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}});var Aw=O((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}});var Rw=O(Pw=>{"use strict";var fh=Pw;fh.length=function(t){for(var r=0,n=0,o=0;o<t.length;++o)n=t.charCodeAt(o),n<128?r+=1:n<2048?r+=2:(n&64512)===55296&&(t.charCodeAt(o+1)&64512)===56320?(++o,r+=4):r+=3;return r};fh.read=function(t,r,n){var o=n-r;if(o<1)return"";for(var a=null,i=[],s=0,l;r<n;)l=t[r++],l<128?i[s++]=l:l>191&&l<224?i[s++]=(l&31)<<6|t[r++]&63:l>239&&l<365?(l=((l&7)<<18|(t[r++]&63)<<12|(t[r++]&63)<<6|t[r++]&63)-65536,i[s++]=55296+(l>>10),i[s++]=56320+(l&1023)):i[s++]=(l&15)<<12|(t[r++]&63)<<6|t[r++]&63,s>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,i)),s=0);return a?(s&&a.push(String.fromCharCode.apply(String,i.slice(0,s))),a.join("")):String.fromCharCode.apply(String,i.slice(0,s))};fh.write=function(t,r,n){for(var o=n,a,i,s=0;s<t.length;++s)a=t.charCodeAt(s),a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=a&63|128):(a&64512)===55296&&((i=t.charCodeAt(s+1))&64512)===56320?(a=65536+((a&1023)<<10)+(i&1023),++s,r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=a&63|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=a&63|128);return n-o}});var Fw=O((sZ,Mw)=>{"use strict";Mw.exports=Z$;function Z$(e,t,r){var n=r||8192,o=n>>>1,a=null,i=n;return function(l){if(l<1||l>o)return e(l);i+l>n&&(a=e(n),i=0);var c=t.call(a,i,i+=l);return i&7&&(i=(i|7)+1),c}}});var Lw=O((lZ,Ow)=>{"use strict";Ow.exports=Et;var Bs=uo();function Et(e,t){this.lo=e>>>0,this.hi=t>>>0}var Vo=Et.zero=new Et(0,0);Vo.toNumber=function(){return 0};Vo.zzEncode=Vo.zzDecode=function(){return this};Vo.length=function(){return 1};var J$=Et.zeroHash="\0\0\0\0\0\0\0\0";Et.fromNumber=function(t){if(t===0)return Vo;var r=t<0;r&&(t=-t);var n=t>>>0,o=(t-n)/4294967296>>>0;return r&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new Et(n,o)};Et.from=function(t){if(typeof t=="number")return Et.fromNumber(t);if(Bs.isString(t))if(Bs.Long)t=Bs.Long.fromString(t);else return Et.fromNumber(parseInt(t,10));return t.low||t.high?new Et(t.low>>>0,t.high>>>0):Vo};Et.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,n=~this.hi>>>0;return r||(n=n+1>>>0),-(r+n*4294967296)}return this.lo+this.hi*4294967296};Et.prototype.toLong=function(t){return Bs.Long?new Bs.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var co=String.prototype.charCodeAt;Et.fromHash=function(t){return t===J$?Vo:new Et((co.call(t,0)|co.call(t,1)<<8|co.call(t,2)<<16|co.call(t,3)<<24)>>>0,(co.call(t,4)|co.call(t,5)<<8|co.call(t,6)<<16|co.call(t,7)<<24)>>>0)};Et.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};Et.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};Et.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};Et.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?r===0?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:n<128?9:10}});var uo=O(ph=>{"use strict";var le=ph;le.asPromise=gw();le.base64=Sw();le.EventEmitter=Iw();le.float=Nw();le.inquire=Aw();le.utf8=Rw();le.pool=Fw();le.LongBits=Lw();le.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);le.global=le.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||ph;le.emptyArray=Object.freeze?Object.freeze([]):[];le.emptyObject=Object.freeze?Object.freeze({}):{};le.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};le.isString=function(t){return typeof t=="string"||t instanceof String};le.isObject=function(t){return t&&typeof t=="object"};le.isset=le.isSet=function(t,r){var n=t[r];return n!=null&&t.hasOwnProperty(r)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};le.Buffer=(function(){try{var e=le.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}})();le._Buffer_from=null;le._Buffer_allocUnsafe=null;le.newBuffer=function(t){return typeof t=="number"?le.Buffer?le._Buffer_allocUnsafe(t):new le.Array(t):le.Buffer?le._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};le.Array=typeof Uint8Array<"u"?Uint8Array:Array;le.Long=le.global.dcodeIO&&le.global.dcodeIO.Long||le.global.Long||le.inquire("long");le.key2Re=/^true|false|0|1$/;le.key32Re=/^-?(?:0|[1-9][0-9]*)$/;le.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;le.longToHash=function(t){return t?le.LongBits.from(t).toHash():le.LongBits.zeroHash};le.longFromHash=function(t,r){var n=le.LongBits.fromHash(t);return le.Long?le.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)};function Dw(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)(e[n[o]]===void 0||!r)&&(e[n[o]]=t[n[o]]);return e}le.merge=Dw;le.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function Bw(e){function t(r,n){if(!(this instanceof t))return new t(r,n);Object.defineProperty(this,"message",{get:function(){return r}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&Dw(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}le.newError=Bw;le.ProtocolError=Bw("ProtocolError");le.oneOfGetter=function(t){for(var r={},n=0;n<t.length;++n)r[t[n]]=1;return function(){for(var o=Object.keys(this),a=o.length-1;a>-1;--a)if(r[o[a]]===1&&this[o[a]]!==void 0&&this[o[a]]!==null)return o[a]}};le.oneOfSetter=function(t){return function(r){for(var n=0;n<t.length;++n)t[n]!==r&&delete this[t[n]]}};le.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};le._configure=function(){var e=le.Buffer;if(!e){le._Buffer_from=le._Buffer_allocUnsafe=null;return}le._Buffer_from=e.from!==Uint8Array.from&&e.from||function(r,n){return new e(r,n)},le._Buffer_allocUnsafe=e.allocUnsafe||function(r){return new e(r)}}});var Sh=O((uZ,Ww)=>{"use strict";Ww.exports=Oe;var Er=uo(),hh,Pu=Er.LongBits,Uw=Er.base64,$w=Er.utf8;function Us(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function gh(){}function Y$(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function Oe(){this.len=0,this.head=new Us(gh,0,0),this.tail=this.head,this.states=null}var Gw=function(){return Er.Buffer?function(){return(Oe.create=function(){return new hh})()}:function(){return new Oe}};Oe.create=Gw();Oe.alloc=function(t){return new Er.Array(t)};Er.Array!==Array&&(Oe.alloc=Er.pool(Oe.alloc,Er.Array.prototype.subarray));Oe.prototype._push=function(t,r,n){return this.tail=this.tail.next=new Us(t,r,n),this.len+=r,this};function yh(e,t,r){t[r]=e&255}function X$(e,t,r){for(;e>127;)t[r++]=e&127|128,e>>>=7;t[r]=e}function bh(e,t){this.len=e,this.next=void 0,this.val=t}bh.prototype=Object.create(Us.prototype);bh.prototype.fn=X$;Oe.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new bh((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};Oe.prototype.int32=function(t){return t<0?this._push(Th,10,Pu.fromNumber(t)):this.uint32(t)};Oe.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function Th(e,t,r){for(;e.hi;)t[r++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=e.lo&127|128,e.lo=e.lo>>>7;t[r++]=e.lo}Oe.prototype.uint64=function(t){var r=Pu.from(t);return this._push(Th,r.length(),r)};Oe.prototype.int64=Oe.prototype.uint64;Oe.prototype.sint64=function(t){var r=Pu.from(t).zzEncode();return this._push(Th,r.length(),r)};Oe.prototype.bool=function(t){return this._push(yh,1,t?1:0)};function mh(e,t,r){t[r]=e&255,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}Oe.prototype.fixed32=function(t){return this._push(mh,4,t>>>0)};Oe.prototype.sfixed32=Oe.prototype.fixed32;Oe.prototype.fixed64=function(t){var r=Pu.from(t);return this._push(mh,4,r.lo)._push(mh,4,r.hi)};Oe.prototype.sfixed64=Oe.prototype.fixed64;Oe.prototype.float=function(t){return this._push(Er.float.writeFloatLE,4,t)};Oe.prototype.double=function(t){return this._push(Er.float.writeDoubleLE,8,t)};var Q$=Er.Array.prototype.set?function(t,r,n){r.set(t,n)}:function(t,r,n){for(var o=0;o<t.length;++o)r[n+o]=t[o]};Oe.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(yh,1,0);if(Er.isString(t)){var n=Oe.alloc(r=Uw.length(t));Uw.decode(t,n,0),t=n}return this.uint32(r)._push(Q$,r,t)};Oe.prototype.string=function(t){var r=$w.length(t);return r?this.uint32(r)._push($w.write,r,t):this._push(yh,1,0)};Oe.prototype.fork=function(){return this.states=new Y$(this),this.head=this.tail=new Us(gh,0,0),this.len=0,this};Oe.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Us(gh,0,0),this.len=0),this};Oe.prototype.ldelim=function(){var t=this.head,r=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=r,this.len+=n),this};Oe.prototype.finish=function(){for(var t=this.head.next,r=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,r,n),n+=t.len,t=t.next;return r};Oe._configure=function(e){hh=e,Oe.create=Gw(),hh._configure()}});var jw=O((dZ,Vw)=>{"use strict";Vw.exports=sn;var Hw=Sh();(sn.prototype=Object.create(Hw.prototype)).constructor=sn;var fo=uo();function sn(){Hw.call(this)}sn._configure=function(){sn.alloc=fo._Buffer_allocUnsafe,sn.writeBytesBuffer=fo.Buffer&&fo.Buffer.prototype instanceof Uint8Array&&fo.Buffer.prototype.set.name==="set"?function(t,r,n){r.set(t,n)}:function(t,r,n){if(t.copy)t.copy(r,n,0,t.length);else for(var o=0;o<t.length;)r[n++]=t[o++]}};sn.prototype.bytes=function(t){fo.isString(t)&&(t=fo._Buffer_from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&this._push(sn.writeBytesBuffer,r,t),this};function e3(e,t,r){e.length<40?fo.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}sn.prototype.string=function(t){var r=fo.Buffer.byteLength(t);return this.uint32(r),r&&this._push(e3,r,t),this};sn._configure()});var vh=O((fZ,Jw)=>{"use strict";Jw.exports=pt;var Hr=uo(),Ih,Kw=Hr.LongBits,t3=Hr.utf8;function Vr(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function pt(e){this.buf=e,this.pos=0,this.len=e.length}var qw=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new pt(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new pt(t);throw Error("illegal buffer")},Zw=function(){return Hr.Buffer?function(r){return(pt.create=function(o){return Hr.Buffer.isBuffer(o)?new Ih(o):qw(o)})(r)}:qw};pt.create=Zw();pt.prototype._slice=Hr.Array.prototype.subarray||Hr.Array.prototype.slice;pt.prototype.uint32=(function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,Vr(this,10);return t}})();pt.prototype.int32=function(){return this.uint32()|0};pt.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function xh(){var e=new Kw(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw Vr(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw Vr(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}pt.prototype.bool=function(){return this.uint32()!==0};function Ru(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}pt.prototype.fixed32=function(){if(this.pos+4>this.len)throw Vr(this,4);return Ru(this.buf,this.pos+=4)};pt.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Vr(this,4);return Ru(this.buf,this.pos+=4)|0};function zw(){if(this.pos+8>this.len)throw Vr(this,8);return new Kw(Ru(this.buf,this.pos+=4),Ru(this.buf,this.pos+=4))}pt.prototype.float=function(){if(this.pos+4>this.len)throw Vr(this,4);var t=Hr.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};pt.prototype.double=function(){if(this.pos+8>this.len)throw Vr(this,4);var t=Hr.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};pt.prototype.bytes=function(){var t=this.uint32(),r=this.pos,n=this.pos+t;if(n>this.len)throw Vr(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(r,n);if(r===n){var o=Hr.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,n)};pt.prototype.string=function(){var t=this.bytes();return t3.read(t,0,t.length)};pt.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw Vr(this,t);this.pos+=t}else do if(this.pos>=this.len)throw Vr(this);while(this.buf[this.pos++]&128);return this};pt.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!==4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this};pt._configure=function(e){Ih=e,pt.create=Zw(),Ih._configure();var t=Hr.Long?"toLong":"toNumber";Hr.merge(pt.prototype,{int64:function(){return xh.call(this)[t](!1)},uint64:function(){return xh.call(this)[t](!0)},sint64:function(){return xh.call(this).zzDecode()[t](!1)},fixed64:function(){return zw.call(this)[t](!0)},sfixed64:function(){return zw.call(this)[t](!1)}})}});var ek=O((pZ,Qw)=>{"use strict";Qw.exports=jo;var Xw=vh();(jo.prototype=Object.create(Xw.prototype)).constructor=jo;var Yw=uo();function jo(e){Xw.call(this,e)}jo._configure=function(){Yw.Buffer&&(jo.prototype._slice=Yw.Buffer.prototype.slice)};jo.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};jo._configure()});var rk=O((hZ,tk)=>{"use strict";tk.exports=$s;var wh=uo();($s.prototype=Object.create(wh.EventEmitter.prototype)).constructor=$s;function $s(e,t,r){if(typeof e!="function")throw TypeError("rpcImpl must be a function");wh.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}$s.prototype.rpcCall=function e(t,r,n,o,a){if(!o)throw TypeError("request must be specified");var i=this;if(!a)return wh.asPromise(e,i,t,r,n,o);if(!i.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return i.rpcImpl(t,r[i.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(l,c){if(l)return i.emit("error",l,t),a(l);if(c===null){i.end(!0);return}if(!(c instanceof n))try{c=n[i.responseDelimited?"decodeDelimited":"decode"](c)}catch(u){return i.emit("error",u,t),a(u)}return i.emit("data",c,t),a(null,c)})}catch(s){i.emit("error",s,t),setTimeout(function(){a(s)},0);return}};$s.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var ok=O(nk=>{"use strict";var r3=nk;r3.Service=rk()});var ik=O((gZ,ak)=>{"use strict";ak.exports={}});var ck=O(lk=>{"use strict";var or=lk;or.build="minimal";or.Writer=Sh();or.BufferWriter=jw();or.Reader=vh();or.BufferReader=ek();or.util=uo();or.rpc=ok();or.roots=ik();or.configure=sk;function sk(){or.util._configure(),or.Writer._configure(or.BufferWriter),or.Reader._configure(or.BufferReader)}sk()});var dk=O((bZ,uk)=>{"use strict";uk.exports=ck()});var pk=O((TZ,fk)=>{"use strict";var ar=dk(),Ee=ar.Reader,Mn=ar.Writer,j=ar.util,oe=ar.roots.default||(ar.roots.default={});oe.simpleperf_report_proto=(function(){var e={};return e.Sample=(function(){function t(r){if(this.callchain=[],r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.time=j.Long?j.Long.fromBits(0,0,!0):0,t.prototype.threadId=0,t.prototype.callchain=j.emptyArray,t.prototype.eventCount=j.Long?j.Long.fromBits(0,0,!0):0,t.prototype.eventTypeId=0,t.prototype.unwindingResult=null,t.create=function(n){return new t(n)},t.encode=function(n,o){if(o||(o=Mn.create()),n.time!=null&&Object.hasOwnProperty.call(n,"time")&&o.uint32(8).uint64(n.time),n.threadId!=null&&Object.hasOwnProperty.call(n,"threadId")&&o.uint32(16).int32(n.threadId),n.callchain!=null&&n.callchain.length)for(var a=0;a<n.callchain.length;++a)oe.simpleperf_report_proto.Sample.CallChainEntry.encode(n.callchain[a],o.uint32(26).fork()).ldelim();return n.eventCount!=null&&Object.hasOwnProperty.call(n,"eventCount")&&o.uint32(32).uint64(n.eventCount),n.eventTypeId!=null&&Object.hasOwnProperty.call(n,"eventTypeId")&&o.uint32(40).uint32(n.eventTypeId),n.unwindingResult!=null&&Object.hasOwnProperty.call(n,"unwindingResult")&&oe.simpleperf_report_proto.Sample.UnwindingResult.encode(n.unwindingResult,o.uint32(50).fork()).ldelim(),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.Sample;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.time=n.uint64();break}case 2:{s.threadId=n.int32();break}case 3:{s.callchain&&s.callchain.length||(s.callchain=[]),s.callchain.push(oe.simpleperf_report_proto.Sample.CallChainEntry.decode(n,n.uint32()));break}case 4:{s.eventCount=n.uint64();break}case 5:{s.eventTypeId=n.uint32();break}case 6:{s.unwindingResult=oe.simpleperf_report_proto.Sample.UnwindingResult.decode(n,n.uint32());break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.time!=null&&n.hasOwnProperty("time")&&!j.isInteger(n.time)&&!(n.time&&j.isInteger(n.time.low)&&j.isInteger(n.time.high)))return"time: integer|Long expected";if(n.threadId!=null&&n.hasOwnProperty("threadId")&&!j.isInteger(n.threadId))return"threadId: integer expected";if(n.callchain!=null&&n.hasOwnProperty("callchain")){if(!Array.isArray(n.callchain))return"callchain: array expected";for(var o=0;o<n.callchain.length;++o){var a=oe.simpleperf_report_proto.Sample.CallChainEntry.verify(n.callchain[o]);if(a)return"callchain."+a}}if(n.eventCount!=null&&n.hasOwnProperty("eventCount")&&!j.isInteger(n.eventCount)&&!(n.eventCount&&j.isInteger(n.eventCount.low)&&j.isInteger(n.eventCount.high)))return"eventCount: integer|Long expected";if(n.eventTypeId!=null&&n.hasOwnProperty("eventTypeId")&&!j.isInteger(n.eventTypeId))return"eventTypeId: integer expected";if(n.unwindingResult!=null&&n.hasOwnProperty("unwindingResult")){var a=oe.simpleperf_report_proto.Sample.UnwindingResult.verify(n.unwindingResult);if(a)return"unwindingResult."+a}return null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.Sample)return n;var o=new oe.simpleperf_report_proto.Sample;if(n.time!=null&&(j.Long?(o.time=j.Long.fromValue(n.time)).unsigned=!0:typeof n.time=="string"?o.time=parseInt(n.time,10):typeof n.time=="number"?o.time=n.time:typeof n.time=="object"&&(o.time=new j.LongBits(n.time.low>>>0,n.time.high>>>0).toNumber(!0))),n.threadId!=null&&(o.threadId=n.threadId|0),n.callchain){if(!Array.isArray(n.callchain))throw TypeError(".simpleperf_report_proto.Sample.callchain: array expected");o.callchain=[];for(var a=0;a<n.callchain.length;++a){if(typeof n.callchain[a]!="object")throw TypeError(".simpleperf_report_proto.Sample.callchain: object expected");o.callchain[a]=oe.simpleperf_report_proto.Sample.CallChainEntry.fromObject(n.callchain[a])}}if(n.eventCount!=null&&(j.Long?(o.eventCount=j.Long.fromValue(n.eventCount)).unsigned=!0:typeof n.eventCount=="string"?o.eventCount=parseInt(n.eventCount,10):typeof n.eventCount=="number"?o.eventCount=n.eventCount:typeof n.eventCount=="object"&&(o.eventCount=new j.LongBits(n.eventCount.low>>>0,n.eventCount.high>>>0).toNumber(!0))),n.eventTypeId!=null&&(o.eventTypeId=n.eventTypeId>>>0),n.unwindingResult!=null){if(typeof n.unwindingResult!="object")throw TypeError(".simpleperf_report_proto.Sample.unwindingResult: object expected");o.unwindingResult=oe.simpleperf_report_proto.Sample.UnwindingResult.fromObject(n.unwindingResult)}return o},t.toObject=function(n,o){o||(o={});var a={};if((o.arrays||o.defaults)&&(a.callchain=[]),o.defaults){if(j.Long){var i=new j.Long(0,0,!0);a.time=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.time=o.longs===String?"0":0;if(a.threadId=0,j.Long){var i=new j.Long(0,0,!0);a.eventCount=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.eventCount=o.longs===String?"0":0;a.eventTypeId=0,a.unwindingResult=null}if(n.time!=null&&n.hasOwnProperty("time")&&(typeof n.time=="number"?a.time=o.longs===String?String(n.time):n.time:a.time=o.longs===String?j.Long.prototype.toString.call(n.time):o.longs===Number?new j.LongBits(n.time.low>>>0,n.time.high>>>0).toNumber(!0):n.time),n.threadId!=null&&n.hasOwnProperty("threadId")&&(a.threadId=n.threadId),n.callchain&&n.callchain.length){a.callchain=[];for(var s=0;s<n.callchain.length;++s)a.callchain[s]=oe.simpleperf_report_proto.Sample.CallChainEntry.toObject(n.callchain[s],o)}return n.eventCount!=null&&n.hasOwnProperty("eventCount")&&(typeof n.eventCount=="number"?a.eventCount=o.longs===String?String(n.eventCount):n.eventCount:a.eventCount=o.longs===String?j.Long.prototype.toString.call(n.eventCount):o.longs===Number?new j.LongBits(n.eventCount.low>>>0,n.eventCount.high>>>0).toNumber(!0):n.eventCount),n.eventTypeId!=null&&n.hasOwnProperty("eventTypeId")&&(a.eventTypeId=n.eventTypeId),n.unwindingResult!=null&&n.hasOwnProperty("unwindingResult")&&(a.unwindingResult=oe.simpleperf_report_proto.Sample.UnwindingResult.toObject(n.unwindingResult,o)),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ar.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.Sample"},t.CallChainEntry=(function(){function r(n){if(n)for(var o=Object.keys(n),a=0;a<o.length;++a)n[o[a]]!=null&&(this[o[a]]=n[o[a]])}return r.prototype.vaddrInFile=j.Long?j.Long.fromBits(0,0,!0):0,r.prototype.fileId=0,r.prototype.symbolId=0,r.prototype.executionType=0,r.create=function(o){return new r(o)},r.encode=function(o,a){return a||(a=Mn.create()),o.vaddrInFile!=null&&Object.hasOwnProperty.call(o,"vaddrInFile")&&a.uint32(8).uint64(o.vaddrInFile),o.fileId!=null&&Object.hasOwnProperty.call(o,"fileId")&&a.uint32(16).uint32(o.fileId),o.symbolId!=null&&Object.hasOwnProperty.call(o,"symbolId")&&a.uint32(24).int32(o.symbolId),o.executionType!=null&&Object.hasOwnProperty.call(o,"executionType")&&a.uint32(32).int32(o.executionType),a},r.encodeDelimited=function(o,a){return this.encode(o,a).ldelim()},r.decode=function(o,a,i){o instanceof Ee||(o=Ee.create(o));for(var s=a===void 0?o.len:o.pos+a,l=new oe.simpleperf_report_proto.Sample.CallChainEntry;o.pos<s;){var c=o.uint32();if(c===i)break;switch(c>>>3){case 1:{l.vaddrInFile=o.uint64();break}case 2:{l.fileId=o.uint32();break}case 3:{l.symbolId=o.int32();break}case 4:{l.executionType=o.int32();break}default:o.skipType(c&7);break}}return l},r.decodeDelimited=function(o){return o instanceof Ee||(o=new Ee(o)),this.decode(o,o.uint32())},r.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.vaddrInFile!=null&&o.hasOwnProperty("vaddrInFile")&&!j.isInteger(o.vaddrInFile)&&!(o.vaddrInFile&&j.isInteger(o.vaddrInFile.low)&&j.isInteger(o.vaddrInFile.high)))return"vaddrInFile: integer|Long expected";if(o.fileId!=null&&o.hasOwnProperty("fileId")&&!j.isInteger(o.fileId))return"fileId: integer expected";if(o.symbolId!=null&&o.hasOwnProperty("symbolId")&&!j.isInteger(o.symbolId))return"symbolId: integer expected";if(o.executionType!=null&&o.hasOwnProperty("executionType"))switch(o.executionType){default:return"executionType: enum value expected";case 0:case 1:case 2:case 3:break}return null},r.fromObject=function(o){if(o instanceof oe.simpleperf_report_proto.Sample.CallChainEntry)return o;var a=new oe.simpleperf_report_proto.Sample.CallChainEntry;switch(o.vaddrInFile!=null&&(j.Long?(a.vaddrInFile=j.Long.fromValue(o.vaddrInFile)).unsigned=!0:typeof o.vaddrInFile=="string"?a.vaddrInFile=parseInt(o.vaddrInFile,10):typeof o.vaddrInFile=="number"?a.vaddrInFile=o.vaddrInFile:typeof o.vaddrInFile=="object"&&(a.vaddrInFile=new j.LongBits(o.vaddrInFile.low>>>0,o.vaddrInFile.high>>>0).toNumber(!0))),o.fileId!=null&&(a.fileId=o.fileId>>>0),o.symbolId!=null&&(a.symbolId=o.symbolId|0),o.executionType){default:if(typeof o.executionType=="number"){a.executionType=o.executionType;break}break;case"NATIVE_METHOD":case 0:a.executionType=0;break;case"INTERPRETED_JVM_METHOD":case 1:a.executionType=1;break;case"JIT_JVM_METHOD":case 2:a.executionType=2;break;case"ART_METHOD":case 3:a.executionType=3;break}return a},r.toObject=function(o,a){a||(a={});var i={};if(a.defaults){if(j.Long){var s=new j.Long(0,0,!0);i.vaddrInFile=a.longs===String?s.toString():a.longs===Number?s.toNumber():s}else i.vaddrInFile=a.longs===String?"0":0;i.fileId=0,i.symbolId=0,i.executionType=a.enums===String?"NATIVE_METHOD":0}return o.vaddrInFile!=null&&o.hasOwnProperty("vaddrInFile")&&(typeof o.vaddrInFile=="number"?i.vaddrInFile=a.longs===String?String(o.vaddrInFile):o.vaddrInFile:i.vaddrInFile=a.longs===String?j.Long.prototype.toString.call(o.vaddrInFile):a.longs===Number?new j.LongBits(o.vaddrInFile.low>>>0,o.vaddrInFile.high>>>0).toNumber(!0):o.vaddrInFile),o.fileId!=null&&o.hasOwnProperty("fileId")&&(i.fileId=o.fileId),o.symbolId!=null&&o.hasOwnProperty("symbolId")&&(i.symbolId=o.symbolId),o.executionType!=null&&o.hasOwnProperty("executionType")&&(i.executionType=a.enums===String?oe.simpleperf_report_proto.Sample.CallChainEntry.ExecutionType[o.executionType]===void 0?o.executionType:oe.simpleperf_report_proto.Sample.CallChainEntry.ExecutionType[o.executionType]:o.executionType),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ar.util.toJSONOptions)},r.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/simpleperf_report_proto.Sample.CallChainEntry"},r.ExecutionType=(function(){var n={},o=Object.create(n);return o[n[0]="NATIVE_METHOD"]=0,o[n[1]="INTERPRETED_JVM_METHOD"]=1,o[n[2]="JIT_JVM_METHOD"]=2,o[n[3]="ART_METHOD"]=3,o})(),r})(),t.UnwindingResult=(function(){function r(n){if(n)for(var o=Object.keys(n),a=0;a<o.length;++a)n[o[a]]!=null&&(this[o[a]]=n[o[a]])}return r.prototype.rawErrorCode=0,r.prototype.errorAddr=j.Long?j.Long.fromBits(0,0,!0):0,r.prototype.errorCode=0,r.create=function(o){return new r(o)},r.encode=function(o,a){return a||(a=Mn.create()),o.rawErrorCode!=null&&Object.hasOwnProperty.call(o,"rawErrorCode")&&a.uint32(8).uint32(o.rawErrorCode),o.errorAddr!=null&&Object.hasOwnProperty.call(o,"errorAddr")&&a.uint32(16).uint64(o.errorAddr),o.errorCode!=null&&Object.hasOwnProperty.call(o,"errorCode")&&a.uint32(24).int32(o.errorCode),a},r.encodeDelimited=function(o,a){return this.encode(o,a).ldelim()},r.decode=function(o,a,i){o instanceof Ee||(o=Ee.create(o));for(var s=a===void 0?o.len:o.pos+a,l=new oe.simpleperf_report_proto.Sample.UnwindingResult;o.pos<s;){var c=o.uint32();if(c===i)break;switch(c>>>3){case 1:{l.rawErrorCode=o.uint32();break}case 2:{l.errorAddr=o.uint64();break}case 3:{l.errorCode=o.int32();break}default:o.skipType(c&7);break}}return l},r.decodeDelimited=function(o){return o instanceof Ee||(o=new Ee(o)),this.decode(o,o.uint32())},r.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.rawErrorCode!=null&&o.hasOwnProperty("rawErrorCode")&&!j.isInteger(o.rawErrorCode))return"rawErrorCode: integer expected";if(o.errorAddr!=null&&o.hasOwnProperty("errorAddr")&&!j.isInteger(o.errorAddr)&&!(o.errorAddr&&j.isInteger(o.errorAddr.low)&&j.isInteger(o.errorAddr.high)))return"errorAddr: integer|Long expected";if(o.errorCode!=null&&o.hasOwnProperty("errorCode"))switch(o.errorCode){default:return"errorCode: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:break}return null},r.fromObject=function(o){if(o instanceof oe.simpleperf_report_proto.Sample.UnwindingResult)return o;var a=new oe.simpleperf_report_proto.Sample.UnwindingResult;switch(o.rawErrorCode!=null&&(a.rawErrorCode=o.rawErrorCode>>>0),o.errorAddr!=null&&(j.Long?(a.errorAddr=j.Long.fromValue(o.errorAddr)).unsigned=!0:typeof o.errorAddr=="string"?a.errorAddr=parseInt(o.errorAddr,10):typeof o.errorAddr=="number"?a.errorAddr=o.errorAddr:typeof o.errorAddr=="object"&&(a.errorAddr=new j.LongBits(o.errorAddr.low>>>0,o.errorAddr.high>>>0).toNumber(!0))),o.errorCode){default:if(typeof o.errorCode=="number"){a.errorCode=o.errorCode;break}break;case"ERROR_NONE":case 0:a.errorCode=0;break;case"ERROR_UNKNOWN":case 1:a.errorCode=1;break;case"ERROR_NOT_ENOUGH_STACK":case 2:a.errorCode=2;break;case"ERROR_MEMORY_INVALID":case 3:a.errorCode=3;break;case"ERROR_UNWIND_INFO":case 4:a.errorCode=4;break;case"ERROR_INVALID_MAP":case 5:a.errorCode=5;break;case"ERROR_MAX_FRAME_EXCEEDED":case 6:a.errorCode=6;break;case"ERROR_REPEATED_FRAME":case 7:a.errorCode=7;break;case"ERROR_INVALID_ELF":case 8:a.errorCode=8;break}return a},r.toObject=function(o,a){a||(a={});var i={};if(a.defaults){if(i.rawErrorCode=0,j.Long){var s=new j.Long(0,0,!0);i.errorAddr=a.longs===String?s.toString():a.longs===Number?s.toNumber():s}else i.errorAddr=a.longs===String?"0":0;i.errorCode=a.enums===String?"ERROR_NONE":0}return o.rawErrorCode!=null&&o.hasOwnProperty("rawErrorCode")&&(i.rawErrorCode=o.rawErrorCode),o.errorAddr!=null&&o.hasOwnProperty("errorAddr")&&(typeof o.errorAddr=="number"?i.errorAddr=a.longs===String?String(o.errorAddr):o.errorAddr:i.errorAddr=a.longs===String?j.Long.prototype.toString.call(o.errorAddr):a.longs===Number?new j.LongBits(o.errorAddr.low>>>0,o.errorAddr.high>>>0).toNumber(!0):o.errorAddr),o.errorCode!=null&&o.hasOwnProperty("errorCode")&&(i.errorCode=a.enums===String?oe.simpleperf_report_proto.Sample.UnwindingResult.ErrorCode[o.errorCode]===void 0?o.errorCode:oe.simpleperf_report_proto.Sample.UnwindingResult.ErrorCode[o.errorCode]:o.errorCode),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ar.util.toJSONOptions)},r.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/simpleperf_report_proto.Sample.UnwindingResult"},r.ErrorCode=(function(){var n={},o=Object.create(n);return o[n[0]="ERROR_NONE"]=0,o[n[1]="ERROR_UNKNOWN"]=1,o[n[2]="ERROR_NOT_ENOUGH_STACK"]=2,o[n[3]="ERROR_MEMORY_INVALID"]=3,o[n[4]="ERROR_UNWIND_INFO"]=4,o[n[5]="ERROR_INVALID_MAP"]=5,o[n[6]="ERROR_MAX_FRAME_EXCEEDED"]=6,o[n[7]="ERROR_REPEATED_FRAME"]=7,o[n[8]="ERROR_INVALID_ELF"]=8,o})(),r})(),t})(),e.LostSituation=(function(){function t(r){if(r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.sampleCount=j.Long?j.Long.fromBits(0,0,!0):0,t.prototype.lostCount=j.Long?j.Long.fromBits(0,0,!0):0,t.create=function(n){return new t(n)},t.encode=function(n,o){return o||(o=Mn.create()),n.sampleCount!=null&&Object.hasOwnProperty.call(n,"sampleCount")&&o.uint32(8).uint64(n.sampleCount),n.lostCount!=null&&Object.hasOwnProperty.call(n,"lostCount")&&o.uint32(16).uint64(n.lostCount),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.LostSituation;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.sampleCount=n.uint64();break}case 2:{s.lostCount=n.uint64();break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){return typeof n!="object"||n===null?"object expected":n.sampleCount!=null&&n.hasOwnProperty("sampleCount")&&!j.isInteger(n.sampleCount)&&!(n.sampleCount&&j.isInteger(n.sampleCount.low)&&j.isInteger(n.sampleCount.high))?"sampleCount: integer|Long expected":n.lostCount!=null&&n.hasOwnProperty("lostCount")&&!j.isInteger(n.lostCount)&&!(n.lostCount&&j.isInteger(n.lostCount.low)&&j.isInteger(n.lostCount.high))?"lostCount: integer|Long expected":null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.LostSituation)return n;var o=new oe.simpleperf_report_proto.LostSituation;return n.sampleCount!=null&&(j.Long?(o.sampleCount=j.Long.fromValue(n.sampleCount)).unsigned=!0:typeof n.sampleCount=="string"?o.sampleCount=parseInt(n.sampleCount,10):typeof n.sampleCount=="number"?o.sampleCount=n.sampleCount:typeof n.sampleCount=="object"&&(o.sampleCount=new j.LongBits(n.sampleCount.low>>>0,n.sampleCount.high>>>0).toNumber(!0))),n.lostCount!=null&&(j.Long?(o.lostCount=j.Long.fromValue(n.lostCount)).unsigned=!0:typeof n.lostCount=="string"?o.lostCount=parseInt(n.lostCount,10):typeof n.lostCount=="number"?o.lostCount=n.lostCount:typeof n.lostCount=="object"&&(o.lostCount=new j.LongBits(n.lostCount.low>>>0,n.lostCount.high>>>0).toNumber(!0))),o},t.toObject=function(n,o){o||(o={});var a={};if(o.defaults){if(j.Long){var i=new j.Long(0,0,!0);a.sampleCount=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.sampleCount=o.longs===String?"0":0;if(j.Long){var i=new j.Long(0,0,!0);a.lostCount=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.lostCount=o.longs===String?"0":0}return n.sampleCount!=null&&n.hasOwnProperty("sampleCount")&&(typeof n.sampleCount=="number"?a.sampleCount=o.longs===String?String(n.sampleCount):n.sampleCount:a.sampleCount=o.longs===String?j.Long.prototype.toString.call(n.sampleCount):o.longs===Number?new j.LongBits(n.sampleCount.low>>>0,n.sampleCount.high>>>0).toNumber(!0):n.sampleCount),n.lostCount!=null&&n.hasOwnProperty("lostCount")&&(typeof n.lostCount=="number"?a.lostCount=o.longs===String?String(n.lostCount):n.lostCount:a.lostCount=o.longs===String?j.Long.prototype.toString.call(n.lostCount):o.longs===Number?new j.LongBits(n.lostCount.low>>>0,n.lostCount.high>>>0).toNumber(!0):n.lostCount),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ar.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.LostSituation"},t})(),e.File=(function(){function t(r){if(this.symbol=[],this.mangledSymbol=[],r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.id=0,t.prototype.path="",t.prototype.symbol=j.emptyArray,t.prototype.mangledSymbol=j.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,o){if(o||(o=Mn.create()),n.id!=null&&Object.hasOwnProperty.call(n,"id")&&o.uint32(8).uint32(n.id),n.path!=null&&Object.hasOwnProperty.call(n,"path")&&o.uint32(18).string(n.path),n.symbol!=null&&n.symbol.length)for(var a=0;a<n.symbol.length;++a)o.uint32(26).string(n.symbol[a]);if(n.mangledSymbol!=null&&n.mangledSymbol.length)for(var a=0;a<n.mangledSymbol.length;++a)o.uint32(34).string(n.mangledSymbol[a]);return o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.File;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.id=n.uint32();break}case 2:{s.path=n.string();break}case 3:{s.symbol&&s.symbol.length||(s.symbol=[]),s.symbol.push(n.string());break}case 4:{s.mangledSymbol&&s.mangledSymbol.length||(s.mangledSymbol=[]),s.mangledSymbol.push(n.string());break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.id!=null&&n.hasOwnProperty("id")&&!j.isInteger(n.id))return"id: integer expected";if(n.path!=null&&n.hasOwnProperty("path")&&!j.isString(n.path))return"path: string expected";if(n.symbol!=null&&n.hasOwnProperty("symbol")){if(!Array.isArray(n.symbol))return"symbol: array expected";for(var o=0;o<n.symbol.length;++o)if(!j.isString(n.symbol[o]))return"symbol: string[] expected"}if(n.mangledSymbol!=null&&n.hasOwnProperty("mangledSymbol")){if(!Array.isArray(n.mangledSymbol))return"mangledSymbol: array expected";for(var o=0;o<n.mangledSymbol.length;++o)if(!j.isString(n.mangledSymbol[o]))return"mangledSymbol: string[] expected"}return null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.File)return n;var o=new oe.simpleperf_report_proto.File;if(n.id!=null&&(o.id=n.id>>>0),n.path!=null&&(o.path=String(n.path)),n.symbol){if(!Array.isArray(n.symbol))throw TypeError(".simpleperf_report_proto.File.symbol: array expected");o.symbol=[];for(var a=0;a<n.symbol.length;++a)o.symbol[a]=String(n.symbol[a])}if(n.mangledSymbol){if(!Array.isArray(n.mangledSymbol))throw TypeError(".simpleperf_report_proto.File.mangledSymbol: array expected");o.mangledSymbol=[];for(var a=0;a<n.mangledSymbol.length;++a)o.mangledSymbol[a]=String(n.mangledSymbol[a])}return o},t.toObject=function(n,o){o||(o={});var a={};if((o.arrays||o.defaults)&&(a.symbol=[],a.mangledSymbol=[]),o.defaults&&(a.id=0,a.path=""),n.id!=null&&n.hasOwnProperty("id")&&(a.id=n.id),n.path!=null&&n.hasOwnProperty("path")&&(a.path=n.path),n.symbol&&n.symbol.length){a.symbol=[];for(var i=0;i<n.symbol.length;++i)a.symbol[i]=n.symbol[i]}if(n.mangledSymbol&&n.mangledSymbol.length){a.mangledSymbol=[];for(var i=0;i<n.mangledSymbol.length;++i)a.mangledSymbol[i]=n.mangledSymbol[i]}return a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ar.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.File"},t})(),e.Thread=(function(){function t(r){if(r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.threadId=0,t.prototype.processId=0,t.prototype.threadName="",t.create=function(n){return new t(n)},t.encode=function(n,o){return o||(o=Mn.create()),n.threadId!=null&&Object.hasOwnProperty.call(n,"threadId")&&o.uint32(8).uint32(n.threadId),n.processId!=null&&Object.hasOwnProperty.call(n,"processId")&&o.uint32(16).uint32(n.processId),n.threadName!=null&&Object.hasOwnProperty.call(n,"threadName")&&o.uint32(26).string(n.threadName),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.Thread;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.threadId=n.uint32();break}case 2:{s.processId=n.uint32();break}case 3:{s.threadName=n.string();break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){return typeof n!="object"||n===null?"object expected":n.threadId!=null&&n.hasOwnProperty("threadId")&&!j.isInteger(n.threadId)?"threadId: integer expected":n.processId!=null&&n.hasOwnProperty("processId")&&!j.isInteger(n.processId)?"processId: integer expected":n.threadName!=null&&n.hasOwnProperty("threadName")&&!j.isString(n.threadName)?"threadName: string expected":null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.Thread)return n;var o=new oe.simpleperf_report_proto.Thread;return n.threadId!=null&&(o.threadId=n.threadId>>>0),n.processId!=null&&(o.processId=n.processId>>>0),n.threadName!=null&&(o.threadName=String(n.threadName)),o},t.toObject=function(n,o){o||(o={});var a={};return o.defaults&&(a.threadId=0,a.processId=0,a.threadName=""),n.threadId!=null&&n.hasOwnProperty("threadId")&&(a.threadId=n.threadId),n.processId!=null&&n.hasOwnProperty("processId")&&(a.processId=n.processId),n.threadName!=null&&n.hasOwnProperty("threadName")&&(a.threadName=n.threadName),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ar.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.Thread"},t})(),e.MetaInfo=(function(){function t(r){if(this.eventType=[],r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.eventType=j.emptyArray,t.prototype.appPackageName="",t.prototype.appType="",t.prototype.androidSdkVersion="",t.prototype.androidBuildType="",t.prototype.traceOffcpu=!1,t.create=function(n){return new t(n)},t.encode=function(n,o){if(o||(o=Mn.create()),n.eventType!=null&&n.eventType.length)for(var a=0;a<n.eventType.length;++a)o.uint32(10).string(n.eventType[a]);return n.appPackageName!=null&&Object.hasOwnProperty.call(n,"appPackageName")&&o.uint32(18).string(n.appPackageName),n.appType!=null&&Object.hasOwnProperty.call(n,"appType")&&o.uint32(26).string(n.appType),n.androidSdkVersion!=null&&Object.hasOwnProperty.call(n,"androidSdkVersion")&&o.uint32(34).string(n.androidSdkVersion),n.androidBuildType!=null&&Object.hasOwnProperty.call(n,"androidBuildType")&&o.uint32(42).string(n.androidBuildType),n.traceOffcpu!=null&&Object.hasOwnProperty.call(n,"traceOffcpu")&&o.uint32(48).bool(n.traceOffcpu),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.MetaInfo;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.eventType&&s.eventType.length||(s.eventType=[]),s.eventType.push(n.string());break}case 2:{s.appPackageName=n.string();break}case 3:{s.appType=n.string();break}case 4:{s.androidSdkVersion=n.string();break}case 5:{s.androidBuildType=n.string();break}case 6:{s.traceOffcpu=n.bool();break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.eventType!=null&&n.hasOwnProperty("eventType")){if(!Array.isArray(n.eventType))return"eventType: array expected";for(var o=0;o<n.eventType.length;++o)if(!j.isString(n.eventType[o]))return"eventType: string[] expected"}return n.appPackageName!=null&&n.hasOwnProperty("appPackageName")&&!j.isString(n.appPackageName)?"appPackageName: string expected":n.appType!=null&&n.hasOwnProperty("appType")&&!j.isString(n.appType)?"appType: string expected":n.androidSdkVersion!=null&&n.hasOwnProperty("androidSdkVersion")&&!j.isString(n.androidSdkVersion)?"androidSdkVersion: string expected":n.androidBuildType!=null&&n.hasOwnProperty("androidBuildType")&&!j.isString(n.androidBuildType)?"androidBuildType: string expected":n.traceOffcpu!=null&&n.hasOwnProperty("traceOffcpu")&&typeof n.traceOffcpu!="boolean"?"traceOffcpu: boolean expected":null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.MetaInfo)return n;var o=new oe.simpleperf_report_proto.MetaInfo;if(n.eventType){if(!Array.isArray(n.eventType))throw TypeError(".simpleperf_report_proto.MetaInfo.eventType: array expected");o.eventType=[];for(var a=0;a<n.eventType.length;++a)o.eventType[a]=String(n.eventType[a])}return n.appPackageName!=null&&(o.appPackageName=String(n.appPackageName)),n.appType!=null&&(o.appType=String(n.appType)),n.androidSdkVersion!=null&&(o.androidSdkVersion=String(n.androidSdkVersion)),n.androidBuildType!=null&&(o.androidBuildType=String(n.androidBuildType)),n.traceOffcpu!=null&&(o.traceOffcpu=!!n.traceOffcpu),o},t.toObject=function(n,o){o||(o={});var a={};if((o.arrays||o.defaults)&&(a.eventType=[]),o.defaults&&(a.appPackageName="",a.appType="",a.androidSdkVersion="",a.androidBuildType="",a.traceOffcpu=!1),n.eventType&&n.eventType.length){a.eventType=[];for(var i=0;i<n.eventType.length;++i)a.eventType[i]=n.eventType[i]}return n.appPackageName!=null&&n.hasOwnProperty("appPackageName")&&(a.appPackageName=n.appPackageName),n.appType!=null&&n.hasOwnProperty("appType")&&(a.appType=n.appType),n.androidSdkVersion!=null&&n.hasOwnProperty("androidSdkVersion")&&(a.androidSdkVersion=n.androidSdkVersion),n.androidBuildType!=null&&n.hasOwnProperty("androidBuildType")&&(a.androidBuildType=n.androidBuildType),n.traceOffcpu!=null&&n.hasOwnProperty("traceOffcpu")&&(a.traceOffcpu=n.traceOffcpu),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ar.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.MetaInfo"},t})(),e.ContextSwitch=(function(){function t(r){if(r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.switchOn=!1,t.prototype.time=j.Long?j.Long.fromBits(0,0,!0):0,t.prototype.threadId=0,t.create=function(n){return new t(n)},t.encode=function(n,o){return o||(o=Mn.create()),n.switchOn!=null&&Object.hasOwnProperty.call(n,"switchOn")&&o.uint32(8).bool(n.switchOn),n.time!=null&&Object.hasOwnProperty.call(n,"time")&&o.uint32(16).uint64(n.time),n.threadId!=null&&Object.hasOwnProperty.call(n,"threadId")&&o.uint32(24).uint32(n.threadId),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.ContextSwitch;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.switchOn=n.bool();break}case 2:{s.time=n.uint64();break}case 3:{s.threadId=n.uint32();break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){return typeof n!="object"||n===null?"object expected":n.switchOn!=null&&n.hasOwnProperty("switchOn")&&typeof n.switchOn!="boolean"?"switchOn: boolean expected":n.time!=null&&n.hasOwnProperty("time")&&!j.isInteger(n.time)&&!(n.time&&j.isInteger(n.time.low)&&j.isInteger(n.time.high))?"time: integer|Long expected":n.threadId!=null&&n.hasOwnProperty("threadId")&&!j.isInteger(n.threadId)?"threadId: integer expected":null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.ContextSwitch)return n;var o=new oe.simpleperf_report_proto.ContextSwitch;return n.switchOn!=null&&(o.switchOn=!!n.switchOn),n.time!=null&&(j.Long?(o.time=j.Long.fromValue(n.time)).unsigned=!0:typeof n.time=="string"?o.time=parseInt(n.time,10):typeof n.time=="number"?o.time=n.time:typeof n.time=="object"&&(o.time=new j.LongBits(n.time.low>>>0,n.time.high>>>0).toNumber(!0))),n.threadId!=null&&(o.threadId=n.threadId>>>0),o},t.toObject=function(n,o){o||(o={});var a={};if(o.defaults){if(a.switchOn=!1,j.Long){var i=new j.Long(0,0,!0);a.time=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.time=o.longs===String?"0":0;a.threadId=0}return n.switchOn!=null&&n.hasOwnProperty("switchOn")&&(a.switchOn=n.switchOn),n.time!=null&&n.hasOwnProperty("time")&&(typeof n.time=="number"?a.time=o.longs===String?String(n.time):n.time:a.time=o.longs===String?j.Long.prototype.toString.call(n.time):o.longs===Number?new j.LongBits(n.time.low>>>0,n.time.high>>>0).toNumber(!0):n.time),n.threadId!=null&&n.hasOwnProperty("threadId")&&(a.threadId=n.threadId),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ar.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.ContextSwitch"},t})(),e.Record=(function(){function t(n){if(n)for(var o=Object.keys(n),a=0;a<o.length;++a)n[o[a]]!=null&&(this[o[a]]=n[o[a]])}t.prototype.sample=null,t.prototype.lost=null,t.prototype.file=null,t.prototype.thread=null,t.prototype.metaInfo=null,t.prototype.contextSwitch=null;var r;return Object.defineProperty(t.prototype,"recordData",{get:j.oneOfGetter(r=["sample","lost","file","thread","metaInfo","contextSwitch"]),set:j.oneOfSetter(r)}),t.create=function(o){return new t(o)},t.encode=function(o,a){return a||(a=Mn.create()),o.sample!=null&&Object.hasOwnProperty.call(o,"sample")&&oe.simpleperf_report_proto.Sample.encode(o.sample,a.uint32(10).fork()).ldelim(),o.lost!=null&&Object.hasOwnProperty.call(o,"lost")&&oe.simpleperf_report_proto.LostSituation.encode(o.lost,a.uint32(18).fork()).ldelim(),o.file!=null&&Object.hasOwnProperty.call(o,"file")&&oe.simpleperf_report_proto.File.encode(o.file,a.uint32(26).fork()).ldelim(),o.thread!=null&&Object.hasOwnProperty.call(o,"thread")&&oe.simpleperf_report_proto.Thread.encode(o.thread,a.uint32(34).fork()).ldelim(),o.metaInfo!=null&&Object.hasOwnProperty.call(o,"metaInfo")&&oe.simpleperf_report_proto.MetaInfo.encode(o.metaInfo,a.uint32(42).fork()).ldelim(),o.contextSwitch!=null&&Object.hasOwnProperty.call(o,"contextSwitch")&&oe.simpleperf_report_proto.ContextSwitch.encode(o.contextSwitch,a.uint32(50).fork()).ldelim(),a},t.encodeDelimited=function(o,a){return this.encode(o,a).ldelim()},t.decode=function(o,a,i){o instanceof Ee||(o=Ee.create(o));for(var s=a===void 0?o.len:o.pos+a,l=new oe.simpleperf_report_proto.Record;o.pos<s;){var c=o.uint32();if(c===i)break;switch(c>>>3){case 1:{l.sample=oe.simpleperf_report_proto.Sample.decode(o,o.uint32());break}case 2:{l.lost=oe.simpleperf_report_proto.LostSituation.decode(o,o.uint32());break}case 3:{l.file=oe.simpleperf_report_proto.File.decode(o,o.uint32());break}case 4:{l.thread=oe.simpleperf_report_proto.Thread.decode(o,o.uint32());break}case 5:{l.metaInfo=oe.simpleperf_report_proto.MetaInfo.decode(o,o.uint32());break}case 6:{l.contextSwitch=oe.simpleperf_report_proto.ContextSwitch.decode(o,o.uint32());break}default:o.skipType(c&7);break}}return l},t.decodeDelimited=function(o){return o instanceof Ee||(o=new Ee(o)),this.decode(o,o.uint32())},t.verify=function(o){if(typeof o!="object"||o===null)return"object expected";var a={};if(o.sample!=null&&o.hasOwnProperty("sample")){a.recordData=1;{var i=oe.simpleperf_report_proto.Sample.verify(o.sample);if(i)return"sample."+i}}if(o.lost!=null&&o.hasOwnProperty("lost")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.LostSituation.verify(o.lost);if(i)return"lost."+i}}if(o.file!=null&&o.hasOwnProperty("file")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.File.verify(o.file);if(i)return"file."+i}}if(o.thread!=null&&o.hasOwnProperty("thread")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.Thread.verify(o.thread);if(i)return"thread."+i}}if(o.metaInfo!=null&&o.hasOwnProperty("metaInfo")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.MetaInfo.verify(o.metaInfo);if(i)return"metaInfo."+i}}if(o.contextSwitch!=null&&o.hasOwnProperty("contextSwitch")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.ContextSwitch.verify(o.contextSwitch);if(i)return"contextSwitch."+i}}return null},t.fromObject=function(o){if(o instanceof oe.simpleperf_report_proto.Record)return o;var a=new oe.simpleperf_report_proto.Record;if(o.sample!=null){if(typeof o.sample!="object")throw TypeError(".simpleperf_report_proto.Record.sample: object expected");a.sample=oe.simpleperf_report_proto.Sample.fromObject(o.sample)}if(o.lost!=null){if(typeof o.lost!="object")throw TypeError(".simpleperf_report_proto.Record.lost: object expected");a.lost=oe.simpleperf_report_proto.LostSituation.fromObject(o.lost)}if(o.file!=null){if(typeof o.file!="object")throw TypeError(".simpleperf_report_proto.Record.file: object expected");a.file=oe.simpleperf_report_proto.File.fromObject(o.file)}if(o.thread!=null){if(typeof o.thread!="object")throw TypeError(".simpleperf_report_proto.Record.thread: object expected");a.thread=oe.simpleperf_report_proto.Thread.fromObject(o.thread)}if(o.metaInfo!=null){if(typeof o.metaInfo!="object")throw TypeError(".simpleperf_report_proto.Record.metaInfo: object expected");a.metaInfo=oe.simpleperf_report_proto.MetaInfo.fromObject(o.metaInfo)}if(o.contextSwitch!=null){if(typeof o.contextSwitch!="object")throw TypeError(".simpleperf_report_proto.Record.contextSwitch: object expected");a.contextSwitch=oe.simpleperf_report_proto.ContextSwitch.fromObject(o.contextSwitch)}return a},t.toObject=function(o,a){a||(a={});var i={};return o.sample!=null&&o.hasOwnProperty("sample")&&(i.sample=oe.simpleperf_report_proto.Sample.toObject(o.sample,a),a.oneofs&&(i.recordData="sample")),o.lost!=null&&o.hasOwnProperty("lost")&&(i.lost=oe.simpleperf_report_proto.LostSituation.toObject(o.lost,a),a.oneofs&&(i.recordData="lost")),o.file!=null&&o.hasOwnProperty("file")&&(i.file=oe.simpleperf_report_proto.File.toObject(o.file,a),a.oneofs&&(i.recordData="file")),o.thread!=null&&o.hasOwnProperty("thread")&&(i.thread=oe.simpleperf_report_proto.Thread.toObject(o.thread,a),a.oneofs&&(i.recordData="thread")),o.metaInfo!=null&&o.hasOwnProperty("metaInfo")&&(i.metaInfo=oe.simpleperf_report_proto.MetaInfo.toObject(o.metaInfo,a),a.oneofs&&(i.recordData="metaInfo")),o.contextSwitch!=null&&o.hasOwnProperty("contextSwitch")&&(i.contextSwitch=oe.simpleperf_report_proto.ContextSwitch.toObject(o.contextSwitch,a),a.oneofs&&(i.recordData="contextSwitch")),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,ar.util.toJSONOptions)},t.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/simpleperf_report_proto.Record"},t})(),e})();fk.exports=oe});function Ke(e,t,r){this.low=e|0,this.high=t|0,this.unsigned=!!r}function Ht(e){return(e&&e.__isLong__)===!0}function hk(e){var t=Math.clz32(e&-e);return e?31-t:t}function qo(e,t){var r,n,o;return t?(e>>>=0,(o=0<=e&&e<256)&&(n=gk[e],n)?n:(r=Le(e,0,!0),o&&(gk[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(n=mk[e],n)?n:(r=Le(e,e<0?-1:0,!1),o&&(mk[e]=r),r))}function Ar(e,t){if(isNaN(e))return t?Fn:jr;if(t){if(e<0)return Fn;if(e>=Sk)return vk}else{if(e<=-bk)return ir;if(e+1>=bk)return Ik}return e<0?Ar(-e,t).neg():Le(e%Ya|0,e/Ya|0,t)}function Le(e,t,r){return new Ke(e,t,r)}function _h(e,t,r){if(e.length===0)throw Error("empty string");if(typeof t=="number"?(r=t,t=!1):t=!!t,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t?Fn:jr;if(r=r||10,r<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return _h(e.substring(1),t,r).neg();for(var o=Ar(Mu(r,8)),a=jr,i=0;i<e.length;i+=8){var s=Math.min(8,e.length-i),l=parseInt(e.substring(i,i+s),r);if(s<8){var c=Ar(Mu(r,s));a=a.mul(c).add(Ar(l))}else a=a.mul(o),a=a.add(Ar(l))}return a.unsigned=t,a}function Pr(e,t){return typeof e=="number"?Ar(e,t):typeof e=="string"?_h(e,t):Le(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}var Nr,mk,gk,Mu,yk,n3,Ya,Sk,bk,Tk,jr,Fn,Ja,xk,kh,Ik,vk,ir,Y,wk,kk=No(()=>{Nr=null;try{Nr=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}Ke.prototype.__isLong__;Object.defineProperty(Ke.prototype,"__isLong__",{value:!0});Ke.isLong=Ht;mk={},gk={};Ke.fromInt=qo;Ke.fromNumber=Ar;Ke.fromBits=Le;Mu=Math.pow;Ke.fromString=_h;Ke.fromValue=Pr;yk=65536,n3=1<<24,Ya=yk*yk,Sk=Ya*Ya,bk=Sk/2,Tk=qo(n3),jr=qo(0);Ke.ZERO=jr;Fn=qo(0,!0);Ke.UZERO=Fn;Ja=qo(1);Ke.ONE=Ja;xk=qo(1,!0);Ke.UONE=xk;kh=qo(-1);Ke.NEG_ONE=kh;Ik=Le(-1,2147483647,!1);Ke.MAX_VALUE=Ik;vk=Le(-1,-1,!0);Ke.MAX_UNSIGNED_VALUE=vk;ir=Le(0,-2147483648,!1);Ke.MIN_VALUE=ir;Y=Ke.prototype;Y.toInt=function(){return this.unsigned?this.low>>>0:this.low};Y.toNumber=function(){return this.unsigned?(this.high>>>0)*Ya+(this.low>>>0):this.high*Ya+(this.low>>>0)};Y.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(ir)){var r=Ar(t),n=this.div(r),o=n.mul(r).sub(this);return n.toString(t)+o.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var a=Ar(Mu(t,6),this.unsigned),i=this,s="";;){var l=i.div(a),c=i.sub(l.mul(a)).toInt()>>>0,u=c.toString(t);if(i=l,i.isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}};Y.getHighBits=function(){return this.high};Y.getHighBitsUnsigned=function(){return this.high>>>0};Y.getLowBits=function(){return this.low};Y.getLowBitsUnsigned=function(){return this.low>>>0};Y.getNumBitsAbs=function(){if(this.isNegative())return this.eq(ir)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return this.high!=0?r+33:r+1};Y.isSafeInteger=function(){var t=this.high>>21;return t?this.unsigned?!1:t===-1&&!(this.low===0&&this.high===-2097152):!0};Y.isZero=function(){return this.high===0&&this.low===0};Y.eqz=Y.isZero;Y.isNegative=function(){return!this.unsigned&&this.high<0};Y.isPositive=function(){return this.unsigned||this.high>=0};Y.isOdd=function(){return(this.low&1)===1};Y.isEven=function(){return(this.low&1)===0};Y.equals=function(t){return Ht(t)||(t=Pr(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};Y.eq=Y.equals;Y.notEquals=function(t){return!this.eq(t)};Y.neq=Y.notEquals;Y.ne=Y.notEquals;Y.lessThan=function(t){return this.comp(t)<0};Y.lt=Y.lessThan;Y.lessThanOrEqual=function(t){return this.comp(t)<=0};Y.lte=Y.lessThanOrEqual;Y.le=Y.lessThanOrEqual;Y.greaterThan=function(t){return this.comp(t)>0};Y.gt=Y.greaterThan;Y.greaterThanOrEqual=function(t){return this.comp(t)>=0};Y.gte=Y.greaterThanOrEqual;Y.ge=Y.greaterThanOrEqual;Y.compare=function(t){if(Ht(t)||(t=Pr(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1};Y.comp=Y.compare;Y.negate=function(){return!this.unsigned&&this.eq(ir)?ir:this.not().add(Ja)};Y.neg=Y.negate;Y.add=function(t){Ht(t)||(t=Pr(t));var r=this.high>>>16,n=this.high&65535,o=this.low>>>16,a=this.low&65535,i=t.high>>>16,s=t.high&65535,l=t.low>>>16,c=t.low&65535,u=0,d=0,f=0,p=0;return p+=a+c,f+=p>>>16,p&=65535,f+=o+l,d+=f>>>16,f&=65535,d+=n+s,u+=d>>>16,d&=65535,u+=r+i,u&=65535,Le(f<<16|p,u<<16|d,this.unsigned)};Y.subtract=function(t){return Ht(t)||(t=Pr(t)),this.add(t.neg())};Y.sub=Y.subtract;Y.multiply=function(t){if(this.isZero())return this;if(Ht(t)||(t=Pr(t)),Nr){var r=Nr.mul(this.low,this.high,t.low,t.high);return Le(r,Nr.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Fn:jr;if(this.eq(ir))return t.isOdd()?ir:jr;if(t.eq(ir))return this.isOdd()?ir:jr;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Tk)&&t.lt(Tk))return Ar(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,o=this.high&65535,a=this.low>>>16,i=this.low&65535,s=t.high>>>16,l=t.high&65535,c=t.low>>>16,u=t.low&65535,d=0,f=0,p=0,h=0;return h+=i*u,p+=h>>>16,h&=65535,p+=a*u,f+=p>>>16,p&=65535,p+=i*c,f+=p>>>16,p&=65535,f+=o*u,d+=f>>>16,f&=65535,f+=a*c,d+=f>>>16,f&=65535,f+=i*l,d+=f>>>16,f&=65535,d+=n*u+o*c+a*l+i*s,d&=65535,Le(p<<16|h,d<<16|f,this.unsigned)};Y.mul=Y.multiply;Y.divide=function(t){if(Ht(t)||(t=Pr(t)),t.isZero())throw Error("division by zero");if(Nr){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Nr.div_u:Nr.div_s)(this.low,this.high,t.low,t.high);return Le(r,Nr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Fn:jr;var n,o,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Fn;if(t.gt(this.shru(1)))return xk;a=Fn}else{if(this.eq(ir)){if(t.eq(Ja)||t.eq(kh))return ir;if(t.eq(ir))return Ja;var i=this.shr(1);return n=i.div(t).shl(1),n.eq(jr)?t.isNegative()?Ja:kh:(o=this.sub(t.mul(n)),a=n.add(o.div(t)),a)}else if(t.eq(ir))return this.unsigned?Fn:jr;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=jr}for(o=this;o.gte(t);){n=Math.max(1,Math.floor(o.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),l=s<=48?1:Mu(2,s-48),c=Ar(n),u=c.mul(t);u.isNegative()||u.gt(o);)n-=l,c=Ar(n,this.unsigned),u=c.mul(t);c.isZero()&&(c=Ja),a=a.add(c),o=o.sub(u)}return a};Y.div=Y.divide;Y.modulo=function(t){if(Ht(t)||(t=Pr(t)),Nr){var r=(this.unsigned?Nr.rem_u:Nr.rem_s)(this.low,this.high,t.low,t.high);return Le(r,Nr.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};Y.mod=Y.modulo;Y.rem=Y.modulo;Y.not=function(){return Le(~this.low,~this.high,this.unsigned)};Y.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};Y.clz=Y.countLeadingZeros;Y.countTrailingZeros=function(){return this.low?hk(this.low):hk(this.high)+32};Y.ctz=Y.countTrailingZeros;Y.and=function(t){return Ht(t)||(t=Pr(t)),Le(this.low&t.low,this.high&t.high,this.unsigned)};Y.or=function(t){return Ht(t)||(t=Pr(t)),Le(this.low|t.low,this.high|t.high,this.unsigned)};Y.xor=function(t){return Ht(t)||(t=Pr(t)),Le(this.low^t.low,this.high^t.high,this.unsigned)};Y.shiftLeft=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Le(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Le(0,this.low<<t-32,this.unsigned)};Y.shl=Y.shiftLeft;Y.shiftRight=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Le(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Le(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};Y.shr=Y.shiftRight;Y.shiftRightUnsigned=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Le(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?Le(this.high,0,this.unsigned):Le(this.high>>>t-32,0,this.unsigned)};Y.shru=Y.shiftRightUnsigned;Y.shr_u=Y.shiftRightUnsigned;Y.rotateLeft=function(t){var r;return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Le(this.high,this.low,this.unsigned):t<32?(r=32-t,Le(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,Le(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))};Y.rotl=Y.rotateLeft;Y.rotateRight=function(t){var r;return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Le(this.high,this.low,this.unsigned):t<32?(r=32-t,Le(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,Le(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};Y.rotr=Y.rotateRight;Y.toSigned=function(){return this.unsigned?Le(this.low,this.high,!1):this};Y.toUnsigned=function(){return this.unsigned?this:Le(this.low,this.high,!0)};Y.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};Y.toBytesLE=function(){var t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};Y.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255]};Ke.fromBytes=function(t,r,n){return n?Ke.fromBytesLE(t,r):Ke.fromBytesBE(t,r)};Ke.fromBytesLE=function(t,r){return new Ke(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)};Ke.fromBytesBE=function(t,r){return new Ke(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)};typeof BigInt=="function"&&(Ke.fromBigInt=function(t,r){var n=Number(BigInt.asIntN(32,t)),o=Number(BigInt.asIntN(32,t>>BigInt(32)));return Le(n,o,r)},Ke.fromValue=function(t,r){return typeof t=="bigint"?Ke.fromBigInt(t,r):Pr(t,r)},Y.toBigInt=function(){var t=BigInt(this.low>>>0),r=BigInt(this.unsigned?this.high>>>0:this.high);return r<<BigInt(32)|t});wk=Ke});var Ek={};qy(Ek,{SimpleperfReportConverter:()=>Ou,convertSimpleperfTraceProfile:()=>o3});function Fu(e){return wk.isLong(e)?e.toNumber():e}function _k(e){return Fu(e)/1e6}function o3(e){return new Ou(e).process()}var Ck,On,Ch,Eh,Nh,Ah,Ph,Rh,Mh,Ou,Nk=No(()=>{"use strict";Ck=ce(pk());cr();rr();ur();xe();lh();kk();On=class{static categoryList=[];static Other=this.createCategory("Other","grey");static Native=this.createCategory("Native","magenta");static Java=this.createCategory("Java","green");static System=this.createCategory("System","yellow");static Kernel=this.createCategory("Kernel","orange");static toJson(){return this.categoryList}static createCategory(t,r){let n=this.categoryList.length;return this.categoryList.push({name:t,color:r,subcategories:["Other"]}),n}},Ch=class{strings;resourceTable=Na();resourcesMap=new Map;constructor(t){this.strings=t}toJson(){return this.resourceTable}findOrAddResource(t){let r=this.resourcesMap.get(t.id);return r||(this.resourceTable.lib.push(null),this.resourceTable.name.push(this.strings.indexForString(t.path)),this.resourceTable.host.push(null),this.resourceTable.type.push(1),r=this.resourceTable.length++,this.resourcesMap.set(t.id,r)),r}},Eh=class{strings;funcTable=Ca();funcMap=new Map;constructor(t){this.strings=t}toJson(){return this.funcTable}findOrAddFunc(t,r){let n=this.strings.indexForString(t),o=`${n}-${r}`,a=this.funcMap.get(o);return a||(this.funcTable.name.push(n),this.funcTable.isJS.push(!1),this.funcTable.relevantForJS.push(!1),this.funcTable.resource.push(r),this.funcTable.source.push(null),this.funcTable.lineNumber.push(null),this.funcTable.columnNumber.push(null),a=this.funcTable.length++,this.funcMap.set(o,a)),a}},Nh=class{strings;frameTable=_a();frameMap=new Map;constructor(t){this.strings=t}toJson(){return this.frameTable}findOrAddFrame(t,r){let n=`${t}-${r}`,o=this.frameMap.get(n);return o||(this.frameTable.address.push(-1),this.frameTable.inlineDepth.push(0),this.frameTable.category.push(r),this.frameTable.subcategory.push(0),this.frameTable.func.push(t),this.frameTable.nativeSymbol.push(null),this.frameTable.innerWindowID.push(null),this.frameTable.line.push(null),this.frameTable.column.push(null),o=this.frameTable.length++,this.frameMap.set(n,o)),o}},Ah=class{strings;stackTable=nn();stackMap=new Map;constructor(t){this.strings=t}toJson(){return this.stackTable}findOrAddStack(t,r){let n=`${t}-${r??"null"}`,o=this.stackMap.get(n);return o||(this.stackTable.frame.push(t),this.stackTable.prefix.push(r),o=this.stackTable.length++,this.stackMap.set(n,o)),o}},Ph=class{stringArray=[];stringTable=$e.withBackingArray(this.stringArray);stackTable=new Ah(this.stringTable);frameTable=new Nh(this.stringTable);funcTable=new Eh(this.stringTable);resourceTable=new Ch(this.stringTable);toJson(){return{stackTable:this.stackTable.toJson(),frameTable:this.frameTable.toJson(),funcTable:this.funcTable.toJson(),resourceTable:this.resourceTable.toJson(),nativeSymbols:Aa(),sources:Pa(),stringArray:this.stringArray}}},Rh=class{name;isMainThread;tid;pid;strings;sampleTable=tS();stackTable;frameTable;funcTable;resourceTable;cpuClockEventId=-1;constructor(t,r){this.tid=t.threadId,this.pid=t.processId,this.isMainThread=t.threadId===t.processId,this.name=t.threadName??"",this.strings=r.stringTable,this.stackTable=r.stackTable,this.frameTable=r.frameTable,this.funcTable=r.funcTable,this.resourceTable=r.resourceTable}toJson(){return{processType:"default",processStartupTime:0,processShutdownTime:null,registerTime:0,unregisterTime:null,pausedRanges:[],name:this.name,isMainThread:this.isMainThread,pid:this.pid.toString(),tid:this.tid,samples:this.sampleTable,markers:Ur()}}enableCpuClock(t){this.cpuClockEventId=t,t>=0&&(this.sampleTable.weight=[],this.sampleTable.weightType="tracing-ms")}addSample(t,r){let n=null;for(let o of t.callchain.reverse()){let a=r.get(o.fileId),i=this.resourceTable.findOrAddResource(a),s=o.symbolId>=0?a.symbol[o.symbolId]:`${a.path.split(/[\\/]/).pop()}+0x${o.vaddrInFile.toString(16)}`,l=this.funcTable.findOrAddFunc(s,i),c=a.path??"",u=c.startsWith("/apex/")||c.startsWith("/system/")||c.startsWith("/vendor/"),d=On.Other;if(c==="[kernel.kallsyms]"||c.endsWith(".ko"))d=On.Kernel;else if(c.endsWith(".so"))d=u?On.System:On.Native;else if(c==="[JIT app cache]"||c.endsWith(".vdex")||c.endsWith(".apk")||c.endsWith(".jar")||c.endsWith(".oat")||c.endsWith(".odex")){let p=s.startsWith("java.")||s.startsWith("javax.")||s.startsWith("kotlin.")||s.startsWith("kotlinx.")||s.startsWith("dalvik."),h=s.startsWith("android.")||s.startsWith("com.android.")||s.startsWith("androidx.")||s.startsWith("libcore.");d=u||h||p?On.System:On.Java}let f=this.frameTable.findOrAddFrame(l,d);n=this.stackTable.findOrAddStack(f,n)}if(this.sampleTable.stack.push(n),W(this.sampleTable.time).push(_k(t.time??0)),this.sampleTable.weight){let o=this.cpuClockEventId>=0&&t.eventTypeId===this.cpuClockEventId?_k(t.eventCount??0):0;this.sampleTable.weight.push(o)}this.sampleTable.length++}},Mh=class{threads=[];threadMap=new Map;fileMap=new Map;eventTypes=[];cpuClockEventId=-1;appPackageName=null;sampleCount=0;lostCount=0;shared=new Ph;toJson(){return{meta:this.getProfileMeta(),libs:[],shared:this.shared.toJson(),threads:this.threads.map(t=>t.toJson())}}getProfileMeta(){return{interval:0,startTime:0,processType:0,categories:On.toJson(),product:this.appPackageName??"Android Profile",stackwalk:0,version:30,preprocessedProfileVersion:62,symbolicationNotSupported:!0,markerSchema:[],platform:"Android",toolkit:"android",importedFrom:"Simpleperf",usesOnlyOneStackType:!0,sourceCodeIsNotOnSearchfox:!0,extra:[{label:"Profile Information",entries:[{label:"Sample Count",format:"integer",value:this.sampleCount},{label:"Lost Samples",format:"integer",value:this.lostCount},{label:"Sampled events",format:"list",value:this.eventTypes}]}],keepProfileThreadOrder:!0}}setMetaInfo(t){this.eventTypes=(t==null?void 0:t.eventType)??[],this.appPackageName=(t==null?void 0:t.appPackageName)??null,this.cpuClockEventId=(this.eventTypes&&this.eventTypes.indexOf("cpu-clock"))??-1}setLostSituation(t){this.sampleCount=Fu((t==null?void 0:t.sampleCount)??0),this.lostCount=Fu((t==null?void 0:t.lostCount)??0)}addFile(t){this.fileMap.set(t.id,t)}addThread(t){let r=new Rh(t,this.shared);this.threads.push(r),this.threadMap.set(t.threadId,r)}finalizeThreads(){this.threads.forEach(t=>{t.enableCpuClock(this.cpuClockEventId??-1)})}addSample(t){let r=this.threadMap.get(t.threadId);if(!r){console.warn(`Thread not found for sample: ${t.threadId}`);return}r.addSample(t,this.fileMap)}},Ou=class{buffer;bufferView;bufferOffset=0;constructor(t){this.buffer=t,this.bufferView=new DataView(t.buffer,t.byteOffset,t.byteLength)}readUint16LE(){let t=this.bufferView.getUint16(this.bufferOffset,!0);return this.bufferOffset+=2,t}readUint32LE(){let t=this.bufferView.getUint32(this.bufferOffset,!0);return this.bufferOffset+=4,t}readMagic(){if(!Cu(Ds,this.buffer))throw new Error("Invalid simpleperf file");this.bufferOffset+=Ds.length}readRecord(t){let r=this.buffer.subarray(this.bufferOffset,this.bufferOffset+t);return this.bufferOffset+=t,Ck.simpleperf_report_proto.Record.decode(r)}process(){var a;this.readMagic(),this.readUint16LE();let t=this.readUint32LE(),r=new Mh,n=[],o=0;for(;t>0;){let i=this.readRecord(t);switch(i.recordData){case"sample":n.push(i.sample);break;case"lost":o=Fu(((a=i.lost)==null?void 0:a.sampleCount)??0),r.setLostSituation(i.lost);break;case"file":r.addFile(i.file);break;case"thread":r.addThread(i.thread);break;case"metaInfo":r.setMetaInfo(i.metaInfo);break;case"contextSwitch":break;default:console.warn(`Unknown record type: ${i.recordData}`);break}t=this.readUint32LE()}if(n.length!==o)throw new Error("Samples count doesn't match the number of samples read");return r.finalizeThreads(),n.forEach(i=>r.addSample(i)),r.toJson()}}});var Hk=O(Du=>{"use strict";var A3=gu(),P3=Symbol.for("react.element"),R3=Symbol.for("react.fragment"),M3=Object.prototype.hasOwnProperty,F3=A3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,O3={key:!0,ref:!0,__self:!0,__source:!0};function Wk(e,t,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)M3.call(t,n)&&!O3.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:P3,type:e,key:a,ref:i,props:o,_owner:F3.current}}Du.Fragment=R3;Du.jsx=Wk;Du.jsxs=Wk});var Vk=O(Bu=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";var e=gu(),t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function b(_){if(_===null||typeof _!="object")return null;var K=h&&_[h]||_[y];return typeof K=="function"?K:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(_){{for(var K=arguments.length,ne=new Array(K>1?K-1:0),me=1;me<K;me++)ne[me-1]=arguments[me];T("error",_,ne)}}function T(_,K,ne){{var me=m.ReactDebugCurrentFrame,Fe=me.getStackAddendum();Fe!==""&&(K+="%s",ne=ne.concat([Fe]));var ze=ne.map(function(Ce){return String(Ce)});ze.unshift("Warning: "+K),Function.prototype.apply.call(console[_],console,ze)}}var S=!1,I=!1,v=!1,w=!1,k=!1,N;N=Symbol.for("react.module.reference");function R(_){return!!(typeof _=="string"||typeof _=="function"||_===n||_===a||k||_===o||_===c||_===u||w||_===p||S||I||v||typeof _=="object"&&_!==null&&(_.$$typeof===f||_.$$typeof===d||_.$$typeof===i||_.$$typeof===s||_.$$typeof===l||_.$$typeof===N||_.getModuleId!==void 0))}function F(_,K,ne){var me=_.displayName;if(me)return me;var Fe=K.displayName||K.name||"";return Fe!==""?ne+"("+Fe+")":ne}function G(_){return _.displayName||"Context"}function B(_){if(_==null)return null;if(typeof _.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof _=="object")switch(_.$$typeof){case s:var K=_;return G(K)+".Consumer";case i:var ne=_;return G(ne._context)+".Provider";case l:return F(_,_.render,"ForwardRef");case d:var me=_.displayName||null;return me!==null?me:B(_.type)||"Memo";case f:{var Fe=_,ze=Fe._payload,Ce=Fe._init;try{return B(Ce(ze))}catch{return null}}}return null}var Z=Object.assign,X=0,_e,D,re,E,A,M,P;function $(){}$.__reactDisabledLog=!0;function J(){{if(X===0){_e=console.log,D=console.info,re=console.warn,E=console.error,A=console.group,M=console.groupCollapsed,P=console.groupEnd;var _={configurable:!0,enumerable:!0,value:$,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}X++}}function H(){{if(X--,X===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},_,{value:_e}),info:Z({},_,{value:D}),warn:Z({},_,{value:re}),error:Z({},_,{value:E}),group:Z({},_,{value:A}),groupCollapsed:Z({},_,{value:M}),groupEnd:Z({},_,{value:P})})}X<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=m.ReactCurrentDispatcher,se;function de(_,K,ne){{if(se===void 0)try{throw Error()}catch(Fe){var me=Fe.stack.trim().match(/\n( *(at )?)/);se=me&&me[1]||""}return`
55
- `+se+_}}var ue=!1,fe;{var be=typeof WeakMap=="function"?WeakMap:Map;fe=new be}function V(_,K){if(!_||ue)return"";{var ne=fe.get(_);if(ne!==void 0)return ne}var me;ue=!0;var Fe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ze;ze=z.current,z.current=null,J();try{if(K){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(Dt){me=Dt}Reflect.construct(_,[],Ce)}else{try{Ce.call()}catch(Dt){me=Dt}_.call(Ce.prototype)}}else{try{throw Error()}catch(Dt){me=Dt}_()}}catch(Dt){if(Dt&&me&&typeof Dt.stack=="string"){for(var ve=Dt.stack.split(`
54
+ Check the top-level render call using <`+L+">.")}return C}function By(x,C){if(!(!x._store||x._store.validated||x.key!=null)){x._store.validated=!0;var L=KP(C);if(!Dy[L]){Dy[L]=!0;var U="";x&&x._owner&&x._owner!==S.current&&(U=" It was passed a child from "+qe(x._owner.type)+"."),Ta(x),X('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',L,U),Ta(null)}}}function Uy(x,C){if(typeof x=="object"){if(be(x))for(var L=0;L<x.length;L++){var U=x[L];tn(U)&&By(U,C)}else if(tn(x))x._store&&(x._store.validated=!0);else if(x){var ee=b(x);if(typeof ee=="function"&&ee!==x.entries)for(var he=ee.call(x),ie;!(ie=he.next()).done;)tn(ie.value)&&By(ie.value,C)}}}function $y(x){{var C=x.type;if(C==null||typeof C=="string")return;var L;if(typeof C=="function")L=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===d))L=C.propTypes;else return;if(L){var U=qe(C);jP(L,x.props,"prop",U,x)}else if(C.PropTypes!==void 0&&!bf){bf=!0;var ee=qe(C);X("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&X("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ZP(x){{for(var C=Object.keys(x.props),L=0;L<C.length;L++){var U=C[L];if(U!=="children"&&U!=="key"){Ta(x),X("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",U),Ta(null);break}}x.ref!==null&&(Ta(x),X("Invalid attribute `ref` supplied to `React.Fragment`."),Ta(null))}}function Gy(x,C,L){var U=Gl(x);if(!U){var ee="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(ee+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var he=zP(C);he?ee+=he:ee+=Ly();var ie;x===null?ie="null":be(x)?ie="array":x!==void 0&&x.$$typeof===t?(ie="<"+(qe(x.type)||"Unknown")+" />",ee=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof x,X("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,ee)}var ye=ha.apply(this,arguments);if(ye==null)return ye;if(U)for(var Re=2;Re<arguments.length;Re++)Uy(arguments[Re],x);return x===n?ZP(ye):$y(ye),ye}var Wy=!1;function JP(x){var C=Gy.bind(null,x);return C.type=x,Wy||(Wy=!0,Z("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(C,"type",{enumerable:!1,get:function(){return Z("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:x}),x}}),C}function YP(x,C,L){for(var U=Di.apply(this,arguments),ee=2;ee<arguments.length;ee++)Uy(arguments[ee],U.type);return $y(U),U}function XP(x,C){var L=m.transition;m.transition={};var U=m.transition;m.transition._updatedFibers=new Set;try{x()}finally{if(m.transition=L,L===null&&U._updatedFibers){var ee=U._updatedFibers.size;ee>10&&Z("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),U._updatedFibers.clear()}}}var Hy=!1,zl=null;function QP(x){if(zl===null)try{var C=("require"+Math.random()).slice(0,7),L=bu&&bu[C];zl=L.call(bu,"timers").setImmediate}catch{zl=function(ee){Hy===!1&&(Hy=!0,typeof MessageChannel>"u"&&X("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var he=new MessageChannel;he.port1.onmessage=ee,he.port2.postMessage(void 0)}}return zl(x)}var Sa=0,Vy=!1;function jy(x){{var C=Sa;Sa++,T.current===null&&(T.current=[]);var L=T.isBatchingLegacy,U;try{if(T.isBatchingLegacy=!0,U=x(),!L&&T.didScheduleLegacyUpdate){var ee=T.current;ee!==null&&(T.didScheduleLegacyUpdate=!1,xf(ee))}}catch(it){throw Kl(C),it}finally{T.isBatchingLegacy=L}if(U!==null&&typeof U=="object"&&typeof U.then=="function"){var he=U,ie=!1,ye={then:function(it,yt){ie=!0,he.then(function(At){Kl(C),Sa===0?Tf(At,it,yt):it(At)},function(At){Kl(C),yt(At)})}};return!Vy&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){ie||(Vy=!0,X("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),ye}else{var Re=U;if(Kl(C),Sa===0){var Ze=T.current;Ze!==null&&(xf(Ze),T.current=null);var tt={then:function(it,yt){T.current===null?(T.current=[],Tf(Re,it,yt)):it(Re)}};return tt}else{var rt={then:function(it,yt){it(Re)}};return rt}}}}function Kl(x){x!==Sa-1&&X("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Sa=x}function Tf(x,C,L){{var U=T.current;if(U!==null)try{xf(U),QP(function(){U.length===0?(T.current=null,C(x)):Tf(x,C,L)})}catch(ee){L(ee)}else C(x)}}var Sf=!1;function xf(x){if(!Sf){Sf=!0;var C=0;try{for(;C<x.length;C++){var L=x[C];do L=L(!0);while(L!==null)}x.length=0}catch(U){throw x=x.slice(C+1),U}finally{Sf=!1}}}var eR=Gy,tR=YP,rR=JP,nR={map:Kn,forEach:Ol,count:Bi,toArray:uf,only:Ll};ke.Children=nR,ke.Component=P,ke.Fragment=n,ke.Profiler=a,ke.PureComponent=se,ke.StrictMode=o,ke.Suspense=c,ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,ke.act=jy,ke.cloneElement=tR,ke.createContext=df,ke.createElement=eR,ke.createFactory=rR,ke.createRef=ue,ke.forwardRef=pf,ke.isValidElement=tn,ke.lazy=Ul,ke.memo=hf,ke.startTransition=XP,ke.unstable_act=jy,ke.useCallback=Nt,ke.useContext=K,ke.useDebugValue=tr,ke.useDeferredValue=bn,ke.useEffect=ze,ke.useId=Dt,ke.useImperativeHandle=ct,ke.useInsertionEffect=Ce,ke.useLayoutEffect=ve,ke.useMemo=at,ke.useReducer=me,ke.useRef=Oe,ke.useState=ne,ke.useSyncExternalStore=Ui,ke.useTransition=Jn,ke.version=e,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()});var Tu=O((tK,oh)=>{"use strict";process.env.NODE_ENV==="production"?oh.exports=wv():oh.exports=kv()});var Cv=O((Su,_v)=>{(function(e,t){typeof Su=="object"&&typeof _v<"u"?t(Su):typeof define=="function"&&define.amd?define("cached-iterable",["exports"],t):t(e.CachedIterable={})})(Su,(function(e){"use strict";class t extends Array{static from(a){return a instanceof this?a:new this(a)}}class r extends t{constructor(a){if(super(),Symbol.iterator in Object(a))this.iterator=a[Symbol.iterator]();else throw new TypeError("Argument must implement the iteration protocol.")}[Symbol.iterator](){let a=this,i=0;return{next(){return a.length<=i&&a.push(a.iterator.next()),a[i++]}}}touchNext(a=1){let i=0;for(;i++<a;){let s=this[this.length-1];if(s&&s.done)break;this.push(this.iterator.next())}return this[this.length-1]}}class n extends t{constructor(a){if(super(),Symbol.asyncIterator in Object(a))this.iterator=a[Symbol.asyncIterator]();else if(Symbol.iterator in Object(a))this.iterator=a[Symbol.iterator]();else throw new TypeError("Argument must implement the iteration protocol.")}[Symbol.asyncIterator](){let a=this,i=0;return{async next(){return a.length<=i&&a.push(a.iterator.next()),a[i++]}}}async touchNext(a=1){let i=0;for(;i++<a;){let s=this[this.length-1];if(s&&(await s).done)break;this.push(this.iterator.next())}return this[this.length-1]}}e.CachedSyncIterable=r,e.CachedAsyncIterable=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var Nv=O((xu,Ev)=>{(function(e,t){typeof xu=="object"&&typeof Ev<"u"?t(xu,fv(),Tu(),Cv()):typeof define=="function"&&define.amd?define("@fluent/react",["exports","@fluent/sequence","react","cached-iterable"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FluentReact={},e.FluentSequence,e.React,e.CachedIterable))})(xu,(function(e,t,r,n){"use strict";let o;function a(){if(typeof document>"u")throw new Error("`document` is undefined. Without it, translations cannot be safely sanitized. Consult the documentation at https://github.com/projectfluent/fluent.js/wiki/React-Overlays.");if(!o){let g=document.createElement("template");o=function(T){return g.innerHTML=T,Array.from(g.content.childNodes)}}return o}var i={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},s={menuitem:!0,...i};let l=/<|&#?\w+;/,c=g=>{console.warn(`[@fluent/react] ${g.name}: ${g.message}`)};class u{constructor(m,T=a(),S){this.bundles=n.CachedSyncIterable.from(m),this.parseMarkup=T,this.reportError=S||c}getBundle(m){return t.mapBundleSync(this.bundles,m)}areBundlesEmpty(){return!!this.bundles[Symbol.iterator]().next().done}getString(m,T,S){let I=this.getBundle(m);if(I){let v=I.getMessage(m);if(v&&v.value){let w=[],k=I.formatPattern(v.value,T,w);for(let E of w)this.reportError(E);return k}}else this.areBundlesEmpty()?this.reportError(new Error("Attempting to get a string when no localization bundles are present.")):this.reportError(new Error(`The id "${m}" did not match any messages in the localization bundles.`));return S||m}getElement(m,T,S={}){let I=this.getBundle(T);if(I===null)return T?this.areBundlesEmpty()?this.reportError(new Error("Attempting to get a localized element when no localization bundles are present.")):this.reportError(new Error(`The id "${T}" did not match any messages in the localization bundles.`)):this.reportError(new Error("No string id was provided when localizing a component.")),r.createElement(r.Fragment,null,m);let v=I.getMessage(T),w=[],k;if(S.attrs&&v.attributes){k={},w=[];for(let[B,Z]of Object.entries(S.attrs))Z&&B in v.attributes&&(k[B]=I.formatPattern(v.attributes[B],S.vars,w));for(let B of w)this.reportError(B)}if(typeof m.type=="string"&&m.type in s||v.value===null)return r.cloneElement(m,k);w=[];let E=I.formatPattern(v.value,S.vars,w);for(let B of w)this.reportError(B);if(!l.test(E)||this.parseMarkup===null)return r.cloneElement(m,k,E);let R;if(S.elems){R=new Map;for(let[B,Z]of Object.entries(S.elems))r.isValidElement(Z)&&R.set(B.toLowerCase(),Z)}let G=this.parseMarkup(E).map(({nodeName:B,textContent:Z})=>{if(B==="#text")return Z;let X=B.toLowerCase(),_e=R==null?void 0:R.get(X);return _e?typeof _e.type=="string"&&_e.type in s?_e:r.cloneElement(_e,void 0,Z):Z});return r.cloneElement(m,k,...G)}}let d=r.createContext(null);function f(g){return r.createElement(d.Provider,{value:g.l10n},g.children)}function p(g){function m(T){let S=r.useContext(d);if(!S)throw new Error("withLocalization was used without wrapping it in a <LocalizationProvider />.");let I=S.getString.bind(S);return r.createElement(g,{getString:I,...T})}return m.displayName=`WithLocalization(${h(g)})`,m}function h(g){return g.displayName||g.name||"Component"}function y(g){let{id:m,attrs:T,vars:S,elems:I,children:v}=g,w=r.useContext(d);if(!w)throw new Error("The <Localized /> component was not properly wrapped in a <LocalizationProvider />.");let k;if(Array.isArray(v)){if(v.length>1)throw new Error("Expected to receive a single React element to localize.");k=v[0]}else k=v??null;if(!r.isValidElement(k)){let E=typeof k=="string"?k:void 0,R=w.getString(m,S,E);return r.createElement(r.Fragment,null,R)}return w.getElement(k,m,{attrs:T,vars:S,elems:I})}let b=()=>{let g=r.useContext(d);if(!g)throw new Error("useLocalization was used without wrapping it in a <LocalizationProvider />.");return{l10n:g}};e.LocalizationProvider=f,e.Localized=y,e.ReactLocalization=u,e.useLocalization=b,e.withLocalization=p}))});function Au(e,t){return new TextDecoder("utf8").decode(t.slice(0,e.length))===e}var Bs,dh=No(()=>{"use strict";Bs="SIMPLEPERF"});var bw=O((sZ,yw)=>{"use strict";yw.exports=e3;function e3(e,t){for(var r=new Array(arguments.length-1),n=0,o=2,a=!0;o<arguments.length;)r[n++]=arguments[o++];return new Promise(function(s,l){r[n]=function(u){if(a)if(a=!1,u)l(u);else{for(var d=new Array(arguments.length-1),f=0;f<d.length;)d[f++]=arguments[f];s.apply(null,d)}};try{e.apply(t||null,r)}catch(c){a&&(a=!1,l(c))}})}});var Iw=O(xw=>{"use strict";var Ru=xw;Ru.length=function(t){var r=t.length;if(!r)return 0;for(var n=0;--r%4>1&&t.charAt(r)==="=";)++n;return Math.ceil(t.length*3)/4-n};var Ja=new Array(64),Sw=new Array(123);for(Wr=0;Wr<64;)Sw[Ja[Wr]=Wr<26?Wr+65:Wr<52?Wr+71:Wr<62?Wr-4:Wr-59|43]=Wr++;var Wr;Ru.encode=function(t,r,n){for(var o=null,a=[],i=0,s=0,l;r<n;){var c=t[r++];switch(s){case 0:a[i++]=Ja[c>>2],l=(c&3)<<4,s=1;break;case 1:a[i++]=Ja[l|c>>4],l=(c&15)<<2,s=2;break;case 2:a[i++]=Ja[l|c>>6],a[i++]=Ja[c&63],s=0;break}i>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),i=0)}return s&&(a[i++]=Ja[l],a[i++]=61,s===1&&(a[i++]=61)),o?(i&&o.push(String.fromCharCode.apply(String,a.slice(0,i))),o.join("")):String.fromCharCode.apply(String,a.slice(0,i))};var Tw="invalid encoding";Ru.decode=function(t,r,n){for(var o=n,a=0,i,s=0;s<t.length;){var l=t.charCodeAt(s++);if(l===61&&a>1)break;if((l=Sw[l])===void 0)throw Error(Tw);switch(a){case 0:i=l,a=1;break;case 1:r[n++]=i<<2|(l&48)>>4,i=l,a=2;break;case 2:r[n++]=(i&15)<<4|(l&60)>>2,i=l,a=3;break;case 3:r[n++]=(i&3)<<6|l,a=0;break}}if(a===1)throw Error(Tw);return n-o};Ru.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var ww=O((cZ,vw)=>{"use strict";vw.exports=Mu;function Mu(){this._listeners={}}Mu.prototype.on=function(t,r,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:n||this}),this};Mu.prototype.off=function(t,r){if(t===void 0)this._listeners={};else if(r===void 0)this._listeners[t]=[];else for(var n=this._listeners[t],o=0;o<n.length;)n[o].fn===r?n.splice(o,1):++o;return this};Mu.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var n=[],o=1;o<arguments.length;)n.push(arguments[o++]);for(o=0;o<r.length;)r[o].fn.apply(r[o++].ctx,n)}return this}});var Pw=O((uZ,Aw)=>{"use strict";Aw.exports=kw(kw);function kw(e){return typeof Float32Array<"u"?(function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=r[3]===128;function o(l,c,u){t[0]=l,c[u]=r[0],c[u+1]=r[1],c[u+2]=r[2],c[u+3]=r[3]}function a(l,c,u){t[0]=l,c[u]=r[3],c[u+1]=r[2],c[u+2]=r[1],c[u+3]=r[0]}e.writeFloatLE=n?o:a,e.writeFloatBE=n?a:o;function i(l,c){return r[0]=l[c],r[1]=l[c+1],r[2]=l[c+2],r[3]=l[c+3],t[0]}function s(l,c){return r[3]=l[c],r[2]=l[c+1],r[1]=l[c+2],r[0]=l[c+3],t[0]}e.readFloatLE=n?i:s,e.readFloatBE=n?s:i})():(function(){function t(n,o,a,i){var s=o<0?1:0;if(s&&(o=-o),o===0)n(1/o>0?0:2147483648,a,i);else if(isNaN(o))n(2143289344,a,i);else if(o>34028234663852886e22)n((s<<31|2139095040)>>>0,a,i);else if(o<11754943508222875e-54)n((s<<31|Math.round(o/1401298464324817e-60))>>>0,a,i);else{var l=Math.floor(Math.log(o)/Math.LN2),c=Math.round(o*Math.pow(2,-l)*8388608)&8388607;n((s<<31|l+127<<23|c)>>>0,a,i)}}e.writeFloatLE=t.bind(null,_w),e.writeFloatBE=t.bind(null,Cw);function r(n,o,a){var i=n(o,a),s=(i>>31)*2+1,l=i>>>23&255,c=i&8388607;return l===255?c?NaN:s*(1/0):l===0?s*1401298464324817e-60*c:s*Math.pow(2,l-150)*(c+8388608)}e.readFloatLE=r.bind(null,Ew),e.readFloatBE=r.bind(null,Nw)})(),typeof Float64Array<"u"?(function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=r[7]===128;function o(l,c,u){t[0]=l,c[u]=r[0],c[u+1]=r[1],c[u+2]=r[2],c[u+3]=r[3],c[u+4]=r[4],c[u+5]=r[5],c[u+6]=r[6],c[u+7]=r[7]}function a(l,c,u){t[0]=l,c[u]=r[7],c[u+1]=r[6],c[u+2]=r[5],c[u+3]=r[4],c[u+4]=r[3],c[u+5]=r[2],c[u+6]=r[1],c[u+7]=r[0]}e.writeDoubleLE=n?o:a,e.writeDoubleBE=n?a:o;function i(l,c){return r[0]=l[c],r[1]=l[c+1],r[2]=l[c+2],r[3]=l[c+3],r[4]=l[c+4],r[5]=l[c+5],r[6]=l[c+6],r[7]=l[c+7],t[0]}function s(l,c){return r[7]=l[c],r[6]=l[c+1],r[5]=l[c+2],r[4]=l[c+3],r[3]=l[c+4],r[2]=l[c+5],r[1]=l[c+6],r[0]=l[c+7],t[0]}e.readDoubleLE=n?i:s,e.readDoubleBE=n?s:i})():(function(){function t(n,o,a,i,s,l){var c=i<0?1:0;if(c&&(i=-i),i===0)n(0,s,l+o),n(1/i>0?0:2147483648,s,l+a);else if(isNaN(i))n(0,s,l+o),n(2146959360,s,l+a);else if(i>17976931348623157e292)n(0,s,l+o),n((c<<31|2146435072)>>>0,s,l+a);else{var u;if(i<22250738585072014e-324)u=i/5e-324,n(u>>>0,s,l+o),n((c<<31|u/4294967296)>>>0,s,l+a);else{var d=Math.floor(Math.log(i)/Math.LN2);d===1024&&(d=1023),u=i*Math.pow(2,-d),n(u*4503599627370496>>>0,s,l+o),n((c<<31|d+1023<<20|u*1048576&1048575)>>>0,s,l+a)}}}e.writeDoubleLE=t.bind(null,_w,0,4),e.writeDoubleBE=t.bind(null,Cw,4,0);function r(n,o,a,i,s){var l=n(i,s+o),c=n(i,s+a),u=(c>>31)*2+1,d=c>>>20&2047,f=4294967296*(c&1048575)+l;return d===2047?f?NaN:u*(1/0):d===0?u*5e-324*f:u*Math.pow(2,d-1075)*(f+4503599627370496)}e.readDoubleLE=r.bind(null,Ew,0,4),e.readDoubleBE=r.bind(null,Nw,4,0)})(),e}function _w(e,t,r){t[r]=e&255,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function Cw(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=e&255}function Ew(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function Nw(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}});var Rw=O((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}});var Fw=O(Mw=>{"use strict";var mh=Mw;mh.length=function(t){for(var r=0,n=0,o=0;o<t.length;++o)n=t.charCodeAt(o),n<128?r+=1:n<2048?r+=2:(n&64512)===55296&&(t.charCodeAt(o+1)&64512)===56320?(++o,r+=4):r+=3;return r};mh.read=function(t,r,n){var o=n-r;if(o<1)return"";for(var a=null,i=[],s=0,l;r<n;)l=t[r++],l<128?i[s++]=l:l>191&&l<224?i[s++]=(l&31)<<6|t[r++]&63:l>239&&l<365?(l=((l&7)<<18|(t[r++]&63)<<12|(t[r++]&63)<<6|t[r++]&63)-65536,i[s++]=55296+(l>>10),i[s++]=56320+(l&1023)):i[s++]=(l&15)<<12|(t[r++]&63)<<6|t[r++]&63,s>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,i)),s=0);return a?(s&&a.push(String.fromCharCode.apply(String,i.slice(0,s))),a.join("")):String.fromCharCode.apply(String,i.slice(0,s))};mh.write=function(t,r,n){for(var o=n,a,i,s=0;s<t.length;++s)a=t.charCodeAt(s),a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=a&63|128):(a&64512)===55296&&((i=t.charCodeAt(s+1))&64512)===56320?(a=65536+((a&1023)<<10)+(i&1023),++s,r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=a&63|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=a&63|128);return n-o}});var Lw=O((fZ,Ow)=>{"use strict";Ow.exports=t3;function t3(e,t,r){var n=r||8192,o=n>>>1,a=null,i=n;return function(l){if(l<1||l>o)return e(l);i+l>n&&(a=e(n),i=0);var c=t.call(a,i,i+=l);return i&7&&(i=(i|7)+1),c}}});var Bw=O((pZ,Dw)=>{"use strict";Dw.exports=Et;var Us=uo();function Et(e,t){this.lo=e>>>0,this.hi=t>>>0}var jo=Et.zero=new Et(0,0);jo.toNumber=function(){return 0};jo.zzEncode=jo.zzDecode=function(){return this};jo.length=function(){return 1};var r3=Et.zeroHash="\0\0\0\0\0\0\0\0";Et.fromNumber=function(t){if(t===0)return jo;var r=t<0;r&&(t=-t);var n=t>>>0,o=(t-n)/4294967296>>>0;return r&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new Et(n,o)};Et.from=function(t){if(typeof t=="number")return Et.fromNumber(t);if(Us.isString(t))if(Us.Long)t=Us.Long.fromString(t);else return Et.fromNumber(parseInt(t,10));return t.low||t.high?new Et(t.low>>>0,t.high>>>0):jo};Et.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,n=~this.hi>>>0;return r||(n=n+1>>>0),-(r+n*4294967296)}return this.lo+this.hi*4294967296};Et.prototype.toLong=function(t){return Us.Long?new Us.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var co=String.prototype.charCodeAt;Et.fromHash=function(t){return t===r3?jo:new Et((co.call(t,0)|co.call(t,1)<<8|co.call(t,2)<<16|co.call(t,3)<<24)>>>0,(co.call(t,4)|co.call(t,5)<<8|co.call(t,6)<<16|co.call(t,7)<<24)>>>0)};Et.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};Et.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};Et.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};Et.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?r===0?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:n<128?9:10}});var uo=O(gh=>{"use strict";var le=gh;le.asPromise=bw();le.base64=Iw();le.EventEmitter=ww();le.float=Pw();le.inquire=Rw();le.utf8=Fw();le.pool=Lw();le.LongBits=Bw();le.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);le.global=le.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||gh;le.emptyArray=Object.freeze?Object.freeze([]):[];le.emptyObject=Object.freeze?Object.freeze({}):{};le.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};le.isString=function(t){return typeof t=="string"||t instanceof String};le.isObject=function(t){return t&&typeof t=="object"};le.isset=le.isSet=function(t,r){var n=t[r];return n!=null&&t.hasOwnProperty(r)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};le.Buffer=(function(){try{var e=le.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}})();le._Buffer_from=null;le._Buffer_allocUnsafe=null;le.newBuffer=function(t){return typeof t=="number"?le.Buffer?le._Buffer_allocUnsafe(t):new le.Array(t):le.Buffer?le._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};le.Array=typeof Uint8Array<"u"?Uint8Array:Array;le.Long=le.global.dcodeIO&&le.global.dcodeIO.Long||le.global.Long||le.inquire("long");le.key2Re=/^true|false|0|1$/;le.key32Re=/^-?(?:0|[1-9][0-9]*)$/;le.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;le.longToHash=function(t){return t?le.LongBits.from(t).toHash():le.LongBits.zeroHash};le.longFromHash=function(t,r){var n=le.LongBits.fromHash(t);return le.Long?le.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)};function Uw(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)(e[n[o]]===void 0||!r)&&(e[n[o]]=t[n[o]]);return e}le.merge=Uw;le.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function $w(e){function t(r,n){if(!(this instanceof t))return new t(r,n);Object.defineProperty(this,"message",{get:function(){return r}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&Uw(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}le.newError=$w;le.ProtocolError=$w("ProtocolError");le.oneOfGetter=function(t){for(var r={},n=0;n<t.length;++n)r[t[n]]=1;return function(){for(var o=Object.keys(this),a=o.length-1;a>-1;--a)if(r[o[a]]===1&&this[o[a]]!==void 0&&this[o[a]]!==null)return o[a]}};le.oneOfSetter=function(t){return function(r){for(var n=0;n<t.length;++n)t[n]!==r&&delete this[t[n]]}};le.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};le._configure=function(){var e=le.Buffer;if(!e){le._Buffer_from=le._Buffer_allocUnsafe=null;return}le._Buffer_from=e.from!==Uint8Array.from&&e.from||function(r,n){return new e(r,n)},le._Buffer_allocUnsafe=e.allocUnsafe||function(r){return new e(r)}}});var vh=O((mZ,Vw)=>{"use strict";Vw.exports=Le;var Er=uo(),yh,Fu=Er.LongBits,Gw=Er.base64,Ww=Er.utf8;function $s(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function Th(){}function n3(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function Le(){this.len=0,this.head=new $s(Th,0,0),this.tail=this.head,this.states=null}var Hw=function(){return Er.Buffer?function(){return(Le.create=function(){return new yh})()}:function(){return new Le}};Le.create=Hw();Le.alloc=function(t){return new Er.Array(t)};Er.Array!==Array&&(Le.alloc=Er.pool(Le.alloc,Er.Array.prototype.subarray));Le.prototype._push=function(t,r,n){return this.tail=this.tail.next=new $s(t,r,n),this.len+=r,this};function Sh(e,t,r){t[r]=e&255}function o3(e,t,r){for(;e>127;)t[r++]=e&127|128,e>>>=7;t[r]=e}function xh(e,t){this.len=e,this.next=void 0,this.val=t}xh.prototype=Object.create($s.prototype);xh.prototype.fn=o3;Le.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new xh((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};Le.prototype.int32=function(t){return t<0?this._push(Ih,10,Fu.fromNumber(t)):this.uint32(t)};Le.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function Ih(e,t,r){for(;e.hi;)t[r++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=e.lo&127|128,e.lo=e.lo>>>7;t[r++]=e.lo}Le.prototype.uint64=function(t){var r=Fu.from(t);return this._push(Ih,r.length(),r)};Le.prototype.int64=Le.prototype.uint64;Le.prototype.sint64=function(t){var r=Fu.from(t).zzEncode();return this._push(Ih,r.length(),r)};Le.prototype.bool=function(t){return this._push(Sh,1,t?1:0)};function bh(e,t,r){t[r]=e&255,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}Le.prototype.fixed32=function(t){return this._push(bh,4,t>>>0)};Le.prototype.sfixed32=Le.prototype.fixed32;Le.prototype.fixed64=function(t){var r=Fu.from(t);return this._push(bh,4,r.lo)._push(bh,4,r.hi)};Le.prototype.sfixed64=Le.prototype.fixed64;Le.prototype.float=function(t){return this._push(Er.float.writeFloatLE,4,t)};Le.prototype.double=function(t){return this._push(Er.float.writeDoubleLE,8,t)};var a3=Er.Array.prototype.set?function(t,r,n){r.set(t,n)}:function(t,r,n){for(var o=0;o<t.length;++o)r[n+o]=t[o]};Le.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(Sh,1,0);if(Er.isString(t)){var n=Le.alloc(r=Gw.length(t));Gw.decode(t,n,0),t=n}return this.uint32(r)._push(a3,r,t)};Le.prototype.string=function(t){var r=Ww.length(t);return r?this.uint32(r)._push(Ww.write,r,t):this._push(Sh,1,0)};Le.prototype.fork=function(){return this.states=new n3(this),this.head=this.tail=new $s(Th,0,0),this.len=0,this};Le.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new $s(Th,0,0),this.len=0),this};Le.prototype.ldelim=function(){var t=this.head,r=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=r,this.len+=n),this};Le.prototype.finish=function(){for(var t=this.head.next,r=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,r,n),n+=t.len,t=t.next;return r};Le._configure=function(e){yh=e,Le.create=Hw(),yh._configure()}});var zw=O((gZ,qw)=>{"use strict";qw.exports=sn;var jw=vh();(sn.prototype=Object.create(jw.prototype)).constructor=sn;var fo=uo();function sn(){jw.call(this)}sn._configure=function(){sn.alloc=fo._Buffer_allocUnsafe,sn.writeBytesBuffer=fo.Buffer&&fo.Buffer.prototype instanceof Uint8Array&&fo.Buffer.prototype.set.name==="set"?function(t,r,n){r.set(t,n)}:function(t,r,n){if(t.copy)t.copy(r,n,0,t.length);else for(var o=0;o<t.length;)r[n++]=t[o++]}};sn.prototype.bytes=function(t){fo.isString(t)&&(t=fo._Buffer_from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&this._push(sn.writeBytesBuffer,r,t),this};function i3(e,t,r){e.length<40?fo.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}sn.prototype.string=function(t){var r=fo.Buffer.byteLength(t);return this.uint32(r),r&&this._push(i3,r,t),this};sn._configure()});var _h=O((yZ,Xw)=>{"use strict";Xw.exports=pt;var Hr=uo(),kh,Jw=Hr.LongBits,s3=Hr.utf8;function Vr(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function pt(e){this.buf=e,this.pos=0,this.len=e.length}var Kw=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new pt(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new pt(t);throw Error("illegal buffer")},Yw=function(){return Hr.Buffer?function(r){return(pt.create=function(o){return Hr.Buffer.isBuffer(o)?new kh(o):Kw(o)})(r)}:Kw};pt.create=Yw();pt.prototype._slice=Hr.Array.prototype.subarray||Hr.Array.prototype.slice;pt.prototype.uint32=(function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,Vr(this,10);return t}})();pt.prototype.int32=function(){return this.uint32()|0};pt.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function wh(){var e=new Jw(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw Vr(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw Vr(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}pt.prototype.bool=function(){return this.uint32()!==0};function Ou(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}pt.prototype.fixed32=function(){if(this.pos+4>this.len)throw Vr(this,4);return Ou(this.buf,this.pos+=4)};pt.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Vr(this,4);return Ou(this.buf,this.pos+=4)|0};function Zw(){if(this.pos+8>this.len)throw Vr(this,8);return new Jw(Ou(this.buf,this.pos+=4),Ou(this.buf,this.pos+=4))}pt.prototype.float=function(){if(this.pos+4>this.len)throw Vr(this,4);var t=Hr.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};pt.prototype.double=function(){if(this.pos+8>this.len)throw Vr(this,4);var t=Hr.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};pt.prototype.bytes=function(){var t=this.uint32(),r=this.pos,n=this.pos+t;if(n>this.len)throw Vr(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(r,n);if(r===n){var o=Hr.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,n)};pt.prototype.string=function(){var t=this.bytes();return s3.read(t,0,t.length)};pt.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw Vr(this,t);this.pos+=t}else do if(this.pos>=this.len)throw Vr(this);while(this.buf[this.pos++]&128);return this};pt.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!==4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this};pt._configure=function(e){kh=e,pt.create=Yw(),kh._configure();var t=Hr.Long?"toLong":"toNumber";Hr.merge(pt.prototype,{int64:function(){return wh.call(this)[t](!1)},uint64:function(){return wh.call(this)[t](!0)},sint64:function(){return wh.call(this).zzDecode()[t](!1)},fixed64:function(){return Zw.call(this)[t](!0)},sfixed64:function(){return Zw.call(this)[t](!1)}})}});var rk=O((bZ,tk)=>{"use strict";tk.exports=qo;var ek=_h();(qo.prototype=Object.create(ek.prototype)).constructor=qo;var Qw=uo();function qo(e){ek.call(this,e)}qo._configure=function(){Qw.Buffer&&(qo.prototype._slice=Qw.Buffer.prototype.slice)};qo.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};qo._configure()});var ok=O((TZ,nk)=>{"use strict";nk.exports=Gs;var Ch=uo();(Gs.prototype=Object.create(Ch.EventEmitter.prototype)).constructor=Gs;function Gs(e,t,r){if(typeof e!="function")throw TypeError("rpcImpl must be a function");Ch.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}Gs.prototype.rpcCall=function e(t,r,n,o,a){if(!o)throw TypeError("request must be specified");var i=this;if(!a)return Ch.asPromise(e,i,t,r,n,o);if(!i.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return i.rpcImpl(t,r[i.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(l,c){if(l)return i.emit("error",l,t),a(l);if(c===null){i.end(!0);return}if(!(c instanceof n))try{c=n[i.responseDelimited?"decodeDelimited":"decode"](c)}catch(u){return i.emit("error",u,t),a(u)}return i.emit("data",c,t),a(null,c)})}catch(s){i.emit("error",s,t),setTimeout(function(){a(s)},0);return}};Gs.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var ik=O(ak=>{"use strict";var l3=ak;l3.Service=ok()});var lk=O((xZ,sk)=>{"use strict";sk.exports={}});var dk=O(uk=>{"use strict";var ar=uk;ar.build="minimal";ar.Writer=vh();ar.BufferWriter=zw();ar.Reader=_h();ar.BufferReader=rk();ar.util=uo();ar.rpc=ik();ar.roots=lk();ar.configure=ck;function ck(){ar.util._configure(),ar.Writer._configure(ar.BufferWriter),ar.Reader._configure(ar.BufferReader)}ck()});var pk=O((vZ,fk)=>{"use strict";fk.exports=dk()});var mk=O((wZ,hk)=>{"use strict";var ir=pk(),Ee=ir.Reader,Mn=ir.Writer,j=ir.util,oe=ir.roots.default||(ir.roots.default={});oe.simpleperf_report_proto=(function(){var e={};return e.Sample=(function(){function t(r){if(this.callchain=[],r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.time=j.Long?j.Long.fromBits(0,0,!0):0,t.prototype.threadId=0,t.prototype.callchain=j.emptyArray,t.prototype.eventCount=j.Long?j.Long.fromBits(0,0,!0):0,t.prototype.eventTypeId=0,t.prototype.unwindingResult=null,t.create=function(n){return new t(n)},t.encode=function(n,o){if(o||(o=Mn.create()),n.time!=null&&Object.hasOwnProperty.call(n,"time")&&o.uint32(8).uint64(n.time),n.threadId!=null&&Object.hasOwnProperty.call(n,"threadId")&&o.uint32(16).int32(n.threadId),n.callchain!=null&&n.callchain.length)for(var a=0;a<n.callchain.length;++a)oe.simpleperf_report_proto.Sample.CallChainEntry.encode(n.callchain[a],o.uint32(26).fork()).ldelim();return n.eventCount!=null&&Object.hasOwnProperty.call(n,"eventCount")&&o.uint32(32).uint64(n.eventCount),n.eventTypeId!=null&&Object.hasOwnProperty.call(n,"eventTypeId")&&o.uint32(40).uint32(n.eventTypeId),n.unwindingResult!=null&&Object.hasOwnProperty.call(n,"unwindingResult")&&oe.simpleperf_report_proto.Sample.UnwindingResult.encode(n.unwindingResult,o.uint32(50).fork()).ldelim(),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.Sample;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.time=n.uint64();break}case 2:{s.threadId=n.int32();break}case 3:{s.callchain&&s.callchain.length||(s.callchain=[]),s.callchain.push(oe.simpleperf_report_proto.Sample.CallChainEntry.decode(n,n.uint32()));break}case 4:{s.eventCount=n.uint64();break}case 5:{s.eventTypeId=n.uint32();break}case 6:{s.unwindingResult=oe.simpleperf_report_proto.Sample.UnwindingResult.decode(n,n.uint32());break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.time!=null&&n.hasOwnProperty("time")&&!j.isInteger(n.time)&&!(n.time&&j.isInteger(n.time.low)&&j.isInteger(n.time.high)))return"time: integer|Long expected";if(n.threadId!=null&&n.hasOwnProperty("threadId")&&!j.isInteger(n.threadId))return"threadId: integer expected";if(n.callchain!=null&&n.hasOwnProperty("callchain")){if(!Array.isArray(n.callchain))return"callchain: array expected";for(var o=0;o<n.callchain.length;++o){var a=oe.simpleperf_report_proto.Sample.CallChainEntry.verify(n.callchain[o]);if(a)return"callchain."+a}}if(n.eventCount!=null&&n.hasOwnProperty("eventCount")&&!j.isInteger(n.eventCount)&&!(n.eventCount&&j.isInteger(n.eventCount.low)&&j.isInteger(n.eventCount.high)))return"eventCount: integer|Long expected";if(n.eventTypeId!=null&&n.hasOwnProperty("eventTypeId")&&!j.isInteger(n.eventTypeId))return"eventTypeId: integer expected";if(n.unwindingResult!=null&&n.hasOwnProperty("unwindingResult")){var a=oe.simpleperf_report_proto.Sample.UnwindingResult.verify(n.unwindingResult);if(a)return"unwindingResult."+a}return null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.Sample)return n;var o=new oe.simpleperf_report_proto.Sample;if(n.time!=null&&(j.Long?(o.time=j.Long.fromValue(n.time)).unsigned=!0:typeof n.time=="string"?o.time=parseInt(n.time,10):typeof n.time=="number"?o.time=n.time:typeof n.time=="object"&&(o.time=new j.LongBits(n.time.low>>>0,n.time.high>>>0).toNumber(!0))),n.threadId!=null&&(o.threadId=n.threadId|0),n.callchain){if(!Array.isArray(n.callchain))throw TypeError(".simpleperf_report_proto.Sample.callchain: array expected");o.callchain=[];for(var a=0;a<n.callchain.length;++a){if(typeof n.callchain[a]!="object")throw TypeError(".simpleperf_report_proto.Sample.callchain: object expected");o.callchain[a]=oe.simpleperf_report_proto.Sample.CallChainEntry.fromObject(n.callchain[a])}}if(n.eventCount!=null&&(j.Long?(o.eventCount=j.Long.fromValue(n.eventCount)).unsigned=!0:typeof n.eventCount=="string"?o.eventCount=parseInt(n.eventCount,10):typeof n.eventCount=="number"?o.eventCount=n.eventCount:typeof n.eventCount=="object"&&(o.eventCount=new j.LongBits(n.eventCount.low>>>0,n.eventCount.high>>>0).toNumber(!0))),n.eventTypeId!=null&&(o.eventTypeId=n.eventTypeId>>>0),n.unwindingResult!=null){if(typeof n.unwindingResult!="object")throw TypeError(".simpleperf_report_proto.Sample.unwindingResult: object expected");o.unwindingResult=oe.simpleperf_report_proto.Sample.UnwindingResult.fromObject(n.unwindingResult)}return o},t.toObject=function(n,o){o||(o={});var a={};if((o.arrays||o.defaults)&&(a.callchain=[]),o.defaults){if(j.Long){var i=new j.Long(0,0,!0);a.time=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.time=o.longs===String?"0":0;if(a.threadId=0,j.Long){var i=new j.Long(0,0,!0);a.eventCount=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.eventCount=o.longs===String?"0":0;a.eventTypeId=0,a.unwindingResult=null}if(n.time!=null&&n.hasOwnProperty("time")&&(typeof n.time=="number"?a.time=o.longs===String?String(n.time):n.time:a.time=o.longs===String?j.Long.prototype.toString.call(n.time):o.longs===Number?new j.LongBits(n.time.low>>>0,n.time.high>>>0).toNumber(!0):n.time),n.threadId!=null&&n.hasOwnProperty("threadId")&&(a.threadId=n.threadId),n.callchain&&n.callchain.length){a.callchain=[];for(var s=0;s<n.callchain.length;++s)a.callchain[s]=oe.simpleperf_report_proto.Sample.CallChainEntry.toObject(n.callchain[s],o)}return n.eventCount!=null&&n.hasOwnProperty("eventCount")&&(typeof n.eventCount=="number"?a.eventCount=o.longs===String?String(n.eventCount):n.eventCount:a.eventCount=o.longs===String?j.Long.prototype.toString.call(n.eventCount):o.longs===Number?new j.LongBits(n.eventCount.low>>>0,n.eventCount.high>>>0).toNumber(!0):n.eventCount),n.eventTypeId!=null&&n.hasOwnProperty("eventTypeId")&&(a.eventTypeId=n.eventTypeId),n.unwindingResult!=null&&n.hasOwnProperty("unwindingResult")&&(a.unwindingResult=oe.simpleperf_report_proto.Sample.UnwindingResult.toObject(n.unwindingResult,o)),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ir.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.Sample"},t.CallChainEntry=(function(){function r(n){if(n)for(var o=Object.keys(n),a=0;a<o.length;++a)n[o[a]]!=null&&(this[o[a]]=n[o[a]])}return r.prototype.vaddrInFile=j.Long?j.Long.fromBits(0,0,!0):0,r.prototype.fileId=0,r.prototype.symbolId=0,r.prototype.executionType=0,r.create=function(o){return new r(o)},r.encode=function(o,a){return a||(a=Mn.create()),o.vaddrInFile!=null&&Object.hasOwnProperty.call(o,"vaddrInFile")&&a.uint32(8).uint64(o.vaddrInFile),o.fileId!=null&&Object.hasOwnProperty.call(o,"fileId")&&a.uint32(16).uint32(o.fileId),o.symbolId!=null&&Object.hasOwnProperty.call(o,"symbolId")&&a.uint32(24).int32(o.symbolId),o.executionType!=null&&Object.hasOwnProperty.call(o,"executionType")&&a.uint32(32).int32(o.executionType),a},r.encodeDelimited=function(o,a){return this.encode(o,a).ldelim()},r.decode=function(o,a,i){o instanceof Ee||(o=Ee.create(o));for(var s=a===void 0?o.len:o.pos+a,l=new oe.simpleperf_report_proto.Sample.CallChainEntry;o.pos<s;){var c=o.uint32();if(c===i)break;switch(c>>>3){case 1:{l.vaddrInFile=o.uint64();break}case 2:{l.fileId=o.uint32();break}case 3:{l.symbolId=o.int32();break}case 4:{l.executionType=o.int32();break}default:o.skipType(c&7);break}}return l},r.decodeDelimited=function(o){return o instanceof Ee||(o=new Ee(o)),this.decode(o,o.uint32())},r.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.vaddrInFile!=null&&o.hasOwnProperty("vaddrInFile")&&!j.isInteger(o.vaddrInFile)&&!(o.vaddrInFile&&j.isInteger(o.vaddrInFile.low)&&j.isInteger(o.vaddrInFile.high)))return"vaddrInFile: integer|Long expected";if(o.fileId!=null&&o.hasOwnProperty("fileId")&&!j.isInteger(o.fileId))return"fileId: integer expected";if(o.symbolId!=null&&o.hasOwnProperty("symbolId")&&!j.isInteger(o.symbolId))return"symbolId: integer expected";if(o.executionType!=null&&o.hasOwnProperty("executionType"))switch(o.executionType){default:return"executionType: enum value expected";case 0:case 1:case 2:case 3:break}return null},r.fromObject=function(o){if(o instanceof oe.simpleperf_report_proto.Sample.CallChainEntry)return o;var a=new oe.simpleperf_report_proto.Sample.CallChainEntry;switch(o.vaddrInFile!=null&&(j.Long?(a.vaddrInFile=j.Long.fromValue(o.vaddrInFile)).unsigned=!0:typeof o.vaddrInFile=="string"?a.vaddrInFile=parseInt(o.vaddrInFile,10):typeof o.vaddrInFile=="number"?a.vaddrInFile=o.vaddrInFile:typeof o.vaddrInFile=="object"&&(a.vaddrInFile=new j.LongBits(o.vaddrInFile.low>>>0,o.vaddrInFile.high>>>0).toNumber(!0))),o.fileId!=null&&(a.fileId=o.fileId>>>0),o.symbolId!=null&&(a.symbolId=o.symbolId|0),o.executionType){default:if(typeof o.executionType=="number"){a.executionType=o.executionType;break}break;case"NATIVE_METHOD":case 0:a.executionType=0;break;case"INTERPRETED_JVM_METHOD":case 1:a.executionType=1;break;case"JIT_JVM_METHOD":case 2:a.executionType=2;break;case"ART_METHOD":case 3:a.executionType=3;break}return a},r.toObject=function(o,a){a||(a={});var i={};if(a.defaults){if(j.Long){var s=new j.Long(0,0,!0);i.vaddrInFile=a.longs===String?s.toString():a.longs===Number?s.toNumber():s}else i.vaddrInFile=a.longs===String?"0":0;i.fileId=0,i.symbolId=0,i.executionType=a.enums===String?"NATIVE_METHOD":0}return o.vaddrInFile!=null&&o.hasOwnProperty("vaddrInFile")&&(typeof o.vaddrInFile=="number"?i.vaddrInFile=a.longs===String?String(o.vaddrInFile):o.vaddrInFile:i.vaddrInFile=a.longs===String?j.Long.prototype.toString.call(o.vaddrInFile):a.longs===Number?new j.LongBits(o.vaddrInFile.low>>>0,o.vaddrInFile.high>>>0).toNumber(!0):o.vaddrInFile),o.fileId!=null&&o.hasOwnProperty("fileId")&&(i.fileId=o.fileId),o.symbolId!=null&&o.hasOwnProperty("symbolId")&&(i.symbolId=o.symbolId),o.executionType!=null&&o.hasOwnProperty("executionType")&&(i.executionType=a.enums===String?oe.simpleperf_report_proto.Sample.CallChainEntry.ExecutionType[o.executionType]===void 0?o.executionType:oe.simpleperf_report_proto.Sample.CallChainEntry.ExecutionType[o.executionType]:o.executionType),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ir.util.toJSONOptions)},r.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/simpleperf_report_proto.Sample.CallChainEntry"},r.ExecutionType=(function(){var n={},o=Object.create(n);return o[n[0]="NATIVE_METHOD"]=0,o[n[1]="INTERPRETED_JVM_METHOD"]=1,o[n[2]="JIT_JVM_METHOD"]=2,o[n[3]="ART_METHOD"]=3,o})(),r})(),t.UnwindingResult=(function(){function r(n){if(n)for(var o=Object.keys(n),a=0;a<o.length;++a)n[o[a]]!=null&&(this[o[a]]=n[o[a]])}return r.prototype.rawErrorCode=0,r.prototype.errorAddr=j.Long?j.Long.fromBits(0,0,!0):0,r.prototype.errorCode=0,r.create=function(o){return new r(o)},r.encode=function(o,a){return a||(a=Mn.create()),o.rawErrorCode!=null&&Object.hasOwnProperty.call(o,"rawErrorCode")&&a.uint32(8).uint32(o.rawErrorCode),o.errorAddr!=null&&Object.hasOwnProperty.call(o,"errorAddr")&&a.uint32(16).uint64(o.errorAddr),o.errorCode!=null&&Object.hasOwnProperty.call(o,"errorCode")&&a.uint32(24).int32(o.errorCode),a},r.encodeDelimited=function(o,a){return this.encode(o,a).ldelim()},r.decode=function(o,a,i){o instanceof Ee||(o=Ee.create(o));for(var s=a===void 0?o.len:o.pos+a,l=new oe.simpleperf_report_proto.Sample.UnwindingResult;o.pos<s;){var c=o.uint32();if(c===i)break;switch(c>>>3){case 1:{l.rawErrorCode=o.uint32();break}case 2:{l.errorAddr=o.uint64();break}case 3:{l.errorCode=o.int32();break}default:o.skipType(c&7);break}}return l},r.decodeDelimited=function(o){return o instanceof Ee||(o=new Ee(o)),this.decode(o,o.uint32())},r.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.rawErrorCode!=null&&o.hasOwnProperty("rawErrorCode")&&!j.isInteger(o.rawErrorCode))return"rawErrorCode: integer expected";if(o.errorAddr!=null&&o.hasOwnProperty("errorAddr")&&!j.isInteger(o.errorAddr)&&!(o.errorAddr&&j.isInteger(o.errorAddr.low)&&j.isInteger(o.errorAddr.high)))return"errorAddr: integer|Long expected";if(o.errorCode!=null&&o.hasOwnProperty("errorCode"))switch(o.errorCode){default:return"errorCode: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:break}return null},r.fromObject=function(o){if(o instanceof oe.simpleperf_report_proto.Sample.UnwindingResult)return o;var a=new oe.simpleperf_report_proto.Sample.UnwindingResult;switch(o.rawErrorCode!=null&&(a.rawErrorCode=o.rawErrorCode>>>0),o.errorAddr!=null&&(j.Long?(a.errorAddr=j.Long.fromValue(o.errorAddr)).unsigned=!0:typeof o.errorAddr=="string"?a.errorAddr=parseInt(o.errorAddr,10):typeof o.errorAddr=="number"?a.errorAddr=o.errorAddr:typeof o.errorAddr=="object"&&(a.errorAddr=new j.LongBits(o.errorAddr.low>>>0,o.errorAddr.high>>>0).toNumber(!0))),o.errorCode){default:if(typeof o.errorCode=="number"){a.errorCode=o.errorCode;break}break;case"ERROR_NONE":case 0:a.errorCode=0;break;case"ERROR_UNKNOWN":case 1:a.errorCode=1;break;case"ERROR_NOT_ENOUGH_STACK":case 2:a.errorCode=2;break;case"ERROR_MEMORY_INVALID":case 3:a.errorCode=3;break;case"ERROR_UNWIND_INFO":case 4:a.errorCode=4;break;case"ERROR_INVALID_MAP":case 5:a.errorCode=5;break;case"ERROR_MAX_FRAME_EXCEEDED":case 6:a.errorCode=6;break;case"ERROR_REPEATED_FRAME":case 7:a.errorCode=7;break;case"ERROR_INVALID_ELF":case 8:a.errorCode=8;break}return a},r.toObject=function(o,a){a||(a={});var i={};if(a.defaults){if(i.rawErrorCode=0,j.Long){var s=new j.Long(0,0,!0);i.errorAddr=a.longs===String?s.toString():a.longs===Number?s.toNumber():s}else i.errorAddr=a.longs===String?"0":0;i.errorCode=a.enums===String?"ERROR_NONE":0}return o.rawErrorCode!=null&&o.hasOwnProperty("rawErrorCode")&&(i.rawErrorCode=o.rawErrorCode),o.errorAddr!=null&&o.hasOwnProperty("errorAddr")&&(typeof o.errorAddr=="number"?i.errorAddr=a.longs===String?String(o.errorAddr):o.errorAddr:i.errorAddr=a.longs===String?j.Long.prototype.toString.call(o.errorAddr):a.longs===Number?new j.LongBits(o.errorAddr.low>>>0,o.errorAddr.high>>>0).toNumber(!0):o.errorAddr),o.errorCode!=null&&o.hasOwnProperty("errorCode")&&(i.errorCode=a.enums===String?oe.simpleperf_report_proto.Sample.UnwindingResult.ErrorCode[o.errorCode]===void 0?o.errorCode:oe.simpleperf_report_proto.Sample.UnwindingResult.ErrorCode[o.errorCode]:o.errorCode),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ir.util.toJSONOptions)},r.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/simpleperf_report_proto.Sample.UnwindingResult"},r.ErrorCode=(function(){var n={},o=Object.create(n);return o[n[0]="ERROR_NONE"]=0,o[n[1]="ERROR_UNKNOWN"]=1,o[n[2]="ERROR_NOT_ENOUGH_STACK"]=2,o[n[3]="ERROR_MEMORY_INVALID"]=3,o[n[4]="ERROR_UNWIND_INFO"]=4,o[n[5]="ERROR_INVALID_MAP"]=5,o[n[6]="ERROR_MAX_FRAME_EXCEEDED"]=6,o[n[7]="ERROR_REPEATED_FRAME"]=7,o[n[8]="ERROR_INVALID_ELF"]=8,o})(),r})(),t})(),e.LostSituation=(function(){function t(r){if(r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.sampleCount=j.Long?j.Long.fromBits(0,0,!0):0,t.prototype.lostCount=j.Long?j.Long.fromBits(0,0,!0):0,t.create=function(n){return new t(n)},t.encode=function(n,o){return o||(o=Mn.create()),n.sampleCount!=null&&Object.hasOwnProperty.call(n,"sampleCount")&&o.uint32(8).uint64(n.sampleCount),n.lostCount!=null&&Object.hasOwnProperty.call(n,"lostCount")&&o.uint32(16).uint64(n.lostCount),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.LostSituation;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.sampleCount=n.uint64();break}case 2:{s.lostCount=n.uint64();break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){return typeof n!="object"||n===null?"object expected":n.sampleCount!=null&&n.hasOwnProperty("sampleCount")&&!j.isInteger(n.sampleCount)&&!(n.sampleCount&&j.isInteger(n.sampleCount.low)&&j.isInteger(n.sampleCount.high))?"sampleCount: integer|Long expected":n.lostCount!=null&&n.hasOwnProperty("lostCount")&&!j.isInteger(n.lostCount)&&!(n.lostCount&&j.isInteger(n.lostCount.low)&&j.isInteger(n.lostCount.high))?"lostCount: integer|Long expected":null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.LostSituation)return n;var o=new oe.simpleperf_report_proto.LostSituation;return n.sampleCount!=null&&(j.Long?(o.sampleCount=j.Long.fromValue(n.sampleCount)).unsigned=!0:typeof n.sampleCount=="string"?o.sampleCount=parseInt(n.sampleCount,10):typeof n.sampleCount=="number"?o.sampleCount=n.sampleCount:typeof n.sampleCount=="object"&&(o.sampleCount=new j.LongBits(n.sampleCount.low>>>0,n.sampleCount.high>>>0).toNumber(!0))),n.lostCount!=null&&(j.Long?(o.lostCount=j.Long.fromValue(n.lostCount)).unsigned=!0:typeof n.lostCount=="string"?o.lostCount=parseInt(n.lostCount,10):typeof n.lostCount=="number"?o.lostCount=n.lostCount:typeof n.lostCount=="object"&&(o.lostCount=new j.LongBits(n.lostCount.low>>>0,n.lostCount.high>>>0).toNumber(!0))),o},t.toObject=function(n,o){o||(o={});var a={};if(o.defaults){if(j.Long){var i=new j.Long(0,0,!0);a.sampleCount=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.sampleCount=o.longs===String?"0":0;if(j.Long){var i=new j.Long(0,0,!0);a.lostCount=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.lostCount=o.longs===String?"0":0}return n.sampleCount!=null&&n.hasOwnProperty("sampleCount")&&(typeof n.sampleCount=="number"?a.sampleCount=o.longs===String?String(n.sampleCount):n.sampleCount:a.sampleCount=o.longs===String?j.Long.prototype.toString.call(n.sampleCount):o.longs===Number?new j.LongBits(n.sampleCount.low>>>0,n.sampleCount.high>>>0).toNumber(!0):n.sampleCount),n.lostCount!=null&&n.hasOwnProperty("lostCount")&&(typeof n.lostCount=="number"?a.lostCount=o.longs===String?String(n.lostCount):n.lostCount:a.lostCount=o.longs===String?j.Long.prototype.toString.call(n.lostCount):o.longs===Number?new j.LongBits(n.lostCount.low>>>0,n.lostCount.high>>>0).toNumber(!0):n.lostCount),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ir.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.LostSituation"},t})(),e.File=(function(){function t(r){if(this.symbol=[],this.mangledSymbol=[],r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.id=0,t.prototype.path="",t.prototype.symbol=j.emptyArray,t.prototype.mangledSymbol=j.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,o){if(o||(o=Mn.create()),n.id!=null&&Object.hasOwnProperty.call(n,"id")&&o.uint32(8).uint32(n.id),n.path!=null&&Object.hasOwnProperty.call(n,"path")&&o.uint32(18).string(n.path),n.symbol!=null&&n.symbol.length)for(var a=0;a<n.symbol.length;++a)o.uint32(26).string(n.symbol[a]);if(n.mangledSymbol!=null&&n.mangledSymbol.length)for(var a=0;a<n.mangledSymbol.length;++a)o.uint32(34).string(n.mangledSymbol[a]);return o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.File;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.id=n.uint32();break}case 2:{s.path=n.string();break}case 3:{s.symbol&&s.symbol.length||(s.symbol=[]),s.symbol.push(n.string());break}case 4:{s.mangledSymbol&&s.mangledSymbol.length||(s.mangledSymbol=[]),s.mangledSymbol.push(n.string());break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.id!=null&&n.hasOwnProperty("id")&&!j.isInteger(n.id))return"id: integer expected";if(n.path!=null&&n.hasOwnProperty("path")&&!j.isString(n.path))return"path: string expected";if(n.symbol!=null&&n.hasOwnProperty("symbol")){if(!Array.isArray(n.symbol))return"symbol: array expected";for(var o=0;o<n.symbol.length;++o)if(!j.isString(n.symbol[o]))return"symbol: string[] expected"}if(n.mangledSymbol!=null&&n.hasOwnProperty("mangledSymbol")){if(!Array.isArray(n.mangledSymbol))return"mangledSymbol: array expected";for(var o=0;o<n.mangledSymbol.length;++o)if(!j.isString(n.mangledSymbol[o]))return"mangledSymbol: string[] expected"}return null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.File)return n;var o=new oe.simpleperf_report_proto.File;if(n.id!=null&&(o.id=n.id>>>0),n.path!=null&&(o.path=String(n.path)),n.symbol){if(!Array.isArray(n.symbol))throw TypeError(".simpleperf_report_proto.File.symbol: array expected");o.symbol=[];for(var a=0;a<n.symbol.length;++a)o.symbol[a]=String(n.symbol[a])}if(n.mangledSymbol){if(!Array.isArray(n.mangledSymbol))throw TypeError(".simpleperf_report_proto.File.mangledSymbol: array expected");o.mangledSymbol=[];for(var a=0;a<n.mangledSymbol.length;++a)o.mangledSymbol[a]=String(n.mangledSymbol[a])}return o},t.toObject=function(n,o){o||(o={});var a={};if((o.arrays||o.defaults)&&(a.symbol=[],a.mangledSymbol=[]),o.defaults&&(a.id=0,a.path=""),n.id!=null&&n.hasOwnProperty("id")&&(a.id=n.id),n.path!=null&&n.hasOwnProperty("path")&&(a.path=n.path),n.symbol&&n.symbol.length){a.symbol=[];for(var i=0;i<n.symbol.length;++i)a.symbol[i]=n.symbol[i]}if(n.mangledSymbol&&n.mangledSymbol.length){a.mangledSymbol=[];for(var i=0;i<n.mangledSymbol.length;++i)a.mangledSymbol[i]=n.mangledSymbol[i]}return a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ir.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.File"},t})(),e.Thread=(function(){function t(r){if(r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.threadId=0,t.prototype.processId=0,t.prototype.threadName="",t.create=function(n){return new t(n)},t.encode=function(n,o){return o||(o=Mn.create()),n.threadId!=null&&Object.hasOwnProperty.call(n,"threadId")&&o.uint32(8).uint32(n.threadId),n.processId!=null&&Object.hasOwnProperty.call(n,"processId")&&o.uint32(16).uint32(n.processId),n.threadName!=null&&Object.hasOwnProperty.call(n,"threadName")&&o.uint32(26).string(n.threadName),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.Thread;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.threadId=n.uint32();break}case 2:{s.processId=n.uint32();break}case 3:{s.threadName=n.string();break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){return typeof n!="object"||n===null?"object expected":n.threadId!=null&&n.hasOwnProperty("threadId")&&!j.isInteger(n.threadId)?"threadId: integer expected":n.processId!=null&&n.hasOwnProperty("processId")&&!j.isInteger(n.processId)?"processId: integer expected":n.threadName!=null&&n.hasOwnProperty("threadName")&&!j.isString(n.threadName)?"threadName: string expected":null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.Thread)return n;var o=new oe.simpleperf_report_proto.Thread;return n.threadId!=null&&(o.threadId=n.threadId>>>0),n.processId!=null&&(o.processId=n.processId>>>0),n.threadName!=null&&(o.threadName=String(n.threadName)),o},t.toObject=function(n,o){o||(o={});var a={};return o.defaults&&(a.threadId=0,a.processId=0,a.threadName=""),n.threadId!=null&&n.hasOwnProperty("threadId")&&(a.threadId=n.threadId),n.processId!=null&&n.hasOwnProperty("processId")&&(a.processId=n.processId),n.threadName!=null&&n.hasOwnProperty("threadName")&&(a.threadName=n.threadName),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ir.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.Thread"},t})(),e.MetaInfo=(function(){function t(r){if(this.eventType=[],r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.eventType=j.emptyArray,t.prototype.appPackageName="",t.prototype.appType="",t.prototype.androidSdkVersion="",t.prototype.androidBuildType="",t.prototype.traceOffcpu=!1,t.create=function(n){return new t(n)},t.encode=function(n,o){if(o||(o=Mn.create()),n.eventType!=null&&n.eventType.length)for(var a=0;a<n.eventType.length;++a)o.uint32(10).string(n.eventType[a]);return n.appPackageName!=null&&Object.hasOwnProperty.call(n,"appPackageName")&&o.uint32(18).string(n.appPackageName),n.appType!=null&&Object.hasOwnProperty.call(n,"appType")&&o.uint32(26).string(n.appType),n.androidSdkVersion!=null&&Object.hasOwnProperty.call(n,"androidSdkVersion")&&o.uint32(34).string(n.androidSdkVersion),n.androidBuildType!=null&&Object.hasOwnProperty.call(n,"androidBuildType")&&o.uint32(42).string(n.androidBuildType),n.traceOffcpu!=null&&Object.hasOwnProperty.call(n,"traceOffcpu")&&o.uint32(48).bool(n.traceOffcpu),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.MetaInfo;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.eventType&&s.eventType.length||(s.eventType=[]),s.eventType.push(n.string());break}case 2:{s.appPackageName=n.string();break}case 3:{s.appType=n.string();break}case 4:{s.androidSdkVersion=n.string();break}case 5:{s.androidBuildType=n.string();break}case 6:{s.traceOffcpu=n.bool();break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.eventType!=null&&n.hasOwnProperty("eventType")){if(!Array.isArray(n.eventType))return"eventType: array expected";for(var o=0;o<n.eventType.length;++o)if(!j.isString(n.eventType[o]))return"eventType: string[] expected"}return n.appPackageName!=null&&n.hasOwnProperty("appPackageName")&&!j.isString(n.appPackageName)?"appPackageName: string expected":n.appType!=null&&n.hasOwnProperty("appType")&&!j.isString(n.appType)?"appType: string expected":n.androidSdkVersion!=null&&n.hasOwnProperty("androidSdkVersion")&&!j.isString(n.androidSdkVersion)?"androidSdkVersion: string expected":n.androidBuildType!=null&&n.hasOwnProperty("androidBuildType")&&!j.isString(n.androidBuildType)?"androidBuildType: string expected":n.traceOffcpu!=null&&n.hasOwnProperty("traceOffcpu")&&typeof n.traceOffcpu!="boolean"?"traceOffcpu: boolean expected":null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.MetaInfo)return n;var o=new oe.simpleperf_report_proto.MetaInfo;if(n.eventType){if(!Array.isArray(n.eventType))throw TypeError(".simpleperf_report_proto.MetaInfo.eventType: array expected");o.eventType=[];for(var a=0;a<n.eventType.length;++a)o.eventType[a]=String(n.eventType[a])}return n.appPackageName!=null&&(o.appPackageName=String(n.appPackageName)),n.appType!=null&&(o.appType=String(n.appType)),n.androidSdkVersion!=null&&(o.androidSdkVersion=String(n.androidSdkVersion)),n.androidBuildType!=null&&(o.androidBuildType=String(n.androidBuildType)),n.traceOffcpu!=null&&(o.traceOffcpu=!!n.traceOffcpu),o},t.toObject=function(n,o){o||(o={});var a={};if((o.arrays||o.defaults)&&(a.eventType=[]),o.defaults&&(a.appPackageName="",a.appType="",a.androidSdkVersion="",a.androidBuildType="",a.traceOffcpu=!1),n.eventType&&n.eventType.length){a.eventType=[];for(var i=0;i<n.eventType.length;++i)a.eventType[i]=n.eventType[i]}return n.appPackageName!=null&&n.hasOwnProperty("appPackageName")&&(a.appPackageName=n.appPackageName),n.appType!=null&&n.hasOwnProperty("appType")&&(a.appType=n.appType),n.androidSdkVersion!=null&&n.hasOwnProperty("androidSdkVersion")&&(a.androidSdkVersion=n.androidSdkVersion),n.androidBuildType!=null&&n.hasOwnProperty("androidBuildType")&&(a.androidBuildType=n.androidBuildType),n.traceOffcpu!=null&&n.hasOwnProperty("traceOffcpu")&&(a.traceOffcpu=n.traceOffcpu),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ir.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.MetaInfo"},t})(),e.ContextSwitch=(function(){function t(r){if(r)for(var n=Object.keys(r),o=0;o<n.length;++o)r[n[o]]!=null&&(this[n[o]]=r[n[o]])}return t.prototype.switchOn=!1,t.prototype.time=j.Long?j.Long.fromBits(0,0,!0):0,t.prototype.threadId=0,t.create=function(n){return new t(n)},t.encode=function(n,o){return o||(o=Mn.create()),n.switchOn!=null&&Object.hasOwnProperty.call(n,"switchOn")&&o.uint32(8).bool(n.switchOn),n.time!=null&&Object.hasOwnProperty.call(n,"time")&&o.uint32(16).uint64(n.time),n.threadId!=null&&Object.hasOwnProperty.call(n,"threadId")&&o.uint32(24).uint32(n.threadId),o},t.encodeDelimited=function(n,o){return this.encode(n,o).ldelim()},t.decode=function(n,o,a){n instanceof Ee||(n=Ee.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new oe.simpleperf_report_proto.ContextSwitch;n.pos<i;){var l=n.uint32();if(l===a)break;switch(l>>>3){case 1:{s.switchOn=n.bool();break}case 2:{s.time=n.uint64();break}case 3:{s.threadId=n.uint32();break}default:n.skipType(l&7);break}}return s},t.decodeDelimited=function(n){return n instanceof Ee||(n=new Ee(n)),this.decode(n,n.uint32())},t.verify=function(n){return typeof n!="object"||n===null?"object expected":n.switchOn!=null&&n.hasOwnProperty("switchOn")&&typeof n.switchOn!="boolean"?"switchOn: boolean expected":n.time!=null&&n.hasOwnProperty("time")&&!j.isInteger(n.time)&&!(n.time&&j.isInteger(n.time.low)&&j.isInteger(n.time.high))?"time: integer|Long expected":n.threadId!=null&&n.hasOwnProperty("threadId")&&!j.isInteger(n.threadId)?"threadId: integer expected":null},t.fromObject=function(n){if(n instanceof oe.simpleperf_report_proto.ContextSwitch)return n;var o=new oe.simpleperf_report_proto.ContextSwitch;return n.switchOn!=null&&(o.switchOn=!!n.switchOn),n.time!=null&&(j.Long?(o.time=j.Long.fromValue(n.time)).unsigned=!0:typeof n.time=="string"?o.time=parseInt(n.time,10):typeof n.time=="number"?o.time=n.time:typeof n.time=="object"&&(o.time=new j.LongBits(n.time.low>>>0,n.time.high>>>0).toNumber(!0))),n.threadId!=null&&(o.threadId=n.threadId>>>0),o},t.toObject=function(n,o){o||(o={});var a={};if(o.defaults){if(a.switchOn=!1,j.Long){var i=new j.Long(0,0,!0);a.time=o.longs===String?i.toString():o.longs===Number?i.toNumber():i}else a.time=o.longs===String?"0":0;a.threadId=0}return n.switchOn!=null&&n.hasOwnProperty("switchOn")&&(a.switchOn=n.switchOn),n.time!=null&&n.hasOwnProperty("time")&&(typeof n.time=="number"?a.time=o.longs===String?String(n.time):n.time:a.time=o.longs===String?j.Long.prototype.toString.call(n.time):o.longs===Number?new j.LongBits(n.time.low>>>0,n.time.high>>>0).toNumber(!0):n.time),n.threadId!=null&&n.hasOwnProperty("threadId")&&(a.threadId=n.threadId),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,ir.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/simpleperf_report_proto.ContextSwitch"},t})(),e.Record=(function(){function t(n){if(n)for(var o=Object.keys(n),a=0;a<o.length;++a)n[o[a]]!=null&&(this[o[a]]=n[o[a]])}t.prototype.sample=null,t.prototype.lost=null,t.prototype.file=null,t.prototype.thread=null,t.prototype.metaInfo=null,t.prototype.contextSwitch=null;var r;return Object.defineProperty(t.prototype,"recordData",{get:j.oneOfGetter(r=["sample","lost","file","thread","metaInfo","contextSwitch"]),set:j.oneOfSetter(r)}),t.create=function(o){return new t(o)},t.encode=function(o,a){return a||(a=Mn.create()),o.sample!=null&&Object.hasOwnProperty.call(o,"sample")&&oe.simpleperf_report_proto.Sample.encode(o.sample,a.uint32(10).fork()).ldelim(),o.lost!=null&&Object.hasOwnProperty.call(o,"lost")&&oe.simpleperf_report_proto.LostSituation.encode(o.lost,a.uint32(18).fork()).ldelim(),o.file!=null&&Object.hasOwnProperty.call(o,"file")&&oe.simpleperf_report_proto.File.encode(o.file,a.uint32(26).fork()).ldelim(),o.thread!=null&&Object.hasOwnProperty.call(o,"thread")&&oe.simpleperf_report_proto.Thread.encode(o.thread,a.uint32(34).fork()).ldelim(),o.metaInfo!=null&&Object.hasOwnProperty.call(o,"metaInfo")&&oe.simpleperf_report_proto.MetaInfo.encode(o.metaInfo,a.uint32(42).fork()).ldelim(),o.contextSwitch!=null&&Object.hasOwnProperty.call(o,"contextSwitch")&&oe.simpleperf_report_proto.ContextSwitch.encode(o.contextSwitch,a.uint32(50).fork()).ldelim(),a},t.encodeDelimited=function(o,a){return this.encode(o,a).ldelim()},t.decode=function(o,a,i){o instanceof Ee||(o=Ee.create(o));for(var s=a===void 0?o.len:o.pos+a,l=new oe.simpleperf_report_proto.Record;o.pos<s;){var c=o.uint32();if(c===i)break;switch(c>>>3){case 1:{l.sample=oe.simpleperf_report_proto.Sample.decode(o,o.uint32());break}case 2:{l.lost=oe.simpleperf_report_proto.LostSituation.decode(o,o.uint32());break}case 3:{l.file=oe.simpleperf_report_proto.File.decode(o,o.uint32());break}case 4:{l.thread=oe.simpleperf_report_proto.Thread.decode(o,o.uint32());break}case 5:{l.metaInfo=oe.simpleperf_report_proto.MetaInfo.decode(o,o.uint32());break}case 6:{l.contextSwitch=oe.simpleperf_report_proto.ContextSwitch.decode(o,o.uint32());break}default:o.skipType(c&7);break}}return l},t.decodeDelimited=function(o){return o instanceof Ee||(o=new Ee(o)),this.decode(o,o.uint32())},t.verify=function(o){if(typeof o!="object"||o===null)return"object expected";var a={};if(o.sample!=null&&o.hasOwnProperty("sample")){a.recordData=1;{var i=oe.simpleperf_report_proto.Sample.verify(o.sample);if(i)return"sample."+i}}if(o.lost!=null&&o.hasOwnProperty("lost")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.LostSituation.verify(o.lost);if(i)return"lost."+i}}if(o.file!=null&&o.hasOwnProperty("file")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.File.verify(o.file);if(i)return"file."+i}}if(o.thread!=null&&o.hasOwnProperty("thread")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.Thread.verify(o.thread);if(i)return"thread."+i}}if(o.metaInfo!=null&&o.hasOwnProperty("metaInfo")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.MetaInfo.verify(o.metaInfo);if(i)return"metaInfo."+i}}if(o.contextSwitch!=null&&o.hasOwnProperty("contextSwitch")){if(a.recordData===1)return"recordData: multiple values";a.recordData=1;{var i=oe.simpleperf_report_proto.ContextSwitch.verify(o.contextSwitch);if(i)return"contextSwitch."+i}}return null},t.fromObject=function(o){if(o instanceof oe.simpleperf_report_proto.Record)return o;var a=new oe.simpleperf_report_proto.Record;if(o.sample!=null){if(typeof o.sample!="object")throw TypeError(".simpleperf_report_proto.Record.sample: object expected");a.sample=oe.simpleperf_report_proto.Sample.fromObject(o.sample)}if(o.lost!=null){if(typeof o.lost!="object")throw TypeError(".simpleperf_report_proto.Record.lost: object expected");a.lost=oe.simpleperf_report_proto.LostSituation.fromObject(o.lost)}if(o.file!=null){if(typeof o.file!="object")throw TypeError(".simpleperf_report_proto.Record.file: object expected");a.file=oe.simpleperf_report_proto.File.fromObject(o.file)}if(o.thread!=null){if(typeof o.thread!="object")throw TypeError(".simpleperf_report_proto.Record.thread: object expected");a.thread=oe.simpleperf_report_proto.Thread.fromObject(o.thread)}if(o.metaInfo!=null){if(typeof o.metaInfo!="object")throw TypeError(".simpleperf_report_proto.Record.metaInfo: object expected");a.metaInfo=oe.simpleperf_report_proto.MetaInfo.fromObject(o.metaInfo)}if(o.contextSwitch!=null){if(typeof o.contextSwitch!="object")throw TypeError(".simpleperf_report_proto.Record.contextSwitch: object expected");a.contextSwitch=oe.simpleperf_report_proto.ContextSwitch.fromObject(o.contextSwitch)}return a},t.toObject=function(o,a){a||(a={});var i={};return o.sample!=null&&o.hasOwnProperty("sample")&&(i.sample=oe.simpleperf_report_proto.Sample.toObject(o.sample,a),a.oneofs&&(i.recordData="sample")),o.lost!=null&&o.hasOwnProperty("lost")&&(i.lost=oe.simpleperf_report_proto.LostSituation.toObject(o.lost,a),a.oneofs&&(i.recordData="lost")),o.file!=null&&o.hasOwnProperty("file")&&(i.file=oe.simpleperf_report_proto.File.toObject(o.file,a),a.oneofs&&(i.recordData="file")),o.thread!=null&&o.hasOwnProperty("thread")&&(i.thread=oe.simpleperf_report_proto.Thread.toObject(o.thread,a),a.oneofs&&(i.recordData="thread")),o.metaInfo!=null&&o.hasOwnProperty("metaInfo")&&(i.metaInfo=oe.simpleperf_report_proto.MetaInfo.toObject(o.metaInfo,a),a.oneofs&&(i.recordData="metaInfo")),o.contextSwitch!=null&&o.hasOwnProperty("contextSwitch")&&(i.contextSwitch=oe.simpleperf_report_proto.ContextSwitch.toObject(o.contextSwitch,a),a.oneofs&&(i.recordData="contextSwitch")),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,ir.util.toJSONOptions)},t.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/simpleperf_report_proto.Record"},t})(),e})();hk.exports=oe});function Ke(e,t,r){this.low=e|0,this.high=t|0,this.unsigned=!!r}function Ht(e){return(e&&e.__isLong__)===!0}function gk(e){var t=Math.clz32(e&-e);return e?31-t:t}function zo(e,t){var r,n,o;return t?(e>>>=0,(o=0<=e&&e<256)&&(n=bk[e],n)?n:(r=De(e,0,!0),o&&(bk[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(n=yk[e],n)?n:(r=De(e,e<0?-1:0,!1),o&&(yk[e]=r),r))}function Ar(e,t){if(isNaN(e))return t?Fn:jr;if(t){if(e<0)return Fn;if(e>=Ik)return kk}else{if(e<=-Sk)return sr;if(e+1>=Sk)return wk}return e<0?Ar(-e,t).neg():De(e%Xa|0,e/Xa|0,t)}function De(e,t,r){return new Ke(e,t,r)}function Nh(e,t,r){if(e.length===0)throw Error("empty string");if(typeof t=="number"?(r=t,t=!1):t=!!t,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t?Fn:jr;if(r=r||10,r<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return Nh(e.substring(1),t,r).neg();for(var o=Ar(Lu(r,8)),a=jr,i=0;i<e.length;i+=8){var s=Math.min(8,e.length-i),l=parseInt(e.substring(i,i+s),r);if(s<8){var c=Ar(Lu(r,s));a=a.mul(c).add(Ar(l))}else a=a.mul(o),a=a.add(Ar(l))}return a.unsigned=t,a}function Pr(e,t){return typeof e=="number"?Ar(e,t):typeof e=="string"?Nh(e,t):De(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}var Nr,yk,bk,Lu,Tk,c3,Xa,Ik,Sk,xk,jr,Fn,Ya,vk,Eh,wk,kk,sr,Y,_k,Ck=No(()=>{Nr=null;try{Nr=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}Ke.prototype.__isLong__;Object.defineProperty(Ke.prototype,"__isLong__",{value:!0});Ke.isLong=Ht;yk={},bk={};Ke.fromInt=zo;Ke.fromNumber=Ar;Ke.fromBits=De;Lu=Math.pow;Ke.fromString=Nh;Ke.fromValue=Pr;Tk=65536,c3=1<<24,Xa=Tk*Tk,Ik=Xa*Xa,Sk=Ik/2,xk=zo(c3),jr=zo(0);Ke.ZERO=jr;Fn=zo(0,!0);Ke.UZERO=Fn;Ya=zo(1);Ke.ONE=Ya;vk=zo(1,!0);Ke.UONE=vk;Eh=zo(-1);Ke.NEG_ONE=Eh;wk=De(-1,2147483647,!1);Ke.MAX_VALUE=wk;kk=De(-1,-1,!0);Ke.MAX_UNSIGNED_VALUE=kk;sr=De(0,-2147483648,!1);Ke.MIN_VALUE=sr;Y=Ke.prototype;Y.toInt=function(){return this.unsigned?this.low>>>0:this.low};Y.toNumber=function(){return this.unsigned?(this.high>>>0)*Xa+(this.low>>>0):this.high*Xa+(this.low>>>0)};Y.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(sr)){var r=Ar(t),n=this.div(r),o=n.mul(r).sub(this);return n.toString(t)+o.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var a=Ar(Lu(t,6),this.unsigned),i=this,s="";;){var l=i.div(a),c=i.sub(l.mul(a)).toInt()>>>0,u=c.toString(t);if(i=l,i.isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}};Y.getHighBits=function(){return this.high};Y.getHighBitsUnsigned=function(){return this.high>>>0};Y.getLowBits=function(){return this.low};Y.getLowBitsUnsigned=function(){return this.low>>>0};Y.getNumBitsAbs=function(){if(this.isNegative())return this.eq(sr)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return this.high!=0?r+33:r+1};Y.isSafeInteger=function(){var t=this.high>>21;return t?this.unsigned?!1:t===-1&&!(this.low===0&&this.high===-2097152):!0};Y.isZero=function(){return this.high===0&&this.low===0};Y.eqz=Y.isZero;Y.isNegative=function(){return!this.unsigned&&this.high<0};Y.isPositive=function(){return this.unsigned||this.high>=0};Y.isOdd=function(){return(this.low&1)===1};Y.isEven=function(){return(this.low&1)===0};Y.equals=function(t){return Ht(t)||(t=Pr(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};Y.eq=Y.equals;Y.notEquals=function(t){return!this.eq(t)};Y.neq=Y.notEquals;Y.ne=Y.notEquals;Y.lessThan=function(t){return this.comp(t)<0};Y.lt=Y.lessThan;Y.lessThanOrEqual=function(t){return this.comp(t)<=0};Y.lte=Y.lessThanOrEqual;Y.le=Y.lessThanOrEqual;Y.greaterThan=function(t){return this.comp(t)>0};Y.gt=Y.greaterThan;Y.greaterThanOrEqual=function(t){return this.comp(t)>=0};Y.gte=Y.greaterThanOrEqual;Y.ge=Y.greaterThanOrEqual;Y.compare=function(t){if(Ht(t)||(t=Pr(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1};Y.comp=Y.compare;Y.negate=function(){return!this.unsigned&&this.eq(sr)?sr:this.not().add(Ya)};Y.neg=Y.negate;Y.add=function(t){Ht(t)||(t=Pr(t));var r=this.high>>>16,n=this.high&65535,o=this.low>>>16,a=this.low&65535,i=t.high>>>16,s=t.high&65535,l=t.low>>>16,c=t.low&65535,u=0,d=0,f=0,p=0;return p+=a+c,f+=p>>>16,p&=65535,f+=o+l,d+=f>>>16,f&=65535,d+=n+s,u+=d>>>16,d&=65535,u+=r+i,u&=65535,De(f<<16|p,u<<16|d,this.unsigned)};Y.subtract=function(t){return Ht(t)||(t=Pr(t)),this.add(t.neg())};Y.sub=Y.subtract;Y.multiply=function(t){if(this.isZero())return this;if(Ht(t)||(t=Pr(t)),Nr){var r=Nr.mul(this.low,this.high,t.low,t.high);return De(r,Nr.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Fn:jr;if(this.eq(sr))return t.isOdd()?sr:jr;if(t.eq(sr))return this.isOdd()?sr:jr;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(xk)&&t.lt(xk))return Ar(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,o=this.high&65535,a=this.low>>>16,i=this.low&65535,s=t.high>>>16,l=t.high&65535,c=t.low>>>16,u=t.low&65535,d=0,f=0,p=0,h=0;return h+=i*u,p+=h>>>16,h&=65535,p+=a*u,f+=p>>>16,p&=65535,p+=i*c,f+=p>>>16,p&=65535,f+=o*u,d+=f>>>16,f&=65535,f+=a*c,d+=f>>>16,f&=65535,f+=i*l,d+=f>>>16,f&=65535,d+=n*u+o*c+a*l+i*s,d&=65535,De(p<<16|h,d<<16|f,this.unsigned)};Y.mul=Y.multiply;Y.divide=function(t){if(Ht(t)||(t=Pr(t)),t.isZero())throw Error("division by zero");if(Nr){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Nr.div_u:Nr.div_s)(this.low,this.high,t.low,t.high);return De(r,Nr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Fn:jr;var n,o,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Fn;if(t.gt(this.shru(1)))return vk;a=Fn}else{if(this.eq(sr)){if(t.eq(Ya)||t.eq(Eh))return sr;if(t.eq(sr))return Ya;var i=this.shr(1);return n=i.div(t).shl(1),n.eq(jr)?t.isNegative()?Ya:Eh:(o=this.sub(t.mul(n)),a=n.add(o.div(t)),a)}else if(t.eq(sr))return this.unsigned?Fn:jr;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=jr}for(o=this;o.gte(t);){n=Math.max(1,Math.floor(o.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),l=s<=48?1:Lu(2,s-48),c=Ar(n),u=c.mul(t);u.isNegative()||u.gt(o);)n-=l,c=Ar(n,this.unsigned),u=c.mul(t);c.isZero()&&(c=Ya),a=a.add(c),o=o.sub(u)}return a};Y.div=Y.divide;Y.modulo=function(t){if(Ht(t)||(t=Pr(t)),Nr){var r=(this.unsigned?Nr.rem_u:Nr.rem_s)(this.low,this.high,t.low,t.high);return De(r,Nr.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};Y.mod=Y.modulo;Y.rem=Y.modulo;Y.not=function(){return De(~this.low,~this.high,this.unsigned)};Y.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};Y.clz=Y.countLeadingZeros;Y.countTrailingZeros=function(){return this.low?gk(this.low):gk(this.high)+32};Y.ctz=Y.countTrailingZeros;Y.and=function(t){return Ht(t)||(t=Pr(t)),De(this.low&t.low,this.high&t.high,this.unsigned)};Y.or=function(t){return Ht(t)||(t=Pr(t)),De(this.low|t.low,this.high|t.high,this.unsigned)};Y.xor=function(t){return Ht(t)||(t=Pr(t)),De(this.low^t.low,this.high^t.high,this.unsigned)};Y.shiftLeft=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?De(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):De(0,this.low<<t-32,this.unsigned)};Y.shl=Y.shiftLeft;Y.shiftRight=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?De(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):De(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};Y.shr=Y.shiftRight;Y.shiftRightUnsigned=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?De(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?De(this.high,0,this.unsigned):De(this.high>>>t-32,0,this.unsigned)};Y.shru=Y.shiftRightUnsigned;Y.shr_u=Y.shiftRightUnsigned;Y.rotateLeft=function(t){var r;return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?De(this.high,this.low,this.unsigned):t<32?(r=32-t,De(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,De(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))};Y.rotl=Y.rotateLeft;Y.rotateRight=function(t){var r;return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?De(this.high,this.low,this.unsigned):t<32?(r=32-t,De(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,De(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};Y.rotr=Y.rotateRight;Y.toSigned=function(){return this.unsigned?De(this.low,this.high,!1):this};Y.toUnsigned=function(){return this.unsigned?this:De(this.low,this.high,!0)};Y.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};Y.toBytesLE=function(){var t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};Y.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255]};Ke.fromBytes=function(t,r,n){return n?Ke.fromBytesLE(t,r):Ke.fromBytesBE(t,r)};Ke.fromBytesLE=function(t,r){return new Ke(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)};Ke.fromBytesBE=function(t,r){return new Ke(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)};typeof BigInt=="function"&&(Ke.fromBigInt=function(t,r){var n=Number(BigInt.asIntN(32,t)),o=Number(BigInt.asIntN(32,t>>BigInt(32)));return De(n,o,r)},Ke.fromValue=function(t,r){return typeof t=="bigint"?Ke.fromBigInt(t,r):Pr(t,r)},Y.toBigInt=function(){var t=BigInt(this.low>>>0),r=BigInt(this.unsigned?this.high>>>0:this.high);return r<<BigInt(32)|t});_k=Ke});var Ak={};Zy(Ak,{SimpleperfReportConverter:()=>Bu,convertSimpleperfTraceProfile:()=>u3});function Du(e){return _k.isLong(e)?e.toNumber():e}function Ek(e){return Du(e)/1e6}function u3(e){return new Bu(e).process()}var Nk,On,Ah,Ph,Rh,Mh,Fh,Oh,Lh,Bu,Pk=No(()=>{"use strict";Nk=ce(mk());rr();nr();ur();xe();dh();Ck();On=class{static categoryList=[];static Other=this.createCategory("Other","grey");static Native=this.createCategory("Native","magenta");static Java=this.createCategory("Java","green");static System=this.createCategory("System","yellow");static Kernel=this.createCategory("Kernel","orange");static toJson(){return this.categoryList}static createCategory(t,r){let n=this.categoryList.length;return this.categoryList.push({name:t,color:r,subcategories:["Other"]}),n}},Ah=class{strings;resourceTable=Aa();resourcesMap=new Map;constructor(t){this.strings=t}toJson(){return this.resourceTable}findOrAddResource(t){let r=this.resourcesMap.get(t.id);return r||(this.resourceTable.lib.push(null),this.resourceTable.name.push(this.strings.indexForString(t.path)),this.resourceTable.host.push(null),this.resourceTable.type.push(1),r=this.resourceTable.length++,this.resourcesMap.set(t.id,r)),r}},Ph=class{strings;funcTable=Ea();funcMap=new Map;constructor(t){this.strings=t}toJson(){return this.funcTable}findOrAddFunc(t,r){let n=this.strings.indexForString(t),o=`${n}-${r}`,a=this.funcMap.get(o);return a||(this.funcTable.name.push(n),this.funcTable.isJS.push(!1),this.funcTable.relevantForJS.push(!1),this.funcTable.resource.push(r),this.funcTable.source.push(null),this.funcTable.lineNumber.push(null),this.funcTable.columnNumber.push(null),a=this.funcTable.length++,this.funcMap.set(o,a)),a}},Rh=class{strings;frameTable=Ca();frameMap=new Map;constructor(t){this.strings=t}toJson(){return this.frameTable}findOrAddFrame(t,r){let n=`${t}-${r}`,o=this.frameMap.get(n);return o||(this.frameTable.address.push(-1),this.frameTable.inlineDepth.push(0),this.frameTable.category.push(r),this.frameTable.subcategory.push(0),this.frameTable.func.push(t),this.frameTable.nativeSymbol.push(null),this.frameTable.innerWindowID.push(null),this.frameTable.line.push(null),this.frameTable.column.push(null),o=this.frameTable.length++,this.frameMap.set(n,o)),o}},Mh=class{strings;stackTable=nn();stackMap=new Map;constructor(t){this.strings=t}toJson(){return this.stackTable}findOrAddStack(t,r){let n=`${t}-${r??"null"}`,o=this.stackMap.get(n);return o||(this.stackTable.frame.push(t),this.stackTable.prefix.push(r),o=this.stackTable.length++,this.stackMap.set(n,o)),o}},Fh=class{stringArray=[];stringTable=$e.withBackingArray(this.stringArray);stackTable=new Mh(this.stringTable);frameTable=new Rh(this.stringTable);funcTable=new Ph(this.stringTable);resourceTable=new Ah(this.stringTable);toJson(){return{stackTable:this.stackTable.toJson(),frameTable:this.frameTable.toJson(),funcTable:this.funcTable.toJson(),resourceTable:this.resourceTable.toJson(),nativeSymbols:Pa(),sources:Ra(),stringArray:this.stringArray}}},Oh=class{name;isMainThread;tid;pid;strings;sampleTable=oS();stackTable;frameTable;funcTable;resourceTable;cpuClockEventId=-1;constructor(t,r){this.tid=t.threadId,this.pid=t.processId,this.isMainThread=t.threadId===t.processId,this.name=t.threadName??"",this.strings=r.stringTable,this.stackTable=r.stackTable,this.frameTable=r.frameTable,this.funcTable=r.funcTable,this.resourceTable=r.resourceTable}toJson(){return{processType:"default",processStartupTime:0,processShutdownTime:null,registerTime:0,unregisterTime:null,pausedRanges:[],name:this.name,isMainThread:this.isMainThread,pid:this.pid.toString(),tid:this.tid,samples:this.sampleTable,markers:Ur()}}enableCpuClock(t){this.cpuClockEventId=t,t>=0&&(this.sampleTable.weight=[],this.sampleTable.weightType="tracing-ms")}addSample(t,r){let n=null;for(let o of t.callchain.reverse()){let a=r.get(o.fileId),i=this.resourceTable.findOrAddResource(a),s=o.symbolId>=0?a.symbol[o.symbolId]:`${a.path.split(/[\\/]/).pop()}+0x${o.vaddrInFile.toString(16)}`,l=this.funcTable.findOrAddFunc(s,i),c=a.path??"",u=c.startsWith("/apex/")||c.startsWith("/system/")||c.startsWith("/vendor/"),d=On.Other;if(c==="[kernel.kallsyms]"||c.endsWith(".ko"))d=On.Kernel;else if(c.endsWith(".so"))d=u?On.System:On.Native;else if(c==="[JIT app cache]"||c.endsWith(".vdex")||c.endsWith(".apk")||c.endsWith(".jar")||c.endsWith(".oat")||c.endsWith(".odex")){let p=s.startsWith("java.")||s.startsWith("javax.")||s.startsWith("kotlin.")||s.startsWith("kotlinx.")||s.startsWith("dalvik."),h=s.startsWith("android.")||s.startsWith("com.android.")||s.startsWith("androidx.")||s.startsWith("libcore.");d=u||h||p?On.System:On.Java}let f=this.frameTable.findOrAddFrame(l,d);n=this.stackTable.findOrAddStack(f,n)}if(this.sampleTable.stack.push(n),W(this.sampleTable.time).push(Ek(t.time??0)),this.sampleTable.weight){let o=this.cpuClockEventId>=0&&t.eventTypeId===this.cpuClockEventId?Ek(t.eventCount??0):0;this.sampleTable.weight.push(o)}this.sampleTable.length++}},Lh=class{threads=[];threadMap=new Map;fileMap=new Map;eventTypes=[];cpuClockEventId=-1;appPackageName=null;sampleCount=0;lostCount=0;shared=new Fh;toJson(){return{meta:this.getProfileMeta(),libs:[],shared:this.shared.toJson(),threads:this.threads.map(t=>t.toJson())}}getProfileMeta(){return{interval:0,startTime:0,processType:0,categories:On.toJson(),product:this.appPackageName??"Android Profile",stackwalk:0,version:30,preprocessedProfileVersion:62,symbolicationNotSupported:!0,markerSchema:[],platform:"Android",toolkit:"android",importedFrom:"Simpleperf",usesOnlyOneStackType:!0,sourceCodeIsNotOnSearchfox:!0,extra:[{label:"Profile Information",entries:[{label:"Sample Count",format:"integer",value:this.sampleCount},{label:"Lost Samples",format:"integer",value:this.lostCount},{label:"Sampled events",format:"list",value:this.eventTypes}]}],keepProfileThreadOrder:!0}}setMetaInfo(t){this.eventTypes=(t==null?void 0:t.eventType)??[],this.appPackageName=(t==null?void 0:t.appPackageName)??null,this.cpuClockEventId=(this.eventTypes&&this.eventTypes.indexOf("cpu-clock"))??-1}setLostSituation(t){this.sampleCount=Du((t==null?void 0:t.sampleCount)??0),this.lostCount=Du((t==null?void 0:t.lostCount)??0)}addFile(t){this.fileMap.set(t.id,t)}addThread(t){let r=new Oh(t,this.shared);this.threads.push(r),this.threadMap.set(t.threadId,r)}finalizeThreads(){this.threads.forEach(t=>{t.enableCpuClock(this.cpuClockEventId??-1)})}addSample(t){let r=this.threadMap.get(t.threadId);if(!r){console.warn(`Thread not found for sample: ${t.threadId}`);return}r.addSample(t,this.fileMap)}},Bu=class{buffer;bufferView;bufferOffset=0;constructor(t){this.buffer=t,this.bufferView=new DataView(t.buffer,t.byteOffset,t.byteLength)}readUint16LE(){let t=this.bufferView.getUint16(this.bufferOffset,!0);return this.bufferOffset+=2,t}readUint32LE(){let t=this.bufferView.getUint32(this.bufferOffset,!0);return this.bufferOffset+=4,t}readMagic(){if(!Au(Bs,this.buffer))throw new Error("Invalid simpleperf file");this.bufferOffset+=Bs.length}readRecord(t){let r=this.buffer.subarray(this.bufferOffset,this.bufferOffset+t);return this.bufferOffset+=t,Nk.simpleperf_report_proto.Record.decode(r)}process(){var a;this.readMagic(),this.readUint16LE();let t=this.readUint32LE(),r=new Lh,n=[],o=0;for(;t>0;){let i=this.readRecord(t);switch(i.recordData){case"sample":n.push(i.sample);break;case"lost":o=Du(((a=i.lost)==null?void 0:a.sampleCount)??0),r.setLostSituation(i.lost);break;case"file":r.addFile(i.file);break;case"thread":r.addThread(i.thread);break;case"metaInfo":r.setMetaInfo(i.metaInfo);break;case"contextSwitch":break;default:console.warn(`Unknown record type: ${i.recordData}`);break}t=this.readUint32LE()}if(n.length!==o)throw new Error("Samples count doesn't match the number of samples read");return r.finalizeThreads(),n.forEach(i=>r.addSample(i)),r.toJson()}}});var jk=O($u=>{"use strict";var L3=Tu(),D3=Symbol.for("react.element"),B3=Symbol.for("react.fragment"),U3=Object.prototype.hasOwnProperty,$3=L3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,G3={key:!0,ref:!0,__self:!0,__source:!0};function Vk(e,t,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)U3.call(t,n)&&!G3.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:D3,type:e,key:a,ref:i,props:o,_owner:$3.current}}$u.Fragment=B3;$u.jsx=Vk;$u.jsxs=Vk});var qk=O(Gu=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";var e=Tu(),t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function b(_){if(_===null||typeof _!="object")return null;var K=h&&_[h]||_[y];return typeof K=="function"?K:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(_){{for(var K=arguments.length,ne=new Array(K>1?K-1:0),me=1;me<K;me++)ne[me-1]=arguments[me];T("error",_,ne)}}function T(_,K,ne){{var me=g.ReactDebugCurrentFrame,Oe=me.getStackAddendum();Oe!==""&&(K+="%s",ne=ne.concat([Oe]));var ze=ne.map(function(Ce){return String(Ce)});ze.unshift("Warning: "+K),Function.prototype.apply.call(console[_],console,ze)}}var S=!1,I=!1,v=!1,w=!1,k=!1,E;E=Symbol.for("react.module.reference");function R(_){return!!(typeof _=="string"||typeof _=="function"||_===n||_===a||k||_===o||_===c||_===u||w||_===p||S||I||v||typeof _=="object"&&_!==null&&(_.$$typeof===f||_.$$typeof===d||_.$$typeof===i||_.$$typeof===s||_.$$typeof===l||_.$$typeof===E||_.getModuleId!==void 0))}function F(_,K,ne){var me=_.displayName;if(me)return me;var Oe=K.displayName||K.name||"";return Oe!==""?ne+"("+Oe+")":ne}function G(_){return _.displayName||"Context"}function B(_){if(_==null)return null;if(typeof _.tag=="number"&&m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof _=="object")switch(_.$$typeof){case s:var K=_;return G(K)+".Consumer";case i:var ne=_;return G(ne._context)+".Provider";case l:return F(_,_.render,"ForwardRef");case d:var me=_.displayName||null;return me!==null?me:B(_.type)||"Memo";case f:{var Oe=_,ze=Oe._payload,Ce=Oe._init;try{return B(Ce(ze))}catch{return null}}}return null}var Z=Object.assign,X=0,_e,D,re,N,A,M,P;function $(){}$.__reactDisabledLog=!0;function J(){{if(X===0){_e=console.log,D=console.info,re=console.warn,N=console.error,A=console.group,M=console.groupCollapsed,P=console.groupEnd;var _={configurable:!0,enumerable:!0,value:$,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}X++}}function H(){{if(X--,X===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},_,{value:_e}),info:Z({},_,{value:D}),warn:Z({},_,{value:re}),error:Z({},_,{value:N}),group:Z({},_,{value:A}),groupCollapsed:Z({},_,{value:M}),groupEnd:Z({},_,{value:P})})}X<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=g.ReactCurrentDispatcher,se;function de(_,K,ne){{if(se===void 0)try{throw Error()}catch(Oe){var me=Oe.stack.trim().match(/\n( *(at )?)/);se=me&&me[1]||""}return`
55
+ `+se+_}}var ue=!1,fe;{var be=typeof WeakMap=="function"?WeakMap:Map;fe=new be}function V(_,K){if(!_||ue)return"";{var ne=fe.get(_);if(ne!==void 0)return ne}var me;ue=!0;var Oe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ze;ze=z.current,z.current=null,J();try{if(K){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(Dt){me=Dt}Reflect.construct(_,[],Ce)}else{try{Ce.call()}catch(Dt){me=Dt}_.call(Ce.prototype)}}else{try{throw Error()}catch(Dt){me=Dt}_()}}catch(Dt){if(Dt&&me&&typeof Dt.stack=="string"){for(var ve=Dt.stack.split(`
56
56
  `),Nt=me.stack.split(`
57
57
  `),at=ve.length-1,ct=Nt.length-1;at>=1&&ct>=0&&ve[at]!==Nt[ct];)ct--;for(;at>=1&&ct>=0;at--,ct--)if(ve[at]!==Nt[ct]){if(at!==1||ct!==1)do if(at--,ct--,ct<0||ve[at]!==Nt[ct]){var tr=`
58
- `+ve[at].replace(" at new "," at ");return _.displayName&&tr.includes("<anonymous>")&&(tr=tr.replace("<anonymous>",_.displayName)),typeof _=="function"&&fe.set(_,tr),tr}while(at>=1&&ct>=0);break}}}finally{ue=!1,z.current=ze,H(),Error.prepareStackTrace=Fe}var Jn=_?_.displayName||_.name:"",bn=Jn?de(Jn):"";return typeof _=="function"&&fe.set(_,bn),bn}function te(_,K,ne){return V(_,!1)}function q(_){var K=_.prototype;return!!(K&&K.isReactComponent)}function Q(_,K,ne){if(_==null)return"";if(typeof _=="function")return V(_,q(_));if(typeof _=="string")return de(_);switch(_){case c:return de("Suspense");case u:return de("SuspenseList")}if(typeof _=="object")switch(_.$$typeof){case l:return te(_.render);case d:return Q(_.type,K,ne);case f:{var me=_,Fe=me._payload,ze=me._init;try{return Q(ze(Fe),K,ne)}catch{}}}return""}var Te=Object.prototype.hasOwnProperty,Ne={},qe=m.ReactDebugCurrentFrame;function lt(_){if(_){var K=_._owner,ne=Q(_.type,_._source,K?K.type:null);qe.setExtraStackFrame(ne)}else qe.setExtraStackFrame(null)}function et(_,K,ne,me,Fe){{var ze=Function.call.bind(Te);for(var Ce in _)if(ze(_,Ce)){var ve=void 0;try{if(typeof _[Ce]!="function"){var Nt=Error((me||"React class")+": "+ne+" type `"+Ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[Ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Nt.name="Invariant Violation",Nt}ve=_[Ce](K,Ce,me,ne,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(at){ve=at}ve&&!(ve instanceof Error)&&(lt(Fe),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",me||"React class",ne,Ce,typeof ve),lt(null)),ve instanceof Error&&!(ve.message in Ne)&&(Ne[ve.message]=!0,lt(Fe),g("Failed %s type: %s",ne,ve.message),lt(null))}}}var br=Array.isArray;function Qt(_){return br(_)}function qt(_){{var K=typeof Symbol=="function"&&Symbol.toStringTag,ne=K&&_[Symbol.toStringTag]||_.constructor.name||"Object";return ne}}function Ot(_){try{return gt(_),!1}catch{return!0}}function gt(_){return""+_}function zt(_){if(Ot(_))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qt(_)),gt(_)}var Lt=m.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},Tr,pa,Co;Co={};function Oi(_){if(Te.call(_,"ref")){var K=Object.getOwnPropertyDescriptor(_,"ref").get;if(K&&K.isReactWarning)return!1}return _.ref!==void 0}function tn(_){if(Te.call(_,"key")){var K=Object.getOwnPropertyDescriptor(_,"key").get;if(K&&K.isReactWarning)return!1}return _.key!==void 0}function ha(_,K){if(typeof _.ref=="string"&&Lt.current&&K&&Lt.current.stateNode!==K){var ne=B(Lt.current.type);Co[ne]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(Lt.current.type),_.ref),Co[ne]=!0)}}function nf(_,K){{var ne=function(){Tr||(Tr=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",K))};ne.isReactWarning=!0,Object.defineProperty(_,"key",{get:ne,configurable:!0})}}function of(_,K){{var ne=function(){pa||(pa=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",K))};ne.isReactWarning=!0,Object.defineProperty(_,"ref",{get:ne,configurable:!0})}}var Ml=function(_,K,ne,me,Fe,ze,Ce){var ve={$$typeof:t,type:_,key:K,ref:ne,props:Ce,_owner:ze};return ve._store={},Object.defineProperty(ve._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ve,"_self",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.defineProperty(ve,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Fe}),Object.freeze&&(Object.freeze(ve.props),Object.freeze(ve)),ve};function af(_,K,ne,me,Fe){{var ze,Ce={},ve=null,Nt=null;ne!==void 0&&(zt(ne),ve=""+ne),tn(K)&&(zt(K.key),ve=""+K.key),Oi(K)&&(Nt=K.ref,ha(K,Fe));for(ze in K)Te.call(K,ze)&&!er.hasOwnProperty(ze)&&(Ce[ze]=K[ze]);if(_&&_.defaultProps){var at=_.defaultProps;for(ze in at)Ce[ze]===void 0&&(Ce[ze]=at[ze])}if(ve||Nt){var ct=typeof _=="function"?_.displayName||_.name||"Unknown":_;ve&&nf(Ce,ct),Nt&&of(Ce,ct)}return Ml(_,ve,Nt,Fe,me,Lt.current,Ce)}}var ma=m.ReactCurrentOwner,ga=m.ReactDebugCurrentFrame;function Dr(_){if(_){var K=_._owner,ne=Q(_.type,_._source,K?K.type:null);ga.setExtraStackFrame(ne)}else ga.setExtraStackFrame(null)}var Kn;Kn=!1;function Li(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Fl(){{if(ma.current){var _=B(ma.current.type);if(_)return`
58
+ `+ve[at].replace(" at new "," at ");return _.displayName&&tr.includes("<anonymous>")&&(tr=tr.replace("<anonymous>",_.displayName)),typeof _=="function"&&fe.set(_,tr),tr}while(at>=1&&ct>=0);break}}}finally{ue=!1,z.current=ze,H(),Error.prepareStackTrace=Oe}var Jn=_?_.displayName||_.name:"",bn=Jn?de(Jn):"";return typeof _=="function"&&fe.set(_,bn),bn}function te(_,K,ne){return V(_,!1)}function q(_){var K=_.prototype;return!!(K&&K.isReactComponent)}function Q(_,K,ne){if(_==null)return"";if(typeof _=="function")return V(_,q(_));if(typeof _=="string")return de(_);switch(_){case c:return de("Suspense");case u:return de("SuspenseList")}if(typeof _=="object")switch(_.$$typeof){case l:return te(_.render);case d:return Q(_.type,K,ne);case f:{var me=_,Oe=me._payload,ze=me._init;try{return Q(ze(Oe),K,ne)}catch{}}}return""}var Te=Object.prototype.hasOwnProperty,Ne={},qe=g.ReactDebugCurrentFrame;function lt(_){if(_){var K=_._owner,ne=Q(_.type,_._source,K?K.type:null);qe.setExtraStackFrame(ne)}else qe.setExtraStackFrame(null)}function et(_,K,ne,me,Oe){{var ze=Function.call.bind(Te);for(var Ce in _)if(ze(_,Ce)){var ve=void 0;try{if(typeof _[Ce]!="function"){var Nt=Error((me||"React class")+": "+ne+" type `"+Ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[Ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Nt.name="Invariant Violation",Nt}ve=_[Ce](K,Ce,me,ne,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(at){ve=at}ve&&!(ve instanceof Error)&&(lt(Oe),m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",me||"React class",ne,Ce,typeof ve),lt(null)),ve instanceof Error&&!(ve.message in Ne)&&(Ne[ve.message]=!0,lt(Oe),m("Failed %s type: %s",ne,ve.message),lt(null))}}}var br=Array.isArray;function Qt(_){return br(_)}function qt(_){{var K=typeof Symbol=="function"&&Symbol.toStringTag,ne=K&&_[Symbol.toStringTag]||_.constructor.name||"Object";return ne}}function Ot(_){try{return gt(_),!1}catch{return!0}}function gt(_){return""+_}function zt(_){if(Ot(_))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qt(_)),gt(_)}var Lt=g.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},Tr,ha,Co;Co={};function Di(_){if(Te.call(_,"ref")){var K=Object.getOwnPropertyDescriptor(_,"ref").get;if(K&&K.isReactWarning)return!1}return _.ref!==void 0}function tn(_){if(Te.call(_,"key")){var K=Object.getOwnPropertyDescriptor(_,"key").get;if(K&&K.isReactWarning)return!1}return _.key!==void 0}function ma(_,K){if(typeof _.ref=="string"&&Lt.current&&K&&Lt.current.stateNode!==K){var ne=B(Lt.current.type);Co[ne]||(m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(Lt.current.type),_.ref),Co[ne]=!0)}}function sf(_,K){{var ne=function(){Tr||(Tr=!0,m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",K))};ne.isReactWarning=!0,Object.defineProperty(_,"key",{get:ne,configurable:!0})}}function lf(_,K){{var ne=function(){ha||(ha=!0,m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",K))};ne.isReactWarning=!0,Object.defineProperty(_,"ref",{get:ne,configurable:!0})}}var Fl=function(_,K,ne,me,Oe,ze,Ce){var ve={$$typeof:t,type:_,key:K,ref:ne,props:Ce,_owner:ze};return ve._store={},Object.defineProperty(ve._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ve,"_self",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.defineProperty(ve,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Oe}),Object.freeze&&(Object.freeze(ve.props),Object.freeze(ve)),ve};function cf(_,K,ne,me,Oe){{var ze,Ce={},ve=null,Nt=null;ne!==void 0&&(zt(ne),ve=""+ne),tn(K)&&(zt(K.key),ve=""+K.key),Di(K)&&(Nt=K.ref,ma(K,Oe));for(ze in K)Te.call(K,ze)&&!er.hasOwnProperty(ze)&&(Ce[ze]=K[ze]);if(_&&_.defaultProps){var at=_.defaultProps;for(ze in at)Ce[ze]===void 0&&(Ce[ze]=at[ze])}if(ve||Nt){var ct=typeof _=="function"?_.displayName||_.name||"Unknown":_;ve&&sf(Ce,ct),Nt&&lf(Ce,ct)}return Fl(_,ve,Nt,Oe,me,Lt.current,Ce)}}var ga=g.ReactCurrentOwner,ya=g.ReactDebugCurrentFrame;function Dr(_){if(_){var K=_._owner,ne=Q(_.type,_._source,K?K.type:null);ya.setExtraStackFrame(ne)}else ya.setExtraStackFrame(null)}var Kn;Kn=!1;function Bi(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Ol(){{if(ga.current){var _=B(ga.current.type);if(_)return`
59
59
 
60
- Check the render method of \``+_+"`."}return""}}function sf(_){{if(_!==void 0){var K=_.fileName.replace(/^.*[\\\/]/,""),ne=_.lineNumber;return`
60
+ Check the render method of \``+_+"`."}return""}}function uf(_){{if(_!==void 0){var K=_.fileName.replace(/^.*[\\\/]/,""),ne=_.lineNumber;return`
61
61
 
62
- Check your code at `+K+":"+ne+"."}return""}}var Ol={};function lf(_){{var K=Fl();if(!K){var ne=typeof _=="string"?_:_.displayName||_.name;ne&&(K=`
62
+ Check your code at `+K+":"+ne+"."}return""}}var Ll={};function df(_){{var K=Ol();if(!K){var ne=typeof _=="string"?_:_.displayName||_.name;ne&&(K=`
63
63
 
64
- Check the top-level render call using <`+ne+">.")}return K}}function Zn(_,K){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var ne=lf(K);if(Ol[ne])return;Ol[ne]=!0;var me="";_&&_._owner&&_._owner!==ma.current&&(me=" It was passed a child from "+B(_._owner.type)+"."),Dr(_),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ne,me),Dr(null)}}function ya(_,K){{if(typeof _!="object")return;if(Qt(_))for(var ne=0;ne<_.length;ne++){var me=_[ne];Li(me)&&Zn(me,K)}else if(Li(_))_._store&&(_._store.validated=!0);else if(_){var Fe=b(_);if(typeof Fe=="function"&&Fe!==_.entries)for(var ze=Fe.call(_),Ce;!(Ce=ze.next()).done;)Li(Ce.value)&&Zn(Ce.value,K)}}}function Ll(_){{var K=_.type;if(K==null||typeof K=="string")return;var ne;if(typeof K=="function")ne=K.propTypes;else if(typeof K=="object"&&(K.$$typeof===l||K.$$typeof===d))ne=K.propTypes;else return;if(ne){var me=B(K);et(ne,_.props,"prop",me,_)}else if(K.PropTypes!==void 0&&!Kn){Kn=!0;var Fe=B(K);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Fe||"Unknown")}typeof K.getDefaultProps=="function"&&!K.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cf(_){{for(var K=Object.keys(_.props),ne=0;ne<K.length;ne++){var me=K[ne];if(me!=="children"&&me!=="key"){Dr(_),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",me),Dr(null);break}}_.ref!==null&&(Dr(_),g("Invalid attribute `ref` supplied to `React.Fragment`."),Dr(null))}}var Dl={};function Bl(_,K,ne,me,Fe,ze){{var Ce=R(_);if(!Ce){var ve="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(ve+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Nt=sf(Fe);Nt?ve+=Nt:ve+=Fl();var at;_===null?at="null":Qt(_)?at="array":_!==void 0&&_.$$typeof===t?(at="<"+(B(_.type)||"Unknown")+" />",ve=" Did you accidentally export a JSX literal instead of a component?"):at=typeof _,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",at,ve)}var ct=af(_,K,ne,Fe,ze);if(ct==null)return ct;if(Ce){var tr=K.children;if(tr!==void 0)if(me)if(Qt(tr)){for(var Jn=0;Jn<tr.length;Jn++)ya(tr[Jn],_);Object.freeze&&Object.freeze(tr)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ya(tr,_)}if(Te.call(K,"key")){var bn=B(_),Dt=Object.keys(K).filter(function(Gl){return Gl!=="key"}),Di=Dt.length>0?"{key: someKey, "+Dt.join(": ..., ")+": ...}":"{key: someKey}";if(!Dl[bn+Di]){var Eo=Dt.length>0?"{"+Dt.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
64
+ Check the top-level render call using <`+ne+">.")}return K}}function Zn(_,K){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var ne=df(K);if(Ll[ne])return;Ll[ne]=!0;var me="";_&&_._owner&&_._owner!==ga.current&&(me=" It was passed a child from "+B(_._owner.type)+"."),Dr(_),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ne,me),Dr(null)}}function ba(_,K){{if(typeof _!="object")return;if(Qt(_))for(var ne=0;ne<_.length;ne++){var me=_[ne];Bi(me)&&Zn(me,K)}else if(Bi(_))_._store&&(_._store.validated=!0);else if(_){var Oe=b(_);if(typeof Oe=="function"&&Oe!==_.entries)for(var ze=Oe.call(_),Ce;!(Ce=ze.next()).done;)Bi(Ce.value)&&Zn(Ce.value,K)}}}function Dl(_){{var K=_.type;if(K==null||typeof K=="string")return;var ne;if(typeof K=="function")ne=K.propTypes;else if(typeof K=="object"&&(K.$$typeof===l||K.$$typeof===d))ne=K.propTypes;else return;if(ne){var me=B(K);et(ne,_.props,"prop",me,_)}else if(K.PropTypes!==void 0&&!Kn){Kn=!0;var Oe=B(K);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Oe||"Unknown")}typeof K.getDefaultProps=="function"&&!K.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ff(_){{for(var K=Object.keys(_.props),ne=0;ne<K.length;ne++){var me=K[ne];if(me!=="children"&&me!=="key"){Dr(_),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",me),Dr(null);break}}_.ref!==null&&(Dr(_),m("Invalid attribute `ref` supplied to `React.Fragment`."),Dr(null))}}var Bl={};function Ul(_,K,ne,me,Oe,ze){{var Ce=R(_);if(!Ce){var ve="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(ve+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Nt=uf(Oe);Nt?ve+=Nt:ve+=Ol();var at;_===null?at="null":Qt(_)?at="array":_!==void 0&&_.$$typeof===t?(at="<"+(B(_.type)||"Unknown")+" />",ve=" Did you accidentally export a JSX literal instead of a component?"):at=typeof _,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",at,ve)}var ct=cf(_,K,ne,Oe,ze);if(ct==null)return ct;if(Ce){var tr=K.children;if(tr!==void 0)if(me)if(Qt(tr)){for(var Jn=0;Jn<tr.length;Jn++)ba(tr[Jn],_);Object.freeze&&Object.freeze(tr)}else m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ba(tr,_)}if(Te.call(K,"key")){var bn=B(_),Dt=Object.keys(K).filter(function(Wl){return Wl!=="key"}),Ui=Dt.length>0?"{key: someKey, "+Dt.join(": ..., ")+": ...}":"{key: someKey}";if(!Bl[bn+Ui]){var Eo=Dt.length>0?"{"+Dt.join(": ..., ")+": ...}":"{}";m(`A props object containing a "key" prop is being spread into JSX:
65
65
  let props = %s;
66
66
  <%s {...props} />
67
67
  React keys must be passed directly to JSX without using spread:
68
68
  let props = %s;
69
- <%s key={someKey} {...props} />`,Di,bn,Eo,bn),Dl[bn+Di]=!0}}return _===n?cf(ct):Ll(ct),ct}}function uf(_,K,ne){return Bl(_,K,ne,!0)}function Ul(_,K,ne){return Bl(_,K,ne,!1)}var $l=Ul,df=uf;Bu.Fragment=n,Bu.jsx=$l,Bu.jsxs=df})()});var Oh=O((nJ,Fh)=>{"use strict";process.env.NODE_ENV==="production"?Fh.exports=Hk():Fh.exports=Vk()});var w_=O((zu,v_)=>{(function(e,t){typeof zu=="object"&&typeof v_<"u"?t(zu):typeof define=="function"&&define.amd?define(["exports"],t):t(e.reduxLogger=e.reduxLogger||{})})(zu,function(e){"use strict";function t(E,A){E.super_=A,E.prototype=Object.create(A.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}})}function r(E,A){Object.defineProperty(this,"kind",{value:E,enumerable:!0}),A&&A.length&&Object.defineProperty(this,"path",{value:A,enumerable:!0})}function n(E,A,M){n.super_.call(this,"E",E),Object.defineProperty(this,"lhs",{value:A,enumerable:!0}),Object.defineProperty(this,"rhs",{value:M,enumerable:!0})}function o(E,A){o.super_.call(this,"N",E),Object.defineProperty(this,"rhs",{value:A,enumerable:!0})}function a(E,A){a.super_.call(this,"D",E),Object.defineProperty(this,"lhs",{value:A,enumerable:!0})}function i(E,A,M){i.super_.call(this,"A",E),Object.defineProperty(this,"index",{value:A,enumerable:!0}),Object.defineProperty(this,"item",{value:M,enumerable:!0})}function s(E,A,M){var P=E.slice((M||A)+1||E.length);return E.length=A<0?E.length+A:A,E.push.apply(E,P),E}function l(E){var A=typeof E>"u"?"undefined":B(E);return A!=="object"?A:E===Math?"math":E===null?"null":Array.isArray(E)?"array":Object.prototype.toString.call(E)==="[object Date]"?"date":typeof E.toString=="function"&&/^\/.*\//.test(E.toString())?"regexp":"object"}function c(E,A,M,P,$,J,H){$=$||[],H=H||[];var z=$.slice(0);if(typeof J<"u"){if(P){if(typeof P=="function"&&P(z,J))return;if((typeof P>"u"?"undefined":B(P))==="object"){if(P.prefilter&&P.prefilter(z,J))return;if(P.normalize){var se=P.normalize(z,J,E,A);se&&(E=se[0],A=se[1])}}}z.push(J)}l(E)==="regexp"&&l(A)==="regexp"&&(E=E.toString(),A=A.toString());var de=typeof E>"u"?"undefined":B(E),ue=typeof A>"u"?"undefined":B(A),fe=de!=="undefined"||H&&H[H.length-1].lhs&&H[H.length-1].lhs.hasOwnProperty(J),be=ue!=="undefined"||H&&H[H.length-1].rhs&&H[H.length-1].rhs.hasOwnProperty(J);if(!fe&&be)M(new o(z,A));else if(!be&&fe)M(new a(z,E));else if(l(E)!==l(A))M(new n(z,E,A));else if(l(E)==="date"&&E-A!==0)M(new n(z,E,A));else if(de==="object"&&E!==null&&A!==null)if(H.filter(function(Q){return Q.lhs===E}).length)E!==A&&M(new n(z,E,A));else{if(H.push({lhs:E,rhs:A}),Array.isArray(E)){var V;for(E.length,V=0;V<E.length;V++)V>=A.length?M(new i(z,V,new a(void 0,E[V]))):c(E[V],A[V],M,P,z,V,H);for(;V<A.length;)M(new i(z,V,new o(void 0,A[V++])))}else{var te=Object.keys(E),q=Object.keys(A);te.forEach(function(Q,Te){var Ne=q.indexOf(Q);Ne>=0?(c(E[Q],A[Q],M,P,z,Q,H),q=s(q,Ne)):c(E[Q],void 0,M,P,z,Q,H)}),q.forEach(function(Q){c(void 0,A[Q],M,P,z,Q,H)})}H.length=H.length-1}else E!==A&&(de==="number"&&isNaN(E)&&isNaN(A)||M(new n(z,E,A)))}function u(E,A,M,P){return P=P||[],c(E,A,function($){$&&P.push($)},M),P.length?P:void 0}function d(E,A,M){if(M.path&&M.path.length){var P,$=E[A],J=M.path.length-1;for(P=0;P<J;P++)$=$[M.path[P]];switch(M.kind){case"A":d($[M.path[P]],M.index,M.item);break;case"D":delete $[M.path[P]];break;case"E":case"N":$[M.path[P]]=M.rhs}}else switch(M.kind){case"A":d(E[A],M.index,M.item);break;case"D":E=s(E,A);break;case"E":case"N":E[A]=M.rhs}return E}function f(E,A,M){if(E&&A&&M&&M.kind){for(var P=E,$=-1,J=M.path?M.path.length-1:0;++$<J;)typeof P[M.path[$]]>"u"&&(P[M.path[$]]=typeof M.path[$]=="number"?[]:{}),P=P[M.path[$]];switch(M.kind){case"A":d(M.path?P[M.path[$]]:P,M.index,M.item);break;case"D":delete P[M.path[$]];break;case"E":case"N":P[M.path[$]]=M.rhs}}}function p(E,A,M){if(M.path&&M.path.length){var P,$=E[A],J=M.path.length-1;for(P=0;P<J;P++)$=$[M.path[P]];switch(M.kind){case"A":p($[M.path[P]],M.index,M.item);break;case"D":$[M.path[P]]=M.lhs;break;case"E":$[M.path[P]]=M.lhs;break;case"N":delete $[M.path[P]]}}else switch(M.kind){case"A":p(E[A],M.index,M.item);break;case"D":E[A]=M.lhs;break;case"E":E[A]=M.lhs;break;case"N":E=s(E,A)}return E}function h(E,A,M){if(E&&A&&M&&M.kind){var P,$,J=E;for($=M.path.length-1,P=0;P<$;P++)typeof J[M.path[P]]>"u"&&(J[M.path[P]]={}),J=J[M.path[P]];switch(M.kind){case"A":p(J[M.path[P]],M.index,M.item);break;case"D":J[M.path[P]]=M.lhs;break;case"E":J[M.path[P]]=M.lhs;break;case"N":delete J[M.path[P]]}}}function y(E,A,M){if(E&&A){var P=function($){M&&!M(E,A,$)||f(E,A,$)};c(E,A,P)}}function b(E){return"color: "+_e[E].color+"; font-weight: bold"}function m(E){var A=E.kind,M=E.path,P=E.lhs,$=E.rhs,J=E.index,H=E.item;switch(A){case"E":return[M.join("."),P,"\u2192",$];case"N":return[M.join("."),$];case"D":return[M.join(".")];case"A":return[M.join(".")+"["+J+"]",H];default:return[]}}function g(E,A,M,P){var $=u(E,A);try{P?M.groupCollapsed("diff"):M.group("diff")}catch{M.log("diff")}$?$.forEach(function(J){var H=J.kind,z=m(J);M.log.apply(M,["%c "+_e[H].text,b(H)].concat(Z(z)))}):M.log("\u2014\u2014 no diff \u2014\u2014");try{M.groupEnd()}catch{M.log("\u2014\u2014 diff end \u2014\u2014 ")}}function T(E,A,M,P){switch(typeof E>"u"?"undefined":B(E)){case"object":return typeof E[P]=="function"?E[P].apply(E,Z(M)):E[P];case"function":return E(A);default:return E}}function S(E){var A=E.timestamp,M=E.duration;return function(P,$,J){var H=["action"];return H.push("%c"+String(P.type)),A&&H.push("%c@ "+$),M&&H.push("%c(in "+J.toFixed(2)+" ms)"),H.join(" ")}}function I(E,A){var M=A.logger,P=A.actionTransformer,$=A.titleFormatter,J=$===void 0?S(A):$,H=A.collapsed,z=A.colors,se=A.level,de=A.diff,ue=typeof A.titleFormatter>"u";E.forEach(function(fe,be){var V=fe.started,te=fe.startedTime,q=fe.action,Q=fe.prevState,Te=fe.error,Ne=fe.took,qe=fe.nextState,lt=E[be+1];lt&&(qe=lt.prevState,Ne=lt.started-V);var et=P(q),br=typeof H=="function"?H(function(){return qe},q,fe):H,Qt=F(te),qt=z.title?"color: "+z.title(et)+";":"",Ot=["color: gray; font-weight: lighter;"];Ot.push(qt),A.timestamp&&Ot.push("color: gray; font-weight: lighter;"),A.duration&&Ot.push("color: gray; font-weight: lighter;");var gt=J(et,Qt,Ne);try{br?z.title&&ue?M.groupCollapsed.apply(M,["%c "+gt].concat(Ot)):M.groupCollapsed(gt):z.title&&ue?M.group.apply(M,["%c "+gt].concat(Ot)):M.group(gt)}catch{M.log(gt)}var zt=T(se,et,[Q],"prevState"),Lt=T(se,et,[et],"action"),er=T(se,et,[Te,Q],"error"),Tr=T(se,et,[qe],"nextState");if(zt)if(z.prevState){var pa="color: "+z.prevState(Q)+"; font-weight: bold";M[zt]("%c prev state",pa,Q)}else M[zt]("prev state",Q);if(Lt)if(z.action){var Co="color: "+z.action(et)+"; font-weight: bold";M[Lt]("%c action ",Co,et)}else M[Lt]("action ",et);if(Te&&er)if(z.error){var Oi="color: "+z.error(Te,Q)+"; font-weight: bold;";M[er]("%c error ",Oi,Te)}else M[er]("error ",Te);if(Tr)if(z.nextState){var tn="color: "+z.nextState(qe)+"; font-weight: bold";M[Tr]("%c next state",tn,qe)}else M[Tr]("next state",qe);de&&g(Q,qe,M,br);try{M.groupEnd()}catch{M.log("\u2014\u2014 log end \u2014\u2014")}})}function v(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=Object.assign({},D,E),M=A.logger,P=A.stateTransformer,$=A.errorTransformer,J=A.predicate,H=A.logErrors,z=A.diffPredicate;if(typeof M>"u")return function(){return function(de){return function(ue){return de(ue)}}};if(E.getState&&E.dispatch)return console.error(`[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:
69
+ <%s key={someKey} {...props} />`,Ui,bn,Eo,bn),Bl[bn+Ui]=!0}}return _===n?ff(ct):Dl(ct),ct}}function pf(_,K,ne){return Ul(_,K,ne,!0)}function $l(_,K,ne){return Ul(_,K,ne,!1)}var Gl=$l,hf=pf;Gu.Fragment=n,Gu.jsx=Gl,Gu.jsxs=hf})()});var Bh=O((lJ,Dh)=>{"use strict";process.env.NODE_ENV==="production"?Dh.exports=jk():Dh.exports=qk()});var __=O((Ju,k_)=>{(function(e,t){typeof Ju=="object"&&typeof k_<"u"?t(Ju):typeof define=="function"&&define.amd?define(["exports"],t):t(e.reduxLogger=e.reduxLogger||{})})(Ju,function(e){"use strict";function t(N,A){N.super_=A,N.prototype=Object.create(A.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}})}function r(N,A){Object.defineProperty(this,"kind",{value:N,enumerable:!0}),A&&A.length&&Object.defineProperty(this,"path",{value:A,enumerable:!0})}function n(N,A,M){n.super_.call(this,"E",N),Object.defineProperty(this,"lhs",{value:A,enumerable:!0}),Object.defineProperty(this,"rhs",{value:M,enumerable:!0})}function o(N,A){o.super_.call(this,"N",N),Object.defineProperty(this,"rhs",{value:A,enumerable:!0})}function a(N,A){a.super_.call(this,"D",N),Object.defineProperty(this,"lhs",{value:A,enumerable:!0})}function i(N,A,M){i.super_.call(this,"A",N),Object.defineProperty(this,"index",{value:A,enumerable:!0}),Object.defineProperty(this,"item",{value:M,enumerable:!0})}function s(N,A,M){var P=N.slice((M||A)+1||N.length);return N.length=A<0?N.length+A:A,N.push.apply(N,P),N}function l(N){var A=typeof N>"u"?"undefined":B(N);return A!=="object"?A:N===Math?"math":N===null?"null":Array.isArray(N)?"array":Object.prototype.toString.call(N)==="[object Date]"?"date":typeof N.toString=="function"&&/^\/.*\//.test(N.toString())?"regexp":"object"}function c(N,A,M,P,$,J,H){$=$||[],H=H||[];var z=$.slice(0);if(typeof J<"u"){if(P){if(typeof P=="function"&&P(z,J))return;if((typeof P>"u"?"undefined":B(P))==="object"){if(P.prefilter&&P.prefilter(z,J))return;if(P.normalize){var se=P.normalize(z,J,N,A);se&&(N=se[0],A=se[1])}}}z.push(J)}l(N)==="regexp"&&l(A)==="regexp"&&(N=N.toString(),A=A.toString());var de=typeof N>"u"?"undefined":B(N),ue=typeof A>"u"?"undefined":B(A),fe=de!=="undefined"||H&&H[H.length-1].lhs&&H[H.length-1].lhs.hasOwnProperty(J),be=ue!=="undefined"||H&&H[H.length-1].rhs&&H[H.length-1].rhs.hasOwnProperty(J);if(!fe&&be)M(new o(z,A));else if(!be&&fe)M(new a(z,N));else if(l(N)!==l(A))M(new n(z,N,A));else if(l(N)==="date"&&N-A!==0)M(new n(z,N,A));else if(de==="object"&&N!==null&&A!==null)if(H.filter(function(Q){return Q.lhs===N}).length)N!==A&&M(new n(z,N,A));else{if(H.push({lhs:N,rhs:A}),Array.isArray(N)){var V;for(N.length,V=0;V<N.length;V++)V>=A.length?M(new i(z,V,new a(void 0,N[V]))):c(N[V],A[V],M,P,z,V,H);for(;V<A.length;)M(new i(z,V,new o(void 0,A[V++])))}else{var te=Object.keys(N),q=Object.keys(A);te.forEach(function(Q,Te){var Ne=q.indexOf(Q);Ne>=0?(c(N[Q],A[Q],M,P,z,Q,H),q=s(q,Ne)):c(N[Q],void 0,M,P,z,Q,H)}),q.forEach(function(Q){c(void 0,A[Q],M,P,z,Q,H)})}H.length=H.length-1}else N!==A&&(de==="number"&&isNaN(N)&&isNaN(A)||M(new n(z,N,A)))}function u(N,A,M,P){return P=P||[],c(N,A,function($){$&&P.push($)},M),P.length?P:void 0}function d(N,A,M){if(M.path&&M.path.length){var P,$=N[A],J=M.path.length-1;for(P=0;P<J;P++)$=$[M.path[P]];switch(M.kind){case"A":d($[M.path[P]],M.index,M.item);break;case"D":delete $[M.path[P]];break;case"E":case"N":$[M.path[P]]=M.rhs}}else switch(M.kind){case"A":d(N[A],M.index,M.item);break;case"D":N=s(N,A);break;case"E":case"N":N[A]=M.rhs}return N}function f(N,A,M){if(N&&A&&M&&M.kind){for(var P=N,$=-1,J=M.path?M.path.length-1:0;++$<J;)typeof P[M.path[$]]>"u"&&(P[M.path[$]]=typeof M.path[$]=="number"?[]:{}),P=P[M.path[$]];switch(M.kind){case"A":d(M.path?P[M.path[$]]:P,M.index,M.item);break;case"D":delete P[M.path[$]];break;case"E":case"N":P[M.path[$]]=M.rhs}}}function p(N,A,M){if(M.path&&M.path.length){var P,$=N[A],J=M.path.length-1;for(P=0;P<J;P++)$=$[M.path[P]];switch(M.kind){case"A":p($[M.path[P]],M.index,M.item);break;case"D":$[M.path[P]]=M.lhs;break;case"E":$[M.path[P]]=M.lhs;break;case"N":delete $[M.path[P]]}}else switch(M.kind){case"A":p(N[A],M.index,M.item);break;case"D":N[A]=M.lhs;break;case"E":N[A]=M.lhs;break;case"N":N=s(N,A)}return N}function h(N,A,M){if(N&&A&&M&&M.kind){var P,$,J=N;for($=M.path.length-1,P=0;P<$;P++)typeof J[M.path[P]]>"u"&&(J[M.path[P]]={}),J=J[M.path[P]];switch(M.kind){case"A":p(J[M.path[P]],M.index,M.item);break;case"D":J[M.path[P]]=M.lhs;break;case"E":J[M.path[P]]=M.lhs;break;case"N":delete J[M.path[P]]}}}function y(N,A,M){if(N&&A){var P=function($){M&&!M(N,A,$)||f(N,A,$)};c(N,A,P)}}function b(N){return"color: "+_e[N].color+"; font-weight: bold"}function g(N){var A=N.kind,M=N.path,P=N.lhs,$=N.rhs,J=N.index,H=N.item;switch(A){case"E":return[M.join("."),P,"\u2192",$];case"N":return[M.join("."),$];case"D":return[M.join(".")];case"A":return[M.join(".")+"["+J+"]",H];default:return[]}}function m(N,A,M,P){var $=u(N,A);try{P?M.groupCollapsed("diff"):M.group("diff")}catch{M.log("diff")}$?$.forEach(function(J){var H=J.kind,z=g(J);M.log.apply(M,["%c "+_e[H].text,b(H)].concat(Z(z)))}):M.log("\u2014\u2014 no diff \u2014\u2014");try{M.groupEnd()}catch{M.log("\u2014\u2014 diff end \u2014\u2014 ")}}function T(N,A,M,P){switch(typeof N>"u"?"undefined":B(N)){case"object":return typeof N[P]=="function"?N[P].apply(N,Z(M)):N[P];case"function":return N(A);default:return N}}function S(N){var A=N.timestamp,M=N.duration;return function(P,$,J){var H=["action"];return H.push("%c"+String(P.type)),A&&H.push("%c@ "+$),M&&H.push("%c(in "+J.toFixed(2)+" ms)"),H.join(" ")}}function I(N,A){var M=A.logger,P=A.actionTransformer,$=A.titleFormatter,J=$===void 0?S(A):$,H=A.collapsed,z=A.colors,se=A.level,de=A.diff,ue=typeof A.titleFormatter>"u";N.forEach(function(fe,be){var V=fe.started,te=fe.startedTime,q=fe.action,Q=fe.prevState,Te=fe.error,Ne=fe.took,qe=fe.nextState,lt=N[be+1];lt&&(qe=lt.prevState,Ne=lt.started-V);var et=P(q),br=typeof H=="function"?H(function(){return qe},q,fe):H,Qt=F(te),qt=z.title?"color: "+z.title(et)+";":"",Ot=["color: gray; font-weight: lighter;"];Ot.push(qt),A.timestamp&&Ot.push("color: gray; font-weight: lighter;"),A.duration&&Ot.push("color: gray; font-weight: lighter;");var gt=J(et,Qt,Ne);try{br?z.title&&ue?M.groupCollapsed.apply(M,["%c "+gt].concat(Ot)):M.groupCollapsed(gt):z.title&&ue?M.group.apply(M,["%c "+gt].concat(Ot)):M.group(gt)}catch{M.log(gt)}var zt=T(se,et,[Q],"prevState"),Lt=T(se,et,[et],"action"),er=T(se,et,[Te,Q],"error"),Tr=T(se,et,[qe],"nextState");if(zt)if(z.prevState){var ha="color: "+z.prevState(Q)+"; font-weight: bold";M[zt]("%c prev state",ha,Q)}else M[zt]("prev state",Q);if(Lt)if(z.action){var Co="color: "+z.action(et)+"; font-weight: bold";M[Lt]("%c action ",Co,et)}else M[Lt]("action ",et);if(Te&&er)if(z.error){var Di="color: "+z.error(Te,Q)+"; font-weight: bold;";M[er]("%c error ",Di,Te)}else M[er]("error ",Te);if(Tr)if(z.nextState){var tn="color: "+z.nextState(qe)+"; font-weight: bold";M[Tr]("%c next state",tn,qe)}else M[Tr]("next state",qe);de&&m(Q,qe,M,br);try{M.groupEnd()}catch{M.log("\u2014\u2014 log end \u2014\u2014")}})}function v(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=Object.assign({},D,N),M=A.logger,P=A.stateTransformer,$=A.errorTransformer,J=A.predicate,H=A.logErrors,z=A.diffPredicate;if(typeof M>"u")return function(){return function(de){return function(ue){return de(ue)}}};if(N.getState&&N.dispatch)return console.error(`[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:
70
70
  // Logger with default options
71
71
  import { logger } from 'redux-logger'
72
72
  const store = createStore(
@@ -82,15 +82,15 @@ const store = createStore(
82
82
  reducer,
83
83
  applyMiddleware(logger)
84
84
  )
85
- `),function(){return function(de){return function(ue){return de(ue)}}};var se=[];return function(de){var ue=de.getState;return function(fe){return function(be){if(typeof J=="function"&&!J(ue,be))return fe(be);var V={};se.push(V),V.started=G.now(),V.startedTime=new Date,V.prevState=P(ue()),V.action=be;var te=void 0;if(H)try{te=fe(be)}catch(Q){V.error=$(Q)}else te=fe(be);V.took=G.now()-V.started,V.nextState=P(ue());var q=A.diff&&typeof z=="function"?z(ue,be):A.diff;if(I(se,Object.assign({},A,{diff:q})),se.length=0,V.error)throw V.error;return te}}}}var w,k,N=function(E,A){return new Array(A+1).join(E)},R=function(E,A){return N("0",A-E.toString().length)+E},F=function(E){return R(E.getHours(),2)+":"+R(E.getMinutes(),2)+":"+R(E.getSeconds(),2)+"."+R(E.getMilliseconds(),3)},G=typeof performance<"u"&&performance!==null&&typeof performance.now=="function"?performance:Date,B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},Z=function(E){if(Array.isArray(E)){for(var A=0,M=Array(E.length);A<E.length;A++)M[A]=E[A];return M}return Array.from(E)},X=[];w=(typeof global>"u"?"undefined":B(global))==="object"&&global?global:typeof window<"u"?window:{},k=w.DeepDiff,k&&X.push(function(){typeof k<"u"&&w.DeepDiff===u&&(w.DeepDiff=k,k=void 0)}),t(n,r),t(o,r),t(a,r),t(i,r),Object.defineProperties(u,{diff:{value:u,enumerable:!0},observableDiff:{value:c,enumerable:!0},applyDiff:{value:y,enumerable:!0},applyChange:{value:f,enumerable:!0},revertChange:{value:h,enumerable:!0},isConflict:{value:function(){return typeof k<"u"},enumerable:!0},noConflict:{value:function(){return X&&(X.forEach(function(E){E()}),X=null),u},enumerable:!0}});var _e={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},D={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(E){return E},actionTransformer:function(E){return E},errorTransformer:function(E){return E},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},re=function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=E.dispatch,M=E.getState;return typeof A=="function"||typeof M=="function"?v()({dispatch:A,getState:M}):void console.error(`
85
+ `),function(){return function(de){return function(ue){return de(ue)}}};var se=[];return function(de){var ue=de.getState;return function(fe){return function(be){if(typeof J=="function"&&!J(ue,be))return fe(be);var V={};se.push(V),V.started=G.now(),V.startedTime=new Date,V.prevState=P(ue()),V.action=be;var te=void 0;if(H)try{te=fe(be)}catch(Q){V.error=$(Q)}else te=fe(be);V.took=G.now()-V.started,V.nextState=P(ue());var q=A.diff&&typeof z=="function"?z(ue,be):A.diff;if(I(se,Object.assign({},A,{diff:q})),se.length=0,V.error)throw V.error;return te}}}}var w,k,E=function(N,A){return new Array(A+1).join(N)},R=function(N,A){return E("0",A-N.toString().length)+N},F=function(N){return R(N.getHours(),2)+":"+R(N.getMinutes(),2)+":"+R(N.getSeconds(),2)+"."+R(N.getMilliseconds(),3)},G=typeof performance<"u"&&performance!==null&&typeof performance.now=="function"?performance:Date,B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},Z=function(N){if(Array.isArray(N)){for(var A=0,M=Array(N.length);A<N.length;A++)M[A]=N[A];return M}return Array.from(N)},X=[];w=(typeof global>"u"?"undefined":B(global))==="object"&&global?global:typeof window<"u"?window:{},k=w.DeepDiff,k&&X.push(function(){typeof k<"u"&&w.DeepDiff===u&&(w.DeepDiff=k,k=void 0)}),t(n,r),t(o,r),t(a,r),t(i,r),Object.defineProperties(u,{diff:{value:u,enumerable:!0},observableDiff:{value:c,enumerable:!0},applyDiff:{value:y,enumerable:!0},applyChange:{value:f,enumerable:!0},revertChange:{value:h,enumerable:!0},isConflict:{value:function(){return typeof k<"u"},enumerable:!0},noConflict:{value:function(){return X&&(X.forEach(function(N){N()}),X=null),u},enumerable:!0}});var _e={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},D={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(N){return N},actionTransformer:function(N){return N},errorTransformer:function(N){return N},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},re=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=N.dispatch,M=N.getState;return typeof A=="function"||typeof M=="function"?v()({dispatch:A,getState:M}):void console.error(`
86
86
  [redux-logger v3] BREAKING CHANGE
87
87
  [redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.
88
88
  [redux-logger v3] Change
89
89
  [redux-logger v3] import createLogger from 'redux-logger'
90
90
  [redux-logger v3] to
91
91
  [redux-logger v3] import { createLogger } from 'redux-logger'
92
- `)};e.defaults=D,e.createLogger=v,e.logger=re,e.default=re,Object.defineProperty(e,"__esModule",{value:!0})})});var Vs=O((s9,rm)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?rm.exports={nextTick:uW}:rm.exports=process;function uW(e,t,r,n){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var o=arguments.length,a,i;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,r)});case 4:return process.nextTick(function(){e.call(null,t,r,n)});default:for(a=new Array(o-1),i=0;i<a.length;)a[i++]=arguments[i];return process.nextTick(function(){e.apply(null,a)})}}});var $_=O((l9,U_)=>{var dW={}.toString;U_.exports=Array.isArray||function(e){return dW.call(e)=="[object Array]"}});var nm=O((c9,G_)=>{G_.exports=require("stream")});var js=O((om,H_)=>{var Zu=require("buffer"),Ln=Zu.Buffer;function W_(e,t){for(var r in e)t[r]=e[r]}Ln.from&&Ln.alloc&&Ln.allocUnsafe&&Ln.allocUnsafeSlow?H_.exports=Zu:(W_(Zu,om),om.Buffer=ti);function ti(e,t,r){return Ln(e,t,r)}W_(Ln,ti);ti.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Ln(e,t,r)};ti.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Ln(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};ti.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ln(e)};ti.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Zu.SlowBuffer(e)}});var ri=O(Vt=>{function fW(e){return Array.isArray?Array.isArray(e):Ju(e)==="[object Array]"}Vt.isArray=fW;function pW(e){return typeof e=="boolean"}Vt.isBoolean=pW;function hW(e){return e===null}Vt.isNull=hW;function mW(e){return e==null}Vt.isNullOrUndefined=mW;function gW(e){return typeof e=="number"}Vt.isNumber=gW;function yW(e){return typeof e=="string"}Vt.isString=yW;function bW(e){return typeof e=="symbol"}Vt.isSymbol=bW;function TW(e){return e===void 0}Vt.isUndefined=TW;function SW(e){return Ju(e)==="[object RegExp]"}Vt.isRegExp=SW;function xW(e){return typeof e=="object"&&e!==null}Vt.isObject=xW;function IW(e){return Ju(e)==="[object Date]"}Vt.isDate=IW;function vW(e){return Ju(e)==="[object Error]"||e instanceof Error}Vt.isError=vW;function wW(e){return typeof e=="function"}Vt.isFunction=wW;function kW(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}Vt.isPrimitive=kW;Vt.isBuffer=require("buffer").Buffer.isBuffer;function Ju(e){return Object.prototype.toString.call(e)}});var V_=O((d9,am)=>{typeof Object.create=="function"?am.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:am.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var ni=O((f9,sm)=>{try{if(im=require("util"),typeof im.inherits!="function")throw"";sm.exports=im.inherits}catch{sm.exports=V_()}var im});var q_=O((p9,lm)=>{"use strict";function _W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var j_=js().Buffer,qs=require("util");function CW(e,t,r){e.copy(t,r)}lm.exports=(function(){function e(){_W(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=r+n.data;return o},e.prototype.concat=function(r){if(this.length===0)return j_.alloc(0);if(this.length===1)return this.head.data;for(var n=j_.allocUnsafe(r>>>0),o=this.head,a=0;o;)CW(o.data,n,a),a+=o.data.length,o=o.next;return n},e})();qs&&qs.inspect&&qs.inspect.custom&&(lm.exports.prototype[qs.inspect.custom]=function(){var e=qs.inspect({length:this.length});return this.constructor.name+" "+e})});var cm=O((h9,Z_)=>{"use strict";var z_=Vs();function EW(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(!this._writableState||!this._writableState.errorEmitted)&&z_.nextTick(K_,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?(z_.nextTick(K_,r,a),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(a)}),this)}function NW(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function K_(e,t){e.emit("error",t)}Z_.exports={destroy:EW,undestroy:NW}});var Y_=O((m9,J_)=>{J_.exports=require("util").deprecate});var dm=O((g9,a0)=>{"use strict";var Zo=Vs();a0.exports=St;function Q_(e){var t=this;this.next=null,this.entry=null,this.finish=function(){zW(t,e)}}var AW=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Zo.nextTick,oi;St.WritableState=Ks;var e0=Object.create(ri());e0.inherits=ni();var PW={deprecate:Y_()},t0=nm(),Xu=js().Buffer,RW=global.Uint8Array||function(){};function MW(e){return Xu.from(e)}function FW(e){return Xu.isBuffer(e)||e instanceof RW}var r0=cm();e0.inherits(St,t0);function OW(){}function Ks(e,t){oi=oi||Jo(),e=e||{};var r=t instanceof oi;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(o||o===0)?this.highWaterMark=o:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){WW(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Q_(this)}Ks.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Ks.prototype,"buffer",{get:PW.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Yu;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Yu=Function.prototype[Symbol.hasInstance],Object.defineProperty(St,Symbol.hasInstance,{value:function(e){return Yu.call(this,e)?!0:this!==St?!1:e&&e._writableState instanceof Ks}})):Yu=function(e){return e instanceof this};function St(e){if(oi=oi||Jo(),!Yu.call(St,this)&&!(this instanceof oi))return new St(e);this._writableState=new Ks(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),t0.call(this)}St.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function LW(e,t){var r=new Error("write after end");e.emit("error",r),Zo.nextTick(t,r)}function DW(e,t,r,n){var o=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Zo.nextTick(n,a),o=!1),o}St.prototype.write=function(e,t,r){var n=this._writableState,o=!1,a=!n.objectMode&&FW(e);return a&&!Xu.isBuffer(e)&&(e=MW(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=OW),n.ended?LW(this,r):(a||DW(this,n,e,r))&&(n.pendingcb++,o=UW(this,n,a,e,t,r)),o};St.prototype.cork=function(){var e=this._writableState;e.corked++};St.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest&&n0(this,e))};St.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function BW(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Xu.from(t,r)),t}Object.defineProperty(St.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function UW(e,t,r,n,o,a){if(!r){var i=BW(t,n,o);n!==i&&(r=!0,o="buffer",n=i)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else um(e,t,!1,s,n,o,a);return l}function um(e,t,r,n,o,a,i){t.writelen=n,t.writecb=i,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,a,t.onwrite),t.sync=!1}function $W(e,t,r,n,o){--t.pendingcb,r?(Zo.nextTick(o,n),Zo.nextTick(zs,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),zs(e,t))}function GW(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function WW(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(GW(r),t)$W(e,r,n,t,o);else{var a=o0(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&n0(e,r),n?AW(X_,e,r,a,o):X_(e,r,a,o)}}function X_(e,t,r,n){r||HW(e,t),t.pendingcb--,n(),zs(e,t)}function HW(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function n0(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var i=0,s=!0;r;)o[i]=r,r.isBuf||(s=!1),r=r.next,i+=1;o.allBuffers=s,um(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Q_(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,u=r.callback,d=t.objectMode?1:l.length;if(um(e,t,!1,d,l,c,u),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}St.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};St.prototype._writev=null;St.prototype.end=function(e,t,r){var n=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),!n.ending&&!n.finished&&qW(this,n,r)};function o0(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function VW(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),zs(e,t)})}function jW(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,Zo.nextTick(VW,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function zs(e,t){var r=o0(t);return r&&(jW(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function qW(e,t,r){t.ending=!0,zs(e,t),r&&(t.finished?Zo.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function zW(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}Object.defineProperty(St.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});St.prototype.destroy=r0.destroy;St.prototype._undestroy=r0.undestroy;St.prototype._destroy=function(e,t){this.end(),t(e)}});var Jo=O((y9,c0)=>{"use strict";var i0=Vs(),KW=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};c0.exports=Dn;var s0=Object.create(ri());s0.inherits=ni();var l0=hm(),pm=dm();s0.inherits(Dn,l0);for(fm=KW(pm.prototype),Qu=0;Qu<fm.length;Qu++)ed=fm[Qu],Dn.prototype[ed]||(Dn.prototype[ed]=pm.prototype[ed]);var fm,ed,Qu;function Dn(e){if(!(this instanceof Dn))return new Dn(e);l0.call(this,e),pm.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",ZW)}Object.defineProperty(Dn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ZW(){this.allowHalfOpen||this._writableState.ended||i0.nextTick(JW,this)}function JW(e){e.end()}Object.defineProperty(Dn.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});Dn.prototype._destroy=function(e,t){this.push(null),this.end(),i0.nextTick(t,e)}});var ym=O(d0=>{"use strict";var gm=js().Buffer,u0=gm.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function YW(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function XW(e){var t=YW(e);if(typeof t!="string"&&(gm.isEncoding===u0||!u0(e)))throw new Error("Unknown encoding: "+e);return t||e}d0.StringDecoder=Zs;function Zs(e){this.encoding=XW(e);var t;switch(this.encoding){case"utf16le":this.text=oH,this.end=aH,t=4;break;case"utf8":this.fillLast=tH,t=4;break;case"base64":this.text=iH,this.end=sH,t=3;break;default:this.write=lH,this.end=cH;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=gm.allocUnsafe(t)}Zs.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Zs.prototype.end=nH;Zs.prototype.text=rH;Zs.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function mm(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function QW(e,t,r){var n=t.length-1;if(n<r)return 0;var o=mm(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||o===-2?0:(o=mm(t[n]),o>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||o===-2?0:(o=mm(t[n]),o>=0?(o>0&&(o===2?o=0:e.lastNeed=o-3),o):0))}function eH(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function tH(e){var t=this.lastTotal-this.lastNeed,r=eH(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function rH(e,t){var r=QW(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function nH(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function oH(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function aH(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function iH(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function sH(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function lH(e){return e.toString(this.encoding)}function cH(e){return e&&e.length?this.write(e):""}});var hm=O((S9,v0)=>{"use strict";var ii=Vs();v0.exports=Qe;var uH=$_(),Js;Qe.ReadableState=b0;var T9=require("events").EventEmitter,m0=function(e,t){return e.listeners(t).length},Im=nm(),Ys=js().Buffer,dH=global.Uint8Array||function(){};function fH(e){return Ys.from(e)}function pH(e){return Ys.isBuffer(e)||e instanceof dH}var g0=Object.create(ri());g0.inherits=ni();var bm=require("util"),We=void 0;bm&&bm.debuglog?We=bm.debuglog("stream"):We=function(){};var hH=q_(),y0=cm(),ai;g0.inherits(Qe,Im);var Tm=["error","close","destroy","pause","resume"];function mH(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):uH(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function b0(e,t){Js=Js||Jo(),e=e||{};var r=t instanceof Js;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(o||o===0)?this.highWaterMark=o:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new hH,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ai||(ai=ym().StringDecoder),this.decoder=new ai(e.encoding),this.encoding=e.encoding)}function Qe(e){if(Js=Js||Jo(),!(this instanceof Qe))return new Qe(e);this._readableState=new b0(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Im.call(this)}Object.defineProperty(Qe.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Qe.prototype.destroy=y0.destroy;Qe.prototype._undestroy=y0.undestroy;Qe.prototype._destroy=function(e,t){this.push(null),t(e)};Qe.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Ys.from(e,t),t=""),n=!0),T0(this,e,t,!1,n)};Qe.prototype.unshift=function(e){return T0(this,e,null,!0,!1)};function T0(e,t,r,n,o){var a=e._readableState;if(t===null)a.reading=!1,TH(e,a);else{var i;o||(i=gH(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Ys.prototype&&(t=fH(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Sm(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Sm(e,a,t,!1):S0(e,a)):Sm(e,a,t,!1))):n||(a.reading=!1)}return yH(a)}function Sm(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&td(e)),S0(e,t)}function gH(e,t){var r;return!pH(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function yH(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Qe.prototype.isPaused=function(){return this._readableState.flowing===!1};Qe.prototype.setEncoding=function(e){return ai||(ai=ym().StringDecoder),this._readableState.decoder=new ai(e),this._readableState.encoding=e,this};var f0=8388608;function bH(e){return e>=f0?e=f0:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function p0(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=bH(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Qe.prototype.read=function(e){We("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return We("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?xm(this):td(this),null;if(e=p0(e,t),e===0&&t.ended)return t.length===0&&xm(this),null;var n=t.needReadable;We("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,We("length less than watermark",n)),t.ended||t.reading?(n=!1,We("reading or ended",n)):n&&(We("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=p0(r,t)));var o;return e>0?o=x0(e,t):o=null,o===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&xm(this)),o!==null&&this.emit("data",o),o};function TH(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,td(e)}}function td(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(We("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?ii.nextTick(h0,e):h0(e))}function h0(e){We("emit readable"),e.emit("readable"),vm(e)}function S0(e,t){t.readingMore||(t.readingMore=!0,ii.nextTick(SH,e,t))}function SH(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(We("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}Qe.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Qe.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,We("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=o?s:b;n.endEmitted?ii.nextTick(a):r.once("end",a),e.on("unpipe",i);function i(m,g){We("onunpipe"),m===r&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,u())}function s(){We("onend"),e.end()}var l=xH(r);e.on("drain",l);var c=!1;function u(){We("cleanup"),e.removeListener("close",h),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",i),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",f),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}var d=!1;r.on("data",f);function f(m){We("ondata"),d=!1;var g=e.write(m);g===!1&&!d&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&I0(n.pipes,e)!==-1)&&!c&&(We("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function p(m){We("onerror",m),b(),e.removeListener("error",p),m0(e,"error")===0&&e.emit("error",m)}mH(e,"error",p);function h(){e.removeListener("finish",y),b()}e.once("close",h);function y(){We("onfinish"),e.removeListener("close",h),b()}e.once("finish",y);function b(){We("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(We("pipe resume"),r.resume()),e};function xH(e){return function(){var t=e._readableState;We("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&m0(e,"data")&&(t.flowing=!0,vm(e))}}Qe.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)n[a].emit("unpipe",this,r);return this}var i=I0(t.pipes,e);return i===-1?this:(t.pipes.splice(i,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Qe.prototype.on=function(e,t){var r=Im.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&td(this):ii.nextTick(IH,this))}return r};Qe.prototype.addListener=Qe.prototype.on;function IH(e){We("readable nexttick read 0"),e.read(0)}Qe.prototype.resume=function(){var e=this._readableState;return e.flowing||(We("resume"),e.flowing=!0,vH(this,e)),this};function vH(e,t){t.resumeScheduled||(t.resumeScheduled=!0,ii.nextTick(wH,e,t))}function wH(e,t){t.reading||(We("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),vm(e),t.flowing&&!t.reading&&e.read(0)}Qe.prototype.pause=function(){return We("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(We("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function vm(e){var t=e._readableState;for(We("flow",t.flowing);t.flowing&&e.read()!==null;);}Qe.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(We("wrapped end"),r.decoder&&!r.ended){var i=r.decoder.end();i&&i.length&&t.push(i)}t.push(null)}),e.on("data",function(i){if(We("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!(r.objectMode&&i==null)&&!(!r.objectMode&&(!i||!i.length))){var s=t.push(i);s||(n=!0,e.pause())}});for(var o in e)this[o]===void 0&&typeof e[o]=="function"&&(this[o]=(function(i){return function(){return e[i].apply(e,arguments)}})(o));for(var a=0;a<Tm.length;a++)e.on(Tm[a],this.emit.bind(this,Tm[a]));return this._read=function(i){We("wrapped _read",i),n&&(n=!1,e.resume())},this};Object.defineProperty(Qe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Qe._fromList=x0;function x0(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=kH(e,t.buffer,t.decoder),r}function kH(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?n=t.shift():n=r?_H(e,t):CH(e,t),n}function _H(e,t){var r=t.head,n=1,o=r.data;for(e-=o.length;r=r.next;){var a=r.data,i=e>a.length?a.length:e;if(i===a.length?o+=a:o+=a.slice(0,e),e-=i,e===0){i===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(i));break}++n}return t.length-=n,o}function CH(e,t){var r=Ys.allocUnsafe(e),n=t.head,o=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var a=n.data,i=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,i),e-=i,e===0){i===a.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(i));break}++o}return t.length-=o,r}function xm(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,ii.nextTick(EH,t,e))}function EH(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I0(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var wm=O((x9,_0)=>{"use strict";_0.exports=Bn;var rd=Jo(),k0=Object.create(ri());k0.inherits=ni();k0.inherits(Bn,rd);function NH(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function Bn(e){if(!(this instanceof Bn))return new Bn(e);rd.call(this,e),this._transformState={afterTransform:NH.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",AH)}function AH(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){w0(e,t,r)}):w0(this,null,null)}Bn.prototype.push=function(e,t){return this._transformState.needTransform=!1,rd.prototype.push.call(this,e,t)};Bn.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};Bn.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};Bn.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Bn.prototype._destroy=function(e,t){var r=this;rd.prototype._destroy.call(this,e,function(n){t(n),r.emit("close")})};function w0(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var A0=O((I9,N0)=>{"use strict";N0.exports=Xs;var C0=wm(),E0=Object.create(ri());E0.inherits=ni();E0.inherits(Xs,C0);function Xs(e){if(!(this instanceof Xs))return new Xs(e);C0.call(this,e)}Xs.prototype._transform=function(e,t,r){r(null,e)}});var km=O((Mt,nd)=>{var cn=require("stream");process.env.READABLE_STREAM==="disable"&&cn?(nd.exports=cn,Mt=nd.exports=cn.Readable,Mt.Readable=cn.Readable,Mt.Writable=cn.Writable,Mt.Duplex=cn.Duplex,Mt.Transform=cn.Transform,Mt.PassThrough=cn.PassThrough,Mt.Stream=cn):(Mt=nd.exports=hm(),Mt.Stream=cn||Mt,Mt.Readable=Mt,Mt.Writable=dm(),Mt.Duplex=Jo(),Mt.Transform=wm(),Mt.PassThrough=A0())});var Un=O(hr=>{"use strict";hr.base64=!0;hr.array=!0;hr.string=!0;hr.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";hr.nodebuffer=typeof Buffer<"u";hr.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")hr.blob=!1;else{_m=new ArrayBuffer(0);try{hr.blob=new Blob([_m],{type:"application/zip"}).size===0}catch{try{P0=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Cm=new P0,Cm.append(_m),hr.blob=Cm.getBlob("application/zip").size===0}catch{hr.blob=!1}}}var _m,P0,Cm;try{hr.nodestream=!!km().Readable}catch{hr.nodestream=!1}});var Nm=O(Em=>{"use strict";var PH=st(),RH=Un(),un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Em.encode=function(e){for(var t=[],r,n,o,a,i,s,l,c=0,u=e.length,d=u,f=PH.getTypeOf(e)!=="string";c<e.length;)d=u-c,f?(r=e[c++],n=c<u?e[c++]:0,o=c<u?e[c++]:0):(r=e.charCodeAt(c++),n=c<u?e.charCodeAt(c++):0,o=c<u?e.charCodeAt(c++):0),a=r>>2,i=(r&3)<<4|n>>4,s=d>1?(n&15)<<2|o>>6:64,l=d>2?o&63:64,t.push(un.charAt(a)+un.charAt(i)+un.charAt(s)+un.charAt(l));return t.join("")};Em.decode=function(e){var t,r,n,o,a,i,s,l=0,c=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var d=e.length*3/4;if(e.charAt(e.length-1)===un.charAt(64)&&d--,e.charAt(e.length-2)===un.charAt(64)&&d--,d%1!==0)throw new Error("Invalid base64 input, bad content length.");var f;for(RH.uint8array?f=new Uint8Array(d|0):f=new Array(d|0);l<e.length;)o=un.indexOf(e.charAt(l++)),a=un.indexOf(e.charAt(l++)),i=un.indexOf(e.charAt(l++)),s=un.indexOf(e.charAt(l++)),t=o<<2|a>>4,r=(a&15)<<4|i>>2,n=(i&3)<<6|s,f[c++]=t,i!==64&&(f[c++]=r),s!==64&&(f[c++]=n);return f}});var Qs=O((k9,R0)=>{"use strict";R0.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}}});var L0=O((_9,O0)=>{"use strict";var M0=global.MutationObserver||global.WebKitMutationObserver,si;process.browser?M0?(Am=0,F0=new M0(el),Pm=global.document.createTextNode(""),F0.observe(Pm,{characterData:!0}),si=function(){Pm.data=Am=++Am%2}):!global.setImmediate&&typeof global.MessageChannel<"u"?(Rm=new global.MessageChannel,Rm.port1.onmessage=el,si=function(){Rm.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?si=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){el(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},global.document.documentElement.appendChild(e)}:si=function(){setTimeout(el,0)}:si=function(){process.nextTick(el)};var Am,F0,Pm,Rm,Mm,tl=[];function el(){Mm=!0;for(var e,t,r=tl.length;r;){for(t=tl,tl=[],e=-1;++e<r;)t[e]();r=tl.length}Mm=!1}O0.exports=MH;function MH(e){tl.push(e)===1&&!Mm&&si()}});var H0=O((C9,W0)=>{"use strict";var D0=L0();function li(){}var jt={},B0=["REJECTED"],Fm=["FULFILLED"],U0=["PENDING"];process.browser||(rl=["UNHANDLED"]);var rl;W0.exports=ho;function ho(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=U0,this.queue=[],this.outcome=void 0,process.browser||(this.handled=rl),e!==li&&$0(this,e)}ho.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(r,n);function r(o){function a(){return o}return t.resolve(e()).then(a)}function n(o){function a(){throw o}return t.resolve(e()).then(a)}};ho.prototype.catch=function(e){return this.then(null,e)};ho.prototype.then=function(e,t){if(typeof e!="function"&&this.state===Fm||typeof t!="function"&&this.state===B0)return this;var r=new this.constructor(li);if(process.browser||this.handled===rl&&(this.handled=null),this.state!==U0){var n=this.state===Fm?e:t;Om(r,n,this.outcome)}else this.queue.push(new nl(r,e,t));return r};function nl(e,t,r){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}nl.prototype.callFulfilled=function(e){jt.resolve(this.promise,e)};nl.prototype.otherCallFulfilled=function(e){Om(this.promise,this.onFulfilled,e)};nl.prototype.callRejected=function(e){jt.reject(this.promise,e)};nl.prototype.otherCallRejected=function(e){Om(this.promise,this.onRejected,e)};function Om(e,t,r){D0(function(){var n;try{n=t(r)}catch(o){return jt.reject(e,o)}n===e?jt.reject(e,new TypeError("Cannot resolve promise with itself")):jt.resolve(e,n)})}jt.resolve=function(e,t){var r=G0(FH,t);if(r.status==="error")return jt.reject(e,r.value);var n=r.value;if(n)$0(e,n);else{e.state=Fm,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e};jt.reject=function(e,t){e.state=B0,e.outcome=t,process.browser||e.handled===rl&&D0(function(){e.handled===rl&&process.emit("unhandledRejection",t,e)});for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e};function FH(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments)}}function $0(e,t){var r=!1;function n(s){r||(r=!0,jt.reject(e,s))}function o(s){r||(r=!0,jt.resolve(e,s))}function a(){t(o,n)}var i=G0(a);i.status==="error"&&n(i.value)}function G0(e,t){var r={};try{r.value=e(t),r.status="success"}catch(n){r.status="error",r.value=n}return r}ho.resolve=OH;function OH(e){return e instanceof this?e:jt.resolve(new this(li),e)}ho.reject=LH;function LH(e){var t=new this(li);return jt.reject(t,e)}ho.all=DH;function DH(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var o=new Array(r),a=0,i=-1,s=new this(li);++i<r;)l(e[i],i);return s;function l(c,u){t.resolve(c).then(d,function(f){n||(n=!0,jt.reject(s,f))});function d(f){o[u]=f,++a===r&&!n&&(n=!0,jt.resolve(s,o))}}}ho.race=BH;function BH(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var o=-1,a=new this(li);++o<r;)i(e[o]);return a;function i(s){t.resolve(s).then(function(l){n||(n=!0,jt.resolve(a,l))},function(l){n||(n=!0,jt.reject(a,l))})}}});var ci=O((E9,V0)=>{"use strict";var Lm=null;typeof Promise<"u"?Lm=Promise:Lm=H0();V0.exports={Promise:Lm}});var q0=O(j0=>{(function(e,t){"use strict";if(e.setImmediate)return;var r=1,n={},o=!1,a=e.document,i;function s(g){typeof g!="function"&&(g=new Function(""+g));for(var T=new Array(arguments.length-1),S=0;S<T.length;S++)T[S]=arguments[S+1];var I={callback:g,args:T};return n[r]=I,i(r),r++}function l(g){delete n[g]}function c(g){var T=g.callback,S=g.args;switch(S.length){case 0:T();break;case 1:T(S[0]);break;case 2:T(S[0],S[1]);break;case 3:T(S[0],S[1],S[2]);break;default:T.apply(t,S);break}}function u(g){if(o)setTimeout(u,0,g);else{var T=n[g];if(T){o=!0;try{c(T)}finally{l(g),o=!1}}}}function d(){i=function(g){process.nextTick(function(){u(g)})}}function f(){if(e.postMessage&&!e.importScripts){var g=!0,T=e.onmessage;return e.onmessage=function(){g=!1},e.postMessage("","*"),e.onmessage=T,g}}function p(){var g="setImmediate$"+Math.random()+"$",T=function(S){S.source===e&&typeof S.data=="string"&&S.data.indexOf(g)===0&&u(+S.data.slice(g.length))};e.addEventListener?e.addEventListener("message",T,!1):e.attachEvent("onmessage",T),i=function(S){e.postMessage(g+S,"*")}}function h(){var g=new MessageChannel;g.port1.onmessage=function(T){var S=T.data;u(S)},i=function(T){g.port2.postMessage(T)}}function y(){var g=a.documentElement;i=function(T){var S=a.createElement("script");S.onreadystatechange=function(){u(T),S.onreadystatechange=null,g.removeChild(S),S=null},g.appendChild(S)}}function b(){i=function(g){setTimeout(u,0,g)}}var m=Object.getPrototypeOf&&Object.getPrototypeOf(e);m=m&&m.setTimeout?m:e,{}.toString.call(e.process)==="[object process]"?d():f()?p():e.MessageChannel?h():a&&"onreadystatechange"in a.createElement("script")?y():b(),m.setImmediate=s,m.clearImmediate=l})(typeof self>"u"?typeof global>"u"?j0:global:self)});var st=O(xt=>{"use strict";var mo=Un(),UH=Nm(),ui=Qs(),Dm=ci();q0();function $H(e){var t=null;return mo.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),ad(e,t)}xt.newBlob=function(e,t){xt.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,n=new r;return n.append(e),n.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function ol(e){return e}function ad(e,t){for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)&255;return t}var od={stringifyByChunk:function(e,t,r){var n=[],o=0,a=e.length;if(a<=r)return String.fromCharCode.apply(null,e);for(;o<a;)t==="array"||t==="nodebuffer"?n.push(String.fromCharCode.apply(null,e.slice(o,Math.min(o+r,a)))):n.push(String.fromCharCode.apply(null,e.subarray(o,Math.min(o+r,a)))),o+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(function(){try{return mo.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return mo.nodebuffer&&String.fromCharCode.apply(null,ui.allocBuffer(1)).length===1}catch{return!1}})()}};function al(e){var t=65536,r=xt.getTypeOf(e),n=!0;if(r==="uint8array"?n=od.applyCanBeUsed.uint8array:r==="nodebuffer"&&(n=od.applyCanBeUsed.nodebuffer),n)for(;t>1;)try{return od.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2)}return od.stringifyByChar(e)}xt.applyFromCharCode=al;function id(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var go={};go.string={string:ol,array:function(e){return ad(e,new Array(e.length))},arraybuffer:function(e){return go.string.uint8array(e).buffer},uint8array:function(e){return ad(e,new Uint8Array(e.length))},nodebuffer:function(e){return ad(e,ui.allocBuffer(e.length))}};go.array={string:al,array:ol,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return ui.newBufferFrom(e)}};go.arraybuffer={string:function(e){return al(new Uint8Array(e))},array:function(e){return id(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:ol,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return ui.newBufferFrom(new Uint8Array(e))}};go.uint8array={string:al,array:function(e){return id(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:ol,nodebuffer:function(e){return ui.newBufferFrom(e)}};go.nodebuffer={string:al,array:function(e){return id(e,new Array(e.length))},arraybuffer:function(e){return go.nodebuffer.uint8array(e).buffer},uint8array:function(e){return id(e,new Uint8Array(e.length))},nodebuffer:ol};xt.transformTo=function(e,t){if(t||(t=""),!e)return t;xt.checkSupport(e);var r=xt.getTypeOf(t),n=go[r][e](t);return n};xt.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var o=t[n];o==="."||o===""&&n!==0&&n!==t.length-1||(o===".."?r.pop():r.push(o))}return r.join("/")};xt.getTypeOf=function(e){if(typeof e=="string")return"string";if(Object.prototype.toString.call(e)==="[object Array]")return"array";if(mo.nodebuffer&&ui.isBuffer(e))return"nodebuffer";if(mo.uint8array&&e instanceof Uint8Array)return"uint8array";if(mo.arraybuffer&&e instanceof ArrayBuffer)return"arraybuffer"};xt.checkSupport=function(e){var t=mo[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};xt.MAX_VALUE_16BITS=65535;xt.MAX_VALUE_32BITS=-1;xt.pretty=function(e){var t="",r,n;for(n=0;n<(e||"").length;n++)r=e.charCodeAt(n),t+="\\x"+(r<16?"0":"")+r.toString(16).toUpperCase();return t};xt.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})};xt.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r};xt.extend=function(){var e={},t,r;for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&typeof e[r]>"u"&&(e[r]=arguments[t][r]);return e};xt.prepareContent=function(e,t,r,n,o){var a=Dm.Promise.resolve(t).then(function(i){var s=mo.blob&&(i instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(i))!==-1);return s&&typeof FileReader<"u"?new Dm.Promise(function(l,c){var u=new FileReader;u.onload=function(d){l(d.target.result)},u.onerror=function(d){c(d.target.error)},u.readAsArrayBuffer(i)}):i});return a.then(function(i){var s=xt.getTypeOf(i);return s?(s==="arraybuffer"?i=xt.transformTo("uint8array",i):s==="string"&&(o?i=UH.decode(i):r&&n!==!0&&(i=$H(i))),i):Dm.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}});var mr=O((P9,K0)=>{"use strict";function z0(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}z0.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return this.isFinished?!1:(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(r){t.processChunk(r)}),e.on("end",function(){t.end()}),e.on("error",function(r){t.error(r)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};K0.exports=z0});var fi=O(yo=>{"use strict";var di=st(),Yo=Un(),GH=Qs(),sd=mr(),il=new Array(256);for($n=0;$n<256;$n++)il[$n]=$n>=252?6:$n>=248?5:$n>=240?4:$n>=224?3:$n>=192?2:1;var $n;il[254]=il[254]=1;var WH=function(e){var t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)r=e.charCodeAt(o),(r&64512)===55296&&o+1<i&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(Yo.uint8array?t=new Uint8Array(s):t=new Array(s),a=0,o=0;a<s;o++)r=e.charCodeAt(o),(r&64512)===55296&&o+1<i&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t},HH=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+il[e[r]]>t?r:t},VH=function(e){var t,r,n,o,a=e.length,i=new Array(a*2);for(r=0,t=0;t<a;){if(n=e[t++],n<128){i[r++]=n;continue}if(o=il[n],o>4){i[r++]=65533,t+=o-1;continue}for(n&=o===2?31:o===3?15:7;o>1&&t<a;)n=n<<6|e[t++]&63,o--;if(o>1){i[r++]=65533;continue}n<65536?i[r++]=n:(n-=65536,i[r++]=55296|n>>10&1023,i[r++]=56320|n&1023)}return i.length!==r&&(i.subarray?i=i.subarray(0,r):i.length=r),di.applyFromCharCode(i)};yo.utf8encode=function(t){return Yo.nodebuffer?GH.newBufferFrom(t,"utf-8"):WH(t)};yo.utf8decode=function(t){return Yo.nodebuffer?di.transformTo("nodebuffer",t).toString("utf-8"):(t=di.transformTo(Yo.uint8array?"uint8array":"array",t),VH(t))};function ld(){sd.call(this,"utf-8 decode"),this.leftOver=null}di.inherits(ld,sd);ld.prototype.processChunk=function(e){var t=di.transformTo(Yo.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Yo.uint8array){var r=t;t=new Uint8Array(r.length+this.leftOver.length),t.set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=HH(t),o=t;n!==t.length&&(Yo.uint8array?(o=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(o=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:yo.utf8decode(o),meta:e.meta})};ld.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:yo.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};yo.Utf8DecodeWorker=ld;function Bm(){sd.call(this,"utf-8 encode")}di.inherits(Bm,sd);Bm.prototype.processChunk=function(e){this.push({data:yo.utf8encode(e.data),meta:e.meta})};yo.Utf8EncodeWorker=Bm});var X0=O((M9,Y0)=>{"use strict";var Z0=mr(),J0=st();function Um(e){Z0.call(this,"ConvertWorker to "+e),this.destType=e}J0.inherits(Um,Z0);Um.prototype.processChunk=function(e){this.push({data:J0.transformTo(this.destType,e.data),meta:e.meta})};Y0.exports=Um});var tC=O((F9,eC)=>{"use strict";var Q0=km().Readable,jH=st();jH.inherits($m,Q0);function $m(e,t,r){Q0.call(this,t),this._helper=e;var n=this;e.on("data",function(o,a){n.push(o)||n._helper.pause(),r&&r(a)}).on("error",function(o){n.emit("error",o)}).on("end",function(){n.push(null)})}$m.prototype._read=function(){this._helper.resume()};eC.exports=$m});var Gm=O((O9,oC)=>{"use strict";var Xo=st(),qH=X0(),zH=mr(),KH=Nm(),ZH=Un(),JH=ci(),rC=null;if(ZH.nodestream)try{rC=tC()}catch{}function YH(e,t,r){switch(e){case"blob":return Xo.newBlob(Xo.transformTo("arraybuffer",t),r);case"base64":return KH.encode(t);default:return Xo.transformTo(e,t)}}function XH(e,t){var r,n=0,o=null,a=0;for(r=0;r<t.length;r++)a+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(o=new Uint8Array(a),r=0;r<t.length;r++)o.set(t[r],n),n+=t[r].length;return o;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function QH(e,t){return new JH.Promise(function(r,n){var o=[],a=e._internalType,i=e._outputType,s=e._mimeType;e.on("data",function(l,c){o.push(l),t&&t(c)}).on("error",function(l){o=[],n(l)}).on("end",function(){try{var l=YH(i,XH(a,o),s);r(l)}catch(c){n(c)}o=[]}).resume()})}function nC(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";break}try{this._internalType=n,this._outputType=t,this._mimeType=r,Xo.checkSupport(n),this._worker=e.pipe(new qH(n)),e.lock()}catch(o){this._worker=new zH("error"),this._worker.error(o)}}nC.prototype={accumulate:function(e){return QH(this,e)},on:function(e,t){var r=this;return e==="data"?this._worker.on(e,function(n){t.call(r,n.data,n.meta)}):this._worker.on(e,function(){Xo.delay(t,arguments,r)}),this},resume:function(){return Xo.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Xo.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new rC(this,{objectMode:this._outputType!=="nodebuffer"},e)}};oC.exports=nC});var Wm=O(zr=>{"use strict";zr.base64=!1;zr.binary=!1;zr.dir=!1;zr.createFolders=!0;zr.date=null;zr.compression=null;zr.compressionOptions=null;zr.comment=null;zr.unixPermissions=null;zr.dosPermissions=null});var Hm=O((D9,aC)=>{"use strict";var cd=st(),ud=mr(),eV=16*1024;function pi(e){ud.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(r){t.dataIsReady=!0,t.data=r,t.max=r&&r.length||0,t.type=cd.getTypeOf(r),t.isPaused||t._tickAndRepeat()},function(r){t.error(r)})}cd.inherits(pi,ud);pi.prototype.cleanUp=function(){ud.prototype.cleanUp.call(this),this.data=null};pi.prototype.resume=function(){return ud.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,cd.delay(this._tickAndRepeat,[],this)),!0):!1};pi.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(cd.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};pi.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=eV,t=null,r=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,r);break;case"uint8array":t=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":t=this.data.slice(this.index,r);break}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};aC.exports=pi});var dd=O((B9,sC)=>{"use strict";var tV=st();function rV(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var iC=rV();function nV(e,t,r,n){var o=iC,a=n+r;e=e^-1;for(var i=n;i<a;i++)e=e>>>8^o[(e^t[i])&255];return e^-1}function oV(e,t,r,n){var o=iC,a=n+r;e=e^-1;for(var i=n;i<a;i++)e=e>>>8^o[(e^t.charCodeAt(i))&255];return e^-1}sC.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var n=tV.getTypeOf(t)!=="string";return n?nV(r|0,t,t.length,0):oV(r|0,t,t.length,0)}});var jm=O((U9,cC)=>{"use strict";var lC=mr(),aV=dd(),iV=st();function Vm(){lC.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}iV.inherits(Vm,lC);Vm.prototype.processChunk=function(e){this.streamInfo.crc32=aV(e.data,this.streamInfo.crc32||0),this.push(e)};cC.exports=Vm});var dC=O(($9,uC)=>{"use strict";var sV=st(),qm=mr();function zm(e){qm.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}sV.inherits(zm,qm);zm.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}qm.prototype.processChunk.call(this,e)};uC.exports=zm});var fd=O((G9,hC)=>{"use strict";var fC=ci(),pC=Hm(),lV=jm(),Km=dC();function Zm(e,t,r,n,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=o}Zm.prototype={getContentWorker:function(){var e=new pC(fC.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Km("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new pC(fC.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};Zm.createWorkerFrom=function(e,t,r){return e.pipe(new lV).pipe(new Km("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new Km("compressedSize")).withStreamInfo("compression",t)};hC.exports=Zm});var bC=O((W9,yC)=>{"use strict";var cV=Gm(),uV=Hm(),Jm=fi(),Ym=fd(),mC=mr(),Xm=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};Xm.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");r=e.toLowerCase();var n=r==="string"||r==="text";(r==="binarystring"||r==="text")&&(r="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(t=t.pipe(new Jm.Utf8EncodeWorker)),!o&&n&&(t=t.pipe(new Jm.Utf8DecodeWorker))}catch(a){t=new mC("error"),t.error(a)}return new cV(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Ym&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new Jm.Utf8EncodeWorker)),Ym.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof Ym?this._data.getContentWorker():this._data instanceof mC?this._data:new uV(this._data)}};var gC=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],dV=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(pd=0;pd<gC.length;pd++)Xm.prototype[gC[pd]]=dV;var pd;yC.exports=Xm});var Gn=O(Jt=>{"use strict";var fV=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function pV(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Jt.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)pV(r,n)&&(e[n]=r[n])}}return e};Jt.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var hV={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),o);return}for(var a=0;a<n;a++)e[o+a]=t[r+a]},flattenChunks:function(e){var t,r,n,o,a,i;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(i=new Uint8Array(n),o=0,t=0,r=e.length;t<r;t++)a=e[t],i.set(a,o),o+=a.length;return i}},mV={arraySet:function(e,t,r,n,o){for(var a=0;a<n;a++)e[o+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};Jt.setTyped=function(e){e?(Jt.Buf8=Uint8Array,Jt.Buf16=Uint16Array,Jt.Buf32=Int32Array,Jt.assign(Jt,hV)):(Jt.Buf8=Array,Jt.Buf16=Array,Jt.Buf32=Array,Jt.assign(Jt,mV))};Jt.setTyped(fV)});var GC=O(gi=>{"use strict";var gV=Gn(),yV=4,TC=0,SC=1,bV=2;function mi(e){for(var t=e.length;--t>=0;)e[t]=0}var TV=0,_C=1,SV=2,xV=3,IV=258,ag=29,fl=256,ll=fl+1+ag,hi=30,ig=19,CC=2*ll+1,Qo=15,Qm=16,vV=7,sg=256,EC=16,NC=17,AC=18,ng=[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],hd=[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],wV=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],PC=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],kV=512,Wn=new Array((ll+2)*2);mi(Wn);var sl=new Array(hi*2);mi(sl);var cl=new Array(kV);mi(cl);var ul=new Array(IV-xV+1);mi(ul);var lg=new Array(ag);mi(lg);var md=new Array(hi);mi(md);function eg(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}var RC,MC,FC;function tg(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function OC(e){return e<256?cl[e]:cl[256+(e>>>7)]}function dl(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function sr(e,t,r){e.bi_valid>Qm-r?(e.bi_buf|=t<<e.bi_valid&65535,dl(e,e.bi_buf),e.bi_buf=t>>Qm-e.bi_valid,e.bi_valid+=r-Qm):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function dn(e,t,r){sr(e,r[t*2],r[t*2+1])}function LC(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function _V(e){e.bi_valid===16?(dl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function CV(e,t){var r=t.dyn_tree,n=t.max_code,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,c,u,d,f,p,h,y=0;for(f=0;f<=Qo;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<CC;c++)u=e.heap[c],f=r[r[u*2+1]*2+1]+1,f>l&&(f=l,y++),r[u*2+1]=f,!(u>n)&&(e.bl_count[f]++,p=0,u>=s&&(p=i[u-s]),h=r[u*2],e.opt_len+=h*(f+p),a&&(e.static_len+=h*(o[u*2+1]+p)));if(y!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,y-=2}while(y>0);for(f=l;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--c],!(d>n)&&(r[d*2+1]!==f&&(e.opt_len+=(f-r[d*2+1])*r[d*2],r[d*2+1]=f),u--)}}function DC(e,t,r){var n=new Array(Qo+1),o=0,a,i;for(a=1;a<=Qo;a++)n[a]=o=o+r[a-1]<<1;for(i=0;i<=t;i++){var s=e[i*2+1];s!==0&&(e[i*2]=LC(n[s]++,s))}}function EV(){var e,t,r,n,o,a=new Array(Qo+1);for(r=0,n=0;n<ag-1;n++)for(lg[n]=r,e=0;e<1<<ng[n];e++)ul[r++]=n;for(ul[r-1]=n,o=0,n=0;n<16;n++)for(md[n]=o,e=0;e<1<<hd[n];e++)cl[o++]=n;for(o>>=7;n<hi;n++)for(md[n]=o<<7,e=0;e<1<<hd[n]-7;e++)cl[256+o++]=n;for(t=0;t<=Qo;t++)a[t]=0;for(e=0;e<=143;)Wn[e*2+1]=8,e++,a[8]++;for(;e<=255;)Wn[e*2+1]=9,e++,a[9]++;for(;e<=279;)Wn[e*2+1]=7,e++,a[7]++;for(;e<=287;)Wn[e*2+1]=8,e++,a[8]++;for(DC(Wn,ll+1,a),e=0;e<hi;e++)sl[e*2+1]=5,sl[e*2]=LC(e,5);RC=new eg(Wn,ng,fl+1,ll,Qo),MC=new eg(sl,hd,0,hi,Qo),FC=new eg(new Array(0),wV,0,ig,vV)}function BC(e){var t;for(t=0;t<ll;t++)e.dyn_ltree[t*2]=0;for(t=0;t<hi;t++)e.dyn_dtree[t*2]=0;for(t=0;t<ig;t++)e.bl_tree[t*2]=0;e.dyn_ltree[sg*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function UC(e){e.bi_valid>8?dl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function NV(e,t,r,n){UC(e),n&&(dl(e,r),dl(e,~r)),gV.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function xC(e,t,r,n){var o=t*2,a=r*2;return e[o]<e[a]||e[o]===e[a]&&n[t]<=n[r]}function rg(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&xC(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!xC(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function IC(e,t,r){var n,o,a=0,i,s;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],o=e.pending_buf[e.l_buf+a],a++,n===0?dn(e,o,t):(i=ul[o],dn(e,i+fl+1,t),s=ng[i],s!==0&&(o-=lg[i],sr(e,o,s)),n--,i=OC(n),dn(e,i,r),s=hd[i],s!==0&&(n-=md[i],sr(e,n,s)));while(a<e.last_lit);dn(e,sg,t)}function og(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.elems,i,s,l=-1,c;for(e.heap_len=0,e.heap_max=CC,i=0;i<a;i++)r[i*2]!==0?(e.heap[++e.heap_len]=l=i,e.depth[i]=0):r[i*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,r[c*2]=1,e.depth[c]=0,e.opt_len--,o&&(e.static_len-=n[c*2+1]);for(t.max_code=l,i=e.heap_len>>1;i>=1;i--)rg(e,r,i);c=a;do i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],rg(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=s,r[c*2]=r[i*2]+r[s*2],e.depth[c]=(e.depth[i]>=e.depth[s]?e.depth[i]:e.depth[s])+1,r[i*2+1]=r[s*2+1]=c,e.heap[1]=c++,rg(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],CV(e,t),DC(r,l,e.bl_count)}function vC(e,t,r){var n,o=-1,a,i=t[1],s=0,l=7,c=4;for(i===0&&(l=138,c=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)a=i,i=t[(n+1)*2+1],!(++s<l&&a===i)&&(s<c?e.bl_tree[a*2]+=s:a!==0?(a!==o&&e.bl_tree[a*2]++,e.bl_tree[EC*2]++):s<=10?e.bl_tree[NC*2]++:e.bl_tree[AC*2]++,s=0,o=a,i===0?(l=138,c=3):a===i?(l=6,c=3):(l=7,c=4))}function wC(e,t,r){var n,o=-1,a,i=t[1],s=0,l=7,c=4;for(i===0&&(l=138,c=3),n=0;n<=r;n++)if(a=i,i=t[(n+1)*2+1],!(++s<l&&a===i)){if(s<c)do dn(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==o&&(dn(e,a,e.bl_tree),s--),dn(e,EC,e.bl_tree),sr(e,s-3,2)):s<=10?(dn(e,NC,e.bl_tree),sr(e,s-3,3)):(dn(e,AC,e.bl_tree),sr(e,s-11,7));s=0,o=a,i===0?(l=138,c=3):a===i?(l=6,c=3):(l=7,c=4)}}function AV(e){var t;for(vC(e,e.dyn_ltree,e.l_desc.max_code),vC(e,e.dyn_dtree,e.d_desc.max_code),og(e,e.bl_desc),t=ig-1;t>=3&&e.bl_tree[PC[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function PV(e,t,r,n){var o;for(sr(e,t-257,5),sr(e,r-1,5),sr(e,n-4,4),o=0;o<n;o++)sr(e,e.bl_tree[PC[o]*2+1],3);wC(e,e.dyn_ltree,t-1),wC(e,e.dyn_dtree,r-1)}function RV(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return TC;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return SC;for(r=32;r<fl;r++)if(e.dyn_ltree[r*2]!==0)return SC;return TC}var kC=!1;function MV(e){kC||(EV(),kC=!0),e.l_desc=new tg(e.dyn_ltree,RC),e.d_desc=new tg(e.dyn_dtree,MC),e.bl_desc=new tg(e.bl_tree,FC),e.bi_buf=0,e.bi_valid=0,BC(e)}function $C(e,t,r,n){sr(e,(TV<<1)+(n?1:0),3),NV(e,t,r,!0)}function FV(e){sr(e,_C<<1,3),dn(e,sg,Wn),_V(e)}function OV(e,t,r,n){var o,a,i=0;e.level>0?(e.strm.data_type===bV&&(e.strm.data_type=RV(e)),og(e,e.l_desc),og(e,e.d_desc),i=AV(e),o=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=o&&(o=a)):o=a=r+5,r+4<=o&&t!==-1?$C(e,t,r,n):e.strategy===yV||a===o?(sr(e,(_C<<1)+(n?1:0),3),IC(e,Wn,sl)):(sr(e,(SV<<1)+(n?1:0),3),PV(e,e.l_desc.max_code+1,e.d_desc.max_code+1,i+1),IC(e,e.dyn_ltree,e.dyn_dtree)),BC(e),n&&UC(e)}function LV(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(ul[r]+fl+1)*2]++,e.dyn_dtree[OC(t)*2]++),e.last_lit===e.lit_bufsize-1}gi._tr_init=MV;gi._tr_stored_block=$C;gi._tr_flush_block=OV;gi._tr_tally=LV;gi._tr_align=FV});var cg=O((j9,WC)=>{"use strict";function DV(e,t,r,n){for(var o=e&65535|0,a=e>>>16&65535|0,i=0;r!==0;){i=r>2e3?2e3:r,r-=i;do o=o+t[n++]|0,a=a+o|0;while(--i);o%=65521,a%=65521}return o|a<<16|0}WC.exports=DV});var ug=O((q9,HC)=>{"use strict";function BV(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var UV=BV();function $V(e,t,r,n){var o=UV,a=n+r;e^=-1;for(var i=n;i<a;i++)e=e>>>8^o[(e^t[i])&255];return e^-1}HC.exports=$V});var gd=O((z9,VC)=>{"use strict";VC.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var QC=O(hn=>{"use strict";var Yt=Gn(),Mr=GC(),KC=cg(),bo=ug(),GV=gd(),na=0,WV=1,HV=3,vo=4,jC=5,pn=0,qC=1,Fr=-2,VV=-3,dg=-5,jV=-1,qV=1,yd=2,zV=3,KV=4,ZV=0,JV=2,xd=8,YV=9,XV=15,QV=8,ej=29,tj=256,pg=tj+1+ej,rj=30,nj=19,oj=2*pg+1,aj=15,Pe=3,xo=258,Kr=xo+Pe+1,ij=32,Id=42,hg=69,bd=73,Td=91,Sd=103,ea=113,hl=666,wt=1,ml=2,ta=3,Ti=4,sj=3;function Io(e,t){return e.msg=GV[t],t}function zC(e){return(e<<1)-(e>4?9:0)}function So(e){for(var t=e.length;--t>=0;)e[t]=0}function To(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(Yt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function Ft(e,t){Mr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,To(e.strm)}function Be(e,t){e.pending_buf[e.pending++]=t}function pl(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function lj(e,t,r,n){var o=e.avail_in;return o>n&&(o=n),o===0?0:(e.avail_in-=o,Yt.arraySet(t,e.input,e.next_in,o,r),e.state.wrap===1?e.adler=KC(e.adler,t,o,r):e.state.wrap===2&&(e.adler=bo(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function ZC(e,t){var r=e.max_chain_length,n=e.strstart,o,a,i=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-Kr?e.strstart-(e.w_size-Kr):0,c=e.window,u=e.w_mask,d=e.prev,f=e.strstart+xo,p=c[n+i-1],h=c[n+i];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(o=t,!(c[o+i]!==h||c[o+i-1]!==p||c[o]!==c[n]||c[++o]!==c[n+1])){n+=2,o++;do;while(c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&n<f);if(a=xo-(f-n),n=f-xo,a>i){if(e.match_start=t,i=a,a>=s)break;p=c[n+i-1],h=c[n+i]}}while((t=d[t&u])>l&&--r!==0);return i<=e.lookahead?i:e.lookahead}function ra(e){var t=e.w_size,r,n,o,a,i;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Kr)){Yt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do o=e.head[--r],e.head[r]=o>=t?o-t:0;while(--n);n=t,r=n;do o=e.prev[--r],e.prev[r]=o>=t?o-t:0;while(--n);a+=t}if(e.strm.avail_in===0)break;if(n=lj(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=Pe)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+Pe-1])&e.hash_mask,e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<Pe)););}while(e.lookahead<Kr&&e.strm.avail_in!==0)}function cj(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ra(e),e.lookahead===0&&t===na)return wt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Ft(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Kr&&(Ft(e,!1),e.strm.avail_out===0))return wt}return e.insert=0,t===vo?(Ft(e,!0),e.strm.avail_out===0?ta:Ti):(e.strstart>e.block_start&&(Ft(e,!1),e.strm.avail_out===0),wt)}function fg(e,t){for(var r,n;;){if(e.lookahead<Kr){if(ra(e),e.lookahead<Kr&&t===na)return wt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Pe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Pe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Kr&&(e.match_length=ZC(e,r)),e.match_length>=Pe)if(n=Mr._tr_tally(e,e.strstart-e.match_start,e.match_length-Pe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Pe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Pe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Ft(e,!1),e.strm.avail_out===0))return wt}return e.insert=e.strstart<Pe-1?e.strstart:Pe-1,t===vo?(Ft(e,!0),e.strm.avail_out===0?ta:Ti):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:ml}function yi(e,t){for(var r,n,o;;){if(e.lookahead<Kr){if(ra(e),e.lookahead<Kr&&t===na)return wt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Pe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Pe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Pe-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Kr&&(e.match_length=ZC(e,r),e.match_length<=5&&(e.strategy===qV||e.match_length===Pe&&e.strstart-e.match_start>4096)&&(e.match_length=Pe-1)),e.prev_length>=Pe&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-Pe,n=Mr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Pe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Pe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Pe-1,e.strstart++,n&&(Ft(e,!1),e.strm.avail_out===0))return wt}else if(e.match_available){if(n=Mr._tr_tally(e,0,e.window[e.strstart-1]),n&&Ft(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return wt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Mr._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Pe-1?e.strstart:Pe-1,t===vo?(Ft(e,!0),e.strm.avail_out===0?ta:Ti):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:ml}function uj(e,t){for(var r,n,o,a,i=e.window;;){if(e.lookahead<=xo){if(ra(e),e.lookahead<=xo&&t===na)return wt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Pe&&e.strstart>0&&(o=e.strstart-1,n=i[o],n===i[++o]&&n===i[++o]&&n===i[++o])){a=e.strstart+xo;do;while(n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&o<a);e.match_length=xo-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Pe?(r=Mr._tr_tally(e,1,e.match_length-Pe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Ft(e,!1),e.strm.avail_out===0))return wt}return e.insert=0,t===vo?(Ft(e,!0),e.strm.avail_out===0?ta:Ti):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:ml}function dj(e,t){for(var r;;){if(e.lookahead===0&&(ra(e),e.lookahead===0)){if(t===na)return wt;break}if(e.match_length=0,r=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Ft(e,!1),e.strm.avail_out===0))return wt}return e.insert=0,t===vo?(Ft(e,!0),e.strm.avail_out===0?ta:Ti):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:ml}function fn(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}var bi;bi=[new fn(0,0,0,0,cj),new fn(4,4,8,4,fg),new fn(4,5,16,8,fg),new fn(4,6,32,32,fg),new fn(4,4,16,16,yi),new fn(8,16,32,32,yi),new fn(8,16,128,128,yi),new fn(8,32,128,256,yi),new fn(32,128,258,1024,yi),new fn(32,258,258,4096,yi)];function fj(e){e.window_size=2*e.w_size,So(e.head),e.max_lazy_match=bi[e.level].max_lazy,e.good_match=bi[e.level].good_length,e.nice_match=bi[e.level].nice_length,e.max_chain_length=bi[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Pe-1,e.match_available=0,e.ins_h=0}function pj(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=xd,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Yt.Buf16(oj*2),this.dyn_dtree=new Yt.Buf16((2*rj+1)*2),this.bl_tree=new Yt.Buf16((2*nj+1)*2),So(this.dyn_ltree),So(this.dyn_dtree),So(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Yt.Buf16(aj+1),this.heap=new Yt.Buf16(2*pg+1),So(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Yt.Buf16(2*pg+1),So(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function JC(e){var t;return!e||!e.state?Io(e,Fr):(e.total_in=e.total_out=0,e.data_type=JV,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Id:ea,e.adler=t.wrap===2?0:1,t.last_flush=na,Mr._tr_init(t),pn)}function YC(e){var t=JC(e);return t===pn&&fj(e.state),t}function hj(e,t){return!e||!e.state||e.state.wrap!==2?Fr:(e.state.gzhead=t,pn)}function XC(e,t,r,n,o,a){if(!e)return Fr;var i=1;if(t===jV&&(t=6),n<0?(i=0,n=-n):n>15&&(i=2,n-=16),o<1||o>YV||r!==xd||n<8||n>15||t<0||t>9||a<0||a>KV)return Io(e,Fr);n===8&&(n=9);var s=new pj;return e.state=s,s.strm=e,s.wrap=i,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Pe-1)/Pe),s.window=new Yt.Buf8(s.w_size*2),s.head=new Yt.Buf16(s.hash_size),s.prev=new Yt.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Yt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,YC(e)}function mj(e,t){return XC(e,t,xd,XV,QV,ZV)}function gj(e,t){var r,n,o,a;if(!e||!e.state||t>jC||t<0)return e?Io(e,Fr):Fr;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===hl&&t!==vo)return Io(e,e.avail_out===0?dg:Fr);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===Id)if(n.wrap===2)e.adler=0,Be(n,31),Be(n,139),Be(n,8),n.gzhead?(Be(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Be(n,n.gzhead.time&255),Be(n,n.gzhead.time>>8&255),Be(n,n.gzhead.time>>16&255),Be(n,n.gzhead.time>>24&255),Be(n,n.level===9?2:n.strategy>=yd||n.level<2?4:0),Be(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Be(n,n.gzhead.extra.length&255),Be(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=bo(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=hg):(Be(n,0),Be(n,0),Be(n,0),Be(n,0),Be(n,0),Be(n,n.level===9?2:n.strategy>=yd||n.level<2?4:0),Be(n,sj),n.status=ea);else{var i=xd+(n.w_bits-8<<4)<<8,s=-1;n.strategy>=yd||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,i|=s<<6,n.strstart!==0&&(i|=ij),i+=31-i%31,n.status=ea,pl(n,i),n.strstart!==0&&(pl(n,e.adler>>>16),pl(n,e.adler&65535)),e.adler=1}if(n.status===hg)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),To(e),o=n.pending,n.pending===n.pending_buf_size));)Be(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=bd)}else n.status=bd;if(n.status===bd)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),To(e),o=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Be(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),a===0&&(n.gzindex=0,n.status=Td)}else n.status=Td;if(n.status===Td)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),To(e),o=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Be(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),a===0&&(n.status=Sd)}else n.status=Sd;if(n.status===Sd&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&To(e),n.pending+2<=n.pending_buf_size&&(Be(n,e.adler&255),Be(n,e.adler>>8&255),e.adler=0,n.status=ea)):n.status=ea),n.pending!==0){if(To(e),e.avail_out===0)return n.last_flush=-1,pn}else if(e.avail_in===0&&zC(t)<=zC(r)&&t!==vo)return Io(e,dg);if(n.status===hl&&e.avail_in!==0)return Io(e,dg);if(e.avail_in!==0||n.lookahead!==0||t!==na&&n.status!==hl){var l=n.strategy===yd?dj(n,t):n.strategy===zV?uj(n,t):bi[n.level].func(n,t);if((l===ta||l===Ti)&&(n.status=hl),l===wt||l===ta)return e.avail_out===0&&(n.last_flush=-1),pn;if(l===ml&&(t===WV?Mr._tr_align(n):t!==jC&&(Mr._tr_stored_block(n,0,0,!1),t===HV&&(So(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),To(e),e.avail_out===0))return n.last_flush=-1,pn}return t!==vo?pn:n.wrap<=0?qC:(n.wrap===2?(Be(n,e.adler&255),Be(n,e.adler>>8&255),Be(n,e.adler>>16&255),Be(n,e.adler>>24&255),Be(n,e.total_in&255),Be(n,e.total_in>>8&255),Be(n,e.total_in>>16&255),Be(n,e.total_in>>24&255)):(pl(n,e.adler>>>16),pl(n,e.adler&65535)),To(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?pn:qC)}function yj(e){var t;return!e||!e.state?Fr:(t=e.state.status,t!==Id&&t!==hg&&t!==bd&&t!==Td&&t!==Sd&&t!==ea&&t!==hl?Io(e,Fr):(e.state=null,t===ea?Io(e,VV):pn))}function bj(e,t){var r=t.length,n,o,a,i,s,l,c,u;if(!e||!e.state||(n=e.state,i=n.wrap,i===2||i===1&&n.status!==Id||n.lookahead))return Fr;for(i===1&&(e.adler=KC(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(i===0&&(So(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new Yt.Buf8(n.w_size),Yt.arraySet(u,t,r-n.w_size,n.w_size,0),t=u,r=n.w_size),s=e.avail_in,l=e.next_in,c=e.input,e.avail_in=r,e.next_in=0,e.input=t,ra(n);n.lookahead>=Pe;){o=n.strstart,a=n.lookahead-(Pe-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[o+Pe-1])&n.hash_mask,n.prev[o&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=o,o++;while(--a);n.strstart=o,n.lookahead=Pe-1,ra(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=Pe-1,n.match_available=0,e.next_in=l,e.input=c,e.avail_in=s,n.wrap=i,pn}hn.deflateInit=mj;hn.deflateInit2=XC;hn.deflateReset=YC;hn.deflateResetKeep=JC;hn.deflateSetHeader=hj;hn.deflate=gj;hn.deflateEnd=yj;hn.deflateSetDictionary=bj;hn.deflateInfo="pako deflate (from Nodeca project)"});var mg=O(Si=>{"use strict";var vd=Gn(),eE=!0,tE=!0;try{String.fromCharCode.apply(null,[0])}catch{eE=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{tE=!1}var gl=new vd.Buf8(256);for(Hn=0;Hn<256;Hn++)gl[Hn]=Hn>=252?6:Hn>=248?5:Hn>=240?4:Hn>=224?3:Hn>=192?2:1;var Hn;gl[254]=gl[254]=1;Si.string2buf=function(e){var t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)r=e.charCodeAt(o),(r&64512)===55296&&o+1<i&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new vd.Buf8(s),a=0,o=0;a<s;o++)r=e.charCodeAt(o),(r&64512)===55296&&o+1<i&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function rE(e,t){if(t<65534&&(e.subarray&&tE||!e.subarray&&eE))return String.fromCharCode.apply(null,vd.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Si.buf2binstring=function(e){return rE(e,e.length)};Si.binstring2buf=function(e){for(var t=new vd.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};Si.buf2string=function(e,t){var r,n,o,a,i=t||e.length,s=new Array(i*2);for(n=0,r=0;r<i;){if(o=e[r++],o<128){s[n++]=o;continue}if(a=gl[o],a>4){s[n++]=65533,r+=a-1;continue}for(o&=a===2?31:a===3?15:7;a>1&&r<i;)o=o<<6|e[r++]&63,a--;if(a>1){s[n++]=65533;continue}o<65536?s[n++]=o:(o-=65536,s[n++]=55296|o>>10&1023,s[n++]=56320|o&1023)}return rE(s,n)};Si.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+gl[e[r]]>t?r:t}});var gg=O((J9,nE)=>{"use strict";function Tj(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}nE.exports=Tj});var sE=O(Tl=>{"use strict";var yl=QC(),bl=Gn(),bg=mg(),Tg=gd(),Sj=gg(),iE=Object.prototype.toString,xj=0,yg=4,xi=0,oE=1,aE=2,Ij=-1,vj=0,wj=8;function oa(e){if(!(this instanceof oa))return new oa(e);this.options=bl.assign({level:Ij,method:wj,chunkSize:16384,windowBits:15,memLevel:8,strategy:vj,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Sj,this.strm.avail_out=0;var r=yl.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==xi)throw new Error(Tg[r]);if(t.header&&yl.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=bg.string2buf(t.dictionary):iE.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=yl.deflateSetDictionary(this.strm,n),r!==xi)throw new Error(Tg[r]);this._dict_set=!0}}oa.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,o,a;if(this.ended)return!1;a=t===~~t?t:t===!0?yg:xj,typeof e=="string"?r.input=bg.string2buf(e):iE.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new bl.Buf8(n),r.next_out=0,r.avail_out=n),o=yl.deflate(r,a),o!==oE&&o!==xi)return this.onEnd(o),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===yg||a===aE))&&(this.options.to==="string"?this.onData(bg.buf2binstring(bl.shrinkBuf(r.output,r.next_out))):this.onData(bl.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&o!==oE);return a===yg?(o=yl.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===xi):(a===aE&&(this.onEnd(xi),r.avail_out=0),!0)};oa.prototype.onData=function(e){this.chunks.push(e)};oa.prototype.onEnd=function(e){e===xi&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=bl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Sg(e,t){var r=new oa(t);if(r.push(e,!0),r.err)throw r.msg||Tg[r.err];return r.result}function kj(e,t){return t=t||{},t.raw=!0,Sg(e,t)}function _j(e,t){return t=t||{},t.gzip=!0,Sg(e,t)}Tl.Deflate=oa;Tl.deflate=Sg;Tl.deflateRaw=kj;Tl.gzip=_j});var cE=O((X9,lE)=>{"use strict";var wd=30,Cj=12;lE.exports=function(t,r){var n,o,a,i,s,l,c,u,d,f,p,h,y,b,m,g,T,S,I,v,w,k,N,R,F;n=t.state,o=t.next_in,R=t.input,a=o+(t.avail_in-5),i=t.next_out,F=t.output,s=i-(r-t.avail_out),l=i+(t.avail_out-257),c=n.dmax,u=n.wsize,d=n.whave,f=n.wnext,p=n.window,h=n.hold,y=n.bits,b=n.lencode,m=n.distcode,g=(1<<n.lenbits)-1,T=(1<<n.distbits)-1;e:do{y<15&&(h+=R[o++]<<y,y+=8,h+=R[o++]<<y,y+=8),S=b[h&g];t:for(;;){if(I=S>>>24,h>>>=I,y-=I,I=S>>>16&255,I===0)F[i++]=S&65535;else if(I&16){v=S&65535,I&=15,I&&(y<I&&(h+=R[o++]<<y,y+=8),v+=h&(1<<I)-1,h>>>=I,y-=I),y<15&&(h+=R[o++]<<y,y+=8,h+=R[o++]<<y,y+=8),S=m[h&T];r:for(;;){if(I=S>>>24,h>>>=I,y-=I,I=S>>>16&255,I&16){if(w=S&65535,I&=15,y<I&&(h+=R[o++]<<y,y+=8,y<I&&(h+=R[o++]<<y,y+=8)),w+=h&(1<<I)-1,w>c){t.msg="invalid distance too far back",n.mode=wd;break e}if(h>>>=I,y-=I,I=i-s,w>I){if(I=w-I,I>d&&n.sane){t.msg="invalid distance too far back",n.mode=wd;break e}if(k=0,N=p,f===0){if(k+=u-I,I<v){v-=I;do F[i++]=p[k++];while(--I);k=i-w,N=F}}else if(f<I){if(k+=u+f-I,I-=f,I<v){v-=I;do F[i++]=p[k++];while(--I);if(k=0,f<v){I=f,v-=I;do F[i++]=p[k++];while(--I);k=i-w,N=F}}}else if(k+=f-I,I<v){v-=I;do F[i++]=p[k++];while(--I);k=i-w,N=F}for(;v>2;)F[i++]=N[k++],F[i++]=N[k++],F[i++]=N[k++],v-=3;v&&(F[i++]=N[k++],v>1&&(F[i++]=N[k++]))}else{k=i-w;do F[i++]=F[k++],F[i++]=F[k++],F[i++]=F[k++],v-=3;while(v>2);v&&(F[i++]=F[k++],v>1&&(F[i++]=F[k++]))}}else if((I&64)===0){S=m[(S&65535)+(h&(1<<I)-1)];continue r}else{t.msg="invalid distance code",n.mode=wd;break e}break}}else if((I&64)===0){S=b[(S&65535)+(h&(1<<I)-1)];continue t}else if(I&32){n.mode=Cj;break e}else{t.msg="invalid literal/length code",n.mode=wd;break e}break}}while(o<a&&i<l);v=y>>3,o-=v,y-=v<<3,h&=(1<<y)-1,t.next_in=o,t.next_out=i,t.avail_in=o<a?5+(a-o):5-(o-a),t.avail_out=i<l?257+(l-i):257-(i-l),n.hold=h,n.bits=y}});var gE=O((Q9,mE)=>{"use strict";var uE=Gn(),Ii=15,dE=852,fE=592,pE=0,xg=1,hE=2,Ej=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Nj=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Aj=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Pj=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];mE.exports=function(t,r,n,o,a,i,s,l){var c=l.bits,u=0,d=0,f=0,p=0,h=0,y=0,b=0,m=0,g=0,T=0,S,I,v,w,k,N=null,R=0,F,G=new uE.Buf16(Ii+1),B=new uE.Buf16(Ii+1),Z=null,X=0,_e,D,re;for(u=0;u<=Ii;u++)G[u]=0;for(d=0;d<o;d++)G[r[n+d]]++;for(h=c,p=Ii;p>=1&&G[p]===0;p--);if(h>p&&(h=p),p===0)return a[i++]=1<<24|64<<16|0,a[i++]=1<<24|64<<16|0,l.bits=1,0;for(f=1;f<p&&G[f]===0;f++);for(h<f&&(h=f),m=1,u=1;u<=Ii;u++)if(m<<=1,m-=G[u],m<0)return-1;if(m>0&&(t===pE||p!==1))return-1;for(B[1]=0,u=1;u<Ii;u++)B[u+1]=B[u]+G[u];for(d=0;d<o;d++)r[n+d]!==0&&(s[B[r[n+d]]++]=d);if(t===pE?(N=Z=s,F=19):t===xg?(N=Ej,R-=257,Z=Nj,X-=257,F=256):(N=Aj,Z=Pj,F=-1),T=0,d=0,u=f,k=i,y=h,b=0,v=-1,g=1<<h,w=g-1,t===xg&&g>dE||t===hE&&g>fE)return 1;for(;;){_e=u-b,s[d]<F?(D=0,re=s[d]):s[d]>F?(D=Z[X+s[d]],re=N[R+s[d]]):(D=96,re=0),S=1<<u-b,I=1<<y,f=I;do I-=S,a[k+(T>>b)+I]=_e<<24|D<<16|re|0;while(I!==0);for(S=1<<u-1;T&S;)S>>=1;if(S!==0?(T&=S-1,T+=S):T=0,d++,--G[u]===0){if(u===p)break;u=r[n+s[d]]}if(u>h&&(T&w)!==v){for(b===0&&(b=h),k+=f,y=u-b,m=1<<y;y+b<p&&(m-=G[y+b],!(m<=0));)y++,m<<=1;if(g+=1<<y,t===xg&&g>dE||t===hE&&g>fE)return 1;v=T&w,a[v]=h<<24|y<<16|k-i|0}}return T!==0&&(a[k+T]=u-b<<24|64<<16|0),l.bits=h,0}});var YE=O(Zr=>{"use strict";var gr=Gn(),Cg=cg(),mn=ug(),Rj=cE(),Sl=gE(),Mj=0,WE=1,HE=2,yE=4,Fj=5,kd=6,aa=0,Oj=1,Lj=2,Or=-2,VE=-3,Eg=-4,Dj=-5,bE=8,jE=1,TE=2,SE=3,xE=4,IE=5,vE=6,wE=7,kE=8,_E=9,CE=10,Ed=11,Vn=12,Ig=13,EE=14,vg=15,NE=16,AE=17,PE=18,RE=19,_d=20,Cd=21,ME=22,FE=23,OE=24,LE=25,DE=26,wg=27,BE=28,UE=29,ot=30,Ng=31,Bj=32,Uj=852,$j=592,Gj=15,Wj=Gj;function $E(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Hj(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new gr.Buf16(320),this.work=new gr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function qE(e){var t;return!e||!e.state?Or:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=jE,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new gr.Buf32(Uj),t.distcode=t.distdyn=new gr.Buf32($j),t.sane=1,t.back=-1,aa)}function zE(e){var t;return!e||!e.state?Or:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,qE(e))}function KE(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Or:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,zE(e))}function ZE(e,t){var r,n;return e?(n=new Hj,e.state=n,n.window=null,r=KE(e,t),r!==aa&&(e.state=null),r):Or}function Vj(e){return ZE(e,Wj)}var GE=!0,kg,_g;function jj(e){if(GE){var t;for(kg=new gr.Buf32(512),_g=new gr.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Sl(WE,e.lens,0,288,kg,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Sl(HE,e.lens,0,32,_g,0,e.work,{bits:5}),GE=!1}e.lencode=kg,e.lenbits=9,e.distcode=_g,e.distbits=5}function JE(e,t,r,n){var o,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new gr.Buf8(a.wsize)),n>=a.wsize?(gr.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(o=a.wsize-a.wnext,o>n&&(o=n),gr.arraySet(a.window,t,r-n,o,a.wnext),n-=o,n?(gr.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}function qj(e,t){var r,n,o,a,i,s,l,c,u,d,f,p,h,y,b=0,m,g,T,S,I,v,w,k,N=new gr.Buf8(4),R,F,G=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Or;r=e.state,r.mode===Vn&&(r.mode=Ig),i=e.next_out,o=e.output,l=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,c=r.hold,u=r.bits,d=s,f=l,k=aa;e:for(;;)switch(r.mode){case jE:if(r.wrap===0){r.mode=Ig;break}for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(r.wrap&2&&c===35615){r.check=0,N[0]=c&255,N[1]=c>>>8&255,r.check=mn(r.check,N,2,0),c=0,u=0,r.mode=TE;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=ot;break}if((c&15)!==bE){e.msg="unknown compression method",r.mode=ot;break}if(c>>>=4,u-=4,w=(c&15)+8,r.wbits===0)r.wbits=w;else if(w>r.wbits){e.msg="invalid window size",r.mode=ot;break}r.dmax=1<<w,e.adler=r.check=1,r.mode=c&512?CE:Vn,c=0,u=0;break;case TE:for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(r.flags=c,(r.flags&255)!==bE){e.msg="unknown compression method",r.mode=ot;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=ot;break}r.head&&(r.head.text=c>>8&1),r.flags&512&&(N[0]=c&255,N[1]=c>>>8&255,r.check=mn(r.check,N,2,0)),c=0,u=0,r.mode=SE;case SE:for(;u<32;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.head&&(r.head.time=c),r.flags&512&&(N[0]=c&255,N[1]=c>>>8&255,N[2]=c>>>16&255,N[3]=c>>>24&255,r.check=mn(r.check,N,4,0)),c=0,u=0,r.mode=xE;case xE:for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.head&&(r.head.xflags=c&255,r.head.os=c>>8),r.flags&512&&(N[0]=c&255,N[1]=c>>>8&255,r.check=mn(r.check,N,2,0)),c=0,u=0,r.mode=IE;case IE:if(r.flags&1024){for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.length=c,r.head&&(r.head.extra_len=c),r.flags&512&&(N[0]=c&255,N[1]=c>>>8&255,r.check=mn(r.check,N,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=vE;case vE:if(r.flags&1024&&(p=r.length,p>s&&(p=s),p&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),gr.arraySet(r.head.extra,n,a,p,w)),r.flags&512&&(r.check=mn(r.check,n,p,a)),s-=p,a+=p,r.length-=p),r.length))break e;r.length=0,r.mode=wE;case wE:if(r.flags&2048){if(s===0)break e;p=0;do w=n[a+p++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w));while(w&&p<s);if(r.flags&512&&(r.check=mn(r.check,n,p,a)),s-=p,a+=p,w)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=kE;case kE:if(r.flags&4096){if(s===0)break e;p=0;do w=n[a+p++],r.head&&w&&r.length<65536&&(r.head.comment+=String.fromCharCode(w));while(w&&p<s);if(r.flags&512&&(r.check=mn(r.check,n,p,a)),s-=p,a+=p,w)break e}else r.head&&(r.head.comment=null);r.mode=_E;case _E:if(r.flags&512){for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(c!==(r.check&65535)){e.msg="header crc mismatch",r.mode=ot;break}c=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Vn;break;case CE:for(;u<32;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}e.adler=r.check=$E(c),c=0,u=0,r.mode=Ed;case Ed:if(r.havedict===0)return e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,Lj;e.adler=r.check=1,r.mode=Vn;case Vn:if(t===Fj||t===kd)break e;case Ig:if(r.last){c>>>=u&7,u-=u&7,r.mode=wg;break}for(;u<3;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}switch(r.last=c&1,c>>>=1,u-=1,c&3){case 0:r.mode=EE;break;case 1:if(jj(r),r.mode=_d,t===kd){c>>>=2,u-=2;break e}break;case 2:r.mode=AE;break;case 3:e.msg="invalid block type",r.mode=ot}c>>>=2,u-=2;break;case EE:for(c>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",r.mode=ot;break}if(r.length=c&65535,c=0,u=0,r.mode=vg,t===kd)break e;case vg:r.mode=NE;case NE:if(p=r.length,p){if(p>s&&(p=s),p>l&&(p=l),p===0)break e;gr.arraySet(o,n,a,p,i),s-=p,a+=p,l-=p,i+=p,r.length-=p;break}r.mode=Vn;break;case AE:for(;u<14;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(r.nlen=(c&31)+257,c>>>=5,u-=5,r.ndist=(c&31)+1,c>>>=5,u-=5,r.ncode=(c&15)+4,c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=ot;break}r.have=0,r.mode=PE;case PE:for(;r.have<r.ncode;){for(;u<3;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.lens[G[r.have++]]=c&7,c>>>=3,u-=3}for(;r.have<19;)r.lens[G[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,R={bits:r.lenbits},k=Sl(Mj,r.lens,0,19,r.lencode,0,r.work,R),r.lenbits=R.bits,k){e.msg="invalid code lengths set",r.mode=ot;break}r.have=0,r.mode=RE;case RE:for(;r.have<r.nlen+r.ndist;){for(;b=r.lencode[c&(1<<r.lenbits)-1],m=b>>>24,g=b>>>16&255,T=b&65535,!(m<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(T<16)c>>>=m,u-=m,r.lens[r.have++]=T;else{if(T===16){for(F=m+2;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(c>>>=m,u-=m,r.have===0){e.msg="invalid bit length repeat",r.mode=ot;break}w=r.lens[r.have-1],p=3+(c&3),c>>>=2,u-=2}else if(T===17){for(F=m+3;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}c>>>=m,u-=m,w=0,p=3+(c&7),c>>>=3,u-=3}else{for(F=m+7;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}c>>>=m,u-=m,w=0,p=11+(c&127),c>>>=7,u-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=ot;break}for(;p--;)r.lens[r.have++]=w}}if(r.mode===ot)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=ot;break}if(r.lenbits=9,R={bits:r.lenbits},k=Sl(WE,r.lens,0,r.nlen,r.lencode,0,r.work,R),r.lenbits=R.bits,k){e.msg="invalid literal/lengths set",r.mode=ot;break}if(r.distbits=6,r.distcode=r.distdyn,R={bits:r.distbits},k=Sl(HE,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,R),r.distbits=R.bits,k){e.msg="invalid distances set",r.mode=ot;break}if(r.mode=_d,t===kd)break e;case _d:r.mode=Cd;case Cd:if(s>=6&&l>=258){e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,Rj(e,f),i=e.next_out,o=e.output,l=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,c=r.hold,u=r.bits,r.mode===Vn&&(r.back=-1);break}for(r.back=0;b=r.lencode[c&(1<<r.lenbits)-1],m=b>>>24,g=b>>>16&255,T=b&65535,!(m<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(g&&(g&240)===0){for(S=m,I=g,v=T;b=r.lencode[v+((c&(1<<S+I)-1)>>S)],m=b>>>24,g=b>>>16&255,T=b&65535,!(S+m<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}c>>>=S,u-=S,r.back+=S}if(c>>>=m,u-=m,r.back+=m,r.length=T,g===0){r.mode=DE;break}if(g&32){r.back=-1,r.mode=Vn;break}if(g&64){e.msg="invalid literal/length code",r.mode=ot;break}r.extra=g&15,r.mode=ME;case ME:if(r.extra){for(F=r.extra;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=FE;case FE:for(;b=r.distcode[c&(1<<r.distbits)-1],m=b>>>24,g=b>>>16&255,T=b&65535,!(m<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if((g&240)===0){for(S=m,I=g,v=T;b=r.distcode[v+((c&(1<<S+I)-1)>>S)],m=b>>>24,g=b>>>16&255,T=b&65535,!(S+m<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}c>>>=S,u-=S,r.back+=S}if(c>>>=m,u-=m,r.back+=m,g&64){e.msg="invalid distance code",r.mode=ot;break}r.offset=T,r.extra=g&15,r.mode=OE;case OE:if(r.extra){for(F=r.extra;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=ot;break}r.mode=LE;case LE:if(l===0)break e;if(p=f-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=ot;break}p>r.wnext?(p-=r.wnext,h=r.wsize-p):h=r.wnext-p,p>r.length&&(p=r.length),y=r.window}else y=o,h=i-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do o[i++]=y[h++];while(--p);r.length===0&&(r.mode=Cd);break;case DE:if(l===0)break e;o[i++]=r.length,l--,r.mode=Cd;break;case wg:if(r.wrap){for(;u<32;){if(s===0)break e;s--,c|=n[a++]<<u,u+=8}if(f-=l,e.total_out+=f,r.total+=f,f&&(e.adler=r.check=r.flags?mn(r.check,o,f,i-f):Cg(r.check,o,f,i-f)),f=l,(r.flags?c:$E(c))!==r.check){e.msg="incorrect data check",r.mode=ot;break}c=0,u=0}r.mode=BE;case BE:if(r.wrap&&r.flags){for(;u<32;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(c!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=ot;break}c=0,u=0}r.mode=UE;case UE:k=Oj;break e;case ot:k=VE;break e;case Ng:return Eg;case Bj:default:return Or}return e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,(r.wsize||f!==e.avail_out&&r.mode<ot&&(r.mode<wg||t!==yE))&&JE(e,e.output,e.next_out,f-e.avail_out)?(r.mode=Ng,Eg):(d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,r.total+=f,r.wrap&&f&&(e.adler=r.check=r.flags?mn(r.check,o,f,e.next_out-f):Cg(r.check,o,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Vn?128:0)+(r.mode===_d||r.mode===vg?256:0),(d===0&&f===0||t===yE)&&k===aa&&(k=Dj),k)}function zj(e){if(!e||!e.state)return Or;var t=e.state;return t.window&&(t.window=null),e.state=null,aa}function Kj(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Or:(r.head=t,t.done=!1,aa)}function Zj(e,t){var r=t.length,n,o,a;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==Ed)?Or:n.mode===Ed&&(o=1,o=Cg(o,t,r,0),o!==n.check)?VE:(a=JE(e,t,r,r),a?(n.mode=Ng,Eg):(n.havedict=1,aa))}Zr.inflateReset=zE;Zr.inflateReset2=KE;Zr.inflateResetKeep=qE;Zr.inflateInit=Vj;Zr.inflateInit2=ZE;Zr.inflate=qj;Zr.inflateEnd=zj;Zr.inflateGetHeader=Kj;Zr.inflateSetDictionary=Zj;Zr.inflateInfo="pako inflate (from Nodeca project)"});var Ag=O((tY,XE)=>{"use strict";XE.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var eN=O((rY,QE)=>{"use strict";function Jj(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}QE.exports=Jj});var rN=O(Il=>{"use strict";var vi=YE(),xl=Gn(),Nd=mg(),mt=Ag(),Pg=gd(),Yj=gg(),Xj=eN(),tN=Object.prototype.toString;function ia(e){if(!(this instanceof ia))return new ia(e);this.options=xl.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Yj,this.strm.avail_out=0;var r=vi.inflateInit2(this.strm,t.windowBits);if(r!==mt.Z_OK)throw new Error(Pg[r]);if(this.header=new Xj,vi.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Nd.string2buf(t.dictionary):tN.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=vi.inflateSetDictionary(this.strm,t.dictionary),r!==mt.Z_OK)))throw new Error(Pg[r])}ia.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,o=this.options.dictionary,a,i,s,l,c,u=!1;if(this.ended)return!1;i=t===~~t?t:t===!0?mt.Z_FINISH:mt.Z_NO_FLUSH,typeof e=="string"?r.input=Nd.binstring2buf(e):tN.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new xl.Buf8(n),r.next_out=0,r.avail_out=n),a=vi.inflate(r,mt.Z_NO_FLUSH),a===mt.Z_NEED_DICT&&o&&(a=vi.inflateSetDictionary(this.strm,o)),a===mt.Z_BUF_ERROR&&u===!0&&(a=mt.Z_OK,u=!1),a!==mt.Z_STREAM_END&&a!==mt.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===mt.Z_STREAM_END||r.avail_in===0&&(i===mt.Z_FINISH||i===mt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Nd.utf8border(r.output,r.next_out),l=r.next_out-s,c=Nd.buf2string(r.output,s),r.next_out=l,r.avail_out=n-l,l&&xl.arraySet(r.output,r.output,s,l,0),this.onData(c)):this.onData(xl.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&a!==mt.Z_STREAM_END);return a===mt.Z_STREAM_END&&(i=mt.Z_FINISH),i===mt.Z_FINISH?(a=vi.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===mt.Z_OK):(i===mt.Z_SYNC_FLUSH&&(this.onEnd(mt.Z_OK),r.avail_out=0),!0)};ia.prototype.onData=function(e){this.chunks.push(e)};ia.prototype.onEnd=function(e){e===mt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=xl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Rg(e,t){var r=new ia(t);if(r.push(e,!0),r.err)throw r.msg||Pg[r.err];return r.result}function Qj(e,t){return t=t||{},t.raw=!0,Rg(e,t)}Il.Inflate=ia;Il.inflate=Rg;Il.inflateRaw=Qj;Il.ungzip=Rg});var aN=O((oY,oN)=>{"use strict";var e4=Gn().assign,t4=sE(),r4=rN(),n4=Ag(),nN={};e4(nN,t4,r4,n4);oN.exports=nN});var sN=O(Pd=>{"use strict";var o4=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a4=aN(),iN=st(),Ad=mr(),i4=o4?"uint8array":"array";Pd.magic="\b\0";function sa(e,t){Ad.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}iN.inherits(sa,Ad);sa.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(iN.transformTo(i4,e.data),!1)};sa.prototype.flush=function(){Ad.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};sa.prototype.cleanUp=function(){Ad.prototype.cleanUp.call(this),this._pako=null};sa.prototype._createPako=function(){this._pako=new a4[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};Pd.compressWorker=function(e){return new sa("Deflate",e)};Pd.uncompressWorker=function(){return new sa("Inflate",{})}});var Fg=O(Mg=>{"use strict";var lN=mr();Mg.STORE={magic:"\0\0",compressWorker:function(){return new lN("STORE compression")},uncompressWorker:function(){return new lN("STORE decompression")}};Mg.DEFLATE=sN()});var Og=O(la=>{"use strict";la.LOCAL_FILE_HEADER="PK";la.CENTRAL_FILE_HEADER="PK";la.CENTRAL_DIRECTORY_END="PK";la.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";la.ZIP64_CENTRAL_DIRECTORY_END="PK";la.DATA_DESCRIPTOR="PK\x07\b"});var fN=O((lY,dN)=>{"use strict";var wi=st(),ki=mr(),Lg=fi(),cN=dd(),Rd=Og(),Ye=function(e,t){var r="",n;for(n=0;n<t;n++)r+=String.fromCharCode(e&255),e=e>>>8;return r},s4=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},l4=function(e){return(e||0)&63},uN=function(e,t,r,n,o,a){var i=e.file,s=e.compression,l=a!==Lg.utf8encode,c=wi.transformTo("string",a(i.name)),u=wi.transformTo("string",Lg.utf8encode(i.name)),d=i.comment,f=wi.transformTo("string",a(d)),p=wi.transformTo("string",Lg.utf8encode(d)),h=u.length!==i.name.length,y=p.length!==d.length,b,m,g="",T="",S="",I=i.dir,v=i.date,w={crc32:0,compressedSize:0,uncompressedSize:0};(!t||r)&&(w.crc32=e.crc32,w.compressedSize=e.compressedSize,w.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),!l&&(h||y)&&(k|=2048);var N=0,R=0;I&&(N|=16),o==="UNIX"?(R=798,N|=s4(i.unixPermissions,I)):(R=20,N|=l4(i.dosPermissions,I)),b=v.getUTCHours(),b=b<<6,b=b|v.getUTCMinutes(),b=b<<5,b=b|v.getUTCSeconds()/2,m=v.getUTCFullYear()-1980,m=m<<4,m=m|v.getUTCMonth()+1,m=m<<5,m=m|v.getUTCDate(),h&&(T=Ye(1,1)+Ye(cN(c),4)+u,g+="up"+Ye(T.length,2)+T),y&&(S=Ye(1,1)+Ye(cN(f),4)+p,g+="uc"+Ye(S.length,2)+S);var F="";F+=`
93
- \0`,F+=Ye(k,2),F+=s.magic,F+=Ye(b,2),F+=Ye(m,2),F+=Ye(w.crc32,4),F+=Ye(w.compressedSize,4),F+=Ye(w.uncompressedSize,4),F+=Ye(c.length,2),F+=Ye(g.length,2);var G=Rd.LOCAL_FILE_HEADER+F+c+g,B=Rd.CENTRAL_FILE_HEADER+Ye(R,2)+F+Ye(f.length,2)+"\0\0\0\0"+Ye(N,4)+Ye(n,4)+c+g+f;return{fileRecord:G,dirRecord:B}},c4=function(e,t,r,n,o){var a="",i=wi.transformTo("string",o(n));return a=Rd.CENTRAL_DIRECTORY_END+"\0\0\0\0"+Ye(e,2)+Ye(e,2)+Ye(t,4)+Ye(r,4)+Ye(i.length,2)+i,a},u4=function(e){var t="";return t=Rd.DATA_DESCRIPTOR+Ye(e.crc32,4)+Ye(e.compressedSize,4)+Ye(e.uncompressedSize,4),t};function Jr(e,t,r,n){ki.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}wi.inherits(Jr,ki);Jr.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,ki.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))};Jr.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=uN(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0};Jr.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=uN(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:u4(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};Jr.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,n=c4(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})};Jr.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()};Jr.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(r){t.processChunk(r)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(r){t.error(r)}),this};Jr.prototype.resume=function(){if(!ki.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};Jr.prototype.error=function(e){var t=this._sources;if(!ki.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch{}return!0};Jr.prototype.lock=function(){ki.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()};dN.exports=Jr});var hN=O(pN=>{"use strict";var d4=Fg(),f4=fN(),p4=function(e,t){var r=e||t,n=d4[r];if(!n)throw new Error(r+" is not a valid compression method !");return n};pN.generateWorker=function(e,t,r){var n=new f4(t.streamFiles,r,t.platform,t.encodeFileName),o=0;try{e.forEach(function(a,i){o++;var s=p4(i.options.compression,t.compression),l=i.options.compressionOptions||t.compressionOptions||{},c=i.dir,u=i.date;i._compressWorker(s,l).withStreamInfo("file",{name:a,dir:c,date:u,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(n)}),n.entriesCount=o}catch(a){n.error(a)}return n}});var gN=O((uY,mN)=>{"use strict";var h4=st(),Md=mr();function vl(e,t){Md.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}h4.inherits(vl,Md);vl.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(r){t.push({data:r,meta:{percent:0}})}).on("error",function(r){t.isPaused?this.generatedError=r:t.error(r)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})};vl.prototype.pause=function(){return Md.prototype.pause.call(this)?(this._stream.pause(),!0):!1};vl.prototype.resume=function(){return Md.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};mN.exports=vl});var _N=O((dY,kN)=>{"use strict";var m4=fi(),wl=st(),SN=mr(),g4=Gm(),xN=Wm(),yN=fd(),y4=bC(),b4=hN(),bN=Qs(),T4=gN(),IN=function(e,t,r){var n=wl.getTypeOf(t),o,a=wl.extend(r||{},xN);a.date=a.date||new Date,a.compression!==null&&(a.compression=a.compression.toUpperCase()),typeof a.unixPermissions=="string"&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&a.unixPermissions&16384&&(a.dir=!0),a.dosPermissions&&a.dosPermissions&16&&(a.dir=!0),a.dir&&(e=vN(e)),a.createFolders&&(o=S4(e))&&wN.call(this,o,!0);var i=n==="string"&&a.binary===!1&&a.base64===!1;(!r||typeof r.binary>"u")&&(a.binary=!i);var s=t instanceof yN&&t.uncompressedSize===0;(s||a.dir||!t||t.length===0)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",n="string");var l=null;t instanceof yN||t instanceof SN?l=t:bN.isNode&&bN.isStream(t)?l=new T4(e,t):l=wl.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var c=new y4(e,l,a);this.files[e]=c},S4=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},vN=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},wN=function(e,t){return t=typeof t<"u"?t:xN.createFolders,e=vN(e),this.files[e]||IN.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function TN(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var x4={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach(function(r,n){e(r,n)&&t.push(n)}),t},file:function(e,t,r){if(arguments.length===1)if(TN(e)){var n=e;return this.filter(function(a,i){return!i.dir&&n.test(a)})}else{var o=this.files[this.root+e];return o&&!o.dir?o:null}else e=this.root+e,IN.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(TN(e))return this.filter(function(o,a){return a.dir&&e.test(o)});var t=this.root+e,r=wN.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(e.slice(-1)!=="/"&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(o,a){return a.name.slice(0,e.length)===e}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if(r=wl.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:m4.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),r.type==="binarystring"&&(r.type="string"),!r.type)throw new Error("No output type specified.");wl.checkSupport(r.type),(r.platform==="darwin"||r.platform==="freebsd"||r.platform==="linux"||r.platform==="sunos")&&(r.platform="UNIX"),r.platform==="win32"&&(r.platform="DOS");var n=r.comment||this.comment||"";t=b4.generateWorker(this,r,n)}catch(o){t=new SN("error"),t.error(o)}return new g4(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};kN.exports=x4});var Dg=O((fY,EN)=>{"use strict";var I4=st();function CN(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}CN.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t=0,r;for(this.checkOffset(e),r=this.index+e-1;r>=this.index;r--)t=(t<<8)+this.byteAt(r);return this.index+=e,t},readString:function(e){return I4.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};EN.exports=CN});var Bg=O((pY,AN)=>{"use strict";var NN=Dg(),v4=st();function _i(e){NN.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255}v4.inherits(_i,NN);_i.prototype.byteAt=function(e){return this.data[this.zero+e]};_i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===o)return a-this.zero;return-1};_i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&r===a[1]&&n===a[2]&&o===a[3]};_i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};AN.exports=_i});var MN=O((hY,RN)=>{"use strict";var PN=Dg(),w4=st();function Ci(e){PN.call(this,e)}w4.inherits(Ci,PN);Ci.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};Ci.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};Ci.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};Ci.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};RN.exports=Ci});var $g=O((mY,ON)=>{"use strict";var FN=Bg(),k4=st();function Ug(e){FN.call(this,e)}k4.inherits(Ug,FN);Ug.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};ON.exports=Ug});var BN=O((gY,DN)=>{"use strict";var LN=$g(),_4=st();function Gg(e){LN.call(this,e)}_4.inherits(Gg,LN);Gg.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};DN.exports=Gg});var Wg=O((yY,$N)=>{"use strict";var Fd=st(),UN=Un(),C4=Bg(),E4=MN(),N4=BN(),A4=$g();$N.exports=function(e){var t=Fd.getTypeOf(e);return Fd.checkSupport(t),t==="string"&&!UN.uint8array?new E4(e):t==="nodebuffer"?new N4(e):UN.uint8array?new A4(Fd.transformTo("uint8array",e)):new C4(Fd.transformTo("array",e))}});var VN=O((bY,HN)=>{"use strict";var Hg=Wg(),wo=st(),P4=fd(),GN=dd(),Od=fi(),Ld=Fg(),R4=Un(),M4=0,F4=3,O4=function(e){for(var t in Ld)if(Object.prototype.hasOwnProperty.call(Ld,t)&&Ld[t].magic===e)return Ld[t];return null};function WN(e,t){this.options=e,this.loadOptions=t}WN.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=O4(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+wo.pretty(this.compressionMethod)+" unknown (inner file : "+wo.transformTo("string",this.fileName)+")");this.decompressed=new P4(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===M4&&(this.dosPermissions=this.externalFileAttributes&63),e===F4&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=Hg(this.extraFields[1].value);this.uncompressedSize===wo.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===wo.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===wo.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===wo.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,r,n,o;for(this.extraFields||(this.extraFields={});e.index+4<t;)r=e.readInt(2),n=e.readInt(2),o=e.readData(n),this.extraFields[r]={id:r,length:n,value:o};e.setIndex(t)},handleUTF8:function(){var e=R4.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=Od.utf8decode(this.fileName),this.fileCommentStr=Od.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else{var r=wo.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(n!==null)this.fileCommentStr=n;else{var o=wo.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=Hg(e.value);return t.readInt(1)!==1||GN(this.fileName)!==t.readInt(4)?null:Od.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=Hg(e.value);return t.readInt(1)!==1||GN(this.fileComment)!==t.readInt(4)?null:Od.utf8decode(t.readData(e.length-5))}return null}};HN.exports=WN});var zN=O((TY,qN)=>{"use strict";var L4=Wg(),jn=st(),Yr=Og(),D4=VN(),B4=Un();function jN(e){this.files=[],this.loadOptions=e}jN.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+jn.pretty(t)+", expected "+jn.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4),o=n===t;return this.reader.setIndex(r),o},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=B4.uint8array?"uint8array":"array",r=jn.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,t=0,r,n,o;t<e;)r=this.reader.readInt(2),n=this.reader.readInt(4),o=this.reader.readData(n),this.zip64ExtensibleData[r]={id:r,length:n,value:o}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(Yr.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(Yr.CENTRAL_FILE_HEADER);)e=new D4({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(Yr.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,Yr.LOCAL_FILE_HEADER);throw t?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var r=e;if(this.checkSignature(Yr.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===jn.MAX_VALUE_16BITS||this.diskWithCentralDirStart===jn.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===jn.MAX_VALUE_16BITS||this.centralDirRecords===jn.MAX_VALUE_16BITS||this.centralDirSize===jn.MAX_VALUE_32BITS||this.centralDirOffset===jn.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(Yr.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(Yr.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,Yr.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(Yr.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(Yr.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var o=r-n;if(o>0)this.isSignature(r,Yr.CENTRAL_FILE_HEADER)||(this.reader.zero=o);else if(o<0)throw new Error("Corrupted zip: missing "+Math.abs(o)+" bytes.")},prepareReader:function(e){this.reader=L4(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};qN.exports=jN});var JN=O((SY,ZN)=>{"use strict";var Vg=st(),Dd=ci(),U4=fi(),$4=zN(),G4=jm(),KN=Qs();function W4(e){return new Dd.Promise(function(t,r){var n=e.decompressed.getContentWorker().pipe(new G4);n.on("error",function(o){r(o)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}ZN.exports=function(e,t){var r=this;return t=Vg.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:U4.utf8decode}),KN.isNode&&KN.isStream(e)?Dd.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):Vg.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(n){var o=new $4(t);return o.load(n),o}).then(function(o){var a=[Dd.Promise.resolve(o)],i=o.files;if(t.checkCRC32)for(var s=0;s<i.length;s++)a.push(W4(i[s]));return Dd.Promise.all(a)}).then(function(o){for(var a=o.shift(),i=a.files,s=0;s<i.length;s++){var l=i[s],c=l.fileNameStr,u=Vg.resolve(l.fileNameStr);r.file(u,l.decompressed,{binary:!0,optimizedBinaryString:!0,date:l.date,dir:l.dir,comment:l.fileCommentStr.length?l.fileCommentStr:null,unixPermissions:l.unixPermissions,dosPermissions:l.dosPermissions,createFolders:t.createFolders}),l.dir||(r.file(u).unsafeOriginalName=c)}return a.zipComment.length&&(r.comment=a.zipComment),r})}});var XN=O((xY,YN)=>{"use strict";function Lr(){if(!(this instanceof Lr))return new Lr;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new Lr;for(var t in this)typeof this[t]!="function"&&(e[t]=this[t]);return e}}Lr.prototype=_N();Lr.prototype.loadAsync=JN();Lr.support=Un();Lr.defaults=Wm();Lr.version="3.10.1";Lr.loadAsync=function(e,t){return new Lr().loadAsync(e,t)};Lr.external=ci();YN.exports=Lr});var lA=O((DY,sA)=>{sA.exports=hq;function hq(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}});var MP=ce(require("path")),FP=ce(require("os"));var ab=ce(ob(),1),{program:m6,createCommand:g6,createArgument:y6,createOption:b6,CommanderError:T6,InvalidArgumentError:S6,InvalidOptionArgumentError:x6,Command:ib,Argument:I6,Option:Sn,Help:v6}=ab.default;var sb=`profiler-cli: Usage Guide
92
+ `)};e.defaults=D,e.createLogger=v,e.logger=re,e.default=re,Object.defineProperty(e,"__esModule",{value:!0})})});var js=O((f9,am)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?am.exports={nextTick:gW}:am.exports=process;function gW(e,t,r,n){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var o=arguments.length,a,i;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,r)});case 4:return process.nextTick(function(){e.call(null,t,r,n)});default:for(a=new Array(o-1),i=0;i<a.length;)a[i++]=arguments[i];return process.nextTick(function(){e.apply(null,a)})}}});var W_=O((p9,G_)=>{var yW={}.toString;G_.exports=Array.isArray||function(e){return yW.call(e)=="[object Array]"}});var im=O((h9,H_)=>{H_.exports=require("stream")});var qs=O((sm,j_)=>{var Xu=require("buffer"),Ln=Xu.Buffer;function V_(e,t){for(var r in e)t[r]=e[r]}Ln.from&&Ln.alloc&&Ln.allocUnsafe&&Ln.allocUnsafeSlow?j_.exports=Xu:(V_(Xu,sm),sm.Buffer=ri);function ri(e,t,r){return Ln(e,t,r)}V_(Ln,ri);ri.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Ln(e,t,r)};ri.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Ln(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};ri.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ln(e)};ri.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Xu.SlowBuffer(e)}});var ni=O(Vt=>{function bW(e){return Array.isArray?Array.isArray(e):Qu(e)==="[object Array]"}Vt.isArray=bW;function TW(e){return typeof e=="boolean"}Vt.isBoolean=TW;function SW(e){return e===null}Vt.isNull=SW;function xW(e){return e==null}Vt.isNullOrUndefined=xW;function IW(e){return typeof e=="number"}Vt.isNumber=IW;function vW(e){return typeof e=="string"}Vt.isString=vW;function wW(e){return typeof e=="symbol"}Vt.isSymbol=wW;function kW(e){return e===void 0}Vt.isUndefined=kW;function _W(e){return Qu(e)==="[object RegExp]"}Vt.isRegExp=_W;function CW(e){return typeof e=="object"&&e!==null}Vt.isObject=CW;function EW(e){return Qu(e)==="[object Date]"}Vt.isDate=EW;function NW(e){return Qu(e)==="[object Error]"||e instanceof Error}Vt.isError=NW;function AW(e){return typeof e=="function"}Vt.isFunction=AW;function PW(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}Vt.isPrimitive=PW;Vt.isBuffer=require("buffer").Buffer.isBuffer;function Qu(e){return Object.prototype.toString.call(e)}});var q_=O((g9,lm)=>{typeof Object.create=="function"?lm.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:lm.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var oi=O((y9,um)=>{try{if(cm=require("util"),typeof cm.inherits!="function")throw"";um.exports=cm.inherits}catch{um.exports=q_()}var cm});var K_=O((b9,dm)=>{"use strict";function RW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var z_=qs().Buffer,zs=require("util");function MW(e,t,r){e.copy(t,r)}dm.exports=(function(){function e(){RW(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=r+n.data;return o},e.prototype.concat=function(r){if(this.length===0)return z_.alloc(0);if(this.length===1)return this.head.data;for(var n=z_.allocUnsafe(r>>>0),o=this.head,a=0;o;)MW(o.data,n,a),a+=o.data.length,o=o.next;return n},e})();zs&&zs.inspect&&zs.inspect.custom&&(dm.exports.prototype[zs.inspect.custom]=function(){var e=zs.inspect({length:this.length});return this.constructor.name+" "+e})});var fm=O((T9,Y_)=>{"use strict";var Z_=js();function FW(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(!this._writableState||!this._writableState.errorEmitted)&&Z_.nextTick(J_,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?(Z_.nextTick(J_,r,a),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(a)}),this)}function OW(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function J_(e,t){e.emit("error",t)}Y_.exports={destroy:FW,undestroy:OW}});var Q_=O((S9,X_)=>{X_.exports=require("util").deprecate});var hm=O((x9,s0)=>{"use strict";var Jo=js();s0.exports=St;function t0(e){var t=this;this.next=null,this.entry=null,this.finish=function(){QW(t,e)}}var LW=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Jo.nextTick,ai;St.WritableState=Zs;var r0=Object.create(ni());r0.inherits=oi();var DW={deprecate:Q_()},n0=im(),td=qs().Buffer,BW=global.Uint8Array||function(){};function UW(e){return td.from(e)}function $W(e){return td.isBuffer(e)||e instanceof BW}var o0=fm();r0.inherits(St,n0);function GW(){}function Zs(e,t){ai=ai||Yo(),e=e||{};var r=t instanceof ai;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(o||o===0)?this.highWaterMark=o:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){KW(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new t0(this)}Zs.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Zs.prototype,"buffer",{get:DW.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ed;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ed=Function.prototype[Symbol.hasInstance],Object.defineProperty(St,Symbol.hasInstance,{value:function(e){return ed.call(this,e)?!0:this!==St?!1:e&&e._writableState instanceof Zs}})):ed=function(e){return e instanceof this};function St(e){if(ai=ai||Yo(),!ed.call(St,this)&&!(this instanceof ai))return new St(e);this._writableState=new Zs(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),n0.call(this)}St.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function WW(e,t){var r=new Error("write after end");e.emit("error",r),Jo.nextTick(t,r)}function HW(e,t,r,n){var o=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Jo.nextTick(n,a),o=!1),o}St.prototype.write=function(e,t,r){var n=this._writableState,o=!1,a=!n.objectMode&&$W(e);return a&&!td.isBuffer(e)&&(e=UW(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=GW),n.ended?WW(this,r):(a||HW(this,n,e,r))&&(n.pendingcb++,o=jW(this,n,a,e,t,r)),o};St.prototype.cork=function(){var e=this._writableState;e.corked++};St.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest&&a0(this,e))};St.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function VW(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=td.from(t,r)),t}Object.defineProperty(St.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function jW(e,t,r,n,o,a){if(!r){var i=VW(t,n,o);n!==i&&(r=!0,o="buffer",n=i)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else pm(e,t,!1,s,n,o,a);return l}function pm(e,t,r,n,o,a,i){t.writelen=n,t.writecb=i,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,a,t.onwrite),t.sync=!1}function qW(e,t,r,n,o){--t.pendingcb,r?(Jo.nextTick(o,n),Jo.nextTick(Ks,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),Ks(e,t))}function zW(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function KW(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(zW(r),t)qW(e,r,n,t,o);else{var a=i0(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&a0(e,r),n?LW(e0,e,r,a,o):e0(e,r,a,o)}}function e0(e,t,r,n){r||ZW(e,t),t.pendingcb--,n(),Ks(e,t)}function ZW(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function a0(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var i=0,s=!0;r;)o[i]=r,r.isBuf||(s=!1),r=r.next,i+=1;o.allBuffers=s,pm(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new t0(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,u=r.callback,d=t.objectMode?1:l.length;if(pm(e,t,!1,d,l,c,u),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}St.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};St.prototype._writev=null;St.prototype.end=function(e,t,r){var n=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),!n.ending&&!n.finished&&XW(this,n,r)};function i0(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function JW(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),Ks(e,t)})}function YW(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,Jo.nextTick(JW,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Ks(e,t){var r=i0(t);return r&&(YW(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function XW(e,t,r){t.ending=!0,Ks(e,t),r&&(t.finished?Jo.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function QW(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}Object.defineProperty(St.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});St.prototype.destroy=o0.destroy;St.prototype._undestroy=o0.undestroy;St.prototype._destroy=function(e,t){this.end(),t(e)}});var Yo=O((I9,d0)=>{"use strict";var l0=js(),eH=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};d0.exports=Dn;var c0=Object.create(ni());c0.inherits=oi();var u0=ym(),gm=hm();c0.inherits(Dn,u0);for(mm=eH(gm.prototype),rd=0;rd<mm.length;rd++)nd=mm[rd],Dn.prototype[nd]||(Dn.prototype[nd]=gm.prototype[nd]);var mm,nd,rd;function Dn(e){if(!(this instanceof Dn))return new Dn(e);u0.call(this,e),gm.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",tH)}Object.defineProperty(Dn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function tH(){this.allowHalfOpen||this._writableState.ended||l0.nextTick(rH,this)}function rH(e){e.end()}Object.defineProperty(Dn.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});Dn.prototype._destroy=function(e,t){this.push(null),this.end(),l0.nextTick(t,e)}});var Sm=O(p0=>{"use strict";var Tm=qs().Buffer,f0=Tm.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function nH(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function oH(e){var t=nH(e);if(typeof t!="string"&&(Tm.isEncoding===f0||!f0(e)))throw new Error("Unknown encoding: "+e);return t||e}p0.StringDecoder=Js;function Js(e){this.encoding=oH(e);var t;switch(this.encoding){case"utf16le":this.text=uH,this.end=dH,t=4;break;case"utf8":this.fillLast=sH,t=4;break;case"base64":this.text=fH,this.end=pH,t=3;break;default:this.write=hH,this.end=mH;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Tm.allocUnsafe(t)}Js.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Js.prototype.end=cH;Js.prototype.text=lH;Js.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function bm(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function aH(e,t,r){var n=t.length-1;if(n<r)return 0;var o=bm(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||o===-2?0:(o=bm(t[n]),o>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||o===-2?0:(o=bm(t[n]),o>=0?(o>0&&(o===2?o=0:e.lastNeed=o-3),o):0))}function iH(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function sH(e){var t=this.lastTotal-this.lastNeed,r=iH(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function lH(e,t){var r=aH(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function cH(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function uH(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function dH(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function fH(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function pH(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function hH(e){return e.toString(this.encoding)}function mH(e){return e&&e.length?this.write(e):""}});var ym=O((k9,k0)=>{"use strict";var si=js();k0.exports=Qe;var gH=W_(),Ys;Qe.ReadableState=S0;var w9=require("events").EventEmitter,y0=function(e,t){return e.listeners(t).length},km=im(),Xs=qs().Buffer,yH=global.Uint8Array||function(){};function bH(e){return Xs.from(e)}function TH(e){return Xs.isBuffer(e)||e instanceof yH}var b0=Object.create(ni());b0.inherits=oi();var xm=require("util"),We=void 0;xm&&xm.debuglog?We=xm.debuglog("stream"):We=function(){};var SH=K_(),T0=fm(),ii;b0.inherits(Qe,km);var Im=["error","close","destroy","pause","resume"];function xH(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):gH(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function S0(e,t){Ys=Ys||Yo(),e=e||{};var r=t instanceof Ys;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(o||o===0)?this.highWaterMark=o:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new SH,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ii||(ii=Sm().StringDecoder),this.decoder=new ii(e.encoding),this.encoding=e.encoding)}function Qe(e){if(Ys=Ys||Yo(),!(this instanceof Qe))return new Qe(e);this._readableState=new S0(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),km.call(this)}Object.defineProperty(Qe.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Qe.prototype.destroy=T0.destroy;Qe.prototype._undestroy=T0.undestroy;Qe.prototype._destroy=function(e,t){this.push(null),t(e)};Qe.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Xs.from(e,t),t=""),n=!0),x0(this,e,t,!1,n)};Qe.prototype.unshift=function(e){return x0(this,e,null,!0,!1)};function x0(e,t,r,n,o){var a=e._readableState;if(t===null)a.reading=!1,kH(e,a);else{var i;o||(i=IH(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Xs.prototype&&(t=bH(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):vm(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?vm(e,a,t,!1):I0(e,a)):vm(e,a,t,!1))):n||(a.reading=!1)}return vH(a)}function vm(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&od(e)),I0(e,t)}function IH(e,t){var r;return!TH(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function vH(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Qe.prototype.isPaused=function(){return this._readableState.flowing===!1};Qe.prototype.setEncoding=function(e){return ii||(ii=Sm().StringDecoder),this._readableState.decoder=new ii(e),this._readableState.encoding=e,this};var h0=8388608;function wH(e){return e>=h0?e=h0:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function m0(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=wH(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Qe.prototype.read=function(e){We("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return We("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?wm(this):od(this),null;if(e=m0(e,t),e===0&&t.ended)return t.length===0&&wm(this),null;var n=t.needReadable;We("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,We("length less than watermark",n)),t.ended||t.reading?(n=!1,We("reading or ended",n)):n&&(We("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=m0(r,t)));var o;return e>0?o=v0(e,t):o=null,o===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&wm(this)),o!==null&&this.emit("data",o),o};function kH(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,od(e)}}function od(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(We("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?si.nextTick(g0,e):g0(e))}function g0(e){We("emit readable"),e.emit("readable"),_m(e)}function I0(e,t){t.readingMore||(t.readingMore=!0,si.nextTick(_H,e,t))}function _H(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(We("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}Qe.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Qe.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,We("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=o?s:b;n.endEmitted?si.nextTick(a):r.once("end",a),e.on("unpipe",i);function i(g,m){We("onunpipe"),g===r&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,u())}function s(){We("onend"),e.end()}var l=CH(r);e.on("drain",l);var c=!1;function u(){We("cleanup"),e.removeListener("close",h),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",i),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",f),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}var d=!1;r.on("data",f);function f(g){We("ondata"),d=!1;var m=e.write(g);m===!1&&!d&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&w0(n.pipes,e)!==-1)&&!c&&(We("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function p(g){We("onerror",g),b(),e.removeListener("error",p),y0(e,"error")===0&&e.emit("error",g)}xH(e,"error",p);function h(){e.removeListener("finish",y),b()}e.once("close",h);function y(){We("onfinish"),e.removeListener("close",h),b()}e.once("finish",y);function b(){We("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(We("pipe resume"),r.resume()),e};function CH(e){return function(){var t=e._readableState;We("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&y0(e,"data")&&(t.flowing=!0,_m(e))}}Qe.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)n[a].emit("unpipe",this,r);return this}var i=w0(t.pipes,e);return i===-1?this:(t.pipes.splice(i,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Qe.prototype.on=function(e,t){var r=km.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&od(this):si.nextTick(EH,this))}return r};Qe.prototype.addListener=Qe.prototype.on;function EH(e){We("readable nexttick read 0"),e.read(0)}Qe.prototype.resume=function(){var e=this._readableState;return e.flowing||(We("resume"),e.flowing=!0,NH(this,e)),this};function NH(e,t){t.resumeScheduled||(t.resumeScheduled=!0,si.nextTick(AH,e,t))}function AH(e,t){t.reading||(We("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),_m(e),t.flowing&&!t.reading&&e.read(0)}Qe.prototype.pause=function(){return We("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(We("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function _m(e){var t=e._readableState;for(We("flow",t.flowing);t.flowing&&e.read()!==null;);}Qe.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(We("wrapped end"),r.decoder&&!r.ended){var i=r.decoder.end();i&&i.length&&t.push(i)}t.push(null)}),e.on("data",function(i){if(We("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!(r.objectMode&&i==null)&&!(!r.objectMode&&(!i||!i.length))){var s=t.push(i);s||(n=!0,e.pause())}});for(var o in e)this[o]===void 0&&typeof e[o]=="function"&&(this[o]=(function(i){return function(){return e[i].apply(e,arguments)}})(o));for(var a=0;a<Im.length;a++)e.on(Im[a],this.emit.bind(this,Im[a]));return this._read=function(i){We("wrapped _read",i),n&&(n=!1,e.resume())},this};Object.defineProperty(Qe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Qe._fromList=v0;function v0(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=PH(e,t.buffer,t.decoder),r}function PH(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?n=t.shift():n=r?RH(e,t):MH(e,t),n}function RH(e,t){var r=t.head,n=1,o=r.data;for(e-=o.length;r=r.next;){var a=r.data,i=e>a.length?a.length:e;if(i===a.length?o+=a:o+=a.slice(0,e),e-=i,e===0){i===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(i));break}++n}return t.length-=n,o}function MH(e,t){var r=Xs.allocUnsafe(e),n=t.head,o=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var a=n.data,i=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,i),e-=i,e===0){i===a.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(i));break}++o}return t.length-=o,r}function wm(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,si.nextTick(FH,t,e))}function FH(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function w0(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var Cm=O((_9,E0)=>{"use strict";E0.exports=Bn;var ad=Yo(),C0=Object.create(ni());C0.inherits=oi();C0.inherits(Bn,ad);function OH(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function Bn(e){if(!(this instanceof Bn))return new Bn(e);ad.call(this,e),this._transformState={afterTransform:OH.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",LH)}function LH(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){_0(e,t,r)}):_0(this,null,null)}Bn.prototype.push=function(e,t){return this._transformState.needTransform=!1,ad.prototype.push.call(this,e,t)};Bn.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};Bn.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};Bn.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Bn.prototype._destroy=function(e,t){var r=this;ad.prototype._destroy.call(this,e,function(n){t(n),r.emit("close")})};function _0(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var R0=O((C9,P0)=>{"use strict";P0.exports=Qs;var N0=Cm(),A0=Object.create(ni());A0.inherits=oi();A0.inherits(Qs,N0);function Qs(e){if(!(this instanceof Qs))return new Qs(e);N0.call(this,e)}Qs.prototype._transform=function(e,t,r){r(null,e)}});var Em=O((Mt,id)=>{var cn=require("stream");process.env.READABLE_STREAM==="disable"&&cn?(id.exports=cn,Mt=id.exports=cn.Readable,Mt.Readable=cn.Readable,Mt.Writable=cn.Writable,Mt.Duplex=cn.Duplex,Mt.Transform=cn.Transform,Mt.PassThrough=cn.PassThrough,Mt.Stream=cn):(Mt=id.exports=ym(),Mt.Stream=cn||Mt,Mt.Readable=Mt,Mt.Writable=hm(),Mt.Duplex=Yo(),Mt.Transform=Cm(),Mt.PassThrough=R0())});var Un=O(hr=>{"use strict";hr.base64=!0;hr.array=!0;hr.string=!0;hr.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";hr.nodebuffer=typeof Buffer<"u";hr.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")hr.blob=!1;else{Nm=new ArrayBuffer(0);try{hr.blob=new Blob([Nm],{type:"application/zip"}).size===0}catch{try{M0=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Am=new M0,Am.append(Nm),hr.blob=Am.getBlob("application/zip").size===0}catch{hr.blob=!1}}}var Nm,M0,Am;try{hr.nodestream=!!Em().Readable}catch{hr.nodestream=!1}});var Rm=O(Pm=>{"use strict";var DH=st(),BH=Un(),un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Pm.encode=function(e){for(var t=[],r,n,o,a,i,s,l,c=0,u=e.length,d=u,f=DH.getTypeOf(e)!=="string";c<e.length;)d=u-c,f?(r=e[c++],n=c<u?e[c++]:0,o=c<u?e[c++]:0):(r=e.charCodeAt(c++),n=c<u?e.charCodeAt(c++):0,o=c<u?e.charCodeAt(c++):0),a=r>>2,i=(r&3)<<4|n>>4,s=d>1?(n&15)<<2|o>>6:64,l=d>2?o&63:64,t.push(un.charAt(a)+un.charAt(i)+un.charAt(s)+un.charAt(l));return t.join("")};Pm.decode=function(e){var t,r,n,o,a,i,s,l=0,c=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var d=e.length*3/4;if(e.charAt(e.length-1)===un.charAt(64)&&d--,e.charAt(e.length-2)===un.charAt(64)&&d--,d%1!==0)throw new Error("Invalid base64 input, bad content length.");var f;for(BH.uint8array?f=new Uint8Array(d|0):f=new Array(d|0);l<e.length;)o=un.indexOf(e.charAt(l++)),a=un.indexOf(e.charAt(l++)),i=un.indexOf(e.charAt(l++)),s=un.indexOf(e.charAt(l++)),t=o<<2|a>>4,r=(a&15)<<4|i>>2,n=(i&3)<<6|s,f[c++]=t,i!==64&&(f[c++]=r),s!==64&&(f[c++]=n);return f}});var el=O((A9,F0)=>{"use strict";F0.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}}});var B0=O((P9,D0)=>{"use strict";var O0=global.MutationObserver||global.WebKitMutationObserver,li;process.browser?O0?(Mm=0,L0=new O0(tl),Fm=global.document.createTextNode(""),L0.observe(Fm,{characterData:!0}),li=function(){Fm.data=Mm=++Mm%2}):!global.setImmediate&&typeof global.MessageChannel<"u"?(Om=new global.MessageChannel,Om.port1.onmessage=tl,li=function(){Om.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?li=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){tl(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},global.document.documentElement.appendChild(e)}:li=function(){setTimeout(tl,0)}:li=function(){process.nextTick(tl)};var Mm,L0,Fm,Om,Lm,rl=[];function tl(){Lm=!0;for(var e,t,r=rl.length;r;){for(t=rl,rl=[],e=-1;++e<r;)t[e]();r=rl.length}Lm=!1}D0.exports=UH;function UH(e){rl.push(e)===1&&!Lm&&li()}});var j0=O((R9,V0)=>{"use strict";var U0=B0();function ci(){}var jt={},$0=["REJECTED"],Dm=["FULFILLED"],G0=["PENDING"];process.browser||(nl=["UNHANDLED"]);var nl;V0.exports=ho;function ho(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=G0,this.queue=[],this.outcome=void 0,process.browser||(this.handled=nl),e!==ci&&W0(this,e)}ho.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(r,n);function r(o){function a(){return o}return t.resolve(e()).then(a)}function n(o){function a(){throw o}return t.resolve(e()).then(a)}};ho.prototype.catch=function(e){return this.then(null,e)};ho.prototype.then=function(e,t){if(typeof e!="function"&&this.state===Dm||typeof t!="function"&&this.state===$0)return this;var r=new this.constructor(ci);if(process.browser||this.handled===nl&&(this.handled=null),this.state!==G0){var n=this.state===Dm?e:t;Bm(r,n,this.outcome)}else this.queue.push(new ol(r,e,t));return r};function ol(e,t,r){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}ol.prototype.callFulfilled=function(e){jt.resolve(this.promise,e)};ol.prototype.otherCallFulfilled=function(e){Bm(this.promise,this.onFulfilled,e)};ol.prototype.callRejected=function(e){jt.reject(this.promise,e)};ol.prototype.otherCallRejected=function(e){Bm(this.promise,this.onRejected,e)};function Bm(e,t,r){U0(function(){var n;try{n=t(r)}catch(o){return jt.reject(e,o)}n===e?jt.reject(e,new TypeError("Cannot resolve promise with itself")):jt.resolve(e,n)})}jt.resolve=function(e,t){var r=H0($H,t);if(r.status==="error")return jt.reject(e,r.value);var n=r.value;if(n)W0(e,n);else{e.state=Dm,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e};jt.reject=function(e,t){e.state=$0,e.outcome=t,process.browser||e.handled===nl&&U0(function(){e.handled===nl&&process.emit("unhandledRejection",t,e)});for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e};function $H(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments)}}function W0(e,t){var r=!1;function n(s){r||(r=!0,jt.reject(e,s))}function o(s){r||(r=!0,jt.resolve(e,s))}function a(){t(o,n)}var i=H0(a);i.status==="error"&&n(i.value)}function H0(e,t){var r={};try{r.value=e(t),r.status="success"}catch(n){r.status="error",r.value=n}return r}ho.resolve=GH;function GH(e){return e instanceof this?e:jt.resolve(new this(ci),e)}ho.reject=WH;function WH(e){var t=new this(ci);return jt.reject(t,e)}ho.all=HH;function HH(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var o=new Array(r),a=0,i=-1,s=new this(ci);++i<r;)l(e[i],i);return s;function l(c,u){t.resolve(c).then(d,function(f){n||(n=!0,jt.reject(s,f))});function d(f){o[u]=f,++a===r&&!n&&(n=!0,jt.resolve(s,o))}}}ho.race=VH;function VH(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var o=-1,a=new this(ci);++o<r;)i(e[o]);return a;function i(s){t.resolve(s).then(function(l){n||(n=!0,jt.resolve(a,l))},function(l){n||(n=!0,jt.reject(a,l))})}}});var ui=O((M9,q0)=>{"use strict";var Um=null;typeof Promise<"u"?Um=Promise:Um=j0();q0.exports={Promise:Um}});var K0=O(z0=>{(function(e,t){"use strict";if(e.setImmediate)return;var r=1,n={},o=!1,a=e.document,i;function s(m){typeof m!="function"&&(m=new Function(""+m));for(var T=new Array(arguments.length-1),S=0;S<T.length;S++)T[S]=arguments[S+1];var I={callback:m,args:T};return n[r]=I,i(r),r++}function l(m){delete n[m]}function c(m){var T=m.callback,S=m.args;switch(S.length){case 0:T();break;case 1:T(S[0]);break;case 2:T(S[0],S[1]);break;case 3:T(S[0],S[1],S[2]);break;default:T.apply(t,S);break}}function u(m){if(o)setTimeout(u,0,m);else{var T=n[m];if(T){o=!0;try{c(T)}finally{l(m),o=!1}}}}function d(){i=function(m){process.nextTick(function(){u(m)})}}function f(){if(e.postMessage&&!e.importScripts){var m=!0,T=e.onmessage;return e.onmessage=function(){m=!1},e.postMessage("","*"),e.onmessage=T,m}}function p(){var m="setImmediate$"+Math.random()+"$",T=function(S){S.source===e&&typeof S.data=="string"&&S.data.indexOf(m)===0&&u(+S.data.slice(m.length))};e.addEventListener?e.addEventListener("message",T,!1):e.attachEvent("onmessage",T),i=function(S){e.postMessage(m+S,"*")}}function h(){var m=new MessageChannel;m.port1.onmessage=function(T){var S=T.data;u(S)},i=function(T){m.port2.postMessage(T)}}function y(){var m=a.documentElement;i=function(T){var S=a.createElement("script");S.onreadystatechange=function(){u(T),S.onreadystatechange=null,m.removeChild(S),S=null},m.appendChild(S)}}function b(){i=function(m){setTimeout(u,0,m)}}var g=Object.getPrototypeOf&&Object.getPrototypeOf(e);g=g&&g.setTimeout?g:e,{}.toString.call(e.process)==="[object process]"?d():f()?p():e.MessageChannel?h():a&&"onreadystatechange"in a.createElement("script")?y():b(),g.setImmediate=s,g.clearImmediate=l})(typeof self>"u"?typeof global>"u"?z0:global:self)});var st=O(xt=>{"use strict";var mo=Un(),jH=Rm(),di=el(),$m=ui();K0();function qH(e){var t=null;return mo.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),ld(e,t)}xt.newBlob=function(e,t){xt.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,n=new r;return n.append(e),n.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function al(e){return e}function ld(e,t){for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)&255;return t}var sd={stringifyByChunk:function(e,t,r){var n=[],o=0,a=e.length;if(a<=r)return String.fromCharCode.apply(null,e);for(;o<a;)t==="array"||t==="nodebuffer"?n.push(String.fromCharCode.apply(null,e.slice(o,Math.min(o+r,a)))):n.push(String.fromCharCode.apply(null,e.subarray(o,Math.min(o+r,a)))),o+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(function(){try{return mo.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return mo.nodebuffer&&String.fromCharCode.apply(null,di.allocBuffer(1)).length===1}catch{return!1}})()}};function il(e){var t=65536,r=xt.getTypeOf(e),n=!0;if(r==="uint8array"?n=sd.applyCanBeUsed.uint8array:r==="nodebuffer"&&(n=sd.applyCanBeUsed.nodebuffer),n)for(;t>1;)try{return sd.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2)}return sd.stringifyByChar(e)}xt.applyFromCharCode=il;function cd(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var go={};go.string={string:al,array:function(e){return ld(e,new Array(e.length))},arraybuffer:function(e){return go.string.uint8array(e).buffer},uint8array:function(e){return ld(e,new Uint8Array(e.length))},nodebuffer:function(e){return ld(e,di.allocBuffer(e.length))}};go.array={string:il,array:al,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return di.newBufferFrom(e)}};go.arraybuffer={string:function(e){return il(new Uint8Array(e))},array:function(e){return cd(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:al,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return di.newBufferFrom(new Uint8Array(e))}};go.uint8array={string:il,array:function(e){return cd(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:al,nodebuffer:function(e){return di.newBufferFrom(e)}};go.nodebuffer={string:il,array:function(e){return cd(e,new Array(e.length))},arraybuffer:function(e){return go.nodebuffer.uint8array(e).buffer},uint8array:function(e){return cd(e,new Uint8Array(e.length))},nodebuffer:al};xt.transformTo=function(e,t){if(t||(t=""),!e)return t;xt.checkSupport(e);var r=xt.getTypeOf(t),n=go[r][e](t);return n};xt.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var o=t[n];o==="."||o===""&&n!==0&&n!==t.length-1||(o===".."?r.pop():r.push(o))}return r.join("/")};xt.getTypeOf=function(e){if(typeof e=="string")return"string";if(Object.prototype.toString.call(e)==="[object Array]")return"array";if(mo.nodebuffer&&di.isBuffer(e))return"nodebuffer";if(mo.uint8array&&e instanceof Uint8Array)return"uint8array";if(mo.arraybuffer&&e instanceof ArrayBuffer)return"arraybuffer"};xt.checkSupport=function(e){var t=mo[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};xt.MAX_VALUE_16BITS=65535;xt.MAX_VALUE_32BITS=-1;xt.pretty=function(e){var t="",r,n;for(n=0;n<(e||"").length;n++)r=e.charCodeAt(n),t+="\\x"+(r<16?"0":"")+r.toString(16).toUpperCase();return t};xt.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})};xt.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r};xt.extend=function(){var e={},t,r;for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&typeof e[r]>"u"&&(e[r]=arguments[t][r]);return e};xt.prepareContent=function(e,t,r,n,o){var a=$m.Promise.resolve(t).then(function(i){var s=mo.blob&&(i instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(i))!==-1);return s&&typeof FileReader<"u"?new $m.Promise(function(l,c){var u=new FileReader;u.onload=function(d){l(d.target.result)},u.onerror=function(d){c(d.target.error)},u.readAsArrayBuffer(i)}):i});return a.then(function(i){var s=xt.getTypeOf(i);return s?(s==="arraybuffer"?i=xt.transformTo("uint8array",i):s==="string"&&(o?i=jH.decode(i):r&&n!==!0&&(i=qH(i))),i):$m.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}});var mr=O((L9,J0)=>{"use strict";function Z0(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}Z0.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return this.isFinished?!1:(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(r){t.processChunk(r)}),e.on("end",function(){t.end()}),e.on("error",function(r){t.error(r)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};J0.exports=Z0});var pi=O(yo=>{"use strict";var fi=st(),Xo=Un(),zH=el(),ud=mr(),sl=new Array(256);for($n=0;$n<256;$n++)sl[$n]=$n>=252?6:$n>=248?5:$n>=240?4:$n>=224?3:$n>=192?2:1;var $n;sl[254]=sl[254]=1;var KH=function(e){var t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)r=e.charCodeAt(o),(r&64512)===55296&&o+1<i&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(Xo.uint8array?t=new Uint8Array(s):t=new Array(s),a=0,o=0;a<s;o++)r=e.charCodeAt(o),(r&64512)===55296&&o+1<i&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t},ZH=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+sl[e[r]]>t?r:t},JH=function(e){var t,r,n,o,a=e.length,i=new Array(a*2);for(r=0,t=0;t<a;){if(n=e[t++],n<128){i[r++]=n;continue}if(o=sl[n],o>4){i[r++]=65533,t+=o-1;continue}for(n&=o===2?31:o===3?15:7;o>1&&t<a;)n=n<<6|e[t++]&63,o--;if(o>1){i[r++]=65533;continue}n<65536?i[r++]=n:(n-=65536,i[r++]=55296|n>>10&1023,i[r++]=56320|n&1023)}return i.length!==r&&(i.subarray?i=i.subarray(0,r):i.length=r),fi.applyFromCharCode(i)};yo.utf8encode=function(t){return Xo.nodebuffer?zH.newBufferFrom(t,"utf-8"):KH(t)};yo.utf8decode=function(t){return Xo.nodebuffer?fi.transformTo("nodebuffer",t).toString("utf-8"):(t=fi.transformTo(Xo.uint8array?"uint8array":"array",t),JH(t))};function dd(){ud.call(this,"utf-8 decode"),this.leftOver=null}fi.inherits(dd,ud);dd.prototype.processChunk=function(e){var t=fi.transformTo(Xo.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Xo.uint8array){var r=t;t=new Uint8Array(r.length+this.leftOver.length),t.set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=ZH(t),o=t;n!==t.length&&(Xo.uint8array?(o=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(o=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:yo.utf8decode(o),meta:e.meta})};dd.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:yo.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};yo.Utf8DecodeWorker=dd;function Gm(){ud.call(this,"utf-8 encode")}fi.inherits(Gm,ud);Gm.prototype.processChunk=function(e){this.push({data:yo.utf8encode(e.data),meta:e.meta})};yo.Utf8EncodeWorker=Gm});var eC=O((B9,Q0)=>{"use strict";var Y0=mr(),X0=st();function Wm(e){Y0.call(this,"ConvertWorker to "+e),this.destType=e}X0.inherits(Wm,Y0);Wm.prototype.processChunk=function(e){this.push({data:X0.transformTo(this.destType,e.data),meta:e.meta})};Q0.exports=Wm});var nC=O((U9,rC)=>{"use strict";var tC=Em().Readable,YH=st();YH.inherits(Hm,tC);function Hm(e,t,r){tC.call(this,t),this._helper=e;var n=this;e.on("data",function(o,a){n.push(o)||n._helper.pause(),r&&r(a)}).on("error",function(o){n.emit("error",o)}).on("end",function(){n.push(null)})}Hm.prototype._read=function(){this._helper.resume()};rC.exports=Hm});var Vm=O(($9,iC)=>{"use strict";var Qo=st(),XH=eC(),QH=mr(),eV=Rm(),tV=Un(),rV=ui(),oC=null;if(tV.nodestream)try{oC=nC()}catch{}function nV(e,t,r){switch(e){case"blob":return Qo.newBlob(Qo.transformTo("arraybuffer",t),r);case"base64":return eV.encode(t);default:return Qo.transformTo(e,t)}}function oV(e,t){var r,n=0,o=null,a=0;for(r=0;r<t.length;r++)a+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(o=new Uint8Array(a),r=0;r<t.length;r++)o.set(t[r],n),n+=t[r].length;return o;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function aV(e,t){return new rV.Promise(function(r,n){var o=[],a=e._internalType,i=e._outputType,s=e._mimeType;e.on("data",function(l,c){o.push(l),t&&t(c)}).on("error",function(l){o=[],n(l)}).on("end",function(){try{var l=nV(i,oV(a,o),s);r(l)}catch(c){n(c)}o=[]}).resume()})}function aC(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";break}try{this._internalType=n,this._outputType=t,this._mimeType=r,Qo.checkSupport(n),this._worker=e.pipe(new XH(n)),e.lock()}catch(o){this._worker=new QH("error"),this._worker.error(o)}}aC.prototype={accumulate:function(e){return aV(this,e)},on:function(e,t){var r=this;return e==="data"?this._worker.on(e,function(n){t.call(r,n.data,n.meta)}):this._worker.on(e,function(){Qo.delay(t,arguments,r)}),this},resume:function(){return Qo.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Qo.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new oC(this,{objectMode:this._outputType!=="nodebuffer"},e)}};iC.exports=aC});var jm=O(zr=>{"use strict";zr.base64=!1;zr.binary=!1;zr.dir=!1;zr.createFolders=!0;zr.date=null;zr.compression=null;zr.compressionOptions=null;zr.comment=null;zr.unixPermissions=null;zr.dosPermissions=null});var qm=O((W9,sC)=>{"use strict";var fd=st(),pd=mr(),iV=16*1024;function hi(e){pd.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(r){t.dataIsReady=!0,t.data=r,t.max=r&&r.length||0,t.type=fd.getTypeOf(r),t.isPaused||t._tickAndRepeat()},function(r){t.error(r)})}fd.inherits(hi,pd);hi.prototype.cleanUp=function(){pd.prototype.cleanUp.call(this),this.data=null};hi.prototype.resume=function(){return pd.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,fd.delay(this._tickAndRepeat,[],this)),!0):!1};hi.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(fd.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};hi.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=iV,t=null,r=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,r);break;case"uint8array":t=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":t=this.data.slice(this.index,r);break}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};sC.exports=hi});var hd=O((H9,cC)=>{"use strict";var sV=st();function lV(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var lC=lV();function cV(e,t,r,n){var o=lC,a=n+r;e=e^-1;for(var i=n;i<a;i++)e=e>>>8^o[(e^t[i])&255];return e^-1}function uV(e,t,r,n){var o=lC,a=n+r;e=e^-1;for(var i=n;i<a;i++)e=e>>>8^o[(e^t.charCodeAt(i))&255];return e^-1}cC.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var n=sV.getTypeOf(t)!=="string";return n?cV(r|0,t,t.length,0):uV(r|0,t,t.length,0)}});var Km=O((V9,dC)=>{"use strict";var uC=mr(),dV=hd(),fV=st();function zm(){uC.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}fV.inherits(zm,uC);zm.prototype.processChunk=function(e){this.streamInfo.crc32=dV(e.data,this.streamInfo.crc32||0),this.push(e)};dC.exports=zm});var pC=O((j9,fC)=>{"use strict";var pV=st(),Zm=mr();function Jm(e){Zm.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}pV.inherits(Jm,Zm);Jm.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}Zm.prototype.processChunk.call(this,e)};fC.exports=Jm});var md=O((q9,gC)=>{"use strict";var hC=ui(),mC=qm(),hV=Km(),Ym=pC();function Xm(e,t,r,n,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=o}Xm.prototype={getContentWorker:function(){var e=new mC(hC.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Ym("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new mC(hC.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};Xm.createWorkerFrom=function(e,t,r){return e.pipe(new hV).pipe(new Ym("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new Ym("compressedSize")).withStreamInfo("compression",t)};gC.exports=Xm});var SC=O((z9,TC)=>{"use strict";var mV=Vm(),gV=qm(),Qm=pi(),eg=md(),yC=mr(),tg=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};tg.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");r=e.toLowerCase();var n=r==="string"||r==="text";(r==="binarystring"||r==="text")&&(r="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(t=t.pipe(new Qm.Utf8EncodeWorker)),!o&&n&&(t=t.pipe(new Qm.Utf8DecodeWorker))}catch(a){t=new yC("error"),t.error(a)}return new mV(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof eg&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new Qm.Utf8EncodeWorker)),eg.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof eg?this._data.getContentWorker():this._data instanceof yC?this._data:new gV(this._data)}};var bC=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],yV=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(gd=0;gd<bC.length;gd++)tg.prototype[bC[gd]]=yV;var gd;TC.exports=tg});var Gn=O(Jt=>{"use strict";var bV=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function TV(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Jt.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)TV(r,n)&&(e[n]=r[n])}}return e};Jt.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var SV={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),o);return}for(var a=0;a<n;a++)e[o+a]=t[r+a]},flattenChunks:function(e){var t,r,n,o,a,i;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(i=new Uint8Array(n),o=0,t=0,r=e.length;t<r;t++)a=e[t],i.set(a,o),o+=a.length;return i}},xV={arraySet:function(e,t,r,n,o){for(var a=0;a<n;a++)e[o+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};Jt.setTyped=function(e){e?(Jt.Buf8=Uint8Array,Jt.Buf16=Uint16Array,Jt.Buf32=Int32Array,Jt.assign(Jt,SV)):(Jt.Buf8=Array,Jt.Buf16=Array,Jt.Buf32=Array,Jt.assign(Jt,xV))};Jt.setTyped(bV)});var HC=O(yi=>{"use strict";var IV=Gn(),vV=4,xC=0,IC=1,wV=2;function gi(e){for(var t=e.length;--t>=0;)e[t]=0}var kV=0,EC=1,_V=2,CV=3,EV=258,lg=29,pl=256,cl=pl+1+lg,mi=30,cg=19,NC=2*cl+1,ea=15,rg=16,NV=7,ug=256,AC=16,PC=17,RC=18,ig=[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],yd=[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],AV=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],MC=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],PV=512,Wn=new Array((cl+2)*2);gi(Wn);var ll=new Array(mi*2);gi(ll);var ul=new Array(PV);gi(ul);var dl=new Array(EV-CV+1);gi(dl);var dg=new Array(lg);gi(dg);var bd=new Array(mi);gi(bd);function ng(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}var FC,OC,LC;function og(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function DC(e){return e<256?ul[e]:ul[256+(e>>>7)]}function fl(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function lr(e,t,r){e.bi_valid>rg-r?(e.bi_buf|=t<<e.bi_valid&65535,fl(e,e.bi_buf),e.bi_buf=t>>rg-e.bi_valid,e.bi_valid+=r-rg):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function dn(e,t,r){lr(e,r[t*2],r[t*2+1])}function BC(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function RV(e){e.bi_valid===16?(fl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function MV(e,t){var r=t.dyn_tree,n=t.max_code,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,c,u,d,f,p,h,y=0;for(f=0;f<=ea;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<NC;c++)u=e.heap[c],f=r[r[u*2+1]*2+1]+1,f>l&&(f=l,y++),r[u*2+1]=f,!(u>n)&&(e.bl_count[f]++,p=0,u>=s&&(p=i[u-s]),h=r[u*2],e.opt_len+=h*(f+p),a&&(e.static_len+=h*(o[u*2+1]+p)));if(y!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,y-=2}while(y>0);for(f=l;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--c],!(d>n)&&(r[d*2+1]!==f&&(e.opt_len+=(f-r[d*2+1])*r[d*2],r[d*2+1]=f),u--)}}function UC(e,t,r){var n=new Array(ea+1),o=0,a,i;for(a=1;a<=ea;a++)n[a]=o=o+r[a-1]<<1;for(i=0;i<=t;i++){var s=e[i*2+1];s!==0&&(e[i*2]=BC(n[s]++,s))}}function FV(){var e,t,r,n,o,a=new Array(ea+1);for(r=0,n=0;n<lg-1;n++)for(dg[n]=r,e=0;e<1<<ig[n];e++)dl[r++]=n;for(dl[r-1]=n,o=0,n=0;n<16;n++)for(bd[n]=o,e=0;e<1<<yd[n];e++)ul[o++]=n;for(o>>=7;n<mi;n++)for(bd[n]=o<<7,e=0;e<1<<yd[n]-7;e++)ul[256+o++]=n;for(t=0;t<=ea;t++)a[t]=0;for(e=0;e<=143;)Wn[e*2+1]=8,e++,a[8]++;for(;e<=255;)Wn[e*2+1]=9,e++,a[9]++;for(;e<=279;)Wn[e*2+1]=7,e++,a[7]++;for(;e<=287;)Wn[e*2+1]=8,e++,a[8]++;for(UC(Wn,cl+1,a),e=0;e<mi;e++)ll[e*2+1]=5,ll[e*2]=BC(e,5);FC=new ng(Wn,ig,pl+1,cl,ea),OC=new ng(ll,yd,0,mi,ea),LC=new ng(new Array(0),AV,0,cg,NV)}function $C(e){var t;for(t=0;t<cl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<mi;t++)e.dyn_dtree[t*2]=0;for(t=0;t<cg;t++)e.bl_tree[t*2]=0;e.dyn_ltree[ug*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function GC(e){e.bi_valid>8?fl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function OV(e,t,r,n){GC(e),n&&(fl(e,r),fl(e,~r)),IV.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function vC(e,t,r,n){var o=t*2,a=r*2;return e[o]<e[a]||e[o]===e[a]&&n[t]<=n[r]}function ag(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&vC(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!vC(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function wC(e,t,r){var n,o,a=0,i,s;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],o=e.pending_buf[e.l_buf+a],a++,n===0?dn(e,o,t):(i=dl[o],dn(e,i+pl+1,t),s=ig[i],s!==0&&(o-=dg[i],lr(e,o,s)),n--,i=DC(n),dn(e,i,r),s=yd[i],s!==0&&(n-=bd[i],lr(e,n,s)));while(a<e.last_lit);dn(e,ug,t)}function sg(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.elems,i,s,l=-1,c;for(e.heap_len=0,e.heap_max=NC,i=0;i<a;i++)r[i*2]!==0?(e.heap[++e.heap_len]=l=i,e.depth[i]=0):r[i*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,r[c*2]=1,e.depth[c]=0,e.opt_len--,o&&(e.static_len-=n[c*2+1]);for(t.max_code=l,i=e.heap_len>>1;i>=1;i--)ag(e,r,i);c=a;do i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ag(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=s,r[c*2]=r[i*2]+r[s*2],e.depth[c]=(e.depth[i]>=e.depth[s]?e.depth[i]:e.depth[s])+1,r[i*2+1]=r[s*2+1]=c,e.heap[1]=c++,ag(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],MV(e,t),UC(r,l,e.bl_count)}function kC(e,t,r){var n,o=-1,a,i=t[1],s=0,l=7,c=4;for(i===0&&(l=138,c=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)a=i,i=t[(n+1)*2+1],!(++s<l&&a===i)&&(s<c?e.bl_tree[a*2]+=s:a!==0?(a!==o&&e.bl_tree[a*2]++,e.bl_tree[AC*2]++):s<=10?e.bl_tree[PC*2]++:e.bl_tree[RC*2]++,s=0,o=a,i===0?(l=138,c=3):a===i?(l=6,c=3):(l=7,c=4))}function _C(e,t,r){var n,o=-1,a,i=t[1],s=0,l=7,c=4;for(i===0&&(l=138,c=3),n=0;n<=r;n++)if(a=i,i=t[(n+1)*2+1],!(++s<l&&a===i)){if(s<c)do dn(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==o&&(dn(e,a,e.bl_tree),s--),dn(e,AC,e.bl_tree),lr(e,s-3,2)):s<=10?(dn(e,PC,e.bl_tree),lr(e,s-3,3)):(dn(e,RC,e.bl_tree),lr(e,s-11,7));s=0,o=a,i===0?(l=138,c=3):a===i?(l=6,c=3):(l=7,c=4)}}function LV(e){var t;for(kC(e,e.dyn_ltree,e.l_desc.max_code),kC(e,e.dyn_dtree,e.d_desc.max_code),sg(e,e.bl_desc),t=cg-1;t>=3&&e.bl_tree[MC[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function DV(e,t,r,n){var o;for(lr(e,t-257,5),lr(e,r-1,5),lr(e,n-4,4),o=0;o<n;o++)lr(e,e.bl_tree[MC[o]*2+1],3);_C(e,e.dyn_ltree,t-1),_C(e,e.dyn_dtree,r-1)}function BV(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return xC;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return IC;for(r=32;r<pl;r++)if(e.dyn_ltree[r*2]!==0)return IC;return xC}var CC=!1;function UV(e){CC||(FV(),CC=!0),e.l_desc=new og(e.dyn_ltree,FC),e.d_desc=new og(e.dyn_dtree,OC),e.bl_desc=new og(e.bl_tree,LC),e.bi_buf=0,e.bi_valid=0,$C(e)}function WC(e,t,r,n){lr(e,(kV<<1)+(n?1:0),3),OV(e,t,r,!0)}function $V(e){lr(e,EC<<1,3),dn(e,ug,Wn),RV(e)}function GV(e,t,r,n){var o,a,i=0;e.level>0?(e.strm.data_type===wV&&(e.strm.data_type=BV(e)),sg(e,e.l_desc),sg(e,e.d_desc),i=LV(e),o=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=o&&(o=a)):o=a=r+5,r+4<=o&&t!==-1?WC(e,t,r,n):e.strategy===vV||a===o?(lr(e,(EC<<1)+(n?1:0),3),wC(e,Wn,ll)):(lr(e,(_V<<1)+(n?1:0),3),DV(e,e.l_desc.max_code+1,e.d_desc.max_code+1,i+1),wC(e,e.dyn_ltree,e.dyn_dtree)),$C(e),n&&GC(e)}function WV(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(dl[r]+pl+1)*2]++,e.dyn_dtree[DC(t)*2]++),e.last_lit===e.lit_bufsize-1}yi._tr_init=UV;yi._tr_stored_block=WC;yi._tr_flush_block=GV;yi._tr_tally=WV;yi._tr_align=$V});var fg=O((J9,VC)=>{"use strict";function HV(e,t,r,n){for(var o=e&65535|0,a=e>>>16&65535|0,i=0;r!==0;){i=r>2e3?2e3:r,r-=i;do o=o+t[n++]|0,a=a+o|0;while(--i);o%=65521,a%=65521}return o|a<<16|0}VC.exports=HV});var pg=O((Y9,jC)=>{"use strict";function VV(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var jV=VV();function qV(e,t,r,n){var o=jV,a=n+r;e^=-1;for(var i=n;i<a;i++)e=e>>>8^o[(e^t[i])&255];return e^-1}jC.exports=qV});var Td=O((X9,qC)=>{"use strict";qC.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var tE=O(hn=>{"use strict";var Yt=Gn(),Mr=HC(),JC=fg(),bo=pg(),zV=Td(),oa=0,KV=1,ZV=3,vo=4,zC=5,pn=0,KC=1,Fr=-2,JV=-3,hg=-5,YV=-1,XV=1,Sd=2,QV=3,ej=4,tj=0,rj=2,wd=8,nj=9,oj=15,aj=8,ij=29,sj=256,gg=sj+1+ij,lj=30,cj=19,uj=2*gg+1,dj=15,Pe=3,xo=258,Kr=xo+Pe+1,fj=32,kd=42,yg=69,xd=73,Id=91,vd=103,ta=113,ml=666,wt=1,gl=2,ra=3,Si=4,pj=3;function Io(e,t){return e.msg=zV[t],t}function ZC(e){return(e<<1)-(e>4?9:0)}function So(e){for(var t=e.length;--t>=0;)e[t]=0}function To(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(Yt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function Ft(e,t){Mr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,To(e.strm)}function Be(e,t){e.pending_buf[e.pending++]=t}function hl(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function hj(e,t,r,n){var o=e.avail_in;return o>n&&(o=n),o===0?0:(e.avail_in-=o,Yt.arraySet(t,e.input,e.next_in,o,r),e.state.wrap===1?e.adler=JC(e.adler,t,o,r):e.state.wrap===2&&(e.adler=bo(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function YC(e,t){var r=e.max_chain_length,n=e.strstart,o,a,i=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-Kr?e.strstart-(e.w_size-Kr):0,c=e.window,u=e.w_mask,d=e.prev,f=e.strstart+xo,p=c[n+i-1],h=c[n+i];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(o=t,!(c[o+i]!==h||c[o+i-1]!==p||c[o]!==c[n]||c[++o]!==c[n+1])){n+=2,o++;do;while(c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&n<f);if(a=xo-(f-n),n=f-xo,a>i){if(e.match_start=t,i=a,a>=s)break;p=c[n+i-1],h=c[n+i]}}while((t=d[t&u])>l&&--r!==0);return i<=e.lookahead?i:e.lookahead}function na(e){var t=e.w_size,r,n,o,a,i;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Kr)){Yt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do o=e.head[--r],e.head[r]=o>=t?o-t:0;while(--n);n=t,r=n;do o=e.prev[--r],e.prev[r]=o>=t?o-t:0;while(--n);a+=t}if(e.strm.avail_in===0)break;if(n=hj(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=Pe)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+Pe-1])&e.hash_mask,e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<Pe)););}while(e.lookahead<Kr&&e.strm.avail_in!==0)}function mj(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(na(e),e.lookahead===0&&t===oa)return wt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Ft(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Kr&&(Ft(e,!1),e.strm.avail_out===0))return wt}return e.insert=0,t===vo?(Ft(e,!0),e.strm.avail_out===0?ra:Si):(e.strstart>e.block_start&&(Ft(e,!1),e.strm.avail_out===0),wt)}function mg(e,t){for(var r,n;;){if(e.lookahead<Kr){if(na(e),e.lookahead<Kr&&t===oa)return wt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Pe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Pe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Kr&&(e.match_length=YC(e,r)),e.match_length>=Pe)if(n=Mr._tr_tally(e,e.strstart-e.match_start,e.match_length-Pe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Pe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Pe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Ft(e,!1),e.strm.avail_out===0))return wt}return e.insert=e.strstart<Pe-1?e.strstart:Pe-1,t===vo?(Ft(e,!0),e.strm.avail_out===0?ra:Si):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:gl}function bi(e,t){for(var r,n,o;;){if(e.lookahead<Kr){if(na(e),e.lookahead<Kr&&t===oa)return wt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Pe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Pe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Pe-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Kr&&(e.match_length=YC(e,r),e.match_length<=5&&(e.strategy===XV||e.match_length===Pe&&e.strstart-e.match_start>4096)&&(e.match_length=Pe-1)),e.prev_length>=Pe&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-Pe,n=Mr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Pe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Pe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Pe-1,e.strstart++,n&&(Ft(e,!1),e.strm.avail_out===0))return wt}else if(e.match_available){if(n=Mr._tr_tally(e,0,e.window[e.strstart-1]),n&&Ft(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return wt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Mr._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Pe-1?e.strstart:Pe-1,t===vo?(Ft(e,!0),e.strm.avail_out===0?ra:Si):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:gl}function gj(e,t){for(var r,n,o,a,i=e.window;;){if(e.lookahead<=xo){if(na(e),e.lookahead<=xo&&t===oa)return wt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Pe&&e.strstart>0&&(o=e.strstart-1,n=i[o],n===i[++o]&&n===i[++o]&&n===i[++o])){a=e.strstart+xo;do;while(n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&o<a);e.match_length=xo-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Pe?(r=Mr._tr_tally(e,1,e.match_length-Pe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Ft(e,!1),e.strm.avail_out===0))return wt}return e.insert=0,t===vo?(Ft(e,!0),e.strm.avail_out===0?ra:Si):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:gl}function yj(e,t){for(var r;;){if(e.lookahead===0&&(na(e),e.lookahead===0)){if(t===oa)return wt;break}if(e.match_length=0,r=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Ft(e,!1),e.strm.avail_out===0))return wt}return e.insert=0,t===vo?(Ft(e,!0),e.strm.avail_out===0?ra:Si):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:gl}function fn(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}var Ti;Ti=[new fn(0,0,0,0,mj),new fn(4,4,8,4,mg),new fn(4,5,16,8,mg),new fn(4,6,32,32,mg),new fn(4,4,16,16,bi),new fn(8,16,32,32,bi),new fn(8,16,128,128,bi),new fn(8,32,128,256,bi),new fn(32,128,258,1024,bi),new fn(32,258,258,4096,bi)];function bj(e){e.window_size=2*e.w_size,So(e.head),e.max_lazy_match=Ti[e.level].max_lazy,e.good_match=Ti[e.level].good_length,e.nice_match=Ti[e.level].nice_length,e.max_chain_length=Ti[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Pe-1,e.match_available=0,e.ins_h=0}function Tj(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=wd,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Yt.Buf16(uj*2),this.dyn_dtree=new Yt.Buf16((2*lj+1)*2),this.bl_tree=new Yt.Buf16((2*cj+1)*2),So(this.dyn_ltree),So(this.dyn_dtree),So(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Yt.Buf16(dj+1),this.heap=new Yt.Buf16(2*gg+1),So(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Yt.Buf16(2*gg+1),So(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function XC(e){var t;return!e||!e.state?Io(e,Fr):(e.total_in=e.total_out=0,e.data_type=rj,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?kd:ta,e.adler=t.wrap===2?0:1,t.last_flush=oa,Mr._tr_init(t),pn)}function QC(e){var t=XC(e);return t===pn&&bj(e.state),t}function Sj(e,t){return!e||!e.state||e.state.wrap!==2?Fr:(e.state.gzhead=t,pn)}function eE(e,t,r,n,o,a){if(!e)return Fr;var i=1;if(t===YV&&(t=6),n<0?(i=0,n=-n):n>15&&(i=2,n-=16),o<1||o>nj||r!==wd||n<8||n>15||t<0||t>9||a<0||a>ej)return Io(e,Fr);n===8&&(n=9);var s=new Tj;return e.state=s,s.strm=e,s.wrap=i,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Pe-1)/Pe),s.window=new Yt.Buf8(s.w_size*2),s.head=new Yt.Buf16(s.hash_size),s.prev=new Yt.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Yt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,QC(e)}function xj(e,t){return eE(e,t,wd,oj,aj,tj)}function Ij(e,t){var r,n,o,a;if(!e||!e.state||t>zC||t<0)return e?Io(e,Fr):Fr;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===ml&&t!==vo)return Io(e,e.avail_out===0?hg:Fr);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===kd)if(n.wrap===2)e.adler=0,Be(n,31),Be(n,139),Be(n,8),n.gzhead?(Be(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Be(n,n.gzhead.time&255),Be(n,n.gzhead.time>>8&255),Be(n,n.gzhead.time>>16&255),Be(n,n.gzhead.time>>24&255),Be(n,n.level===9?2:n.strategy>=Sd||n.level<2?4:0),Be(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Be(n,n.gzhead.extra.length&255),Be(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=bo(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=yg):(Be(n,0),Be(n,0),Be(n,0),Be(n,0),Be(n,0),Be(n,n.level===9?2:n.strategy>=Sd||n.level<2?4:0),Be(n,pj),n.status=ta);else{var i=wd+(n.w_bits-8<<4)<<8,s=-1;n.strategy>=Sd||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,i|=s<<6,n.strstart!==0&&(i|=fj),i+=31-i%31,n.status=ta,hl(n,i),n.strstart!==0&&(hl(n,e.adler>>>16),hl(n,e.adler&65535)),e.adler=1}if(n.status===yg)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),To(e),o=n.pending,n.pending===n.pending_buf_size));)Be(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=xd)}else n.status=xd;if(n.status===xd)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),To(e),o=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Be(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),a===0&&(n.gzindex=0,n.status=Id)}else n.status=Id;if(n.status===Id)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),To(e),o=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Be(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=bo(e.adler,n.pending_buf,n.pending-o,o)),a===0&&(n.status=vd)}else n.status=vd;if(n.status===vd&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&To(e),n.pending+2<=n.pending_buf_size&&(Be(n,e.adler&255),Be(n,e.adler>>8&255),e.adler=0,n.status=ta)):n.status=ta),n.pending!==0){if(To(e),e.avail_out===0)return n.last_flush=-1,pn}else if(e.avail_in===0&&ZC(t)<=ZC(r)&&t!==vo)return Io(e,hg);if(n.status===ml&&e.avail_in!==0)return Io(e,hg);if(e.avail_in!==0||n.lookahead!==0||t!==oa&&n.status!==ml){var l=n.strategy===Sd?yj(n,t):n.strategy===QV?gj(n,t):Ti[n.level].func(n,t);if((l===ra||l===Si)&&(n.status=ml),l===wt||l===ra)return e.avail_out===0&&(n.last_flush=-1),pn;if(l===gl&&(t===KV?Mr._tr_align(n):t!==zC&&(Mr._tr_stored_block(n,0,0,!1),t===ZV&&(So(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),To(e),e.avail_out===0))return n.last_flush=-1,pn}return t!==vo?pn:n.wrap<=0?KC:(n.wrap===2?(Be(n,e.adler&255),Be(n,e.adler>>8&255),Be(n,e.adler>>16&255),Be(n,e.adler>>24&255),Be(n,e.total_in&255),Be(n,e.total_in>>8&255),Be(n,e.total_in>>16&255),Be(n,e.total_in>>24&255)):(hl(n,e.adler>>>16),hl(n,e.adler&65535)),To(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?pn:KC)}function vj(e){var t;return!e||!e.state?Fr:(t=e.state.status,t!==kd&&t!==yg&&t!==xd&&t!==Id&&t!==vd&&t!==ta&&t!==ml?Io(e,Fr):(e.state=null,t===ta?Io(e,JV):pn))}function wj(e,t){var r=t.length,n,o,a,i,s,l,c,u;if(!e||!e.state||(n=e.state,i=n.wrap,i===2||i===1&&n.status!==kd||n.lookahead))return Fr;for(i===1&&(e.adler=JC(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(i===0&&(So(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new Yt.Buf8(n.w_size),Yt.arraySet(u,t,r-n.w_size,n.w_size,0),t=u,r=n.w_size),s=e.avail_in,l=e.next_in,c=e.input,e.avail_in=r,e.next_in=0,e.input=t,na(n);n.lookahead>=Pe;){o=n.strstart,a=n.lookahead-(Pe-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[o+Pe-1])&n.hash_mask,n.prev[o&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=o,o++;while(--a);n.strstart=o,n.lookahead=Pe-1,na(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=Pe-1,n.match_available=0,e.next_in=l,e.input=c,e.avail_in=s,n.wrap=i,pn}hn.deflateInit=xj;hn.deflateInit2=eE;hn.deflateReset=QC;hn.deflateResetKeep=XC;hn.deflateSetHeader=Sj;hn.deflate=Ij;hn.deflateEnd=vj;hn.deflateSetDictionary=wj;hn.deflateInfo="pako deflate (from Nodeca project)"});var bg=O(xi=>{"use strict";var _d=Gn(),rE=!0,nE=!0;try{String.fromCharCode.apply(null,[0])}catch{rE=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{nE=!1}var yl=new _d.Buf8(256);for(Hn=0;Hn<256;Hn++)yl[Hn]=Hn>=252?6:Hn>=248?5:Hn>=240?4:Hn>=224?3:Hn>=192?2:1;var Hn;yl[254]=yl[254]=1;xi.string2buf=function(e){var t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)r=e.charCodeAt(o),(r&64512)===55296&&o+1<i&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new _d.Buf8(s),a=0,o=0;a<s;o++)r=e.charCodeAt(o),(r&64512)===55296&&o+1<i&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function oE(e,t){if(t<65534&&(e.subarray&&nE||!e.subarray&&rE))return String.fromCharCode.apply(null,_d.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}xi.buf2binstring=function(e){return oE(e,e.length)};xi.binstring2buf=function(e){for(var t=new _d.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};xi.buf2string=function(e,t){var r,n,o,a,i=t||e.length,s=new Array(i*2);for(n=0,r=0;r<i;){if(o=e[r++],o<128){s[n++]=o;continue}if(a=yl[o],a>4){s[n++]=65533,r+=a-1;continue}for(o&=a===2?31:a===3?15:7;a>1&&r<i;)o=o<<6|e[r++]&63,a--;if(a>1){s[n++]=65533;continue}o<65536?s[n++]=o:(o-=65536,s[n++]=55296|o>>10&1023,s[n++]=56320|o&1023)}return oE(s,n)};xi.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+yl[e[r]]>t?r:t}});var Tg=O((tY,aE)=>{"use strict";function kj(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}aE.exports=kj});var cE=O(Sl=>{"use strict";var bl=tE(),Tl=Gn(),xg=bg(),Ig=Td(),_j=Tg(),lE=Object.prototype.toString,Cj=0,Sg=4,Ii=0,iE=1,sE=2,Ej=-1,Nj=0,Aj=8;function aa(e){if(!(this instanceof aa))return new aa(e);this.options=Tl.assign({level:Ej,method:Aj,chunkSize:16384,windowBits:15,memLevel:8,strategy:Nj,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _j,this.strm.avail_out=0;var r=bl.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Ii)throw new Error(Ig[r]);if(t.header&&bl.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=xg.string2buf(t.dictionary):lE.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=bl.deflateSetDictionary(this.strm,n),r!==Ii)throw new Error(Ig[r]);this._dict_set=!0}}aa.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,o,a;if(this.ended)return!1;a=t===~~t?t:t===!0?Sg:Cj,typeof e=="string"?r.input=xg.string2buf(e):lE.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Tl.Buf8(n),r.next_out=0,r.avail_out=n),o=bl.deflate(r,a),o!==iE&&o!==Ii)return this.onEnd(o),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===Sg||a===sE))&&(this.options.to==="string"?this.onData(xg.buf2binstring(Tl.shrinkBuf(r.output,r.next_out))):this.onData(Tl.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&o!==iE);return a===Sg?(o=bl.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===Ii):(a===sE&&(this.onEnd(Ii),r.avail_out=0),!0)};aa.prototype.onData=function(e){this.chunks.push(e)};aa.prototype.onEnd=function(e){e===Ii&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Tl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function vg(e,t){var r=new aa(t);if(r.push(e,!0),r.err)throw r.msg||Ig[r.err];return r.result}function Pj(e,t){return t=t||{},t.raw=!0,vg(e,t)}function Rj(e,t){return t=t||{},t.gzip=!0,vg(e,t)}Sl.Deflate=aa;Sl.deflate=vg;Sl.deflateRaw=Pj;Sl.gzip=Rj});var dE=O((nY,uE)=>{"use strict";var Cd=30,Mj=12;uE.exports=function(t,r){var n,o,a,i,s,l,c,u,d,f,p,h,y,b,g,m,T,S,I,v,w,k,E,R,F;n=t.state,o=t.next_in,R=t.input,a=o+(t.avail_in-5),i=t.next_out,F=t.output,s=i-(r-t.avail_out),l=i+(t.avail_out-257),c=n.dmax,u=n.wsize,d=n.whave,f=n.wnext,p=n.window,h=n.hold,y=n.bits,b=n.lencode,g=n.distcode,m=(1<<n.lenbits)-1,T=(1<<n.distbits)-1;e:do{y<15&&(h+=R[o++]<<y,y+=8,h+=R[o++]<<y,y+=8),S=b[h&m];t:for(;;){if(I=S>>>24,h>>>=I,y-=I,I=S>>>16&255,I===0)F[i++]=S&65535;else if(I&16){v=S&65535,I&=15,I&&(y<I&&(h+=R[o++]<<y,y+=8),v+=h&(1<<I)-1,h>>>=I,y-=I),y<15&&(h+=R[o++]<<y,y+=8,h+=R[o++]<<y,y+=8),S=g[h&T];r:for(;;){if(I=S>>>24,h>>>=I,y-=I,I=S>>>16&255,I&16){if(w=S&65535,I&=15,y<I&&(h+=R[o++]<<y,y+=8,y<I&&(h+=R[o++]<<y,y+=8)),w+=h&(1<<I)-1,w>c){t.msg="invalid distance too far back",n.mode=Cd;break e}if(h>>>=I,y-=I,I=i-s,w>I){if(I=w-I,I>d&&n.sane){t.msg="invalid distance too far back",n.mode=Cd;break e}if(k=0,E=p,f===0){if(k+=u-I,I<v){v-=I;do F[i++]=p[k++];while(--I);k=i-w,E=F}}else if(f<I){if(k+=u+f-I,I-=f,I<v){v-=I;do F[i++]=p[k++];while(--I);if(k=0,f<v){I=f,v-=I;do F[i++]=p[k++];while(--I);k=i-w,E=F}}}else if(k+=f-I,I<v){v-=I;do F[i++]=p[k++];while(--I);k=i-w,E=F}for(;v>2;)F[i++]=E[k++],F[i++]=E[k++],F[i++]=E[k++],v-=3;v&&(F[i++]=E[k++],v>1&&(F[i++]=E[k++]))}else{k=i-w;do F[i++]=F[k++],F[i++]=F[k++],F[i++]=F[k++],v-=3;while(v>2);v&&(F[i++]=F[k++],v>1&&(F[i++]=F[k++]))}}else if((I&64)===0){S=g[(S&65535)+(h&(1<<I)-1)];continue r}else{t.msg="invalid distance code",n.mode=Cd;break e}break}}else if((I&64)===0){S=b[(S&65535)+(h&(1<<I)-1)];continue t}else if(I&32){n.mode=Mj;break e}else{t.msg="invalid literal/length code",n.mode=Cd;break e}break}}while(o<a&&i<l);v=y>>3,o-=v,y-=v<<3,h&=(1<<y)-1,t.next_in=o,t.next_out=i,t.avail_in=o<a?5+(a-o):5-(o-a),t.avail_out=i<l?257+(l-i):257-(i-l),n.hold=h,n.bits=y}});var bE=O((oY,yE)=>{"use strict";var fE=Gn(),vi=15,pE=852,hE=592,mE=0,wg=1,gE=2,Fj=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Oj=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Lj=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Dj=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];yE.exports=function(t,r,n,o,a,i,s,l){var c=l.bits,u=0,d=0,f=0,p=0,h=0,y=0,b=0,g=0,m=0,T=0,S,I,v,w,k,E=null,R=0,F,G=new fE.Buf16(vi+1),B=new fE.Buf16(vi+1),Z=null,X=0,_e,D,re;for(u=0;u<=vi;u++)G[u]=0;for(d=0;d<o;d++)G[r[n+d]]++;for(h=c,p=vi;p>=1&&G[p]===0;p--);if(h>p&&(h=p),p===0)return a[i++]=1<<24|64<<16|0,a[i++]=1<<24|64<<16|0,l.bits=1,0;for(f=1;f<p&&G[f]===0;f++);for(h<f&&(h=f),g=1,u=1;u<=vi;u++)if(g<<=1,g-=G[u],g<0)return-1;if(g>0&&(t===mE||p!==1))return-1;for(B[1]=0,u=1;u<vi;u++)B[u+1]=B[u]+G[u];for(d=0;d<o;d++)r[n+d]!==0&&(s[B[r[n+d]]++]=d);if(t===mE?(E=Z=s,F=19):t===wg?(E=Fj,R-=257,Z=Oj,X-=257,F=256):(E=Lj,Z=Dj,F=-1),T=0,d=0,u=f,k=i,y=h,b=0,v=-1,m=1<<h,w=m-1,t===wg&&m>pE||t===gE&&m>hE)return 1;for(;;){_e=u-b,s[d]<F?(D=0,re=s[d]):s[d]>F?(D=Z[X+s[d]],re=E[R+s[d]]):(D=96,re=0),S=1<<u-b,I=1<<y,f=I;do I-=S,a[k+(T>>b)+I]=_e<<24|D<<16|re|0;while(I!==0);for(S=1<<u-1;T&S;)S>>=1;if(S!==0?(T&=S-1,T+=S):T=0,d++,--G[u]===0){if(u===p)break;u=r[n+s[d]]}if(u>h&&(T&w)!==v){for(b===0&&(b=h),k+=f,y=u-b,g=1<<y;y+b<p&&(g-=G[y+b],!(g<=0));)y++,g<<=1;if(m+=1<<y,t===wg&&m>pE||t===gE&&m>hE)return 1;v=T&w,a[v]=h<<24|y<<16|k-i|0}}return T!==0&&(a[k+T]=u-b<<24|64<<16|0),l.bits=h,0}});var QE=O(Zr=>{"use strict";var gr=Gn(),Ag=fg(),mn=pg(),Bj=dE(),xl=bE(),Uj=0,VE=1,jE=2,TE=4,$j=5,Ed=6,ia=0,Gj=1,Wj=2,Or=-2,qE=-3,Pg=-4,Hj=-5,SE=8,zE=1,xE=2,IE=3,vE=4,wE=5,kE=6,_E=7,CE=8,EE=9,NE=10,Pd=11,Vn=12,kg=13,AE=14,_g=15,PE=16,RE=17,ME=18,FE=19,Nd=20,Ad=21,OE=22,LE=23,DE=24,BE=25,UE=26,Cg=27,$E=28,GE=29,ot=30,Rg=31,Vj=32,jj=852,qj=592,zj=15,Kj=zj;function WE(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Zj(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new gr.Buf16(320),this.work=new gr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function KE(e){var t;return!e||!e.state?Or:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=zE,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new gr.Buf32(jj),t.distcode=t.distdyn=new gr.Buf32(qj),t.sane=1,t.back=-1,ia)}function ZE(e){var t;return!e||!e.state?Or:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,KE(e))}function JE(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Or:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,ZE(e))}function YE(e,t){var r,n;return e?(n=new Zj,e.state=n,n.window=null,r=JE(e,t),r!==ia&&(e.state=null),r):Or}function Jj(e){return YE(e,Kj)}var HE=!0,Eg,Ng;function Yj(e){if(HE){var t;for(Eg=new gr.Buf32(512),Ng=new gr.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(xl(VE,e.lens,0,288,Eg,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;xl(jE,e.lens,0,32,Ng,0,e.work,{bits:5}),HE=!1}e.lencode=Eg,e.lenbits=9,e.distcode=Ng,e.distbits=5}function XE(e,t,r,n){var o,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new gr.Buf8(a.wsize)),n>=a.wsize?(gr.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(o=a.wsize-a.wnext,o>n&&(o=n),gr.arraySet(a.window,t,r-n,o,a.wnext),n-=o,n?(gr.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}function Xj(e,t){var r,n,o,a,i,s,l,c,u,d,f,p,h,y,b=0,g,m,T,S,I,v,w,k,E=new gr.Buf8(4),R,F,G=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Or;r=e.state,r.mode===Vn&&(r.mode=kg),i=e.next_out,o=e.output,l=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,c=r.hold,u=r.bits,d=s,f=l,k=ia;e:for(;;)switch(r.mode){case zE:if(r.wrap===0){r.mode=kg;break}for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(r.wrap&2&&c===35615){r.check=0,E[0]=c&255,E[1]=c>>>8&255,r.check=mn(r.check,E,2,0),c=0,u=0,r.mode=xE;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=ot;break}if((c&15)!==SE){e.msg="unknown compression method",r.mode=ot;break}if(c>>>=4,u-=4,w=(c&15)+8,r.wbits===0)r.wbits=w;else if(w>r.wbits){e.msg="invalid window size",r.mode=ot;break}r.dmax=1<<w,e.adler=r.check=1,r.mode=c&512?NE:Vn,c=0,u=0;break;case xE:for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(r.flags=c,(r.flags&255)!==SE){e.msg="unknown compression method",r.mode=ot;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=ot;break}r.head&&(r.head.text=c>>8&1),r.flags&512&&(E[0]=c&255,E[1]=c>>>8&255,r.check=mn(r.check,E,2,0)),c=0,u=0,r.mode=IE;case IE:for(;u<32;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.head&&(r.head.time=c),r.flags&512&&(E[0]=c&255,E[1]=c>>>8&255,E[2]=c>>>16&255,E[3]=c>>>24&255,r.check=mn(r.check,E,4,0)),c=0,u=0,r.mode=vE;case vE:for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.head&&(r.head.xflags=c&255,r.head.os=c>>8),r.flags&512&&(E[0]=c&255,E[1]=c>>>8&255,r.check=mn(r.check,E,2,0)),c=0,u=0,r.mode=wE;case wE:if(r.flags&1024){for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.length=c,r.head&&(r.head.extra_len=c),r.flags&512&&(E[0]=c&255,E[1]=c>>>8&255,r.check=mn(r.check,E,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=kE;case kE:if(r.flags&1024&&(p=r.length,p>s&&(p=s),p&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),gr.arraySet(r.head.extra,n,a,p,w)),r.flags&512&&(r.check=mn(r.check,n,p,a)),s-=p,a+=p,r.length-=p),r.length))break e;r.length=0,r.mode=_E;case _E:if(r.flags&2048){if(s===0)break e;p=0;do w=n[a+p++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w));while(w&&p<s);if(r.flags&512&&(r.check=mn(r.check,n,p,a)),s-=p,a+=p,w)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=CE;case CE:if(r.flags&4096){if(s===0)break e;p=0;do w=n[a+p++],r.head&&w&&r.length<65536&&(r.head.comment+=String.fromCharCode(w));while(w&&p<s);if(r.flags&512&&(r.check=mn(r.check,n,p,a)),s-=p,a+=p,w)break e}else r.head&&(r.head.comment=null);r.mode=EE;case EE:if(r.flags&512){for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(c!==(r.check&65535)){e.msg="header crc mismatch",r.mode=ot;break}c=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Vn;break;case NE:for(;u<32;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}e.adler=r.check=WE(c),c=0,u=0,r.mode=Pd;case Pd:if(r.havedict===0)return e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,Wj;e.adler=r.check=1,r.mode=Vn;case Vn:if(t===$j||t===Ed)break e;case kg:if(r.last){c>>>=u&7,u-=u&7,r.mode=Cg;break}for(;u<3;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}switch(r.last=c&1,c>>>=1,u-=1,c&3){case 0:r.mode=AE;break;case 1:if(Yj(r),r.mode=Nd,t===Ed){c>>>=2,u-=2;break e}break;case 2:r.mode=RE;break;case 3:e.msg="invalid block type",r.mode=ot}c>>>=2,u-=2;break;case AE:for(c>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",r.mode=ot;break}if(r.length=c&65535,c=0,u=0,r.mode=_g,t===Ed)break e;case _g:r.mode=PE;case PE:if(p=r.length,p){if(p>s&&(p=s),p>l&&(p=l),p===0)break e;gr.arraySet(o,n,a,p,i),s-=p,a+=p,l-=p,i+=p,r.length-=p;break}r.mode=Vn;break;case RE:for(;u<14;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(r.nlen=(c&31)+257,c>>>=5,u-=5,r.ndist=(c&31)+1,c>>>=5,u-=5,r.ncode=(c&15)+4,c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=ot;break}r.have=0,r.mode=ME;case ME:for(;r.have<r.ncode;){for(;u<3;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.lens[G[r.have++]]=c&7,c>>>=3,u-=3}for(;r.have<19;)r.lens[G[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,R={bits:r.lenbits},k=xl(Uj,r.lens,0,19,r.lencode,0,r.work,R),r.lenbits=R.bits,k){e.msg="invalid code lengths set",r.mode=ot;break}r.have=0,r.mode=FE;case FE:for(;r.have<r.nlen+r.ndist;){for(;b=r.lencode[c&(1<<r.lenbits)-1],g=b>>>24,m=b>>>16&255,T=b&65535,!(g<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(T<16)c>>>=g,u-=g,r.lens[r.have++]=T;else{if(T===16){for(F=g+2;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(c>>>=g,u-=g,r.have===0){e.msg="invalid bit length repeat",r.mode=ot;break}w=r.lens[r.have-1],p=3+(c&3),c>>>=2,u-=2}else if(T===17){for(F=g+3;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}c>>>=g,u-=g,w=0,p=3+(c&7),c>>>=3,u-=3}else{for(F=g+7;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}c>>>=g,u-=g,w=0,p=11+(c&127),c>>>=7,u-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=ot;break}for(;p--;)r.lens[r.have++]=w}}if(r.mode===ot)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=ot;break}if(r.lenbits=9,R={bits:r.lenbits},k=xl(VE,r.lens,0,r.nlen,r.lencode,0,r.work,R),r.lenbits=R.bits,k){e.msg="invalid literal/lengths set",r.mode=ot;break}if(r.distbits=6,r.distcode=r.distdyn,R={bits:r.distbits},k=xl(jE,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,R),r.distbits=R.bits,k){e.msg="invalid distances set",r.mode=ot;break}if(r.mode=Nd,t===Ed)break e;case Nd:r.mode=Ad;case Ad:if(s>=6&&l>=258){e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,Bj(e,f),i=e.next_out,o=e.output,l=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,c=r.hold,u=r.bits,r.mode===Vn&&(r.back=-1);break}for(r.back=0;b=r.lencode[c&(1<<r.lenbits)-1],g=b>>>24,m=b>>>16&255,T=b&65535,!(g<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(m&&(m&240)===0){for(S=g,I=m,v=T;b=r.lencode[v+((c&(1<<S+I)-1)>>S)],g=b>>>24,m=b>>>16&255,T=b&65535,!(S+g<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}c>>>=S,u-=S,r.back+=S}if(c>>>=g,u-=g,r.back+=g,r.length=T,m===0){r.mode=UE;break}if(m&32){r.back=-1,r.mode=Vn;break}if(m&64){e.msg="invalid literal/length code",r.mode=ot;break}r.extra=m&15,r.mode=OE;case OE:if(r.extra){for(F=r.extra;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=LE;case LE:for(;b=r.distcode[c&(1<<r.distbits)-1],g=b>>>24,m=b>>>16&255,T=b&65535,!(g<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if((m&240)===0){for(S=g,I=m,v=T;b=r.distcode[v+((c&(1<<S+I)-1)>>S)],g=b>>>24,m=b>>>16&255,T=b&65535,!(S+g<=u);){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}c>>>=S,u-=S,r.back+=S}if(c>>>=g,u-=g,r.back+=g,m&64){e.msg="invalid distance code",r.mode=ot;break}r.offset=T,r.extra=m&15,r.mode=DE;case DE:if(r.extra){for(F=r.extra;u<F;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=ot;break}r.mode=BE;case BE:if(l===0)break e;if(p=f-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=ot;break}p>r.wnext?(p-=r.wnext,h=r.wsize-p):h=r.wnext-p,p>r.length&&(p=r.length),y=r.window}else y=o,h=i-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do o[i++]=y[h++];while(--p);r.length===0&&(r.mode=Ad);break;case UE:if(l===0)break e;o[i++]=r.length,l--,r.mode=Ad;break;case Cg:if(r.wrap){for(;u<32;){if(s===0)break e;s--,c|=n[a++]<<u,u+=8}if(f-=l,e.total_out+=f,r.total+=f,f&&(e.adler=r.check=r.flags?mn(r.check,o,f,i-f):Ag(r.check,o,f,i-f)),f=l,(r.flags?c:WE(c))!==r.check){e.msg="incorrect data check",r.mode=ot;break}c=0,u=0}r.mode=$E;case $E:if(r.wrap&&r.flags){for(;u<32;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(c!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=ot;break}c=0,u=0}r.mode=GE;case GE:k=Gj;break e;case ot:k=qE;break e;case Rg:return Pg;case Vj:default:return Or}return e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,(r.wsize||f!==e.avail_out&&r.mode<ot&&(r.mode<Cg||t!==TE))&&XE(e,e.output,e.next_out,f-e.avail_out)?(r.mode=Rg,Pg):(d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,r.total+=f,r.wrap&&f&&(e.adler=r.check=r.flags?mn(r.check,o,f,e.next_out-f):Ag(r.check,o,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Vn?128:0)+(r.mode===Nd||r.mode===_g?256:0),(d===0&&f===0||t===TE)&&k===ia&&(k=Hj),k)}function Qj(e){if(!e||!e.state)return Or;var t=e.state;return t.window&&(t.window=null),e.state=null,ia}function e4(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Or:(r.head=t,t.done=!1,ia)}function t4(e,t){var r=t.length,n,o,a;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==Pd)?Or:n.mode===Pd&&(o=1,o=Ag(o,t,r,0),o!==n.check)?qE:(a=XE(e,t,r,r),a?(n.mode=Rg,Pg):(n.havedict=1,ia))}Zr.inflateReset=ZE;Zr.inflateReset2=JE;Zr.inflateResetKeep=KE;Zr.inflateInit=Jj;Zr.inflateInit2=YE;Zr.inflate=Xj;Zr.inflateEnd=Qj;Zr.inflateGetHeader=e4;Zr.inflateSetDictionary=t4;Zr.inflateInfo="pako inflate (from Nodeca project)"});var Mg=O((iY,eN)=>{"use strict";eN.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var rN=O((sY,tN)=>{"use strict";function r4(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}tN.exports=r4});var oN=O(vl=>{"use strict";var wi=QE(),Il=Gn(),Rd=bg(),mt=Mg(),Fg=Td(),n4=Tg(),o4=rN(),nN=Object.prototype.toString;function sa(e){if(!(this instanceof sa))return new sa(e);this.options=Il.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n4,this.strm.avail_out=0;var r=wi.inflateInit2(this.strm,t.windowBits);if(r!==mt.Z_OK)throw new Error(Fg[r]);if(this.header=new o4,wi.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Rd.string2buf(t.dictionary):nN.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=wi.inflateSetDictionary(this.strm,t.dictionary),r!==mt.Z_OK)))throw new Error(Fg[r])}sa.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,o=this.options.dictionary,a,i,s,l,c,u=!1;if(this.ended)return!1;i=t===~~t?t:t===!0?mt.Z_FINISH:mt.Z_NO_FLUSH,typeof e=="string"?r.input=Rd.binstring2buf(e):nN.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Il.Buf8(n),r.next_out=0,r.avail_out=n),a=wi.inflate(r,mt.Z_NO_FLUSH),a===mt.Z_NEED_DICT&&o&&(a=wi.inflateSetDictionary(this.strm,o)),a===mt.Z_BUF_ERROR&&u===!0&&(a=mt.Z_OK,u=!1),a!==mt.Z_STREAM_END&&a!==mt.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===mt.Z_STREAM_END||r.avail_in===0&&(i===mt.Z_FINISH||i===mt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Rd.utf8border(r.output,r.next_out),l=r.next_out-s,c=Rd.buf2string(r.output,s),r.next_out=l,r.avail_out=n-l,l&&Il.arraySet(r.output,r.output,s,l,0),this.onData(c)):this.onData(Il.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&a!==mt.Z_STREAM_END);return a===mt.Z_STREAM_END&&(i=mt.Z_FINISH),i===mt.Z_FINISH?(a=wi.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===mt.Z_OK):(i===mt.Z_SYNC_FLUSH&&(this.onEnd(mt.Z_OK),r.avail_out=0),!0)};sa.prototype.onData=function(e){this.chunks.push(e)};sa.prototype.onEnd=function(e){e===mt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Il.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Og(e,t){var r=new sa(t);if(r.push(e,!0),r.err)throw r.msg||Fg[r.err];return r.result}function a4(e,t){return t=t||{},t.raw=!0,Og(e,t)}vl.Inflate=sa;vl.inflate=Og;vl.inflateRaw=a4;vl.ungzip=Og});var sN=O((cY,iN)=>{"use strict";var i4=Gn().assign,s4=cE(),l4=oN(),c4=Mg(),aN={};i4(aN,s4,l4,c4);iN.exports=aN});var cN=O(Fd=>{"use strict";var u4=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",d4=sN(),lN=st(),Md=mr(),f4=u4?"uint8array":"array";Fd.magic="\b\0";function la(e,t){Md.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}lN.inherits(la,Md);la.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(lN.transformTo(f4,e.data),!1)};la.prototype.flush=function(){Md.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};la.prototype.cleanUp=function(){Md.prototype.cleanUp.call(this),this._pako=null};la.prototype._createPako=function(){this._pako=new d4[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};Fd.compressWorker=function(e){return new la("Deflate",e)};Fd.uncompressWorker=function(){return new la("Inflate",{})}});var Dg=O(Lg=>{"use strict";var uN=mr();Lg.STORE={magic:"\0\0",compressWorker:function(){return new uN("STORE compression")},uncompressWorker:function(){return new uN("STORE decompression")}};Lg.DEFLATE=cN()});var Bg=O(ca=>{"use strict";ca.LOCAL_FILE_HEADER="PK";ca.CENTRAL_FILE_HEADER="PK";ca.CENTRAL_DIRECTORY_END="PK";ca.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";ca.ZIP64_CENTRAL_DIRECTORY_END="PK";ca.DATA_DESCRIPTOR="PK\x07\b"});var hN=O((pY,pN)=>{"use strict";var ki=st(),_i=mr(),Ug=pi(),dN=hd(),Od=Bg(),Ye=function(e,t){var r="",n;for(n=0;n<t;n++)r+=String.fromCharCode(e&255),e=e>>>8;return r},p4=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},h4=function(e){return(e||0)&63},fN=function(e,t,r,n,o,a){var i=e.file,s=e.compression,l=a!==Ug.utf8encode,c=ki.transformTo("string",a(i.name)),u=ki.transformTo("string",Ug.utf8encode(i.name)),d=i.comment,f=ki.transformTo("string",a(d)),p=ki.transformTo("string",Ug.utf8encode(d)),h=u.length!==i.name.length,y=p.length!==d.length,b,g,m="",T="",S="",I=i.dir,v=i.date,w={crc32:0,compressedSize:0,uncompressedSize:0};(!t||r)&&(w.crc32=e.crc32,w.compressedSize=e.compressedSize,w.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),!l&&(h||y)&&(k|=2048);var E=0,R=0;I&&(E|=16),o==="UNIX"?(R=798,E|=p4(i.unixPermissions,I)):(R=20,E|=h4(i.dosPermissions,I)),b=v.getUTCHours(),b=b<<6,b=b|v.getUTCMinutes(),b=b<<5,b=b|v.getUTCSeconds()/2,g=v.getUTCFullYear()-1980,g=g<<4,g=g|v.getUTCMonth()+1,g=g<<5,g=g|v.getUTCDate(),h&&(T=Ye(1,1)+Ye(dN(c),4)+u,m+="up"+Ye(T.length,2)+T),y&&(S=Ye(1,1)+Ye(dN(f),4)+p,m+="uc"+Ye(S.length,2)+S);var F="";F+=`
93
+ \0`,F+=Ye(k,2),F+=s.magic,F+=Ye(b,2),F+=Ye(g,2),F+=Ye(w.crc32,4),F+=Ye(w.compressedSize,4),F+=Ye(w.uncompressedSize,4),F+=Ye(c.length,2),F+=Ye(m.length,2);var G=Od.LOCAL_FILE_HEADER+F+c+m,B=Od.CENTRAL_FILE_HEADER+Ye(R,2)+F+Ye(f.length,2)+"\0\0\0\0"+Ye(E,4)+Ye(n,4)+c+m+f;return{fileRecord:G,dirRecord:B}},m4=function(e,t,r,n,o){var a="",i=ki.transformTo("string",o(n));return a=Od.CENTRAL_DIRECTORY_END+"\0\0\0\0"+Ye(e,2)+Ye(e,2)+Ye(t,4)+Ye(r,4)+Ye(i.length,2)+i,a},g4=function(e){var t="";return t=Od.DATA_DESCRIPTOR+Ye(e.crc32,4)+Ye(e.compressedSize,4)+Ye(e.uncompressedSize,4),t};function Jr(e,t,r,n){_i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}ki.inherits(Jr,_i);Jr.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,_i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))};Jr.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=fN(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0};Jr.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=fN(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:g4(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};Jr.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,n=m4(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})};Jr.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()};Jr.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(r){t.processChunk(r)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(r){t.error(r)}),this};Jr.prototype.resume=function(){if(!_i.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};Jr.prototype.error=function(e){var t=this._sources;if(!_i.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch{}return!0};Jr.prototype.lock=function(){_i.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()};pN.exports=Jr});var gN=O(mN=>{"use strict";var y4=Dg(),b4=hN(),T4=function(e,t){var r=e||t,n=y4[r];if(!n)throw new Error(r+" is not a valid compression method !");return n};mN.generateWorker=function(e,t,r){var n=new b4(t.streamFiles,r,t.platform,t.encodeFileName),o=0;try{e.forEach(function(a,i){o++;var s=T4(i.options.compression,t.compression),l=i.options.compressionOptions||t.compressionOptions||{},c=i.dir,u=i.date;i._compressWorker(s,l).withStreamInfo("file",{name:a,dir:c,date:u,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(n)}),n.entriesCount=o}catch(a){n.error(a)}return n}});var bN=O((mY,yN)=>{"use strict";var S4=st(),Ld=mr();function wl(e,t){Ld.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}S4.inherits(wl,Ld);wl.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(r){t.push({data:r,meta:{percent:0}})}).on("error",function(r){t.isPaused?this.generatedError=r:t.error(r)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})};wl.prototype.pause=function(){return Ld.prototype.pause.call(this)?(this._stream.pause(),!0):!1};wl.prototype.resume=function(){return Ld.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};yN.exports=wl});var EN=O((gY,CN)=>{"use strict";var x4=pi(),kl=st(),IN=mr(),I4=Vm(),vN=jm(),TN=md(),v4=SC(),w4=gN(),SN=el(),k4=bN(),wN=function(e,t,r){var n=kl.getTypeOf(t),o,a=kl.extend(r||{},vN);a.date=a.date||new Date,a.compression!==null&&(a.compression=a.compression.toUpperCase()),typeof a.unixPermissions=="string"&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&a.unixPermissions&16384&&(a.dir=!0),a.dosPermissions&&a.dosPermissions&16&&(a.dir=!0),a.dir&&(e=kN(e)),a.createFolders&&(o=_4(e))&&_N.call(this,o,!0);var i=n==="string"&&a.binary===!1&&a.base64===!1;(!r||typeof r.binary>"u")&&(a.binary=!i);var s=t instanceof TN&&t.uncompressedSize===0;(s||a.dir||!t||t.length===0)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",n="string");var l=null;t instanceof TN||t instanceof IN?l=t:SN.isNode&&SN.isStream(t)?l=new k4(e,t):l=kl.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var c=new v4(e,l,a);this.files[e]=c},_4=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},kN=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},_N=function(e,t){return t=typeof t<"u"?t:vN.createFolders,e=kN(e),this.files[e]||wN.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function xN(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var C4={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach(function(r,n){e(r,n)&&t.push(n)}),t},file:function(e,t,r){if(arguments.length===1)if(xN(e)){var n=e;return this.filter(function(a,i){return!i.dir&&n.test(a)})}else{var o=this.files[this.root+e];return o&&!o.dir?o:null}else e=this.root+e,wN.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(xN(e))return this.filter(function(o,a){return a.dir&&e.test(o)});var t=this.root+e,r=_N.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(e.slice(-1)!=="/"&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(o,a){return a.name.slice(0,e.length)===e}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if(r=kl.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:x4.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),r.type==="binarystring"&&(r.type="string"),!r.type)throw new Error("No output type specified.");kl.checkSupport(r.type),(r.platform==="darwin"||r.platform==="freebsd"||r.platform==="linux"||r.platform==="sunos")&&(r.platform="UNIX"),r.platform==="win32"&&(r.platform="DOS");var n=r.comment||this.comment||"";t=w4.generateWorker(this,r,n)}catch(o){t=new IN("error"),t.error(o)}return new I4(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};CN.exports=C4});var $g=O((yY,AN)=>{"use strict";var E4=st();function NN(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}NN.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t=0,r;for(this.checkOffset(e),r=this.index+e-1;r>=this.index;r--)t=(t<<8)+this.byteAt(r);return this.index+=e,t},readString:function(e){return E4.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};AN.exports=NN});var Gg=O((bY,RN)=>{"use strict";var PN=$g(),N4=st();function Ci(e){PN.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255}N4.inherits(Ci,PN);Ci.prototype.byteAt=function(e){return this.data[this.zero+e]};Ci.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===o)return a-this.zero;return-1};Ci.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&r===a[1]&&n===a[2]&&o===a[3]};Ci.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};RN.exports=Ci});var ON=O((TY,FN)=>{"use strict";var MN=$g(),A4=st();function Ei(e){MN.call(this,e)}A4.inherits(Ei,MN);Ei.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};Ei.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};Ei.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};Ei.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};FN.exports=Ei});var Hg=O((SY,DN)=>{"use strict";var LN=Gg(),P4=st();function Wg(e){LN.call(this,e)}P4.inherits(Wg,LN);Wg.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};DN.exports=Wg});var $N=O((xY,UN)=>{"use strict";var BN=Hg(),R4=st();function Vg(e){BN.call(this,e)}R4.inherits(Vg,BN);Vg.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};UN.exports=Vg});var jg=O((IY,WN)=>{"use strict";var Dd=st(),GN=Un(),M4=Gg(),F4=ON(),O4=$N(),L4=Hg();WN.exports=function(e){var t=Dd.getTypeOf(e);return Dd.checkSupport(t),t==="string"&&!GN.uint8array?new F4(e):t==="nodebuffer"?new O4(e):GN.uint8array?new L4(Dd.transformTo("uint8array",e)):new M4(Dd.transformTo("array",e))}});var qN=O((vY,jN)=>{"use strict";var qg=jg(),wo=st(),D4=md(),HN=hd(),Bd=pi(),Ud=Dg(),B4=Un(),U4=0,$4=3,G4=function(e){for(var t in Ud)if(Object.prototype.hasOwnProperty.call(Ud,t)&&Ud[t].magic===e)return Ud[t];return null};function VN(e,t){this.options=e,this.loadOptions=t}VN.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=G4(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+wo.pretty(this.compressionMethod)+" unknown (inner file : "+wo.transformTo("string",this.fileName)+")");this.decompressed=new D4(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===U4&&(this.dosPermissions=this.externalFileAttributes&63),e===$4&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=qg(this.extraFields[1].value);this.uncompressedSize===wo.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===wo.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===wo.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===wo.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,r,n,o;for(this.extraFields||(this.extraFields={});e.index+4<t;)r=e.readInt(2),n=e.readInt(2),o=e.readData(n),this.extraFields[r]={id:r,length:n,value:o};e.setIndex(t)},handleUTF8:function(){var e=B4.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=Bd.utf8decode(this.fileName),this.fileCommentStr=Bd.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else{var r=wo.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(n!==null)this.fileCommentStr=n;else{var o=wo.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=qg(e.value);return t.readInt(1)!==1||HN(this.fileName)!==t.readInt(4)?null:Bd.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=qg(e.value);return t.readInt(1)!==1||HN(this.fileComment)!==t.readInt(4)?null:Bd.utf8decode(t.readData(e.length-5))}return null}};jN.exports=VN});var ZN=O((wY,KN)=>{"use strict";var W4=jg(),jn=st(),Yr=Bg(),H4=qN(),V4=Un();function zN(e){this.files=[],this.loadOptions=e}zN.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+jn.pretty(t)+", expected "+jn.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4),o=n===t;return this.reader.setIndex(r),o},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=V4.uint8array?"uint8array":"array",r=jn.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,t=0,r,n,o;t<e;)r=this.reader.readInt(2),n=this.reader.readInt(4),o=this.reader.readData(n),this.zip64ExtensibleData[r]={id:r,length:n,value:o}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(Yr.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(Yr.CENTRAL_FILE_HEADER);)e=new H4({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(Yr.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,Yr.LOCAL_FILE_HEADER);throw t?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var r=e;if(this.checkSignature(Yr.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===jn.MAX_VALUE_16BITS||this.diskWithCentralDirStart===jn.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===jn.MAX_VALUE_16BITS||this.centralDirRecords===jn.MAX_VALUE_16BITS||this.centralDirSize===jn.MAX_VALUE_32BITS||this.centralDirOffset===jn.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(Yr.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(Yr.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,Yr.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(Yr.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(Yr.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var o=r-n;if(o>0)this.isSignature(r,Yr.CENTRAL_FILE_HEADER)||(this.reader.zero=o);else if(o<0)throw new Error("Corrupted zip: missing "+Math.abs(o)+" bytes.")},prepareReader:function(e){this.reader=W4(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};KN.exports=zN});var XN=O((kY,YN)=>{"use strict";var zg=st(),$d=ui(),j4=pi(),q4=ZN(),z4=Km(),JN=el();function K4(e){return new $d.Promise(function(t,r){var n=e.decompressed.getContentWorker().pipe(new z4);n.on("error",function(o){r(o)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}YN.exports=function(e,t){var r=this;return t=zg.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:j4.utf8decode}),JN.isNode&&JN.isStream(e)?$d.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):zg.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(n){var o=new q4(t);return o.load(n),o}).then(function(o){var a=[$d.Promise.resolve(o)],i=o.files;if(t.checkCRC32)for(var s=0;s<i.length;s++)a.push(K4(i[s]));return $d.Promise.all(a)}).then(function(o){for(var a=o.shift(),i=a.files,s=0;s<i.length;s++){var l=i[s],c=l.fileNameStr,u=zg.resolve(l.fileNameStr);r.file(u,l.decompressed,{binary:!0,optimizedBinaryString:!0,date:l.date,dir:l.dir,comment:l.fileCommentStr.length?l.fileCommentStr:null,unixPermissions:l.unixPermissions,dosPermissions:l.dosPermissions,createFolders:t.createFolders}),l.dir||(r.file(u).unsafeOriginalName=c)}return a.zipComment.length&&(r.comment=a.zipComment),r})}});var eA=O((_Y,QN)=>{"use strict";function Lr(){if(!(this instanceof Lr))return new Lr;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new Lr;for(var t in this)typeof this[t]!="function"&&(e[t]=this[t]);return e}}Lr.prototype=EN();Lr.prototype.loadAsync=XN();Lr.support=Un();Lr.defaults=jm();Lr.version="3.10.1";Lr.loadAsync=function(e,t){return new Lr().loadAsync(e,t)};Lr.external=ui();QN.exports=Lr});var uA=O((WY,cA)=>{cA.exports=Tq;function Tq(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}});var BP=ce(require("path")),UP=ce(require("os"));var lb=ce(sb(),1),{program:S6,createCommand:x6,createArgument:I6,createOption:v6,CommanderError:w6,InvalidArgumentError:k6,InvalidOptionArgumentError:_6,Command:cb,Argument:C6,Option:Sn,Help:E6}=lb.default;var ub=`profiler-cli: Usage Guide
94
94
 
95
95
  profiler-cli (Profiler CLI) queries Firefox performance profiles loaded into a persistent
96
96
  daemon. Load a profile once, then query it interactively without reloading.
@@ -499,7 +499,7 @@ ERROR HANDLING
499
499
  "Profile load failed"
500
500
  Check that the path is correct and the file is a valid supported profile format.
501
501
  The daemon log at ~/.profiler-cli/<session-id>.log contains the full error detail.
502
- `;var lb=`profiler-cli: JSON Output Schemas
502
+ `;var db=`profiler-cli: JSON Output Schemas
503
503
 
504
504
  Add --json to any command to get structured JSON output. The schemas below
505
505
  document the exact fields returned by each command.
@@ -620,87 +620,87 @@ SessionContext (present on all command results):
620
620
  currentViewRange: { start, startName, end, endName } | null,
621
621
  rootRange: { start, end }
622
622
  }
623
- `;var KA=ce(require("net")),Fi=ce(require("fs"));var Se=ce(Kt());var xS=ce(xa()),IS=ce(Uf()),vS=ce(Ir());rr();function aS(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=e.length-1;r>=0;r--)if(e[r]!==t[r])return!1;return!0}function In(e){return e.join("-")}function iS(e,t){return e+"-"+t}function sS(e){return""+e}var $t=class e{_table;constructor(t){if(t instanceof e){this._table=new Map(t._table);return}if(this._table=new Map,!!t)for(let r of t)this._table.set(In(r),r)}add(t){return this._table.set(In(t),t),this}clear(){this._table.clear()}delete(t){return this._table.delete(In(t))}*values(){yield*this._table.values()}*entries(){for(let t of this)yield[t,t]}forEach(t,r){for(let n of this)t.call(r,n,n,this)}has(t){return this._table.has(In(t))}get size(){return this._table.size}*[Symbol.iterator](){yield*this._table.values()}};xe();function Kf(e,t,r=0,n=e.length){if(r<0||r>e.length||n<0||n>e.length)throw new TypeError("low and high must lie within the array's range");for(;r<n;){let o=r+n>>1;t<e[o]?n=o:r=o+1}return r}function Bc(e,t,r,n=0,o=e.length){if(n<0||n>e.length||o<0||o>e.length)throw new TypeError("low and high must lie within the array's range");for(;n<o;){let a=n+o>>1;t<r(e[a])?o=a:n=a+1}return n}function fS(e,t,r,n=0,o=e.length){if(n<0||n>e.length||o<0||o>e.length)throw new TypeError("low and high must lie within the array's range");for(;n<o;){let a=n+o>>1;t<r(e[a])?o=a:n=a+1}return n}function Ma(e,t,r=0,n=e.length){if(r<0||r>e.length||n<0||n>e.length)throw new TypeError("low and high must lie within the array's range");for(;r<n;){let o=r+n>>1;t<=e[o]?n=o:r=o+1}return r}var Uc=class{_callNodeTable;_stackIndexToNonInvertedCallNodeIndex;_cache=new Map;constructor(t,r){this._callNodeTable=t,this._stackIndexToNonInvertedCallNodeIndex=r}isInverted(){return!1}asInverted(){return null}getCallNodeTable(){return this._callNodeTable}getStackIndexToNonInvertedCallNodeIndex(){return this._stackIndexToNonInvertedCallNodeIndex}getCallNodePathFromIndex(t){if(t===null||t===-1)return[];let r=[],n=t;for(;n!==-1;)r.push(this._callNodeTable.func[n]),n=this._callNodeTable.prefix[n];return r.reverse(),r}getCallNodeIndexFromPath(t){let r=this._cache,n=In(t),o=r.get(n);if(o!==void 0)return o;let a=[n],i=t.length,s;for(;--i>0;){let l=t.slice(0,i),c=In(l);if(s=r.get(c),s!==void 0)break;a.push(c)}for(s===void 0&&(s=-1);i<t.length;){let l=t[i],c=this.getCallNodeIndexFromParentAndFunc(s,l);if(c===null)return null;let u=a.pop();r.set(u,c),s=c,i++}return s<0?null:s}getCallNodeIndexFromParentAndFunc(t,r){let n=this._callNodeTable;if(t===-1){if(n.length===0)return null}else if(n.subtreeRangeEnd[t]===t+1)return null;let o=t+1;for(let a=o;a!==-1;a=n.nextSibling[a])if(n.func[a]===r)return a;return null}prefixForNode(t){return this._callNodeTable.prefix[t]}funcForNode(t){return this._callNodeTable.func[t]}categoryForNode(t){return this._callNodeTable.category[t]}subcategoryForNode(t){return this._callNodeTable.subcategory[t]}innerWindowIDForNode(t){return this._callNodeTable.innerWindowID[t]}depthForNode(t){return this._callNodeTable.depth[t]}sourceFramesInlinedIntoSymbolForNode(t){return this._callNodeTable.sourceFramesInlinedIntoSymbol[t]}};function RL(e,t,r,n){let o=t.length,a=new Int32Array(o),i=new Int32Array(o),s=new Float64Array(o),l=new Int32Array(o),c=0;for(let u=0;u<o;u++){let d=c,f=t[u];if(c=f,d===f){l[u]=-2;continue}let p=r[d],h=e.category[p],y=e.subcategory[p],b=e.innerWindowID[p],m=e.sourceFramesInlinedIntoSymbol[p];for(let g=d+1;g<f;g++){let T=r[g];h!==e.category[T]?(h=n,y=0):y!==e.subcategory[T]&&(y=0),m!==e.sourceFramesInlinedIntoSymbol[T]&&(m=-1)}a[u]=h,i[u]=y,s[u]=b,l[u]=m}return{category:a,subcategory:i,innerWindowID:s,sourceFramesInlinedIntoSymbol:l,suffixOrderIndexRangeEnd:t,length:o}}function ML(){return{prefix:[],func:[],pathHash:[],category:[],subcategory:[],innerWindowID:[],sourceFramesInlinedIntoSymbol:[],suffixOrderIndexRangeStart:[],suffixOrderIndexRangeEnd:[],deepNodes:[],depth:[],length:0}}function FL(e,t){let r=new Uint32Array(t),n=e.length,o=e.func;for(let d=0;d<n;d++){let f=o[d];r[f]++}let a=r,i=0;for(let d=0;d<a.length;d++){let f=r[d];a[d]=i,i+=f}let s=a,l=new Uint32Array(n),c=new Uint32Array(n);for(let d=0;d<n;d++){let f=o[d],p=s[f]++;l[p]=d,c[d]=p}return{suffixOrderedCallNodes:l,suffixOrderIndexes:c,rootSuffixOrderIndexRangeEndCol:a}}var $c=class{_callNodeTable;_invertedRootCallNodeTable;_invertedNonRootCallNodeTable;_stackIndexToNonInvertedCallNodeIndex;_rootCount;_suffixOrderedCallNodes;_suffixOrderIndexes;_defaultCategory;_cache=new Map;_children=new Map;constructor(t,r,n,o){this._callNodeTable=t,this._stackIndexToNonInvertedCallNodeIndex=r;let{suffixOrderedCallNodes:a,suffixOrderIndexes:i,rootSuffixOrderIndexRangeEndCol:s}=FL(t,o);this._suffixOrderedCallNodes=a,this._suffixOrderIndexes=i,this._defaultCategory=n,this._rootCount=o;let l=RL(t,s,a,n);this._invertedRootCallNodeTable=l,this._invertedNonRootCallNodeTable=ML()}isInverted(){return!0}asInverted(){return this}getCallNodeTable(){return this._callNodeTable}getStackIndexToNonInvertedCallNodeIndex(){return this._stackIndexToNonInvertedCallNodeIndex}getSuffixOrderedCallNodes(){return this._suffixOrderedCallNodes}getSuffixOrderIndexes(){return this._suffixOrderIndexes}getFuncCount(){return this._rootCount}isRoot(t){return t<this._rootCount}getSuffixOrderIndexRangeForCallNode(t){if(t<this._rootCount){let a=t,i=a===0?0:this._invertedRootCallNodeTable.suffixOrderIndexRangeEnd[a-1],s=this._invertedRootCallNodeTable.suffixOrderIndexRangeEnd[a];return[i,s]}let r=t-this._rootCount,n=this._invertedNonRootCallNodeTable.suffixOrderIndexRangeStart[r],o=this._invertedNonRootCallNodeTable.suffixOrderIndexRangeEnd[r];return[n,o]}_createChildren(t){let r=this._takeDeepNodesForInvertedNode(t),n=this._computeChildrenInfo(t,r);return n===null?[]:(this._applyRefinedSuffixOrderForNode(t,n.selfNodesWhichEndAtParent,n.childrenSelfNodes),this._createChildrenForInfo(n,t))}_computeChildrenInfo(t,r){let n=r.length,[o,a]=this.getSuffixOrderIndexRangeForCallNode(t),i=this._suffixOrderedCallNodes.subarray(o,a);if(i.length!==r.length)throw new Error("indexes out of sync");let s=[],l=[],c=[],u=[],d=new Map,f=this._callNodeTable;for(let N=0;N<n;N++){let R=i[N],F=r[N],G=f.prefix[F];if(G!==-1){let B=f.func[G],Z=d.get(B);Z===void 0?d.set(B,1):d.set(B,Z+1),s.push(R),l.push(G),c.push(B)}else u.push(R)}let p=u.length,h=l.length;if(p+h!==n)throw new Error("indexes out of sync");if(p===n)return null;let y=new Uint32Array(d.keys());y.sort();let b=y.length,m=new Uint32Array(b),g=new Uint32Array(b),T=new Map,S=0;for(let N=0;N<b;N++){let R=y[N];T.set(R,N);let F=W(d.get(R));g[N]=F,m[N]=S,S+=F}let I=m,v=new Uint32Array(h),w=new Uint32Array(h);for(let N=0;N<h;N++){let R=c[N],F=W(T.get(R)),G=s[N],B=l[N],Z=I[F]++;v[Z]=B,w[Z]=G}let k=o+p;return{funcPerChild:y,deepNodeCountPerChild:g,childrenSuffixOrderIndexRangeStart:k,selfNodesWhichEndAtParent:u,childrenSelfNodes:w,childrenDeepNodes:v}}_applyRefinedSuffixOrderForNode(t,r,n){let[o,a]=this.getSuffixOrderIndexRangeForCallNode(t),i=this._suffixOrderIndexes,s=this._suffixOrderedCallNodes,l=o;for(let c=0;c<r.length;c++){let u=r[c],d=l++;i[u]=d,s[d]=u}for(let c=0;c<n.length;c++){let u=n[c],d=l++;i[u]=d,s[d]=u}if(l!==a)throw new Error("Indexes out of sync")}_createChildrenForInfo(t,r){let n=this._pathHashForNode(r),o=this.depthForNode(r)+1,{funcPerChild:a,deepNodeCountPerChild:i,childrenSuffixOrderIndexRangeStart:s,childrenDeepNodes:l}=t,c=a.length,u=[],d=0,f=s;for(let p=0;p<c;p++){let h=a[p],y=i[p],b=f,m=l.subarray(d,d+y);f+=y,d+=y;let g=this._createNonRootNode(h,m,b,o,r,n);u.push(g)}return u}_createNonRootNode(t,r,n,o,a,i){let s=r.length,l=this._callNodeTable,c=r[0],u=l.category[c],d=l.subcategory[c],f=l.innerWindowID[c],p=l.sourceFramesInlinedIntoSymbol[c],h=this._invertedNonRootCallNodeTable;for(let g=1;g<s;g++){let T=r[g];u!==l.category[T]?(u=this._defaultCategory,d=0):d!==l.subcategory[T]&&(d=0),p!==l.sourceFramesInlinedIntoSymbol[T]&&(p=-1)}let y=h.length++,b=this._rootCount+y,m=iS(i,t);return h.prefix[y]=a,h.func[y]=t,h.pathHash[y]=m,h.category[y]=u,h.subcategory[y]=d,h.innerWindowID[y]=f,h.sourceFramesInlinedIntoSymbol[y]=p,h.deepNodes[y]=r,h.suffixOrderIndexRangeStart[y]=n,h.suffixOrderIndexRangeEnd[y]=n+s,h.depth[y]=o,this._cache.set(m,b),b}getChildren(t){let r=this._children.get(t);return r===void 0&&(r=this._createChildren(t),this._children.set(t,r)),r}_takeDeepNodesForInvertedNode(t){if(t<this._rootCount){let[o,a]=this.getSuffixOrderIndexRangeForCallNode(t);return this._suffixOrderedCallNodes.subarray(o,a)}let r=t-this._rootCount,n=W(this._invertedNonRootCallNodeTable.deepNodes[r],"_takeDeepNodesForInvertedNode should only be called once for each node, and only after its parent created its children.");return this._invertedNonRootCallNodeTable.deepNodes[r]=null,n}getCallNodePathFromIndex(t){if(t===null||t===-1)return[];let r=this._rootCount,n=[],o=t;for(;o>=r;){let i=o-r;n.push(this._invertedNonRootCallNodeTable.func[i]),o=this._invertedNonRootCallNodeTable.prefix[i]}let a=o;return n.push(a),n.reverse(),n}getCallNodeIndexFromPath(t){if(t.length===0)return null;if(t.length===1)return t[0];let r=t.length-1,n=this._findDeepestExistingInvertedAncestorNode(t),o=this.depthForNode(n);for(;o<r;){let a=t[o+1],i=this.getChildren(n),s=this._getChildWithFunc(i,a);if(s===null)return null;n=s,o++}return n}_findDeepestExistingInvertedAncestorNode(t){let r=this._cache.get(In(t));if(r!==void 0)return r;let n=t[0],o=1,a=t.length-1;for(;o<a;){let i=o+a>>1,s=t.slice(0,i+1),l=this._cache.get(In(s));l!==void 0?(n=l,o=i+1):a=i}return n}_getChildWithFunc(t,r){let n=Bc(t,r,a=>this.funcForNode(a));if(n===0)return null;let o=t[n-1];return this.funcForNode(o)!==r?null:o}getCallNodeIndexFromParentAndFunc(t,r){if(t===-1)return r;let n=this.getChildren(t);return this._getChildWithFunc(n,r)}_pathHashForNode(t){if(t<this._rootCount)return sS(t);let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.pathHash[r]}prefixForNode(t){if(t<this._rootCount)return-1;let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.prefix[r]}funcForNode(t){if(t<this._rootCount)return t;let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.func[r]}categoryForNode(t){if(t<this._rootCount){let n=t;return this._invertedRootCallNodeTable.category[n]}let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.category[r]}subcategoryForNode(t){if(t<this._rootCount){let n=t;return this._invertedRootCallNodeTable.subcategory[n]}let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.subcategory[r]}innerWindowIDForNode(t){if(t<this._rootCount){let n=t;return this._invertedRootCallNodeTable.innerWindowID[n]}let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.innerWindowID[r]}depthForNode(t){if(t<this._rootCount)return 0;let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.depth[r]}sourceFramesInlinedIntoSymbolForNode(t){if(t<this._rootCount){let n=t;return this._invertedRootCallNodeTable.sourceFramesInlinedIntoSymbol[n]}let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.sourceFramesInlinedIntoSymbol[r]}};xe();function pS(e){let t=new Array(e.length),r=0;for(let n=0;n<e.length;n++){let o=r+e[n];t[n]=o,r=o}return t}function Gc(e){let t=new Array(e.length),r=0;for(let n=0;n<e.length;n++){let o=e[n];t[n]=o-r,r=o}return t}function OL(e){let t=0;for(let r=0;r<e.length;r++){let{samples:n}=e[r],{threadCPUDelta:o}=n;if(!o)continue;let a=n.time!==void 0?Gc(n.time):W(n.timeDeltas);for(let i=1;i<n.length;i++){let s=a[i];if(s!==0){let l=(o[i]||0)/s;t=Math.max(t,l)}}}return t}function hS(e){let t=e.meta.sampleUnits;if(!t)return 1;let r=t.threadCPUDelta;switch(r){case"\xB5s":return 1e3;case"ns":return 1e6;case"variable CPU cycles":return OL(e.threads);default:throw ae(r,"Unhandled threadCPUDelta unit in computeReferenceCPUDeltaPerMs.")}}function mS(e,t,r){let n=new Uint8Array(e.length+1);n[0]=0;for(let o=1;o<e.length;o++){let a=r*t[o],i=e[o];if(i===null||a===0){n[o]=100;continue}n[o]=i<=a?Math.round(100*i/a):100}return n}cr();function ps(e){let t=self.ga;t&&t("send",e)}var DL=3,gS={},BL=0;function Gt(e,t){if(typeof performance<"u"){let r;process.env.NODE_ENV==="development"&&performance.mark&&(r=`time-code-${BL++}`,performance.mark(r));let n=performance.now(),o=t(),a=Math.round(performance.now()-n);process.env.NODE_ENV==="development"&&(performance.measure&&r&&performance.measure(`TimeCode: ${e}`,r),console.log(`[timing] %c"${e}"`,"font-weight: bold; color: #f0a",`took ${a}ms to execute.`));let i=gS[e]||0;return i<DL&&(gS[e]=1+i,ps({hitType:"timing",timingCategory:"timeCode",timingVar:e,timingValue:a})),o}return t()}function vr(e){let n=(e-1>>5)+1;return new Int32Array(n)}function bt(e,t){let r=t>>5,n=t&31;if(r>=e.length)throw new Wc(t);e[r]|=1<<n}function It(e,t){let r=t>>5,n=t&31;if(r>=e.length)throw new Wc(t);return(e[r]&1<<n)!==0}function yS(e,t){let r=e.length,n=new Int32Array(r);for(let o=0;o<r;o++)n[o]=e[o]&t[o];return n}var Wc=class extends Error{name="BitSetOutOfBoundsError";bitIndex;constructor(t){super(`Bit index ${t} is out of bounds`),this.bitIndex=t}};xe();var UL=/^(?<vcs>hg|git):(?<repo>[^:]*):(?<path>[^:]*):(?<rev>.*)$/,$L=/^s3:(?<bucket>[^:]*):(?<digest>[0-9a-f]*)\/(?<path>[^:]*):$/,GL=/^cargo:(?<registry>[^:]*):(?<crate>[^/]+)-(?<version>[0-9]+\.[0-9]+\.[0-9]+):(?<path>[^:]*)$/;function Hc(e){let t=UL.exec(e);if(t!==null&&t.groups){let{vcs:o,repo:a,path:i,rev:s}=t.groups;if(o!=="hg"&&o!=="git")throw new Error('The regexp ensures that "vcs" is "hg" or "git", so this cannot happen.');return{type:o,repo:a,path:i,rev:s}}let r=$L.exec(e);if(r!==null&&r.groups){let{bucket:o,digest:a,path:i}=r.groups;return{type:"s3",bucket:o,digest:a,path:i}}let n=GL.exec(e);if(n!==null&&n.groups){let{registry:o,crate:a,version:i,path:s}=n.groups;return{type:"cargo",registry:o,crate:a,version:i,path:`${a}-${i}/${s}`}}return{type:"normal",path:e}}function bS(e){switch(e.type){case"hg":{let{repo:t,rev:r,path:n}=e;return{type:"CORS_ENABLED_SINGLE_FILE",url:`https://${t}/raw-file/${r}/${n}`}}case"git":{let{repo:t,rev:r,path:n}=e,o=t.indexOf("/");if(o===-1)return{type:"NO_KNOWN_CORS_URL"};let a=t.slice(0,o),i=t.slice(o+1);return a==="github.com"?{type:"CORS_ENABLED_SINGLE_FILE",url:`https://raw.githubusercontent.com/${i}/${r}/${n}`}:a.endsWith(".googlesource.com")?{type:"CORS_ENABLED_SINGLE_FILE",url:`https://googlesource-proxy.mstange.workers.dev/${a.slice(0,a.length-17)}/${i}.git/+/${r}/${n}`}:{type:"NO_KNOWN_CORS_URL"}}case"s3":{let{bucket:t,digest:r,path:n}=e;return{type:"CORS_ENABLED_SINGLE_FILE",url:`https://${t}.s3.amazonaws.com/${r}/${n}`}}case"cargo":{let{crate:t,version:r,path:n}=e;return{type:"CORS_ENABLED_ARCHIVE",archiveUrl:`https://crates.io/api/v1/crates/${t}/${r}/download`,pathInArchive:n}}case"normal":return{type:"NO_KNOWN_CORS_URL"};default:throw ae(e,"unhandled ParsedFile type")}}xe();function wS(e,t,r){let{callNodeTable:n,stackIndexToCallNodeIndex:o}=HL(e,t,r);return new Uc(n,o)}function WL(e){let t=e.length,r=e.inlineDepth,n=e.nativeSymbol,o=new Int32Array(t);for(let a=0;a<t;a++){let i=-2;if(r[a]>0){let s=n[a];s!==null&&(i=s)}o[a]=i}return o}function HL(e,t,r){if(e.length===0)return{callNodeTable:oS(),stackIndexToCallNodeIndex:new Int32Array(0)};let n=VL(e,t),o=jL(n),{stackIndexToCallNodeIndex:a}=o,i=WL(t),s=qL(e,t,a,i,n.length,r);return{callNodeTable:{prefix:o.prefixSorted,nextSibling:o.nextSiblingSorted,subtreeRangeEnd:o.subtreeRangeEndSorted,func:s.funcCol,category:s.categoryCol,subcategory:s.subcategoryCol,innerWindowID:s.innerWindowIDCol,sourceFramesInlinedIntoSymbol:s.inlinedIntoCol,depth:o.depthSorted,maxDepth:o.maxDepth,length:n.length},stackIndexToCallNodeIndex:a}}function VL(e,t){let r=new Int32Array(e.length),n=[],o=[],a=[],i=[],s=0,l=[],c=-1;for(let u=0;u<e.length;u++){let d=e.prefix[u],f=d===null?-1:r[d],p=e.frame[u],h=t.func[p],y=-1;if(u!==0){let b=f===-1?0:o[f];for(let m=b;m!==-1;m=a[m])if(i[m]===h){y=m;break}}if(y!==-1){r[u]=y;continue}if(y=s++,r[u]=y,n[y]=f,i[y]=h,o[y]=-1,a[y]=-1,l[y]=-1,f===-1)c!==-1&&(a[c]=y),c=y;else{let b=l[f];b===-1?o[f]=y:a[b]=y,l[f]=y}}return{prefix:n,firstChild:o,nextSibling:a,length:s,stackIndexToCallNodeIndex:r}}function jL(e){let{prefix:t,firstChild:r,nextSibling:n,length:o,stackIndexToCallNodeIndex:a}=e,i=new Int32Array(o),s=new Int32Array(o),l=new Uint32Array(o),c=new Int32Array(o),u=0;if(o===0)return{prefixSorted:i,subtreeRangeEndSorted:l,nextSiblingSorted:s,depthSorted:c,maxDepth:u,length:o,stackIndexToCallNodeIndex:a};let d=new Uint32Array(o),f=0,p=0,h=0,y=-1,b=-1;for(;f!==-1;){let m=f,g=p;d[m]=g,p++,i[g]=b,c[g]=h;let T=r[m];if(T!==-1){y=m,b=g,f=T,h++,h>u&&(u=h);continue}for(l[g]=p,f=n[m],s[g]=f===-1?-1:p;f===-1&&y!==-1;){l[b]=p;let S=n[y];s[b]=S===-1?-1:p,f=S,y=t[y],b=i[b],h--}}for(let m=0;m<a.length;m++)a[m]=d[a[m]];return{prefixSorted:i,subtreeRangeEndSorted:l,nextSiblingSorted:s,depthSorted:c,maxDepth:u,length:o,stackIndexToCallNodeIndex:a}}function qL(e,t,r,n,o,a){let i=e.length,s=e.category,l=e.frame,c=e.subcategory,u=t.innerWindowID,d=t.func,f=new Int32Array(o),p=new Int32Array(o),h=new Int32Array(o),y=new Float64Array(o),b=new Int32Array(o),m=new Uint8Array(o);for(let g=0;g<i;g++){let T=s[g],S=c[g],I=l[g],v=n[I],w=r[g];if(m[w]===0){f[w]=d[I],p[w]=T,h[w]=S,b[w]=v;let k=u[I];k!==null&&k!==0&&(y[w]=k),m[w]=1}else p[w]!==T?(p[w]=a,h[w]=0):h[w]!==S&&(h[w]=0),b[w]!==v&&(b[w]=-1)}return{funcCol:f,categoryCol:p,subcategoryCol:h,innerWindowIDCol:y,inlinedIntoCol:b}}function Vc(e,t,r){return new $c(e.getCallNodeTable(),e.getStackIndexToNonInvertedCallNodeIndex(),t,r)}function zL(e,t,r){for(;;){let n=r.func[e],o=r.func[t];if(n!==o)return n-o;if(e=r.prefix[e],t=r.prefix[t],e===t)break;if(e===-1)return-1;if(t===-1)return 1}return 0}function KL(e,t,r){let n=e;for(let o=0;o<t&&n!==null;o++)n=r[n];return n}function kS(e,t,r){let n=t.asInverted();return n!==null?JL(e,n,r):ZL(e,t,r)}function ZL(e,t,r){let n=t.getStackIndexToNonInvertedCallNodeIndex(),{frame:o,prefix:a,length:i}=r,s=new Int32Array(i);for(let l=0;l<i;l++){let c=-1;if(n[l]===e)c=o[l];else{let d=a[l];d!==null&&(c=s[d])}s[l]=c}return s}function JL(e,t,r){let n=t.depthForNode(e),[o,a]=t.getSuffixOrderIndexRangeForCallNode(e),i=t.getStackIndexToNonInvertedCallNodeIndex(),s=r.prefix,l=t.getSuffixOrderIndexes(),c=new Int32Array(r.length);for(let u=0;u<r.length;u++){let d=-1,f=i[u],p=l[f];if(p>=o&&p<a){let h=KL(u,n,s);h!==null&&(d=r.frame[h])}c[u]=d}return c}function jc(e,t){return e.map(r=>r===null?null:t[r])}function YL(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let n=1;e[r]===null&&(n=0),t[r]=n}return t}function XL(e,t,r){let o=r.getCallNodeTable().subtreeRangeEnd[t],a=e.length,i=new Uint8Array(a);for(let s=0;s<a;s++){let l=1,c=e[s];c!==null?c<t?l=2:c<o?l=1:l=3:l=0,i[s]=l}return i}function QL(e,t,r){let n=r.getSuffixOrderIndexes(),[o,a]=r.getSuffixOrderIndexRangeForCallNode(t),i=e.length,s=new Uint8Array(i);for(let l=0;l<i;l++){let c=1,u=e[l];if(u!==null){let d=n[u];d<o?c=2:d>=a&&(c=3)}else c=0;s[l]=c}return s}function _S(e,t,r){if(r===null||r===-1)return YL(t);let n=e.asInverted();return n!==null?QL(t,r,n):XL(t,r,e)}function qc(e){if(e.length===0)throw new Error("getLeafFuncIndex assumes that the path isn't empty.");return e[e.length-1]}function CS(e,t,r,n,o){return eD(t.getCallNodeIndexFromPath(e),t,r,n,o)}function eD(e,t,r,n,o){let{sampleCategories:a,sampleSubcategories:i}=o,s={selfTime:{value:0,breakdownByCategory:null},totalTime:{value:0,breakdownByCategory:null}},l=0;function c(p,h,y){p.value+=y;let b=a[h],m=i[h];p.breakdownByCategory===null&&(p.breakdownByCategory=r.map(g=>({entireCategoryValue:0,subcategoryBreakdown:Array(g.subcategories.length).fill(0)}))),p.breakdownByCategory[b].entireCategoryValue+=y,p.breakdownByCategory[b].subcategoryBreakdown[m]+=y}if(e===null)return{forPath:s,rootTime:l};let u=t.getCallNodeTable(),d=t.getStackIndexToNonInvertedCallNodeIndex(),f=t.asInverted();if(f!==null){let p=f.isRoot(e),h=f.getSuffixOrderIndexes(),[y,b]=f.getSuffixOrderIndexRangeForCallNode(e);for(let m=0;m<n.length;m++){let g=n.stack[m];if(g===null)continue;let T=d[g],S=h[T],I=n.weight?n.weight[m]:1;l+=Math.abs(I),S>=y&&S<b&&(c(s.totalTime,m,I),p&&(s.selfTime.value+=I))}}else{let p=u.subtreeRangeEnd[e];for(let h=0;h<n.length;h++){let y=n.stack[h];if(y===null)continue;let b=d[y],m=n.weight?n.weight[h]:1;l+=Math.abs(m),b===e&&c(s.selfTime,h,m),b>=e&&b<p&&c(s.totalTime,h,m)}}return{forPath:s,rootTime:l}}function ES(e){let t=e.length,r=e.maxDepth,n=e.depth,o=e.func,a=vr(t),i=new Int32Array(r+1),s=new Int32Array(r+1);e:for(let l=0;l<t;l++){let c=n[l],u=o[l];if(c===0){i[0]=u;continue}let d=s[c-1];for(let p=d;p>=0;p--)if(i[p]===u){s[c]=d;let h=l>>5,y=l&31;a[h]|=1<<y;continue e}let f=d+1;i[f]=u,s[c]=f}return a}function tD({samples:e,markers:t,jsAllocations:r,nativeAllocations:n},o){let a={start:1/0,end:-1/0};if(e.length){let{time:i,timeDeltas:s}=e;if(i!==void 0){let l=e.length-1;a.start=i[0],a.end=i[l]+o}else{let l=W(s);a.start=l[0];let c=0;for(let u=0;u<e.length;u++)c+=l[u];a.end=c+o}}else if(t.length)for(let i=0;i<t.length;i++){let s=t.startTime[i],l=t.endTime[i];switch(t.phase[i]){case 0:case 2:{let u=W(s);a.start=Math.min(a.start,u),a.end=Math.max(a.end,u+o);break}case 3:{let u=W(l);a.start=Math.min(a.start,u),a.end=Math.max(a.end,u+o);break}case 1:{let u=W(s),d=W(l);a.start=Math.min(a.start,u,d),a.end=Math.max(a.end,u+o,d+o);break}default:throw new Error("Unhandled marker phase type.")}}if(r){let i=r.length-1;a.start=Math.min(a.start,r.time[0]),a.end=Math.max(a.end,r.time[i]+o)}if(n){let i=n.length-1;a.start=Math.min(a.start,n.time[0]),a.end=Math.max(a.end,n.time[i]+o)}return a}var Fa=(0,xS.default)(tD,{cache:new IS.default});function Zf(e){let t={start:1/0,end:-1/0};return e.meta.profilingStartTime!==void 0&&e.meta.profilingEndTime?{start:e.meta.profilingStartTime,end:e.meta.profilingEndTime}:(e.threads.forEach(r=>{let n=Fa(r,e.meta.interval);t.start=Math.min(t.start,n.start),t.end=Math.max(t.end,n.end)}),t)}function gs(e){switch(e){case"cpp":case"js":return e;default:return"combined"}}function NS(e,t,r,n,o){switch(o){case"cpp":return TS(e,t,a=>{if(r.isJS[a])return!1;let i=n.getString(r.name[a]);return!(r.resource[a]===-1&&i.startsWith("0x"))});case"js":return TS(e,t,a=>r.isJS[a]||r.relevantForJS[a]);default:return{newStackTable:e,effectOnThreadData:{}}}}function Oa(e,t,r){let n=t.length,o=new Array(n),a=new Uint8Array(n),i=e.subcategory instanceof Uint16Array?new Uint16Array(n):new Uint8Array(n),s=0;for(let l=0;l<e.length;l++){if(!It(r,l))continue;let c=s++;o[c]=e.frame[l],a[c]=e.category[l],i[c]=e.subcategory[l]}return{frame:o,prefix:t,length:n,category:a,subcategory:i}}function TS(e,t,r){return Gt("_computeTransformOutputForMergingFuncs",()=>{let n=new Array,o=new Int32Array(e.length),a=vr(e.length);for(let s=0;s<e.length;s++){let l=e.prefix[s],c=e.frame[s],u=t.func[c],d=l===null?-1:o[l];if(r(u)){let f=n.length;n[f]=d!==-1?d:null,o[s]=f,bt(a,s)}else o[s]=d}return{newStackTable:Oa(e,n,a),effectOnThreadData:{oldStackToNewStack:o}}})}function Qn(e,t){let{newStackTable:r,effectOnThreadData:n}=e;return $r(t,r,o=>{if(o===null)return null;let{oldStackToNewStack:a,dropIfOldStackIsNot:i}=n;if(i!==void 0&&!It(i,o))return null;if(a!==void 0){let s=a[o];return s!==-1?s:null}return o})}function AS(e,t,r,n,o,a,i){return Gt("computeTransformOutputForSearchStringFilter",()=>{if(!i)return{newStackTable:e,effectOnThreadData:{}};let s=i.filter(l=>l).reduce((l,c)=>{let u=rD(e,t,r,n,o,a,c);return l!==void 0?yS(u,l):u},void 0);return{newStackTable:e,effectOnThreadData:{dropIfOldStackIsNot:s}}})}function rD(e,t,r,n,o,a,i){let s=i.toLowerCase();function l(d){let f=r.name[d];if(a.getString(f).toLowerCase().includes(s))return!0;let h=r.source[d];if(h!==null){let b=o.filename[h];if(a.getString(b).toLowerCase().includes(s))return!0}let y=r.resource[d];if(y!==-1){let b=n.name[y];if(a.getString(b).toLowerCase().includes(s))return!0}return!1}let c=vr(r.length);for(let d=0;d<r.length;d++)l(d)&&bt(c,d);let u=vr(e.length);for(let d=0;d<e.length;d++){let f=e.prefix[d];if(f!==null&&It(u,f))bt(u,d);else{let p=t.func[e.frame[d]];It(c,p)&&bt(u,d)}}return u}function ys(e){let{time:t,timeDeltas:r}=e;return t??pS(W(r))}function Jf(e,t,r){let n=e.length,{category:o,subcategory:a}=t,i=new Uint8Array(n),s=a instanceof Uint16Array?new Uint16Array(n):new Uint8Array(n);for(let l=0;l<n;l++){let c=e[l];c!==null?(i[l]=o[c],s[l]=a[c]):(i[l]=r,s[l]=0)}return{sampleCategories:i,sampleSubcategories:s}}function eo(e,t){let{stackTable:r,frameTable:n,funcTable:o,stringArray:a}=t;if(e===void 0||e.length===0||r.length===0)return!1;let i=e.find(s=>s!==null);if(i==null)return!1;if(r.prefix[i]===null){let s=r.frame[i],l=n.func[s],c=o.name[l];if(a[c]==="(root)")return e.some(u=>u!==null&&u!==i)}return!0}function wn(e,t,r){return Yf(e.time,t,r)}function Yf(e,t,r){let n=Ma(e,t),o=Ma(e,r,n);return[n,o]}function Xf(e,t,r){return PS(e.time,t,r)}function PS(e,t,r){let[n,o]=Yf(e,t,r);return n>0&&n--,o<e.length&&o++,[n,o]}function Qf(e,t,r){let{samples:n,jsAllocations:o,nativeAllocations:a}=e,[i,s]=wn(n,t,r),l={length:s-i,time:n.time.slice(i,s),weight:n.weight?n.weight.slice(i,s):null,weightType:n.weightType,stack:n.stack.slice(i,s),threadCPUPercent:n.threadCPUPercent.subarray(i,s+1),hasCPUDeltas:n.hasCPUDeltas,category:n.category.subarray(i,s),subcategory:n.subcategory.subarray(i,s)};n.eventDelay?l.eventDelay=n.eventDelay.slice(i,s):n.responsiveness&&(l.responsiveness=n.responsiveness.slice(i,s)),n.argumentValues&&(l.argumentValues=n.argumentValues.slice(i,s)),n.threadId&&(l.threadId=n.threadId.slice(i,s));let c={...e,samples:l};if(o){let[u,d]=wn(o,t,r);c.jsAllocations={time:o.time.slice(u,d),className:o.className.slice(u,d),typeName:o.typeName.slice(u,d),coarseType:o.coarseType.slice(u,d),weight:o.weight.slice(u,d),weightType:o.weightType,inNursery:o.inNursery.slice(u,d),stack:o.stack.slice(u,d),length:d-u}}if(a){let[u,d]=wn(a,t,r),f=a.time.slice(u,d),p=a.weight.slice(u,d),h=a.stack.slice(u,d),y=d-u;"memoryAddress"in a?c.nativeAllocations={time:f,weight:p,weightType:a.weightType,stack:h,memoryAddress:a.memoryAddress.slice(u,d),threadId:a.threadId.slice(u,d),length:y}:c.nativeAllocations={time:f,weight:p,weightType:a.weightType,stack:h,length:y}}return c}function ep(e,t,r){let{samples:n,jsAllocations:o,nativeAllocations:a}=e,i=ys(n),[s,l]=Yf(i,t,r),c={length:l-s,time:i.slice(s,l),weight:n.weight?n.weight.slice(s,l):null,weightType:n.weightType,stack:n.stack.slice(s,l)};n.eventDelay?c.eventDelay=n.eventDelay.slice(s,l):n.responsiveness&&(c.responsiveness=n.responsiveness.slice(s,l)),n.threadCPUDelta&&(c.threadCPUDelta=n.threadCPUDelta.slice(s,l)),n.argumentValues&&(c.argumentValues=n.argumentValues.slice(s,l)),n.threadId&&(c.threadId=n.threadId.slice(s,l));let u={...e,samples:c};if(o){let[d,f]=wn(o,t,r);u.jsAllocations={time:o.time.slice(d,f),className:o.className.slice(d,f),typeName:o.typeName.slice(d,f),coarseType:o.coarseType.slice(d,f),weight:o.weight.slice(d,f),weightType:o.weightType,inNursery:o.inNursery.slice(d,f),stack:o.stack.slice(d,f),length:f-d}}if(a){let[d,f]=wn(a,t,r),p=a.time.slice(d,f),h=a.weight.slice(d,f),y=a.stack.slice(d,f),b=f-d;"memoryAddress"in a?u.nativeAllocations={time:p,weight:h,weightType:a.weightType,stack:y,memoryAddress:a.memoryAddress.slice(d,f),threadId:a.threadId.slice(d,f),length:b}:u.nativeAllocations={time:p,weight:h,weightType:a.weightType,stack:y,length:b}}return u}function RS(e,t,r){let n={...e},{samples:o}=n,a=ys(o),[i,s]=PS(a,t,r);return n.samples={length:s-i,time:a.slice(i,s),count:o.count.slice(i,s),number:o.number?o.number.slice(i,s):void 0,argumentValues:o.argumentValues?o.argumentValues.slice(i,s):void 0},n}function MS(e,t){if(!e.eventDelay)throw new Error("processEventDelays step should not be called for older profiles");let r=new Float32Array(e.length),n=W(e.eventDelay,"eventDelays field is not present in this profile"),o=e.time[0],a=0;for(let c=1;c<e.length;c++){let u=n[c],d=n[c+1]||0,f=e.time[c];if(u==null||u<d)continue;let p=Math.trunc(u/t),h=f-u,y=c-p;if(y<0){o=f,a=c;continue}if(a===y){o=h,a=y;continue}let b=f-o;for(let m=a+1;m<=y;m++)r[m]+=b,b-=e.time[m+1]-e.time[m];o=h,a=y}let i=Number.MAX_SAFE_INTEGER,s=0;for(let c of r)c&&(i=Math.min(c,i),s=Math.max(c,s));let l=s-i;return{eventDelays:r,minDelay:i,maxDelay:s,delayRange:l}}function FS(e,t){let r=-1,n=t.getCallNodeTable(),o=t.getStackIndexToNonInvertedCallNodeIndex();for(let a=0;a<e.length;a++){let i=e.stack[a];if(i===null)continue;let s=o[i],l=n.depth[s];l>r&&(r=l)}return r+1}function zc(e,t,r,n,o){let{responsiveness:a,eventDelay:i,argumentValues:s,stack:l,threadCPUDelta:c,weight:u,weightType:d,threadId:f,length:p}=e,h=e.time!==void 0?Gc(e.time):W(e.timeDeltas),y=r!==void 0&&c!==void 0?mS(c,h,n):null,b=y!==null,m=y??new Uint8Array(e.length+1).fill(100),g=ys(e),{sampleCategories:T,sampleSubcategories:S}=Jf(e.stack,t,o);return{responsiveness:a,eventDelay:i,argumentValues:s,stack:l,weight:u,weightType:d,threadId:f,length:p,time:g,threadCPUPercent:m,hasCPUDeltas:b,category:T,subcategory:S}}function OS(e,t,r,n,o,a,i,s,l,c){let{processType:u,processStartupTime:d,processShutdownTime:f,registerTime:p,unregisterTime:h,pausedRanges:y,showMarkersInTimeline:b,name:m,isMainThread:g,"eTLD+1":T,processName:S,isJsTracer:I,pid:v,tid:w,jsAllocations:k,nativeAllocations:N,markers:R,jsTracer:F,isPrivateBrowsing:G,userContextId:B,tracedObjectShapes:Z}=e;return{processType:u,processStartupTime:d,processShutdownTime:f,registerTime:p,unregisterTime:h,pausedRanges:y,showMarkersInTimeline:b,name:m,isMainThread:g,"eTLD+1":T,processName:S,isJsTracer:I,pid:v,tid:w,jsAllocations:k,nativeAllocations:N,markers:R,jsTracer:F,isPrivateBrowsing:G,userContextId:B,tracedObjectShapes:Z,samples:t,stackTable:r,frameTable:n,funcTable:o,resourceTable:i,nativeSymbols:a,stringTable:s,sources:l,tracedValuesBuffer:c}}function nD(e){let{length:t,frame:r,prefix:n,category:o,subcategory:a}=e;if(r.length!==t)throw new Error(`StackTable frame column length ${r.length} does not match stackTable.length ${t}`);if(n.length!==t)throw new Error(`StackTable prefix column length ${n.length} does not match stackTable.length ${t}`);if(o.length!==t)throw new Error(`StackTable category column length ${o.length} does not match stackTable.length ${t}`);if(a.length!==t)throw new Error(`StackTable subcategory column length ${a.length} does not match stackTable.length ${t}`)}function tp(e,t,r,n,o){nD(t);let{jsAllocations:a,nativeAllocations:i,samples:s,markers:l}=e,c={...s,stack:r(s.stack,s.time)},u={...l,data:o(l.data)},d={...e,samples:c,markers:u,stackTable:t};return a&&(d.jsAllocations={...a,stack:n(a.stack,a.time)}),i&&(d.nativeAllocations={...i,stack:n(i.stack,i.time)}),d}function $r(e,t,r){function n(o){return o&&"cause"in o&&o.cause?{...o,cause:{...o.cause,stack:r(o.cause.stack)}}:o}return tp(e,t,(o,a)=>o.map(i=>r(i)),(o,a)=>o.map(i=>r(i)),o=>o.map(n))}function rp(e,t){return LS(e,t,t)}function LS(e,t,r){return e.map(n=>oD(n,t,r))}function oD(e,t,r){function n(d){return d&&"cause"in d&&d.cause?{...d,cause:{...d.cause,stack:r(d.cause.stack)}}:d}let{jsAllocations:o,nativeAllocations:a,samples:i,markers:s}=e,l={...i,stack:i.stack.map(t)},c={...s,data:s.data.map(n)},u={...e,samples:l,markers:c};return o&&(u.jsAllocations={...o,stack:o.stack.map(r)}),a&&(u.nativeAllocations={...a,stack:a.stack.map(r)}),u}function SS(e){return t=>{if(t===null)return null;let r=e.get(t);if(r===void 0)throw new Error("Could not find a stack when converting from an old stack to new stack.");return r}}function nr(e,t){let r,n;switch(t.name){case"GeckoMain":{if(t["eTLD+1"])r=t["eTLD+1"],n=e.filter(o=>o.name==="GeckoMain"&&o["eTLD+1"]===r);else if(t.processName)r=t.processName,n=e.filter(o=>o.name==="GeckoMain"&&o.processName===r);else switch(t.processType){case"default":r="Parent Process";break;case"gpu":r="GPU Process";break;case"rdd":r="Remote Data Decoder";break;case"tab":{r="Content Process",n=e.filter(o=>o.name==="GeckoMain"&&o.processType==="tab");break}case"plugin":r="Plugin Process";break;case"socket":r="Socket Process";break;default:}break}default:}if(r||(r=t.name),n&&n.length>1){let o=1+n.indexOf(t);r+=` (${o}/${n.length})`}return r}function DS(e,t){let r=`${t}
623
+ `;var QA=ce(require("net")),Li=ce(require("fs"));var Se=ce(Kt());var kS=ce(Ia()),_S=ce(Wf()),CS=ce(Ir());nr();function lS(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=e.length-1;r>=0;r--)if(e[r]!==t[r])return!1;return!0}function In(e){return e.join("-")}function cS(e,t){return e+"-"+t}function uS(e){return""+e}var $t=class e{_table;constructor(t){if(t instanceof e){this._table=new Map(t._table);return}if(this._table=new Map,!!t)for(let r of t)this._table.set(In(r),r)}add(t){return this._table.set(In(t),t),this}clear(){this._table.clear()}delete(t){return this._table.delete(In(t))}*values(){yield*this._table.values()}*entries(){for(let t of this)yield[t,t]}forEach(t,r){for(let n of this)t.call(r,n,n,this)}has(t){return this._table.has(In(t))}get size(){return this._table.size}*[Symbol.iterator](){yield*this._table.values()}};xe();function Yf(e,t,r=0,n=e.length){if(r<0||r>e.length||n<0||n>e.length)throw new TypeError("low and high must lie within the array's range");for(;r<n;){let o=r+n>>1;t<e[o]?n=o:r=o+1}return r}function Uc(e,t,r,n=0,o=e.length){if(n<0||n>e.length||o<0||o>e.length)throw new TypeError("low and high must lie within the array's range");for(;n<o;){let a=n+o>>1;t<r(e[a])?o=a:n=a+1}return n}function mS(e,t,r,n=0,o=e.length){if(n<0||n>e.length||o<0||o>e.length)throw new TypeError("low and high must lie within the array's range");for(;n<o;){let a=n+o>>1;t<r(e[a])?o=a:n=a+1}return n}function Fa(e,t,r=0,n=e.length){if(r<0||r>e.length||n<0||n>e.length)throw new TypeError("low and high must lie within the array's range");for(;r<n;){let o=r+n>>1;t<=e[o]?n=o:r=o+1}return r}var $c=class{_callNodeTable;_stackIndexToNonInvertedCallNodeIndex;_cache=new Map;constructor(t,r){this._callNodeTable=t,this._stackIndexToNonInvertedCallNodeIndex=r}isInverted(){return!1}asInverted(){return null}getCallNodeTable(){return this._callNodeTable}getStackIndexToNonInvertedCallNodeIndex(){return this._stackIndexToNonInvertedCallNodeIndex}getCallNodePathFromIndex(t){if(t===null||t===-1)return[];let r=[],n=t;for(;n!==-1;)r.push(this._callNodeTable.func[n]),n=this._callNodeTable.prefix[n];return r.reverse(),r}getCallNodeIndexFromPath(t){let r=this._cache,n=In(t),o=r.get(n);if(o!==void 0)return o;let a=[n],i=t.length,s;for(;--i>0;){let l=t.slice(0,i),c=In(l);if(s=r.get(c),s!==void 0)break;a.push(c)}for(s===void 0&&(s=-1);i<t.length;){let l=t[i],c=this.getCallNodeIndexFromParentAndFunc(s,l);if(c===null)return null;let u=a.pop();r.set(u,c),s=c,i++}return s<0?null:s}getCallNodeIndexFromParentAndFunc(t,r){let n=this._callNodeTable;if(t===-1){if(n.length===0)return null}else if(n.subtreeRangeEnd[t]===t+1)return null;let o=t+1;for(let a=o;a!==-1;a=n.nextSibling[a])if(n.func[a]===r)return a;return null}prefixForNode(t){return this._callNodeTable.prefix[t]}funcForNode(t){return this._callNodeTable.func[t]}categoryForNode(t){return this._callNodeTable.category[t]}subcategoryForNode(t){return this._callNodeTable.subcategory[t]}innerWindowIDForNode(t){return this._callNodeTable.innerWindowID[t]}depthForNode(t){return this._callNodeTable.depth[t]}sourceFramesInlinedIntoSymbolForNode(t){return this._callNodeTable.sourceFramesInlinedIntoSymbol[t]}};function DL(e,t,r,n){let o=t.length,a=new Int32Array(o),i=new Int32Array(o),s=new Float64Array(o),l=new Int32Array(o),c=0;for(let u=0;u<o;u++){let d=c,f=t[u];if(c=f,d===f){l[u]=-2;continue}let p=r[d],h=e.category[p],y=e.subcategory[p],b=e.innerWindowID[p],g=e.sourceFramesInlinedIntoSymbol[p];for(let m=d+1;m<f;m++){let T=r[m];h!==e.category[T]?(h=n,y=0):y!==e.subcategory[T]&&(y=0),g!==e.sourceFramesInlinedIntoSymbol[T]&&(g=-1)}a[u]=h,i[u]=y,s[u]=b,l[u]=g}return{category:a,subcategory:i,innerWindowID:s,sourceFramesInlinedIntoSymbol:l,suffixOrderIndexRangeEnd:t,length:o}}function BL(){return{prefix:[],func:[],pathHash:[],category:[],subcategory:[],innerWindowID:[],sourceFramesInlinedIntoSymbol:[],suffixOrderIndexRangeStart:[],suffixOrderIndexRangeEnd:[],deepNodes:[],depth:[],length:0}}function UL(e,t){let r=new Uint32Array(t),n=e.length,o=e.func;for(let d=0;d<n;d++){let f=o[d];r[f]++}let a=r,i=0;for(let d=0;d<a.length;d++){let f=r[d];a[d]=i,i+=f}let s=a,l=new Uint32Array(n),c=new Uint32Array(n);for(let d=0;d<n;d++){let f=o[d],p=s[f]++;l[p]=d,c[d]=p}return{suffixOrderedCallNodes:l,suffixOrderIndexes:c,rootSuffixOrderIndexRangeEndCol:a}}var Gc=class{_callNodeTable;_invertedRootCallNodeTable;_invertedNonRootCallNodeTable;_stackIndexToNonInvertedCallNodeIndex;_rootCount;_suffixOrderedCallNodes;_suffixOrderIndexes;_defaultCategory;_cache=new Map;_children=new Map;constructor(t,r,n,o){this._callNodeTable=t,this._stackIndexToNonInvertedCallNodeIndex=r;let{suffixOrderedCallNodes:a,suffixOrderIndexes:i,rootSuffixOrderIndexRangeEndCol:s}=UL(t,o);this._suffixOrderedCallNodes=a,this._suffixOrderIndexes=i,this._defaultCategory=n,this._rootCount=o;let l=DL(t,s,a,n);this._invertedRootCallNodeTable=l,this._invertedNonRootCallNodeTable=BL()}isInverted(){return!0}asInverted(){return this}getCallNodeTable(){return this._callNodeTable}getStackIndexToNonInvertedCallNodeIndex(){return this._stackIndexToNonInvertedCallNodeIndex}getSuffixOrderedCallNodes(){return this._suffixOrderedCallNodes}getSuffixOrderIndexes(){return this._suffixOrderIndexes}getFuncCount(){return this._rootCount}isRoot(t){return t<this._rootCount}getSuffixOrderIndexRangeForCallNode(t){if(t<this._rootCount){let a=t,i=a===0?0:this._invertedRootCallNodeTable.suffixOrderIndexRangeEnd[a-1],s=this._invertedRootCallNodeTable.suffixOrderIndexRangeEnd[a];return[i,s]}let r=t-this._rootCount,n=this._invertedNonRootCallNodeTable.suffixOrderIndexRangeStart[r],o=this._invertedNonRootCallNodeTable.suffixOrderIndexRangeEnd[r];return[n,o]}_createChildren(t){let r=this._takeDeepNodesForInvertedNode(t),n=this._computeChildrenInfo(t,r);return n===null?[]:(this._applyRefinedSuffixOrderForNode(t,n.selfNodesWhichEndAtParent,n.childrenSelfNodes),this._createChildrenForInfo(n,t))}_computeChildrenInfo(t,r){let n=r.length,[o,a]=this.getSuffixOrderIndexRangeForCallNode(t),i=this._suffixOrderedCallNodes.subarray(o,a);if(i.length!==r.length)throw new Error("indexes out of sync");let s=[],l=[],c=[],u=[],d=new Map,f=this._callNodeTable;for(let E=0;E<n;E++){let R=i[E],F=r[E],G=f.prefix[F];if(G!==-1){let B=f.func[G],Z=d.get(B);Z===void 0?d.set(B,1):d.set(B,Z+1),s.push(R),l.push(G),c.push(B)}else u.push(R)}let p=u.length,h=l.length;if(p+h!==n)throw new Error("indexes out of sync");if(p===n)return null;let y=new Uint32Array(d.keys());y.sort();let b=y.length,g=new Uint32Array(b),m=new Uint32Array(b),T=new Map,S=0;for(let E=0;E<b;E++){let R=y[E];T.set(R,E);let F=W(d.get(R));m[E]=F,g[E]=S,S+=F}let I=g,v=new Uint32Array(h),w=new Uint32Array(h);for(let E=0;E<h;E++){let R=c[E],F=W(T.get(R)),G=s[E],B=l[E],Z=I[F]++;v[Z]=B,w[Z]=G}let k=o+p;return{funcPerChild:y,deepNodeCountPerChild:m,childrenSuffixOrderIndexRangeStart:k,selfNodesWhichEndAtParent:u,childrenSelfNodes:w,childrenDeepNodes:v}}_applyRefinedSuffixOrderForNode(t,r,n){let[o,a]=this.getSuffixOrderIndexRangeForCallNode(t),i=this._suffixOrderIndexes,s=this._suffixOrderedCallNodes,l=o;for(let c=0;c<r.length;c++){let u=r[c],d=l++;i[u]=d,s[d]=u}for(let c=0;c<n.length;c++){let u=n[c],d=l++;i[u]=d,s[d]=u}if(l!==a)throw new Error("Indexes out of sync")}_createChildrenForInfo(t,r){let n=this._pathHashForNode(r),o=this.depthForNode(r)+1,{funcPerChild:a,deepNodeCountPerChild:i,childrenSuffixOrderIndexRangeStart:s,childrenDeepNodes:l}=t,c=a.length,u=[],d=0,f=s;for(let p=0;p<c;p++){let h=a[p],y=i[p],b=f,g=l.subarray(d,d+y);f+=y,d+=y;let m=this._createNonRootNode(h,g,b,o,r,n);u.push(m)}return u}_createNonRootNode(t,r,n,o,a,i){let s=r.length,l=this._callNodeTable,c=r[0],u=l.category[c],d=l.subcategory[c],f=l.innerWindowID[c],p=l.sourceFramesInlinedIntoSymbol[c],h=this._invertedNonRootCallNodeTable;for(let m=1;m<s;m++){let T=r[m];u!==l.category[T]?(u=this._defaultCategory,d=0):d!==l.subcategory[T]&&(d=0),p!==l.sourceFramesInlinedIntoSymbol[T]&&(p=-1)}let y=h.length++,b=this._rootCount+y,g=cS(i,t);return h.prefix[y]=a,h.func[y]=t,h.pathHash[y]=g,h.category[y]=u,h.subcategory[y]=d,h.innerWindowID[y]=f,h.sourceFramesInlinedIntoSymbol[y]=p,h.deepNodes[y]=r,h.suffixOrderIndexRangeStart[y]=n,h.suffixOrderIndexRangeEnd[y]=n+s,h.depth[y]=o,this._cache.set(g,b),b}getChildren(t){let r=this._children.get(t);return r===void 0&&(r=this._createChildren(t),this._children.set(t,r)),r}_takeDeepNodesForInvertedNode(t){if(t<this._rootCount){let[o,a]=this.getSuffixOrderIndexRangeForCallNode(t);return this._suffixOrderedCallNodes.subarray(o,a)}let r=t-this._rootCount,n=W(this._invertedNonRootCallNodeTable.deepNodes[r],"_takeDeepNodesForInvertedNode should only be called once for each node, and only after its parent created its children.");return this._invertedNonRootCallNodeTable.deepNodes[r]=null,n}getCallNodePathFromIndex(t){if(t===null||t===-1)return[];let r=this._rootCount,n=[],o=t;for(;o>=r;){let i=o-r;n.push(this._invertedNonRootCallNodeTable.func[i]),o=this._invertedNonRootCallNodeTable.prefix[i]}let a=o;return n.push(a),n.reverse(),n}getCallNodeIndexFromPath(t){if(t.length===0)return null;if(t.length===1)return t[0];let r=t.length-1,n=this._findDeepestExistingInvertedAncestorNode(t),o=this.depthForNode(n);for(;o<r;){let a=t[o+1],i=this.getChildren(n),s=this._getChildWithFunc(i,a);if(s===null)return null;n=s,o++}return n}_findDeepestExistingInvertedAncestorNode(t){let r=this._cache.get(In(t));if(r!==void 0)return r;let n=t[0],o=1,a=t.length-1;for(;o<a;){let i=o+a>>1,s=t.slice(0,i+1),l=this._cache.get(In(s));l!==void 0?(n=l,o=i+1):a=i}return n}_getChildWithFunc(t,r){let n=Uc(t,r,a=>this.funcForNode(a));if(n===0)return null;let o=t[n-1];return this.funcForNode(o)!==r?null:o}getCallNodeIndexFromParentAndFunc(t,r){if(t===-1)return r;let n=this.getChildren(t);return this._getChildWithFunc(n,r)}_pathHashForNode(t){if(t<this._rootCount)return uS(t);let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.pathHash[r]}prefixForNode(t){if(t<this._rootCount)return-1;let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.prefix[r]}funcForNode(t){if(t<this._rootCount)return t;let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.func[r]}categoryForNode(t){if(t<this._rootCount){let n=t;return this._invertedRootCallNodeTable.category[n]}let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.category[r]}subcategoryForNode(t){if(t<this._rootCount){let n=t;return this._invertedRootCallNodeTable.subcategory[n]}let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.subcategory[r]}innerWindowIDForNode(t){if(t<this._rootCount){let n=t;return this._invertedRootCallNodeTable.innerWindowID[n]}let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.innerWindowID[r]}depthForNode(t){if(t<this._rootCount)return 0;let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.depth[r]}sourceFramesInlinedIntoSymbolForNode(t){if(t<this._rootCount){let n=t;return this._invertedRootCallNodeTable.sourceFramesInlinedIntoSymbol[n]}let r=t-this._rootCount;return this._invertedNonRootCallNodeTable.sourceFramesInlinedIntoSymbol[r]}};xe();function gS(e){let t=new Array(e.length),r=0;for(let n=0;n<e.length;n++){let o=r+e[n];t[n]=o,r=o}return t}function Wc(e){let t=new Array(e.length),r=0;for(let n=0;n<e.length;n++){let o=e[n];t[n]=o-r,r=o}return t}function $L(e){let t=0;for(let r=0;r<e.length;r++){let{samples:n}=e[r],{threadCPUDelta:o}=n;if(!o)continue;let a=n.time!==void 0?Wc(n.time):W(n.timeDeltas);for(let i=1;i<n.length;i++){let s=a[i];if(s!==0){let l=(o[i]||0)/s;t=Math.max(t,l)}}}return t}function yS(e){let t=e.meta.sampleUnits;if(!t)return 1;let r=t.threadCPUDelta;switch(r){case"\xB5s":return 1e3;case"ns":return 1e6;case"variable CPU cycles":return $L(e.threads);default:throw ae(r,"Unhandled threadCPUDelta unit in computeReferenceCPUDeltaPerMs.")}}function bS(e,t,r){let n=new Uint8Array(e.length+1);n[0]=0;for(let o=1;o<e.length;o++){let a=r*t[o],i=e[o];if(i===null||a===0){n[o]=100;continue}n[o]=i<=a?Math.round(100*i/a):100}return n}rr();function hs(e){let t=self.ga;t&&t("send",e)}var WL=3,TS={},HL=0;function Gt(e,t){if(typeof performance<"u"){let r;process.env.NODE_ENV==="development"&&performance.mark&&(r=`time-code-${HL++}`,performance.mark(r));let n=performance.now(),o=t(),a=Math.round(performance.now()-n);process.env.NODE_ENV==="development"&&(performance.measure&&r&&performance.measure(`TimeCode: ${e}`,r),console.log(`[timing] %c"${e}"`,"font-weight: bold; color: #f0a",`took ${a}ms to execute.`));let i=TS[e]||0;return i<WL&&(TS[e]=1+i,hs({hitType:"timing",timingCategory:"timeCode",timingVar:e,timingValue:a})),o}return t()}function vr(e){let n=(e-1>>5)+1;return new Int32Array(n)}function bt(e,t){let r=t>>5,n=t&31;if(r>=e.length)throw new Hc(t);e[r]|=1<<n}function It(e,t){let r=t>>5,n=t&31;if(r>=e.length)throw new Hc(t);return(e[r]&1<<n)!==0}function SS(e,t){let r=e.length,n=new Int32Array(r);for(let o=0;o<r;o++)n[o]=e[o]&t[o];return n}function xS(e,t){let r=e.length,n=new Int32Array(r);for(let o=0;o<r;o++)n[o]=e[o]|t[o];return n}var Hc=class extends Error{name="BitSetOutOfBoundsError";bitIndex;constructor(t){super(`Bit index ${t} is out of bounds`),this.bitIndex=t}};xe();var VL=/^(?<vcs>hg|git):(?<repo>[^:]*):(?<path>[^:]*):(?<rev>.*)$/,jL=/^s3:(?<bucket>[^:]*):(?<digest>[0-9a-f]*)\/(?<path>[^:]*):$/,qL=/^cargo:(?<registry>[^:]*):(?<crate>[^/]+)-(?<version>[0-9]+\.[0-9]+\.[0-9]+):(?<path>[^:]*)$/;function Vc(e){let t=VL.exec(e);if(t!==null&&t.groups){let{vcs:o,repo:a,path:i,rev:s}=t.groups;if(o!=="hg"&&o!=="git")throw new Error('The regexp ensures that "vcs" is "hg" or "git", so this cannot happen.');return{type:o,repo:a,path:i,rev:s}}let r=jL.exec(e);if(r!==null&&r.groups){let{bucket:o,digest:a,path:i}=r.groups;return{type:"s3",bucket:o,digest:a,path:i}}let n=qL.exec(e);if(n!==null&&n.groups){let{registry:o,crate:a,version:i,path:s}=n.groups;return{type:"cargo",registry:o,crate:a,version:i,path:`${a}-${i}/${s}`}}return{type:"normal",path:e}}function IS(e){switch(e.type){case"hg":{let{repo:t,rev:r,path:n}=e;return{type:"CORS_ENABLED_SINGLE_FILE",url:`https://${t}/raw-file/${r}/${n}`}}case"git":{let{repo:t,rev:r,path:n}=e,o=t.indexOf("/");if(o===-1)return{type:"NO_KNOWN_CORS_URL"};let a=t.slice(0,o),i=t.slice(o+1);return a==="github.com"?{type:"CORS_ENABLED_SINGLE_FILE",url:`https://raw.githubusercontent.com/${i}/${r}/${n}`}:a.endsWith(".googlesource.com")?{type:"CORS_ENABLED_SINGLE_FILE",url:`https://googlesource-proxy.mstange.workers.dev/${a.slice(0,a.length-17)}/${i}.git/+/${r}/${n}`}:{type:"NO_KNOWN_CORS_URL"}}case"s3":{let{bucket:t,digest:r,path:n}=e;return{type:"CORS_ENABLED_SINGLE_FILE",url:`https://${t}.s3.amazonaws.com/${r}/${n}`}}case"cargo":{let{crate:t,version:r,path:n}=e;return{type:"CORS_ENABLED_ARCHIVE",archiveUrl:`https://crates.io/api/v1/crates/${t}/${r}/download`,pathInArchive:n}}case"normal":return{type:"NO_KNOWN_CORS_URL"};default:throw ae(e,"unhandled ParsedFile type")}}xe();function ES(e,t,r){let{callNodeTable:n,stackIndexToCallNodeIndex:o}=KL(e,t,r);return new $c(n,o)}function zL(e){let t=e.length,r=e.inlineDepth,n=e.nativeSymbol,o=new Int32Array(t);for(let a=0;a<t;a++){let i=-2;if(r[a]>0){let s=n[a];s!==null&&(i=s)}o[a]=i}return o}function KL(e,t,r){if(e.length===0)return{callNodeTable:sS(),stackIndexToCallNodeIndex:new Int32Array(0)};let n=ZL(e,t),o=JL(n),{stackIndexToCallNodeIndex:a}=o,i=zL(t),s=YL(e,t,a,i,n.length,r);return{callNodeTable:{prefix:o.prefixSorted,nextSibling:o.nextSiblingSorted,subtreeRangeEnd:o.subtreeRangeEndSorted,func:s.funcCol,category:s.categoryCol,subcategory:s.subcategoryCol,innerWindowID:s.innerWindowIDCol,sourceFramesInlinedIntoSymbol:s.inlinedIntoCol,depth:o.depthSorted,maxDepth:o.maxDepth,length:n.length},stackIndexToCallNodeIndex:a}}function ZL(e,t){let r=new Int32Array(e.length),n=[],o=[],a=[],i=[],s=0,l=[],c=-1;for(let u=0;u<e.length;u++){let d=e.prefix[u],f=d===null?-1:r[d],p=e.frame[u],h=t.func[p],y=-1;if(u!==0){let b=f===-1?0:o[f];for(let g=b;g!==-1;g=a[g])if(i[g]===h){y=g;break}}if(y!==-1){r[u]=y;continue}if(y=s++,r[u]=y,n[y]=f,i[y]=h,o[y]=-1,a[y]=-1,l[y]=-1,f===-1)c!==-1&&(a[c]=y),c=y;else{let b=l[f];b===-1?o[f]=y:a[b]=y,l[f]=y}}return{prefix:n,firstChild:o,nextSibling:a,length:s,stackIndexToCallNodeIndex:r}}function JL(e){let{prefix:t,firstChild:r,nextSibling:n,length:o,stackIndexToCallNodeIndex:a}=e,i=new Int32Array(o),s=new Int32Array(o),l=new Uint32Array(o),c=new Int32Array(o),u=0;if(o===0)return{prefixSorted:i,subtreeRangeEndSorted:l,nextSiblingSorted:s,depthSorted:c,maxDepth:u,length:o,stackIndexToCallNodeIndex:a};let d=new Uint32Array(o),f=0,p=0,h=0,y=-1,b=-1;for(;f!==-1;){let g=f,m=p;d[g]=m,p++,i[m]=b,c[m]=h;let T=r[g];if(T!==-1){y=g,b=m,f=T,h++,h>u&&(u=h);continue}for(l[m]=p,f=n[g],s[m]=f===-1?-1:p;f===-1&&y!==-1;){l[b]=p;let S=n[y];s[b]=S===-1?-1:p,f=S,y=t[y],b=i[b],h--}}for(let g=0;g<a.length;g++)a[g]=d[a[g]];return{prefixSorted:i,subtreeRangeEndSorted:l,nextSiblingSorted:s,depthSorted:c,maxDepth:u,length:o,stackIndexToCallNodeIndex:a}}function YL(e,t,r,n,o,a){let i=e.length,s=e.category,l=e.frame,c=e.subcategory,u=t.innerWindowID,d=t.func,f=new Int32Array(o),p=new Int32Array(o),h=new Int32Array(o),y=new Float64Array(o),b=new Int32Array(o),g=new Uint8Array(o);for(let m=0;m<i;m++){let T=s[m],S=c[m],I=l[m],v=n[I],w=r[m];if(g[w]===0){f[w]=d[I],p[w]=T,h[w]=S,b[w]=v;let k=u[I];k!==null&&k!==0&&(y[w]=k),g[w]=1}else p[w]!==T?(p[w]=a,h[w]=0):h[w]!==S&&(h[w]=0),b[w]!==v&&(b[w]=-1)}return{funcCol:f,categoryCol:p,subcategoryCol:h,innerWindowIDCol:y,inlinedIntoCol:b}}function jc(e,t,r){return new Gc(e.getCallNodeTable(),e.getStackIndexToNonInvertedCallNodeIndex(),t,r)}function XL(e,t,r){for(;;){let n=r.func[e],o=r.func[t];if(n!==o)return n-o;if(e=r.prefix[e],t=r.prefix[t],e===t)break;if(e===-1)return-1;if(t===-1)return 1}return 0}function QL(e,t,r){let n=e;for(let o=0;o<t&&n!==null;o++)n=r[n];return n}function NS(e,t,r){let n=t.asInverted();return n!==null?tD(e,n,r):eD(e,t,r)}function eD(e,t,r){let n=t.getStackIndexToNonInvertedCallNodeIndex(),{frame:o,prefix:a,length:i}=r,s=new Int32Array(i);for(let l=0;l<i;l++){let c=-1;if(n[l]===e)c=o[l];else{let d=a[l];d!==null&&(c=s[d])}s[l]=c}return s}function tD(e,t,r){let n=t.depthForNode(e),[o,a]=t.getSuffixOrderIndexRangeForCallNode(e),i=t.getStackIndexToNonInvertedCallNodeIndex(),s=r.prefix,l=t.getSuffixOrderIndexes(),c=new Int32Array(r.length);for(let u=0;u<r.length;u++){let d=-1,f=i[u],p=l[f];if(p>=o&&p<a){let h=QL(u,n,s);h!==null&&(d=r.frame[h])}c[u]=d}return c}function qc(e,t){return e.map(r=>r===null?null:t[r])}function rD(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let n=1;e[r]===null&&(n=0),t[r]=n}return t}function nD(e,t,r){let o=r.getCallNodeTable().subtreeRangeEnd[t],a=e.length,i=new Uint8Array(a);for(let s=0;s<a;s++){let l=1,c=e[s];c!==null?c<t?l=2:c<o?l=1:l=3:l=0,i[s]=l}return i}function oD(e,t,r){let n=r.getSuffixOrderIndexes(),[o,a]=r.getSuffixOrderIndexRangeForCallNode(t),i=e.length,s=new Uint8Array(i);for(let l=0;l<i;l++){let c=1,u=e[l];if(u!==null){let d=n[u];d<o?c=2:d>=a&&(c=3)}else c=0;s[l]=c}return s}function AS(e,t,r){if(r===null||r===-1)return rD(t);let n=e.asInverted();return n!==null?oD(t,r,n):nD(t,r,e)}function zc(e){if(e.length===0)throw new Error("getLeafFuncIndex assumes that the path isn't empty.");return e[e.length-1]}function PS(e,t,r,n,o){return aD(t.getCallNodeIndexFromPath(e),t,r,n,o)}function aD(e,t,r,n,o){let{sampleCategories:a,sampleSubcategories:i}=o,s={selfTime:{value:0,breakdownByCategory:null},totalTime:{value:0,breakdownByCategory:null}},l=0;function c(p,h,y){p.value+=y;let b=a[h],g=i[h];p.breakdownByCategory===null&&(p.breakdownByCategory=r.map(m=>({entireCategoryValue:0,subcategoryBreakdown:Array(m.subcategories.length).fill(0)}))),p.breakdownByCategory[b].entireCategoryValue+=y,p.breakdownByCategory[b].subcategoryBreakdown[g]+=y}if(e===null)return{forPath:s,rootTime:l};let u=t.getCallNodeTable(),d=t.getStackIndexToNonInvertedCallNodeIndex(),f=t.asInverted();if(f!==null){let p=f.isRoot(e),h=f.getSuffixOrderIndexes(),[y,b]=f.getSuffixOrderIndexRangeForCallNode(e);for(let g=0;g<n.length;g++){let m=n.stack[g];if(m===null)continue;let T=d[m],S=h[T],I=n.weight?n.weight[g]:1;l+=Math.abs(I),S>=y&&S<b&&(c(s.totalTime,g,I),p&&(s.selfTime.value+=I))}}else{let p=u.subtreeRangeEnd[e];for(let h=0;h<n.length;h++){let y=n.stack[h];if(y===null)continue;let b=d[y],g=n.weight?n.weight[h]:1;l+=Math.abs(g),b===e&&c(s.selfTime,h,g),b>=e&&b<p&&c(s.totalTime,h,g)}}return{forPath:s,rootTime:l}}function RS(e){let t=e.length,r=e.maxDepth,n=e.depth,o=e.func,a=vr(t),i=new Int32Array(r+1),s=new Int32Array(r+1);e:for(let l=0;l<t;l++){let c=n[l],u=o[l];if(c===0){i[0]=u;continue}let d=s[c-1];for(let p=d;p>=0;p--)if(i[p]===u){s[c]=d;let h=l>>5,y=l&31;a[h]|=1<<y;continue e}let f=d+1;i[f]=u,s[c]=f}return a}function iD({samples:e,markers:t,jsAllocations:r,nativeAllocations:n},o){let a={start:1/0,end:-1/0};if(e.length){let{time:i,timeDeltas:s}=e;if(i!==void 0){let l=e.length-1;a.start=i[0],a.end=i[l]+o}else{let l=W(s);a.start=l[0];let c=0;for(let u=0;u<e.length;u++)c+=l[u];a.end=c+o}}else if(t.length)for(let i=0;i<t.length;i++){let s=t.startTime[i],l=t.endTime[i];switch(t.phase[i]){case 0:case 2:{let u=W(s);a.start=Math.min(a.start,u),a.end=Math.max(a.end,u+o);break}case 3:{let u=W(l);a.start=Math.min(a.start,u),a.end=Math.max(a.end,u+o);break}case 1:{let u=W(s),d=W(l);a.start=Math.min(a.start,u,d),a.end=Math.max(a.end,u+o,d+o);break}default:throw new Error("Unhandled marker phase type.")}}if(r){let i=r.length-1;a.start=Math.min(a.start,r.time[0]),a.end=Math.max(a.end,r.time[i]+o)}if(n){let i=n.length-1;a.start=Math.min(a.start,n.time[0]),a.end=Math.max(a.end,n.time[i]+o)}return a}var Oa=(0,kS.default)(iD,{cache:new _S.default});function Xf(e){let t={start:1/0,end:-1/0};return e.meta.profilingStartTime!==void 0&&e.meta.profilingEndTime?{start:e.meta.profilingStartTime,end:e.meta.profilingEndTime}:(e.threads.forEach(r=>{let n=Oa(r,e.meta.interval);t.start=Math.min(t.start,n.start),t.end=Math.max(t.end,n.end)}),t)}function ys(e){switch(e){case"cpp":case"js":return e;default:return"combined"}}function MS(e,t,r,n,o){switch(o){case"cpp":return vS(e,t,a=>{if(r.isJS[a])return!1;let i=n.getString(r.name[a]);return!(r.resource[a]===-1&&i.startsWith("0x"))});case"js":return vS(e,t,a=>r.isJS[a]||r.relevantForJS[a]);default:return{newStackTable:e,effectOnThreadData:{}}}}function La(e,t,r){let n=t.length,o=new Array(n),a=new Uint8Array(n),i=e.subcategory instanceof Uint16Array?new Uint16Array(n):new Uint8Array(n),s=0;for(let l=0;l<e.length;l++){if(!It(r,l))continue;let c=s++;o[c]=e.frame[l],a[c]=e.category[l],i[c]=e.subcategory[l]}return{frame:o,prefix:t,length:n,category:a,subcategory:i}}function vS(e,t,r){return Gt("_computeTransformOutputForMergingFuncs",()=>{let n=new Array,o=new Int32Array(e.length),a=vr(e.length);for(let s=0;s<e.length;s++){let l=e.prefix[s],c=e.frame[s],u=t.func[c],d=l===null?-1:o[l];if(r(u)){let f=n.length;n[f]=d!==-1?d:null,o[s]=f,bt(a,s)}else o[s]=d}return{newStackTable:La(e,n,a),effectOnThreadData:{oldStackToNewStack:o}}})}function Qn(e,t){let{newStackTable:r,effectOnThreadData:n}=e;return $r(t,r,o=>{if(o===null)return null;let{oldStackToNewStack:a,dropIfOldStackIsNot:i}=n;if(i!==void 0&&!It(i,o))return null;if(a!==void 0){let s=a[o];return s!==-1?s:null}return o})}function FS(e,t,r,n,o,a,i){return Gt("computeSearchStringFilterOutput",()=>{if(!i||i.length===0)return{transformOutput:{newStackTable:e,effectOnThreadData:{}},funcMatchesSearchStrings:null};let s=u=>{let d=sD(r,n,o,a,u),f=lD(e,t,d);return{funcMatches:d,stackMatches:f}},{funcMatches:l,stackMatches:c}=s(i[0]);for(let u=1;u<i.length;u++){let{funcMatches:d,stackMatches:f}=s(i[u]);l=xS(d,l),c=SS(f,c)}return{transformOutput:{newStackTable:e,effectOnThreadData:{dropIfOldStackIsNot:c}},funcMatchesSearchStrings:l}})}function sD(e,t,r,n,o){let a=o.toLowerCase();function i(l){let c=e.name[l];if(n.getString(c).toLowerCase().includes(a))return!0;let d=e.source[l];if(d!==null){let p=r.filename[d];if(n.getString(p).toLowerCase().includes(a))return!0}let f=e.resource[l];if(f!==-1){let p=t.name[f];if(n.getString(p).toLowerCase().includes(a))return!0}return!1}let s=vr(e.length);for(let l=0;l<e.length;l++)i(l)&&bt(s,l);return s}function lD(e,t,r){let n=vr(e.length);for(let o=0;o<e.length;o++){let a=e.prefix[o];if(a!==null&&It(n,a))bt(n,o);else{let i=t.func[e.frame[o]];It(r,i)&&bt(n,o)}}return n}function bs(e){let{time:t,timeDeltas:r}=e;return t??gS(W(r))}function Qf(e,t,r){let n=e.length,{category:o,subcategory:a}=t,i=new Uint8Array(n),s=a instanceof Uint16Array?new Uint16Array(n):new Uint8Array(n);for(let l=0;l<n;l++){let c=e[l];c!==null?(i[l]=o[c],s[l]=a[c]):(i[l]=r,s[l]=0)}return{sampleCategories:i,sampleSubcategories:s}}function eo(e,t){let{stackTable:r,frameTable:n,funcTable:o,stringArray:a}=t;if(e===void 0||e.length===0||r.length===0)return!1;let i=e.find(s=>s!==null);if(i==null)return!1;if(r.prefix[i]===null){let s=r.frame[i],l=n.func[s],c=o.name[l];if(a[c]==="(root)")return e.some(u=>u!==null&&u!==i)}return!0}function wn(e,t,r){return ep(e.time,t,r)}function ep(e,t,r){let n=Fa(e,t),o=Fa(e,r,n);return[n,o]}function tp(e,t,r){return OS(e.time,t,r)}function OS(e,t,r){let[n,o]=ep(e,t,r);return n>0&&n--,o<e.length&&o++,[n,o]}function rp(e,t,r){let{samples:n,jsAllocations:o,nativeAllocations:a}=e,[i,s]=wn(n,t,r),l={length:s-i,time:n.time.slice(i,s),weight:n.weight?n.weight.slice(i,s):null,weightType:n.weightType,stack:n.stack.slice(i,s),threadCPUPercent:n.threadCPUPercent.subarray(i,s+1),hasCPUDeltas:n.hasCPUDeltas,category:n.category.subarray(i,s),subcategory:n.subcategory.subarray(i,s)};n.eventDelay?l.eventDelay=n.eventDelay.slice(i,s):n.responsiveness&&(l.responsiveness=n.responsiveness.slice(i,s)),n.argumentValues&&(l.argumentValues=n.argumentValues.slice(i,s)),n.threadId&&(l.threadId=n.threadId.slice(i,s));let c={...e,samples:l};if(o){let[u,d]=wn(o,t,r);c.jsAllocations={time:o.time.slice(u,d),className:o.className.slice(u,d),typeName:o.typeName.slice(u,d),coarseType:o.coarseType.slice(u,d),weight:o.weight.slice(u,d),weightType:o.weightType,inNursery:o.inNursery.slice(u,d),stack:o.stack.slice(u,d),length:d-u}}if(a){let[u,d]=wn(a,t,r),f=a.time.slice(u,d),p=a.weight.slice(u,d),h=a.stack.slice(u,d),y=d-u;"memoryAddress"in a?c.nativeAllocations={time:f,weight:p,weightType:a.weightType,stack:h,memoryAddress:a.memoryAddress.slice(u,d),threadId:a.threadId.slice(u,d),length:y}:c.nativeAllocations={time:f,weight:p,weightType:a.weightType,stack:h,length:y}}return c}function np(e,t,r){let{samples:n,jsAllocations:o,nativeAllocations:a}=e,i=bs(n),[s,l]=ep(i,t,r),c={length:l-s,time:i.slice(s,l),weight:n.weight?n.weight.slice(s,l):null,weightType:n.weightType,stack:n.stack.slice(s,l)};n.eventDelay?c.eventDelay=n.eventDelay.slice(s,l):n.responsiveness&&(c.responsiveness=n.responsiveness.slice(s,l)),n.threadCPUDelta&&(c.threadCPUDelta=n.threadCPUDelta.slice(s,l)),n.argumentValues&&(c.argumentValues=n.argumentValues.slice(s,l)),n.threadId&&(c.threadId=n.threadId.slice(s,l));let u={...e,samples:c};if(o){let[d,f]=wn(o,t,r);u.jsAllocations={time:o.time.slice(d,f),className:o.className.slice(d,f),typeName:o.typeName.slice(d,f),coarseType:o.coarseType.slice(d,f),weight:o.weight.slice(d,f),weightType:o.weightType,inNursery:o.inNursery.slice(d,f),stack:o.stack.slice(d,f),length:f-d}}if(a){let[d,f]=wn(a,t,r),p=a.time.slice(d,f),h=a.weight.slice(d,f),y=a.stack.slice(d,f),b=f-d;"memoryAddress"in a?u.nativeAllocations={time:p,weight:h,weightType:a.weightType,stack:y,memoryAddress:a.memoryAddress.slice(d,f),threadId:a.threadId.slice(d,f),length:b}:u.nativeAllocations={time:p,weight:h,weightType:a.weightType,stack:y,length:b}}return u}function LS(e,t,r){let n={...e},{samples:o}=n,a=bs(o),[i,s]=OS(a,t,r);return n.samples={length:s-i,time:a.slice(i,s),count:o.count.slice(i,s),number:o.number?o.number.slice(i,s):void 0,argumentValues:o.argumentValues?o.argumentValues.slice(i,s):void 0},n}function DS(e,t){if(!e.eventDelay)throw new Error("processEventDelays step should not be called for older profiles");let r=new Float32Array(e.length),n=W(e.eventDelay,"eventDelays field is not present in this profile"),o=e.time[0],a=0;for(let c=1;c<e.length;c++){let u=n[c],d=n[c+1]||0,f=e.time[c];if(u==null||u<d)continue;let p=Math.trunc(u/t),h=f-u,y=c-p;if(y<0){o=f,a=c;continue}if(a===y){o=h,a=y;continue}let b=f-o;for(let g=a+1;g<=y;g++)r[g]+=b,b-=e.time[g+1]-e.time[g];o=h,a=y}let i=Number.MAX_SAFE_INTEGER,s=0;for(let c of r)c&&(i=Math.min(c,i),s=Math.max(c,s));let l=s-i;return{eventDelays:r,minDelay:i,maxDelay:s,delayRange:l}}function BS(e,t){let r=-1,n=t.getCallNodeTable(),o=t.getStackIndexToNonInvertedCallNodeIndex();for(let a=0;a<e.length;a++){let i=e.stack[a];if(i===null)continue;let s=o[i],l=n.depth[s];l>r&&(r=l)}return r+1}function Kc(e,t,r,n,o){let{responsiveness:a,eventDelay:i,argumentValues:s,stack:l,threadCPUDelta:c,weight:u,weightType:d,threadId:f,length:p}=e,h=e.time!==void 0?Wc(e.time):W(e.timeDeltas),y=r!==void 0&&c!==void 0?bS(c,h,n):null,b=y!==null,g=y??new Uint8Array(e.length+1).fill(100),m=bs(e),{sampleCategories:T,sampleSubcategories:S}=Qf(e.stack,t,o);return{responsiveness:a,eventDelay:i,argumentValues:s,stack:l,weight:u,weightType:d,threadId:f,length:p,time:m,threadCPUPercent:g,hasCPUDeltas:b,category:T,subcategory:S}}function US(e,t,r,n,o,a,i,s,l,c){let{processType:u,processStartupTime:d,processShutdownTime:f,registerTime:p,unregisterTime:h,pausedRanges:y,showMarkersInTimeline:b,name:g,isMainThread:m,"eTLD+1":T,processName:S,isJsTracer:I,pid:v,tid:w,jsAllocations:k,nativeAllocations:E,markers:R,jsTracer:F,isPrivateBrowsing:G,userContextId:B,tracedObjectShapes:Z}=e;return{processType:u,processStartupTime:d,processShutdownTime:f,registerTime:p,unregisterTime:h,pausedRanges:y,showMarkersInTimeline:b,name:g,isMainThread:m,"eTLD+1":T,processName:S,isJsTracer:I,pid:v,tid:w,jsAllocations:k,nativeAllocations:E,markers:R,jsTracer:F,isPrivateBrowsing:G,userContextId:B,tracedObjectShapes:Z,samples:t,stackTable:r,frameTable:n,funcTable:o,resourceTable:i,nativeSymbols:a,stringTable:s,sources:l,tracedValuesBuffer:c}}function cD(e){let{length:t,frame:r,prefix:n,category:o,subcategory:a}=e;if(r.length!==t)throw new Error(`StackTable frame column length ${r.length} does not match stackTable.length ${t}`);if(n.length!==t)throw new Error(`StackTable prefix column length ${n.length} does not match stackTable.length ${t}`);if(o.length!==t)throw new Error(`StackTable category column length ${o.length} does not match stackTable.length ${t}`);if(a.length!==t)throw new Error(`StackTable subcategory column length ${a.length} does not match stackTable.length ${t}`)}function op(e,t,r,n,o){cD(t);let{jsAllocations:a,nativeAllocations:i,samples:s,markers:l}=e,c={...s,stack:r(s.stack,s.time)},u={...l,data:o(l.data)},d={...e,samples:c,markers:u,stackTable:t};return a&&(d.jsAllocations={...a,stack:n(a.stack,a.time)}),i&&(d.nativeAllocations={...i,stack:n(i.stack,i.time)}),d}function $r(e,t,r){function n(o){return o&&"cause"in o&&o.cause?{...o,cause:{...o.cause,stack:r(o.cause.stack)}}:o}return op(e,t,(o,a)=>o.map(i=>r(i)),(o,a)=>o.map(i=>r(i)),o=>o.map(n))}function ap(e,t){return $S(e,t,t)}function $S(e,t,r){return e.map(n=>uD(n,t,r))}function uD(e,t,r){function n(d){return d&&"cause"in d&&d.cause?{...d,cause:{...d.cause,stack:r(d.cause.stack)}}:d}let{jsAllocations:o,nativeAllocations:a,samples:i,markers:s}=e,l={...i,stack:i.stack.map(t)},c={...s,data:s.data.map(n)},u={...e,samples:l,markers:c};return o&&(u.jsAllocations={...o,stack:o.stack.map(r)}),a&&(u.nativeAllocations={...a,stack:a.stack.map(r)}),u}function wS(e){return t=>{if(t===null)return null;let r=e.get(t);if(r===void 0)throw new Error("Could not find a stack when converting from an old stack to new stack.");return r}}function or(e,t){let r,n;switch(t.name){case"GeckoMain":{if(t["eTLD+1"])r=t["eTLD+1"],n=e.filter(o=>o.name==="GeckoMain"&&o["eTLD+1"]===r);else if(t.processName)r=t.processName,n=e.filter(o=>o.name==="GeckoMain"&&o.processName===r);else switch(t.processType){case"default":r="Parent Process";break;case"gpu":r="GPU Process";break;case"rdd":r="Remote Data Decoder";break;case"tab":{r="Content Process",n=e.filter(o=>o.name==="GeckoMain"&&o.processType==="tab");break}case"plugin":r="Plugin Process";break;case"socket":r="Socket Process";break;default:}break}default:}if(r||(r=t.name),n&&n.length>1){let o=1+n.indexOf(t);r+=` (${o}/${n.length})`}return r}function GS(e,t){let r=`${t}
624
624
  `;return r+=`Thread: "${e.name}"`,e.tid!==void 0&&(r+=` (${e.tid})`),e.processType&&(r+=`
625
625
  Process: "${e.processType}"`,e.pid!==void 0&&(r+=` (${e.pid})`)),e.isPrivateBrowsing&&(r+=`
626
626
  Private Browsing: Yes`),e.userContextId&&(r+=`
627
- Container Id: ${e.userContextId}`),r}function aD(e,t,r){return!(e.startsWith(t)||r===1)}function bs(e,t,r,n,o,a=null,i=null){let s=null,l=null,c=t.resource[e];if(c!==-1){s=r.type[c];let f=r.name[c];l=n.getString(f)}let u=t.source[e],d;if(u!==null){let f=o.filename[u];d=n.getString(f)}if(d)if(d=Hc(d).path,a!==null)d+=":"+a,i!==null&&(d+=":"+i);else{let f=t.lineNumber[e];if(f!==null){d+=":"+f;let p=t.columnNumber[e];p!==null&&(d+=":"+p)}}return d?l&&aD(d,l,s)?`${l}: ${d}`:d:l||""}function BS(e,t){let r=Ea(e),n=new Map,o=[2,5,3,4];for(let a=0;a<t.length;a++){let i=t.type[a],s=t.name[a],l=o.includes(i),c=r.length;r.isJS.push(l),r.relevantForJS.push(l),r.name.push(s),r.resource.push(a),r.source.push(null),r.lineNumber.push(null),r.columnNumber.push(null),r.length++,n.set(a,c)}return{funcTable:r,reservedFunctionsForResources:n}}function US(e,t){let r=t.asInverted();return r!==null?sD(e,r):iD(e)}function iD(e){return function(r,n){let o=e[r],a=e[n];return o===null?a===null?0:1:a===null?-1:o-a}}function sD(e,t){let r=t.getCallNodeTable();return function(o,a){let i=e[o],s=e[a];return i===s?0:i===null?1:s===null?-1:zL(i,s,r)}}function $S(e,t,r){let n=e[t];return r!==0?`${n.name}: ${n.subcategories[r]}`:`${n.name}`}function GS(e){let t=e.stack.slice();for(let r=0;r<e.length;r++)e.weight[r]<=0&&(t[r]=null);return{...e,stack:t}}function WS(e){let t=e.stack.slice();for(let r=0;r<e.length;r++)e.weight[r]>=0&&(t[r]=null);return{...e,stack:t}}function HS(e){let t=[],r=e.stack.slice();for(let n=0;n<e.length;n++){let o=e.weight[n],a=e.memoryAddress[n];if(o>=0)a in t&&console.error(vS.oneLine`
627
+ Container Id: ${e.userContextId}`),r}function dD(e,t,r){return!(e.startsWith(t)||r===1)}function Ts(e,t,r,n,o,a=null,i=null){let s=null,l=null,c=t.resource[e];if(c!==-1){s=r.type[c];let f=r.name[c];l=n.getString(f)}let u=t.source[e],d;if(u!==null){let f=o.filename[u];d=n.getString(f)}if(d)if(d=Vc(d).path,a!==null)d+=":"+a,i!==null&&(d+=":"+i);else{let f=t.lineNumber[e];if(f!==null){d+=":"+f;let p=t.columnNumber[e];p!==null&&(d+=":"+p)}}return d?l&&dD(d,l,s)?`${l}: ${d}`:d:l||""}function WS(e,t){let r=Na(e),n=new Map,o=[2,5,3,4];for(let a=0;a<t.length;a++){let i=t.type[a],s=t.name[a],l=o.includes(i),c=r.length;r.isJS.push(l),r.relevantForJS.push(l),r.name.push(s),r.resource.push(a),r.source.push(null),r.lineNumber.push(null),r.columnNumber.push(null),r.length++,n.set(a,c)}return{funcTable:r,reservedFunctionsForResources:n}}function HS(e,t){let r=t.asInverted();return r!==null?pD(e,r):fD(e)}function fD(e){return function(r,n){let o=e[r],a=e[n];return o===null?a===null?0:1:a===null?-1:o-a}}function pD(e,t){let r=t.getCallNodeTable();return function(o,a){let i=e[o],s=e[a];return i===s?0:i===null?1:s===null?-1:XL(i,s,r)}}function VS(e,t,r){let n=e[t];return r!==0?`${n.name}: ${n.subcategories[r]}`:`${n.name}`}function jS(e){let t=e.stack.slice();for(let r=0;r<e.length;r++)e.weight[r]<=0&&(t[r]=null);return{...e,stack:t}}function qS(e){let t=e.stack.slice();for(let r=0;r<e.length;r++)e.weight[r]>=0&&(t[r]=null);return{...e,stack:t}}function zS(e){let t=[],r=e.stack.slice();for(let n=0;n<e.length;n++){let o=e.weight[n],a=e.memoryAddress[n];if(o>=0)a in t&&console.error(CS.oneLine`
628
628
  The address ${a} was already present when we wanted to add it.
629
629
  This probably means the deallocation wasn't collected, which may sometimes
630
630
  happen. We will overwrite the previous entry.
631
- `),t[a]=e.stack[n],r[n]=null;else{let i=t[a];i===void 0?r[n]=null:(r[n]=i,delete t[a])}}return{...e,stack:r}}function VS(e){let t=new Map,r=e.stack.slice();for(let n=0;n<e.length;n++){let o=e.weight[n],a=e.memoryAddress[n];if(o>=0)t.set(a,n);else{r[n]=null;let i=t.get(a);i!==void 0&&(r[i]=null,t.delete(a))}}return{...e,stack:r}}function jS(e,t){if(e===null)return new Map;let r=new Map;for(let[n,o]of e){let a=o.filter(u=>u.embedderInnerWindowID===0);if(a.length>1&&(a=a.filter(u=>!u.url.startsWith("about:"))),a.length===0){console.error(`Expected at least one topmost page for tabID ${n} but couldn't find it.`);continue}let i=a[a.length-1],s=i.url;if(s.startsWith("about:")){r.set(n,{origin:s,hostname:s,favicon:null});continue}let l=s.startsWith("moz-extension://"),c={origin:s,hostname:s,favicon:i.favicon??null};try{let u=new URL(s);c.hostname=t&&l?t.get("moz-extension://"+(u.hostname?u.hostname:s.split("/")[2])+"/")??"":u.hostname,c.origin=u.origin}catch{}r.set(n,c)}return r}function ut(e){return e.size===1?W(vn(e)):[...e].sort((t,r)=>r-t).join(",")}function qS(e,t){let r=new Set((""+e).split(",").map(o=>+o)),n=new Set;for(let o of r){let a=t.get(o);a!==void 0&&n.add(a)}return n.size===0?null:ut(n)}function lD(e){let t=new Set,r=new Set;for(let n of e)cD(n,t,r);return{samplingSelfStacks:t,syncBacktraceSelfStacks:r}}function cD(e,t,r){let{samples:n,markers:o,jsAllocations:a,nativeAllocations:i}=e;for(let s=0;s<n.length;s++){let l=n.stack[s];l!==null&&t.add(l)}for(let s=0;s<o.length;s++){let l=o.data[s];if(l&&"cause"in l&&l.cause){let c=l.cause.stack;c!==null&&r.add(c)}}if(a!==void 0)for(let s=0;s<a.length;s++){let l=a.stack[s];l!==null&&r.add(l)}if(i!==void 0)for(let s=0;s<i.length;s++){let l=i.stack[s];l!==null&&r.add(l)}}function zS(e){let{samplingSelfStacks:t,syncBacktraceSelfStacks:r}=lD(e.threads),{stackTable:n,frameTable:o}=e.shared,a=new Uint32Array(o.length),i=new Set;for(let m of t){let g=n.frame[m];a[g]=g,o.address[g]!==-1&&i.add(g)}let s=new Map,l=new Set;for(let m of r){let g=n.frame[m],T=o.address[g];T!==-1&&s.set(g,T)}for(let m=0;m<n.length;m++){let g=n.prefix[m];if(g===null||l.has(g))continue;l.add(g);let T=n.frame[g],S=o.address[T];S!==-1&&s.set(T,S)}if(i.size===0&&s.size===0)return e;let c=Oc(o);for(let[m,g]of s){if(i.has(m)){let T=c.length;c.address.push(g),c.inlineDepth.push(o.inlineDepth[m]),c.category.push(o.category[m]),c.subcategory.push(o.subcategory[m]),c.func.push(o.func[m]),c.nativeSymbol.push(o.nativeSymbol[m]),c.innerWindowID.push(o.innerWindowID[m]),c.line.push(o.line[m]),c.column.push(o.column[m]),c.length++,a[m]=T}c.address[m]=g-1}let u=nn(),d=new Map,f=new Map,p=new Uint32Array(n.length);for(let m=0;m<n.length;m++){let g=n.frame[m],T=n.prefix[m],S=T===null?null:p[T];if(l.has(m)||r.has(m)){let I=u.length;u.frame.push(g),u.prefix.push(S),u.length++,p[m]=I,f.set(m,I)}if(t.has(m)){let I=a[g],v=u.length;u.frame.push(I),u.prefix.push(S),u.length++,d.set(m,v)}}let h={...e.shared,frameTable:c,stackTable:u},y=LS(e.threads,SS(d),SS(f));return{...e,shared:h,threads:y}}function uD(e,t,r){let n=t;for(let o=0;o<e.length;o++)if(e.nativeSymbol[o]===r){let a=e.address[o];a>n&&(n=a)}return n+1-t}function KS(e,t){let r=new Set;for(let n=0;n<e.length;n++){let o=e[n];if(o!==-1){let a=t.nativeSymbol[o];a!==null&&r.add(a)}}return r}function ZS(e,t,r){let n=new Map;for(let o=0;o<e.length;o++){let a=e.stack[o];if(a===null)continue;let i=t[a];if(i===-1)continue;let s=r.nativeSymbol[i];if(s===null)continue;let l=e.weight!==null?e.weight[o]:1;n.set(s,(n.get(s)??0)+l)}return n}function JS(e,t,r,n){let o=t.functionSize[e],a=o??uD(r,t.address[e],e);return{libIndex:t.libIndex[e],address:t.address[e],name:n.getString(t.name[e]),functionSize:a,functionSizeIsKnown:o!==null}}function YS(e){return e.meta.categories?"cpu-category":"stack"}function XS(e,t){let r=new Map;if(!t)return r;for(let n=0;n<e.length;n++){let o=e[n],{usedInnerWindowIDs:a}=o;if(a)for(let i of a){if(i===0)continue;let s=t.get(i);if(s===void 0)continue;let l=r.get(s);l||(l=new Set,r.set(s,l)),l.add(n)}}return r}function Kc(e,t,r,n){r&&r.length>256&&console.error(`This profile has ${r.length} categories, which is more than 256 and not supported.`);let o=r?r.reduce((s,l)=>Math.max(s,l.subcategories.length),0):1,a=new Uint8Array(e.length),i=o<256?new Uint8Array(e.length):new Uint16Array(e.length);for(let s=0;s<e.length;s++){let l=e.frame[s],c=t.category[l],u=t.subcategory[l],d,f;if(c!==null)d=c,f=u||0;else{let p=e.prefix[s];p!==null?(d=a[p],f=i[p]):(d=n,f=0)}a[s]=d,i[s]=f}return{frame:e.frame,category:a,subcategory:i,prefix:e.prefix,length:e.length}}function Ss(e,t){return new Set(Array.from(e).filter(r=>t.has(r)))}function QS(e,t){return new Set(Array.from(e).filter(r=>!t.has(r)))}ur();var nx=ce(rx()),dD=(function(){let t=`\\b((?:${["http","https","ftp","file","moz-extension","moz-page-thumb"].join("|")})://)/?[^\\s/$.?#][^\\s)]*`,r="\\b(about:[^?#\\s]+)([?#])[^\\s)]*";return new RegExp(`${t}|${r}`,"gi")})();function La(e,t="<URL>",r="<sanitized>"){return e.replace(dD,(n,o,a,i)=>o?o+t:a?a+i+r:n)}function ox(e,t="<PATH>"){let r=null,n=e.lastIndexOf("/");return n!==-1?r="/":(n=e.lastIndexOf("\\"),n!==-1&&(r="\\")),r===null?e:t+r+e.slice(n+1)}var Ro=e=>{if(!e)return null;let t=e.split(",").map(r=>r.trim()).filter(r=>r);return t.length?t:null},Mo=e=>{if(!e||!e.length)return null;let t=e.map(nx.default).join("|");return new RegExp(t,"gi")};xe();var ax={thread:0,network:1,memory:2,ipc:3,"event-delay":4,"process-cpu":5,power:6,marker:7,bandwidth:8},ix={network:0,bandwidth:1,memory:2,power:3,ipc:4,thread:5,"event-delay":6,"process-cpu":7,marker:8},sx={process:0,screenshots:1,"visual-progress":2,"perceptual-visual-progress":3,"contentful-visual-progress":4},lx={"visual-progress":0,"perceptual-visual-progress":1,"contentful-visual-progress":2,screenshots:3,process:4};function fD(e,t){let r=e.map((o,a)=>a),n=new Intl.Collator("en-US",{numeric:!0});return r.sort((o,a)=>{if(e[o].type==="thread"&&e[a].type==="ipc"&&e[o].threadIndex===e[a].threadIndex)return-1;if(e[o].type==="ipc"&&e[a].type==="thread"&&e[o].threadIndex===e[a].threadIndex)return 1;if(t&&t.counters&&e[o].type==="power"&&e[a].type==="power"){let i=e[o].counterIndex,s=e[a].counterIndex;if(t.meta.keepProfileThreadOrder)return i-s;let l=t.counters[i].name,c=t.counters[s].name;return n.compare(l,c)}if(e[o].type==="thread"&&e[a].type==="thread"&&t){let i=e[o].threadIndex,s=e[a].threadIndex;if(i===void 0||s===void 0)return-1;if(t&&t.meta.keepProfileThreadOrder)return i-s;let l=t.threads[i].name,c=t.threads[s].name;return n.compare(l,c)||t.threads[i].registerTime-t.threads[s].registerTime}return ix[e[o].type]-ix[e[a].type]}),r}function pD(e,t){let r=e.map((n,o)=>o);return r.sort((n,o)=>{let a=e[n],i=e[o],s=lx[a.type],l=lx[i.type];if(s!==l)return s-l;if(a.type!=="process"||i.type!=="process")return 0;let c=a.mainThreadIndex!==null?t[a.mainThreadIndex]:null,u=i.mainThreadIndex!==null?t[i.mainThreadIndex]:null;return c!=null&&c.isInParentProcess&&!(u!=null&&u.isInParentProcess)?-1:!(c!=null&&c.isInParentProcess)&&(u!=null&&u.isInParentProcess)?1:c&&u?u.boostedSampleScore-c.boostedSampleScore:0}),r}function ux(e,t,r,n){let o=new Map;if(r===null)for(let[a,i]of t){let s=fD(i,n);if(e!==null){let l=e.get(a);if(l!==void 0){if(l.length!==s.length){let c=l.slice();for(let u=l.length;u<s.length;u++)c.push(u);l=c}Ix(i.length,l)&&(s=l)}}o.set(a,s)}else for(let[a,i]of t){let s=[];for(let l of r){let c=i.findIndex(u=>u.type==="thread"&&u.threadIndex===l);c!==-1&&s.push(c)}for(let l=0;l<i.length;l++)s.includes(l)||s.push(l);o.set(a,s)}return o}function dx(e,t){let r=new Map,n=new Set;for(let i of t)i.type==="process"&&n.add(i.pid);let o=(e.meta.markerSchema||[]).filter(i=>Array.isArray(i.graphs)&&i.graphs.length>0);for(let i=0;i<e.threads.length;i++){let s=e.threads[i],{pid:l,markers:c}=s;if(!n.has(l))continue;let u=r.get(l);if(u===void 0&&(u=[],r.set(l,u)),s.isMainThread||u.push({type:"thread",threadIndex:i}),c.data.some(d=>d&&d.type==="Network")&&u.push({type:"network",threadIndex:i}),c.data.some(d=>d&&d.type==="IPC")&&u.push({type:"ipc",threadIndex:i}),o.length>0){let d=new Map;for(let f of o)d.set(f.name,{markerSchema:f,keys:(f.graphs||[]).map(p=>p.key),markerNames:new Set});for(let f=0;f<c.length;++f){let p=c.name[f],h=c.data[f],y=h?h.type:null;if(h&&y){let b=d.get(y);b&&b.keys.every(m=>m in h)&&b.markerNames.add(p)}}for(let[,{markerSchema:f,markerNames:p}]of d)for(let h of p)u.push({type:"marker",threadIndex:i,markerSchema:f,markerName:h})}}let{counters:a}=e;if(a)for(let i=0;i<a.length;i++){let{pid:s,category:l,samples:c}=a[i];if(n.has(s)&&["Memory","power","Bandwidth"].includes(l)){if(l==="power"&&c.length<=2)continue;let u=r.get(s);u===void 0&&(u=[],r.set(s,u)),l==="Memory"?u.push({type:"memory",counterIndex:i}):l==="Bandwidth"?u.push({type:"bandwidth",counterIndex:i}):u.push({type:"power",counterIndex:i})}}for(let i of r.values())i.sort((s,l)=>ax[s.type]-ax[l.type]);return r}function fx(e,t=null,r){let n=new Map,o=[],{stringArray:a}=e.shared,i=$e.withBackingArray(a),s=i.hasString("CompositorScreenshot")?i.indexForString("CompositorScreenshot"):null;for(let l=0;l<e.threads.length;l++){let c=e.threads[l],{pid:u,markers:d}=c;if(c.isMainThread){let p=n.get(u);p===void 0?(p={type:"process",pid:u,mainThreadIndex:l},o.push(p),n.set(u,p)):p.mainThreadIndex=l}else if(!n.has(u)){let p={type:"process",pid:u,mainThreadIndex:null};o.push(p),n.set(u,p)}let f=new Set;if(s!==null){for(let p=0;p<d.length;p++)if(d.name[p]===s){let h=d.data[p];f.add(h.windowID)}for(let p of f)o.push({type:"screenshots",id:p,threadIndex:l})}}if(e.meta&&e.meta.visualMetrics){let l=e.meta.visualMetrics;l.VisualProgress&&o.push({type:"visual-progress"}),l.PerceptualSpeedIndexProgress&&o.push({type:"perceptual-visual-progress"}),l.ContentfulSpeedIndexProgress&&o.push({type:"contentful-visual-progress"})}return o=hD(o,e,t,r),o.sort((l,c)=>sx[l.type]-sx[c.type]),o}function hD(e,t,r,n){if(r===null)return e;let o=n.get(r);if(!o)return console.warn(`Failed to find the thread indexes for given tab ${r}`),e;let a=[];for(let i of e)switch(i.type){case"process":{let{mainThreadIndex:s}=i;if(s===null)continue;let l=t.threads[s];(l.isMainThread&&l.processType==="default"||o.has(s))&&a.push(i);break}case"screenshots":case"visual-progress":case"perceptual-visual-progress":case"contentful-visual-progress":a.push(i);break;default:throw new Error("Unhandled globalTack type.")}return a}function px(e,t,r,n){if(r!==null){let o=[];for(let a of r){let i=e.findIndex(s=>s.type==="process"&&s.mainThreadIndex===a);i!==-1&&o.push(i)}for(let a=0;a<e.length;a++)o.includes(a)||o.push(a);return o}if(t!==null&&t.length!==e.length){let o=t.slice();for(let a=t.length;a<e.length;a++)o.push(a);t=o}return t!==null&&Ix(e.length,t)?t:pD(e,n)}function hx(e,t,r,n){if(e===null)return cx(t,r,n);let o=Ss(e,new Set(t));return o.size===0?cx(t,r,n):o}function cx(e,t,r){if(t.meta.initialSelectedThreads!==void 0)return new Set(t.meta.initialSelectedThreads.filter(i=>i<t.threads.length?!0:(console.warn(`The specified thread index ${i} is higher than the maximum thread index ${t.threads.length-1}.`),!1)));let{threads:n}=t;if(n.length===0)throw new Error("Expected to find a thread index to select.");let o=mD(e,n,r),a=o.find(i=>n[i].name==="GeckoMain"&&n[i].processType==="tab")??o[0];return new Set([a])}function mD(e,t,r){let n=[...e];return n.sort((o,a)=>{let i=t[o].name,s=t[a].name;return i===s?r[a].boostedSampleScore-r[o].boostedSampleScore||o-a:i==="Compositor"?1:s==="Compositor"?-1:i==="Renderer"?1:s==="Renderer"?-1:r[a].boostedSampleScore-r[o].boostedSampleScore||o-a}),n}function mx(e,t,r){let n=new Set(r.threads.map((i,s)=>s)),o=new Set(t),a=QS(n,o);return a.size===0?null:bx(r,a,e)}function gx(e,t,r){let n=Ss(new Set(e.globalTrackOrder),t),o=new Map;for(let[i,s]of e.localTrackOrderByPid){let l=new Set(s),c=Ss(l,r.get(i)||new Set);if(o.set(i,c),c.size===l.size){let u=e.globalTracks.findIndex(d=>d.type==="process"&&d.pid===i&&d.mainThreadIndex===null);u!==-1&&n.add(u)}}let a={hiddenGlobalTracks:n,hiddenLocalTracksByPid:o};return np(e,a).length===0?null:a}function yx(e,t,r,n){return bx(t,bD(t,e,r,n),e)}function bx(e,t,r){let n=new Set([...t].map(i=>e.threads[i].pid)),o=new Set(r.globalTrackOrder.filter(i=>{let s=r.globalTracks[i];return s.type!=="process"?!1:!n.has(s.pid)})),a=new Map;for(let[i,s]of r.localTrackOrderByPid){if(!n.has(i)){a.set(i,new Set(s));continue}let l=r.localTracksByPid.get(i)??[],c=new Set(s.filter(u=>{let d=l[u];return!vD(d,t)}));a.set(i,c)}return{hiddenGlobalTracks:o,hiddenLocalTracksByPid:a}}function np({globalTracks:e,localTracksByPid:t},{hiddenGlobalTracks:r,hiddenLocalTracksByPid:n}){let o=[];for(let a=0;a<e.length;a++){if(r.has(a))continue;let i=e[a];if(i.type==="process"){let{mainThreadIndex:s,pid:l}=i;s!==null&&o.push(s);let c=W(t.get(l),"A local track was expected to exist for the given pid."),u=W(n.get(l),"Hidden tracks were expected to exists for the given pid.");for(let d=0;d<c.length;d++){let f=c[d];if(f.type==="thread"){let{threadIndex:p}=f;u.has(d)||o.push(p)}}}}return o}function Tx(e,t){switch(e.type){case"process":{if(e.mainThreadIndex===null){let r=e.pid,n=t.filter(o=>o.pid===r).map(o=>o.processName).find(o=>!!o);return n||`Process ${r}`}return nr(t,t[e.mainThreadIndex]).replace(/^https?:\/\//i,"")}case"screenshots":return"Screenshots";case"visual-progress":return"Visual Progress";case"perceptual-visual-progress":return"Perceptual Visual Progress";case"contentful-visual-progress":return"Contentful Visual Progress";default:throw ae(e,"Unhandled GlobalTrack type.")}}function Sx(e,t,r,n){switch(e.type){case"thread":return nr(t,t[e.threadIndex]);case"network":return"Network";case"memory":return"Memory";case"bandwidth":return"Bandwidth";case"ipc":return`IPC \u2014 ${nr(t,t[e.threadIndex])}`;case"event-delay":return nr(t,t[e.threadIndex])+" Event Delay";case"process-cpu":return"Process CPU";case"power":return n[e.counterIndex].name;case"marker":return r.stringArray[e.markerName];default:throw ae(e,"Unhandled LocalTrack type.")}}function gD(e){let t=new Set;for(let r of e.globalTracks)r.type==="process"&&r.mainThreadIndex!==null&&t.add(r.mainThreadIndex);for(let[,r]of e.localTracksByPid)for(let n of r)n.type==="thread"&&t.add(n.threadIndex);return t}var yD=.05;function bD(e,t,r,n){if(e.threads.length===0)throw new Error("No threads");if(e.meta.initialVisibleThreads!==void 0)return e.meta.initialVisibleThreads.forEach(f=>W(e.threads[f])),new Set(e.meta.initialVisibleThreads);let a=gD(t),i=r.map((f,p)=>({threadIndex:p,score:f}));i=i.filter(({threadIndex:f})=>a.has(f)),i.sort(({score:f},{score:p})=>f.isEssentialFirefoxThread!==p.isEssentialFirefoxThread?f.isEssentialFirefoxThread?-1:1:p.boostedSampleScore-f.boostedSampleScore);let s=i.slice(0,15),c=Math.max(...i.map(({score:f})=>f.isInParentProcess&&!n?0:f.sampleScore))*yD,u=[],d=s.filter(f=>{let{score:p}=f;return p.isInParentProcess&&!n?(p.sampleScore>=c&&u.push(f),!1):p.isEssentialFirefoxThread||p.isInterestingEvenWithMinimalActivity&&p.sampleScore>0?!0:p.sampleScore>=c});return d.length===0&&(d=u),new Set(d.map(({threadIndex:f})=>f))}var TD=40;function xx(e,t,r){let n=SD(t),o=t.processType==="default",a=xD(t),i=ID(e,t,r),s=a?i*TD:i;return{isEssentialFirefoxThread:n,isInParentProcess:o,isInterestingEvenWithMinimalActivity:a,sampleScore:i,boostedSampleScore:s}}function SD(e){return e.name==="GeckoMain"&&e.processType==="default"&&(!e.processName||e.processName==="Parent Process")||e.name==="GeckoMain"&&e.processType==="gpu"}function xD(e){return/^(?:Audio|Media|GraphRunner|WebrtcWorker)/.test(e.name)}function ID({meta:e,shared:{stackTable:t,frameTable:r}},{samples:n},o){if(e.sampleUnits&&n.threadCPUDelta)return n.threadCPUDelta.reduce((u,d)=>u+(d??0),0);let a=e.categories?e.categories.findIndex(u=>u.color==="grey"):-1,i=e.categories?e.categories.findIndex(u=>u.name==="Idle"):-1,s=Kc(t,r,e.categories,a),l=n.stack.filter(u=>u!==null&&s.category[u]!==i).length,c=o*e.interval;return l*c}function Ix(e,t){return t.length===e&&t.slice().sort((r,n)=>r-n).every((r,n)=>r===n)}function vD(e,t){switch(e.type){case"thread":return t.has(e.threadIndex);case"marker":case"network":case"memory":case"bandwidth":case"event-delay":case"process-cpu":case"power":return!0;case"ipc":return!1;default:throw ae(e,"Unhandled LocalTrack type.")}}function op(e,t,r){let n=[];for(let l of e)if(l.hasCPUDeltas&&l.time.length>=2){let c=l.time,u=Float64Array.from(l.threadCPUPercent.subarray(0,l.length),f=>f/100),d=l.length;if(t!==void 0&&r!==void 0){let f=Ma(l.time,t),p=Ma(l.time,r,f);if(f<p)c=l.time.slice(f,p),u=Float64Array.from(l.threadCPUPercent.subarray(f,p),h=>h/100),d=p-f;else continue}n.push({time:c,cpuRatio:u,maxCpuRatio:1/0,length:d})}if(n.length===0)return null;let o=new Array(n.length).fill(0),a=[],i=[],s=0;for(;;){let l=1/0;for(let u=0;u<n.length;u++){let d=o[u],f=n[u];d<f.time.length&&(l=Math.min(l,f.time[d]))}if(l===1/0)break;let c=0;for(let u=0;u<n.length;u++){let d=n[u],f=o[u];f!==d.time.length&&(f>0&&(c+=d.cpuRatio[f]),d.time[f]===l&&o[u]++)}a.push(l),i.push(c),s=Math.max(s,c)}return{time:a,cpuRatio:Float64Array.from(i),maxCpuRatio:s,length:a.length}}var kr=ce(Kt());xe();var up={};qy(up,{exclude:()=>MD,extract:()=>lp,parse:()=>cp,parseUrl:()=>Rx,pick:()=>Fx,stringify:()=>Px,stringifyUrl:()=>Mx});var kx="%[a-f0-9]{2}",vx=new RegExp("("+kx+")|([^%]+?)","gi"),wx=new RegExp("("+kx+")+","gi");function ap(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;let r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ap(r),ap(n))}function _D(e){try{return decodeURIComponent(e)}catch{let t=e.match(vx)||[];for(let r=1;r<t.length;r++)e=ap(t,r).join(""),t=e.match(vx)||[];return e}}function CD(e){let t={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=wx.exec(e);for(;r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{let o=_D(r[0]);o!==r[0]&&(t[r[0]]=o)}r=wx.exec(e)}t["%C2"]="\uFFFD";let n=Object.keys(t);for(let o of n)e=e.replace(new RegExp(o,"g"),t[o]);return e}function ip(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return CD(e)}}function _x(e,t){let r={};if(Array.isArray(t))for(let n of t){let o=Object.getOwnPropertyDescriptor(e,n);o!=null&&o.enumerable&&Object.defineProperty(r,n,o)}else for(let n of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,n);if(o.enumerable){let a=e[n];t(n,a,e)&&Object.defineProperty(r,n,o)}}return r}function Zc(e,t){if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||t==="")return[];let r=e.indexOf(t);return r===-1?[]:[e.slice(0,r),e.slice(r+t.length)]}var ED=e=>e==null,ND=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),sp=Symbol("encodeFragmentIdentifier");function AD(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let o=r.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Tt(t,e),"[",o,"]"].join("")]:[...r,[Tt(t,e),"[",Tt(o,e),"]=",Tt(n,e)].join("")]};case"bracket":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Tt(t,e),"[]"].join("")]:[...r,[Tt(t,e),"[]=",Tt(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Tt(t,e),":list="].join("")]:[...r,[Tt(t,e),":list=",Tt(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t=e.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,o)=>o===void 0||e.skipNull&&o===null||e.skipEmptyString&&o===""?n:(o=o===null?"":o,n.length===0?[[Tt(r,e),t,Tt(o,e)].join("")]:[[n,Tt(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,Tt(t,e)]:[...r,[Tt(t,e),"=",Tt(n,e)].join("")]}}function PD(e){let t;switch(e.arrayFormat){case"index":return(r,n,o)=>{if(t=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!t){o[r]=n;return}o[r]===void 0&&(o[r]={}),o[r][t[1]]=n};case"bracket":return(r,n,o)=>{if(t=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!t){o[r]=n;return}if(o[r]===void 0){o[r]=[n];return}o[r]=[...o[r],n]};case"colon-list-separator":return(r,n,o)=>{if(t=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!t){o[r]=n;return}if(o[r]===void 0){o[r]=[n];return}o[r]=[...o[r],n]};case"comma":case"separator":return(r,n,o)=>{let i=typeof n=="string"&&n.includes(e.arrayFormatSeparator)?n.split(e.arrayFormatSeparator).map(s=>Fo(s,e)):n===null?n:Fo(n,e);o[r]=i};case"bracket-separator":return(r,n,o)=>{let a=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!a){o[r]=n&&Fo(n,e);return}let i=n===null?[]:Fo(n,e).split(e.arrayFormatSeparator);if(o[r]===void 0){o[r]=i;return}o[r]=[...o[r],...i]};default:return(r,n,o)=>{if(o[r]===void 0){o[r]=n;return}o[r]=[...[o[r]].flat(),n]}}}function Ex(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Tt(e,t){return t.encode?t.strict?ND(e):encodeURIComponent(e):e}function Fo(e,t){return t.decode?ip(e):e}function Nx(e){return Array.isArray(e)?e.sort():typeof e=="object"?Nx(Object.keys(e)).sort((t,r)=>Number(t)-Number(r)).map(t=>e[t]):e}function Ax(e){let t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function RD(e){let t="",r=e.indexOf("#");return r!==-1&&(t=e.slice(r)),t}function Cx(e,t,r){return r==="string"&&typeof e=="string"?e:typeof r=="function"&&typeof e=="string"?r(e):r==="boolean"&&e===null?!0:r==="boolean"&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":r==="boolean"&&e!==null&&(e.toLowerCase()==="1"||e.toLowerCase()==="0")?e.toLowerCase()==="1":r==="string[]"&&t.arrayFormat!=="none"&&typeof e=="string"?[e]:r==="number[]"&&t.arrayFormat!=="none"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?[Number(e)]:r==="number"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):e}function lp(e){e=Ax(e);let t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function cp(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...t},Ex(t.arrayFormatSeparator);let r=PD(t),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(let o of e.split("&")){if(o==="")continue;let a=t.decode?o.replaceAll("+"," "):o,[i,s]=Zc(a,"=");i===void 0&&(i=a),s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:Fo(s,t),r(Fo(i,t),s,n)}for(let[o,a]of Object.entries(n))if(typeof a=="object"&&a!==null&&t.types[o]!=="string")for(let[i,s]of Object.entries(a)){let l=t.types[o],c=typeof l=="function"?l:l?l.replace("[]",""):void 0;a[i]=Cx(s,t,c)}else typeof a=="object"&&a!==null&&t.types[o]==="string"?n[o]=Object.values(a).join(t.arrayFormatSeparator):n[o]=Cx(a,t,t.types[o]);return t.sort===!1?n:(t.sort===!0?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((o,a)=>{let i=n[a];return o[a]=i&&typeof i=="object"&&!Array.isArray(i)?Nx(i):i,o},Object.create(null))}function Px(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},Ex(t.arrayFormatSeparator);let r=i=>t.skipNull&&ED(e[i])||t.skipEmptyString&&e[i]==="",n=AD(t),o={};for(let[i,s]of Object.entries(e))r(i)||(o[i]=s);let a=Object.keys(o);return t.sort!==!1&&a.sort(t.sort),a.map(i=>{let s=e[i];if(t.replacer&&(s=t.replacer(i,s),s===void 0)||s===void 0)return"";if(s===null)return Tt(i,t);if(Array.isArray(s)){if(s.length===0&&t.arrayFormat==="bracket-separator")return Tt(i,t)+"[]";let l=s;return t.replacer&&(l=s.map((c,u)=>t.replacer(`${i}[${u}]`,c)).filter(c=>c!==void 0)),l.reduce(n(i),[]).join("&")}return Tt(i,t)+"="+Tt(s,t)}).filter(i=>i.length>0).join("&")}function Rx(e,t){var o;t={decode:!0,...t};let[r,n]=Zc(e,"#");return r===void 0&&(r=e),{url:((o=r==null?void 0:r.split("?"))==null?void 0:o[0])??"",query:cp(lp(e),t),...t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:Fo(n,t)}:{}}}function Mx(e,t){t={encode:!0,strict:!0,[sp]:!0,...t};let r=Ax(e.url).split("?")[0]||"",n=lp(e.url),o={...cp(n,{sort:!1,...t}),...e.query},a=Px(o,t);a&&=`?${a}`;let i=RD(e.url);if(typeof e.fragmentIdentifier=="string"){let s=new URL(r);s.hash=e.fragmentIdentifier,i=t[sp]?s.hash:`#${e.fragmentIdentifier}`}return`${r}${a}${i}`}function Fx(e,t,r){r={parseFragmentIdentifier:!0,[sp]:!1,...r};let{url:n,query:o,fragmentIdentifier:a}=Rx(e,r);return Mx({url:n,query:_x(o,t),fragmentIdentifier:a},r)}function MD(e,t,r){let n=Array.isArray(t)?o=>!t.includes(o):(o,a)=>!t(o,a);return Fx(e,n,r)}var dp=up;var Ux=ce(xa()),$x=ce(Dx());xe();function OD({places:e,style:t}){return new Intl.NumberFormat(void 0,{minimumFractionDigits:e,maximumFractionDigits:e,style:t})}var Bx=(0,Ux.default)(OD,{cache:new $x.default});function dt(e,t=2,r=3,n="decimal"){if(e===0)return Bx({places:0,style:n}).format(e);if(isNaN(e))return"<invalid>";let o=Math.floor(Math.log10(Math.abs(e)))+1;n==="percent"&&(o+=2);let a=t-o;return a<0?a=0:a>r&&(a=r),Bx({places:a,style:n}).format(e)}function fp(e,t,r){let n;switch(e){case"tracing-ms":n=1;break;case"samples":case"bytes":n=0;break;default:throw ae(e,"Unhandled WeightType.")}return t&&(n=3),dt(r,3,n)}function Yc(e){return dt(e,2,1,"percent")}function LD(e,t=3,r=2,n=1/0){if(n===1/0)return dt(e/1e9,t,r)+"GB";n>=1e9&&(e=Math.round(e/1e9)*1e9);let a=e%1e9;return dt((e-a)/1e9,t,0)+"GB"+(a>0&&r>0||n<1e9?" "+Gx(a,t,0,n):"")}function Gx(e,t=3,r=2,n=1/0){if(n===1/0)return dt(e/1e6,t,r)+"MB";n>=1e6&&(e=Math.round(e/1e6)*1e6);let a=e%1e6;return dt((e-a)/1e6,t,0)+"MB"+(a>0&&r>0||n<1e6?" "+Wx(a,t,0,n):"")}function Wx(e,t=3,r=2,n=1/0){if(n===1/0)return dt(e/1e3,t,r)+"KB";n>=1e3&&(e=Math.round(e/1e3)*1e3);let a=e%1e3;return dt((e-a)/1e3,t,0)+"KB"+(a>0&&r>0||n<1e3?" "+xs(a,t,0,n):"")}function xs(e,t=3,r=2,n=1/0){return e<1e4?dt(e,0)+"B":e<1e3**2?Wx(e,t,r,n):e<1e3**3?Gx(e,t,r,n):LD(e,t,r,n)}function pp(e,t=3,r=4){return dt(e,t,r)+"ns"}function hp(e,t=2,r=3){return dt(e,t,r)+"\u03BCs"}function mp(e,t=2,r=3){return dt(e,t,r)+"ms"}function Xc(e,t=5,r=3,n=1/0){let a=e/1e3,i="";if(n<1e3){let s=Math.floor(Math.log10(n/1e3)),l=Math.max(0,-s);i=a.toFixed(l)}else i=dt(a,t,r);return i+"s"}function Hx(e,t=5,r=2,n=1/0){n>=1e3&&(e=Math.round(e/1e3)*1e3);let i=e%6e4;return dt((e-i)/6e4,t,0)+"m"+(i>0&&r>0||n<6e4?Xc(i,t,0,n):"")}function Vx(e,t=5,r=1,n=1/0){n>=6e4&&(e=Math.round(e/6e4)*6e4);let a=60*6e4,i=e%a;return dt((e-i)/a,t,0)+"h"+(i>0&&r>0||n<a?Hx(i,t,0,n):"")}function DD(e,t=5,r=1,n=1/0){n>=36e5&&(e=Math.round(e/36e5)*36e5);let a=24*36e5,i=e%a;return dt((e-i)/a,t,0)+"d"+(i>0&&r>0||n<a?Vx(i,t,0,n):"")}function on(e,t=5,r=3,n=1/0){return n!==1/0&&(n<1e4&&(n=10**Math.floor(Math.log10(n))),e>n&&(e=Math.round(e/n)*n)),e>=60*1e3-(n===1/0?500:0)?e>=3600*1e3-(n===1/0?500:0)?e>=1440*60*1e3-(n===1/0?30*1e3:0)?DD(e,t,r,n):Vx(e,t,r,n):Hx(e,t,r,n):e>=1e3?Xc(e,t,Number.isInteger(e/1e3)?0:r,n):e>=1?mp(e,t,Number.isInteger(e)?0:r):e*1e3>=1?hp(e*1e3,t,Number.isInteger(e*1e3)?0:r):e===0?"0s":pp(e*1e3*1e3,t,Number.isInteger(e*1e3*1e3)?0:r)}function gp({start:e,end:t}){let r=Math.floor(e*1e6),o=Math.ceil(t*1e6)-r,a=String(o),i;if(o>9e6){let s=String(r).slice(0,-6),l=a.slice(0,-6);a.endsWith("000000")||(l=(+l+1).toString()),i=`${s}m${l}`}else if(o>9e3){let s=String(r).slice(0,-3),l=a.slice(0,-3);a.endsWith("000")||(l=(+l+1).toString()),i=`${s}u${l}`}else o===0?i=`${r}n1`:i=`${r}n${a}`;return i}function jx(e=[]){return e.map(gp).join("~")}function BD(e,t,r=1/0){return t==="bytes"?xs(e,2,2,r):on(e,2,2,r)}function qx(e,t){return e.map(n=>BD(n.end-n.start,t))}var yp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._",$D=yp[32];function Oo(e){let t=Array.from(e);return t.sort((r,n)=>r-n),Cn(t)}function Cn(e){let t="";for(let r=0;r<e.length;r++){let n=GD(e,r);if(n===0){t+=zx(e[r]);continue}r+=n,t+=$D,t+=zx(e[r])}return t}function Da(e){let t=[],r=0;for(;r<e.length;){let{value:n,hasLeadingZero:o,nextI:a}=WD(e,r);if(o&&t.length>=1){let i=t[t.length-1],s=n;if(s>i)for(let l=i+1;l<s;l++)t.push(l);else for(let l=i-1;l>s;l--)t.push(l)}t.push(n),r=a}return t}function GD(e,t){if(t<1||t+1>=e.length)return 0;let r=e[t-1],n=e[t],o=e[t+1],a=0;if(n===r+1&&o===n+1)for(a=1;t+a+1<e.length&&e[t+a+1]===n+a+1;)a++;else if(n===r-1&&o===n-1)for(a=1;t+a+1<e.length&&e[t+a+1]===n-a-1;)a++;return a}function zx(e){let t=e,r=yp[t&31];for(t>>=5;t!==0;)r=yp[32+(t&31)]+r,t>>=5;return r}function Kx(e){switch(e){case"0":return 0;case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;case"a":return 10;case"b":return 11;case"c":return 12;case"d":return 13;case"e":return 14;case"f":return 15;case"g":return 16;case"h":return 17;case"i":return 18;case"j":return 19;case"k":return 20;case"l":return 21;case"m":return 22;case"n":return 23;case"o":return 24;case"p":return 25;case"q":return 26;case"r":return 27;case"s":return 28;case"t":return 29;case"u":return 30;case"v":return 31;case"w":return 32;case"x":return 33;case"y":return 34;case"z":return 35;case"A":return 36;case"B":return 37;case"C":return 38;case"D":return 39;case"E":return 40;case"F":return 41;case"G":return 42;case"H":return 43;case"I":return 44;case"J":return 45;case"K":return 46;case"L":return 47;case"M":return 48;case"N":return 49;case"O":return 50;case"P":return 51;case"Q":return 52;case"R":return 53;case"S":return 54;case"T":return 55;case"U":return 56;case"V":return 57;case"W":return 58;case"X":return 59;case"Y":return 60;case"Z":return 61;case".":return 62;case"_":return 63;default:return 0}}function WD(e,t){let r=t,n=Kx(e[r]),o=n&32,a=n&31,i=o!==0&&a===0,s=a;for(r++;o&&r<e.length;)n=Kx(e[r]),o=n&32,a=n&31,s=s<<5|a,r++;return{value:s,hasLeadingZero:i,nextI:r}}xe();function Zx(e){if(e.length===0)return[];let t=e.slice().sort((o,a)=>o.start-a.start),r={...t[0]},n=[r];for(let o=1;o<t.length;o++){let a=t[o];if(!(a.start>=a.end)&&!(a.end<=r.end)){if(a.start<=r.end){r.end=a.end;continue}r={...a},n.push(r)}}return n}rr();ur();xe();cr();var bp=ce(Ir());xe();var Tp=[{name:"Jank",display:["marker-table","marker-chart"],tooltipLabel:"Jank \u2013 event processing delay",tableLabel:"Event processing delay",fields:[],description:bp.oneLine`
631
+ `),t[a]=e.stack[n],r[n]=null;else{let i=t[a];i===void 0?r[n]=null:(r[n]=i,delete t[a])}}return{...e,stack:r}}function KS(e){let t=new Map,r=e.stack.slice();for(let n=0;n<e.length;n++){let o=e.weight[n],a=e.memoryAddress[n];if(o>=0)t.set(a,n);else{r[n]=null;let i=t.get(a);i!==void 0&&(r[i]=null,t.delete(a))}}return{...e,stack:r}}function ZS(e,t){if(e===null)return new Map;let r=new Map;for(let[n,o]of e){let a=o.filter(u=>u.embedderInnerWindowID===0);if(a.length>1&&(a=a.filter(u=>!u.url.startsWith("about:"))),a.length===0){console.error(`Expected at least one topmost page for tabID ${n} but couldn't find it.`);continue}let i=a[a.length-1],s=i.url;if(s.startsWith("about:")){r.set(n,{origin:s,hostname:s,favicon:null});continue}let l=s.startsWith("moz-extension://"),c={origin:s,hostname:s,favicon:i.favicon??null};try{let u=new URL(s);c.hostname=t&&l?t.get("moz-extension://"+(u.hostname?u.hostname:s.split("/")[2])+"/")??"":u.hostname,c.origin=u.origin}catch{}r.set(n,c)}return r}function ut(e){return e.size===1?W(vn(e)):[...e].sort((t,r)=>r-t).join(",")}function JS(e,t){let r=new Set((""+e).split(",").map(o=>+o)),n=new Set;for(let o of r){let a=t.get(o);a!==void 0&&n.add(a)}return n.size===0?null:ut(n)}function hD(e){let t=new Set,r=new Set;for(let n of e)mD(n,t,r);return{samplingSelfStacks:t,syncBacktraceSelfStacks:r}}function mD(e,t,r){let{samples:n,markers:o,jsAllocations:a,nativeAllocations:i}=e;for(let s=0;s<n.length;s++){let l=n.stack[s];l!==null&&t.add(l)}for(let s=0;s<o.length;s++){let l=o.data[s];if(l&&"cause"in l&&l.cause){let c=l.cause.stack;c!==null&&r.add(c)}}if(a!==void 0)for(let s=0;s<a.length;s++){let l=a.stack[s];l!==null&&r.add(l)}if(i!==void 0)for(let s=0;s<i.length;s++){let l=i.stack[s];l!==null&&r.add(l)}}function YS(e){let{samplingSelfStacks:t,syncBacktraceSelfStacks:r}=hD(e.threads),{stackTable:n,frameTable:o}=e.shared,a=new Uint32Array(o.length),i=new Set;for(let g of t){let m=n.frame[g];a[m]=m,o.address[m]!==-1&&i.add(m)}let s=new Map,l=new Set;for(let g of r){let m=n.frame[g],T=o.address[m];T!==-1&&s.set(m,T)}for(let g=0;g<n.length;g++){let m=n.prefix[g];if(m===null||l.has(m))continue;l.add(m);let T=n.frame[m],S=o.address[T];S!==-1&&s.set(T,S)}if(i.size===0&&s.size===0)return e;let c=Lc(o);for(let[g,m]of s){if(i.has(g)){let T=c.length;c.address.push(m),c.inlineDepth.push(o.inlineDepth[g]),c.category.push(o.category[g]),c.subcategory.push(o.subcategory[g]),c.func.push(o.func[g]),c.nativeSymbol.push(o.nativeSymbol[g]),c.innerWindowID.push(o.innerWindowID[g]),c.line.push(o.line[g]),c.column.push(o.column[g]),c.length++,a[g]=T}c.address[g]=m-1}let u=nn(),d=new Map,f=new Map,p=new Uint32Array(n.length);for(let g=0;g<n.length;g++){let m=n.frame[g],T=n.prefix[g],S=T===null?null:p[T];if(l.has(g)||r.has(g)){let I=u.length;u.frame.push(m),u.prefix.push(S),u.length++,p[g]=I,f.set(g,I)}if(t.has(g)){let I=a[m],v=u.length;u.frame.push(I),u.prefix.push(S),u.length++,d.set(g,v)}}let h={...e.shared,frameTable:c,stackTable:u},y=$S(e.threads,wS(d),wS(f));return{...e,shared:h,threads:y}}function gD(e,t,r){let n=t;for(let o=0;o<e.length;o++)if(e.nativeSymbol[o]===r){let a=e.address[o];a>n&&(n=a)}return n+1-t}function XS(e,t){let r=new Set;for(let n=0;n<e.length;n++){let o=e[n];if(o!==-1){let a=t.nativeSymbol[o];a!==null&&r.add(a)}}return r}function QS(e,t,r){let n=new Map;for(let o=0;o<e.length;o++){let a=e.stack[o];if(a===null)continue;let i=t[a];if(i===-1)continue;let s=r.nativeSymbol[i];if(s===null)continue;let l=e.weight!==null?e.weight[o]:1;n.set(s,(n.get(s)??0)+l)}return n}function ex(e,t,r,n){let o=t.functionSize[e],a=o??gD(r,t.address[e],e);return{libIndex:t.libIndex[e],address:t.address[e],name:n.getString(t.name[e]),functionSize:a,functionSizeIsKnown:o!==null}}function tx(e){return e.meta.categories?"cpu-category":"stack"}function rx(e,t){let r=new Map;if(!t)return r;for(let n=0;n<e.length;n++){let o=e[n],{usedInnerWindowIDs:a}=o;if(a)for(let i of a){if(i===0)continue;let s=t.get(i);if(s===void 0)continue;let l=r.get(s);l||(l=new Set,r.set(s,l)),l.add(n)}}return r}function Zc(e,t,r,n){r&&r.length>256&&console.error(`This profile has ${r.length} categories, which is more than 256 and not supported.`);let o=r?r.reduce((s,l)=>Math.max(s,l.subcategories.length),0):1,a=new Uint8Array(e.length),i=o<256?new Uint8Array(e.length):new Uint16Array(e.length);for(let s=0;s<e.length;s++){let l=e.frame[s],c=t.category[l],u=t.subcategory[l],d,f;if(c!==null)d=c,f=u||0;else{let p=e.prefix[s];p!==null?(d=a[p],f=i[p]):(d=n,f=0)}a[s]=d,i[s]=f}return{frame:e.frame,category:a,subcategory:i,prefix:e.prefix,length:e.length}}function xs(e,t){return new Set(Array.from(e).filter(r=>t.has(r)))}function nx(e,t){return new Set(Array.from(e).filter(r=>!t.has(r)))}ur();var sx=ce(ix()),yD=(function(){let t=`\\b((?:${["http","https","ftp","file","moz-extension","moz-page-thumb"].join("|")})://)/?[^\\s/$.?#][^\\s)]*`,r="\\b(about:[^?#\\s]+)([?#])[^\\s)]*";return new RegExp(`${t}|${r}`,"gi")})();function Da(e,t="<URL>",r="<sanitized>"){return e.replace(yD,(n,o,a,i)=>o?o+t:a?a+i+r:n)}function lx(e,t="<PATH>"){let r=null,n=e.lastIndexOf("/");return n!==-1?r="/":(n=e.lastIndexOf("\\"),n!==-1&&(r="\\")),r===null?e:t+r+e.slice(n+1)}var Mo=e=>{if(!e)return null;let t=e.split(",").map(r=>r.trim()).filter(r=>r);return t.length?t:null},Fo=e=>{if(!e||!e.length)return null;let t=e.map(sx.default).join("|");return new RegExp(t,"gi")};xe();var cx={thread:0,network:1,memory:2,ipc:3,"event-delay":4,"process-cpu":5,power:6,marker:7,bandwidth:8},ux={network:0,bandwidth:1,memory:2,power:3,ipc:4,thread:5,"event-delay":6,"process-cpu":7,marker:8},dx={process:0,screenshots:1,"visual-progress":2,"perceptual-visual-progress":3,"contentful-visual-progress":4},fx={"visual-progress":0,"perceptual-visual-progress":1,"contentful-visual-progress":2,screenshots:3,process:4};function bD(e,t){let r=e.map((o,a)=>a),n=new Intl.Collator("en-US",{numeric:!0});return r.sort((o,a)=>{if(e[o].type==="thread"&&e[a].type==="ipc"&&e[o].threadIndex===e[a].threadIndex)return-1;if(e[o].type==="ipc"&&e[a].type==="thread"&&e[o].threadIndex===e[a].threadIndex)return 1;if(t&&t.counters&&e[o].type==="power"&&e[a].type==="power"){let i=e[o].counterIndex,s=e[a].counterIndex;if(t.meta.keepProfileThreadOrder)return i-s;let l=t.counters[i].name,c=t.counters[s].name;return n.compare(l,c)}if(e[o].type==="thread"&&e[a].type==="thread"&&t){let i=e[o].threadIndex,s=e[a].threadIndex;if(i===void 0||s===void 0)return-1;if(t&&t.meta.keepProfileThreadOrder)return i-s;let l=t.threads[i].name,c=t.threads[s].name;return n.compare(l,c)||t.threads[i].registerTime-t.threads[s].registerTime}return ux[e[o].type]-ux[e[a].type]}),r}function TD(e,t){let r=e.map((n,o)=>o);return r.sort((n,o)=>{let a=e[n],i=e[o],s=fx[a.type],l=fx[i.type];if(s!==l)return s-l;if(a.type!=="process"||i.type!=="process")return 0;let c=a.mainThreadIndex!==null?t[a.mainThreadIndex]:null,u=i.mainThreadIndex!==null?t[i.mainThreadIndex]:null;return c!=null&&c.isInParentProcess&&!(u!=null&&u.isInParentProcess)?-1:!(c!=null&&c.isInParentProcess)&&(u!=null&&u.isInParentProcess)?1:c&&u?u.boostedSampleScore-c.boostedSampleScore:0}),r}function hx(e,t,r,n){let o=new Map;if(r===null)for(let[a,i]of t){let s=bD(i,n);if(e!==null){let l=e.get(a);if(l!==void 0){if(l.length!==s.length){let c=l.slice();for(let u=l.length;u<s.length;u++)c.push(u);l=c}_x(i.length,l)&&(s=l)}}o.set(a,s)}else for(let[a,i]of t){let s=[];for(let l of r){let c=i.findIndex(u=>u.type==="thread"&&u.threadIndex===l);c!==-1&&s.push(c)}for(let l=0;l<i.length;l++)s.includes(l)||s.push(l);o.set(a,s)}return o}function mx(e,t){let r=new Map,n=new Set;for(let i of t)i.type==="process"&&n.add(i.pid);let o=(e.meta.markerSchema||[]).filter(i=>Array.isArray(i.graphs)&&i.graphs.length>0);for(let i=0;i<e.threads.length;i++){let s=e.threads[i],{pid:l,markers:c}=s;if(!n.has(l))continue;let u=r.get(l);if(u===void 0&&(u=[],r.set(l,u)),s.isMainThread||u.push({type:"thread",threadIndex:i}),c.data.some(d=>d&&d.type==="Network")&&u.push({type:"network",threadIndex:i}),c.data.some(d=>d&&d.type==="IPC")&&u.push({type:"ipc",threadIndex:i}),o.length>0){let d=new Map;for(let f of o)d.set(f.name,{markerSchema:f,keys:(f.graphs||[]).map(p=>p.key),markerNames:new Set});for(let f=0;f<c.length;++f){let p=c.name[f],h=c.data[f],y=h?h.type:null;if(h&&y){let b=d.get(y);b&&b.keys.every(g=>g in h)&&b.markerNames.add(p)}}for(let[,{markerSchema:f,markerNames:p}]of d)for(let h of p)u.push({type:"marker",threadIndex:i,markerSchema:f,markerName:h})}}let{counters:a}=e;if(a)for(let i=0;i<a.length;i++){let{pid:s,category:l,samples:c}=a[i];if(n.has(s)&&["Memory","power","Bandwidth"].includes(l)){if(l==="power"&&c.length<=2)continue;let u=r.get(s);u===void 0&&(u=[],r.set(s,u)),l==="Memory"?u.push({type:"memory",counterIndex:i}):l==="Bandwidth"?u.push({type:"bandwidth",counterIndex:i}):u.push({type:"power",counterIndex:i})}}for(let i of r.values())i.sort((s,l)=>cx[s.type]-cx[l.type]);return r}function gx(e,t=null,r){let n=new Map,o=[],{stringArray:a}=e.shared,i=$e.withBackingArray(a),s=i.hasString("CompositorScreenshot")?i.indexForString("CompositorScreenshot"):null;for(let l=0;l<e.threads.length;l++){let c=e.threads[l],{pid:u,markers:d}=c;if(c.isMainThread){let p=n.get(u);p===void 0?(p={type:"process",pid:u,mainThreadIndex:l},o.push(p),n.set(u,p)):p.mainThreadIndex=l}else if(!n.has(u)){let p={type:"process",pid:u,mainThreadIndex:null};o.push(p),n.set(u,p)}let f=new Set;if(s!==null){for(let p=0;p<d.length;p++)if(d.name[p]===s){let h=d.data[p];f.add(h.windowID)}for(let p of f)o.push({type:"screenshots",id:p,threadIndex:l})}}if(e.meta&&e.meta.visualMetrics){let l=e.meta.visualMetrics;l.VisualProgress&&o.push({type:"visual-progress"}),l.PerceptualSpeedIndexProgress&&o.push({type:"perceptual-visual-progress"}),l.ContentfulSpeedIndexProgress&&o.push({type:"contentful-visual-progress"})}return o=SD(o,e,t,r),o.sort((l,c)=>dx[l.type]-dx[c.type]),o}function SD(e,t,r,n){if(r===null)return e;let o=n.get(r);if(!o)return console.warn(`Failed to find the thread indexes for given tab ${r}`),e;let a=[];for(let i of e)switch(i.type){case"process":{let{mainThreadIndex:s}=i;if(s===null)continue;let l=t.threads[s];(l.isMainThread&&l.processType==="default"||o.has(s))&&a.push(i);break}case"screenshots":case"visual-progress":case"perceptual-visual-progress":case"contentful-visual-progress":a.push(i);break;default:throw new Error("Unhandled globalTack type.")}return a}function yx(e,t,r,n){if(r!==null){let o=[];for(let a of r){let i=e.findIndex(s=>s.type==="process"&&s.mainThreadIndex===a);i!==-1&&o.push(i)}for(let a=0;a<e.length;a++)o.includes(a)||o.push(a);return o}if(t!==null&&t.length!==e.length){let o=t.slice();for(let a=t.length;a<e.length;a++)o.push(a);t=o}return t!==null&&_x(e.length,t)?t:TD(e,n)}function bx(e,t,r,n){if(e===null)return px(t,r,n);let o=xs(e,new Set(t));return o.size===0?px(t,r,n):o}function px(e,t,r){if(t.meta.initialSelectedThreads!==void 0)return new Set(t.meta.initialSelectedThreads.filter(i=>i<t.threads.length?!0:(console.warn(`The specified thread index ${i} is higher than the maximum thread index ${t.threads.length-1}.`),!1)));let{threads:n}=t;if(n.length===0)throw new Error("Expected to find a thread index to select.");let o=xD(e,n,r),a=o.find(i=>n[i].name==="GeckoMain"&&n[i].processType==="tab")??o[0];return new Set([a])}function xD(e,t,r){let n=[...e];return n.sort((o,a)=>{let i=t[o].name,s=t[a].name;return i===s?r[a].boostedSampleScore-r[o].boostedSampleScore||o-a:i==="Compositor"?1:s==="Compositor"?-1:i==="Renderer"?1:s==="Renderer"?-1:r[a].boostedSampleScore-r[o].boostedSampleScore||o-a}),n}function Tx(e,t,r){let n=new Set(r.threads.map((i,s)=>s)),o=new Set(t),a=nx(n,o);return a.size===0?null:Ix(r,a,e)}function Sx(e,t,r){let n=xs(new Set(e.globalTrackOrder),t),o=new Map;for(let[i,s]of e.localTrackOrderByPid){let l=new Set(s),c=xs(l,r.get(i)||new Set);if(o.set(i,c),c.size===l.size){let u=e.globalTracks.findIndex(d=>d.type==="process"&&d.pid===i&&d.mainThreadIndex===null);u!==-1&&n.add(u)}}let a={hiddenGlobalTracks:n,hiddenLocalTracksByPid:o};return ip(e,a).length===0?null:a}function xx(e,t,r,n){return Ix(t,wD(t,e,r,n),e)}function Ix(e,t,r){let n=new Set([...t].map(i=>e.threads[i].pid)),o=new Set(r.globalTrackOrder.filter(i=>{let s=r.globalTracks[i];return s.type!=="process"?!1:!n.has(s.pid)})),a=new Map;for(let[i,s]of r.localTrackOrderByPid){if(!n.has(i)){a.set(i,new Set(s));continue}let l=r.localTracksByPid.get(i)??[],c=new Set(s.filter(u=>{let d=l[u];return!ND(d,t)}));a.set(i,c)}return{hiddenGlobalTracks:o,hiddenLocalTracksByPid:a}}function ip({globalTracks:e,localTracksByPid:t},{hiddenGlobalTracks:r,hiddenLocalTracksByPid:n}){let o=[];for(let a=0;a<e.length;a++){if(r.has(a))continue;let i=e[a];if(i.type==="process"){let{mainThreadIndex:s,pid:l}=i;s!==null&&o.push(s);let c=W(t.get(l),"A local track was expected to exist for the given pid."),u=W(n.get(l),"Hidden tracks were expected to exists for the given pid.");for(let d=0;d<c.length;d++){let f=c[d];if(f.type==="thread"){let{threadIndex:p}=f;u.has(d)||o.push(p)}}}}return o}function vx(e,t){switch(e.type){case"process":{if(e.mainThreadIndex===null){let r=e.pid,n=t.filter(o=>o.pid===r).map(o=>o.processName).find(o=>!!o);return n||`Process ${r}`}return or(t,t[e.mainThreadIndex]).replace(/^https?:\/\//i,"")}case"screenshots":return"Screenshots";case"visual-progress":return"Visual Progress";case"perceptual-visual-progress":return"Perceptual Visual Progress";case"contentful-visual-progress":return"Contentful Visual Progress";default:throw ae(e,"Unhandled GlobalTrack type.")}}function wx(e,t,r,n){switch(e.type){case"thread":return or(t,t[e.threadIndex]);case"network":return"Network";case"memory":return"Memory";case"bandwidth":return"Bandwidth";case"ipc":return`IPC \u2014 ${or(t,t[e.threadIndex])}`;case"event-delay":return or(t,t[e.threadIndex])+" Event Delay";case"process-cpu":return"Process CPU";case"power":return n[e.counterIndex].name;case"marker":return r.stringArray[e.markerName];default:throw ae(e,"Unhandled LocalTrack type.")}}function ID(e){let t=new Set;for(let r of e.globalTracks)r.type==="process"&&r.mainThreadIndex!==null&&t.add(r.mainThreadIndex);for(let[,r]of e.localTracksByPid)for(let n of r)n.type==="thread"&&t.add(n.threadIndex);return t}var vD=.05;function wD(e,t,r,n){if(e.threads.length===0)throw new Error("No threads");if(e.meta.initialVisibleThreads!==void 0)return e.meta.initialVisibleThreads.forEach(f=>W(e.threads[f])),new Set(e.meta.initialVisibleThreads);let a=ID(t),i=r.map((f,p)=>({threadIndex:p,score:f}));i=i.filter(({threadIndex:f})=>a.has(f)),i.sort(({score:f},{score:p})=>f.isEssentialFirefoxThread!==p.isEssentialFirefoxThread?f.isEssentialFirefoxThread?-1:1:p.boostedSampleScore-f.boostedSampleScore);let s=i.slice(0,15),c=Math.max(...i.map(({score:f})=>f.isInParentProcess&&!n?0:f.sampleScore))*vD,u=[],d=s.filter(f=>{let{score:p}=f;return p.isInParentProcess&&!n?(p.sampleScore>=c&&u.push(f),!1):p.isEssentialFirefoxThread||p.isInterestingEvenWithMinimalActivity&&p.sampleScore>0?!0:p.sampleScore>=c});return d.length===0&&(d=u),new Set(d.map(({threadIndex:f})=>f))}var kD=40;function kx(e,t,r){let n=_D(t),o=t.processType==="default",a=CD(t),i=ED(e,t,r),s=a?i*kD:i;return{isEssentialFirefoxThread:n,isInParentProcess:o,isInterestingEvenWithMinimalActivity:a,sampleScore:i,boostedSampleScore:s}}function _D(e){return e.name==="GeckoMain"&&e.processType==="default"&&(!e.processName||e.processName==="Parent Process")||e.name==="GeckoMain"&&e.processType==="gpu"}function CD(e){return/^(?:Audio|Media|GraphRunner|WebrtcWorker)/.test(e.name)}function ED({meta:e,shared:{stackTable:t,frameTable:r}},{samples:n},o){if(e.sampleUnits&&n.threadCPUDelta)return n.threadCPUDelta.reduce((u,d)=>u+(d??0),0);let a=e.categories?e.categories.findIndex(u=>u.color==="grey"):-1,i=e.categories?e.categories.findIndex(u=>u.name==="Idle"):-1,s=Zc(t,r,e.categories,a),l=n.stack.filter(u=>u!==null&&s.category[u]!==i).length,c=o*e.interval;return l*c}function _x(e,t){return t.length===e&&t.slice().sort((r,n)=>r-n).every((r,n)=>r===n)}function ND(e,t){switch(e.type){case"thread":return t.has(e.threadIndex);case"marker":case"network":case"memory":case"bandwidth":case"event-delay":case"process-cpu":case"power":return!0;case"ipc":return!1;default:throw ae(e,"Unhandled LocalTrack type.")}}function sp(e,t,r){let n=[];for(let l of e)if(l.hasCPUDeltas&&l.time.length>=2){let c=l.time,u=Float64Array.from(l.threadCPUPercent.subarray(0,l.length),f=>f/100),d=l.length;if(t!==void 0&&r!==void 0){let f=Fa(l.time,t),p=Fa(l.time,r,f);if(f<p)c=l.time.slice(f,p),u=Float64Array.from(l.threadCPUPercent.subarray(f,p),h=>h/100),d=p-f;else continue}n.push({time:c,cpuRatio:u,maxCpuRatio:1/0,length:d})}if(n.length===0)return null;let o=new Array(n.length).fill(0),a=[],i=[],s=0;for(;;){let l=1/0;for(let u=0;u<n.length;u++){let d=o[u],f=n[u];d<f.time.length&&(l=Math.min(l,f.time[d]))}if(l===1/0)break;let c=0;for(let u=0;u<n.length;u++){let d=n[u],f=o[u];f!==d.time.length&&(f>0&&(c+=d.cpuRatio[f]),d.time[f]===l&&o[u]++)}a.push(l),i.push(c),s=Math.max(s,c)}return{time:a,cpuRatio:Float64Array.from(i),maxCpuRatio:s,length:a.length}}var kr=ce(Kt());xe();var pp={};Zy(pp,{exclude:()=>UD,extract:()=>dp,parse:()=>fp,parseUrl:()=>Lx,pick:()=>Bx,stringify:()=>Ox,stringifyUrl:()=>Dx});var Nx="%[a-f0-9]{2}",Cx=new RegExp("("+Nx+")|([^%]+?)","gi"),Ex=new RegExp("("+Nx+")+","gi");function lp(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;let r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],lp(r),lp(n))}function RD(e){try{return decodeURIComponent(e)}catch{let t=e.match(Cx)||[];for(let r=1;r<t.length;r++)e=lp(t,r).join(""),t=e.match(Cx)||[];return e}}function MD(e){let t={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=Ex.exec(e);for(;r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{let o=RD(r[0]);o!==r[0]&&(t[r[0]]=o)}r=Ex.exec(e)}t["%C2"]="\uFFFD";let n=Object.keys(t);for(let o of n)e=e.replace(new RegExp(o,"g"),t[o]);return e}function cp(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return MD(e)}}function Ax(e,t){let r={};if(Array.isArray(t))for(let n of t){let o=Object.getOwnPropertyDescriptor(e,n);o!=null&&o.enumerable&&Object.defineProperty(r,n,o)}else for(let n of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,n);if(o.enumerable){let a=e[n];t(n,a,e)&&Object.defineProperty(r,n,o)}}return r}function Jc(e,t){if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||t==="")return[];let r=e.indexOf(t);return r===-1?[]:[e.slice(0,r),e.slice(r+t.length)]}var FD=e=>e==null,OD=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),up=Symbol("encodeFragmentIdentifier");function LD(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let o=r.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Tt(t,e),"[",o,"]"].join("")]:[...r,[Tt(t,e),"[",Tt(o,e),"]=",Tt(n,e)].join("")]};case"bracket":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Tt(t,e),"[]"].join("")]:[...r,[Tt(t,e),"[]=",Tt(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Tt(t,e),":list="].join("")]:[...r,[Tt(t,e),":list=",Tt(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t=e.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,o)=>o===void 0||e.skipNull&&o===null||e.skipEmptyString&&o===""?n:(o=o===null?"":o,n.length===0?[[Tt(r,e),t,Tt(o,e)].join("")]:[[n,Tt(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,Tt(t,e)]:[...r,[Tt(t,e),"=",Tt(n,e)].join("")]}}function DD(e){let t;switch(e.arrayFormat){case"index":return(r,n,o)=>{if(t=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!t){o[r]=n;return}o[r]===void 0&&(o[r]={}),o[r][t[1]]=n};case"bracket":return(r,n,o)=>{if(t=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!t){o[r]=n;return}if(o[r]===void 0){o[r]=[n];return}o[r]=[...o[r],n]};case"colon-list-separator":return(r,n,o)=>{if(t=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!t){o[r]=n;return}if(o[r]===void 0){o[r]=[n];return}o[r]=[...o[r],n]};case"comma":case"separator":return(r,n,o)=>{let i=typeof n=="string"&&n.includes(e.arrayFormatSeparator)?n.split(e.arrayFormatSeparator).map(s=>Oo(s,e)):n===null?n:Oo(n,e);o[r]=i};case"bracket-separator":return(r,n,o)=>{let a=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!a){o[r]=n&&Oo(n,e);return}let i=n===null?[]:Oo(n,e).split(e.arrayFormatSeparator);if(o[r]===void 0){o[r]=i;return}o[r]=[...o[r],...i]};default:return(r,n,o)=>{if(o[r]===void 0){o[r]=n;return}o[r]=[...[o[r]].flat(),n]}}}function Rx(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Tt(e,t){return t.encode?t.strict?OD(e):encodeURIComponent(e):e}function Oo(e,t){return t.decode?cp(e):e}function Mx(e){return Array.isArray(e)?e.sort():typeof e=="object"?Mx(Object.keys(e)).sort((t,r)=>Number(t)-Number(r)).map(t=>e[t]):e}function Fx(e){let t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function BD(e){let t="",r=e.indexOf("#");return r!==-1&&(t=e.slice(r)),t}function Px(e,t,r){return r==="string"&&typeof e=="string"?e:typeof r=="function"&&typeof e=="string"?r(e):r==="boolean"&&e===null?!0:r==="boolean"&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":r==="boolean"&&e!==null&&(e.toLowerCase()==="1"||e.toLowerCase()==="0")?e.toLowerCase()==="1":r==="string[]"&&t.arrayFormat!=="none"&&typeof e=="string"?[e]:r==="number[]"&&t.arrayFormat!=="none"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?[Number(e)]:r==="number"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):e}function dp(e){e=Fx(e);let t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function fp(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...t},Rx(t.arrayFormatSeparator);let r=DD(t),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(let o of e.split("&")){if(o==="")continue;let a=t.decode?o.replaceAll("+"," "):o,[i,s]=Jc(a,"=");i===void 0&&(i=a),s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:Oo(s,t),r(Oo(i,t),s,n)}for(let[o,a]of Object.entries(n))if(typeof a=="object"&&a!==null&&t.types[o]!=="string")for(let[i,s]of Object.entries(a)){let l=t.types[o],c=typeof l=="function"?l:l?l.replace("[]",""):void 0;a[i]=Px(s,t,c)}else typeof a=="object"&&a!==null&&t.types[o]==="string"?n[o]=Object.values(a).join(t.arrayFormatSeparator):n[o]=Px(a,t,t.types[o]);return t.sort===!1?n:(t.sort===!0?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((o,a)=>{let i=n[a];return o[a]=i&&typeof i=="object"&&!Array.isArray(i)?Mx(i):i,o},Object.create(null))}function Ox(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},Rx(t.arrayFormatSeparator);let r=i=>t.skipNull&&FD(e[i])||t.skipEmptyString&&e[i]==="",n=LD(t),o={};for(let[i,s]of Object.entries(e))r(i)||(o[i]=s);let a=Object.keys(o);return t.sort!==!1&&a.sort(t.sort),a.map(i=>{let s=e[i];if(t.replacer&&(s=t.replacer(i,s),s===void 0)||s===void 0)return"";if(s===null)return Tt(i,t);if(Array.isArray(s)){if(s.length===0&&t.arrayFormat==="bracket-separator")return Tt(i,t)+"[]";let l=s;return t.replacer&&(l=s.map((c,u)=>t.replacer(`${i}[${u}]`,c)).filter(c=>c!==void 0)),l.reduce(n(i),[]).join("&")}return Tt(i,t)+"="+Tt(s,t)}).filter(i=>i.length>0).join("&")}function Lx(e,t){var o;t={decode:!0,...t};let[r,n]=Jc(e,"#");return r===void 0&&(r=e),{url:((o=r==null?void 0:r.split("?"))==null?void 0:o[0])??"",query:fp(dp(e),t),...t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:Oo(n,t)}:{}}}function Dx(e,t){t={encode:!0,strict:!0,[up]:!0,...t};let r=Fx(e.url).split("?")[0]||"",n=dp(e.url),o={...fp(n,{sort:!1,...t}),...e.query},a=Ox(o,t);a&&=`?${a}`;let i=BD(e.url);if(typeof e.fragmentIdentifier=="string"){let s=new URL(r);s.hash=e.fragmentIdentifier,i=t[up]?s.hash:`#${e.fragmentIdentifier}`}return`${r}${a}${i}`}function Bx(e,t,r){r={parseFragmentIdentifier:!0,[up]:!1,...r};let{url:n,query:o,fragmentIdentifier:a}=Lx(e,r);return Dx({url:n,query:Ax(o,t),fragmentIdentifier:a},r)}function UD(e,t,r){let n=Array.isArray(t)?o=>!t.includes(o):(o,a)=>!t(o,a);return Bx(e,n,r)}var hp=pp;var Hx=ce(Ia()),Vx=ce(Gx());xe();function GD({places:e,style:t}){return new Intl.NumberFormat(void 0,{minimumFractionDigits:e,maximumFractionDigits:e,style:t})}var Wx=(0,Hx.default)(GD,{cache:new Vx.default});function dt(e,t=2,r=3,n="decimal"){if(e===0)return Wx({places:0,style:n}).format(e);if(isNaN(e))return"<invalid>";let o=Math.floor(Math.log10(Math.abs(e)))+1;n==="percent"&&(o+=2);let a=t-o;return a<0?a=0:a>r&&(a=r),Wx({places:a,style:n}).format(e)}function mp(e,t,r){let n;switch(e){case"tracing-ms":n=1;break;case"samples":case"bytes":n=0;break;default:throw ae(e,"Unhandled WeightType.")}return t&&(n=3),dt(r,3,n)}function Xc(e){return dt(e,2,1,"percent")}function WD(e,t=3,r=2,n=1/0){if(n===1/0)return dt(e/1e9,t,r)+"GB";n>=1e9&&(e=Math.round(e/1e9)*1e9);let a=e%1e9;return dt((e-a)/1e9,t,0)+"GB"+(a>0&&r>0||n<1e9?" "+jx(a,t,0,n):"")}function jx(e,t=3,r=2,n=1/0){if(n===1/0)return dt(e/1e6,t,r)+"MB";n>=1e6&&(e=Math.round(e/1e6)*1e6);let a=e%1e6;return dt((e-a)/1e6,t,0)+"MB"+(a>0&&r>0||n<1e6?" "+qx(a,t,0,n):"")}function qx(e,t=3,r=2,n=1/0){if(n===1/0)return dt(e/1e3,t,r)+"KB";n>=1e3&&(e=Math.round(e/1e3)*1e3);let a=e%1e3;return dt((e-a)/1e3,t,0)+"KB"+(a>0&&r>0||n<1e3?" "+Is(a,t,0,n):"")}function Is(e,t=3,r=2,n=1/0){return e<1e4?dt(e,0)+"B":e<1e3**2?qx(e,t,r,n):e<1e3**3?jx(e,t,r,n):WD(e,t,r,n)}function gp(e,t=3,r=4){return dt(e,t,r)+"ns"}function yp(e,t=2,r=3){return dt(e,t,r)+"\u03BCs"}function bp(e,t=2,r=3){return dt(e,t,r)+"ms"}function Qc(e,t=5,r=3,n=1/0){let a=e/1e3,i="";if(n<1e3){let s=Math.floor(Math.log10(n/1e3)),l=Math.max(0,-s);i=a.toFixed(l)}else i=dt(a,t,r);return i+"s"}function zx(e,t=5,r=2,n=1/0){n>=1e3&&(e=Math.round(e/1e3)*1e3);let i=e%6e4;return dt((e-i)/6e4,t,0)+"m"+(i>0&&r>0||n<6e4?Qc(i,t,0,n):"")}function Kx(e,t=5,r=1,n=1/0){n>=6e4&&(e=Math.round(e/6e4)*6e4);let a=60*6e4,i=e%a;return dt((e-i)/a,t,0)+"h"+(i>0&&r>0||n<a?zx(i,t,0,n):"")}function HD(e,t=5,r=1,n=1/0){n>=36e5&&(e=Math.round(e/36e5)*36e5);let a=24*36e5,i=e%a;return dt((e-i)/a,t,0)+"d"+(i>0&&r>0||n<a?Kx(i,t,0,n):"")}function on(e,t=5,r=3,n=1/0){return n!==1/0&&(n<1e4&&(n=10**Math.floor(Math.log10(n))),e>n&&(e=Math.round(e/n)*n)),e>=60*1e3-(n===1/0?500:0)?e>=3600*1e3-(n===1/0?500:0)?e>=1440*60*1e3-(n===1/0?30*1e3:0)?HD(e,t,r,n):Kx(e,t,r,n):zx(e,t,r,n):e>=1e3?Qc(e,t,Number.isInteger(e/1e3)?0:r,n):e>=1?bp(e,t,Number.isInteger(e)?0:r):e*1e3>=1?yp(e*1e3,t,Number.isInteger(e*1e3)?0:r):e===0?"0s":gp(e*1e3*1e3,t,Number.isInteger(e*1e3*1e3)?0:r)}function Tp({start:e,end:t}){let r=Math.floor(e*1e6),o=Math.ceil(t*1e6)-r,a=String(o),i;if(o>9e6){let s=String(r).slice(0,-6),l=a.slice(0,-6);a.endsWith("000000")||(l=(+l+1).toString()),i=`${s}m${l}`}else if(o>9e3){let s=String(r).slice(0,-3),l=a.slice(0,-3);a.endsWith("000")||(l=(+l+1).toString()),i=`${s}u${l}`}else o===0?i=`${r}n1`:i=`${r}n${a}`;return i}function Zx(e=[]){return e.map(Tp).join("~")}function VD(e,t,r=1/0){return t==="bytes"?Is(e,2,2,r):on(e,2,2,r)}function Jx(e,t){return e.map(n=>VD(n.end-n.start,t))}var Sp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._",qD=Sp[32];function Lo(e){let t=Array.from(e);return t.sort((r,n)=>r-n),Cn(t)}function Cn(e){let t="";for(let r=0;r<e.length;r++){let n=zD(e,r);if(n===0){t+=Yx(e[r]);continue}r+=n,t+=qD,t+=Yx(e[r])}return t}function Ba(e){let t=[],r=0;for(;r<e.length;){let{value:n,hasLeadingZero:o,nextI:a}=KD(e,r);if(o&&t.length>=1){let i=t[t.length-1],s=n;if(s>i)for(let l=i+1;l<s;l++)t.push(l);else for(let l=i-1;l>s;l--)t.push(l)}t.push(n),r=a}return t}function zD(e,t){if(t<1||t+1>=e.length)return 0;let r=e[t-1],n=e[t],o=e[t+1],a=0;if(n===r+1&&o===n+1)for(a=1;t+a+1<e.length&&e[t+a+1]===n+a+1;)a++;else if(n===r-1&&o===n-1)for(a=1;t+a+1<e.length&&e[t+a+1]===n-a-1;)a++;return a}function Yx(e){let t=e,r=Sp[t&31];for(t>>=5;t!==0;)r=Sp[32+(t&31)]+r,t>>=5;return r}function Xx(e){switch(e){case"0":return 0;case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;case"a":return 10;case"b":return 11;case"c":return 12;case"d":return 13;case"e":return 14;case"f":return 15;case"g":return 16;case"h":return 17;case"i":return 18;case"j":return 19;case"k":return 20;case"l":return 21;case"m":return 22;case"n":return 23;case"o":return 24;case"p":return 25;case"q":return 26;case"r":return 27;case"s":return 28;case"t":return 29;case"u":return 30;case"v":return 31;case"w":return 32;case"x":return 33;case"y":return 34;case"z":return 35;case"A":return 36;case"B":return 37;case"C":return 38;case"D":return 39;case"E":return 40;case"F":return 41;case"G":return 42;case"H":return 43;case"I":return 44;case"J":return 45;case"K":return 46;case"L":return 47;case"M":return 48;case"N":return 49;case"O":return 50;case"P":return 51;case"Q":return 52;case"R":return 53;case"S":return 54;case"T":return 55;case"U":return 56;case"V":return 57;case"W":return 58;case"X":return 59;case"Y":return 60;case"Z":return 61;case".":return 62;case"_":return 63;default:return 0}}function KD(e,t){let r=t,n=Xx(e[r]),o=n&32,a=n&31,i=o!==0&&a===0,s=a;for(r++;o&&r<e.length;)n=Xx(e[r]),o=n&32,a=n&31,s=s<<5|a,r++;return{value:s,hasLeadingZero:i,nextI:r}}xe();function Qx(e){if(e.length===0)return[];let t=e.slice().sort((o,a)=>o.start-a.start),r={...t[0]},n=[r];for(let o=1;o<t.length;o++){let a=t[o];if(!(a.start>=a.end)&&!(a.end<=r.end)){if(a.start<=r.end){r.end=a.end;continue}r={...a},n.push(r)}}return n}nr();ur();xe();rr();var xp=ce(Ir());xe();var Ip=[{name:"Jank",display:["marker-table","marker-chart"],tooltipLabel:"Jank \u2013 event processing delay",tableLabel:"Event processing delay",fields:[],description:xp.oneLine`
632
632
  Jank markers show when the main event loop of a thread has been busy. It is
633
633
  a good indicator that there may be some kind of performance problem that
634
634
  is worth investigating.
635
- `},{name:"IPC",tooltipLabel:"IPC \u2014\xA0{marker.data.niceDirection}",tableLabel:"{marker.data.messageType} \u2014 {marker.data.niceDirection}",chartLabel:"{marker.data.messageType}",display:["marker-chart","marker-table","timeline-ipc"],fields:[{key:"messageType",label:"Type",format:"string"},{key:"sync",label:"Sync",format:"string"},{key:"sendThreadName",label:"From",format:"string"},{key:"recvThreadName",label:"To",format:"string"},{key:"otherPid",label:"Other Pid",format:"pid"}]},{name:"Network",display:["marker-table","marker-chart"],chartLabel:"{marker.data.URI}",fields:[{format:"string",key:"contentType",label:"Content Type",hidden:!0},{format:"integer",key:"responseStatus",label:"Response Status",hidden:!0}]}];function Is(e,t){let r=t?t.type:null;return r?e[r]??null:null}var HD=/^\s*([\w.]+)\s*\?\s*'([^']*)'\s*:\s*'([^']*)'\s*$/;function VD(e,t,r,n){let o=n.split(/{([^}]+)}/);if(o.length===1)return()=>n;function a(s,l){return console.error(bp.oneLine`
635
+ `},{name:"IPC",tooltipLabel:"IPC \u2014\xA0{marker.data.niceDirection}",tableLabel:"{marker.data.messageType} \u2014 {marker.data.niceDirection}",chartLabel:"{marker.data.messageType}",display:["marker-chart","marker-table","timeline-ipc"],fields:[{key:"messageType",label:"Type",format:"string"},{key:"sync",label:"Sync",format:"string"},{key:"sendThreadName",label:"From",format:"string"},{key:"recvThreadName",label:"To",format:"string"},{key:"otherPid",label:"Other Pid",format:"pid"}]},{name:"Network",display:["marker-table","marker-chart"],chartLabel:"{marker.data.URI}",fields:[{format:"string",key:"contentType",label:"Content Type",hidden:!0},{format:"integer",key:"responseStatus",label:"Response Status",hidden:!0}]}];function vs(e,t){let r=t?t.type:null;return r?e[r]??null:null}var ZD=/^\s*([\w.]+)\s*\?\s*'([^']*)'\s*:\s*'([^']*)'\s*$/;function JD(e,t,r,n){let o=n.split(/{([^}]+)}/);if(o.length===1)return()=>n;function a(s,l){return console.error(xp.oneLine`
636
636
  Error processing the label "${s}" because of the ${l}.
637
637
  Currently the labels in the marker schema take the form of
638
638
  "marker.data.keyName", "marker.startTime", or a ternary like
639
639
  "marker.data.keyName ? 'yes' : 'no'". No other type of access
640
640
  is currently supported.
641
- `),()=>""}let i=o.map((s,l)=>{if(l%2===0)return()=>s;let c=s.match(HD);if(c){let[,h,y,b]=c,m=h.split(".");if(m.length===3&&m[0]==="marker"&&m[1]==="data"&&m[2]){let g=m[2];return T=>{var S;return(S=T.data)!=null&&S[g]?y:b}}return a(n,s)}let u=s.trim().split(".");if(u.length!==2&&u.length!==3)return a(n,s);let[d,f,p]=u;if(d!=="marker")return a(n,s);if(u.length===2)switch(f){case"start":return h=>on(h.start);case"end":return h=>h.end===null?"unknown":on(h.end);case"duration":return h=>h.end===null?"unknown":on(h.end-h.start);case"name":return h=>h.name;case"category":return h=>t[h.category].name;default:return a(n,s)}if(f==="data"){let h=null;for(let y of e.fields)if(y.key===p){h=y.format;break}return y=>{if(!y.data)return"";let b=y.data[p];return b==null?"":h?Ba(e.name,h,b,r):b}}return a(n,s)});return s=>{let l="";for(let c of i)l+=c(s);return l}}var jD={tooltipLabel:e=>e.name,chartLabel:e=>"",tableLabel:e=>{let t="";if(e.data){let r=e.data;r.type==="FileIO"&&(r.source&&(t=`(${r.source}) `),t+=r.operation,r.filename&&(t=r.operation?`${t} \u2014 ${r.filename}`:r.filename))}return t},copyLabel:e=>e.name};function to(e,t,r,n,o,a){let i=new Map,s=/^{marker.name}\s[-—]\s/;for(let u of t){let d;a==="copyLabel"?(d=u.tableLabel,d&&!s.test(d)&&(d="{marker.name} \u2014 "+d)):(d=u[a],d&&a==="tableLabel"&&(d=d.replace(s,""))),d&&i.set(u.name,VD(u,n,o,d))}let l=W(jD[a],"Unable to find a fallback label function."),c=new Map;return u=>{let d=c.get(u);if(d===void 0){let f=e(u),p=f.data?f.data.type:null,h=p?i.get(p):null;d=h?h(f):l(f),c.set(u,d)}return d}}function Jx(e,t,r){let n=new Map;return o=>{let a=n.get(o);if(a===void 0){let i=e(o),s=i.data?i.data.type:null;if(s){let l=t[s];l!=null&&l.tooltipLabel&&(a=qD(i,l,r,l.tooltipLabel))}a||(a=i.name),n.set(o,a)}return a}}function qD(e,t,r,n){var p;let o=n.split(/{([^}]+)}/);if(o.length<2)return null;let i=o[1].trim().split(".");if(i.length!==3)return null;let[s,l,c]=i;if(s!=="marker"||l!=="data"||!c)return null;let u=(p=t.fields)==null?void 0:p.find(h=>h.key===c);if(!u)return null;let d=e.data;if(!d)return null;let f=d[c];return f==null?null:Ba(d.type,u.format,f,r)}function Ba(e,t,r,n,o,a){if(r==null)return console.warn(`Formatting ${r} for ${e} with format ${JSON.stringify(t)}`),"(empty)";if(typeof t=="object")switch(t.type){case"table":{let{columns:i}=t;if(!(r instanceof Array))throw new Error("Expected an array for table type");let l=i.some(u=>u.label)?[i.map(u=>u.label||"(empty)")]:[],c=r.map((u,d)=>{if(!(u instanceof Array))throw new Error("Expected an array for table row");if(u.length!==i.length)throw new Error(`Row ${d} length doesn't match column count (row: ${u.length}, cols: ${i.length})`);return u.map((f,p)=>{let{type:h}=i[p];return Ba(e,h||"string",f,n,o,a)})});return l.push(...c),l.map(u=>`(${u.join(", ")})`).join(",")}default:throw new Error(`Unknown format type ${JSON.stringify(t.type)}`)}switch(t){case"url":case"file-path":case"sanitized-string":case"string":return String(r)||"(empty)";case"unique-string":case"flow-id":case"terminating-flow-id":return n.getString(r,"(empty)");case"duration":case"time":return on(r);case"seconds":return Xc(r);case"milliseconds":return mp(r);case"microseconds":return hp(r);case"nanoseconds":return pp(r);case"bytes":return xs(r);case"integer":return dt(r,0,0);case"decimal":return dt(r);case"percentage":return Yc(r);case"pid":return a&&a.has(r)?`${W(a.get(r))} (${r})`:`PID: ${r}`;case"tid":return o&&o.has(r)?`${W(o.get(r))} (${r})`:`TID: ${r}`;case"list":if(!(r instanceof Array))throw new Error("Expected an array for list format");return r.map(i=>Ba(e,"string",i,n)).join(", ");default:return console.warn(`A marker schema of type "${e}" had an unknown format ${JSON.stringify(t)}`),r}}function Sp(e,t,r,n){let{data:o}=t;if(!o)return!1;for(let a of e.fields){let i=o[a.key];if(i!=null){if(a.format==="unique-string"||a.format==="flow-id"||a.format==="terminating-flow-id"){if(typeof i!="number"){console.warn(`In marker ${t.name}, the key ${a.key} has an invalid value "${i}" as a unique string, it isn't a number.`);continue}if(!r.hasIndex(i)){console.warn(`In marker ${t.name}, the key ${a.key} has an invalid index "${i}" as a unique string, as it's missing from the string table.`);continue}i=r.getString(i)}if(i!==""&&n(i,a.key))return!0}}return!1}function vs(e){let t=new Map;t.set("CompositorScreenshot",["url"]);for(let r of e){let{name:n,fields:o}=r,a=[];for(let i of o)(i.format==="unique-string"||i.format==="flow-id"||i.format==="terminating-flow-id")&&i.key&&a.push(i.key);a.length!==0&&t.set(n,a)}return t}function Yx(e,t,r){let n=()=>i.push({start:a-o,end:a,name:"Jank",category:r,threadId:null,data:{type:"Jank"}}),o=0,a=0,i=[];for(let s=0;s<e.length;s++){let l;e.eventDelay?l=e.eventDelay[s]:e.responsiveness&&(l=e.responsiveness[s]),l!=null&&(l<o&&o>=t&&n(),o=l,a=e.time[s])}return o>=t&&n(),i}function ws(e,t,r,n,o,a){if(!n)return t;let i=!!n.generic,s=!1;for(let c of n.fieldMap.values())i=i||c.positive!==null,s=s||c.negative!==null;let l=[];for(let c of t){let u=e(c),d=!0;i&&(d=zD(u,r,n,o,a)),d&&s&&(d=KD(u,r,n,o,a)),d&&l.push(c)}return l}function zD(e,t,r,n,o){let a=r;function i(u,d){d=d.toLowerCase();let f=a.fieldMap.get(d),p=(a.generic?a.generic.test(u):!1)||(f&&f.positive?f.positive.test(u):!1);return a.generic&&(a.generic.lastIndex=0),f&&f.positive&&(f.positive.lastIndex=0),p}let{data:s,name:l,category:c}=e;if(o[c]!==void 0){let u=o[c].name;if(i(u,"cat"))return!0}if(i(l,"name"))return!0;if(s&&typeof s=="object"){if(i(s.type,"type"))return!0;let u=Is(t,e.data);if(u&&Sp(u,e,n,i))return!0}return!1}function KD(e,t,r,n,o){let a=r;function i(u,d){d=d.toLowerCase();let f=a.fieldMap.get(d),p=f==null?void 0:f.negative;if(!p)return!1;let h=p.test(u);return p.lastIndex=0,h}let{data:s,name:l,category:c}=e;if(o[c]!==void 0){let u=o[c].name;if(i(u,"cat"))return!1}if(i(l,"name"))return!1;if(s&&typeof s=="object"){if(i(s.type,"type"))return!1;let u=Is(t,e.data);if(u&&Sp(u,e,n,i))return!1}return!0}var Qc=class{_correlations;constructor(){this._correlations=new Map}set(t,r,n){let o=this._correlations.get(t);o||(o=new Map,this._correlations.set(t,o)),o.set(r,n)}get(t,r){let n=this._correlations.get(t);if(n)return n.get(r)}};function xp(e,t){function r(c,u){let d;return u.direction==="sending"?d=`${c.pid},${u.otherPid}`:d=`${u.otherPid},${c.pid}`,d+`,${u.messageSeqno},${u.messageType}`}function n(c){if(c!=null){let u=s.get(c);if(u!==void 0)return`${u} (Thread ID: ${c})`}}function o(c){let{phase:u}=c;if(c.direction==="sending")switch(u){case"endpoint":case void 0:return 0;case"transferStart":return 1;case"transferEnd":return 2;default:throw ae(u,"Unhandled IPC phase type.")}else switch(u){case"transferEnd":return 3;case"endpoint":case void 0:return 4;case"transferStart":throw new Error('Unexpected "transferStart" phase found on receiving side.');default:throw ae(u,"Unhandled IPC phase type.")}}if(!$e.withBackingArray(t.stringArray).hasString("IPC"))return new Qc;let i=new Map,s=new Map;for(let c of e)if(typeof c.tid=="number"){let u=c.tid;s.set(u,nr(e,c));for(let d=0;d<c.markers.length;d++){let f=c.markers.data[d];if(!f||f.type!=="IPC")continue;let p=r(c,f);i.has(p)||i.set(p,new Array(5).fill(void 0));let h=W(i.get(p)),y=o(f);h[y]===void 0?h[y]={tid:u,index:d,data:f}:console.warn("Duplicate IPC marker found for key",p)}}let l=new Qc;for(let c of i.values()){let u=c[0],d=c[4],f=u?u.tid:void 0,p=d?d.tid:void 0,h={startTime:u?u.data.startTime:void 0,sendStartTime:c[1]?c[1].data.startTime:void 0,sendEndTime:c[2]?c[2].data.startTime:void 0,recvEndTime:c[3]?c[3].data.startTime:void 0,endTime:d?d.data.startTime:void 0,sendTid:f,recvTid:p,sendThreadName:n(f),recvThreadName:n(p)},y=new Set;if(u&&(y.add(u.tid),l.set(u.tid,u.index,h)),d&&(y.add(d.tid),l.set(d.tid,d.index,h)),!u||!d){for(let b of c.slice(1,4))if(b!==void 0){let m=b;y.has(m.tid)||(l.set(m.tid,m.index,h),y.add(m.tid))}}}return l}function Ip(e,t,r,n,o){let a=[],i=[],s=new Map,l=new Map;function c(p,h){i.push(p),a.push(h)}function u(p,h){return p===null?h:h===null?p:{...p,...h}}let d=new Map;for(let p=0;p<e.length;p++){let h=e.name[p],y=e.startTime[p],b=e.endTime[p],m=e.phase[p],g=e.data[p],T=e.category[p],S=e.threadId?e.threadId[p]:null;if(g)switch(g.type){case"Network":{let I="Network markers are assumed to have a start and end time.";if(g.status==="STATUS_START")l.set(g.id,p);else{let v=g,w=l.get(g.id);if(w!==void 0){l.delete(g.id);let k=e.data[w],N=W(e.startTime[w],I),R=W(y,I),F=W(b,I);c([w,p],{start:N,end:F,name:t[h],category:T,threadId:S,data:{...v,startTime:N,fetchStart:R,cause:k.cause||v.cause}})}else{let k=Math.min(n.start,W(y,"Network markers are assumed to have a start time.")),N=W(b,I);c([p],{start:k,end:N,name:t[h],category:T,threadId:S,data:{...v,startTime:k,fetchStart:v.startTime,cause:v.cause},incomplete:!0})}}continue}case"CompositorScreenshot":{let{windowID:I}=g,v=d.get(I);if(v!==void 0){d.delete(I);let w=W(e.startTime[v],"Expected to find a start time for a screenshot marker."),k=W(y,"The CompositorScreenshot is assumed to have a start time."),N=e.data[v],R=e.threadId?e.threadId[v]:null;c([v],{start:w,end:k,name:"CompositorScreenshot",category:T,threadId:R,data:N})}if(t[h]==="CompositorScreenshotWindowDestroyed")break;d.set(I,p);continue}case"IPC":{let I=o.get(r||0,p);if(!I||g.direction==="sending"&&g.phase==="transferEnd"&&I.sendStartTime!==void 0)continue;let v=g.direction==="sending"?"IPCOut":"IPCIn";g.sync&&(v="Sync"+v);let w=W(g.startTime,"Expected IPC startTime to exist in the payload."),k=w,N=!0;I.startTime!==void 0&&I.endTime!==void 0&&(w=I.startTime,k=I.endTime,N=!1);let R={...g,...I,niceDirection:g.direction==="sending"?`sent to ${I.recvThreadName||g.otherPid}`:`received from ${I.sendThreadName||g.otherPid}`};c([p],{start:w,end:k,name:v,category:T,threadId:S,data:R,incomplete:N});continue}default:}switch(m){case 0:c([p],{start:W(y,"An Instant marker did not have a startTime."),end:null,name:t[h],category:T,threadId:S,data:g});break;case 1:{let I=W(y,"An Interval marker did not have a startTime."),v=W(b,"An Interval marker did not have a startTime.");c([p],{start:I,end:v,name:t[h],category:T,threadId:S,data:g})}break;case 2:{let I=s.get(h);I||(I=[],s.set(h,I)),I.push(p)}break;case 3:{let I=s.get(h),v;I&&(v=I.pop());let w=W(b,"An IntervalEnd marker did not have an endTime");if(v!==void 0){let k=W(e.startTime[v],"An IntervalStart marker did not have a startTime");c([v,p],{start:k,name:t[h],end:w,category:T,threadId:S,data:u(e.data[v],g)})}else{let k=Math.min(w,n.start);c([p],{start:k,name:t[h],end:w,category:T,threadId:S,data:g,incomplete:!0})}}break;default:throw new Error("Unhandled marker phase type.")}}let f=n.end;for(let p of s.values())for(let h of p){let y=W(e.startTime[h],"Encountered a marker without a startTime. Eventually this needs to be handled for phase-style markers.");c([h],{start:y,end:Math.max(f,y),name:t[e.name[h]],data:e.data[h],category:e.category[h],threadId:e.threadId?e.threadId[h]:null,incomplete:!0})}for(let p of l.values()){let h=W(e.startTime[p],"Network markers are assumed to always have a start time.");c([p],{start:h,end:Math.max(f,h),name:t[e.name[p]],category:e.category[p],threadId:e.threadId?e.threadId[p]:null,data:e.data[p],incomplete:!0})}for(let p of d.values()){let h=W(e.startTime[p],"Expected to find a CompositorScreenshot marker with a start time.");c([p],{start:h,end:Math.max(f,h),name:"CompositorScreenshot",category:e.category[p],threadId:e.threadId?e.threadId[p]:null,data:e.data[p]})}return{markers:a,markerIndexToRawMarkerIndexes:i}}function ZD(e,t,r,n){let{markers:o,markerIndexToRawMarkerIndexes:a}=t,i=new Set;for(let s=0;s<o.length;s++){let{start:l,end:c}=o[s];if(c===null){if(l<n&&l>=r)for(let u of a[s])i.add(u)}else if(l<n&&c>=r)for(let u of a[s])i.add(u)}return[...i].sort((s,l)=>s-l)}function Xx(e,t,r,n){let o=Ur(),a=[];e.threadId&&(o.threadId=a);let i=new Map,s=l=>{r.has(l)||(i.set(l,o.length),o.name.push(e.name[l]),o.startTime.push(e.startTime[l]),o.endTime.push(e.endTime[l]),o.phase.push(e.phase[l]),o.data.push(e.data[l]),o.category.push(e.category[l]),e.threadId&&a.push(e.threadId[l]),o.length++)};if(n===null)for(let l=0;l<e.length;l++)s(l);else{let{start:l,end:c}=n,u=ZD(e,t,l,c);for(let d of u)s(d)}return{rawMarkerTable:o,oldMarkerIndexToNew:i}}function eu(e,t,r){return t.filter(n=>r(e(n)))}function vp(e,t,r,n){return eu(e,t,o=>o.start<=n&&(o.end||o.start)>=r)}function En(e){return!!(e.data&&e.data.type==="Network")}function Qx(e){return!!(e.data&&e.data.type==="UserTiming")}function eI({name:e,data:t}){return e==="TTI"||e==="FirstContentfulPaint"||e==="FirstContentfulComposite"||e==="LargestContentfulPaint"?!0:t?!!("innerWindowID"in t&&t.innerWindowID&&e==="Navigation::Start"||"category"in t&&t.category==="Navigation"&&(e==="Load"||e==="DOMContentLoaded")):!1}function tI(e){let{data:t}=e;if(!(!t||t.type!=="FileIO"))return t.threadId===void 0}function wp(e){return t=>{let{data:r}=t;if(!r||!e[r.type])return!0}}function rI(e,t){let r=new Map;for(let n of t){let o=e(n),{data:a}=o;if(a&&a.type==="CompositorScreenshot"){let i=r.get(a.windowID);i===void 0&&(i=[],r.set(a.windowID,i)),i.push(o)}}return r}function nI(e){return{...e,URI:"",RedirectURI:""}}function oI(e){return{...e,prefValue:""}}function aI(e){return{...e,name:La(e.name)}}function iI(e,t){return["ExtensionParent","ExtensionChild"].includes(e)?{...t,name:t.name.replace(/^.*, (api_(call|event): )/,"$1")}:e==="Extension Suspend"?{...t,name:t.name.replace(/ by .*$/,"")}:t}function sI(e,t){for(let{key:r,format:n}of e.fields)r in t&&(n==="url"?t={...t,[r]:La(t[r])}:n==="file-path"?t={...t,[r]:ox(t[r])}:n==="sanitized-string"&&(t={...t,[r]:"<sanitized>"}));return t}function JD(e,t){let r=new Set;for(let{display:n,name:o}of e)n.includes(t)&&r.add(o);return r}function YD(e){}function Lo(e,t,r,n,o,a=YD){let i=JD(r,o);return eu(e,t,s=>{let l=a(s);if(l!==void 0)return l;let c=s.data?s.data.type??null:null;return c!==null&&i.has(c)})}var ks=e=>{if(!e||!e.length)return null;let t=new Map,r=[];for(let o of e){let a=o.match(/^(?<maybeNegative>-?)(?<key>\w+):(?<value>.+)/i);if(a&&a.groups){let{maybeNegative:i,value:s}=a.groups,l=a.groups.key.toLowerCase(),c=t.get(l);c||(c={positive:[],negative:[]},t.set(l,c)),i.length===0?(c.positive.push(s),r.push(o)):c.negative.push(s)}else r.push(o)}let n=new Map;for(let[o,a]of t)n.set(o,{positive:Mo(a.positive),negative:Mo(a.negative)});return{generic:Mo(r),fieldMap:n}},kp={Error:"E",Warning:"W",Info:"I",Debug:"D",Verbose:"V"},lI={E:1,W:2,I:3,D:4,V:5};function cI(e){function t(o,a){return String(o).padStart(a,"0")}let r=new Date(e),n=Math.trunc((e-Math.trunc(e))*10**6);return`${r.getUTCFullYear()}-${t(r.getUTCMonth()+1,2)}-${t(r.getUTCDate(),2)} ${t(r.getUTCHours(),2)}:${t(r.getUTCMinutes(),2)}:${t(r.getUTCSeconds(),2)}.${t(r.getUTCMilliseconds(),3)}${t(n,6)} UTC`}function uI(e,t,r,n,o,a,i){if("message"in o){if(!o.message)return null;let l=i[o.level]??"",c=kp[l]??"D";return`${e} - [${t} ${r}: ${n}]: ${c}/${a} ${o.message.trim()}`}if(!o.name)return null;let s=o.module.includes("/")?"":"D/";return`${e} - [${t} ${r}: ${n}]: ${s}${o.module} ${o.name.trim()}`}function QD(e){let t=e.replace(/ \[clone [^]+\]$/,"").replace(/ const$/,"").replace(/^static /,"");if(t[t.length-1]!==")")return e;let r=0;for(let n=t.length-1;n>0;n--)if(t[n]===")")r++;else if(t[n]==="("&&(r--,r===0))return t.substr(0,n);return t}function e2(e){let t="",r=0,n=null,o=0;for(let a=1;a<e.length;a++)e[a]==="<"?(e[a-1]!==" "&&e[a-1]!=="."&&n===null&&(t+=e.slice(o,a),o=a,n=r),r++):e[a]===">"&&(r--,r===n&&(o=a+1,n=null));return t+=e.slice(o),t}function _s(e){return e2(QD(e))}function _p(e,t){let r=t.oldResourceToNewResourcePlusOne[e];return r!==0?r-1:null}function wr(e,t){let r=t.oldFuncCount;if(e<r){let a=t.oldFuncToNewFuncPlusOne[e];return a!==0?a-1:null}let n=e-r,o=_p(n,t);return o!==null?t.newFuncCount+o:null}function Cp(e,t){let r=new Array;for(let n of e){let o=wr(n,t);if(o===null)return null;r.push(o)}return r}var t2={"focus-subtree":!0,"focus-function":!0,"focus-self":!0,"merge-call-node":!0,"merge-function":!0,"drop-function":!0,"collapse-resource":!0,"collapse-direct-recursion":!0,"collapse-recursion":!0,"collapse-function-subtree":!0,"focus-category":!0,"drop-category":!0,"filter-samples":!0},r2=Object.keys(t2),dI={},fI={};r2.forEach(e=>{let t;switch(e){case"focus-subtree":t="f";break;case"focus-function":t="ff";break;case"focus-self":t="ffs";break;case"focus-category":t="fg";break;case"drop-category":t="dg";break;case"merge-call-node":t="mcn";break;case"merge-function":t="mf";break;case"drop-function":t="df";break;case"collapse-resource":t="cr";break;case"collapse-direct-recursion":t="drec";break;case"collapse-recursion":t="rec";break;case"collapse-function-subtree":t="cfs";break;case"filter-samples":t="fs";break;default:throw ae(e)}dI[e]=t,fI[t]=e});function pI(e){if(!e)return[];let t=[];return e.split("~").forEach(r=>{let n=r.split("-"),o=n[0],a=dS(fI[o]);if(a===null){console.error("Unrecognized transform was passed to the URL.",o);return}switch(a){case"collapse-resource":{let[,i,s,l]=n,c=parseInt(s,10),u=parseInt(l,10);if(isNaN(c)||isNaN(u))break;c>=0&&t.push({type:a,resourceIndex:c,collapsedFuncIndex:u,implementation:gs(i)});break}case"collapse-recursion":{let[,i]=n,s=parseInt(i,10);if(isNaN(s)||s<0)break;t.push({type:"collapse-recursion",funcIndex:s});break}case"collapse-direct-recursion":{let[,i,s]=n,l=parseInt(s,10);if(isNaN(l)||l<0)break;t.push({type:"collapse-direct-recursion",funcIndex:l,implementation:gs(i)});break}case"merge-function":case"focus-function":case"drop-function":case"collapse-function-subtree":{let[,i]=n,s=parseInt(i,10);if(!isNaN(s)&&s>=0)switch(a){case"merge-function":t.push({type:"merge-function",funcIndex:s});break;case"focus-function":t.push({type:"focus-function",funcIndex:s});break;case"drop-function":t.push({type:"drop-function",funcIndex:s});break;case"collapse-function-subtree":t.push({type:"collapse-function-subtree",funcIndex:s});break;default:throw new Error("Unmatched transform.")}break}case"focus-self":{let[,i,s]=n,l=parseInt(s,10);if(isNaN(l)||l<0)break;t.push({type:"focus-self",funcIndex:l,implementation:gs(i)});break}case"focus-category":{let[,i]=n,s=parseInt(i,10);!isNaN(s)&&s>=0&&t.push({type:"focus-category",category:s});break}case"drop-category":{let[,i]=n,s=parseInt(i,10);!isNaN(s)&&s>=0&&t.push({type:"drop-category",category:s});break}case"focus-subtree":case"merge-call-node":{let[,i,s,l]=n,c=gs(i),u=Da(s),d=!!l;switch(a){case"focus-subtree":t.push({type:"focus-subtree",implementation:c,callNodePath:u,inverted:d});break;case"merge-call-node":t.push({type:"merge-call-node",implementation:c,callNodePath:u});break;default:throw new Error("Unmatched transform.")}break}case"filter-samples":{let[,i,...s]=n,l=s.join("-"),c=n2(i);if(c!=="marker-search"){console.error("A profiler-cli-only filter-samples type was found in the URL and will be ignored.",c);break}t.push({type:"filter-samples",filterType:c,filter:l});break}default:throw ae(a)}}),t}function n2(e){switch(e){case"m":return"marker-search";case"om":return"outside-marker";case"fi":return"function-include";case"sp":return"stack-prefix";case"ss":return"stack-suffix";default:throw new Error("Unknown filter type.")}}function o2(e){switch(e){case"marker-search":return"m";case"outside-marker":return"om";case"function-include":return"fi";case"stack-prefix":return"sp";case"stack-suffix":return"ss";default:throw ae(e)}}function Ep(e){return e.map(t=>{let r=dI[t.type];if(!r)throw new Error("Expected to be able to convert a transform into its short key.");switch(t.type){case"merge-function":case"drop-function":case"collapse-function-subtree":case"focus-function":return`${r}-${t.funcIndex}`;case"focus-category":case"drop-category":return`${r}-${t.category}`;case"collapse-resource":return`${r}-${t.implementation}-${t.resourceIndex}-${t.collapsedFuncIndex}`;case"collapse-recursion":return`${r}-${t.funcIndex}`;case"collapse-direct-recursion":case"focus-self":return`${r}-${t.implementation}-${t.funcIndex}`;case"focus-subtree":case"merge-call-node":{let n=[r,t.implementation,Cn(t.callNodePath)].join("-");return"inverted"in t&&t.inverted&&(n+="-i"),n}case"filter-samples":return`${r}-${o2(t.filterType)}-${t.filter}`;default:throw ae(t)}}).join("~")}function hI(e,t,r,n){let{funcTable:o,stringTable:a,resourceTable:i}=t,{categories:s}=e,l=n.map(c=>{if(c.type==="collapse-resource"){let p=i.name[c.resourceIndex];return{l10nId:"TransformNavigator--collapse-resource",item:a.getString(p)}}if(c.type==="focus-category"){if(s===void 0)throw new Error("Expected categories to be defined.");return{l10nId:"TransformNavigator--focus-category",item:s[c.category].name}}if(c.type==="drop-category"){if(s===void 0)throw new Error("Expected categories to be defined.");return{l10nId:"TransformNavigator--drop-category",item:s[c.category].name}}if(c.type==="filter-samples")switch(c.filterType){case"marker-search":return{l10nId:"TransformNavigator--drop-samples-outside-of-markers-matching",item:c.filter};case"outside-marker":case"function-include":case"stack-prefix":case"stack-suffix":throw new Error(`getTransformLabelL10nIds: profiler-cli-only filter type "${c.filterType}" is not supported in the frontend transform navigator.`);default:throw ae(c.filterType)}let u;switch(c.type){case"focus-subtree":case"merge-call-node":u=c.callNodePath[c.callNodePath.length-1];break;case"focus-function":case"focus-self":case"merge-function":case"drop-function":case"collapse-direct-recursion":case"collapse-recursion":case"collapse-function-subtree":u=c.funcIndex;break;default:throw ae(c)}let d=o.name[u],f=_s(a.getString(d));switch(c.type){case"focus-subtree":return{l10nId:"TransformNavigator--focus-subtree",item:f};case"focus-function":return{l10nId:"TransformNavigator--focus-function",item:f};case"focus-self":return{l10nId:"TransformNavigator--focus-self",item:f};case"merge-call-node":return{l10nId:"TransformNavigator--merge-call-node",item:f};case"merge-function":return{l10nId:"TransformNavigator--merge-function",item:f};case"drop-function":return{l10nId:"TransformNavigator--drop-function",item:f};case"collapse-direct-recursion":return{l10nId:"TransformNavigator--collapse-direct-recursion-only",item:f};case"collapse-recursion":return{l10nId:"TransformNavigator--collapse-recursion",item:f};case"collapse-function-subtree":return{l10nId:"TransformNavigator--collapse-function-subtree",item:f};default:throw ae(c)}});return l.unshift({l10nId:"TransformNavigator--complete",item:r}),l}function Np(e,t,r,n){switch(t.type){case"focus-subtree":return a2(t.callNodePath,e);case"focus-function":return i2(t.funcIndex,e);case"focus-self":return s2(t.funcIndex,e);case"focus-category":return d2(t.category,e,n);case"drop-category":return f2(t.category,e,n);case"merge-call-node":return l2(t.callNodePath,e);case"merge-function":return c2(t.funcIndex,e);case"drop-function":return u2(t.funcIndex,e);case"collapse-resource":return p2(t.resourceIndex,t.collapsedFuncIndex,r.funcTable,e);case"collapse-direct-recursion":return h2(t.funcIndex,e);case"collapse-recursion":return m2(t.funcIndex,e);case"collapse-function-subtree":return g2(t.funcIndex,e);case"filter-samples":return e;default:throw ae(t)}}function a2(e,t){return mI(e,t)?t.slice(e.length-1):[]}function i2(e,t){let r=t.indexOf(e);return r===-1?[]:t.slice(r)}function s2(e,t){return t.indexOf(e)!==-1?[e]:[]}function l2(e,t){return mI(e,t)?t.filter((r,n)=>n!==e.length-1):t}function c2(e,t){return t.filter(r=>r!==e)}function u2(e,t){return t.includes(e)?[]:t}function d2(e,t,r){let n=[],o=-1;for(let a of t){let i=r.getCallNodeIndexFromParentAndFunc(o,a);if(i===null)throw new Error(`We couldn't find a node with prefix ${o} and func ${a}, this shouldn't happen.`);r.categoryForNode(i)===e&&n.push(a),o=i}return n}function f2(e,t,r){let n=r.getCallNodeIndexFromPath(t);return n!==null&&r.categoryForNode(n)===e?[]:t}function p2(e,t,r,n){return n.map(o=>r.resource[o]===e?t:o).filter((o,a,i)=>o!==i[a-1]||o!==t)}function h2(e,t){let r=[],n;for(let o=0;o<t.length;o++){let a=t[o];(a!==e||a!==n)&&r.push(a),n=a}return r}function m2(e,t){let r=t.indexOf(e),n=t.lastIndexOf(e);return r===-1?t:t.slice(0,r).concat(t.slice(n))}function g2(e,t){let r=t.indexOf(e);return r===-1?t:t.slice(0,r+1)}function mI(e,t){return e.length<=t.length&&e.every((r,n)=>r===t[n])}function y2(e,t,r){return Gt("mergeCallNode",()=>{let{stackTable:n,frameTable:o}=e,a=new Map,i=new Array(n.length),s=Do[r],l=t.length,c=new Map;c.set(null,0);for(let d=0;d<n.length;d++){let f=n.prefix[d],p=a.get(f),h=p!==void 0?p:f;i[d]=h;let y=c.get(f);if(y===void 0)continue;let b=n.frame[d],m=o.func[b];if(m===t[y]){let g=y+1;g===l?a.set(d,h):c.set(d,g)}else s(e,m)||c.set(d,y)}let u={...n,prefix:i};return $r(e,u,d=>{let f=a.get(d);return f!==void 0?f:d})})}function b2(e,t){let{stackTable:r,frameTable:n}=e,o=new Uint32Array(r.length),a=r.frame,i=n.func,s=r.prefix,l=new Array(r.length);for(let u=0;u<r.length;u++){let d=s[u],f=d===null?0:o[d],p=a[u];i[p]===t?o[u]=f:o[u]=u+1;let y=f===0?null:f-1;l[u]=y}let c={...r,prefix:l};return $r(e,c,u=>{if(u===null)return null;let d=o[u];return d===0?null:d-1})}function T2(e,t){let{stackTable:r,frameTable:n}=e,o=new Uint8Array(r.length);for(let a=0;a<r.length;a++){let i=r.prefix[a],s=r.frame[a];(n.func[s]===t||i!==null&&o[i]===1)&&(o[a]=1)}return $r(e,r,a=>a!==null&&o[a]===1?null:a)}function S2(e,t,r,n){let{funcTable:o,frameTable:a}=e,i=a.func.slice();for(let l=0;l<a.length;l++){let c=a.func[l];o.resource[c]===t&&(i[l]=r)}let s={...e,frameTable:{...a,func:i}};return gI(s,r,n)}function gI(e,t,r){let{stackTable:n,frameTable:o}=e,a=new Map,i=Do[r],s=n.prefix.slice();for(let l=0;l<n.length;l++){let c=n.prefix[l],u=n.frame[l],d=o.func[u],f=c!==null?a.get(c):void 0;f===void 0?d===t&&a.set(l,c):i(e,d)?d===t&&(a.set(l,f),s[l]=f):a.set(l,f)}return{...e,stackTable:{...n,prefix:s}}}function x2(e,t){let{stackTable:r,frameTable:n}=e,o=new Map,a=r.prefix.slice();for(let i=0;i<r.length;i++){let s=r.prefix[i],l=r.frame[i],c=n.func[l],u=s!==null?o.get(s):void 0;u===void 0?c===t&&o.set(i,s):(o.set(i,u),c===t&&(a[i]=u))}return{...e,stackTable:{...r,prefix:a}}}var Do={combined:(e,t)=>!0,cpp:(e,t)=>{let{funcTable:r,stringTable:n}=e;if(e.funcTable.isJS[t])return!1;let o=n.getString(r.name[t]);return!(r.resource[t]===-1&&o.startsWith("0x"))},js:(e,t)=>e.funcTable.isJS[t]||e.funcTable.relevantForJS[t]};function I2(e,t){let{stackTable:r,frameTable:n}=e,o=new Int32Array(r.length),a=new Uint8Array(r.length);for(let i=0;i<r.length;i++){let s=r.prefix[i];if(s!==null&&a[s]!==0)o[i]=o[s],a[i]=1;else{o[i]=i;let l=r.frame[i],c=n.func[l];t===c&&(a[i]=1)}}return $r(e,e.stackTable,i=>i===null?null:o[i])}function v2(e,t,r){return Gt("focusSubtree",()=>{let{stackTable:n,frameTable:o}=e,a=t.length,i=new Int32Array(n.length),s=Do[r],l=new Int32Array(n.length).fill(-1),c=[],u=vr(n.length);for(let f=0;f<n.length;f++){let p=n.prefix[f],h=p!==null?i[p]:0,y=-1;if(h!==-1){if(h===a)y=a;else{let b=n.frame[f],m=o.func[b];m===t[h]?y=h+1:s(e,m)||(y=h)}if(y===a){let b=p===null?-1:l[p];l[f]=c.length,c.push(b===-1?null:b),bt(u,f)}}i[f]=y}let d=Oa(n,c,u);return Qn({newStackTable:d,effectOnThreadData:{oldStackToNewStack:l}},e)})}function w2(e,t,r){return Gt("focusInvertedSubtree",()=>{let n=t.length,{stackTable:o,frameTable:a}=e,i=Do[r];function s(c){let u=0;for(let d=c;d!==null;d=o.prefix[d]){let f=o.frame[d],p=a.func[f];if(p===t[u]){if(u++,u===n)return d}else if(i(e,p))return null}return null}let l=new Map;return l.set(null,null),$r(e,o,c=>{let u=l.get(c);return u===void 0&&(u=s(c),l.set(c,u)),u})})}function k2(e,t){return Gt("focusFunction",()=>{let{stackTable:r,frameTable:n}=e,o=new Int32Array(r.length).fill(-1),a=[],i=vr(r.length);for(let l=0;l<r.length;l++){let c=r.prefix[l],u=r.frame[l],d=n.func[u],f=c===null?-1:o[c];(f!==-1||d===t)&&(o[l]=a.length,a.push(f===-1?null:f),bt(i,l))}let s=Oa(r,a,i);return Qn({newStackTable:s,effectOnThreadData:{oldStackToNewStack:o}},e)})}function _2(e,t,r){return Gt("focusSelf",()=>{let{stackTable:n,frameTable:o}=e,a=Do[r],i=vr(n.length),s=new Array,l=new Int32Array(n.length);for(let u=0;u<n.length;u++){let d=n.frame[u],f=o.func[d];if(f===t){bt(i,u);let p=s.length;s[p]=null,l[u]=p}else{let p=n.prefix[u];if(p!==null&&It(i,p)&&!a(e,f)){bt(i,u);let h=l[p],y=s.length;s[y]=h,l[u]=y}}}let c=Oa(n,s,i);return Qn({newStackTable:c,effectOnThreadData:{dropIfOldStackIsNot:i,oldStackToNewStack:l}},e)})}function C2(e,t){return Gt("focusCategory",()=>{let{stackTable:r}=e,n=new Int32Array(r.length).fill(-1),o=[],a=vr(r.length);for(let s=0;s<r.length;s++){let l=r.prefix[s],c=l===null?-1:n[l];if(r.category[s]!==t){n[s]=c;continue}n[s]=o.length,o.push(c===-1?null:c),bt(a,s)}let i=Oa(r,o,a);return Qn({newStackTable:i,effectOnThreadData:{oldStackToNewStack:n}},e)})}function E2(e,t){return Gt("dropCategory",()=>{let{stackTable:r}=e;return $r(e,r,n=>n!==null&&r.category[n]===t?null:n)})}function Ap(e,t,r){let{stackTable:n,frameTable:o}=e,a=Do[t],i=[],s=null;for(let c=0;c<n.length;c++){let u=n.prefix[c],d=n.frame[c],f=o.func[d],p=u===null?-1:i[u];if(p===null)continue;let h=p+1;if(r[h]===f){if(i[c]=h,h===r.length-1){s=c;break}}else a(e,f)?i[c]=null:i[c]=p}if(s===null)return[];let l=[];for(let c=s;c!==null;c=n.prefix[c]){let u=n.frame[c],d=o.func[u];l.push(d)}return l.reverse()}function yI(e,t,r){let n=Do[t];return r.filter(o=>n(e,o))}function N2(e,t,r,n,o,a){let i=[],s=ks(Ro(a)),l=ws(e,t,r,s,n,o);for(let c of l){let{start:u,end:d}=e(c);u===null||d===null||i.push({start:u,end:d})}return i}function A2(e,t,r,n,o,a,i){return Gt("filterSamples",()=>{let{stackTable:s,frameTable:l}=e;switch(a){case"function-include":{if(!i)throw new Error("function-include filter requires a non-empty filter string.");let u=new Set(i.split(",").map(Number)),d=new Uint8Array(s.length);for(let f=0;f<s.length;f++){let p=s.prefix[f],h=l.func[s.frame[f]];(u.has(h)||p!==null&&d[p])&&(d[f]=1)}return $r(e,s,f=>f!==null&&!d[f]?null:f)}case"stack-suffix":{if(!i)throw new Error("stack-suffix filter requires a non-empty filter string.");let u=Number(i);return $r(e,s,d=>d===null?null:l.func[s.frame[d]]===u?d:null)}case"stack-prefix":{if(!i)throw new Error("stack-prefix filter requires a non-empty filter string.");let u=i.split(",").map(Number),d=new Int32Array(s.length).fill(-1);for(let f=0;f<s.length;f++){let p=s.prefix[f],h=l.func[s.frame[f]];if(p===null)h===u[0]&&(d[f]=1);else{let y=d[p];y<0||(y>=u.length?d[f]=y:h===u[y]&&(d[f]=y+1))}}return $r(e,s,f=>f!==null&&d[f]<u.length?null:f)}case"marker-search":case"outside-marker":{let f=function(p,h){let y=p.slice(),b=0,m=h.length;if(d){for(let g of u){let{start:T,end:S}=g;for(;b<m&&!(h[b]>=T);b++)y[b]=null;for(;b<m&&!(h[b]>=S);b++);}for(;b<m;)y[b]=null,b++}else for(let g of u){let{start:T,end:S}=g;for(;b<m&&!(h[b]>=T);b++);for(;b<m&&!(h[b]>=S);b++)y[b]=null}return y};var c=f;let u=Zx(N2(t,r,n,e.stringTable,o,i)),d=a==="marker-search";return tp(e,e.stackTable,f,f,p=>p)}default:throw ae(a)}})}function bI(e,t,r,n,o,a){switch(t.type){case"focus-subtree":return t.inverted?w2(e,t.callNodePath,t.implementation):v2(e,t.callNodePath,t.implementation);case"merge-call-node":return y2(e,t.callNodePath,t.implementation);case"merge-function":return b2(e,t.funcIndex);case"drop-function":return T2(e,t.funcIndex);case"focus-function":return k2(e,t.funcIndex);case"focus-self":return _2(e,t.funcIndex,t.implementation);case"focus-category":return C2(e,t.category);case"drop-category":return E2(e,t.category);case"collapse-resource":return S2(e,t.resourceIndex,t.collapsedFuncIndex,t.implementation);case"collapse-direct-recursion":return gI(e,t.funcIndex,t.implementation);case"collapse-recursion":return x2(e,t.funcIndex);case"collapse-function-subtree":return I2(e,t.funcIndex);case"filter-samples":return A2(e,r,n,o,a,t.filterType,t.filter);default:throw ae(t)}}function P2(e,t){let{type:r}=e;switch(r){case"focus-subtree":{let n=Cp(e.callNodePath,t);return n===null?null:{type:r,callNodePath:n,implementation:e.implementation,inverted:e.inverted}}case"focus-function":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"focus-self":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n,implementation:e.implementation}}case"merge-call-node":{let n=Cp(e.callNodePath,t);return n===null?null:{type:r,callNodePath:n,implementation:e.implementation}}case"merge-function":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"drop-function":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"collapse-resource":{let n=_p(e.resourceIndex,t);if(n===null)return null;let o=t.newFuncCount+n;return{type:r,resourceIndex:n,implementation:e.implementation,collapsedFuncIndex:o}}case"collapse-direct-recursion":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n,implementation:e.implementation}}case"collapse-recursion":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"collapse-function-subtree":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"focus-category":case"drop-category":return e;case"filter-samples":switch(e.filterType){case"marker-search":case"outside-marker":return e;case"stack-suffix":{let n=wr(Number(e.filter),t);return n===null?null:{...e,filter:String(n)}}case"stack-prefix":{let n=[];for(let o of e.filter.split(",")){let a=wr(Number(o),t);if(a===null)return null;n.push(a)}return{...e,filter:n.join(",")}}case"function-include":{let n=[];for(let o of e.filter.split(",")){let a=wr(Number(o),t);a!==null&&n.push(a)}return n.length===0?null:{...e,filter:n.join(",")}}default:throw ae(e.filterType)}default:throw ae(e)}}function Pp(e,t){return e.map(r=>P2(r,t)).filter(r=>r!==null)}xe();var xI=ce(Ir());var SI={calltree:"TabBar--calltree-tab","flame-graph":"TabBar--flame-graph-tab","stack-chart":"TabBar--stack-chart-tab","marker-chart":"TabBar--marker-chart-tab","marker-table":"TabBar--marker-table-tab","network-chart":"TabBar--network-tab","js-tracer":"TabBar--js-tracer-tab"},ro=Object.getOwnPropertyNames(SI),f8=ro.map(e=>({name:e,title:SI[e]})),no=["calltree","flame-graph","stack-chart"];ur();var ru=16,II=!1,tu=0;function M2(){tu++,II=!0}function F2(){if(tu--,tu<0)throw new Error("_maybeDisableHistoryReplaceState was called more than _enableHistoryReplaceState which should never happen.");tu===0&&(II=!1)}function vI(e){M2();try{e()}finally{F2()}}function O2(e){let{dataSource:t}=e;switch(t){case"none":return[];case"compare":return e.profilesToCompare===null?["compare"]:["compare",e.selectedTab];case"uploaded-recordings":return["uploaded-recordings"];case"from-browser":case"from-post-message":case"unpublished":case"from-file":return[t,e.selectedTab];case"public":case"local":return[t,e.hash,e.selectedTab];case"from-url":return["from-url",encodeURIComponent(e.profileUrl),e.selectedTab];default:throw ae(t)}}function L2(e){let{dataSource:t}=e;switch(t){case"none":case"uploaded-recordings":return"";case"compare":if(e.profilesToCompare===null)return"";break;case"public":case"local":case"from-browser":case"from-post-message":case"unpublished":case"from-file":case"from-url":break;default:throw ae(t)}let{selectedThreads:r}=e.profileSpecific,n=r!==null?ut(r):null,o={globalTrackOrder:D2(e.profileSpecific.globalTrackOrder),hiddenGlobalTracks:B2(e.profileSpecific.hiddenGlobalTracks),hiddenLocalTracksByPid:U2(e.profileSpecific.hiddenLocalTracksByPid),localTrackOrderByPid:$2(e.profileSpecific.localTrackOrderByPid,e.profileSpecific.localTrackOrderChangedPids),tabID:e.profileSpecific.tabFilter??void 0,range:jx(e.profileSpecific.committedRanges)||void 0,thread:r===null?void 0:Oo(r),file:e.pathInZipFile||void 0,profiles:e.profilesToCompare||void 0,v:ru,profileName:e.profileName||void 0,symbolServer:e.symbolServerUrl||void 0,implementation:e.profileSpecific.implementation==="combined"?void 0:e.profileSpecific.implementation,timelineType:e.profileSpecific.timelineType==="cpu-category"?void 0:e.profileSpecific.timelineType},a,i=e.selectedTab;switch(i){case"stack-chart":a=o,a.showUserTimings=e.profileSpecific.showUserTimings?null:void 0,a.sameWidths=e.profileSpecific.stackChartSameWidths?null:void 0;case"flame-graph":case"calltree":{a=o,a.search=e.profileSpecific.callTreeSearchString||void 0,a.invertCallstack=e.profileSpecific.invertCallstack?null:void 0,n!==null&&e.profileSpecific.transforms[n]&&(a.transforms=Ep(e.profileSpecific.transforms[n])||void 0),a.ctSummary=e.profileSpecific.lastSelectedCallTreeSummaryStrategy==="timing"?void 0:e.profileSpecific.lastSelectedCallTreeSummaryStrategy;let{sourceView:l,assemblyView:c,isBottomBoxOpenPerPanel:u}=e.profileSpecific;if(u[i]&&(l.sourceIndex!==null&&(a.sourceViewIndex=l.sourceIndex),c.isOpen&&c.currentNativeSymbol!==null)){let{currentNativeSymbol:d,nativeSymbols:f}=c;a.assemblyView=H2(f[d])}break}case"marker-table":case"marker-chart":a=o,a.markerSearch=e.profileSpecific.markersSearchString||void 0,a.marker=n!==null&&e.profileSpecific.selectedMarkers[n]!==null?e.profileSpecific.selectedMarkers[n]:void 0;break;case"network-chart":a=o,a.networkSearch=e.profileSpecific.networkSearchString||void 0;break;case"js-tracer":{a=o,a.summary=e.profileSpecific.showJsTracerSummary?null:void 0;break}default:throw ae(i)}return dp.stringify(a,{arrayFormat:"bracket"})}function Rp(e){let t=O2(e),r=L2(e),{dataSource:n}=e;return n==="none"?"/":(t.length===0?"/":"/"+t.join("/")+"/")+(r?"?"+r:"")}function D2(e){return Cn(e)||void 0}function B2(e){if(e.size>0)return Oo(e)}function U2(e){let t=[];for(let[r,n]of e)n.size>0&&t.push(`${r}-${Oo(n)}`);return t.join("~")||void 0}function $2(e,t){let r=[];for(let n of t){let o=e.get(n);o&&o.length>0&&r.push(`${n}-${Cn(o)}`)}return r.join("~")||void 0}var wI={1:e=>{if(e.pathname==="/"){let t=Object.assign({},e.query,dp.parse(e.hash));"report"in t&&(e.pathname=`/public/${t.report}/calltree/`,e.hash="",e.query={})}e.query.jsOnly!==void 0&&(delete e.query.jsOnly,e.query.implementation="js"),e.query.callTreeFilters&&(e.query.transforms=e.query.callTreeFilters.split("~").map(t=>{let[r,n]=t.split("-");switch(r){case"prefix":return`f-combined-${n}`;case"prefixjs":return`f-js-${n}`;case"postfix":return`f-combined-${n}-i`;case"postfixjs":return`f-js-${n}-i`;default:return}}).filter(t=>t).join("~"),delete e.query.callTreeFilters)},2:e=>{e.pathname=e.pathname.replace(/^(\/[^/]+\/[^/]+)\/timeline\/?/,"$1/stack-chart/").replace(/^(\/[^/]+\/[^/]+)\/markers\/?/,"$1/marker-table/")},3:e=>{let{query:t}=e;"hidePlatformDetails"in t&&(delete t.hidePlatformDetails,t.implementation="js")},4:(e,t)=>{let r=e.query;if((r.thread===void 0?null:+r.thread)===null||t===void 0)return;let o=pI(r.transforms);if(!(!o||o.length===0)){for(let a=0;a<o.length;a++){let i=o[a];if(!("implementation"in i)||i.implementation!=="js"||!("callNodePath"in i)||!i.callNodePath)continue;let s=G2(t.shared,i.callNodePath);s!==null&&(i.callNodePath=W2(t.shared,s))}e.query.transforms=Ep(o)}},5:({query:e})=>{e.range&&(e.range=e.range.split("~").map(t=>{let r=t.match(/^(-?[0-9.]+)_(-?[0-9.]+)$/);if(!r)return console.error(`The range "${t}" couldn't be parsed, ignoring.`),null;let n=Number(r[1])*1e3,o=Number(r[2])*1e3;return isNaN(n)||isNaN(o)?(console.error(`The range "${t}" couldn't be parsed, ignoring.`),null):gp({start:n,end:o})}).filter(Boolean).join("~"))},6:({query:e})=>{if(e.globalTrackOrder){let t=e.globalTrackOrder.split("-").map(r=>+r);e.globalTrackOrder=Cn(t)||void 0}if(e.hiddenGlobalTracks){let t=new Set(e.hiddenGlobalTracks.split("-").map(r=>+r));e.hiddenGlobalTracks=Oo(t)||void 0}if(e.hiddenLocalTracksByPid&&(e.hiddenLocalTracksByPid=e.hiddenLocalTracksByPid.split("~").map(t=>{let[r,...n]=t.split("-"),o=new Set(n.map(a=>+a));return`${r}-${Oo(o)}`}).join("~")),e.localTrackOrderByPid&&(e.localTrackOrderByPid=e.localTrackOrderByPid.split("~").map(t=>{let[r,...n]=t.split("-"),o=n.map(a=>+a);return`${r}-${Cn(o)}`}).join("~")),e.thread){let t=new Set(e.thread.split(",").map(r=>+r));e.thread=Oo(t)}e.transforms&&e.transforms.includes(";")&&delete e.transforms},7:({query:e})=>{switch(e.timelineType){case"cpu-category":delete e.timelineType;break;case"stack":break;default:e.timelineType="category";break}},8:e=>{},9:({query:e})=>{function t(r){if(r.startsWith("irec-")){let[,,n]=r.split("-");return`rec-${n}`}return r.startsWith("rec-")?"d"+r:r}if(e.transforms){let r=e.transforms.split("~");e.transforms=r.map(t).join("~")}},10:({query:e},t)=>{if(!e.transforms||!e.thread||!t||Da(e.thread).length!==1)return;let n=t.shared.funcTable.length;function o(i){if(i.startsWith("cr-")){let[,s,l]=i.split("-"),c=n+ +l;if(!isNaN(c))return`cr-${s}-${l}-${c}`}return i}let a=e.transforms.split("~");e.transforms=a.map(o).join("~")},11:e=>{(e.query.view==="active-tab"||e.query.view==="origins")&&(e.query={})},12:(e,t)=>{let{query:r}=e;if(!("sourceView"in r)||!t||!t.shared.sources)return;let n=r.sourceView,{sources:o,stringArray:a}=t.shared,s=$e.withBackingArray(a).indexForString(n);if(s!==-1){let l=o.filename.indexOf(s);l!==-1&&(r.sourceViewIndex=l)}delete r.sourceView},13:e=>{},14:e=>{},15:(e,t,r)=>{if(!r||!r.v60)return;let{v60:n}=r,{query:o}=e;if(!o.transforms)return;let a=Da(o.thread);if(a.length!==1)return;let[i]=a;if(!(i in n.threadMappings))return;let s=n.threadMappings[i],l=n.newFuncCount;function c(p){if(p<s.funcTableIndexMap.length)return s.funcTableIndexMap[p];let h=p-s.funcTableIndexMap.length;return h<s.resourceTableIndexMap.length?l+s.resourceTableIndexMap[h]:p}function u(p){let h=parseInt(p,10);return!isNaN(h)&&h>=0?""+c(h):p}function d(p){let h=parseInt(p,10);return!isNaN(h)&&h>=0&&h<s.resourceTableIndexMap.length?""+s.resourceTableIndexMap[h]:p}function f(p){let h=p.split("-"),y=h[0];switch(y){case"cr":{let[,b,m,g]=h,T=d(m),S=u(g);return[y,b,T,S].join("-")}case"drec":{let[,b,m]=h,g=u(m);return[y,b,g].join("-")}case"rec":case"mf":case"ff":case"df":case"cfs":{let[,b]=h,m=u(b);return[y,m].join("-")}case"f":case"mcn":{let[,b,m,g]=h,S=Da(m).map(c),I=Cn(S);return[y,b,I,g].join("-")}default:return p}}o.transforms=o.transforms.split("~").map(f).join("~")},16:e=>{}};for(let e=1;e<=ru;e++)if(!wI[e])throw new Error(`There is no upgrader for version ${e}.`);for(let e of Object.keys(wI)){let t=+e;if(t>ru)throw new Error(xI.oneLine`
641
+ `),()=>""}let i=o.map((s,l)=>{if(l%2===0)return()=>s;let c=s.match(ZD);if(c){let[,h,y,b]=c,g=h.split(".");if(g.length===3&&g[0]==="marker"&&g[1]==="data"&&g[2]){let m=g[2];return T=>{var S;return(S=T.data)!=null&&S[m]?y:b}}return a(n,s)}let u=s.trim().split(".");if(u.length!==2&&u.length!==3)return a(n,s);let[d,f,p]=u;if(d!=="marker")return a(n,s);if(u.length===2)switch(f){case"start":return h=>on(h.start);case"end":return h=>h.end===null?"unknown":on(h.end);case"duration":return h=>h.end===null?"unknown":on(h.end-h.start);case"name":return h=>h.name;case"category":return h=>t[h.category].name;default:return a(n,s)}if(f==="data"){let h=null;for(let y of e.fields)if(y.key===p){h=y.format;break}return y=>{if(!y.data)return"";let b=y.data[p];return b==null?"":h?Ua(e.name,h,b,r):b}}return a(n,s)});return s=>{let l="";for(let c of i)l+=c(s);return l}}var YD={tooltipLabel:e=>e.name,chartLabel:e=>"",tableLabel:e=>{let t="";if(e.data){let r=e.data;r.type==="FileIO"&&(r.source&&(t=`(${r.source}) `),t+=r.operation,r.filename&&(t=r.operation?`${t} \u2014 ${r.filename}`:r.filename))}return t},copyLabel:e=>e.name};function to(e,t,r,n,o,a){let i=new Map,s=/^{marker.name}\s[-—]\s/;for(let u of t){let d;a==="copyLabel"?(d=u.tableLabel,d&&!s.test(d)&&(d="{marker.name} \u2014 "+d)):(d=u[a],d&&a==="tableLabel"&&(d=d.replace(s,""))),d&&i.set(u.name,JD(u,n,o,d))}let l=W(YD[a],"Unable to find a fallback label function."),c=new Map;return u=>{let d=c.get(u);if(d===void 0){let f=e(u),p=f.data?f.data.type:null,h=p?i.get(p):null;d=h?h(f):l(f),c.set(u,d)}return d}}function eI(e,t,r){let n=new Map;return o=>{let a=n.get(o);if(a===void 0){let i=e(o),s=i.data?i.data.type:null;if(s){let l=t[s];l!=null&&l.tooltipLabel&&(a=XD(i,l,r,l.tooltipLabel))}a||(a=i.name),n.set(o,a)}return a}}function XD(e,t,r,n){var p;let o=n.split(/{([^}]+)}/);if(o.length<2)return null;let i=o[1].trim().split(".");if(i.length!==3)return null;let[s,l,c]=i;if(s!=="marker"||l!=="data"||!c)return null;let u=(p=t.fields)==null?void 0:p.find(h=>h.key===c);if(!u)return null;let d=e.data;if(!d)return null;let f=d[c];return f==null?null:Ua(d.type,u.format,f,r)}function Ua(e,t,r,n,o,a){if(r==null)return console.warn(`Formatting ${r} for ${e} with format ${JSON.stringify(t)}`),"(empty)";if(typeof t=="object")switch(t.type){case"table":{let{columns:i}=t;if(!(r instanceof Array))throw new Error("Expected an array for table type");let l=i.some(u=>u.label)?[i.map(u=>u.label||"(empty)")]:[],c=r.map((u,d)=>{if(!(u instanceof Array))throw new Error("Expected an array for table row");if(u.length!==i.length)throw new Error(`Row ${d} length doesn't match column count (row: ${u.length}, cols: ${i.length})`);return u.map((f,p)=>{let{type:h}=i[p];return Ua(e,h||"string",f,n,o,a)})});return l.push(...c),l.map(u=>`(${u.join(", ")})`).join(",")}default:throw new Error(`Unknown format type ${JSON.stringify(t.type)}`)}switch(t){case"url":case"file-path":case"sanitized-string":case"string":return String(r)||"(empty)";case"unique-string":case"flow-id":case"terminating-flow-id":return n.getString(r,"(empty)");case"duration":case"time":return on(r);case"seconds":return Qc(r);case"milliseconds":return bp(r);case"microseconds":return yp(r);case"nanoseconds":return gp(r);case"bytes":return Is(r);case"integer":return dt(r,0,0);case"decimal":return dt(r);case"percentage":return Xc(r);case"pid":return a&&a.has(r)?`${W(a.get(r))} (${r})`:`PID: ${r}`;case"tid":return o&&o.has(r)?`${W(o.get(r))} (${r})`:`TID: ${r}`;case"list":if(!(r instanceof Array))throw new Error("Expected an array for list format");return r.map(i=>Ua(e,"string",i,n)).join(", ");default:return console.warn(`A marker schema of type "${e}" had an unknown format ${JSON.stringify(t)}`),r}}function vp(e,t,r,n){let{data:o}=t;if(!o)return!1;for(let a of e.fields){let i=o[a.key];if(i!=null){if(a.format==="unique-string"||a.format==="flow-id"||a.format==="terminating-flow-id"){if(typeof i!="number"){console.warn(`In marker ${t.name}, the key ${a.key} has an invalid value "${i}" as a unique string, it isn't a number.`);continue}if(!r.hasIndex(i)){console.warn(`In marker ${t.name}, the key ${a.key} has an invalid index "${i}" as a unique string, as it's missing from the string table.`);continue}i=r.getString(i)}if(i!==""&&n(i,a.key))return!0}}return!1}function ws(e){let t=new Map;t.set("CompositorScreenshot",["url"]);for(let r of e){let{name:n,fields:o}=r,a=[];for(let i of o)(i.format==="unique-string"||i.format==="flow-id"||i.format==="terminating-flow-id")&&i.key&&a.push(i.key);a.length!==0&&t.set(n,a)}return t}function tI(e,t,r){let n=()=>i.push({start:a-o,end:a,name:"Jank",category:r,threadId:null,data:{type:"Jank"}}),o=0,a=0,i=[];for(let s=0;s<e.length;s++){let l;e.eventDelay?l=e.eventDelay[s]:e.responsiveness&&(l=e.responsiveness[s]),l!=null&&(l<o&&o>=t&&n(),o=l,a=e.time[s])}return o>=t&&n(),i}function ks(e,t,r,n,o,a){if(!n)return t;let i=!!n.generic,s=!1;for(let c of n.fieldMap.values())i=i||c.positive!==null,s=s||c.negative!==null;let l=[];for(let c of t){let u=e(c),d=!0;i&&(d=QD(u,r,n,o,a)),d&&s&&(d=e2(u,r,n,o,a)),d&&l.push(c)}return l}function QD(e,t,r,n,o){let a=r;function i(u,d){d=d.toLowerCase();let f=a.fieldMap.get(d),p=(a.generic?a.generic.test(u):!1)||(f&&f.positive?f.positive.test(u):!1);return a.generic&&(a.generic.lastIndex=0),f&&f.positive&&(f.positive.lastIndex=0),p}let{data:s,name:l,category:c}=e;if(o[c]!==void 0){let u=o[c].name;if(i(u,"cat"))return!0}if(i(l,"name"))return!0;if(s&&typeof s=="object"){if(i(s.type,"type"))return!0;let u=vs(t,e.data);if(u&&vp(u,e,n,i))return!0}return!1}function e2(e,t,r,n,o){let a=r;function i(u,d){d=d.toLowerCase();let f=a.fieldMap.get(d),p=f==null?void 0:f.negative;if(!p)return!1;let h=p.test(u);return p.lastIndex=0,h}let{data:s,name:l,category:c}=e;if(o[c]!==void 0){let u=o[c].name;if(i(u,"cat"))return!1}if(i(l,"name"))return!1;if(s&&typeof s=="object"){if(i(s.type,"type"))return!1;let u=vs(t,e.data);if(u&&vp(u,e,n,i))return!1}return!0}var eu=class{_correlations;constructor(){this._correlations=new Map}set(t,r,n){let o=this._correlations.get(t);o||(o=new Map,this._correlations.set(t,o)),o.set(r,n)}get(t,r){let n=this._correlations.get(t);if(n)return n.get(r)}};function wp(e,t){function r(c,u){let d;return u.direction==="sending"?d=`${c.pid},${u.otherPid}`:d=`${u.otherPid},${c.pid}`,d+`,${u.messageSeqno},${u.messageType}`}function n(c){if(c!=null){let u=s.get(c);if(u!==void 0)return`${u} (Thread ID: ${c})`}}function o(c){let{phase:u}=c;if(c.direction==="sending")switch(u){case"endpoint":case void 0:return 0;case"transferStart":return 1;case"transferEnd":return 2;default:throw ae(u,"Unhandled IPC phase type.")}else switch(u){case"transferEnd":return 3;case"endpoint":case void 0:return 4;case"transferStart":throw new Error('Unexpected "transferStart" phase found on receiving side.');default:throw ae(u,"Unhandled IPC phase type.")}}if(!$e.withBackingArray(t.stringArray).hasString("IPC"))return new eu;let i=new Map,s=new Map;for(let c of e)if(typeof c.tid=="number"){let u=c.tid;s.set(u,or(e,c));for(let d=0;d<c.markers.length;d++){let f=c.markers.data[d];if(!f||f.type!=="IPC")continue;let p=r(c,f);i.has(p)||i.set(p,new Array(5).fill(void 0));let h=W(i.get(p)),y=o(f);h[y]===void 0?h[y]={tid:u,index:d,data:f}:console.warn("Duplicate IPC marker found for key",p)}}let l=new eu;for(let c of i.values()){let u=c[0],d=c[4],f=u?u.tid:void 0,p=d?d.tid:void 0,h={startTime:u?u.data.startTime:void 0,sendStartTime:c[1]?c[1].data.startTime:void 0,sendEndTime:c[2]?c[2].data.startTime:void 0,recvEndTime:c[3]?c[3].data.startTime:void 0,endTime:d?d.data.startTime:void 0,sendTid:f,recvTid:p,sendThreadName:n(f),recvThreadName:n(p)},y=new Set;if(u&&(y.add(u.tid),l.set(u.tid,u.index,h)),d&&(y.add(d.tid),l.set(d.tid,d.index,h)),!u||!d){for(let b of c.slice(1,4))if(b!==void 0){let g=b;y.has(g.tid)||(l.set(g.tid,g.index,h),y.add(g.tid))}}}return l}function kp(e,t,r,n,o){let a=[],i=[],s=new Map,l=new Map;function c(p,h){i.push(p),a.push(h)}function u(p,h){return p===null?h:h===null?p:{...p,...h}}let d=new Map;for(let p=0;p<e.length;p++){let h=e.name[p],y=e.startTime[p],b=e.endTime[p],g=e.phase[p],m=e.data[p],T=e.category[p],S=e.threadId?e.threadId[p]:null;if(m)switch(m.type){case"Network":{let I="Network markers are assumed to have a start and end time.";if(m.status==="STATUS_START")l.set(m.id,p);else{let v=m,w=l.get(m.id);if(w!==void 0){l.delete(m.id);let k=e.data[w],E=W(e.startTime[w],I),R=W(y,I),F=W(b,I);c([w,p],{start:E,end:F,name:t[h],category:T,threadId:S,data:{...v,startTime:E,fetchStart:R,cause:k.cause||v.cause}})}else{let k=Math.min(n.start,W(y,"Network markers are assumed to have a start time.")),E=W(b,I);c([p],{start:k,end:E,name:t[h],category:T,threadId:S,data:{...v,startTime:k,fetchStart:v.startTime,cause:v.cause},incomplete:!0})}}continue}case"CompositorScreenshot":{let{windowID:I}=m,v=d.get(I);if(v!==void 0){d.delete(I);let w=W(e.startTime[v],"Expected to find a start time for a screenshot marker."),k=W(y,"The CompositorScreenshot is assumed to have a start time."),E=e.data[v],R=e.threadId?e.threadId[v]:null;c([v],{start:w,end:k,name:"CompositorScreenshot",category:T,threadId:R,data:E})}if(t[h]==="CompositorScreenshotWindowDestroyed")break;d.set(I,p);continue}case"IPC":{let I=o.get(r||0,p);if(!I||m.direction==="sending"&&m.phase==="transferEnd"&&I.sendStartTime!==void 0)continue;let v=m.direction==="sending"?"IPCOut":"IPCIn";m.sync&&(v="Sync"+v);let w=W(m.startTime,"Expected IPC startTime to exist in the payload."),k=w,E=!0;I.startTime!==void 0&&I.endTime!==void 0&&(w=I.startTime,k=I.endTime,E=!1);let R={...m,...I,niceDirection:m.direction==="sending"?`sent to ${I.recvThreadName||m.otherPid}`:`received from ${I.sendThreadName||m.otherPid}`};c([p],{start:w,end:k,name:v,category:T,threadId:S,data:R,incomplete:E});continue}default:}switch(g){case 0:c([p],{start:W(y,"An Instant marker did not have a startTime."),end:null,name:t[h],category:T,threadId:S,data:m});break;case 1:{let I=W(y,"An Interval marker did not have a startTime."),v=W(b,"An Interval marker did not have a startTime.");c([p],{start:I,end:v,name:t[h],category:T,threadId:S,data:m})}break;case 2:{let I=s.get(h);I||(I=[],s.set(h,I)),I.push(p)}break;case 3:{let I=s.get(h),v;I&&(v=I.pop());let w=W(b,"An IntervalEnd marker did not have an endTime");if(v!==void 0){let k=W(e.startTime[v],"An IntervalStart marker did not have a startTime");c([v,p],{start:k,name:t[h],end:w,category:T,threadId:S,data:u(e.data[v],m)})}else{let k=Math.min(w,n.start);c([p],{start:k,name:t[h],end:w,category:T,threadId:S,data:m,incomplete:!0})}}break;default:throw new Error("Unhandled marker phase type.")}}let f=n.end;for(let p of s.values())for(let h of p){let y=W(e.startTime[h],"Encountered a marker without a startTime. Eventually this needs to be handled for phase-style markers.");c([h],{start:y,end:Math.max(f,y),name:t[e.name[h]],data:e.data[h],category:e.category[h],threadId:e.threadId?e.threadId[h]:null,incomplete:!0})}for(let p of l.values()){let h=W(e.startTime[p],"Network markers are assumed to always have a start time.");c([p],{start:h,end:Math.max(f,h),name:t[e.name[p]],category:e.category[p],threadId:e.threadId?e.threadId[p]:null,data:e.data[p],incomplete:!0})}for(let p of d.values()){let h=W(e.startTime[p],"Expected to find a CompositorScreenshot marker with a start time.");c([p],{start:h,end:Math.max(f,h),name:"CompositorScreenshot",category:e.category[p],threadId:e.threadId?e.threadId[p]:null,data:e.data[p]})}return{markers:a,markerIndexToRawMarkerIndexes:i}}function t2(e,t,r,n){let{markers:o,markerIndexToRawMarkerIndexes:a}=t,i=new Set;for(let s=0;s<o.length;s++){let{start:l,end:c}=o[s];if(c===null){if(l<n&&l>=r)for(let u of a[s])i.add(u)}else if(l<n&&c>=r)for(let u of a[s])i.add(u)}return[...i].sort((s,l)=>s-l)}function rI(e,t,r,n){let o=Ur(),a=[];e.threadId&&(o.threadId=a);let i=new Map,s=l=>{r.has(l)||(i.set(l,o.length),o.name.push(e.name[l]),o.startTime.push(e.startTime[l]),o.endTime.push(e.endTime[l]),o.phase.push(e.phase[l]),o.data.push(e.data[l]),o.category.push(e.category[l]),e.threadId&&a.push(e.threadId[l]),o.length++)};if(n===null)for(let l=0;l<e.length;l++)s(l);else{let{start:l,end:c}=n,u=t2(e,t,l,c);for(let d of u)s(d)}return{rawMarkerTable:o,oldMarkerIndexToNew:i}}function tu(e,t,r){return t.filter(n=>r(e(n)))}function _p(e,t,r,n){return tu(e,t,o=>o.start<=n&&(o.end||o.start)>=r)}function En(e){return!!(e.data&&e.data.type==="Network")}function nI(e){return!!(e.data&&e.data.type==="UserTiming")}function oI({name:e,data:t}){return e==="TTI"||e==="FirstContentfulPaint"||e==="FirstContentfulComposite"||e==="LargestContentfulPaint"?!0:t?!!("innerWindowID"in t&&t.innerWindowID&&e==="Navigation::Start"||"category"in t&&t.category==="Navigation"&&(e==="Load"||e==="DOMContentLoaded")):!1}function aI(e){let{data:t}=e;if(!(!t||t.type!=="FileIO"))return t.threadId===void 0}function Cp(e){return t=>{let{data:r}=t;if(!r||!e[r.type])return!0}}function iI(e,t){let r=new Map;for(let n of t){let o=e(n),{data:a}=o;if(a&&a.type==="CompositorScreenshot"){let i=r.get(a.windowID);i===void 0&&(i=[],r.set(a.windowID,i)),i.push(o)}}return r}function sI(e){return{...e,URI:"",RedirectURI:""}}function lI(e){return{...e,prefValue:""}}function cI(e){return{...e,name:Da(e.name)}}function uI(e,t){return["ExtensionParent","ExtensionChild"].includes(e)?{...t,name:t.name.replace(/^.*, (api_(call|event): )/,"$1")}:e==="Extension Suspend"?{...t,name:t.name.replace(/ by .*$/,"")}:t}function dI(e,t){for(let{key:r,format:n}of e.fields)r in t&&(n==="url"?t={...t,[r]:Da(t[r])}:n==="file-path"?t={...t,[r]:lx(t[r])}:n==="sanitized-string"&&(t={...t,[r]:"<sanitized>"}));return t}function r2(e,t){let r=new Set;for(let{display:n,name:o}of e)n.includes(t)&&r.add(o);return r}function n2(e){}function Do(e,t,r,n,o,a=n2){let i=r2(r,o);return tu(e,t,s=>{let l=a(s);if(l!==void 0)return l;let c=s.data?s.data.type??null:null;return c!==null&&i.has(c)})}var _s=e=>{if(!e||!e.length)return null;let t=new Map,r=[];for(let o of e){let a=o.match(/^(?<maybeNegative>-?)(?<key>\w+):(?<value>.+)/i);if(a&&a.groups){let{maybeNegative:i,value:s}=a.groups,l=a.groups.key.toLowerCase(),c=t.get(l);c||(c={positive:[],negative:[]},t.set(l,c)),i.length===0?(c.positive.push(s),r.push(o)):c.negative.push(s)}else r.push(o)}let n=new Map;for(let[o,a]of t)n.set(o,{positive:Fo(a.positive),negative:Fo(a.negative)});return{generic:Fo(r),fieldMap:n}},Ep={Error:"E",Warning:"W",Info:"I",Debug:"D",Verbose:"V"},fI={E:1,W:2,I:3,D:4,V:5};function pI(e){function t(o,a){return String(o).padStart(a,"0")}let r=new Date(e),n=Math.trunc((e-Math.trunc(e))*10**6);return`${r.getUTCFullYear()}-${t(r.getUTCMonth()+1,2)}-${t(r.getUTCDate(),2)} ${t(r.getUTCHours(),2)}:${t(r.getUTCMinutes(),2)}:${t(r.getUTCSeconds(),2)}.${t(r.getUTCMilliseconds(),3)}${t(n,6)} UTC`}function hI(e,t,r,n,o,a,i){if("message"in o){if(!o.message)return null;let l=i[o.level]??"",c=Ep[l]??"D";return`${e} - [${t} ${r}: ${n}]: ${c}/${a} ${o.message.trim()}`}if(!o.name)return null;let s=o.module.includes("/")?"":"D/";return`${e} - [${t} ${r}: ${n}]: ${s}${o.module} ${o.name.trim()}`}function a2(e){let t=e.replace(/ \[clone [^]+\]$/,"").replace(/ const$/,"").replace(/^static /,"");if(t[t.length-1]!==")")return e;let r=0;for(let n=t.length-1;n>0;n--)if(t[n]===")")r++;else if(t[n]==="("&&(r--,r===0))return t.substr(0,n);return t}function i2(e){let t="",r=0,n=null,o=0;for(let a=1;a<e.length;a++)e[a]==="<"?(e[a-1]!==" "&&e[a-1]!=="."&&n===null&&(t+=e.slice(o,a),o=a,n=r),r++):e[a]===">"&&(r--,r===n&&(o=a+1,n=null));return t+=e.slice(o),t}function Cs(e){return i2(a2(e))}function Np(e,t){let r=t.oldResourceToNewResourcePlusOne[e];return r!==0?r-1:null}function wr(e,t){let r=t.oldFuncCount;if(e<r){let a=t.oldFuncToNewFuncPlusOne[e];return a!==0?a-1:null}let n=e-r,o=Np(n,t);return o!==null?t.newFuncCount+o:null}function Ap(e,t){let r=new Array;for(let n of e){let o=wr(n,t);if(o===null)return null;r.push(o)}return r}var s2={"focus-subtree":!0,"focus-function":!0,"focus-self":!0,"merge-call-node":!0,"merge-function":!0,"drop-function":!0,"collapse-resource":!0,"collapse-direct-recursion":!0,"collapse-recursion":!0,"collapse-function-subtree":!0,"focus-category":!0,"drop-category":!0,"filter-samples":!0},l2=Object.keys(s2),mI={},gI={};l2.forEach(e=>{let t;switch(e){case"focus-subtree":t="f";break;case"focus-function":t="ff";break;case"focus-self":t="ffs";break;case"focus-category":t="fg";break;case"drop-category":t="dg";break;case"merge-call-node":t="mcn";break;case"merge-function":t="mf";break;case"drop-function":t="df";break;case"collapse-resource":t="cr";break;case"collapse-direct-recursion":t="drec";break;case"collapse-recursion":t="rec";break;case"collapse-function-subtree":t="cfs";break;case"filter-samples":t="fs";break;default:throw ae(e)}mI[e]=t,gI[t]=e});function yI(e){if(!e)return[];let t=[];return e.split("~").forEach(r=>{let n=r.split("-"),o=n[0],a=hS(gI[o]);if(a===null){console.error("Unrecognized transform was passed to the URL.",o);return}switch(a){case"collapse-resource":{let[,i,s,l]=n,c=parseInt(s,10),u=parseInt(l,10);if(isNaN(c)||isNaN(u))break;c>=0&&t.push({type:a,resourceIndex:c,collapsedFuncIndex:u,implementation:ys(i)});break}case"collapse-recursion":{let[,i]=n,s=parseInt(i,10);if(isNaN(s)||s<0)break;t.push({type:"collapse-recursion",funcIndex:s});break}case"collapse-direct-recursion":{let[,i,s]=n,l=parseInt(s,10);if(isNaN(l)||l<0)break;t.push({type:"collapse-direct-recursion",funcIndex:l,implementation:ys(i)});break}case"merge-function":case"focus-function":case"drop-function":case"collapse-function-subtree":{let[,i]=n,s=parseInt(i,10);if(!isNaN(s)&&s>=0)switch(a){case"merge-function":t.push({type:"merge-function",funcIndex:s});break;case"focus-function":t.push({type:"focus-function",funcIndex:s});break;case"drop-function":t.push({type:"drop-function",funcIndex:s});break;case"collapse-function-subtree":t.push({type:"collapse-function-subtree",funcIndex:s});break;default:throw new Error("Unmatched transform.")}break}case"focus-self":{let[,i,s]=n,l=parseInt(s,10);if(isNaN(l)||l<0)break;t.push({type:"focus-self",funcIndex:l,implementation:ys(i)});break}case"focus-category":{let[,i]=n,s=parseInt(i,10);!isNaN(s)&&s>=0&&t.push({type:"focus-category",category:s});break}case"drop-category":{let[,i]=n,s=parseInt(i,10);!isNaN(s)&&s>=0&&t.push({type:"drop-category",category:s});break}case"focus-subtree":case"merge-call-node":{let[,i,s,l]=n,c=ys(i),u=Ba(s),d=!!l;switch(a){case"focus-subtree":t.push({type:"focus-subtree",implementation:c,callNodePath:u,inverted:d});break;case"merge-call-node":t.push({type:"merge-call-node",implementation:c,callNodePath:u});break;default:throw new Error("Unmatched transform.")}break}case"filter-samples":{let[,i,...s]=n,l=s.join("-"),c=c2(i);if(c!=="marker-search"){console.error("A profiler-cli-only filter-samples type was found in the URL and will be ignored.",c);break}t.push({type:"filter-samples",filterType:c,filter:l});break}default:throw ae(a)}}),t}function c2(e){switch(e){case"m":return"marker-search";case"om":return"outside-marker";case"fi":return"function-include";case"sp":return"stack-prefix";case"ss":return"stack-suffix";default:throw new Error("Unknown filter type.")}}function u2(e){switch(e){case"marker-search":return"m";case"outside-marker":return"om";case"function-include":return"fi";case"stack-prefix":return"sp";case"stack-suffix":return"ss";default:throw ae(e)}}function Pp(e){return e.map(t=>{let r=mI[t.type];if(!r)throw new Error("Expected to be able to convert a transform into its short key.");switch(t.type){case"merge-function":case"drop-function":case"collapse-function-subtree":case"focus-function":return`${r}-${t.funcIndex}`;case"focus-category":case"drop-category":return`${r}-${t.category}`;case"collapse-resource":return`${r}-${t.implementation}-${t.resourceIndex}-${t.collapsedFuncIndex}`;case"collapse-recursion":return`${r}-${t.funcIndex}`;case"collapse-direct-recursion":case"focus-self":return`${r}-${t.implementation}-${t.funcIndex}`;case"focus-subtree":case"merge-call-node":{let n=[r,t.implementation,Cn(t.callNodePath)].join("-");return"inverted"in t&&t.inverted&&(n+="-i"),n}case"filter-samples":return`${r}-${u2(t.filterType)}-${t.filter}`;default:throw ae(t)}}).join("~")}function bI(e,t,r,n){let{funcTable:o,stringTable:a,resourceTable:i}=t,{categories:s}=e,l=n.map(c=>{if(c.type==="collapse-resource"){let p=i.name[c.resourceIndex];return{l10nId:"TransformNavigator--collapse-resource",item:a.getString(p)}}if(c.type==="focus-category"){if(s===void 0)throw new Error("Expected categories to be defined.");return{l10nId:"TransformNavigator--focus-category",item:s[c.category].name}}if(c.type==="drop-category"){if(s===void 0)throw new Error("Expected categories to be defined.");return{l10nId:"TransformNavigator--drop-category",item:s[c.category].name}}if(c.type==="filter-samples")switch(c.filterType){case"marker-search":return{l10nId:"TransformNavigator--drop-samples-outside-of-markers-matching",item:c.filter};case"outside-marker":case"function-include":case"stack-prefix":case"stack-suffix":throw new Error(`getTransformLabelL10nIds: profiler-cli-only filter type "${c.filterType}" is not supported in the frontend transform navigator.`);default:throw ae(c.filterType)}let u;switch(c.type){case"focus-subtree":case"merge-call-node":u=c.callNodePath[c.callNodePath.length-1];break;case"focus-function":case"focus-self":case"merge-function":case"drop-function":case"collapse-direct-recursion":case"collapse-recursion":case"collapse-function-subtree":u=c.funcIndex;break;default:throw ae(c)}let d=o.name[u],f=Cs(a.getString(d));switch(c.type){case"focus-subtree":return{l10nId:"TransformNavigator--focus-subtree",item:f};case"focus-function":return{l10nId:"TransformNavigator--focus-function",item:f};case"focus-self":return{l10nId:"TransformNavigator--focus-self",item:f};case"merge-call-node":return{l10nId:"TransformNavigator--merge-call-node",item:f};case"merge-function":return{l10nId:"TransformNavigator--merge-function",item:f};case"drop-function":return{l10nId:"TransformNavigator--drop-function",item:f};case"collapse-direct-recursion":return{l10nId:"TransformNavigator--collapse-direct-recursion-only",item:f};case"collapse-recursion":return{l10nId:"TransformNavigator--collapse-recursion",item:f};case"collapse-function-subtree":return{l10nId:"TransformNavigator--collapse-function-subtree",item:f};default:throw ae(c)}});return l.unshift({l10nId:"TransformNavigator--complete",item:r}),l}function Rp(e,t,r,n){switch(t.type){case"focus-subtree":return d2(t.callNodePath,e);case"focus-function":return f2(t.funcIndex,e);case"focus-self":return p2(t.funcIndex,e);case"focus-category":return y2(t.category,e,n);case"drop-category":return b2(t.category,e,n);case"merge-call-node":return h2(t.callNodePath,e);case"merge-function":return m2(t.funcIndex,e);case"drop-function":return g2(t.funcIndex,e);case"collapse-resource":return T2(t.resourceIndex,t.collapsedFuncIndex,r.funcTable,e);case"collapse-direct-recursion":return S2(t.funcIndex,e);case"collapse-recursion":return x2(t.funcIndex,e);case"collapse-function-subtree":return I2(t.funcIndex,e);case"filter-samples":return e;default:throw ae(t)}}function d2(e,t){return TI(e,t)?t.slice(e.length-1):[]}function f2(e,t){let r=t.indexOf(e);return r===-1?[]:t.slice(r)}function p2(e,t){return t.indexOf(e)!==-1?[e]:[]}function h2(e,t){return TI(e,t)?t.filter((r,n)=>n!==e.length-1):t}function m2(e,t){return t.filter(r=>r!==e)}function g2(e,t){return t.includes(e)?[]:t}function y2(e,t,r){let n=[],o=-1;for(let a of t){let i=r.getCallNodeIndexFromParentAndFunc(o,a);if(i===null)throw new Error(`We couldn't find a node with prefix ${o} and func ${a}, this shouldn't happen.`);r.categoryForNode(i)===e&&n.push(a),o=i}return n}function b2(e,t,r){let n=r.getCallNodeIndexFromPath(t);return n!==null&&r.categoryForNode(n)===e?[]:t}function T2(e,t,r,n){return n.map(o=>r.resource[o]===e?t:o).filter((o,a,i)=>o!==i[a-1]||o!==t)}function S2(e,t){let r=[],n;for(let o=0;o<t.length;o++){let a=t[o];(a!==e||a!==n)&&r.push(a),n=a}return r}function x2(e,t){let r=t.indexOf(e),n=t.lastIndexOf(e);return r===-1?t:t.slice(0,r).concat(t.slice(n))}function I2(e,t){let r=t.indexOf(e);return r===-1?t:t.slice(0,r+1)}function TI(e,t){return e.length<=t.length&&e.every((r,n)=>r===t[n])}function v2(e,t,r){return Gt("mergeCallNode",()=>{let{stackTable:n,frameTable:o}=e,a=new Map,i=new Array(n.length),s=Bo[r],l=t.length,c=new Map;c.set(null,0);for(let d=0;d<n.length;d++){let f=n.prefix[d],p=a.get(f),h=p!==void 0?p:f;i[d]=h;let y=c.get(f);if(y===void 0)continue;let b=n.frame[d],g=o.func[b];if(g===t[y]){let m=y+1;m===l?a.set(d,h):c.set(d,m)}else s(e,g)||c.set(d,y)}let u={...n,prefix:i};return $r(e,u,d=>{let f=a.get(d);return f!==void 0?f:d})})}function w2(e,t){let{stackTable:r,frameTable:n}=e,o=new Uint32Array(r.length),a=r.frame,i=n.func,s=r.prefix,l=new Array(r.length);for(let u=0;u<r.length;u++){let d=s[u],f=d===null?0:o[d],p=a[u];i[p]===t?o[u]=f:o[u]=u+1;let y=f===0?null:f-1;l[u]=y}let c={...r,prefix:l};return $r(e,c,u=>{if(u===null)return null;let d=o[u];return d===0?null:d-1})}function k2(e,t){let{stackTable:r,frameTable:n}=e,o=new Uint8Array(r.length);for(let a=0;a<r.length;a++){let i=r.prefix[a],s=r.frame[a];(n.func[s]===t||i!==null&&o[i]===1)&&(o[a]=1)}return $r(e,r,a=>a!==null&&o[a]===1?null:a)}function _2(e,t,r,n){let{funcTable:o,frameTable:a}=e,i=a.func.slice();for(let l=0;l<a.length;l++){let c=a.func[l];o.resource[c]===t&&(i[l]=r)}let s={...e,frameTable:{...a,func:i}};return SI(s,r,n)}function SI(e,t,r){let{stackTable:n,frameTable:o}=e,a=new Map,i=Bo[r],s=n.prefix.slice();for(let l=0;l<n.length;l++){let c=n.prefix[l],u=n.frame[l],d=o.func[u],f=c!==null?a.get(c):void 0;f===void 0?d===t&&a.set(l,c):i(e,d)?d===t&&(a.set(l,f),s[l]=f):a.set(l,f)}return{...e,stackTable:{...n,prefix:s}}}function C2(e,t){let{stackTable:r,frameTable:n}=e,o=new Map,a=r.prefix.slice();for(let i=0;i<r.length;i++){let s=r.prefix[i],l=r.frame[i],c=n.func[l],u=s!==null?o.get(s):void 0;u===void 0?c===t&&o.set(i,s):(o.set(i,u),c===t&&(a[i]=u))}return{...e,stackTable:{...r,prefix:a}}}var Bo={combined:(e,t)=>!0,cpp:(e,t)=>{let{funcTable:r,stringTable:n}=e;if(e.funcTable.isJS[t])return!1;let o=n.getString(r.name[t]);return!(r.resource[t]===-1&&o.startsWith("0x"))},js:(e,t)=>e.funcTable.isJS[t]||e.funcTable.relevantForJS[t]};function E2(e,t){let{stackTable:r,frameTable:n}=e,o=new Int32Array(r.length),a=new Uint8Array(r.length);for(let i=0;i<r.length;i++){let s=r.prefix[i];if(s!==null&&a[s]!==0)o[i]=o[s],a[i]=1;else{o[i]=i;let l=r.frame[i],c=n.func[l];t===c&&(a[i]=1)}}return $r(e,e.stackTable,i=>i===null?null:o[i])}function N2(e,t,r){return Gt("focusSubtree",()=>{let{stackTable:n,frameTable:o}=e,a=t.length,i=new Int32Array(n.length),s=Bo[r],l=new Int32Array(n.length).fill(-1),c=[],u=vr(n.length);for(let f=0;f<n.length;f++){let p=n.prefix[f],h=p!==null?i[p]:0,y=-1;if(h!==-1){if(h===a)y=a;else{let b=n.frame[f],g=o.func[b];g===t[h]?y=h+1:s(e,g)||(y=h)}if(y===a){let b=p===null?-1:l[p];l[f]=c.length,c.push(b===-1?null:b),bt(u,f)}}i[f]=y}let d=La(n,c,u);return Qn({newStackTable:d,effectOnThreadData:{oldStackToNewStack:l}},e)})}function A2(e,t,r){return Gt("focusInvertedSubtree",()=>{let n=t.length,{stackTable:o,frameTable:a}=e,i=Bo[r];function s(c){let u=0;for(let d=c;d!==null;d=o.prefix[d]){let f=o.frame[d],p=a.func[f];if(p===t[u]){if(u++,u===n)return d}else if(i(e,p))return null}return null}let l=new Map;return l.set(null,null),$r(e,o,c=>{let u=l.get(c);return u===void 0&&(u=s(c),l.set(c,u)),u})})}function P2(e,t){return Gt("focusFunction",()=>{let{stackTable:r,frameTable:n}=e,o=new Int32Array(r.length).fill(-1),a=[],i=vr(r.length);for(let l=0;l<r.length;l++){let c=r.prefix[l],u=r.frame[l],d=n.func[u],f=c===null?-1:o[c];(f!==-1||d===t)&&(o[l]=a.length,a.push(f===-1?null:f),bt(i,l))}let s=La(r,a,i);return Qn({newStackTable:s,effectOnThreadData:{oldStackToNewStack:o}},e)})}function R2(e,t,r){return Gt("focusSelf",()=>{let{stackTable:n,frameTable:o}=e,a=Bo[r],i=vr(n.length),s=new Array,l=new Int32Array(n.length);for(let u=0;u<n.length;u++){let d=n.frame[u],f=o.func[d];if(f===t){bt(i,u);let p=s.length;s[p]=null,l[u]=p}else{let p=n.prefix[u];if(p!==null&&It(i,p)&&!a(e,f)){bt(i,u);let h=l[p],y=s.length;s[y]=h,l[u]=y}}}let c=La(n,s,i);return Qn({newStackTable:c,effectOnThreadData:{dropIfOldStackIsNot:i,oldStackToNewStack:l}},e)})}function M2(e,t){return Gt("focusCategory",()=>{let{stackTable:r}=e,n=new Int32Array(r.length).fill(-1),o=[],a=vr(r.length);for(let s=0;s<r.length;s++){let l=r.prefix[s],c=l===null?-1:n[l];if(r.category[s]!==t){n[s]=c;continue}n[s]=o.length,o.push(c===-1?null:c),bt(a,s)}let i=La(r,o,a);return Qn({newStackTable:i,effectOnThreadData:{oldStackToNewStack:n}},e)})}function F2(e,t){return Gt("dropCategory",()=>{let{stackTable:r}=e;return $r(e,r,n=>n!==null&&r.category[n]===t?null:n)})}function Mp(e,t,r){let{stackTable:n,frameTable:o}=e,a=Bo[t],i=[],s=null;for(let c=0;c<n.length;c++){let u=n.prefix[c],d=n.frame[c],f=o.func[d],p=u===null?-1:i[u];if(p===null)continue;let h=p+1;if(r[h]===f){if(i[c]=h,h===r.length-1){s=c;break}}else a(e,f)?i[c]=null:i[c]=p}if(s===null)return[];let l=[];for(let c=s;c!==null;c=n.prefix[c]){let u=n.frame[c],d=o.func[u];l.push(d)}return l.reverse()}function xI(e,t,r){let n=Bo[t];return r.filter(o=>n(e,o))}function O2(e,t,r,n,o,a){let i=[],s=_s(Mo(a)),l=ks(e,t,r,s,n,o);for(let c of l){let{start:u,end:d}=e(c);u===null||d===null||i.push({start:u,end:d})}return i}function L2(e,t,r,n,o,a,i){return Gt("filterSamples",()=>{let{stackTable:s,frameTable:l}=e;switch(a){case"function-include":{if(!i)throw new Error("function-include filter requires a non-empty filter string.");let u=new Set(i.split(",").map(Number)),d=new Uint8Array(s.length);for(let f=0;f<s.length;f++){let p=s.prefix[f],h=l.func[s.frame[f]];(u.has(h)||p!==null&&d[p])&&(d[f]=1)}return $r(e,s,f=>f!==null&&!d[f]?null:f)}case"stack-suffix":{if(!i)throw new Error("stack-suffix filter requires a non-empty filter string.");let u=Number(i);return $r(e,s,d=>d===null?null:l.func[s.frame[d]]===u?d:null)}case"stack-prefix":{if(!i)throw new Error("stack-prefix filter requires a non-empty filter string.");let u=i.split(",").map(Number),d=new Int32Array(s.length).fill(-1);for(let f=0;f<s.length;f++){let p=s.prefix[f],h=l.func[s.frame[f]];if(p===null)h===u[0]&&(d[f]=1);else{let y=d[p];y<0||(y>=u.length?d[f]=y:h===u[y]&&(d[f]=y+1))}}return $r(e,s,f=>f!==null&&d[f]<u.length?null:f)}case"marker-search":case"outside-marker":{let f=function(p,h){let y=p.slice(),b=0,g=h.length;if(d){for(let m of u){let{start:T,end:S}=m;for(;b<g&&!(h[b]>=T);b++)y[b]=null;for(;b<g&&!(h[b]>=S);b++);}for(;b<g;)y[b]=null,b++}else for(let m of u){let{start:T,end:S}=m;for(;b<g&&!(h[b]>=T);b++);for(;b<g&&!(h[b]>=S);b++)y[b]=null}return y};var c=f;let u=Qx(O2(t,r,n,e.stringTable,o,i)),d=a==="marker-search";return op(e,e.stackTable,f,f,p=>p)}default:throw ae(a)}})}function II(e,t,r,n,o,a){switch(t.type){case"focus-subtree":return t.inverted?A2(e,t.callNodePath,t.implementation):N2(e,t.callNodePath,t.implementation);case"merge-call-node":return v2(e,t.callNodePath,t.implementation);case"merge-function":return w2(e,t.funcIndex);case"drop-function":return k2(e,t.funcIndex);case"focus-function":return P2(e,t.funcIndex);case"focus-self":return R2(e,t.funcIndex,t.implementation);case"focus-category":return M2(e,t.category);case"drop-category":return F2(e,t.category);case"collapse-resource":return _2(e,t.resourceIndex,t.collapsedFuncIndex,t.implementation);case"collapse-direct-recursion":return SI(e,t.funcIndex,t.implementation);case"collapse-recursion":return C2(e,t.funcIndex);case"collapse-function-subtree":return E2(e,t.funcIndex);case"filter-samples":return L2(e,r,n,o,a,t.filterType,t.filter);default:throw ae(t)}}function D2(e,t){let{type:r}=e;switch(r){case"focus-subtree":{let n=Ap(e.callNodePath,t);return n===null?null:{type:r,callNodePath:n,implementation:e.implementation,inverted:e.inverted}}case"focus-function":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"focus-self":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n,implementation:e.implementation}}case"merge-call-node":{let n=Ap(e.callNodePath,t);return n===null?null:{type:r,callNodePath:n,implementation:e.implementation}}case"merge-function":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"drop-function":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"collapse-resource":{let n=Np(e.resourceIndex,t);if(n===null)return null;let o=t.newFuncCount+n;return{type:r,resourceIndex:n,implementation:e.implementation,collapsedFuncIndex:o}}case"collapse-direct-recursion":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n,implementation:e.implementation}}case"collapse-recursion":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"collapse-function-subtree":{let n=wr(e.funcIndex,t);return n===null?null:{type:r,funcIndex:n}}case"focus-category":case"drop-category":return e;case"filter-samples":switch(e.filterType){case"marker-search":case"outside-marker":return e;case"stack-suffix":{let n=wr(Number(e.filter),t);return n===null?null:{...e,filter:String(n)}}case"stack-prefix":{let n=[];for(let o of e.filter.split(",")){let a=wr(Number(o),t);if(a===null)return null;n.push(a)}return{...e,filter:n.join(",")}}case"function-include":{let n=[];for(let o of e.filter.split(",")){let a=wr(Number(o),t);a!==null&&n.push(a)}return n.length===0?null:{...e,filter:n.join(",")}}default:throw ae(e.filterType)}default:throw ae(e)}}function Fp(e,t){return e.map(r=>D2(r,t)).filter(r=>r!==null)}xe();var kI=ce(Ir());var wI={calltree:"TabBar--calltree-tab","flame-graph":"TabBar--flame-graph-tab","stack-chart":"TabBar--stack-chart-tab","marker-chart":"TabBar--marker-chart-tab","marker-table":"TabBar--marker-table-tab","network-chart":"TabBar--network-tab","js-tracer":"TabBar--js-tracer-tab"},ro=Object.getOwnPropertyNames(wI),y8=ro.map(e=>({name:e,title:wI[e]})),no=["calltree","flame-graph","stack-chart"];ur();var nu=16,_I=!1,ru=0;function U2(){ru++,_I=!0}function $2(){if(ru--,ru<0)throw new Error("_maybeDisableHistoryReplaceState was called more than _enableHistoryReplaceState which should never happen.");ru===0&&(_I=!1)}function CI(e){U2();try{e()}finally{$2()}}function G2(e){let{dataSource:t}=e;switch(t){case"none":return[];case"compare":return e.profilesToCompare===null?["compare"]:["compare",e.selectedTab];case"uploaded-recordings":return["uploaded-recordings"];case"from-browser":case"from-post-message":case"unpublished":case"from-file":return[t,e.selectedTab];case"public":case"local":return[t,e.hash,e.selectedTab];case"from-url":return["from-url",encodeURIComponent(e.profileUrl),e.selectedTab];default:throw ae(t)}}function W2(e){let{dataSource:t}=e;switch(t){case"none":case"uploaded-recordings":return"";case"compare":if(e.profilesToCompare===null)return"";break;case"public":case"local":case"from-browser":case"from-post-message":case"unpublished":case"from-file":case"from-url":break;default:throw ae(t)}let{selectedThreads:r}=e.profileSpecific,n=r!==null?ut(r):null,o={globalTrackOrder:H2(e.profileSpecific.globalTrackOrder),hiddenGlobalTracks:V2(e.profileSpecific.hiddenGlobalTracks),hiddenLocalTracksByPid:j2(e.profileSpecific.hiddenLocalTracksByPid),localTrackOrderByPid:q2(e.profileSpecific.localTrackOrderByPid,e.profileSpecific.localTrackOrderChangedPids),tabID:e.profileSpecific.tabFilter??void 0,range:Zx(e.profileSpecific.committedRanges)||void 0,thread:r===null?void 0:Lo(r),file:e.pathInZipFile||void 0,profiles:e.profilesToCompare||void 0,v:nu,profileName:e.profileName||void 0,symbolServer:e.symbolServerUrl||void 0,implementation:e.profileSpecific.implementation==="combined"?void 0:e.profileSpecific.implementation,timelineType:e.profileSpecific.timelineType==="cpu-category"?void 0:e.profileSpecific.timelineType},a,i=e.selectedTab;switch(i){case"stack-chart":a=o,a.showUserTimings=e.profileSpecific.showUserTimings?null:void 0,a.sameWidths=e.profileSpecific.stackChartSameWidths?null:void 0;case"flame-graph":case"calltree":{a=o,a.search=e.profileSpecific.callTreeSearchString||void 0,a.invertCallstack=e.profileSpecific.invertCallstack?null:void 0,n!==null&&e.profileSpecific.transforms[n]&&(a.transforms=Pp(e.profileSpecific.transforms[n])||void 0),a.ctSummary=e.profileSpecific.lastSelectedCallTreeSummaryStrategy==="timing"?void 0:e.profileSpecific.lastSelectedCallTreeSummaryStrategy;let{sourceView:l,assemblyView:c,isBottomBoxOpenPerPanel:u}=e.profileSpecific;if(u[i]&&(l.sourceIndex!==null&&(a.sourceViewIndex=l.sourceIndex),c.isOpen&&c.currentNativeSymbol!==null)){let{currentNativeSymbol:d,nativeSymbols:f}=c;a.assemblyView=Z2(f[d])}break}case"marker-table":case"marker-chart":a=o,a.markerSearch=e.profileSpecific.markersSearchString||void 0,a.marker=n!==null&&e.profileSpecific.selectedMarkers[n]!==null?e.profileSpecific.selectedMarkers[n]:void 0;break;case"network-chart":a=o,a.networkSearch=e.profileSpecific.networkSearchString||void 0;break;case"js-tracer":{a=o,a.summary=e.profileSpecific.showJsTracerSummary?null:void 0;break}default:throw ae(i)}return hp.stringify(a,{arrayFormat:"bracket"})}function Op(e){let t=G2(e),r=W2(e),{dataSource:n}=e;return n==="none"?"/":(t.length===0?"/":"/"+t.join("/")+"/")+(r?"?"+r:"")}function H2(e){return Cn(e)||void 0}function V2(e){if(e.size>0)return Lo(e)}function j2(e){let t=[];for(let[r,n]of e)n.size>0&&t.push(`${r}-${Lo(n)}`);return t.join("~")||void 0}function q2(e,t){let r=[];for(let n of t){let o=e.get(n);o&&o.length>0&&r.push(`${n}-${Cn(o)}`)}return r.join("~")||void 0}var EI={1:e=>{if(e.pathname==="/"){let t=Object.assign({},e.query,hp.parse(e.hash));"report"in t&&(e.pathname=`/public/${t.report}/calltree/`,e.hash="",e.query={})}e.query.jsOnly!==void 0&&(delete e.query.jsOnly,e.query.implementation="js"),e.query.callTreeFilters&&(e.query.transforms=e.query.callTreeFilters.split("~").map(t=>{let[r,n]=t.split("-");switch(r){case"prefix":return`f-combined-${n}`;case"prefixjs":return`f-js-${n}`;case"postfix":return`f-combined-${n}-i`;case"postfixjs":return`f-js-${n}-i`;default:return}}).filter(t=>t).join("~"),delete e.query.callTreeFilters)},2:e=>{e.pathname=e.pathname.replace(/^(\/[^/]+\/[^/]+)\/timeline\/?/,"$1/stack-chart/").replace(/^(\/[^/]+\/[^/]+)\/markers\/?/,"$1/marker-table/")},3:e=>{let{query:t}=e;"hidePlatformDetails"in t&&(delete t.hidePlatformDetails,t.implementation="js")},4:(e,t)=>{let r=e.query;if((r.thread===void 0?null:+r.thread)===null||t===void 0)return;let o=yI(r.transforms);if(!(!o||o.length===0)){for(let a=0;a<o.length;a++){let i=o[a];if(!("implementation"in i)||i.implementation!=="js"||!("callNodePath"in i)||!i.callNodePath)continue;let s=z2(t.shared,i.callNodePath);s!==null&&(i.callNodePath=K2(t.shared,s))}e.query.transforms=Pp(o)}},5:({query:e})=>{e.range&&(e.range=e.range.split("~").map(t=>{let r=t.match(/^(-?[0-9.]+)_(-?[0-9.]+)$/);if(!r)return console.error(`The range "${t}" couldn't be parsed, ignoring.`),null;let n=Number(r[1])*1e3,o=Number(r[2])*1e3;return isNaN(n)||isNaN(o)?(console.error(`The range "${t}" couldn't be parsed, ignoring.`),null):Tp({start:n,end:o})}).filter(Boolean).join("~"))},6:({query:e})=>{if(e.globalTrackOrder){let t=e.globalTrackOrder.split("-").map(r=>+r);e.globalTrackOrder=Cn(t)||void 0}if(e.hiddenGlobalTracks){let t=new Set(e.hiddenGlobalTracks.split("-").map(r=>+r));e.hiddenGlobalTracks=Lo(t)||void 0}if(e.hiddenLocalTracksByPid&&(e.hiddenLocalTracksByPid=e.hiddenLocalTracksByPid.split("~").map(t=>{let[r,...n]=t.split("-"),o=new Set(n.map(a=>+a));return`${r}-${Lo(o)}`}).join("~")),e.localTrackOrderByPid&&(e.localTrackOrderByPid=e.localTrackOrderByPid.split("~").map(t=>{let[r,...n]=t.split("-"),o=n.map(a=>+a);return`${r}-${Cn(o)}`}).join("~")),e.thread){let t=new Set(e.thread.split(",").map(r=>+r));e.thread=Lo(t)}e.transforms&&e.transforms.includes(";")&&delete e.transforms},7:({query:e})=>{switch(e.timelineType){case"cpu-category":delete e.timelineType;break;case"stack":break;default:e.timelineType="category";break}},8:e=>{},9:({query:e})=>{function t(r){if(r.startsWith("irec-")){let[,,n]=r.split("-");return`rec-${n}`}return r.startsWith("rec-")?"d"+r:r}if(e.transforms){let r=e.transforms.split("~");e.transforms=r.map(t).join("~")}},10:({query:e},t)=>{if(!e.transforms||!e.thread||!t||Ba(e.thread).length!==1)return;let n=t.shared.funcTable.length;function o(i){if(i.startsWith("cr-")){let[,s,l]=i.split("-"),c=n+ +l;if(!isNaN(c))return`cr-${s}-${l}-${c}`}return i}let a=e.transforms.split("~");e.transforms=a.map(o).join("~")},11:e=>{(e.query.view==="active-tab"||e.query.view==="origins")&&(e.query={})},12:(e,t)=>{let{query:r}=e;if(!("sourceView"in r)||!t||!t.shared.sources)return;let n=r.sourceView,{sources:o,stringArray:a}=t.shared,s=$e.withBackingArray(a).indexForString(n);if(s!==-1){let l=o.filename.indexOf(s);l!==-1&&(r.sourceViewIndex=l)}delete r.sourceView},13:e=>{},14:e=>{},15:(e,t,r)=>{if(!r||!r.v60)return;let{v60:n}=r,{query:o}=e;if(!o.transforms)return;let a=Ba(o.thread);if(a.length!==1)return;let[i]=a;if(!(i in n.threadMappings))return;let s=n.threadMappings[i],l=n.newFuncCount;function c(p){if(p<s.funcTableIndexMap.length)return s.funcTableIndexMap[p];let h=p-s.funcTableIndexMap.length;return h<s.resourceTableIndexMap.length?l+s.resourceTableIndexMap[h]:p}function u(p){let h=parseInt(p,10);return!isNaN(h)&&h>=0?""+c(h):p}function d(p){let h=parseInt(p,10);return!isNaN(h)&&h>=0&&h<s.resourceTableIndexMap.length?""+s.resourceTableIndexMap[h]:p}function f(p){let h=p.split("-"),y=h[0];switch(y){case"cr":{let[,b,g,m]=h,T=d(g),S=u(m);return[y,b,T,S].join("-")}case"drec":{let[,b,g]=h,m=u(g);return[y,b,m].join("-")}case"rec":case"mf":case"ff":case"df":case"cfs":{let[,b]=h,g=u(b);return[y,g].join("-")}case"f":case"mcn":{let[,b,g,m]=h,S=Ba(g).map(c),I=Cn(S);return[y,b,I,m].join("-")}default:return p}}o.transforms=o.transforms.split("~").map(f).join("~")},16:e=>{}};for(let e=1;e<=nu;e++)if(!EI[e])throw new Error(`There is no upgrader for version ${e}.`);for(let e of Object.keys(EI)){let t=+e;if(t>nu)throw new Error(kI.oneLine`
642
642
  There is an upgrader for version ${t}, which is larger than
643
- CURRENT_URL_VERSION (${ru}). If you added a new upgrader,
643
+ CURRENT_URL_VERSION (${nu}). If you added a new upgrader,
644
644
  make sure and bump the CURRENT_URL_VERSION variable.
645
- `)}function G2(e,t){let{stackTable:r,funcTable:n,frameTable:o}=e,a=new Map;a.set(null,-1);for(let i=0;i<r.length;i++){let s=r.prefix[i],l=r.frame[i],c=o.func[l],u=n.isJS[c];if(!(s===null||a.has(s)))continue;let f=W(a.get(s),"Unable to find the stack depth for a prefix"),p=f+1;if(u&&t[p]===c){if(p===t.length-1)return i;a.set(i,p)}else a.set(i,f)}return null}function W2(e,t){let{funcTable:r,stackTable:n,frameTable:o}=e,a=[],i=t;for(;i!==null;){let s=n.frame[i],l=o.func[s];(r.isJS[l]||r.relevantForJS[l])&&a.unshift(l),i=n.prefix[i]}return a}function H2(e){let{libIndex:t,address:r,name:n,functionSize:o,functionSizeIsKnown:a}=e,i=r.toString(16),s=o.toString(16);return a||(s+="_"),`${t}~${i}~${s}~${n}`}xe();function kI(e){let t=fs(e.files).filter(([o,a])=>!a.dir).map(([o,a])=>o),r=new Map,n={prefix:[],path:[],partName:[],file:[],depth:[],length:0};for(let o of t){let a=o.split("/").filter(l=>l),i="",s=null;for(let l=0;l<a.length;l++){let c=a[l];i?i+="/"+c:i=c;let u=r.get(i);if(u!==void 0){s=u;continue}let d=n.length++;n.prefix[d]=s,n.path[d]=i,n.partName[d]=c,n.depth[d]=l,n.file[d]=l+1===a.length?e.files[o]:null,r.set(i,d),s=d}}return n}function _I(e){if(!e)return 0;let t=0;for(let r=0;r<e.length;r++)t=Math.max(t,e.depth[r]);return t}var nu=class{_zipFileTable;_parentToChildren;_displayDataByIndex;_zipFileUrl;constructor(t,r){this._zipFileTable=t,this._zipFileUrl=r,this._displayDataByIndex=new Map,this._parentToChildren=new Map,this._parentToChildren.set(null,this._computeChildrenArray(null))}getRoots(){return this.getChildren(null)}getChildren(t){let r=this._parentToChildren.get(t);return r||(r=this._computeChildrenArray(t),this._parentToChildren.set(t,r)),r}_computeChildrenArray(t){let r=[];for(let n=0;n<this._zipFileTable.length;n++)this._zipFileTable.prefix[n]===t&&r.push(n);return r}hasChildren(t){return this.getChildren(t).length>0}getAllDescendants(t){if(t===null)return new Set(Array.from({length:this._zipFileTable.length},(n,o)=>o));let r=new Set;for(let n of this.getChildren(t)){r.add(n);for(let o of this.getAllDescendants(n))r.add(o)}return r}getParent(t){let r=this._zipFileTable.prefix[t];return r===null?-1:r}getDepth(t){return this._zipFileTable.depth[t]}getDisplayData(t){let r=this._displayDataByIndex.get(t);if(r===void 0){let n=null;this.hasChildren(t)||(n=window.location.origin+"/from-url/"+encodeURIComponent(this._zipFileUrl)+"/"+uS("calltree")+"/?file="+encodeURIComponent(this._zipFileTable.path[t]));let o=this._zipFileTable.partName[t],i=[".json"].find(s=>o.endsWith(s));i&&(o=o.slice(0,o.length-i.length)),r={name:o,url:n,zipTableIndex:t},this._displayDataByIndex.set(t,r)}return r}};function CI(e){let r=/(?:[^/]+\/)?[^/]+$/.exec(e);return r!==null?r[0]:""}cr();var j2=["localhost","127.0.0.1","::1"];function oo(e){try{let t=e instanceof URL?e:new URL(e);return j2.includes(t.hostname)}catch{return!1}}function Pt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var q2=typeof Symbol=="function"&&Symbol.observable||"@@observable",EI=q2,Mp=()=>Math.random().toString(36).substring(7).split("").join("."),z2={INIT:`@@redux/INIT${Mp()}`,REPLACE:`@@redux/REPLACE${Mp()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Mp()}`},Bo=z2;function AI(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function K2(e){if(e===void 0)return"undefined";if(e===null)return"null";let t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(Y2(e))return"date";if(J2(e))return"error";let r=Z2(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function Z2(e){return typeof e.constructor=="function"?e.constructor.name:null}function J2(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Y2(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function ao(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=K2(e)),t}function Fp(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(2):`Expected the root reducer to be a function. Instead, received: '${ao(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Pt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(1):`Expected the enhancer to be a function. Instead, received: '${ao(r)}'`);return r(Fp)(e,t)}let n=e,o=t,a=new Map,i=a,s=0,l=!1;function c(){i===a&&(i=new Map,a.forEach((b,m)=>{i.set(m,b)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(4):`Expected the listener to be a function. Instead, received: '${ao(b)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;c();let g=s++;return i.set(g,b),function(){if(m){if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,c(),i.delete(g),a=null}}}function f(b){if(!AI(b))throw new Error(process.env.NODE_ENV==="production"?Pt(7):`Actions must be plain objects. Instead, the actual type was: '${ao(b)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof b.type>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof b.type!="string")throw new Error(process.env.NODE_ENV==="production"?Pt(17):`Action "type" property must be a string. Instead, the actual type was: '${ao(b.type)}'. Value was: '${b.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(9):"Reducers may not dispatch actions.");try{l=!0,o=n(o,b)}finally{l=!1}return(a=i).forEach(g=>{g()}),b}function p(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(10):`Expected the nextReducer to be a function. Instead, received: '${ao(b)}`);n=b,f({type:Bo.REPLACE})}function h(){let b=d;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?Pt(11):`Expected the observer to be an object. Instead, received: '${ao(m)}'`);function g(){let S=m;S.next&&S.next(u())}return g(),{unsubscribe:b(g)}},[EI](){return this}}}return f({type:Bo.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[EI]:h}}function NI(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function X2(e,t,r,n){let o=Object.keys(t),a=r&&r.type===Bo.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!AI(e))return`The ${a} has unexpected type of "${ao(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;let i=Object.keys(e).filter(s=>!t.hasOwnProperty(s)&&!n[s]);if(i.forEach(s=>{n[s]=!0}),!(r&&r.type===Bo.REPLACE)&&i.length>0)return`Unexpected ${i.length>1?"keys":"key"} "${i.join('", "')}" found in ${a}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function Q2(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Bo.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:Bo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Bo.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function _t(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];process.env.NODE_ENV!=="production"&&typeof e[s]>"u"&&NI(`No reducer provided for key "${s}"`),typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o;process.env.NODE_ENV!=="production"&&(o={});let a;try{Q2(r)}catch(i){a=i}return function(s={},l){if(a)throw a;if(process.env.NODE_ENV!=="production"){let d=X2(s,r,l,o);d&&NI(d)}let c=!1,u={};for(let d=0;d<n.length;d++){let f=n[d],p=r[f],h=s[f],y=p(h,l);if(typeof y>"u"){let b=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Pt(14):`When called with an action of type ${b?`"${String(b)}"`:"(unknown type)"}, the slice reducer for key "${f}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}u[f]=y,c=c||y!==h}return c=c||n.length!==Object.keys(s).length,c?u:s}}function eB(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Op(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(process.env.NODE_ENV==="production"?Pt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:o.getState,dispatch:(l,...c)=>a(l,...c)},s=e.map(l=>l(i));return a=eB(...s)(o.dispatch),{...o,dispatch:a}}}var PI=ce(Ir());xe();var tB=(e="none",t)=>{switch(t.type){case"WAITING_FOR_PROFILE_FROM_FILE":return"from-file";case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return"public";case"TRIGGER_LOADING_FROM_URL":return"from-url";case"PROFILE_REMOTELY_DELETED":return"unpublished";case"SET_DATA_SOURCE":return t.dataSource;default:return e}},rB=(e="",t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return t.hash;case"PROFILE_REMOTELY_DELETED":return"";default:return e}},nB=(e="",t)=>{switch(t.type){case"WAITING_FOR_PROFILE_FROM_URL":return t.profileUrl?t.profileUrl:e;case"TRIGGER_LOADING_FROM_URL":return t.profileUrl;default:return e}},oB=(e=null,t)=>t.type==="CHANGE_PROFILES_TO_COMPARE"?t.profiles:e,RI=(e="calltree",t)=>{switch(t.type){case"CHANGE_SELECTED_TAB":case"SELECT_TRACK":case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return t.selectedTab;case"FOCUS_CALL_TREE":return no.includes(e)?e:"calltree";default:return e}},aB=(e=[],t)=>{switch(t.type){case"COMMIT_RANGE":{let{start:r,end:n}=t;return[...e,{start:r,end:n}]}case"POP_COMMITTED_RANGES":return e.slice(0,t.firstPoppedFilterIndex);case"SANITIZED_PROFILE_PUBLISHED":return t.committedRanges?t.committedRanges:e;default:return e}},iB=(e=null,t)=>{switch(t.type){case"CHANGE_SELECTED_THREAD":case"SELECT_TRACK":case"VIEW_FULL_PROFILE":case"ISOLATE_PROCESS":case"ISOLATE_PROCESS_MAIN_THREAD":case"HIDE_GLOBAL_TRACK":case"HIDE_LOCAL_TRACK":case"HIDE_PROVIDED_TRACKS":case"ISOLATE_LOCAL_TRACK":case"TOGGLE_RESOURCES_PANEL":case"CHANGE_TAB_FILTER":return t.selectedThreadIndexes;case"SANITIZED_PROFILE_PUBLISHED":{let{translationMaps:r}=t;if(e===null||!r||!r.oldThreadIndexToNew)return e;let n=new Set,{oldThreadIndexToNew:o}=r;for(let a of e){let i=o.get(a);if(i===void 0)return console.error(PI.oneLine`
645
+ `)}function z2(e,t){let{stackTable:r,funcTable:n,frameTable:o}=e,a=new Map;a.set(null,-1);for(let i=0;i<r.length;i++){let s=r.prefix[i],l=r.frame[i],c=o.func[l],u=n.isJS[c];if(!(s===null||a.has(s)))continue;let f=W(a.get(s),"Unable to find the stack depth for a prefix"),p=f+1;if(u&&t[p]===c){if(p===t.length-1)return i;a.set(i,p)}else a.set(i,f)}return null}function K2(e,t){let{funcTable:r,stackTable:n,frameTable:o}=e,a=[],i=t;for(;i!==null;){let s=n.frame[i],l=o.func[s];(r.isJS[l]||r.relevantForJS[l])&&a.unshift(l),i=n.prefix[i]}return a}function Z2(e){let{libIndex:t,address:r,name:n,functionSize:o,functionSizeIsKnown:a}=e,i=r.toString(16),s=o.toString(16);return a||(s+="_"),`${t}~${i}~${s}~${n}`}xe();function NI(e){let t=ps(e.files).filter(([o,a])=>!a.dir).map(([o,a])=>o),r=new Map,n={prefix:[],path:[],partName:[],file:[],depth:[],length:0};for(let o of t){let a=o.split("/").filter(l=>l),i="",s=null;for(let l=0;l<a.length;l++){let c=a[l];i?i+="/"+c:i=c;let u=r.get(i);if(u!==void 0){s=u;continue}let d=n.length++;n.prefix[d]=s,n.path[d]=i,n.partName[d]=c,n.depth[d]=l,n.file[d]=l+1===a.length?e.files[o]:null,r.set(i,d),s=d}}return n}function AI(e){if(!e)return 0;let t=0;for(let r=0;r<e.length;r++)t=Math.max(t,e.depth[r]);return t}var ou=class{_zipFileTable;_parentToChildren;_displayDataByIndex;_zipFileUrl;constructor(t,r){this._zipFileTable=t,this._zipFileUrl=r,this._displayDataByIndex=new Map,this._parentToChildren=new Map,this._parentToChildren.set(null,this._computeChildrenArray(null))}getRoots(){return this.getChildren(null)}getChildren(t){let r=this._parentToChildren.get(t);return r||(r=this._computeChildrenArray(t),this._parentToChildren.set(t,r)),r}_computeChildrenArray(t){let r=[];for(let n=0;n<this._zipFileTable.length;n++)this._zipFileTable.prefix[n]===t&&r.push(n);return r}hasChildren(t){return this.getChildren(t).length>0}getAllDescendants(t){if(t===null)return new Set(Array.from({length:this._zipFileTable.length},(n,o)=>o));let r=new Set;for(let n of this.getChildren(t)){r.add(n);for(let o of this.getAllDescendants(n))r.add(o)}return r}getParent(t){let r=this._zipFileTable.prefix[t];return r===null?-1:r}getDepth(t){return this._zipFileTable.depth[t]}getDisplayData(t){let r=this._displayDataByIndex.get(t);if(r===void 0){let n=null;this.hasChildren(t)||(n=window.location.origin+"/from-url/"+encodeURIComponent(this._zipFileUrl)+"/"+pS("calltree")+"/?file="+encodeURIComponent(this._zipFileTable.path[t]));let o=this._zipFileTable.partName[t],i=[".json"].find(s=>o.endsWith(s));i&&(o=o.slice(0,o.length-i.length)),r={name:o,url:n,zipTableIndex:t},this._displayDataByIndex.set(t,r)}return r}};function PI(e){let r=/(?:[^/]+\/)?[^/]+$/.exec(e);return r!==null?r[0]:""}rr();var Y2=["localhost","127.0.0.1","::1"];function oo(e){try{let t=e instanceof URL?e:new URL(e);return Y2.includes(t.hostname)}catch{return!1}}function Pt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var X2=typeof Symbol=="function"&&Symbol.observable||"@@observable",RI=X2,Lp=()=>Math.random().toString(36).substring(7).split("").join("."),Q2={INIT:`@@redux/INIT${Lp()}`,REPLACE:`@@redux/REPLACE${Lp()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Lp()}`},Uo=Q2;function FI(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function eB(e){if(e===void 0)return"undefined";if(e===null)return"null";let t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(nB(e))return"date";if(rB(e))return"error";let r=tB(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function tB(e){return typeof e.constructor=="function"?e.constructor.name:null}function rB(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function nB(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function ao(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=eB(e)),t}function Dp(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(2):`Expected the root reducer to be a function. Instead, received: '${ao(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Pt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(1):`Expected the enhancer to be a function. Instead, received: '${ao(r)}'`);return r(Dp)(e,t)}let n=e,o=t,a=new Map,i=a,s=0,l=!1;function c(){i===a&&(i=new Map,a.forEach((b,g)=>{i.set(g,b)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(4):`Expected the listener to be a function. Instead, received: '${ao(b)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let g=!0;c();let m=s++;return i.set(m,b),function(){if(g){if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");g=!1,c(),i.delete(m),a=null}}}function f(b){if(!FI(b))throw new Error(process.env.NODE_ENV==="production"?Pt(7):`Actions must be plain objects. Instead, the actual type was: '${ao(b)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof b.type>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof b.type!="string")throw new Error(process.env.NODE_ENV==="production"?Pt(17):`Action "type" property must be a string. Instead, the actual type was: '${ao(b.type)}'. Value was: '${b.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(9):"Reducers may not dispatch actions.");try{l=!0,o=n(o,b)}finally{l=!1}return(a=i).forEach(m=>{m()}),b}function p(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(10):`Expected the nextReducer to be a function. Instead, received: '${ao(b)}`);n=b,f({type:Uo.REPLACE})}function h(){let b=d;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(process.env.NODE_ENV==="production"?Pt(11):`Expected the observer to be an object. Instead, received: '${ao(g)}'`);function m(){let S=g;S.next&&S.next(u())}return m(),{unsubscribe:b(m)}},[RI](){return this}}}return f({type:Uo.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[RI]:h}}function MI(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function oB(e,t,r,n){let o=Object.keys(t),a=r&&r.type===Uo.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!FI(e))return`The ${a} has unexpected type of "${ao(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;let i=Object.keys(e).filter(s=>!t.hasOwnProperty(s)&&!n[s]);if(i.forEach(s=>{n[s]=!0}),!(r&&r.type===Uo.REPLACE)&&i.length>0)return`Unexpected ${i.length>1?"keys":"key"} "${i.join('", "')}" found in ${a}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function aB(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Uo.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:Uo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Uo.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function _t(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];process.env.NODE_ENV!=="production"&&typeof e[s]>"u"&&MI(`No reducer provided for key "${s}"`),typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o;process.env.NODE_ENV!=="production"&&(o={});let a;try{aB(r)}catch(i){a=i}return function(s={},l){if(a)throw a;if(process.env.NODE_ENV!=="production"){let d=oB(s,r,l,o);d&&MI(d)}let c=!1,u={};for(let d=0;d<n.length;d++){let f=n[d],p=r[f],h=s[f],y=p(h,l);if(typeof y>"u"){let b=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Pt(14):`When called with an action of type ${b?`"${String(b)}"`:"(unknown type)"}, the slice reducer for key "${f}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}u[f]=y,c=c||y!==h}return c=c||n.length!==Object.keys(s).length,c?u:s}}function iB(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Bp(...e){return t=>(r,n)=>{let o=t(r,n),a=()=>{throw new Error(process.env.NODE_ENV==="production"?Pt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:o.getState,dispatch:(l,...c)=>a(l,...c)},s=e.map(l=>l(i));return a=iB(...s)(o.dispatch),{...o,dispatch:a}}}var OI=ce(Ir());xe();var sB=(e="none",t)=>{switch(t.type){case"WAITING_FOR_PROFILE_FROM_FILE":return"from-file";case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return"public";case"TRIGGER_LOADING_FROM_URL":return"from-url";case"PROFILE_REMOTELY_DELETED":return"unpublished";case"SET_DATA_SOURCE":return t.dataSource;default:return e}},lB=(e="",t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return t.hash;case"PROFILE_REMOTELY_DELETED":return"";default:return e}},cB=(e="",t)=>{switch(t.type){case"WAITING_FOR_PROFILE_FROM_URL":return t.profileUrl?t.profileUrl:e;case"TRIGGER_LOADING_FROM_URL":return t.profileUrl;default:return e}},uB=(e=null,t)=>t.type==="CHANGE_PROFILES_TO_COMPARE"?t.profiles:e,LI=(e="calltree",t)=>{switch(t.type){case"CHANGE_SELECTED_TAB":case"SELECT_TRACK":case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return t.selectedTab;case"FOCUS_CALL_TREE":return no.includes(e)?e:"calltree";default:return e}},dB=(e=[],t)=>{switch(t.type){case"COMMIT_RANGE":{let{start:r,end:n}=t;return[...e,{start:r,end:n}]}case"POP_COMMITTED_RANGES":return e.slice(0,t.firstPoppedFilterIndex);case"SANITIZED_PROFILE_PUBLISHED":return t.committedRanges?t.committedRanges:e;default:return e}},fB=(e=null,t)=>{switch(t.type){case"CHANGE_SELECTED_THREAD":case"SELECT_TRACK":case"VIEW_FULL_PROFILE":case"ISOLATE_PROCESS":case"ISOLATE_PROCESS_MAIN_THREAD":case"HIDE_GLOBAL_TRACK":case"HIDE_LOCAL_TRACK":case"HIDE_PROVIDED_TRACKS":case"ISOLATE_LOCAL_TRACK":case"TOGGLE_RESOURCES_PANEL":case"CHANGE_TAB_FILTER":return t.selectedThreadIndexes;case"SANITIZED_PROFILE_PUBLISHED":{let{translationMaps:r}=t;if(e===null||!r||!r.oldThreadIndexToNew)return e;let n=new Set,{oldThreadIndexToNew:o}=r;for(let a of e){let i=o.get(a);if(i===void 0)return console.error(OI.oneLine`
646
646
  Unable to map an old thread index to a new thread index for the selected
647
647
  thread when sanitizing a profile
648
- `),null;n.add(i)}return n}default:return e}},sB=(e="",t)=>t.type==="CHANGE_CALL_TREE_SEARCH_STRING"?t.searchString:e,lB=(e="",t)=>t.type==="CHANGE_MARKER_SEARCH_STRING"?t.searchString:e,cB=(e="",t)=>t.type==="CHANGE_NETWORK_SEARCH_STRING"?t.searchString:e,uB=(e={},t)=>{switch(t.type){case"PROFILE_LOADED":return t.transformStacks||e;case"ADD_TRANSFORM_TO_STACK":{let{threadsKey:r,transform:n}=t,o=e[r]||[];return Object.assign({},e,{[r]:[...o,n]})}case"POP_TRANSFORMS_FROM_STACK":{let{threadsKey:r,firstPoppedFilterIndex:n}=t,o=e[r]||[];return Object.assign({},e,{[r]:o.slice(0,n)})}case"SANITIZED_PROFILE_PUBLISHED":{let{translationMaps:r}=t;if(!r)return e;let n={};for(let[o,a]of fs(e)){let i=r.oldThreadIndexToNew?qS(o,r.oldThreadIndexToNew):o;i!==null&&(n[i]=Pp(a,r))}return n}default:return e}},dB=(e="cpu-category",t)=>{switch(t.type){case"CHANGE_TIMELINE_TYPE":return t.timelineType;case"VIEW_FULL_PROFILE":return t.timelineType!==null?t.timelineType:e;default:return e}},fB=(e="combined",t)=>{switch(t.type){case"PROFILE_LOADED":return t.implementationFilter||e;case"CHANGE_IMPLEMENTATION_FILTER":return t.implementation;default:return e}},pB=(e="timing",t)=>t.type==="CHANGE_CALL_TREE_SUMMARY_STRATEGY"?t.callTreeSummaryStrategy:e,hB=(e=!1,t)=>t.type==="CHANGE_INVERT_CALLSTACK"?t.invertCallstack:e,mB=(e=!1,t)=>t.type==="CHANGE_SHOW_USER_TIMINGS"?t.showUserTimings:e,gB=(e=!1,t)=>t.type==="CHANGE_STACK_CHART_SAME_WIDTHS"?t.stackChartSameWidths:e,yB=(e=!1,t)=>t.type==="CHANGE_SHOW_JS_TRACER_SUMMARY"?t.showSummary:e,bB=(e=[],t)=>{var r;switch(t.type){case"VIEW_FULL_PROFILE":case"CHANGE_GLOBAL_TRACK_ORDER":case"CHANGE_TAB_FILTER":return t.globalTrackOrder;case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?[]:e;default:return e}},TB=(e=new Set,t)=>{var r;switch(t.type){case"VIEW_FULL_PROFILE":case"ISOLATE_LOCAL_TRACK":case"ISOLATE_PROCESS":case"ISOLATE_PROCESS_MAIN_THREAD":case"ISOLATE_SCREENSHOT_TRACK":case"CHANGE_TAB_FILTER":return t.hiddenGlobalTracks;case"HIDE_GLOBAL_TRACK":{let n=new Set(e);return n.add(t.trackIndex),n}case"SHOW_ALL_TRACKS":return new Set;case"SHOW_PROVIDED_TRACKS":{let n=new Set(e);return t.globalTracksToShow.forEach(Set.prototype.delete,n),n}case"SHOW_GLOBAL_TRACK":case"SHOW_GLOBAL_TRACK_INCLUDING_LOCAL_TRACKS":{let n=new Set(e);return n.delete(t.trackIndex),n}case"HIDE_PROVIDED_TRACKS":{let n=new Set(e);return t.globalTracksToHide.forEach(Set.prototype.add,n),n}case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?new Set:e;default:return e}},SB=(e=new Map,t)=>{var r;switch(t.type){case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return t.hiddenLocalTracksByPid;case"HIDE_LOCAL_TRACK":{let n=new Map(e),o=new Set(n.get(t.pid));return o.add(t.trackIndex),n.set(t.pid,o),n}case"SHOW_ALL_TRACKS":{let n=new Map(e);for(let o of n)n.set(o[0],new Set);return n}case"SHOW_PROVIDED_TRACKS":{let n=new Map(e);for(let[o,a]of t.localTracksByPidToShow.entries()){let i=e.get(o)??new Set,s=new Set(i);a.forEach(Set.prototype.delete,s),n.set(o,s)}return n}case"SHOW_LOCAL_TRACK":{let n=new Map(e),o=new Set(n.get(t.pid));return o.delete(t.trackIndex),n.set(t.pid,o),n}case"SHOW_GLOBAL_TRACK_INCLUDING_LOCAL_TRACKS":{let n=new Map(e);return n.set(t.pid,new Set),n}case"HIDE_PROVIDED_TRACKS":{let n=new Map(e);for(let[o,a]of t.localTracksByPidToHide.entries()){let i=e.get(o)??new Set,s=new Set(i);a.forEach(Set.prototype.add,s),n.set(o,s)}return n}case"ISOLATE_PROCESS_MAIN_THREAD":case"ISOLATE_LOCAL_TRACK":{let n=new Map(e);return n.set(t.pid,t.hiddenLocalTracks),n}case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?new Map:e;default:return e}},xB=(e=new Map,t)=>{var r;switch(t.type){case"VIEW_FULL_PROFILE":case"ENABLE_EVENT_DELAY_TRACKS":case"ENABLE_EXPERIMENTAL_PROCESS_CPU_TRACKS":case"CHANGE_TAB_FILTER":return t.localTrackOrderByPid;case"CHANGE_LOCAL_TRACK_ORDER":{let n=new Map(e);return n.set(t.pid,t.localTrackOrder),n}case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?new Map:e;default:return e}},IB=(e=new Set,t)=>{var r;switch(t.type){case"CHANGE_LOCAL_TRACK_ORDER":{let n=new Set(e);return n.add(t.pid),n}case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?new Set:e;default:return e}},vB=(e=null,t)=>t.type==="CHANGE_TAB_FILTER"?t.tabID:e,wB=(e=null,t)=>{switch(t.type){case"PROCESS_PROFILE_FROM_ZIP_FILE":return t.pathInZipFile?t.pathInZipFile:null;case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"RETURN_TO_ZIP_FILE_LIST":return null;default:return e}},kB=(e=null,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"CHANGE_PROFILE_NAME":return t.profileName;default:return e}},_B=(e={scrollGeneration:0,libIndex:null,sourceIndex:null,highlightedLine:null},t)=>{switch(t.type){case"UPDATE_BOTTOM_BOX":return{scrollGeneration:t.scrollToLineNumber!==void 0?e.scrollGeneration+1:e.scrollGeneration,libIndex:t.libIndex,sourceIndex:t.sourceIndex,scrollToLineNumber:t.scrollToLineNumber,highlightedLine:t.highlightedLineNumber};case"SANITIZED_PROFILE_PUBLISHED":{if(!t.translationMaps||e.sourceIndex===null)return e;let r=t.translationMaps.oldSourceToNewSourcePlusOne[e.sourceIndex];return{...e,sourceIndex:r!==0?r-1:null}}default:return e}},CB=(e={isOpen:!1,scrollGeneration:0,highlightedInstruction:null,nativeSymbols:[],currentNativeSymbol:null},t)=>{switch(t.type){case"UPDATE_BOTTOM_BOX":{let{nativeSymbols:r,currentNativeSymbol:n,shouldOpenAssemblyView:o}=t,a=t.scrollToInstructionAddress!==void 0,i=n!==null&&n<r.length?n:null;return{scrollGeneration:a?e.scrollGeneration+1:e.scrollGeneration,nativeSymbols:r,currentNativeSymbol:i,isOpen:e.isOpen||o,scrollToInstructionAddress:t.scrollToInstructionAddress,highlightedInstruction:t.highlightedInstructionAddress}}case"OPEN_ASSEMBLY_VIEW":return{...e,isOpen:!0};case"CHANGE_ASSEMBLY_VIEW_NATIVE_SYMBOL_ENTRY_INDEX":return{...e,currentNativeSymbol:t.entryIndex};case"CLOSE_ASSEMBLY_VIEW":return{...e,isOpen:!1};default:return e}};function EB(){let e={};return ro.forEach(t=>e[t]=!1),e}var NB=(e=EB(),t)=>{switch(t.type){case"UPDATE_BOTTOM_BOX":{let{currentTab:r,shouldOpenBottomBox:n}=t;return n&&!e[r]?{...e,[r]:!0}:e}case"CLOSE_BOTTOM_BOX_FOR_TAB":{let{tab:r}=t;return e[r]?{...e,[r]:!1}:e}default:return e}},AB=(e=null)=>e,PB=(e={},t)=>{if(t.type==="CHANGE_SELECTED_MARKER"){let{threadsKey:r,selectedMarker:n}=t;return{...e,[r]:n}}else return e},MI=_t({selectedThreads:iB,implementation:fB,lastSelectedCallTreeSummaryStrategy:pB,invertCallstack:hB,showUserTimings:mB,stackChartSameWidths:gB,committedRanges:aB,callTreeSearchString:sB,markersSearchString:lB,networkSearchString:cB,transforms:uB,sourceView:_B,assemblyView:CB,isBottomBoxOpenPerPanel:NB,timelineType:dB,globalTrackOrder:bB,hiddenGlobalTracks:TB,hiddenLocalTracksByPid:SB,localTrackOrderByPid:xB,localTrackOrderChangedPids:IB,showJsTracerSummary:yB,tabFilter:vB,selectedMarkers:PB,legacyThreadOrder:(e=null)=>e,legacyHiddenThreads:(e=null)=>e}),RB=e=>(t,r)=>{switch(r.type){case"UPDATE_URL_STATE":return r.newUrlState?r.newUrlState:e(void 0,r);case"RETURN_TO_ZIP_FILE_LIST":case"WAITING_FOR_PROFILE_FROM_FILE":return{...e(t,r),profileSpecific:MI(void 0,r),selectedTab:RI(void 0,r)};default:return e(t,r)}},MB=RB(_t({dataSource:tB,hash:rB,profileUrl:nB,profilesToCompare:oB,selectedTab:RI,pathInZipFile:wB,profileSpecific:MI,profileName:kB,symbolServerUrl:AB})),ou=MB;function FB(e){if(e){let r=/[\d.]+$/.exec(e);if(r)return r[0]}return""}function Lp(e){return e.endsWith(".0")?e.slice(0,-2):e}function OB(e){let t=e.product||"",r=Lp(FB(e.misc));return t+(r?" "+r:"")}function LB(e){switch(e.toolkit){case"android":return e.platform?Lp(e.platform):"Android";case"cocoa":return e.oscpu?e.oscpu.replace(/^Intel /,"").replace(/^Mac OS X/,"macOS"):"macOS";case"windows":return e.oscpu?Lp(e.oscpu.replace(/;.*$/,"").replace(/ NT/,"")):"Windows";case"gtk":case"gtk3":return e.oscpu?e.oscpu.slice(0,e.oscpu.indexOf(" ")):"Linux";default:return e.oscpu||""}}function FI(e){let t=OB(e),r=LB(e);return t+(r?` \u2013 ${r}`:"")}var io=e=>e.urlState,vt=e=>io(e).profileSpecific,OI=e=>io(e).dataSource;var LI=e=>io(e).profileUrl;var DI=e=>io(e).profileName,dr=e=>vt(e).committedRanges,Dp=e=>vt(e).implementation,BI=e=>vt(e).lastSelectedCallTreeSummaryStrategy;var so=e=>vt(e).sourceView.sourceIndex;var Ua=e=>{let{nativeSymbols:t,currentNativeSymbol:r}=vt(e).assemblyView;return r!==null?t[r]:null};var Bp=e=>vt(e).callTreeSearchString,DB=e=>vt(e).markersSearchString,BB=e=>vt(e).networkSearchString,$a=e=>io(e).selectedTab,Cs=e=>$a(e)==="calltree"&&vt(e).invertCallstack,Up=e=>vt(e).selectedThreads,Je=e=>W(Up(e),"Attempted to get a thread index before a profile was loaded.");var UI=e=>vt(e).legacyThreadOrder,$I=e=>vt(e).legacyHiddenThreads,$p=e=>vt(e).globalTrackOrder,Nn=e=>vt(e).hiddenGlobalTracks,lo=e=>vt(e).hiddenLocalTracksByPid,GI=e=>vt(e).localTrackOrderByPid,WI=e=>vt(e).tabFilter;var Gp=(0,kr.createSelector)(Bp,Ro),UB=(0,kr.createSelector)(DB,Ro),$B=(0,kr.createSelector)(BB,Ro),j8=(0,kr.createSelector)(Gp,Mo),HI=(0,kr.createSelector)(UB,ks),VI=(0,kr.createSelector)($B,ks),GB=[],Uo=(e,t)=>vt(e).transforms[t]||GB,jI=(e,t)=>vt(e).selectedMarkers[t]??null;var q8=(0,kr.createSelector)(io,e=>t=>{let n=(Array.isArray(t)?t:[t]).reduce(ou,e);return Rp(n)}),WB=e=>io(e).pathInZipFile,HB=e=>{let{profile:t}=e.profileView;return t?FI(t.meta):null},qI=(0,kr.createSelector)(WB,e=>e?CI(e):null),zI=(0,kr.createSelector)(DI,qI,HB,(e,t,r)=>e||t||r||"Untitled profile"),z8=(0,kr.createSelector)(DI,qI,(e,t)=>e||t||"");function VB(e){try{let t=new URL(e);return oo(t)?!0:["symbols.mozilla.org","symbolication.services.mozilla.com"].includes(t.hostname)?t.protocol!=="https:"?(console.error(`HTTPS is required for non-localhost symbol servers. Rejecting ${e} and defaulting to ${us}.`),!1):!0:(console.error(`The symbol server URL was not in the list of allowed domains. Rejecting ${e} and defaulting to ${us}.`),!1)}catch(t){return console.error(`The symbol server URL was not valid. Rejecting ${e} and defaulting to ${us}.`,t),!1}}var KI=(0,kr.createSelector)(io,({symbolServerUrl:e})=>!e||!VB(e)?us:e.endsWith("/")?e.slice(0,-1):e);function ZI(e,t,r,n,o,a=0,i=t.length-1){let s=a;for(;;){let l=i;for(;s<l&&t[s+1]<e;)s++;for(;s<l&&t[l]<e;)l--;if(s===l)break;let c=r[s],u=0,d=s+1,f=e,p=0,h=c;for(let y=s+1;y<=l;y++){let b=r[y],m=b-h;if(u+=t[y]*m,b>c){let g=u/(b-c);g>=e&&(d=y,f=g,p=u)}h=b}n.push({start:s,end:d,avg:f,sum:p,parent:o}),s=d}}function Wa(e,t,r,n=0,o=t.length-1){let a=e[0],i=new Array;ZI(a,t,r,i,null,n,o);for(let s=0;s<i.length;s++){let l=i[s],c=e.find(u=>u>l.avg);c!==void 0&&ZI(c,t,r,i,s,l.start,l.end)}return{slices:i,time:r}}xe();rr();rr();var $o=class e extends Error{library;errors;constructor(t,r,...n){super([t,...n.map(o=>` - ${o.name}: ${o.message}`)].join(`
649
- `)),this.__proto__=e.prototype,this.name="SymbolsNotFoundError",this.library=r,this.errors=n}};ur();function jB(e){let t=new Map,r=new Set;for(let[n,o]of e){if(r.has(n))continue;let a=t.get(n);if(a===void 0){t.set(n,o);continue}a!==o&&(t.delete(n),r.add(n))}return t}function qB(e,t){let{frameTable:r,funcTable:n,nativeSymbols:o,resourceTable:a}=e,i=new Map;for(let s=0;s<a.length;s++){if(a.type[s]!==1)continue;let c=a.lib[s];if(c===null)continue;let u=t[c];if(u===void 0)throw new Error("Did not find a lib.");let d=new Set;for(let b=0;b<n.length;b++)n.resource[b]===s&&d.add(b);let f=new Set;for(let b=0;b<o.length;b++)o.libIndex[b]===c&&f.add(b);let p=[],h=[];for(let b=0;b<r.length;b++){let m=r.func[b];n.resource[m]===s&&(p.push(b),h.push(r.address[b]))}let y=`${u.debugName}/${u.breakpadId}`;i.set(y,{libIndex:c,resourceIndex:s,allFuncsForThisLib:d,allNativeSymbolsForThisLib:f,allFramesForThisLib:p,frameAddresses:h})}return i}function zB(e){let t=new Map;for(let[r,{frameAddresses:n}]of e){let o=t.get(r);o===void 0&&(o=new Set,t.set(r,o));for(let a of n)o.add(a)}return Array.from(t).map(([r,n])=>{let[o,a]=r.split("/");return{lib:{debugName:o,breakpadId:a},addresses:n}})}function KB(e,t,r,n){let o=e.get(r);if(o===void 0)return;n({libSymbolicationInfo:o,resultsForLib:t})}function ZB(e,t,r){if(r.size===0)return null;let n=nn(),o=new Int32Array(e.length);for(let a=0;a<e.length;a++){let i=e.frame[a],s=e.prefix[a],l=s===null?-1:o[s];if(t[i]!==0){o[a]=l;continue}let c=r.get(i);c===void 0&&(c=[i]);let u=l!==-1?l:null;for(let d=0;d<c.length;d++){let f=c[d],p=n.length;n.frame.push(f),n.prefix.push(u),n.length++,u=p}o[a]=u??-1}return{newStackTable:n,oldStackToNewStack:o}}function JI(e,t,r){let n=new Map,o=t.frameTable.length,a=new Uint8Array(o),i=new Map,s=t;for(let f of r)s=JB(s,f,n,a,i);let l=ZB(s.stackTable,a,i);if(l===null)return{threads:e,shared:s,oldFuncToNewFuncsMap:n};let{newStackTable:c,oldStackToNewStack:u}=l;return s={...s,stackTable:c},{threads:rp(e,f=>{if(f===null)return null;let p=u[f];return p!==-1?p:null}),shared:s,oldFuncToNewFuncsMap:n}}function JB(e,t,r,n,o){let{frameTable:a,funcTable:i,nativeSymbols:s,stringArray:l,sources:c}=e,u=$e.withBackingArray(l),{libSymbolicationInfo:d,resultsForLib:f}=t,{resourceIndex:p,allFramesForThisLib:h,allFuncsForThisLib:y,allNativeSymbolsForThisLib:b,libIndex:m}=d,g=new Set(y),T=new Set(b),S=new Map,I=new Map,v=new Map,w=[],k=[];for(let A of h)a.inlineDepth[A]>0?(w.push(A),n[A]=1):k.push(A);for(let A of k){let M=a.nativeSymbol[A],P=a.address[A],$=f.get(P);if($===void 0)if(M!==null){let H=u.getString(s.name[M]);$={symbolAddress:s.address[M],name:H}}else $={symbolAddress:P,name:`0x${P.toString(16)}`};let J=$.symbolAddress;if(S.set(A,J),I.set(J,$),M!==null&&!v.has(J)&&T.has(M)){let H=M;T.delete(H),v.set(J,H)}}let N=T.values(),R=rS(s);for(let[A,M]of I){let P=u.indexForString(M.name),$=v.get(A);$===void 0&&($=N.next().value,$===void 0&&($=R.length,R.libIndex[$]=m,R.length++),v.set(A,$)),R.address[$]=A,R.name[$]=P,R.functionSize[$]=M.functionSize??null}let F=a.nativeSymbol.slice();for(let[A,M]of S){let P=v.get(M);if(P===void 0)throw new Error("Impossible, all symbolAddresses have a canonical symbol at this point.");F[A]=P}let G=Oc({...a,nativeSymbol:F}),B=Ea(i),Z=g.values(),X=new Map,_e=w.values(),D=[];for(let A of k){let M=a.func[A],P=F[A];if(P===null)throw new Error("Impossible, all frames now have native symbols.");let $=a.address[A],J=f.get($);if(J===void 0){let de=R.name[P],ue=null,fe=B.source[M];fe!==null&&(ue=c.filename[fe]),J={symbolAddress:R.address[P],name:u.getString(de),file:ue!==null?u.getString(ue):void 0,line:a.line[A]??void 0}}let H=J.inlines?J.inlines.slice():[];H.push({name:J.name,file:J.file,line:J.line}),H.reverse();let z=[],se=[];for(let de=0;de<H.length;de++){let ue=H[de],fe=u.indexForString(ue.name),be=ue.file!==void 0?u.indexForString(ue.file):null,V=`${fe}:${be??""}`,te=X.get(V);if(te===void 0){if(te=Z.next().value,te===void 0&&(te=B.length,B.isJS[te]=B.isJS[M],B.relevantForJS[te]=B.relevantForJS[M],B.resource[te]=p,B.source[te]=null,B.lineNumber[te]=null,B.columnNumber[te]=null,B.length++),B.name[te]=fe,be!==null){let Q=null;for(let Te=0;Te<c.filename.length;Te++)if(c.filename[Te]===be&&c.id[Te]===null){Q=Te;break}Q===null&&(Q=c.filename.length,c.filename.push(be),c.id.push(null),c.startLine.push(1),c.startColumn.push(1),c.sourceMapURL.push(null),c.length++),B.source[te]=Q}else B.source[te]=null;X.set(V,te)}se.push(te);let q;if(de===0)q=A;else{q=_e.next().value,q===void 0&&(q=G.length,G.length++);let Q=G.category[A],Te=G.subcategory[A],Ne=G.innerWindowID[A];G.category[q]=Q,G.subcategory[q]=Te,G.innerWindowID[q]=Ne,G.address[q]=$,G.nativeSymbol[q]=P}G.inlineDepth[q]=de,G.func[q]=te,G.line[q]=ue.line??null,G.column[q]=null,z.push(q)}z.length>1&&o.set(A,z),D.push([M,se.join("#")])}let re=jB(D);for(let[A,M]of re)r.set(A,M.split("#").map(P=>+P));return{...e,frameTable:G,funcTable:B,nativeSymbols:R}}async function YI(e,t,r,n){let o=qB(e.shared,e.libs),a=zB(o);await t.getSymbols(a,(i,s)=>{let{debugName:l,breakpadId:c}=i,u=`${l}/${c}`;KB(o,s,u,r)},(i,s)=>{if(!(s instanceof $o))throw s;console.warn(s)},n)}function Ha(e,t){return t.reduce((r,n)=>{let o=e.get(n);return o===void 0?[...r,n]:[...r,...o]},[])}function Wp(e,t){let r=[];for(let n of t){let o=Ha(e,n);r.push(o);let a=n[n.length-1],s=Ha(e,[a]).length;if(s>1)for(let l=1;l<s;l++)r.push(o.slice(0,o.length-l))}return new $t(r)}xe();var YB=(e=null,t)=>{switch(t.type){case"PROFILE_LOADED":return t.profile;case"BULK_SYMBOLICATION":{if(e===null)throw new Error("Assumed that a profile would be loaded in time for a coalesced functions update.");if(!e.threads.length)return e;let{symbolicatedShared:r,symbolicatedThreads:n}=t;return{...e,shared:r,threads:n}}case"DONE_SYMBOLICATING":{if(e===null)throw new Error("Strangely we're done symbolicating a non-existent profile.");return{...e,meta:{...e.meta,symbolicated:!0}}}case"UPDATE_PAGES":{if(e===null)throw new Error("We tried to update the pages information for a non-existent profile.");let{newPages:r}=t;return{...e,pages:r}}default:return e}},XB=(e=[],t)=>{switch(t.type){case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return t.globalTracks;default:return e}},QB=(e=new Map,t)=>{switch(t.type){case"VIEW_FULL_PROFILE":case"ENABLE_EVENT_DELAY_TRACKS":case"ENABLE_EXPERIMENTAL_PROCESS_CPU_TRACKS":case"CHANGE_TAB_FILTER":return t.localTracksByPid;default:return e}},eU=(e="DONE",t)=>{switch(t.type){case"START_SYMBOLICATING":return"SYMBOLICATING";case"DONE_SYMBOLICATING":return"DONE";default:return e}},Hp={selectedNonInvertedCallNodePath:[],selectedInvertedCallNodePath:[],expandedNonInvertedCallNodePaths:new $t,expandedInvertedCallNodePaths:new $t,selectedNetworkMarker:null,lastSeenTransformCount:0};function au(e,t){let r=e[t];return r||Hp}function Va(e,t,r){let n={...e};return n[t]={...au(e,t),...r},n}var tU=(e={},t)=>{switch(t.type){case"PROFILE_LOADED":return{};case"BULK_SYMBOLICATION":{let{oldFuncToNewFuncsMap:r}=t;return Dc(e,o=>({...o,selectedNonInvertedCallNodePath:Ha(r,o.selectedNonInvertedCallNodePath),selectedInvertedCallNodePath:Ha(r,o.selectedInvertedCallNodePath),expandedNonInvertedCallNodePaths:Wp(r,o.expandedNonInvertedCallNodePaths),expandedInvertedCallNodePaths:Wp(r,o.expandedInvertedCallNodePaths)}))}case"CHANGE_SELECTED_CALL_NODE":{let{isInverted:r,selectedCallNodePath:n,threadsKey:o,optionalExpandedToCallNodePath:a}=t,i=au(e,o),s=r?i.selectedInvertedCallNodePath:i.selectedNonInvertedCallNodePath;if(aS(n,s)&&!a)return e;let l=r?i.expandedInvertedCallNodePaths:i.expandedNonInvertedCallNodePaths,c=a||n,u=[];for(let f=1;f<c.length;f++)u.push(c.slice(0,f));return u.some(f=>!l.has(f))&&(l=new $t(l),u.forEach(f=>l.add(f))),Va(e,o,r?{selectedInvertedCallNodePath:n,expandedInvertedCallNodePaths:l}:{selectedNonInvertedCallNodePath:n,expandedNonInvertedCallNodePaths:l})}case"CHANGE_INVERT_CALLSTACK":{let{newSelectedCallNodePath:r,selectedThreadIndexes:n,invertCallstack:o}=t;return Dc(e,(a,i)=>{if(i===ut(n).toString()){let s=new $t;for(let l=1;l<r.length;l++)s.add(r.slice(0,l));return o?{...a,selectedInvertedCallNodePath:r,expandedInvertedCallNodePaths:s}:{...a,selectedNonInvertedCallNodePath:r,expandedNonInvertedCallNodePaths:s}}return a})}case"CHANGE_EXPANDED_CALL_NODES":{let{threadsKey:r,isInverted:n}=t,o=new $t(t.expandedCallNodePaths);return Va(e,r,n?{expandedInvertedCallNodePaths:o}:{expandedNonInvertedCallNodePaths:o})}case"CHANGE_SELECTED_NETWORK_MARKER":{let{threadsKey:r,selectedNetworkMarker:n}=t;return Va(e,r,{selectedNetworkMarker:n})}case"ADD_TRANSFORM_TO_STACK":{let{threadsKey:r,transform:n,transformedThread:o,callNodeInfo:a}=t,i=function(h){return new $t(Array.from(h).map(y=>Np(y,n,o,a)).filter(y=>y.length>0))},s=function(h){return Np(h,n,o,a)},l=au(e,r),c=s(l.selectedNonInvertedCallNodePath),u=s(l.selectedInvertedCallNodePath),d=i(l.expandedNonInvertedCallNodePaths),f=i(l.expandedInvertedCallNodePaths),p=l.lastSeenTransformCount+1;return Va(e,r,{selectedNonInvertedCallNodePath:c,selectedInvertedCallNodePath:u,expandedNonInvertedCallNodePaths:d,expandedInvertedCallNodePaths:f,lastSeenTransformCount:p})}case"POP_TRANSFORMS_FROM_STACK":{let{threadsKey:r}=t;return Va(e,r,{selectedNonInvertedCallNodePath:[],selectedInvertedCallNodePath:[],expandedNonInvertedCallNodePaths:new $t,expandedInvertedCallNodePaths:new $t,lastSeenTransformCount:0})}case"UPDATE_URL_STATE":{if(!t.newUrlState)return e;let{transforms:r}=t.newUrlState.profileSpecific;return Dc(e,(n,o)=>{let i=(r[o]||[]).length,s=n.lastSeenTransformCount;return i<s?{...n,selectedNonInvertedCallNodePath:[],selectedInvertedCallNodePath:[],expandedNonInvertedCallNodePaths:new $t,expandedInvertedCallNodePaths:new $t,lastSeenTransformCount:i}:n})}case"CHANGE_IMPLEMENTATION_FILTER":{let{transformedThread:r,threadsKey:n,previousImplementation:o,implementation:a}=t;if(o===a)return e;let i=au(e,n),s=function(h){return a==="combined"?h=Ap(r,o,h):(o!=="combined"&&(h=Ap(r,o,h)),h=yI(r,a,h)),h},l=function(h){let y=new $t;for(let b=1;b<h.length;b++)y.add(h.slice(0,b));return y},c=s(i.selectedNonInvertedCallNodePath),u=s(i.selectedInvertedCallNodePath),d=l(c),f=l(u);return Va(e,n,{selectedNonInvertedCallNodePath:c,selectedInvertedCallNodePath:u,expandedNonInvertedCallNodePaths:d,expandedInvertedCallNodePaths:f})}default:return e}},XI={fixedColumnWidths:null};function rU(e,t,r){let n={...e};return n[t]={...e[t]??XI,...r},n}var nU=(e={},t)=>t.type==="CHANGE_TABLE_VIEW_OPTIONS"?rU(e,t.tab,t.tableViewOptions):e,oU=(e=new Set,t)=>{switch(t.type){case"REQUESTING_SYMBOL_TABLE":{let r=new Set(e);return r.add(t.requestedLib),r}case"RECEIVED_SYMBOL_TABLE_REPLY":{let r=new Set(e);return r.delete(t.requestedLib),r}default:return e}},aU=(e=null,t)=>{switch(t.type){case"UPDATE_PREVIEW_SELECTION":return t.previewSelection;case"COMMIT_RANGE":return null;case"POP_COMMITTED_RANGES":return t.committedRange?{isModifying:!1,selectionStart:t.committedRange.start,selectionEnd:t.committedRange.end}:null;default:return e}},iU=(e=0,t)=>{switch(t.type){case"CHANGE_INVERT_CALLSTACK":case"CHANGE_SELECTED_THREAD":case"SELECT_TRACK":case"HIDE_GLOBAL_TRACK":case"HIDE_LOCAL_TRACK":case"HIDE_PROVIDED_TRACKS":case"CHANGE_CALL_TREE_SEARCH_STRING":case"CHANGE_MARKER_SEARCH_STRING":case"CHANGE_NETWORK_SEARCH_STRING":return e+1;case"CHANGE_SELECTED_CALL_NODE":case"CHANGE_SELECTED_MARKER":case"CHANGE_SELECTED_NETWORK_MARKER":return t.context.source==="pointer"?e:e+1;default:return e}},sU=(e=0,t)=>t.type==="FOCUS_CALL_TREE"?e+1:e,lU=(e={start:0,end:1},t)=>t.type==="PROFILE_LOADED"?Zf(t.profile):e,cU=(e=null,t)=>{switch(t.type){case"SELECT_TRACK":return t.lastNonShiftClickInformation;case"HIDE_GLOBAL_TRACK":{if(!e)return null;let{clickedTrack:r}=e;return r.type==="global"&&r.trackIndex===t.trackIndex||r.type==="local"&&r.pid===t.pid?null:e}case"HIDE_LOCAL_TRACK":{if(!e)return null;let{clickedTrack:r}=e;return r.type==="local"&&r.pid===t.pid&&r.trackIndex===t.trackIndex?null:e}default:return e}},uU=(e=null,t)=>t.type==="CHANGE_RIGHT_CLICKED_TRACK"?t.trackReference:e,dU=(e=null,t)=>{switch(t.type){case"BULK_SYMBOLICATION":return e===null?null:{...e,callNodePath:Ha(t.oldFuncToNewFuncsMap,e.callNodePath)};case"CHANGE_RIGHT_CLICKED_CALL_NODE":return t.callNodePath!==null?{threadsKey:t.threadsKey,callNodePath:t.callNodePath}:null;case"SET_CONTEXT_MENU_VISIBILITY":return t.isVisible?e:null;case"PROFILE_LOADED":case"CHANGE_INVERT_CALLSTACK":case"ADD_TRANSFORM_TO_STACK":case"POP_TRANSFORMS_FROM_STACK":case"CHANGE_IMPLEMENTATION_FILTER":return null;default:return e}},fU=(e=null,t)=>{switch(t.type){case"CHANGE_RIGHT_CLICKED_MARKER":return t.markerIndex!==null?{threadsKey:t.threadsKey,markerIndex:t.markerIndex}:null;case"SET_CONTEXT_MENU_VISIBILITY":return t.isVisible?e:null;case"PROFILE_LOADED":return null;default:return e}},pU=(e=null,t)=>{switch(t.type){case"CHANGE_HOVERED_MARKER":return t.markerIndex!==null?{threadsKey:t.threadsKey,markerIndex:t.markerIndex}:null;case"PROFILE_LOADED":return null;default:return e}},hU=(e=null,t)=>t.type==="CHANGE_MOUSE_TIME_POSITION"?t.mouseTimePosition:e,mU=e=>(t,r)=>{switch(r.type){case"SANITIZED_PROFILE_PUBLISHED":case"REVERT_TO_PRE_PUBLISHED_STATE":case"RETURN_TO_ZIP_FILE_LIST":return e(void 0,r);default:return e(t,r)}},gU=mU(_t({viewOptions:_t({perThread:tU,symbolicationStatus:eU,waitingForLibs:oU,previewSelection:aU,scrollToSelectionGeneration:iU,focusCallTreeGeneration:sU,rootRange:lU,lastNonShiftClick:cU,rightClickedTrack:uU,rightClickedCallNode:dU,rightClickedMarker:fU,hoveredMarker:pU,mouseTimePosition:hU,perTab:nU}),profile:YB,globalTracks:XB,localTracksByPid:QB})),QI=gU;ur();var iu=e=>e.profileView,Gr=e=>iu(e).viewOptions;var fr=e=>Gr(e).rootRange;var yU=e=>fr(e).start,bU=e=>{let{sampleUnits:t}=ge(e).meta;return t?t.time:"ms"},pr=(0,Se.createSelector)(fr,yU,dr,(e,t,r)=>{if(r.length>0){let{start:n,end:o}=r[r.length-1];return n+=t,o+=t,{start:n,end:o}}return e}),T5=(0,Se.createSelector)(dr,bU,qx);var Go=e=>Gr(e).previewSelection;var S5=(0,Se.createSelector)(pr,Go,(e,t)=>t?{start:t.selectionStart,end:t.selectionEnd}:e),Es=e=>iu(e).profile,ge=e=>W(Es(e),"Tried to access the profile before it was loaded."),Ct=e=>ge(e).shared,Wo=e=>ge(e).meta.interval,Vp=e=>ge(e).pages||null,_r=e=>nt(e).findIndex(t=>t.color==="grey"),Wt=e=>ge(e).threads;var TU=e=>Gr(e).rightClickedTrack,jp=e=>ge(e).counters||null,Ho=e=>ge(e).meta;var SU=e=>Ho(e).markerSchema,Ns=e=>Ho(e).sampleUnits,xU=e=>Ho(e).extensions,nt=(0,Se.createSelector)(ge,e=>{let{categories:t}=e.meta;return t||zf()}),Rt=(0,Se.createSelector)(e=>Ct(e).stringArray,e=>$e.withBackingArray(e)),su=(0,Se.createSelector)(e=>Ct(e).stackTable,e=>Ct(e).frameTable,nt,_r,Kc),IU=(0,Se.createSelector)(e=>Ct(e).funcTable,e=>Ct(e).resourceTable,BS),ev=e=>IU(e).funcTable;var An=e=>Ct(e).sources,Cr=(0,Se.createSelector)(SU,e=>{let t=new Set([...Tp.map(r=>r.name)]);return[...e.filter(r=>!t.has(r.name)),...Tp]}),ft=(0,Se.createSelector)(Cr,e=>{let t=Object.create(null);for(let r of e)t[r.name]=r;return t});var tv=(0,Se.createSelector)([Wt,Ct],xp),vU=(0,Se.createSelector)(Vp,e=>{if(!e)return null;let t=new Map;for(let r of e)t.set(r.innerWindowID,r);return t}),wU=(0,Se.createSelector)(Vp,e=>{if(!e)return null;let t=new Map;for(let r of e)t.set(r.innerWindowID,r.tabID);return t}),qp=(0,Se.createSelector)(Wt,wU,(e,t)=>XS(e,t)),Pn=e=>iu(e).globalTracks,x5=(0,Se.createSelector)(Pn,e=>e.map((t,r)=>({type:"global",trackIndex:r}))),rv=(0,Se.createSelector)(Rt,Wt,(e,t)=>{if(!e.hasString("PreferenceRead"))return!1;let r=e.indexForString("PreferenceRead");return t.some(({markers:n})=>n.name.includes(r))});var Rn=e=>iu(e).localTracksByPid;var I5=(0,Se.createSelector)(Rn,e=>{let t=new Set;for(let[r,n]of e.entries())n.some(o=>o.type==="memory")&&t.add(r);return t}),v5=(0,Se.createSelector)(TU,Pn,Rn,(e,t,r)=>{if(e===null)return null;if(e.type==="global"){let s=t[e.trackIndex];return s.type==="process"?s.mainThreadIndex:null}let{pid:n,trackIndex:o}=e,i=W(r.get(n),"No local tracks found at that pid.")[o];return i.type==="thread"?i.threadIndex:null}),w5=(0,Se.createSelector)(Pn,Wt,(e,t)=>e.map(r=>Tx(r,t)));var k5=(0,Se.createSelector)(Rn,Wt,Ct,jp,(e,t,r,n)=>{let o=new Map;for(let[a,i]of e)o.set(a,i.map(s=>Sx(s,t,r,n||[])));return o});var _5=(0,Se.createSelector)(Pn,Rn,lo,Nn,(e,t,r,n)=>{let o=0,a=0;for(let[i,s]of t){let l=r.get(i)||new Set,c=e.findIndex(u=>u.type==="process"&&u.pid===i);if(c===-1)throw new Error("Unable to find a global track from the given pid.");if(!l)throw new Error("Unable to find the hidden local tracks from the given pid");n.has(c)?o+=s.length:o+=l.size,a+=s.length}return a+=e.length,o+=n.size,{hidden:o,total:a}}),lu=(0,Se.createSelector)(ge,hS),zp=(0,Se.createSelector)(ge,lu,(e,t)=>{let{threads:r}=e;return r.map(n=>xx(e,n,t))}),nv=(0,Se.createSelector)(ge,e=>{let{threads:t,meta:r}=e,{sampleUnits:n}=r;if(!n||!n.threadCPUDelta)return null;let o;switch(n.threadCPUDelta){case"\xB5s":o=1/1e3;break;case"ns":o=1/1e6;break;case"variable CPU cycles":return null;default:return null}return t.map(a=>{let{threadCPUDelta:i}=a.samples;return i?i.slice(1).reduce((l,c)=>l+(c??0),0)*o:0})}),ov=(0,Se.createSelector)(ge,su,Ns,lu,_r,(e,t,r,n,o)=>e.threads.map(a=>zc(a.samples,t,r,n,o))),kU=(0,Se.createSelector)(ov,e=>op(e)),_U=(0,Se.createSelector)(ov,pr,(e,t)=>op(e,t.start,t.end)),C5=(0,Se.createSelector)(kU,e=>{if(e===null||e.maxCpuRatio===0)return null;let t=Math.ceil(e.maxCpuRatio);return Wa([.05*t,.2*t,.4*t,.6*t,.8*t],e.cpuRatio,e.time)}),av=(0,Se.createSelector)(_U,e=>{if(e===null)return null;let t=Math.ceil(e.maxCpuRatio);return Wa([.05*t,.2*t,.4*t,.6*t,.8*t],e.cpuRatio,e.time)}),iv=(0,Se.createSelector)(Vp,vU,(e,t)=>{if(e===null||t===null||e.length===0)return null;let r=new Map;for(let n of e){let o=l=>{if(l.embedderInnerWindowID===0)return l;let c=t.get(l.embedderInnerWindowID);return c!==void 0?o(c):l},a=o(n),{tabID:i}=a,s=r.get(i);s===void 0?r.set(i,[n]):s.push(n)}return r}),E5=(0,Se.createSelector)(iv,e=>{if(e===null||e.size===0)return null;let t=new Map;for(let[r,n]of e)t.set(r,new Set(n.map(o=>o.innerWindowID)));return t}),CU=(0,Se.createSelector)(xU,e=>{if(!e)return null;let t=new Map;for(let r=0;r<e.length;r++)t.set(e.baseURL[r],e.name[r]);return t}),EU=(0,Se.createSelector)(iv,CU,jS),N5=(0,Se.createSelector)(EU,qp,zp,(e,t,r)=>{let n=[];for(let[o,a]of e.entries()){let i=0,s=t.get(o);if(s){for(let l of s.values()){let c=r[l];if(!c)throw new Error("Failed to find the thread score!");i+=c.boostedSampleScore}n.push({tabID:o,tabScore:i,pageData:a})}}return n.sort((o,a)=>a.tabScore-o.tabScore),n}),A5=(0,Se.createSelector)(Wt,e=>{let t=new Map;for(let r of e)t.set(r.tid,nr(e,r));return t}),P5=(0,Se.createSelector)(Wt,e=>{let t=new Map;for(let r of e)!r.isMainThread||!r.pid||t.set(r.pid,nr(e,r));return t}),sv=(0,Se.createSelector)(ge,e=>{let{threads:t,pages:r}=e;return r&&r.some(a=>a.isPrivateBrowsing)?!0:t.some(o=>o.isPrivateBrowsing)}),R5=(0,Se.createSelector)(Wt,e=>{let t=new Set;for(let{tid:r}of e)t.add(r);return t});var M5=(0,Se.createSelector)(ge,e=>e.meta.extra||[]),F5=(0,Se.createSelector)(An,Rt,so,(e,t,r)=>{if(r===null)return null;let n=e.filename[r];return n!==null?t.getString(n):null}),O5=(0,Se.createSelector)(An,so,(e,t)=>t!==null?e.id[t]:null),L5=(0,Se.createSelector)(An,so,(e,t)=>t!==null?e.startLine[t]:1);var oG=ce(Ir());var Ps=ce(Kt());var cu=ce(Kt());xe();var NU=e=>e.zippedProfiles;var Kp=e=>NU(e).zipFile,AU=e=>Kp(e).zip;var PU=(0,cu.createSelector)(AU,e=>e===null?null:kI(e)),lv=e=>W(PU(e),"Attempted to view a profile from a zip, when there is no zip file loaded."),U5=(0,cu.createSelector)(lv,_I),$5=(0,cu.createSelector)(lv,LI,(e,t)=>e===null?null:new nu(e,t));xe();cr();var uu=e=>e.app,Zp=e=>uu(e).view;var VU=e=>uu(e).trackThreadHeights;var jU=e=>uu(e).browserConnectionStatus,qU=(0,Ps.createSelector)(jU,e=>e.status==="ESTABLISHED"?e.browserConnection:null);var q5=(0,Ps.createSelector)(Pn,Rn,Nn,lo,VU,(e,t,r,n,o)=>{let a=20,i=1;for(let[l,c]of e.entries())if(!r.has(l))switch(c.type){case"screenshots":a+=50+i;break;case"visual-progress":case"perceptual-visual-progress":case"contentful-visual-progress":a+=40;break;case"process":{let{mainThreadIndex:u}=c;if(u===null)a+=30+i;else{let d=o[u];if(d===void 0)return null;a+=d+i}break}default:throw ae(c)}let s=new Set;for(let l of r){let c=e[l];c.type==="process"&&s.add(c.pid)}for(let[l,c]of t)if(!s.has(l)){for(let[u,d]of c.entries())if(!W(n.get(l),"Could not look up the hidden local tracks from the given PID").has(u))switch(d.type){case"thread":{let p=o[d.threadIndex];if(p===void 0)return null;a+=p+i}break;case"network":a+=35+i;break;case"memory":a+=40+i;break;case"bandwidth":a+=25+i;break;case"event-delay":a+=40+i;break;case"ipc":a+=25+i;break;case"process-cpu":case"power":a+=25+i;break;case"marker":a+=25+i;break;default:throw ae(d)}}return a}),z5=(0,Ps.createSelector)(Zp,OI,Kp,(e,t,r)=>{let n=e.phase,o=r.phase;return!(n==="INITIALIZING"&&t!=="none"||o==="PROCESS_PROFILE_FROM_ZIP_FILE")}),K5=(0,Ps.createSelector)(uu,e=>e.sidebarOpenCategories);var Gs=ce(Kt()),c_=ce(xa());var De=ce(Kt()),Uu=ce(xa()),jk=ce(Uf()),qk=ce(Cv());var wu=ce(Ir());var Ev=`data:image/svg+xml,<?xml version="1.0" encoding="utf-8"?>%0A<!-- This Source Code Form is subject to the terms of the Mozilla Public%0A - License, v. 2.0. If a copy of the MPL was not distributed with this%0A - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->%0A<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"%0A width="64" height="64" viewBox="0 0 64 64">%0A <defs>%0A <style>%0A .style-puzzle-piece {%0A fill: url('%23gradient-linear-puzzle-piece');%0A }%0A </style>%0A <linearGradient id="gradient-linear-puzzle-piece" x1="0%" y1="0%" x2="0%" y2="100%">%0A <stop offset="0%" stop-color="%2366cc52" stop-opacity="1"/>%0A <stop offset="100%" stop-color="%2360bf4c" stop-opacity="1"/>%0A </linearGradient>%0A </defs>%0A <path class="style-puzzle-piece" d="M42,62c2.2,0,4-1.8,4-4l0-14.2c0,0,0.4-3.7,2.8-3.7c2.4,0,2.2,3.9,6.7,3.9c2.3,0,6.2-1.2,6.2-8.2 c0-7-3.9-7.9-6.2-7.9c-4.5,0-4.3,3.7-6.7,3.7c-2.4,0-2.8-3.8-2.8-3.8V22c0-2.2-1.8-4-4-4H31.5c0,0-3.4-0.6-3.4-3 c0-2.4,3.8-2.6,3.8-7.1c0-2.3-1.3-5.9-8.3-5.9s-8,3.6-8,5.9c0,4.5,3.4,4.7,3.4,7.1c0,2.4-3.4,3-3.4,3H6c-2.2,0-4,1.8-4,4l0,7.8 c0,0-0.4,6,4.4,6c3.1,0,3.2-4.1,7.3-4.1c2,0,4,1.9,4,6c0,4.2-2,6.3-4,6.3c-4,0-4.2-4.1-7.3-4.1c-4.8,0-4.4,5.8-4.4,5.8L2,58 c0,2.2,1.8,4,4,4H19c0,0,6.3,0.4,6.3-4.4c0-3.1-4-3.6-4-7.7c0-2,2.2-4.5,6.4-4.5c4.2,0,6.6,2.5,6.6,4.5c0,4-3.9,4.6-3.9,7.7 c0,4.9,6.3,4.4,6.3,4.4H42z"/>%0A</svg>%0A`;xe();function Tu(e){let t=-1/0,r;for(let[n,o]of e)o>t&&(t=o,r=n);return r}var qa=class{_parentCol=[];_valueCol=[];_selfCol=[];_length=0;_headRoot=null;_headChild=[];_next=[];_nextNonCanonical=[];_canonicalIndex=[];extend(t,r){let n=t;if(t!==null){if(this._selfCol[t]===r)return t;n=this._canonicalIndex[t]}let o=this._getOrCreateCanonicalNode(n,r);return this._getOrCreateNodeWithCorrectSelf(o,r)}_getOrCreateCanonicalNode(t,r){return t!==null&&this._doesSetAlreadyContainValue(t,r)?t:this._findCanonicalSiblingWithValue(t,r)??this._createCanonicalNode(t,r)}_doesSetAlreadyContainValue(t,r){for(let n=t;n!==null;n=this._parentCol[n])if(this._valueCol[n]===r)return!0;return!1}_findCanonicalSiblingWithValue(t,r){let n=t!==null?this._headChild[t]:this._headRoot;for(let o=n,a=null;o!==null;a=o,o=this._next[o])if(this._valueCol[o]===r){if(o!==n){t!==null?this._headChild[t]=o:this._headRoot=o;let i=this._next[o];this._next[o]=n,a!==null&&(this._next[a]=i)}return o}return null}_getOrCreateNodeWithCorrectSelf(t,r){return this._findNodeWithCorrectSelf(t,r)??this._createNonCanonicalNode(t,r)}_findNodeWithCorrectSelf(t,r){for(let n=t;n!==null;n=this._nextNonCanonical[n])if(this._selfCol[n]===r)return n;return null}_createCanonicalNode(t,r){let n=t!==null?this._headChild[t]:this._headRoot,o=this._length++;return this._parentCol[o]=t,this._valueCol[o]=r,this._selfCol[o]=r,this._canonicalIndex[o]=o,this._nextNonCanonical[o]=null,this._headChild[o]=null,this._next[o]=n,t!==null?this._headChild[t]=o:this._headRoot=o,o}_createNonCanonicalNode(t,r){let n=this._length++;return this._parentCol[n]=this._parentCol[t],this._valueCol[n]=this._valueCol[t],this._selfCol[n]=r,this._canonicalIndex[n]=t,this._nextNonCanonical[n]=this._nextNonCanonical[t],this._nextNonCanonical[t]=n,this._headChild[n]=null,this._next[n]=null,n}finish(){return{parent:this._parentCol,self:this._selfCol,value:this._valueCol,length:this._length}}};function Su(e,t,r,n){let o=new qa,a=new Int32Array(e.length);for(let i=0;i<e.length;i++){let s=e.prefix[i],l=s!==null?a[s]:-1,c=e.frame[i],u=t.func[c],f=r.source[u]===n;if(l===-1&&!f)a[i]=-1;else{let p=f?t.line[c]??r.lineNumber[u]:null;a[i]=o.extend(l!==-1?l:null,p!==null?p:-1)}}return{stackIndexToLineSetIndex:a,lineSetTable:o.finish()}}var u$={totalLineHits:new Map,selfLineHits:new Map};function xu(e,t){if(e===null)return u$;let{stackIndexToLineSetIndex:r,lineSetTable:n}=e,o=new Float64Array(n.length);for(let l=0;l<t.length;l++){let c=t.stack[l];if(c===null)continue;let u=r[c];if(u!==-1){let d=t.weight?t.weight[l]:1;o[u]+=d}}let a=new Map,i=new Map,s=new Float64Array(n.length);for(let l=n.length-1;l>=0;l--){let c=o[l];if(c!==0){let p=n.self[l];if(p!==-1){let h=i.get(p)??0;i.set(p,h+c)}}let u=s[l],d=c+u,f=n.parent[l];if(f!==null&&(s[f]+=d),d!==0){let p=n.value[l];if(p!==-1){let h=a.get(p)??0;a.set(p,h+d)}}}return{totalLineHits:a,selfLineHits:i}}function Nv(e,t,r,n){let o=new Map;for(let a=0;a<e.length;a++){let i=e.stack[a];if(i===null)continue;let s=t[i];if(s===-1)continue;let l=r.line[s],c=l!==null?l:n;if(c===null)continue;let u=e.weight!==null?e.weight[a]:1;o.set(c,(o.get(c)??0)+u)}return o}function Iu(e,t,r,n){let o=new qa,a=new Int32Array(e.length);for(let i=0;i<e.length;i++){let s=e.prefix[i],l=s!==null?a[s]:-1,c=e.frame[i],d=t.nativeSymbol[c]===n;if(l===-1&&!d)a[i]=-1;else{let f=d?t.address[c]:-1;a[i]=o.extend(l!==-1?l:null,f)}}return{stackIndexToAddressSetIndex:a,addressSetTable:o.finish()}}var d$={totalAddressHits:new Map,selfAddressHits:new Map};function vu(e,t){if(e===null)return d$;let{stackIndexToAddressSetIndex:r,addressSetTable:n}=e,o=new Float64Array(n.length);for(let l=0;l<t.length;l++){let c=t.stack[l];if(c===null)continue;let u=r[c];if(u!==-1){let d=t.weight?t.weight[l]:1;o[u]+=d}}let a=new Map,i=new Map,s=new Float64Array(n.length);for(let l=n.length-1;l>=0;l--){let c=o[l];if(c!==0){let p=n.self[l];if(p!==-1){let h=i.get(p)??0;i.set(p,h+c)}}let u=s[l],d=c+u,f=n.parent[l];if(f!==null&&(s[f]+=d),d!==0){let p=n.value[l];if(p!==-1){let h=a.get(p)??0;a.set(p,h+d)}}}return{totalAddressHits:a,selfAddressHits:i}}function Av(e,t,r,n){if(n===null)return new Map;let o=new Map;for(let a=0;a<e.length;a++){let i=e.stack[a];if(i===null)continue;let s=t[i];if(s===-1||r.nativeSymbol[s]!==n)continue;let l=r.address[s];if(l===-1)continue;let c=e.weight!==null?e.weight[a]:1;o.set(l,(o.get(l)??0)+c)}return o}function Pv(e,t,r,n){let{stackTable:o,frameTable:a,funcTable:i,stringTable:s,resourceTable:l,nativeSymbols:c}=r,u=t.funcForNode(e),d=i.source[u],f=i.resource[u],p=f!==-1&&l.type[f]===1?l.lib[f]:null,h=kS(e,t,o),y=KS(h,a),b=null,m=ZS(n,h,a),g=Tu(m);g!==void 0&&(y.add(g),b=g);let T=[...y];T.sort((R,F)=>R-F),T.length!==0&&b===null&&(b=T[0]);let S=T.map(R=>JS(R,c,a,s)),I=i.lineNumber[u],v=Nv(n,h,a,I),w=Tu(v),k=Av(n,h,a,b),N=Tu(k);return{libIndex:p,sourceIndex:d,nativeSymbols:S,initialNativeSymbol:b!==null?T.indexOf(b):null,scrollToLineNumber:w,scrollToInstructionAddress:N,highlightedLineNumber:null,highlightedInstructionAddress:null}}function f$(e){try{let t=new URL("/favicon.ico",e);return t.protocol==="http:"&&(t.protocol="https:"),t.href}catch{return console.error("Error while extracing the favicon from the libname",e),null}}var rh=class{_callNodeInfo;_callNodeTable;_callTreeTimings;_callNodeHasChildren;constructor(t,r){this._callNodeInfo=t,this._callNodeTable=t.getCallNodeTable(),this._callTreeTimings=r,this._callNodeHasChildren=r.callNodeHasChildren}_getFirstChildIndex(t){return t===-1?this._callNodeTable.length!==0?0:-1:this._callNodeTable.subtreeRangeEnd[t]!==t+1?t+1:-1}createRoots(){return this.createChildren(-1)}createChildren(t){let r=this._getFirstChildIndex(t),n=[];for(let o=r;o!==-1;o=this._callNodeTable.nextSibling[o]){let a=this._callTreeTimings.total[o],i=this._callNodeHasChildren[o];(a!==0||i!==0)&&n.push(o)}return n.sort((o,a)=>Math.abs(this._callTreeTimings.total[a])-Math.abs(this._callTreeTimings.total[o])),n}hasChildren(t){return this._callNodeHasChildren[t]!==0}getSelfAndTotal(t){let r=this._callTreeTimings.self[t],n=this._callTreeTimings.total[t];return{self:r,total:n}}findHeaviestPathInSubtree(t){let r=this._callNodeTable.subtreeRangeEnd[t],n=-1,o=0;for(let a=t;a<r;a++){let i=Math.abs(this._callTreeTimings.self[a]);(n===-1||i>o)&&(n=a,o=i)}return this._callNodeInfo.getCallNodePathFromIndex(n)}},nh=class{_timings;constructor(t){this._timings=t}hasChildren(t){return!1}createChildren(t){return[]}createRoots(){return this._timings.sortedFuncs}getSelfAndTotal(t){return{self:this._timings.funcSelf[t],total:this._timings.funcTotal[t]}}findHeaviestPathInSubtree(t){throw new Error("unexpected call to findHeaviestPathInSubtree in CallTreeInternalFunctionList")}},oh=class{_callNodeInfo;_callNodeTable;_callNodeSelf;_rootNodes;_totalPerRootFunc;_hasChildrenPerRootFunc;_totalAndHasChildrenPerNonRootNode=new Map;constructor(t,r){this._callNodeInfo=t,this._callNodeTable=t.getCallNodeTable(),this._callNodeSelf=r.callNodeSelf;let{sortedRoots:n,totalPerRootFunc:o,hasChildrenPerRootFunc:a}=r;this._totalPerRootFunc=o,this._hasChildrenPerRootFunc=a,this._rootNodes=n}createRoots(){return this._rootNodes}hasChildren(t){return this._callNodeInfo.isRoot(t)?this._hasChildrenPerRootFunc[t]!==0:this._getTotalAndHasChildren(t).hasChildren}createChildren(t){if(!this.hasChildren(t))return[];let r=this._callNodeInfo.getChildren(t).filter(n=>{let{total:o,hasChildren:a}=this._getTotalAndHasChildren(n);return o!==0||a});return r.sort((n,o)=>Math.abs(this._getTotalAndHasChildren(o).total)-Math.abs(this._getTotalAndHasChildren(n).total)),r}getSelfAndTotal(t){if(this._callNodeInfo.isRoot(t)){let n=this._totalPerRootFunc[t];return{self:n,total:n}}let{total:r}=this._getTotalAndHasChildren(t);return{self:0,total:r}}_getTotalAndHasChildren(t){if(this._callNodeInfo.isRoot(t))throw new Error("This function should not be called for roots");let r=this._totalAndHasChildrenPerNonRootNode.get(t);if(r!==void 0)return r;let n=Mv(t,this._callNodeInfo,this._callNodeSelf);return this._totalAndHasChildrenPerNonRootNode.set(t,n),n}findHeaviestPathInSubtree(t){let[r,n]=this._callNodeInfo.getSuffixOrderIndexRangeForCallNode(t),o=this._callNodeInfo.getSuffixOrderedCallNodes(),a=-1,i=0;for(let l=r;l<n;l++){let c=o[l],u=Math.abs(this._callNodeSelf[c]);(a===-1||u>i)&&(a=c,i=u)}let s=[];for(let l=a;l!==-1;l=this._callNodeTable.prefix[l])s.push(this._callNodeTable.func[l]);return s}},Ms=class{_categories;_internal;_callNodeInfo;_thread;_previewFilteredCtssSamples;_rootTotalSummary;_displayDataByIndex;_children;_roots;_isHighPrecision;_weightType;constructor(t,r,n,o,a,i,s,l){this._categories=r,this._internal=a,this._callNodeInfo=n,this._thread=t,this._previewFilteredCtssSamples=o,this._rootTotalSummary=i,this._displayDataByIndex=new Map,this._children=[],this._roots=a.createRoots(),this._isHighPrecision=s,this._weightType=l}getTotal(){return this._rootTotalSummary}getRoots(){return this._roots}getChildren(t){let r=this._children[t];return r===void 0&&(r=this._internal.createChildren(t),this._children[t]=r),r}hasChildren(t){return this._internal.hasChildren(t)}_addDescendantsToSet(t,r){for(let n of this.getChildren(t))r.add(n),this._addDescendantsToSet(n,r)}getAllDescendants(t){let r=new Set;return this._addDescendantsToSet(t,r),r}getParent(t){return this._callNodeInfo.prefixForNode(t)}getDepth(t){return this._callNodeInfo.depthForNode(t)}getNodeData(t){let r=this._callNodeInfo.funcForNode(t),n=this._thread.stringTable.getString(this._thread.funcTable.name[r]),{self:o,total:a}=this._internal.getSelfAndTotal(t),i=a/this._rootTotalSummary,s=o/this._rootTotalSummary;return{funcName:n,total:a,totalRelative:i,self:o,selfRelative:s}}_getInliningBadge(t,r){let n=_s(r),o=this._callNodeInfo.sourceFramesInlinedIntoSymbolForNode(t);if(o===-2)return;if(o===-1)return{name:"divergent-inlining",vars:{calledFunction:n},localizationId:"CallTree--divergent-inlining-badge",contentFallback:"",titleFallback:`Some calls to ${n} were inlined by the compiler.`};let a=_s(this._thread.stringTable.getString(this._thread.nativeSymbols.name[o]));return{name:"inlined",vars:{calledFunction:n,outerFunction:a},localizationId:"CallTree--inlining-badge",contentFallback:"(inlined)",titleFallback:`Calls to ${n} were inlined into ${a} by the compiler.`}}getDisplayData(t){let r=this._displayDataByIndex.get(t);if(r===void 0){let{funcName:n,total:o,totalRelative:a,self:i}=this.getNodeData(t),s=this._callNodeInfo.funcForNode(t),l=this._callNodeInfo.categoryForNode(t),c=this._callNodeInfo.subcategoryForNode(t),u=this._getInliningBadge(t,n),d=this._thread.funcTable.resource[s],f=this._thread.resourceTable.type[d],p=d===-1,h=this._getOriginAnnotation(s),y=this._weightType,b=null,m=null;if(f===3)m=b=f$(h);else if(f===2){b=Ev;let k=this._thread.resourceTable.name[d];m=this._thread.stringTable.getString(k)}let g=fp(y,this._isHighPrecision,o),T=fp(y,this._isHighPrecision,i),S=`${Yc(a)}`,I,v,w;switch(y){case"tracing-ms":{v=`${g}ms`,w=`${T}ms`,I=wu.oneLine`
648
+ `),null;n.add(i)}return n}default:return e}},pB=(e="",t)=>t.type==="CHANGE_CALL_TREE_SEARCH_STRING"?t.searchString:e,hB=(e="",t)=>t.type==="CHANGE_MARKER_SEARCH_STRING"?t.searchString:e,mB=(e="",t)=>t.type==="CHANGE_NETWORK_SEARCH_STRING"?t.searchString:e,gB=(e={},t)=>{switch(t.type){case"PROFILE_LOADED":return t.transformStacks||e;case"ADD_TRANSFORM_TO_STACK":{let{threadsKey:r,transform:n}=t,o=e[r]||[];return Object.assign({},e,{[r]:[...o,n]})}case"POP_TRANSFORMS_FROM_STACK":{let{threadsKey:r,firstPoppedFilterIndex:n}=t,o=e[r]||[];return Object.assign({},e,{[r]:o.slice(0,n)})}case"SANITIZED_PROFILE_PUBLISHED":{let{translationMaps:r}=t;if(!r)return e;let n={};for(let[o,a]of ps(e)){let i=r.oldThreadIndexToNew?JS(o,r.oldThreadIndexToNew):o;i!==null&&(n[i]=Fp(a,r))}return n}default:return e}},yB=(e="cpu-category",t)=>{switch(t.type){case"CHANGE_TIMELINE_TYPE":return t.timelineType;case"VIEW_FULL_PROFILE":return t.timelineType!==null?t.timelineType:e;default:return e}},bB=(e="combined",t)=>{switch(t.type){case"PROFILE_LOADED":return t.implementationFilter||e;case"CHANGE_IMPLEMENTATION_FILTER":return t.implementation;default:return e}},TB=(e="timing",t)=>t.type==="CHANGE_CALL_TREE_SUMMARY_STRATEGY"?t.callTreeSummaryStrategy:e,SB=(e=!1,t)=>t.type==="CHANGE_INVERT_CALLSTACK"?t.invertCallstack:e,xB=(e=!1,t)=>t.type==="CHANGE_SHOW_USER_TIMINGS"?t.showUserTimings:e,IB=(e=!1,t)=>t.type==="CHANGE_STACK_CHART_SAME_WIDTHS"?t.stackChartSameWidths:e,vB=(e=!1,t)=>t.type==="CHANGE_SHOW_JS_TRACER_SUMMARY"?t.showSummary:e,wB=(e=[],t)=>{var r;switch(t.type){case"VIEW_FULL_PROFILE":case"CHANGE_GLOBAL_TRACK_ORDER":case"CHANGE_TAB_FILTER":return t.globalTrackOrder;case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?[]:e;default:return e}},kB=(e=new Set,t)=>{var r;switch(t.type){case"VIEW_FULL_PROFILE":case"ISOLATE_LOCAL_TRACK":case"ISOLATE_PROCESS":case"ISOLATE_PROCESS_MAIN_THREAD":case"ISOLATE_SCREENSHOT_TRACK":case"CHANGE_TAB_FILTER":return t.hiddenGlobalTracks;case"HIDE_GLOBAL_TRACK":{let n=new Set(e);return n.add(t.trackIndex),n}case"SHOW_ALL_TRACKS":return new Set;case"SHOW_PROVIDED_TRACKS":{let n=new Set(e);return t.globalTracksToShow.forEach(Set.prototype.delete,n),n}case"SHOW_GLOBAL_TRACK":case"SHOW_GLOBAL_TRACK_INCLUDING_LOCAL_TRACKS":{let n=new Set(e);return n.delete(t.trackIndex),n}case"HIDE_PROVIDED_TRACKS":{let n=new Set(e);return t.globalTracksToHide.forEach(Set.prototype.add,n),n}case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?new Set:e;default:return e}},_B=(e=new Map,t)=>{var r;switch(t.type){case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return t.hiddenLocalTracksByPid;case"HIDE_LOCAL_TRACK":{let n=new Map(e),o=new Set(n.get(t.pid));return o.add(t.trackIndex),n.set(t.pid,o),n}case"SHOW_ALL_TRACKS":{let n=new Map(e);for(let o of n)n.set(o[0],new Set);return n}case"SHOW_PROVIDED_TRACKS":{let n=new Map(e);for(let[o,a]of t.localTracksByPidToShow.entries()){let i=e.get(o)??new Set,s=new Set(i);a.forEach(Set.prototype.delete,s),n.set(o,s)}return n}case"SHOW_LOCAL_TRACK":{let n=new Map(e),o=new Set(n.get(t.pid));return o.delete(t.trackIndex),n.set(t.pid,o),n}case"SHOW_GLOBAL_TRACK_INCLUDING_LOCAL_TRACKS":{let n=new Map(e);return n.set(t.pid,new Set),n}case"HIDE_PROVIDED_TRACKS":{let n=new Map(e);for(let[o,a]of t.localTracksByPidToHide.entries()){let i=e.get(o)??new Set,s=new Set(i);a.forEach(Set.prototype.add,s),n.set(o,s)}return n}case"ISOLATE_PROCESS_MAIN_THREAD":case"ISOLATE_LOCAL_TRACK":{let n=new Map(e);return n.set(t.pid,t.hiddenLocalTracks),n}case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?new Map:e;default:return e}},CB=(e=new Map,t)=>{var r;switch(t.type){case"VIEW_FULL_PROFILE":case"ENABLE_EVENT_DELAY_TRACKS":case"ENABLE_EXPERIMENTAL_PROCESS_CPU_TRACKS":case"CHANGE_TAB_FILTER":return t.localTrackOrderByPid;case"CHANGE_LOCAL_TRACK_ORDER":{let n=new Map(e);return n.set(t.pid,t.localTrackOrder),n}case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?new Map:e;default:return e}},EB=(e=new Set,t)=>{var r;switch(t.type){case"CHANGE_LOCAL_TRACK_ORDER":{let n=new Set(e);return n.add(t.pid),n}case"SANITIZED_PROFILE_PUBLISHED":return(r=t.translationMaps)!=null&&r.oldThreadIndexToNew?new Set:e;default:return e}},NB=(e=null,t)=>t.type==="CHANGE_TAB_FILTER"?t.tabID:e,AB=(e=null,t)=>{switch(t.type){case"PROCESS_PROFILE_FROM_ZIP_FILE":return t.pathInZipFile?t.pathInZipFile:null;case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"RETURN_TO_ZIP_FILE_LIST":return null;default:return e}},PB=(e=null,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"CHANGE_PROFILE_NAME":return t.profileName;default:return e}},RB=(e={scrollGeneration:0,libIndex:null,sourceIndex:null,highlightedLine:null},t)=>{switch(t.type){case"UPDATE_BOTTOM_BOX":return{scrollGeneration:t.scrollToLineNumber!==void 0?e.scrollGeneration+1:e.scrollGeneration,libIndex:t.libIndex,sourceIndex:t.sourceIndex,scrollToLineNumber:t.scrollToLineNumber,highlightedLine:t.highlightedLineNumber};case"SANITIZED_PROFILE_PUBLISHED":{if(!t.translationMaps||e.sourceIndex===null)return e;let r=t.translationMaps.oldSourceToNewSourcePlusOne[e.sourceIndex];return{...e,sourceIndex:r!==0?r-1:null}}default:return e}},MB=(e={isOpen:!1,scrollGeneration:0,highlightedInstruction:null,nativeSymbols:[],currentNativeSymbol:null},t)=>{switch(t.type){case"UPDATE_BOTTOM_BOX":{let{nativeSymbols:r,currentNativeSymbol:n,shouldOpenAssemblyView:o}=t,a=t.scrollToInstructionAddress!==void 0,i=n!==null&&n<r.length?n:null;return{scrollGeneration:a?e.scrollGeneration+1:e.scrollGeneration,nativeSymbols:r,currentNativeSymbol:i,isOpen:e.isOpen||o,scrollToInstructionAddress:t.scrollToInstructionAddress,highlightedInstruction:t.highlightedInstructionAddress}}case"OPEN_ASSEMBLY_VIEW":return{...e,isOpen:!0};case"CHANGE_ASSEMBLY_VIEW_NATIVE_SYMBOL_ENTRY_INDEX":return{...e,currentNativeSymbol:t.entryIndex};case"CLOSE_ASSEMBLY_VIEW":return{...e,isOpen:!1};default:return e}};function FB(){let e={};return ro.forEach(t=>e[t]=!1),e}var OB=(e=FB(),t)=>{switch(t.type){case"UPDATE_BOTTOM_BOX":{let{currentTab:r,shouldOpenBottomBox:n}=t;return n&&!e[r]?{...e,[r]:!0}:e}case"CLOSE_BOTTOM_BOX_FOR_TAB":{let{tab:r}=t;return e[r]?{...e,[r]:!1}:e}default:return e}},LB=(e=null)=>e,DB=(e={},t)=>{if(t.type==="CHANGE_SELECTED_MARKER"){let{threadsKey:r,selectedMarker:n}=t;return{...e,[r]:n}}else return e},DI=_t({selectedThreads:fB,implementation:bB,lastSelectedCallTreeSummaryStrategy:TB,invertCallstack:SB,showUserTimings:xB,stackChartSameWidths:IB,committedRanges:dB,callTreeSearchString:pB,markersSearchString:hB,networkSearchString:mB,transforms:gB,sourceView:RB,assemblyView:MB,isBottomBoxOpenPerPanel:OB,timelineType:yB,globalTrackOrder:wB,hiddenGlobalTracks:kB,hiddenLocalTracksByPid:_B,localTrackOrderByPid:CB,localTrackOrderChangedPids:EB,showJsTracerSummary:vB,tabFilter:NB,selectedMarkers:DB,legacyThreadOrder:(e=null)=>e,legacyHiddenThreads:(e=null)=>e}),BB=e=>(t,r)=>{switch(r.type){case"UPDATE_URL_STATE":return r.newUrlState?r.newUrlState:e(void 0,r);case"RETURN_TO_ZIP_FILE_LIST":case"WAITING_FOR_PROFILE_FROM_FILE":return{...e(t,r),profileSpecific:DI(void 0,r),selectedTab:LI(void 0,r)};default:return e(t,r)}},UB=BB(_t({dataSource:sB,hash:lB,profileUrl:cB,profilesToCompare:uB,selectedTab:LI,pathInZipFile:AB,profileSpecific:DI,profileName:PB,symbolServerUrl:LB})),au=UB;function $B(e){if(e){let r=/[\d.]+$/.exec(e);if(r)return r[0]}return""}function Up(e){return e.endsWith(".0")?e.slice(0,-2):e}function GB(e){let t=e.product||"",r=Up($B(e.misc));return t+(r?" "+r:"")}function WB(e){switch(e.toolkit){case"android":return e.platform?Up(e.platform):"Android";case"cocoa":return e.oscpu?e.oscpu.replace(/^Intel /,"").replace(/^Mac OS X/,"macOS"):"macOS";case"windows":return e.oscpu?Up(e.oscpu.replace(/;.*$/,"").replace(/ NT/,"")):"Windows";case"gtk":case"gtk3":return e.oscpu?e.oscpu.slice(0,e.oscpu.indexOf(" ")):"Linux";default:return e.oscpu||""}}function BI(e){let t=GB(e),r=WB(e);return t+(r?` \u2013 ${r}`:"")}var io=e=>e.urlState,vt=e=>io(e).profileSpecific,UI=e=>io(e).dataSource;var $I=e=>io(e).profileUrl;var GI=e=>io(e).profileName,dr=e=>vt(e).committedRanges,$p=e=>vt(e).implementation,WI=e=>vt(e).lastSelectedCallTreeSummaryStrategy;var so=e=>vt(e).sourceView.sourceIndex;var $a=e=>{let{nativeSymbols:t,currentNativeSymbol:r}=vt(e).assemblyView;return r!==null?t[r]:null};var Gp=e=>vt(e).callTreeSearchString,HB=e=>vt(e).markersSearchString,VB=e=>vt(e).networkSearchString,Ga=e=>io(e).selectedTab,Es=e=>Ga(e)==="calltree"&&vt(e).invertCallstack,Wp=e=>vt(e).selectedThreads,Je=e=>W(Wp(e),"Attempted to get a thread index before a profile was loaded.");var HI=e=>vt(e).legacyThreadOrder,VI=e=>vt(e).legacyHiddenThreads,Hp=e=>vt(e).globalTrackOrder,Nn=e=>vt(e).hiddenGlobalTracks,lo=e=>vt(e).hiddenLocalTracksByPid,jI=e=>vt(e).localTrackOrderByPid,qI=e=>vt(e).tabFilter;var Vp=(0,kr.createSelector)(Gp,Mo),jB=(0,kr.createSelector)(HB,Mo),qB=(0,kr.createSelector)(VB,Mo),J8=(0,kr.createSelector)(Vp,Fo),zI=(0,kr.createSelector)(jB,_s),KI=(0,kr.createSelector)(qB,_s),zB=[],$o=(e,t)=>vt(e).transforms[t]||zB,ZI=(e,t)=>vt(e).selectedMarkers[t]??null;var Y8=(0,kr.createSelector)(io,e=>t=>{let n=(Array.isArray(t)?t:[t]).reduce(au,e);return Op(n)}),KB=e=>io(e).pathInZipFile,ZB=e=>{let{profile:t}=e.profileView;return t?BI(t.meta):null},JI=(0,kr.createSelector)(KB,e=>e?PI(e):null),YI=(0,kr.createSelector)(GI,JI,ZB,(e,t,r)=>e||t||r||"Untitled profile"),X8=(0,kr.createSelector)(GI,JI,(e,t)=>e||t||"");function JB(e){try{let t=new URL(e);return oo(t)?!0:["symbols.mozilla.org","symbolication.services.mozilla.com"].includes(t.hostname)?t.protocol!=="https:"?(console.error(`HTTPS is required for non-localhost symbol servers. Rejecting ${e} and defaulting to ${Ao}.`),!1):!0:(console.error(`The symbol server URL was not in the list of allowed domains. Rejecting ${e} and defaulting to ${Ao}.`),!1)}catch(t){return console.error(`The symbol server URL was not valid. Rejecting ${e} and defaulting to ${Ao}.`,t),!1}}var XI=(0,kr.createSelector)(io,({symbolServerUrl:e})=>!e||!JB(e)?Ao:e.endsWith("/")?e.slice(0,-1):e);function QI(e,t,r,n,o,a=0,i=t.length-1){let s=a;for(;;){let l=i;for(;s<l&&t[s+1]<e;)s++;for(;s<l&&t[l]<e;)l--;if(s===l)break;let c=r[s],u=0,d=s+1,f=e,p=0,h=c;for(let y=s+1;y<=l;y++){let b=r[y],g=b-h;if(u+=t[y]*g,b>c){let m=u/(b-c);m>=e&&(d=y,f=m,p=u)}h=b}n.push({start:s,end:d,avg:f,sum:p,parent:o}),s=d}}function Ha(e,t,r,n=0,o=t.length-1){let a=e[0],i=new Array;QI(a,t,r,i,null,n,o);for(let s=0;s<i.length;s++){let l=i[s],c=e.find(u=>u>l.avg);c!==void 0&&QI(c,t,r,i,s,l.start,l.end)}return{slices:i,time:r}}xe();nr();nr();var Go=class e extends Error{library;errors;constructor(t,r,...n){super([t,...n.map(o=>` - ${o.name}: ${o.message}`)].join(`
649
+ `)),this.__proto__=e.prototype,this.name="SymbolsNotFoundError",this.library=r,this.errors=n}};ur();function YB(e){let t=new Map,r=new Set;for(let[n,o]of e){if(r.has(n))continue;let a=t.get(n);if(a===void 0){t.set(n,o);continue}a!==o&&(t.delete(n),r.add(n))}return t}function XB(e,t){let{frameTable:r,funcTable:n,nativeSymbols:o,resourceTable:a}=e,i=new Map;for(let s=0;s<a.length;s++){if(a.type[s]!==1)continue;let c=a.lib[s];if(c===null)continue;let u=t[c];if(u===void 0)throw new Error("Did not find a lib.");let d=new Set;for(let b=0;b<n.length;b++)n.resource[b]===s&&d.add(b);let f=new Set;for(let b=0;b<o.length;b++)o.libIndex[b]===c&&f.add(b);let p=[],h=[];for(let b=0;b<r.length;b++){let g=r.func[b];n.resource[g]===s&&(p.push(b),h.push(r.address[b]))}let y=`${u.debugName}/${u.breakpadId}`;i.set(y,{libIndex:c,resourceIndex:s,allFuncsForThisLib:d,allNativeSymbolsForThisLib:f,allFramesForThisLib:p,frameAddresses:h})}return i}function QB(e){let t=new Map;for(let[r,{frameAddresses:n}]of e){let o=t.get(r);o===void 0&&(o=new Set,t.set(r,o));for(let a of n)o.add(a)}return Array.from(t).map(([r,n])=>{let[o,a]=r.split("/");return{lib:{debugName:o,breakpadId:a},addresses:n}})}function eU(e,t,r,n){let o=e.get(r);if(o===void 0)return;n({libSymbolicationInfo:o,resultsForLib:t})}function tU(e,t,r){if(r.size===0)return null;let n=nn(),o=new Int32Array(e.length);for(let a=0;a<e.length;a++){let i=e.frame[a],s=e.prefix[a],l=s===null?-1:o[s];if(t[i]!==0){o[a]=l;continue}let c=r.get(i);c===void 0&&(c=[i]);let u=l!==-1?l:null;for(let d=0;d<c.length;d++){let f=c[d],p=n.length;n.frame.push(f),n.prefix.push(u),n.length++,u=p}o[a]=u??-1}return{newStackTable:n,oldStackToNewStack:o}}function iu(e,t,r){let n=new Map,o=t.frameTable.length,a=new Uint8Array(o),i=new Map,s=t;for(let f of r)s=rU(s,f,n,a,i);let l=tU(s.stackTable,a,i);if(l===null)return{threads:e,shared:s,oldFuncToNewFuncsMap:n};let{newStackTable:c,oldStackToNewStack:u}=l;return s={...s,stackTable:c},{threads:ap(e,f=>{if(f===null)return null;let p=u[f];return p!==-1?p:null}),shared:s,oldFuncToNewFuncsMap:n}}function rU(e,t,r,n,o){let{frameTable:a,funcTable:i,nativeSymbols:s,stringArray:l,sources:c}=e,u=$e.withBackingArray(l),{libSymbolicationInfo:d,resultsForLib:f}=t,{resourceIndex:p,allFramesForThisLib:h,allFuncsForThisLib:y,allNativeSymbolsForThisLib:b,libIndex:g}=d,m=new Set(y),T=new Set(b),S=new Map,I=new Map,v=new Map,w=[],k=[];for(let A of h)a.inlineDepth[A]>0?(w.push(A),n[A]=1):k.push(A);for(let A of k){let M=a.nativeSymbol[A],P=a.address[A],$=f.get(P);if($===void 0)if(M!==null){let H=u.getString(s.name[M]);$={symbolAddress:s.address[M],name:H}}else $={symbolAddress:P,name:`0x${P.toString(16)}`};let J=$.symbolAddress;if(S.set(A,J),I.set(J,$),M!==null&&!v.has(J)&&T.has(M)){let H=M;T.delete(H),v.set(J,H)}}let E=T.values(),R=aS(s);for(let[A,M]of I){let P=u.indexForString(M.name),$=v.get(A);$===void 0&&($=E.next().value,$===void 0&&($=R.length,R.libIndex[$]=g,R.length++),v.set(A,$)),R.address[$]=A,R.name[$]=P,R.functionSize[$]=M.functionSize??null}let F=a.nativeSymbol.slice();for(let[A,M]of S){let P=v.get(M);if(P===void 0)throw new Error("Impossible, all symbolAddresses have a canonical symbol at this point.");F[A]=P}let G=Lc({...a,nativeSymbol:F}),B=Na(i),Z=m.values(),X=new Map,_e=w.values(),D=[];for(let A of k){let M=a.func[A],P=F[A];if(P===null)throw new Error("Impossible, all frames now have native symbols.");let $=a.address[A],J=f.get($);if(J===void 0){let de=R.name[P],ue=null,fe=B.source[M];fe!==null&&(ue=c.filename[fe]),J={symbolAddress:R.address[P],name:u.getString(de),file:ue!==null?u.getString(ue):void 0,line:a.line[A]??void 0}}let H=J.inlines?J.inlines.slice():[];H.push({name:J.name,file:J.file,line:J.line}),H.reverse();let z=[],se=[];for(let de=0;de<H.length;de++){let ue=H[de],fe=u.indexForString(ue.name),be=ue.file!==void 0?u.indexForString(ue.file):null,V=`${fe}:${be??""}`,te=X.get(V);if(te===void 0){if(te=Z.next().value,te===void 0&&(te=B.length,B.isJS[te]=B.isJS[M],B.relevantForJS[te]=B.relevantForJS[M],B.resource[te]=p,B.source[te]=null,B.lineNumber[te]=null,B.columnNumber[te]=null,B.length++),B.name[te]=fe,be!==null){let Q=null;for(let Te=0;Te<c.filename.length;Te++)if(c.filename[Te]===be&&c.id[Te]===null){Q=Te;break}Q===null&&(Q=c.filename.length,c.filename.push(be),c.id.push(null),c.startLine.push(1),c.startColumn.push(1),c.sourceMapURL.push(null),c.length++),B.source[te]=Q}else B.source[te]=null;X.set(V,te)}se.push(te);let q;if(de===0)q=A;else{q=_e.next().value,q===void 0&&(q=G.length,G.length++);let Q=G.category[A],Te=G.subcategory[A],Ne=G.innerWindowID[A];G.category[q]=Q,G.subcategory[q]=Te,G.innerWindowID[q]=Ne,G.address[q]=$,G.nativeSymbol[q]=P}G.inlineDepth[q]=de,G.func[q]=te,G.line[q]=ue.line??null,G.column[q]=null,z.push(q)}z.length>1&&o.set(A,z),D.push([M,se.join("#")])}let re=YB(D);for(let[A,M]of re)r.set(A,M.split("#").map(P=>+P));return{...e,frameTable:G,funcTable:B,nativeSymbols:R}}async function su(e,t,r,n){let o=XB(e.shared,e.libs),a=QB(o);await t.getSymbols(a,(i,s)=>{let{debugName:l,breakpadId:c}=i,u=`${l}/${c}`;eU(o,s,u,r)},(i,s)=>{if(!(s instanceof Go))throw s;console.warn(s)},n)}function Va(e,t){return t.reduce((r,n)=>{let o=e.get(n);return o===void 0?[...r,n]:[...r,...o]},[])}function jp(e,t){let r=[];for(let n of t){let o=Va(e,n);r.push(o);let a=n[n.length-1],s=Va(e,[a]).length;if(s>1)for(let l=1;l<s;l++)r.push(o.slice(0,o.length-l))}return new $t(r)}xe();var nU=(e=null,t)=>{switch(t.type){case"PROFILE_LOADED":return t.profile;case"BULK_SYMBOLICATION":{if(e===null)throw new Error("Assumed that a profile would be loaded in time for a coalesced functions update.");if(!e.threads.length)return e;let{symbolicatedShared:r,symbolicatedThreads:n}=t;return{...e,shared:r,threads:n}}case"DONE_SYMBOLICATING":{if(e===null)throw new Error("Strangely we're done symbolicating a non-existent profile.");return{...e,meta:{...e.meta,symbolicated:!0}}}case"UPDATE_PAGES":{if(e===null)throw new Error("We tried to update the pages information for a non-existent profile.");let{newPages:r}=t;return{...e,pages:r}}default:return e}},oU=(e=[],t)=>{switch(t.type){case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return t.globalTracks;default:return e}},aU=(e=new Map,t)=>{switch(t.type){case"VIEW_FULL_PROFILE":case"ENABLE_EVENT_DELAY_TRACKS":case"ENABLE_EXPERIMENTAL_PROCESS_CPU_TRACKS":case"CHANGE_TAB_FILTER":return t.localTracksByPid;default:return e}},iU=(e="DONE",t)=>{switch(t.type){case"START_SYMBOLICATING":return"SYMBOLICATING";case"DONE_SYMBOLICATING":return"DONE";default:return e}},qp={selectedNonInvertedCallNodePath:[],selectedInvertedCallNodePath:[],expandedNonInvertedCallNodePaths:new $t,expandedInvertedCallNodePaths:new $t,selectedNetworkMarker:null,lastSeenTransformCount:0};function lu(e,t){let r=e[t];return r||qp}function ja(e,t,r){let n={...e};return n[t]={...lu(e,t),...r},n}var sU=(e={},t)=>{switch(t.type){case"PROFILE_LOADED":return{};case"BULK_SYMBOLICATION":{let{oldFuncToNewFuncsMap:r}=t;return Bc(e,o=>({...o,selectedNonInvertedCallNodePath:Va(r,o.selectedNonInvertedCallNodePath),selectedInvertedCallNodePath:Va(r,o.selectedInvertedCallNodePath),expandedNonInvertedCallNodePaths:jp(r,o.expandedNonInvertedCallNodePaths),expandedInvertedCallNodePaths:jp(r,o.expandedInvertedCallNodePaths)}))}case"CHANGE_SELECTED_CALL_NODE":{let{isInverted:r,selectedCallNodePath:n,threadsKey:o,optionalExpandedToCallNodePath:a}=t,i=lu(e,o),s=r?i.selectedInvertedCallNodePath:i.selectedNonInvertedCallNodePath;if(lS(n,s)&&!a)return e;let l=r?i.expandedInvertedCallNodePaths:i.expandedNonInvertedCallNodePaths,c=a||n,u=[];for(let f=1;f<c.length;f++)u.push(c.slice(0,f));return u.some(f=>!l.has(f))&&(l=new $t(l),u.forEach(f=>l.add(f))),ja(e,o,r?{selectedInvertedCallNodePath:n,expandedInvertedCallNodePaths:l}:{selectedNonInvertedCallNodePath:n,expandedNonInvertedCallNodePaths:l})}case"CHANGE_INVERT_CALLSTACK":{let{newSelectedCallNodePath:r,selectedThreadIndexes:n,invertCallstack:o}=t;return Bc(e,(a,i)=>{if(i===ut(n).toString()){let s=new $t;for(let l=1;l<r.length;l++)s.add(r.slice(0,l));return o?{...a,selectedInvertedCallNodePath:r,expandedInvertedCallNodePaths:s}:{...a,selectedNonInvertedCallNodePath:r,expandedNonInvertedCallNodePaths:s}}return a})}case"CHANGE_EXPANDED_CALL_NODES":{let{threadsKey:r,isInverted:n}=t,o=new $t(t.expandedCallNodePaths);return ja(e,r,n?{expandedInvertedCallNodePaths:o}:{expandedNonInvertedCallNodePaths:o})}case"CHANGE_SELECTED_NETWORK_MARKER":{let{threadsKey:r,selectedNetworkMarker:n}=t;return ja(e,r,{selectedNetworkMarker:n})}case"ADD_TRANSFORM_TO_STACK":{let{threadsKey:r,transform:n,transformedThread:o,callNodeInfo:a}=t,i=function(h){return new $t(Array.from(h).map(y=>Rp(y,n,o,a)).filter(y=>y.length>0))},s=function(h){return Rp(h,n,o,a)},l=lu(e,r),c=s(l.selectedNonInvertedCallNodePath),u=s(l.selectedInvertedCallNodePath),d=i(l.expandedNonInvertedCallNodePaths),f=i(l.expandedInvertedCallNodePaths),p=l.lastSeenTransformCount+1;return ja(e,r,{selectedNonInvertedCallNodePath:c,selectedInvertedCallNodePath:u,expandedNonInvertedCallNodePaths:d,expandedInvertedCallNodePaths:f,lastSeenTransformCount:p})}case"POP_TRANSFORMS_FROM_STACK":{let{threadsKey:r}=t;return ja(e,r,{selectedNonInvertedCallNodePath:[],selectedInvertedCallNodePath:[],expandedNonInvertedCallNodePaths:new $t,expandedInvertedCallNodePaths:new $t,lastSeenTransformCount:0})}case"UPDATE_URL_STATE":{if(!t.newUrlState)return e;let{transforms:r}=t.newUrlState.profileSpecific;return Bc(e,(n,o)=>{let i=(r[o]||[]).length,s=n.lastSeenTransformCount;return i<s?{...n,selectedNonInvertedCallNodePath:[],selectedInvertedCallNodePath:[],expandedNonInvertedCallNodePaths:new $t,expandedInvertedCallNodePaths:new $t,lastSeenTransformCount:i}:n})}case"CHANGE_IMPLEMENTATION_FILTER":{let{transformedThread:r,threadsKey:n,previousImplementation:o,implementation:a}=t;if(o===a)return e;let i=lu(e,n),s=function(h){return a==="combined"?h=Mp(r,o,h):(o!=="combined"&&(h=Mp(r,o,h)),h=xI(r,a,h)),h},l=function(h){let y=new $t;for(let b=1;b<h.length;b++)y.add(h.slice(0,b));return y},c=s(i.selectedNonInvertedCallNodePath),u=s(i.selectedInvertedCallNodePath),d=l(c),f=l(u);return ja(e,n,{selectedNonInvertedCallNodePath:c,selectedInvertedCallNodePath:u,expandedNonInvertedCallNodePaths:d,expandedInvertedCallNodePaths:f})}default:return e}},ev={fixedColumnWidths:null};function lU(e,t,r){let n={...e};return n[t]={...e[t]??ev,...r},n}var cU=(e={},t)=>t.type==="CHANGE_TABLE_VIEW_OPTIONS"?lU(e,t.tab,t.tableViewOptions):e,uU=(e=new Set,t)=>{switch(t.type){case"REQUESTING_SYMBOL_TABLE":{let r=new Set(e);return r.add(t.requestedLib),r}case"RECEIVED_SYMBOL_TABLE_REPLY":{let r=new Set(e);return r.delete(t.requestedLib),r}default:return e}},dU=(e=null,t)=>{switch(t.type){case"UPDATE_PREVIEW_SELECTION":return t.previewSelection;case"COMMIT_RANGE":return null;case"POP_COMMITTED_RANGES":return t.committedRange?{isModifying:!1,selectionStart:t.committedRange.start,selectionEnd:t.committedRange.end}:null;default:return e}},fU=(e=0,t)=>{switch(t.type){case"CHANGE_INVERT_CALLSTACK":case"CHANGE_SELECTED_THREAD":case"SELECT_TRACK":case"HIDE_GLOBAL_TRACK":case"HIDE_LOCAL_TRACK":case"HIDE_PROVIDED_TRACKS":case"CHANGE_CALL_TREE_SEARCH_STRING":case"CHANGE_MARKER_SEARCH_STRING":case"CHANGE_NETWORK_SEARCH_STRING":return e+1;case"CHANGE_SELECTED_CALL_NODE":case"CHANGE_SELECTED_MARKER":case"CHANGE_SELECTED_NETWORK_MARKER":return t.context.source==="pointer"?e:e+1;default:return e}},pU=(e=0,t)=>t.type==="FOCUS_CALL_TREE"?e+1:e,hU=(e={start:0,end:1},t)=>t.type==="PROFILE_LOADED"?Xf(t.profile):e,mU=(e=null,t)=>{switch(t.type){case"SELECT_TRACK":return t.lastNonShiftClickInformation;case"HIDE_GLOBAL_TRACK":{if(!e)return null;let{clickedTrack:r}=e;return r.type==="global"&&r.trackIndex===t.trackIndex||r.type==="local"&&r.pid===t.pid?null:e}case"HIDE_LOCAL_TRACK":{if(!e)return null;let{clickedTrack:r}=e;return r.type==="local"&&r.pid===t.pid&&r.trackIndex===t.trackIndex?null:e}default:return e}},gU=(e=null,t)=>t.type==="CHANGE_RIGHT_CLICKED_TRACK"?t.trackReference:e,yU=(e=null,t)=>{switch(t.type){case"BULK_SYMBOLICATION":return e===null?null:{...e,callNodePath:Va(t.oldFuncToNewFuncsMap,e.callNodePath)};case"CHANGE_RIGHT_CLICKED_CALL_NODE":return t.callNodePath!==null?{threadsKey:t.threadsKey,callNodePath:t.callNodePath}:null;case"SET_CONTEXT_MENU_VISIBILITY":return t.isVisible?e:null;case"PROFILE_LOADED":case"CHANGE_INVERT_CALLSTACK":case"ADD_TRANSFORM_TO_STACK":case"POP_TRANSFORMS_FROM_STACK":case"CHANGE_IMPLEMENTATION_FILTER":return null;default:return e}},bU=(e=null,t)=>{switch(t.type){case"CHANGE_RIGHT_CLICKED_MARKER":return t.markerIndex!==null?{threadsKey:t.threadsKey,markerIndex:t.markerIndex}:null;case"SET_CONTEXT_MENU_VISIBILITY":return t.isVisible?e:null;case"PROFILE_LOADED":return null;default:return e}},TU=(e=null,t)=>{switch(t.type){case"CHANGE_HOVERED_MARKER":return t.markerIndex!==null?{threadsKey:t.threadsKey,markerIndex:t.markerIndex}:null;case"PROFILE_LOADED":return null;default:return e}},SU=(e=null,t)=>t.type==="CHANGE_MOUSE_TIME_POSITION"?t.mouseTimePosition:e,xU=e=>(t,r)=>{switch(r.type){case"SANITIZED_PROFILE_PUBLISHED":case"REVERT_TO_PRE_PUBLISHED_STATE":case"RETURN_TO_ZIP_FILE_LIST":return e(void 0,r);default:return e(t,r)}},IU=xU(_t({viewOptions:_t({perThread:sU,symbolicationStatus:iU,waitingForLibs:uU,previewSelection:dU,scrollToSelectionGeneration:fU,focusCallTreeGeneration:pU,rootRange:hU,lastNonShiftClick:mU,rightClickedTrack:gU,rightClickedCallNode:yU,rightClickedMarker:bU,hoveredMarker:TU,mouseTimePosition:SU,perTab:cU}),profile:nU,globalTracks:oU,localTracksByPid:aU})),tv=IU;ur();var cu=e=>e.profileView,Gr=e=>cu(e).viewOptions;var fr=e=>Gr(e).rootRange;var vU=e=>fr(e).start,wU=e=>{let{sampleUnits:t}=ge(e).meta;return t?t.time:"ms"},pr=(0,Se.createSelector)(fr,vU,dr,(e,t,r)=>{if(r.length>0){let{start:n,end:o}=r[r.length-1];return n+=t,o+=t,{start:n,end:o}}return e}),w5=(0,Se.createSelector)(dr,wU,Jx);var Wo=e=>Gr(e).previewSelection;var k5=(0,Se.createSelector)(pr,Wo,(e,t)=>t?{start:t.selectionStart,end:t.selectionEnd}:e),Ns=e=>cu(e).profile,ge=e=>W(Ns(e),"Tried to access the profile before it was loaded."),Ct=e=>ge(e).shared,Ho=e=>ge(e).meta.interval,zp=e=>ge(e).pages||null,_r=e=>nt(e).findIndex(t=>t.color==="grey"),Wt=e=>ge(e).threads;var kU=e=>Gr(e).rightClickedTrack,Kp=e=>ge(e).counters||null,Vo=e=>ge(e).meta;var _U=e=>Vo(e).markerSchema,As=e=>Vo(e).sampleUnits,CU=e=>Vo(e).extensions,nt=(0,Se.createSelector)(ge,e=>{let{categories:t}=e.meta;return t||Jf()}),Rt=(0,Se.createSelector)(e=>Ct(e).stringArray,e=>$e.withBackingArray(e)),uu=(0,Se.createSelector)(e=>Ct(e).stackTable,e=>Ct(e).frameTable,nt,_r,Zc),EU=(0,Se.createSelector)(e=>Ct(e).funcTable,e=>Ct(e).resourceTable,WS),rv=e=>EU(e).funcTable;var An=e=>Ct(e).sources,Cr=(0,Se.createSelector)(_U,e=>{let t=new Set([...Ip.map(r=>r.name)]);return[...e.filter(r=>!t.has(r.name)),...Ip]}),ft=(0,Se.createSelector)(Cr,e=>{let t=Object.create(null);for(let r of e)t[r.name]=r;return t});var nv=(0,Se.createSelector)([Wt,Ct],wp),NU=(0,Se.createSelector)(zp,e=>{if(!e)return null;let t=new Map;for(let r of e)t.set(r.innerWindowID,r);return t}),AU=(0,Se.createSelector)(zp,e=>{if(!e)return null;let t=new Map;for(let r of e)t.set(r.innerWindowID,r.tabID);return t}),Zp=(0,Se.createSelector)(Wt,AU,(e,t)=>rx(e,t)),Pn=e=>cu(e).globalTracks,_5=(0,Se.createSelector)(Pn,e=>e.map((t,r)=>({type:"global",trackIndex:r}))),ov=(0,Se.createSelector)(Rt,Wt,(e,t)=>{if(!e.hasString("PreferenceRead"))return!1;let r=e.indexForString("PreferenceRead");return t.some(({markers:n})=>n.name.includes(r))});var Rn=e=>cu(e).localTracksByPid;var C5=(0,Se.createSelector)(Rn,e=>{let t=new Set;for(let[r,n]of e.entries())n.some(o=>o.type==="memory")&&t.add(r);return t}),E5=(0,Se.createSelector)(kU,Pn,Rn,(e,t,r)=>{if(e===null)return null;if(e.type==="global"){let s=t[e.trackIndex];return s.type==="process"?s.mainThreadIndex:null}let{pid:n,trackIndex:o}=e,i=W(r.get(n),"No local tracks found at that pid.")[o];return i.type==="thread"?i.threadIndex:null}),N5=(0,Se.createSelector)(Pn,Wt,(e,t)=>e.map(r=>vx(r,t)));var A5=(0,Se.createSelector)(Rn,Wt,Ct,Kp,(e,t,r,n)=>{let o=new Map;for(let[a,i]of e)o.set(a,i.map(s=>wx(s,t,r,n||[])));return o});var P5=(0,Se.createSelector)(Pn,Rn,lo,Nn,(e,t,r,n)=>{let o=0,a=0;for(let[i,s]of t){let l=r.get(i)||new Set,c=e.findIndex(u=>u.type==="process"&&u.pid===i);if(c===-1)throw new Error("Unable to find a global track from the given pid.");if(!l)throw new Error("Unable to find the hidden local tracks from the given pid");n.has(c)?o+=s.length:o+=l.size,a+=s.length}return a+=e.length,o+=n.size,{hidden:o,total:a}}),du=(0,Se.createSelector)(ge,yS),Jp=(0,Se.createSelector)(ge,du,(e,t)=>{let{threads:r}=e;return r.map(n=>kx(e,n,t))}),av=(0,Se.createSelector)(ge,e=>{let{threads:t,meta:r}=e,{sampleUnits:n}=r;if(!n||!n.threadCPUDelta)return null;let o;switch(n.threadCPUDelta){case"\xB5s":o=1/1e3;break;case"ns":o=1/1e6;break;case"variable CPU cycles":return null;default:return null}return t.map(a=>{let{threadCPUDelta:i}=a.samples;return i?i.slice(1).reduce((l,c)=>l+(c??0),0)*o:0})}),iv=(0,Se.createSelector)(ge,uu,As,du,_r,(e,t,r,n,o)=>e.threads.map(a=>Kc(a.samples,t,r,n,o))),PU=(0,Se.createSelector)(iv,e=>sp(e)),RU=(0,Se.createSelector)(iv,pr,(e,t)=>sp(e,t.start,t.end)),R5=(0,Se.createSelector)(PU,e=>{if(e===null||e.maxCpuRatio===0)return null;let t=Math.ceil(e.maxCpuRatio);return Ha([.05*t,.2*t,.4*t,.6*t,.8*t],e.cpuRatio,e.time)}),sv=(0,Se.createSelector)(RU,e=>{if(e===null)return null;let t=Math.ceil(e.maxCpuRatio);return Ha([.05*t,.2*t,.4*t,.6*t,.8*t],e.cpuRatio,e.time)}),lv=(0,Se.createSelector)(zp,NU,(e,t)=>{if(e===null||t===null||e.length===0)return null;let r=new Map;for(let n of e){let o=l=>{if(l.embedderInnerWindowID===0)return l;let c=t.get(l.embedderInnerWindowID);return c!==void 0?o(c):l},a=o(n),{tabID:i}=a,s=r.get(i);s===void 0?r.set(i,[n]):s.push(n)}return r}),M5=(0,Se.createSelector)(lv,e=>{if(e===null||e.size===0)return null;let t=new Map;for(let[r,n]of e)t.set(r,new Set(n.map(o=>o.innerWindowID)));return t}),MU=(0,Se.createSelector)(CU,e=>{if(!e)return null;let t=new Map;for(let r=0;r<e.length;r++)t.set(e.baseURL[r],e.name[r]);return t}),FU=(0,Se.createSelector)(lv,MU,ZS),F5=(0,Se.createSelector)(FU,Zp,Jp,(e,t,r)=>{let n=[];for(let[o,a]of e.entries()){let i=0,s=t.get(o);if(s){for(let l of s.values()){let c=r[l];if(!c)throw new Error("Failed to find the thread score!");i+=c.boostedSampleScore}n.push({tabID:o,tabScore:i,pageData:a})}}return n.sort((o,a)=>a.tabScore-o.tabScore),n}),O5=(0,Se.createSelector)(Wt,e=>{let t=new Map;for(let r of e)t.set(r.tid,or(e,r));return t}),L5=(0,Se.createSelector)(Wt,e=>{let t=new Map;for(let r of e)!r.isMainThread||!r.pid||t.set(r.pid,or(e,r));return t}),cv=(0,Se.createSelector)(ge,e=>{let{threads:t,pages:r}=e;return r&&r.some(a=>a.isPrivateBrowsing)?!0:t.some(o=>o.isPrivateBrowsing)}),D5=(0,Se.createSelector)(Wt,e=>{let t=new Set;for(let{tid:r}of e)t.add(r);return t});var B5=(0,Se.createSelector)(ge,e=>e.meta.extra||[]),U5=(0,Se.createSelector)(An,Rt,so,(e,t,r)=>{if(r===null)return null;let n=e.filename[r];return n!==null?t.getString(n):null}),$5=(0,Se.createSelector)(An,so,(e,t)=>t!==null?e.id[t]:null),G5=(0,Se.createSelector)(An,so,(e,t)=>t!==null?e.startLine[t]:1);var uG=ce(Ir());var Rs=ce(Kt());var fu=ce(Kt());xe();var OU=e=>e.zippedProfiles;var Yp=e=>OU(e).zipFile,LU=e=>Yp(e).zip;var DU=(0,fu.createSelector)(LU,e=>e===null?null:NI(e)),uv=e=>W(DU(e),"Attempted to view a profile from a zip, when there is no zip file loaded."),V5=(0,fu.createSelector)(uv,AI),j5=(0,fu.createSelector)(uv,$I,(e,t)=>e===null?null:new ou(e,t));xe();rr();var pu=e=>e.app,Xp=e=>pu(e).view;var JU=e=>pu(e).trackThreadHeights;var YU=e=>pu(e).browserConnectionStatus,XU=(0,Rs.createSelector)(YU,e=>e.status==="ESTABLISHED"?e.browserConnection:null);var Y5=(0,Rs.createSelector)(Pn,Rn,Nn,lo,JU,(e,t,r,n,o)=>{let a=20,i=1;for(let[l,c]of e.entries())if(!r.has(l))switch(c.type){case"screenshots":a+=50+i;break;case"visual-progress":case"perceptual-visual-progress":case"contentful-visual-progress":a+=40;break;case"process":{let{mainThreadIndex:u}=c;if(u===null)a+=30+i;else{let d=o[u];if(d===void 0)return null;a+=d+i}break}default:throw ae(c)}let s=new Set;for(let l of r){let c=e[l];c.type==="process"&&s.add(c.pid)}for(let[l,c]of t)if(!s.has(l)){for(let[u,d]of c.entries())if(!W(n.get(l),"Could not look up the hidden local tracks from the given PID").has(u))switch(d.type){case"thread":{let p=o[d.threadIndex];if(p===void 0)return null;a+=p+i}break;case"network":a+=35+i;break;case"memory":a+=40+i;break;case"bandwidth":a+=25+i;break;case"event-delay":a+=40+i;break;case"ipc":a+=25+i;break;case"process-cpu":case"power":a+=25+i;break;case"marker":a+=25+i;break;default:throw ae(d)}}return a}),X5=(0,Rs.createSelector)(Xp,UI,Yp,(e,t,r)=>{let n=e.phase,o=r.phase;return!(n==="INITIALIZING"&&t!=="none"||o==="PROCESS_PROFILE_FROM_ZIP_FILE")}),Q5=(0,Rs.createSelector)(pu,e=>e.sidebarOpenCategories);var Ws=ce(Kt()),d_=ce(Ia());var Me=ce(Kt()),Wu=ce(Ia()),zk=ce(Wf()),Kk=ce(Nv());var Cu=ce(Ir());var Av=`data:image/svg+xml,<?xml version="1.0" encoding="utf-8"?>%0A<!-- This Source Code Form is subject to the terms of the Mozilla Public%0A - License, v. 2.0. If a copy of the MPL was not distributed with this%0A - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->%0A<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"%0A width="64" height="64" viewBox="0 0 64 64">%0A <defs>%0A <style>%0A .style-puzzle-piece {%0A fill: url('%23gradient-linear-puzzle-piece');%0A }%0A </style>%0A <linearGradient id="gradient-linear-puzzle-piece" x1="0%" y1="0%" x2="0%" y2="100%">%0A <stop offset="0%" stop-color="%2366cc52" stop-opacity="1"/>%0A <stop offset="100%" stop-color="%2360bf4c" stop-opacity="1"/>%0A </linearGradient>%0A </defs>%0A <path class="style-puzzle-piece" d="M42,62c2.2,0,4-1.8,4-4l0-14.2c0,0,0.4-3.7,2.8-3.7c2.4,0,2.2,3.9,6.7,3.9c2.3,0,6.2-1.2,6.2-8.2 c0-7-3.9-7.9-6.2-7.9c-4.5,0-4.3,3.7-6.7,3.7c-2.4,0-2.8-3.8-2.8-3.8V22c0-2.2-1.8-4-4-4H31.5c0,0-3.4-0.6-3.4-3 c0-2.4,3.8-2.6,3.8-7.1c0-2.3-1.3-5.9-8.3-5.9s-8,3.6-8,5.9c0,4.5,3.4,4.7,3.4,7.1c0,2.4-3.4,3-3.4,3H6c-2.2,0-4,1.8-4,4l0,7.8 c0,0-0.4,6,4.4,6c3.1,0,3.2-4.1,7.3-4.1c2,0,4,1.9,4,6c0,4.2-2,6.3-4,6.3c-4,0-4.2-4.1-7.3-4.1c-4.8,0-4.4,5.8-4.4,5.8L2,58 c0,2.2,1.8,4,4,4H19c0,0,6.3,0.4,6.3-4.4c0-3.1-4-3.6-4-7.7c0-2,2.2-4.5,6.4-4.5c4.2,0,6.6,2.5,6.6,4.5c0,4-3.9,4.6-3.9,7.7 c0,4.9,6.3,4.4,6.3,4.4H42z"/>%0A</svg>%0A`;xe();function Iu(e){let t=-1/0,r;for(let[n,o]of e)o>t&&(t=o,r=n);return r}var za=class{_parentCol=[];_valueCol=[];_selfCol=[];_length=0;_headRoot=null;_headChild=[];_next=[];_nextNonCanonical=[];_canonicalIndex=[];extend(t,r){let n=t;if(t!==null){if(this._selfCol[t]===r)return t;n=this._canonicalIndex[t]}let o=this._getOrCreateCanonicalNode(n,r);return this._getOrCreateNodeWithCorrectSelf(o,r)}_getOrCreateCanonicalNode(t,r){return t!==null&&this._doesSetAlreadyContainValue(t,r)?t:this._findCanonicalSiblingWithValue(t,r)??this._createCanonicalNode(t,r)}_doesSetAlreadyContainValue(t,r){for(let n=t;n!==null;n=this._parentCol[n])if(this._valueCol[n]===r)return!0;return!1}_findCanonicalSiblingWithValue(t,r){let n=t!==null?this._headChild[t]:this._headRoot;for(let o=n,a=null;o!==null;a=o,o=this._next[o])if(this._valueCol[o]===r){if(o!==n){t!==null?this._headChild[t]=o:this._headRoot=o;let i=this._next[o];this._next[o]=n,a!==null&&(this._next[a]=i)}return o}return null}_getOrCreateNodeWithCorrectSelf(t,r){return this._findNodeWithCorrectSelf(t,r)??this._createNonCanonicalNode(t,r)}_findNodeWithCorrectSelf(t,r){for(let n=t;n!==null;n=this._nextNonCanonical[n])if(this._selfCol[n]===r)return n;return null}_createCanonicalNode(t,r){let n=t!==null?this._headChild[t]:this._headRoot,o=this._length++;return this._parentCol[o]=t,this._valueCol[o]=r,this._selfCol[o]=r,this._canonicalIndex[o]=o,this._nextNonCanonical[o]=null,this._headChild[o]=null,this._next[o]=n,t!==null?this._headChild[t]=o:this._headRoot=o,o}_createNonCanonicalNode(t,r){let n=this._length++;return this._parentCol[n]=this._parentCol[t],this._valueCol[n]=this._valueCol[t],this._selfCol[n]=r,this._canonicalIndex[n]=t,this._nextNonCanonical[n]=this._nextNonCanonical[t],this._nextNonCanonical[t]=n,this._headChild[n]=null,this._next[n]=null,n}finish(){return{parent:this._parentCol,self:this._selfCol,value:this._valueCol,length:this._length}}};function vu(e,t,r,n){let o=new za,a=new Int32Array(e.length);for(let i=0;i<e.length;i++){let s=e.prefix[i],l=s!==null?a[s]:-1,c=e.frame[i],u=t.func[c],f=r.source[u]===n;if(l===-1&&!f)a[i]=-1;else{let p=f?t.line[c]??r.lineNumber[u]:null;a[i]=o.extend(l!==-1?l:null,p!==null?p:-1)}}return{stackIndexToLineSetIndex:a,lineSetTable:o.finish()}}var g$={totalLineHits:new Map,selfLineHits:new Map};function wu(e,t){if(e===null)return g$;let{stackIndexToLineSetIndex:r,lineSetTable:n}=e,o=new Float64Array(n.length);for(let l=0;l<t.length;l++){let c=t.stack[l];if(c===null)continue;let u=r[c];if(u!==-1){let d=t.weight?t.weight[l]:1;o[u]+=d}}let a=new Map,i=new Map,s=new Float64Array(n.length);for(let l=n.length-1;l>=0;l--){let c=o[l];if(c!==0){let p=n.self[l];if(p!==-1){let h=i.get(p)??0;i.set(p,h+c)}}let u=s[l],d=c+u,f=n.parent[l];if(f!==null&&(s[f]+=d),d!==0){let p=n.value[l];if(p!==-1){let h=a.get(p)??0;a.set(p,h+d)}}}return{totalLineHits:a,selfLineHits:i}}function Pv(e,t,r,n){let o=new Map;for(let a=0;a<e.length;a++){let i=e.stack[a];if(i===null)continue;let s=t[i];if(s===-1)continue;let l=r.line[s],c=l!==null?l:n;if(c===null)continue;let u=e.weight!==null?e.weight[a]:1;o.set(c,(o.get(c)??0)+u)}return o}function ku(e,t,r,n){let o=new za,a=new Int32Array(e.length);for(let i=0;i<e.length;i++){let s=e.prefix[i],l=s!==null?a[s]:-1,c=e.frame[i],d=t.nativeSymbol[c]===n;if(l===-1&&!d)a[i]=-1;else{let f=d?t.address[c]:-1;a[i]=o.extend(l!==-1?l:null,f)}}return{stackIndexToAddressSetIndex:a,addressSetTable:o.finish()}}var y$={totalAddressHits:new Map,selfAddressHits:new Map};function _u(e,t){if(e===null)return y$;let{stackIndexToAddressSetIndex:r,addressSetTable:n}=e,o=new Float64Array(n.length);for(let l=0;l<t.length;l++){let c=t.stack[l];if(c===null)continue;let u=r[c];if(u!==-1){let d=t.weight?t.weight[l]:1;o[u]+=d}}let a=new Map,i=new Map,s=new Float64Array(n.length);for(let l=n.length-1;l>=0;l--){let c=o[l];if(c!==0){let p=n.self[l];if(p!==-1){let h=i.get(p)??0;i.set(p,h+c)}}let u=s[l],d=c+u,f=n.parent[l];if(f!==null&&(s[f]+=d),d!==0){let p=n.value[l];if(p!==-1){let h=a.get(p)??0;a.set(p,h+d)}}}return{totalAddressHits:a,selfAddressHits:i}}function Rv(e,t,r,n){if(n===null)return new Map;let o=new Map;for(let a=0;a<e.length;a++){let i=e.stack[a];if(i===null)continue;let s=t[i];if(s===-1||r.nativeSymbol[s]!==n)continue;let l=r.address[s];if(l===-1)continue;let c=e.weight!==null?e.weight[a]:1;o.set(l,(o.get(l)??0)+c)}return o}function Mv(e,t,r,n){let{stackTable:o,frameTable:a,funcTable:i,stringTable:s,resourceTable:l,nativeSymbols:c}=r,u=t.funcForNode(e),d=i.source[u],f=i.resource[u],p=f!==-1&&l.type[f]===1?l.lib[f]:null,h=NS(e,t,o),y=XS(h,a),b=null,g=QS(n,h,a),m=Iu(g);m!==void 0&&(y.add(m),b=m);let T=[...y];T.sort((R,F)=>R-F),T.length!==0&&b===null&&(b=T[0]);let S=T.map(R=>ex(R,c,a,s)),I=i.lineNumber[u],v=Pv(n,h,a,I),w=Iu(v),k=Rv(n,h,a,b),E=Iu(k);return{libIndex:p,sourceIndex:d,nativeSymbols:S,initialNativeSymbol:b!==null?T.indexOf(b):null,scrollToLineNumber:w,scrollToInstructionAddress:E,highlightedLineNumber:null,highlightedInstructionAddress:null}}function b$(e){try{let t=new URL("/favicon.ico",e);return t.protocol==="http:"&&(t.protocol="https:"),t.href}catch{return console.error("Error while extracing the favicon from the libname",e),null}}var ah=class{_callNodeInfo;_callNodeTable;_callTreeTimings;_callNodeHasChildren;constructor(t,r){this._callNodeInfo=t,this._callNodeTable=t.getCallNodeTable(),this._callTreeTimings=r,this._callNodeHasChildren=r.callNodeHasChildren}_getFirstChildIndex(t){return t===-1?this._callNodeTable.length!==0?0:-1:this._callNodeTable.subtreeRangeEnd[t]!==t+1?t+1:-1}createRoots(){return this.createChildren(-1)}createChildren(t){let r=this._getFirstChildIndex(t),n=[];for(let o=r;o!==-1;o=this._callNodeTable.nextSibling[o]){let a=this._callTreeTimings.total[o],i=this._callNodeHasChildren[o];(a!==0||i!==0)&&n.push(o)}return n.sort((o,a)=>Math.abs(this._callTreeTimings.total[a])-Math.abs(this._callTreeTimings.total[o])),n}hasChildren(t){return this._callNodeHasChildren[t]!==0}getSelfAndTotal(t){let r=this._callTreeTimings.self[t],n=this._callTreeTimings.total[t];return{self:r,total:n}}findHeaviestPathInSubtree(t){let r=this._callNodeTable.subtreeRangeEnd[t],n=-1,o=0;for(let a=t;a<r;a++){let i=Math.abs(this._callTreeTimings.self[a]);(n===-1||i>o)&&(n=a,o=i)}return this._callNodeInfo.getCallNodePathFromIndex(n)}},ih=class{_timings;constructor(t){this._timings=t}hasChildren(t){return!1}createChildren(t){return[]}createRoots(){return this._timings.sortedFuncs}getSelfAndTotal(t){return{self:this._timings.funcSelf[t],total:this._timings.funcTotal[t]}}findHeaviestPathInSubtree(t){throw new Error("unexpected call to findHeaviestPathInSubtree in CallTreeInternalFunctionList")}},sh=class{_callNodeInfo;_callNodeTable;_callNodeSelf;_rootNodes;_totalPerRootFunc;_hasChildrenPerRootFunc;_totalAndHasChildrenPerNonRootNode=new Map;constructor(t,r){this._callNodeInfo=t,this._callNodeTable=t.getCallNodeTable(),this._callNodeSelf=r.callNodeSelf;let{sortedRoots:n,totalPerRootFunc:o,hasChildrenPerRootFunc:a}=r;this._totalPerRootFunc=o,this._hasChildrenPerRootFunc=a,this._rootNodes=n}createRoots(){return this._rootNodes}hasChildren(t){return this._callNodeInfo.isRoot(t)?this._hasChildrenPerRootFunc[t]!==0:this._getTotalAndHasChildren(t).hasChildren}createChildren(t){if(!this.hasChildren(t))return[];let r=this._callNodeInfo.getChildren(t).filter(n=>{let{total:o,hasChildren:a}=this._getTotalAndHasChildren(n);return o!==0||a});return r.sort((n,o)=>Math.abs(this._getTotalAndHasChildren(o).total)-Math.abs(this._getTotalAndHasChildren(n).total)),r}getSelfAndTotal(t){if(this._callNodeInfo.isRoot(t)){let n=this._totalPerRootFunc[t];return{self:n,total:n}}let{total:r}=this._getTotalAndHasChildren(t);return{self:0,total:r}}_getTotalAndHasChildren(t){if(this._callNodeInfo.isRoot(t))throw new Error("This function should not be called for roots");let r=this._totalAndHasChildrenPerNonRootNode.get(t);if(r!==void 0)return r;let n=Ov(t,this._callNodeInfo,this._callNodeSelf);return this._totalAndHasChildrenPerNonRootNode.set(t,n),n}findHeaviestPathInSubtree(t){let[r,n]=this._callNodeInfo.getSuffixOrderIndexRangeForCallNode(t),o=this._callNodeInfo.getSuffixOrderedCallNodes(),a=-1,i=0;for(let l=r;l<n;l++){let c=o[l],u=Math.abs(this._callNodeSelf[c]);(a===-1||u>i)&&(a=c,i=u)}let s=[];for(let l=a;l!==-1;l=this._callNodeTable.prefix[l])s.push(this._callNodeTable.func[l]);return s}},Fs=class{_categories;_internal;_callNodeInfo;_thread;_previewFilteredCtssSamples;_rootTotalSummary;_displayDataByIndex;_children;_roots;_isHighPrecision;_weightType;constructor(t,r,n,o,a,i,s,l){this._categories=r,this._internal=a,this._callNodeInfo=n,this._thread=t,this._previewFilteredCtssSamples=o,this._rootTotalSummary=i,this._displayDataByIndex=new Map,this._children=[],this._roots=a.createRoots(),this._isHighPrecision=s,this._weightType=l}getTotal(){return this._rootTotalSummary}getRoots(){return this._roots}getChildren(t){let r=this._children[t];return r===void 0&&(r=this._internal.createChildren(t),this._children[t]=r),r}hasChildren(t){return this._internal.hasChildren(t)}_addDescendantsToSet(t,r){for(let n of this.getChildren(t))r.add(n),this._addDescendantsToSet(n,r)}getAllDescendants(t){let r=new Set;return this._addDescendantsToSet(t,r),r}getParent(t){return this._callNodeInfo.prefixForNode(t)}getDepth(t){return this._callNodeInfo.depthForNode(t)}getNodeData(t){let r=this._callNodeInfo.funcForNode(t),n=this._thread.stringTable.getString(this._thread.funcTable.name[r]),{self:o,total:a}=this._internal.getSelfAndTotal(t),i=a/this._rootTotalSummary,s=o/this._rootTotalSummary;return{funcName:n,total:a,totalRelative:i,self:o,selfRelative:s}}_getInliningBadge(t,r){let n=Cs(r),o=this._callNodeInfo.sourceFramesInlinedIntoSymbolForNode(t);if(o===-2)return;if(o===-1)return{name:"divergent-inlining",vars:{calledFunction:n},localizationId:"CallTree--divergent-inlining-badge",contentFallback:"",titleFallback:`Some calls to ${n} were inlined by the compiler.`};let a=Cs(this._thread.stringTable.getString(this._thread.nativeSymbols.name[o]));return{name:"inlined",vars:{calledFunction:n,outerFunction:a},localizationId:"CallTree--inlining-badge",contentFallback:"(inlined)",titleFallback:`Calls to ${n} were inlined into ${a} by the compiler.`}}getDisplayData(t){let r=this._displayDataByIndex.get(t);if(r===void 0){let{funcName:n,total:o,totalRelative:a,self:i}=this.getNodeData(t),s=this._callNodeInfo.funcForNode(t),l=this._callNodeInfo.categoryForNode(t),c=this._callNodeInfo.subcategoryForNode(t),u=this._getInliningBadge(t,n),d=this._thread.funcTable.resource[s],f=this._thread.resourceTable.type[d],p=d===-1,h=this._getOriginAnnotation(s),y=this._weightType,b=null,g=null;if(f===3)g=b=b$(h);else if(f===2){b=Av;let k=this._thread.resourceTable.name[d];g=this._thread.stringTable.getString(k)}let m=mp(y,this._isHighPrecision,o),T=mp(y,this._isHighPrecision,i),S=`${Xc(a)}`,I,v,w;switch(y){case"tracing-ms":{v=`${m}ms`,w=`${T}ms`,I=Cu.oneLine`
650
650
  ${n},
651
651
  running time is ${v} (${S}),
652
652
  self time is ${w}
653
- `;break}case"samples":{v=o===1?`${g} sample`:`${g} samples`,w=i===1?`${T} sample`:`${T} samples`,I=wu.oneLine`
653
+ `;break}case"samples":{v=o===1?`${m} sample`:`${m} samples`,w=i===1?`${T} sample`:`${T} samples`,I=Cu.oneLine`
654
654
  ${n},
655
655
  running count is ${v} (${S}),
656
656
  self count is ${w}
657
- `;break}case"bytes":{v=`${g} bytes`,w=`${T} bytes`,I=wu.oneLine`
657
+ `;break}case"bytes":{v=`${m} bytes`,w=`${T} bytes`,I=Cu.oneLine`
658
658
  ${n},
659
659
  total size is ${v} (${S}),
660
660
  self size is ${w}
661
- `;break}default:throw ae(y,"Unhandled WeightType.")}r={total:o===0?"\u2014":g,totalWithUnit:o===0?"\u2014":v,self:i===0?"\u2014":T,selfWithUnit:i===0?"\u2014":w,totalPercent:S,name:n,lib:h.slice(0,1e3),isFrameLabel:p,badge:u,categoryName:$S(this._categories,l,c),categoryColor:this._categories[l].color,iconSrc:b,icon:m,ariaLabel:I},this._displayDataByIndex.set(t,r)}return r}_getOriginAnnotation(t){return bs(t,this._thread.funcTable,this._thread.resourceTable,this._thread.stringTable,this._thread.sources)}getBottomBoxInfoForCallNode(t){return Pv(t,this._callNodeInfo,this._thread,this._previewFilteredCtssSamples)}findHeavyPathToSameFunctionAfterInversion(t){if(t===null)return[];let r=this._internal.findHeaviestPathInSubtree(t),n=this._callNodeInfo.depthForNode(t);return r.slice(n).reverse()}};function ku(e,t,r){let n=new Float64Array(r);for(let i=0;i<t.length;i++){let s=t[i];if(s!==null){let l=e.weight?e.weight[i]:1;n[s]+=l}}let o=Math.abs,a=0;for(let i=0;i<r;i++)a+=o(n[i]);return{callNodeSelf:n,rootTotalSummary:a}}function Rv(e,t,r){switch(r.type){case"NON_INVERTED":{let{timings:n}=r,o=n.self[e],a=n.total[e];return{self:o,total:a}}case"FUNCTION_LIST":{let n=W(t.asInverted()),{timings:o}=r,{funcSelf:a,funcTotal:i}=o;if(!n.isRoot(e))throw new Error("When using function list timings, callNodeIndex must always refer to a function (an inverted root)");return{self:a[e],total:i[e]}}case"INVERTED":{let n=W(t.asInverted()),{timings:o}=r,{callNodeSelf:a,totalPerRootFunc:i}=o;if(n.isRoot(e)){let l=i[e];return{self:l,total:l}}let{total:s}=Mv(e,n,a);return{self:0,total:s}}default:throw ae(r,"callTreeTimings.type")}}function Mv(e,t,r){let n=t.depthForNode(e),[o,a]=t.getSuffixOrderIndexRangeForCallNode(e),i=t.getSuffixOrderedCallNodes(),s=t.getCallNodeTable().depth,l=0,c=!1;for(let u=o;u<a;u++){let d=i[u],f=r[d];l+=f,c=c||f!==0&&s[d]>n}return{total:l,hasChildren:c}}function p$(e,{callNodeSelf:t,rootTotalSummary:r}){let n=e.getFuncCount(),o=e.getCallNodeTable(),a=o.func,i=o.depth,s=new Float64Array(n),l=new Uint8Array(n),c=new Uint8Array(n),u=[];for(let d=0;d<t.length;d++){let f=t[d];if(f===0)continue;let p=a[d];s[p]+=f,c[p]===0&&(c[p]=1,u.push(p)),i[d]!==0&&(l[p]=1)}return u.sort((d,f)=>Math.abs(s[f])-Math.abs(s[d])),{callNodeSelf:t,rootTotalSummary:r,sortedRoots:u,totalPerRootFunc:s,hasChildrenPerRootFunc:l}}function Fs(e,t){let r=e.asInverted();return r!==null?{type:"INVERTED",timings:p$(r,t)}:{type:"NON_INVERTED",timings:ah(e,t)}}function ah(e,t){let r=e.getCallNodeTable(),{callNodeSelf:n,rootTotalSummary:o}=t,a=new Float64Array(r.length),i=new Uint8Array(r.length);for(let s=r.length-1;s>=0;s--){let l=a[s]+n[s],c=i[s]!==0,u=l!==0;if(a[s]=l,!c&&!u)continue;let d=r.prefix[s];d!==-1&&(a[d]+=l,i[d]=1)}return{self:n,total:a,callNodeHasChildren:i,rootTotalSummary:o}}function h$(e,t,r,n){let o=e.func,a=e.prefix,i=e.length,s=new Float64Array(i),l=new Float64Array(n),c=[],u=new Uint8Array(n);for(let f=i-1;f>=0;f--){let p=s[f]+r[f];if(p===0)continue;let h=a[f];if(h!==-1&&(s[h]+=p),!It(t,f)){let y=o[f];l[y]+=p,u[y]===0&&(u[y]=1,c.push(y))}}let d=Math.abs;return c.sort((f,p)=>{let h=d(l[p])-d(l[f]);return h!==0?h:f-p}),{funcTotal:l,sortedFuncs:c}}function m$(e,t,r){let n=e.func,o=t.length,a=new Float64Array(r);for(let i=0;i<o;i++){let s=t[i];if(s!==0){let l=n[i];a[l]+=s}}return a}function Fv(e,t,{callNodeSelf:r,rootTotalSummary:n},o){let a=m$(e,r,o),{funcTotal:i,sortedFuncs:s}=h$(e,t,r,o);return{funcSelf:a,funcTotal:i,sortedFuncs:s,rootTotalSummary:n}}function Os(e,t,r,n,o,a){return Gt("getCallTree",()=>{switch(o.type){case"NON_INVERTED":{let{timings:i}=o;return new Ms(e,r,t,n,new rh(t,i),i.rootTotalSummary,!!e.isJsTracer,a)}case"FUNCTION_LIST":{let{timings:i}=o;return new Ms(e,r,t,n,new nh(i),i.rootTotalSummary,!!e.isJsTracer,a)}case"INVERTED":{let{timings:i}=o;return new Ms(e,r,t,n,new oh(W(t.asInverted()),i),i.rootTotalSummary,!!e.isJsTracer,a)}default:throw ae(o,"Unhandled CallTreeTimings type.")}})}function ih(e,t){switch(t){case"timing":return e.samples;case"js-allocations":return W(e.jsAllocations,'Expected the NativeAllocationTable to exist when using a "js-allocation" strategy');case"native-retained-allocations":{let r=W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-allocation" strategy');if(!("memoryAddress"in r))throw new Error("Attempting to filter by retained allocations data that is missing the memory addresses.");return VS(r)}case"native-allocations":return GS(W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-allocations" strategy'));case"native-deallocations-sites":return WS(W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-deallocations-sites" strategy'));case"native-deallocations-memory":{let r=W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-deallocations-memory" strategy');if(!("memoryAddress"in r))throw new Error("Attempting to filter by retained allocations data that is missing the memory addresses.");return HS(W(r,'Expected the NativeAllocationTable to exist when using a "js-allocation" strategy'))}default:throw ae(t)}}function Ov(e,t){switch(t){case"timing":return e.samples;case"js-allocations":return W(e.jsAllocations,'Expected the NativeAllocationTable to exist when using a "js-allocation" strategy');case"native-retained-allocations":case"native-allocations":case"native-deallocations-sites":case"native-deallocations-memory":return W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-allocation" strategy');default:throw ae(t)}}function Lv(e,t,r){if(t===e.samples){let{category:n,subcategory:o}=e.samples;return{sampleCategories:n,sampleSubcategories:o}}return Jf(t.stack,e.stackTable,r)}function Dv(e,t,r,n){if(e.weightType!=="samples"||e.weight)return null;let o=new Float64Array(r),a=0;for(let i=0;i<e.length-1;i++){let s=t[i];if(s!==null){let l=e.time[i+1]-e.time[i];o[s]+=l,a+=l}}if(e.length>0){let i=t[e.length-1];if(i!==null){let s=n;o[i]+=s,a+=s}}return{callNodeSelf:o,rootTotalSummary:a}}rr();ur();xe();function Uv({funcTable:e,sources:t,stringArray:r}){let n=new Map;for(let o=0;o<e.length;o++){if(!e.isJS[o])continue;let a=e.lineNumber[o],i=e.columnNumber[o],s=e.source[o];if(i!==null&&a!==null&&s!==null){let l=t.filename[s],u=`${r[l]}:${a}:${i}`;n.has(u)?n.set(u,null):n.set(u,o)}}return n}function $v(e,t){let r=[],n=Uv(t),{funcTable:o,stringArray:a}=t;for(let i=0;i<e.length;i++){let s=e.events[i],l=e.column[i],c=e.line[i],u=a[s],d=null;if(l!==null&&c!==null){let f=`${u}:${c}:${l}`,p=n.get(f);p!==void 0&&(p===null?u=`(multiple matching functions) ${u}`:(d=p,u=`\u0192 ${a[o.name[d]]} ${u}`))}for(let f=0;f<=r.length;f++){let p=r[f];p||(p={start:[],end:[],index:[],label:[],func:[],name:"Tracing Information",length:0},r.push(p));let h=e.timestamps[i]/1e3,y=e.durations[i],b=y===null?0:y/1e3,m=p.end[p.length-1];if(m===void 0||m<=h){p.start.push(h),p.end.push(h+b),p.label.push(u),p.index.push(i),p.func.push(d),p.length++;break}}}return r}function Gv(e,t){let r=new Map,n=[],o=/:\/\//;function a(d){let f=n[d];if(f!==void 0)return f;let p=o.test(t.getString(d));return n[d]=p,p}function i(d,f,p){if(f===p)return;let h=e.events[d],y=t.getString(h),b=a(h)?"Script":y,m=r.get(b);m===void 0&&(m={start:[],end:[],index:[],label:[],func:[],name:b,length:0},r.set(b,m));{let g=m.start[m.length-1],T=m.end[m.length-1],S=m.end[m.length-2];if(p<f)throw new Error("end is less than the start");if(T<g)throw new Error(`currEnd < currStart "${y} - ${T} < ${g}"`);if(g<S)throw new Error(`currStart < prevEnd "${y} - ${g} < ${S}"`)}m.start.push(f/1e3),m.end.push(p/1e3),m.label.push(y),m.index.push(d),m.length++}let s=[],l=[],c=[],u=-1;for(let d=0;d<e.length;d++){let f=e.timestamps[d],p=e.durations[d],y=f+(p===null?0:p);if(u===-1){u=0,s[u]=f,l[u]=y,c[u]=d;continue}for(;;){let b=s[u],m=l[u],g=c[u];if(b<=f&&m>f&&m<y&&(y=m),m<=f){if(i(g,b,m),u--,u===-1){u=0,c[u]=d,s[u]=f,l[u]=y;break}continue}else if(m>y){i(g,b,f),s[u]=y,u++,s[u]=f,l[u]=y,c[u]=d;break}else if(m===y){b!==f&&(i(g,b,f),s[u]=f),c[u]=d;break}else{let T=t.getString(e.events[g]),S=t.getString(e.events[d]);throw console.error("Current JS Tracer information:",{jsTracer:e,stringTable:t,prefixEventIndex:g,currentEventIndex:d}),console.error(`Prefix (parent) times for "${T}": ${b}ms to ${m}ms`),console.error(`Current (child) times for "${S}": ${f}ms to ${y}ms`),new Error("The JS Tracer algorithm encountered some data it could not handle.")}}}for(;u>=0;u--)i(c[u],s[u],l[u]);return[...r.values()].sort((d,f)=>d.name>f.name?1:d.name<f.name?-1:0)}function g$(e,t,r,n,o){let a={...ka(),weight:[],weightType:"tracing-ms"},i=Ur(),s={...e,markers:i,samples:a},{funcTable:l,frameTable:c,stackTable:u}=t,d=0,f=[null],p=[0],h=new Map,y=new Map,b=r.indexForString(""),m=o.findIndex(T=>T.name==="Other");if(m===-1)throw new Error("Expected to find an 'Other' category.");let g=Uv(t);for(let T=0;T<n.length;T++){let S=n.events[T],I=r.getString(S),v=n.end[T],w=n.column[T],k=n.line[T],N=null;if(w!==null&&k!==null){let B=`${I}:${k}:${w}`,Z=g.get(B);Z!=null&&(N=Z,h.set(S,N))}if(N===null){let B=h.get(S);B===void 0?(N=l.length++,l.name.push(S),l.isJS.push(!1),l.resource.push(-1),l.relevantForJS.push(!0),l.source.push(null),l.lineNumber.push(null),l.columnNumber.push(null),h.set(S,N)):N=B}let R=f[d];for(;R!==null;){let B=p[d];if(v<=B)break;R=f[d],d--}let F=c.length++;c.address.push(b),c.inlineDepth.push(0),c.category.push(m),c.func.push(N),c.nativeSymbol.push(null),c.innerWindowID.push(0),c.line.push(k),c.column.push(w);let G=u.length++;u.frame.push(F),u.prefix.push(R),y.set(T,G),d++,d===0&&(d=1),f[d]=T,p[d]=v}return{thread:s,stackMap:y}}function y$(e){if(e.length===0)return{events:[],start:[],end:[],line:[],column:[],length:0};let t=e.timestamps[0],r=t+(e.durations[0]||0),n=[t],o=[r],a={events:e.events,start:n,end:o,line:e.line,column:e.column,length:e.length};for(let i=1;i<e.length;i++){let s=e.durations[i],l=e.timestamps[i],c=l+(s===null?0:s);if(l<t)if(t<c)l=t;else{let u=c-l;l=t,c=Math.min(r,l+u)}else c<r||r<=l||(r-l<c-r?l=r:c=r);n.push(l),o.push(c),t=l,r=c}return a}function Wv(e,t,r,n){let o=y$(r),a=$e.withBackingArray(t.stringArray),{thread:i,stackMap:s}=g$(e,t,a,o,n);return i.samples=b$(a,o,s),i}function b$(e,t,r){let o=(f,p)=>Math.abs(f-p)<1e-5,a=ka(),i=[];a.weight=i;function s(f,p,h){if(o(p,h))return;let y=W(r.get(f),"The JS tracer event did not exist in the stack map.");a.stack.push(y),W(a.time).push(p/1e3),i.push((h-p)/1e3),a.length++}let l=[],c=[],u=[],d=-1;for(let f=0;f<t.length;f++){let p=t.start[f],h=t.end[f];if(d===-1){d=0,l[d]=p,c[d]=h,u[d]=f;continue}for(;;){let y=l[d],b=c[d],m=u[d];if(b<=p+1e-5){if(s(m,y,b),d--,d===-1){d=0,u[d]=f,l[d]=p,c[d]=h;break}continue}else if(h<b+1e-5){s(m,y,p),l[d]=h,d++,l[d]=p,c[d]=h,u[d]=f;break}else if(o(b,h)){o(y,p)||(s(m,y,p),l[d]=p),u[d]=f;break}else{let g=e.getString(t.events[m]),T=e.getString(t.events[f]);throw console.error("Current JS Tracer information:",{jsTracer:t,stringTable:e,prefixEventIndex:m,currentEventIndex:f}),console.error(`Prefix (parent) times for "${g}": ${y}ms to ${b}ms`),console.error(`Current (child) times for "${T}": ${p}ms to ${h}ms`),new Error("The JS Tracer information was malformed. Some event lasted longer than its parent event.")}}}for(;d>=0;d--)s(u[d],l[d],c[d]);return a}xe();async function Hv(e,t="application/octet-stream"){return new Promise((r,n)=>{let o=Object.assign(new FileReader,{onload:()=>r(o.result),onerror:()=>n(o.error)});o.readAsDataURL(new Blob([e],{type:t}))})}function S$(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r.buffer}function Vv(e){return"fromBase64"in Uint8Array?Uint8Array.fromBase64(e).buffer:S$(e)}rr();xe();cr();ur();rr();var an=class{_libs=[];_libKeyToLibIndex=new Map;_stringArray=[];_stringTable=$e.withBackingArray(this._stringArray);_sources=Pa();_frameTable=_a();_stackTable=nn();_funcTable=Ca();_resourceTable=Na();_nativeSymbols=Aa();_funcKeyToFuncIndex=new Map;_nativeSymbolKeyToNativeSymbolIndex=new Map;_libIndexToResourceIndex=new Map;_libNameToResourceIndex=new Map;_originToResourceIndex=new Map;_idToSourceIndex=new Map;_filenameToSourceIndex=new Map;indexForLib(t){let{debugName:r,breakpadId:n}=t,o=`${r}/${n}`,a=this._libKeyToLibIndex.get(o);if(a===void 0){a=this._libs.length;let{arch:i,name:s,path:l,debugPath:c,codeId:u}=t;this._libs.push({arch:i,name:s,path:l,debugName:r,debugPath:c,breakpadId:n,codeId:u??null}),this._libKeyToLibIndex.set(o,a)}return a}indexForFunc(t,r,n,o,a,i,s){let l=`${t}-${r}-${n}-${o}-${a}-${i}-${s}`,c=this._funcKeyToFuncIndex.get(l);return c===void 0&&(c=this._funcTable.length++,this._funcTable.name[c]=t,this._funcTable.isJS[c]=r,this._funcTable.relevantForJS[c]=n,this._funcTable.resource[c]=o,this._funcTable.source[c]=a,this._funcTable.lineNumber[c]=i,this._funcTable.columnNumber[c]=s,this._funcKeyToFuncIndex.set(l,c)),c}indexForSource(t,r,n=1,o=1,a=null){let i;if(t!==null)i=this._idToSourceIndex.get(t);else{let s=this._stringTable.indexForString(r);i=this._filenameToSourceIndex.get(s)}if(i===void 0){i=this._sources.length;let s=this._stringTable.indexForString(r),l=a!==null?this._stringTable.indexForString(a):null;this._sources.id[i]=t,this._sources.filename[i]=s,this._sources.startLine[i]=n,this._sources.startColumn[i]=o,this._sources.sourceMapURL[i]=l,this._sources.length++,t!==null?this._idToSourceIndex.set(t,i):this._filenameToSourceIndex.set(s,i)}return i}addExtensionOrigins(t){let r=this._resourceTable;for(let n=0;n<t.length;n++){let o=new URL(t.baseURL[n]).origin,a=this._originToResourceIndex.get(o);if(a===void 0){a=r.length++,this._originToResourceIndex.set(o,a);let s=`Extension ${JSON.stringify(t.name[n])} (ID: ${t.id[n]})`,l=this._stringTable.indexForString(t.id[n]);r.lib[a]=null,r.name[a]=this._stringTable.indexForString(s),r.host[a]=l,r.type[a]=2}}}indexForURIResource(t){let r,n;try{let i=new URL(t);if(!(i.protocol==="http:"||i.protocol==="https:"||i.protocol==="moz-extension:"))throw new Error("not a webhost or extension protocol");r=i.origin,n=i.host}catch{r=t,n=null}let o=this._originToResourceIndex.get(r);if(o!==void 0)return o;let a=this._resourceTable;return o=a.length++,this._originToResourceIndex.set(r,o),n?(a.lib[o]=null,a.name[o]=this._stringTable.indexForString(r),a.host[o]=this._stringTable.indexForString(n),a.type[o]=3):(a.lib[o]=null,a.name[o]=this._stringTable.indexForString(t),a.host[o]=null,a.type[o]=5),o}indexForLibResource(t){let r=this._libIndexToResourceIndex.get(t);if(r!==void 0)return r;let n=this._resourceTable;return r=this._resourceTable.length++,this._libIndexToResourceIndex.set(t,r),n.lib[r]=t,n.name[r]=this._stringTable.indexForString(this._libs[t].name),n.host[r]=null,n.type[r]=1,r}indexForNameOnlyLibResource(t){let r=this._libNameToResourceIndex.get(t);if(r!==void 0)return r;let n=this._resourceTable;return r=this._resourceTable.length++,this._libNameToResourceIndex.set(t,r),n.lib[r]=null,n.name[r]=t,n.host[r]=null,n.type[r]=1,r}indexForNativeSymbol(t,r,n,o){let a=`${t}-${r}-${n}-${o??""}`,i=this._nativeSymbolKeyToNativeSymbolIndex.get(a);return i===void 0&&(i=this._nativeSymbols.length++,this._nativeSymbols.libIndex[i]=t,this._nativeSymbols.address[i]=r,this._nativeSymbols.name[i]=n,this._nativeSymbols.functionSize[i]=o,this._nativeSymbolKeyToNativeSymbolIndex.set(a,i)),i}getStringTable(){return this._stringTable}getFrameTable(){return this._frameTable}getStackTable(){return this._stackTable}finish(){let t={stackTable:this._stackTable,frameTable:this._frameTable,funcTable:this._funcTable,resourceTable:this._resourceTable,nativeSymbols:this._nativeSymbols,stringArray:this._stringArray,sources:this._sources};return{libs:this._libs,shared:t}}};function x$(e){return{name:"CpuProfile",args:{data:{cpuProfile:e}},cat:"other",pid:0,tid:0,ts:0,ph:"I"}}function jv(e,t){if(!e)return null;let r;if(Array.isArray(e)?e.slice(0,5).every(a=>a&&typeof a=="object"&&"ph"in a)&&(r=e):typeof e=="object"&&"samples"in e&&"timeDeltas"in e&&"startTime"in e&&"endTime"in e?(r=[],r.push(x$(e))):typeof e=="object"&&"traceEvents"in e&&Array.isArray(e.traceEvents)&&(r=e.traceEvents),!r)return null;let n=new Map;for(let o of r){if(typeof o!="object"||o===null||typeof o.name!="string")throw new Error("A tracing event in the chrome profile did not follow the expected form.");let{name:a}=o,i=n.get(a);i||(i=[],n.set(a,i)),i.push(o)}return k$(n,t)}function Ls(e,t,r){let n=e.get(t);return n?n.find(r):void 0}function I$(e,t,r){let n=e.get(t);return n?n.filter(r):[]}function sh(e,t,r,n,o){let a=`${o.pid}:${o.tid}`,i=e.get(a);if(i)return i;let s=Ra();s.pid=`${o.pid}`,s.tid=a,s.processType="unknown",s.name="Chrome Thread";let l=Ls(r,"thread_name",m=>m.pid===o.pid&&m.tid===o.tid);l&&(s.name=l.args.name,s.isMainThread=s.name.startsWith("Cr")&&s.name.endsWith("Main")||!!o.pid&&o.pid===o.tid);let c=Ls(r,"process_name",m=>m.pid===o.pid);c&&(s.processName=c.args.name);let u=Ls(r,"process_labels",m=>m.pid===o.pid);if(u){let m=u.args.labels;s.processName?s.processName=`${s.processName} (${m})`:s.processName=`Process ${o.pid} (${m})`}let d=Ls(r,"process_sort_index",m=>m.pid===o.pid),f=0;d&&(f=d.args.sort_index);let p=Ls(r,"thread_sort_index",m=>m.pid===o.pid&&m.tid===o.tid),h=0;p?h=p.args.sort_index:l&&(l.args.name==="CrBrowserMain"||l.args.name==="CrGpuMain")&&(h=-1),n.threads.push(s);let y=new Map;y.set(void 0,null);let b={thread:s,nodeIdToStackId:y,lastSeenTime:o.ts/1e3,lastSampledTime:0,pid:o.pid,processSortIndex:f,threadSortIndex:h,tieBreakerIndex:t.size};return e.set(a,b),t.set(s,b),b}function v$(e){switch(e.name){case"ProfileChunk":return e.args.data.timeDeltas;case"CpuProfile":return e.args.data.cpuProfile.timeDeltas;default:return}}function w$(e){let t=e.findIndex(i=>i.name==="JavaScript"),r=e.findIndex(i=>i.name==="GC / CC"),n=e.findIndex(i=>i.name==="Native"),o=e.findIndex(i=>i.name==="Other"),a=e.findIndex(i=>i.name==="Idle");if(t===-1||r===-1||n===-1||o===-1||a===-1)throw new Error("Unable to find the a category in the the defaultCategories.");return function(s,l){switch(s){case"(idle)":return{category:a,isJS:!1,relevantForJS:!1};case"(root)":case"(program)":return{category:o,isJS:!1,relevantForJS:!1};case"(garbage collector)":return{category:r,isJS:!1,relevantForJS:!1};default:return!l&&s!=="<WASM UNNAMED>"&&s!=="(unresolved function)"?{category:n,isJS:!1,relevantForJS:!0}:{category:t,isJS:!0,relevantForJS:!1}}}}async function k$(e,t){let r=Po();r.meta.categories=[{name:"Other",color:"grey",subcategories:["Other"]},{name:"Idle",color:"transparent",subcategories:["Other"]},{name:"JavaScript",color:"yellow",subcategories:["Other"]},{name:"GC / CC",color:"orange",subcategories:["Other"]},{name:"Graphics",color:"green",subcategories:["Other"]},{name:"Native",color:"blue",subcategories:["Other"]}],r.meta.product="Chrome Trace",r.meta.importedFrom="Chrome Trace",r.meta.interval=.5;let n=new an,o=n.getStringTable(),a=n.getFrameTable(),i=n.getStackTable(),s=e.get("Profile")||[];if(e.has("CpuProfile")){let f=e.get("CpuProfile");s=s.concat(f)}let l=w$(W(r.meta.categories)),c=new Map,u=new Map;for(let f of s){let p=sh(c,u,e,r,f),{thread:h,nodeIdToStackId:y}=p,b=[];if(f.name==="Profile"){p.lastSeenTime=f.args.data.startTime/1e3;let{id:m,pid:g}=f;b=I$(e,"ProfileChunk",T=>T.id===m&&T.pid===g)}else f.name==="CpuProfile"&&(p.lastSeenTime=r.meta.profilingStartTime=f.args.data.cpuProfile.startTime/1e3,r.meta.profilingEndTime=f.args.data.cpuProfile.endTime/1e3,b=[f]);for(let m of b){if(!m.args.data||!m.args.data.cpuProfile)continue;let{cpuProfile:g}=m.args.data,{nodes:T,samples:S}=g,I=v$(m);if(!I)continue;let{samples:v}=h;if(T){let w=new Map;for(let k of T){let{callFrame:N,id:R}=k,F;if(k.parent!==void 0?F=k.parent:F=w.get(R),k.children!==void 0){let H=k.children;for(let z=0;z<H.length;z++)w.set(H[z],R)}let{url:G,lineNumber:B,columnNumber:Z}=N;B===-1&&(B=void 0),Z===-1&&(Z=void 0),B!==void 0&&B++,Z!==void 0&&Z++,G===""&&(G=void 0);let{functionName:X}=N,{category:_e,isJS:D,relevantForJS:re}=l(X,G!==void 0||B!==void 0),E=o.indexForString(X!==""?X:"(anonymous)"),A=D&&G?n.indexForSource(null,G):null,M=D?n.indexForURIResource(G||"<unknown>"):-1,P=n.indexForFunc(E,D,re,M,A,B===void 0?null:B,Z===void 0?null:Z),$=R-1,J=y.get(F);if(J===void 0)throw new Error("Unable to find the prefix stack index from a node index.");a.address[$]=-1,a.category[$]=_e,a.subcategory[$]=0,a.func[$]=P,a.nativeSymbol[$]=null,a.innerWindowID[$]=0,a.line[$]=B===void 0?null:B,a.column[$]=Z===void 0?null:Z,a.length=Math.max(a.length,$+1),i.frame.push($),i.prefix.push(J),y.set(R,i.length++)}}for(let w=0;w<S.length;w++){let k=S[w];if(p.lastSeenTime+=I[w]/1e3,p.lastSeenTime-p.lastSampledTime>=r.meta.interval){p.lastSampledTime=p.lastSeenTime;let N=W(y.get(k),"Could not find the stack information for a sample when decoding a Chrome profile.");W(v.eventDelay,"Could not find the eventDelay in samplesTable inside the newly created Chrome profile thread.").push(null),v.stack.push(N),W(v.time).push(p.lastSampledTime),v.length++}}}}if(E$(i),await _$(c,u,e,r,e.get("Screenshot")??[],o),N$(c,u,e,r,o),r.meta.profilingStartTime===void 0&&r.meta.profilingEndTime===void 0&&e.has("TracingStartedInBrowser")){let f=W(e.get("TracingStartedInBrowser"))[0];if(f.ts!==void 0&&Number.isFinite(f.ts)){let p=-1/0;r.threads.forEach(h=>{let y=Fa(h,r.meta.interval);p=Math.max(p,y.end)}),r.meta.profilingStartTime=f.ts/1e3,r.meta.profilingEndTime=p}}if(t){let f=/(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})/g,p,h;for(;(h=f.exec(t))!==null;)p=h;if(p){let[,y,b,m,g,T,S]=p,I=`${y}-${b}-${m}T${g}:${T}:${S}`,v=new Date(I);r.meta.startTime=v.getTime()-(r.meta.profilingStartTime??0)}}r.threads.sort((f,p)=>{let h=u.get(f),y=u.get(p);if(!h||!y)throw console.error({threadA:f,threadB:p}),new Error("Unexpected thread");if(h.pid===y.pid){if(h.threadSortIndex!==y.threadSortIndex)return h.threadSortIndex-y.threadSortIndex}else if(h.processSortIndex!==y.processSortIndex)return h.processSortIndex-y.processSortIndex;return h.tieBreakerIndex-y.tieBreakerIndex});let{shared:d}=n.finish();return r.shared=d,r}async function _$(e,t,r,n,o,a){if(o.length===0)return;let{thread:i}=sh(e,t,r,n,o[0]),s=W(n.meta.categories).findIndex(l=>l.name==="Graphics");if(s===-1)throw new Error("Could not find the Graphics category in the profile's category list.");for(let l of o){let c="data:image/jpg;base64,"+l.args.snapshot,u=await C$(c);u!==null&&(i.markers.data.push({type:"CompositorScreenshot",url:a.indexForString(c),windowID:"id",windowWidth:u.width,windowHeight:u.height}),i.markers.name.push(a.indexForString("CompositorScreenshot")),i.markers.startTime.push(l.ts/1e3),i.markers.endTime.push(null),i.markers.phase.push(0),i.markers.category.push(s),i.markers.length++)}}function C$(e){return new Promise(t=>{let r=new Image;r.src=e,r.addEventListener("load",()=>{t({width:r.width,height:r.height})}),r.addEventListener("error",()=>{t(null)})})}function E$(e){let t=new Set([null]);for(let r=0;r<e.length;r++){if(!t.has(e.prefix[r]))throw new Error("The stack ordering is incorrect");t.add(r)}}function N$(e,t,r,n,o){let a=W(n.meta.categories).findIndex(u=>u.name==="Other");if(a===-1)throw new Error('No "Other" category in empty profile category list');let i=new Map,s=W(n.meta.categories);for(let u=0;u<s.length;u++)i.set(s[u].name,u);function l(u){let d=i.get(u);if(d!==void 0)return d;let f=s.length;return s.push({name:u,color:"grey",subcategories:["Other"]}),i.set(u,f),f}n.meta.markerSchema=[{name:"EventDispatch",chartLabel:"{marker.data.type2}",tooltipLabel:"{marker.data.type2} - EventDispatch",tableLabel:"{marker.data.type2}",display:["marker-chart","marker-table","timeline-overview"],fields:[{key:"type2",label:"Event Type",format:"string"}]}];let c=!1;for(let[u,d]of r.entries())if(!(u==="Profile"||u==="ProfileChunk"||u==="CpuProfile")){for(let f of d)if(!(f.ts===void 0||!Number.isFinite(f.ts))&&(f.ph==="X"&&f.dur!==void 0&&Number.isFinite(f.dur)||f.ph==="B"||f.ph==="E"||f.ph==="b"||f.ph==="n"||f.ph==="e"||f.ph==="i"||f.ph==="I"||f.ph==="R")){let p=f.ts/1e3,h=sh(e,t,r,n,f),{thread:y}=h,{markers:b}=y,m=null;"args"in f&&f.args&&typeof f.args=="object"&&(f.args.data?m=f.args.data:"detail"in f.args&&typeof f.args.detail=="string"&&(m={detail:f.args.detail})),b.name.push(o.indexForString(u)),m&&"type"in m&&(m.type2=m.type),m&&"category"in m&&(m.category2=m.category),m!=null&&m.detail&&!c&&(n.meta.markerSchema.push({name:"EventWithDetail",chartLabel:"{marker.data.detail}",tooltipLabel:"{marker.name}: {marker.data.detail}",tableLabel:"{marker.data.detail}",display:["marker-chart","marker-table"],fields:[{key:"detail",label:"Details",format:"string"}]}),c=!0);let g=m?{...m,type:m!=null&&m.detail?"EventWithDetail":u}:null,T=f.cat?l(f.cat):a;if(b.category.push(T),b.data.push(g),f.ph==="X"){let S=f.dur/1e3;b.phase.push(1),b.startTime.push(p),b.endTime.push(p+S)}else f.ph==="B"||f.ph==="b"?(b.startTime.push(p),b.endTime.push(null),b.phase.push(2)):f.ph==="E"||f.ph==="e"?(b.startTime.push(null),b.endTime.push(p),b.phase.push(3)):(b.startTime.push(p),b.endTime.push(null),b.phase.push(0));b.length++}}}rr();xe();function qv(e){if(!e||typeof e!="object"||!("dhatFileVersion"in e)||typeof e.dhatFileVersion!="number")return null;let{dhatFileVersion:t}=e;if(t!==2)throw new Error(`This importer only supports dhat version 2. The file provided was version ${t}.`);let r=e,n=Po();n.meta.product=r.cmd+" (dhat)",n.meta.importedFrom="dhat";let o=new an,a=o.getStringTable(),i=Lc(),{funcTable:s,stackTable:l,frameTable:c}=n.shared,u=new Map,d=0,f=0;s.name.push(a.indexForString(r.cmd)),s.isJS.push(!1),s.relevantForJS.push(!1),s.resource.push(-1),s.source.push(null),s.lineNumber.push(null),s.columnNumber.push(null);let p=s.length++;c.address.push(-1),c.line.push(null),c.column.push(null),c.category.push(d),c.subcategory.push(f),c.innerWindowID.push(null),c.nativeSymbol.push(null),c.inlineDepth.push(0),c.func.push(p);let h=c.length++;l.frame.push(h),l.prefix.push(null);let y=l.length++;for(let v of r.ftbl){let w=r.cmd,k=-1,N=null,R=null,F=v.match(/^0x([0-9a-f]+): (.+) \((?:in )?(.+?)(?::(\d+))?(?::(\d+))?\)$/i);F&&(k=parseInt(F[1],16),v=F[2],w=F[3],N=F[4]?Number(F[4]):null,R=F[5]?Number(F[5]):null);let G=`${v} ${w}`,B=u.get(G);B===void 0&&(s.name.push(a.indexForString(v)),s.isJS.push(!1),s.relevantForJS.push(!1),s.resource.push(-1),s.source.push(o.indexForSource(null,w)),s.lineNumber.push(N),s.columnNumber.push(R),B=s.length++,u.set(G,B)),c.address.push(k),c.line.push(N),c.column.push(R),c.category.push(d),c.subcategory.push(f),c.innerWindowID.push(null),c.nativeSymbol.push(null),c.inlineDepth.push(0),c.func.push(B),c.length++}let b=[],m=[],g=[],T=[],S=new Map;for(let v of r.pps){let w=0,k=y;for(let N=v.fs.length-1;N>=0;N--){let R=v.fs[N]+1,F=W(c.func[R],"Expected to find a funcIndex from a frameIndex");w=l.length;let G=S.get(k);if(G)for(let B of G){let Z=l.frame[B];if(c.func[Z]===F){w=B;break}}w===l.length&&(l.frame.push(R),l.prefix.push(k),G?G.push(w):S.set(k,[w]),l.length++),k=w}b.push(v.tb),m.push(v.mb),g.push(v.gb),T.push(v.eb),i.time.push(0),i.stack.push(w),i.length++}n.threads=[{name:"Total Bytes",weight:b},{name:"Maximum Bytes",weight:m},{name:"Bytes at Global Max",weight:g},{name:"Bytes at End",weight:T}].map(({name:v,weight:w},k)=>{let N=Ra();return N.pid=r.pid,N.tid=k,N.name=v,N.nativeAllocations={time:i.time.slice(),stack:i.stack.slice(),weight:w,weightType:"bytes",length:i.length},N});let{shared:I}=o.finish();return n.shared=I,n}var _u=class{_libs;_libRanges;constructor(t){this._libs=t,this._libRanges=t.map(r=>{let n=BigInt(r.start),o=BigInt(r.offset),a=BigInt(r.end);return{baseAddress:n-o,start:n,end:a}})}locateAddress(t){let r=BigInt(t),n=this._libRanges,o=0,a=n.length-1;for(;o<=a;){let i=(o+a)/2|0;if(r>=n[i].end)o=i+1;else if(r<n[i].start)a=i-1;else{let s=i,l=r-n[s].baseAddress;return{lib:this._libs[s],relativeAddress:Number(l)}}}return{lib:null,relativeAddress:parseInt(t,16)}}};rr();xe();lh();function zv(e,t,r){function n(i,s){if(i!==s){for(let l in e)if(l!=="length"){let c=e[l],u=c[i];c[i]=c[s],c[s]=u}}}function o(i,s,l){let c=t[i],u=s,d=i;for(let f=s;f<=l;f++)r(t[f],c)<0&&(n(f,u),u===d&&(d=f),u++);return n(u,d),u}function a(i,s){if(i<s){let l=i+s>>1,c=o(l,i,s);a(i,c-1),a(c+1,s)}}return a(0,e.length-1),e}ur();cr();var A$=0;function Yv(e,t){if(!e||typeof e!="object")return null;let{meta:r}=e;if(!r||typeof r!="object")return null;if(typeof r.preprocessedProfileVersion!="number"){let{threads:a}=e;if(!a||!Array.isArray(a))return null;let[i]=a;if(!i||typeof i!="object"||!i.stringArray)return null}let n=typeof r.preprocessedProfileVersion=="number"?r.preprocessedProfileVersion:A$;if(n===62)return e;if(n>62)throw new Error(`Unable to parse a processed profile of version ${n}, most likely profiler.firefox.com needs to be refreshed. The most recent version understood by this version of profiler.firefox.com is version ${62}.
662
- You can try refreshing this page in case profiler.firefox.com has updated in the meantime.`);for(let a=n+1;a<=62;a++)a in Jv&&Jv[a](e,t);let o=e;return o.meta.preprocessedProfileVersion=62,o}function P$(e){return e==="x86_64-gcc3"?"x86_64":e}function R$(e){if(e){let t=e.split(" -> ");return t[t.length-1]}return e}function Kv(e){for(let t of e.threads)for(let r=0;r<t.markers.length;r++){let n=t.markers.data[r],o=t.processType==="default"?0:t.processStartupTime;if(n){if("stack"in n&&n.stack&&n.stack.samples.data.length>0){let a=n.stack,i=a.samples.data[0][a.samples.schema.stack],s=a.samples.data[0][a.samples.schema.time];i!==null&&(n.cause={time:s+o,stack:i})}delete n.stack}}}function Zv(e){let t=[["DOMEvent","DOM"],["Navigation::DOMComplete","DOM"],["Navigation::DOMInteractive","DOM"],["Navigation::Start","DOM"],["UserTiming","DOM"],["CC","GC / CC"],["GCMajor","GC / CC"],["GCMinor","GC / CC"],["GCSlice","GC / CC"],["Paint","Graphics"],["VsyncTimestamp","Graphics"],["CompositorScreenshot","Graphics"],["JS allocation","JavaScript"],["Styles","Layout"],["nsRefreshDriver::Tick waiting for paint","Layout"],["Navigation","Network"],["Network","Network"],["firstLoadURI","Other"],["IPC","Other"],["Text","Other"],["MainThreadLongTask","Other"],["FileIO","Other"],["Log","Other"],["PreferenceRead","Other"],["BHR-detected hang","Other"],["MainThreadLongTask","Other"]];for(let o of[{name:"Idle",color:"transparent",subcategories:["Other"]},{name:"Other",color:"grey",subcategories:["Other"]},{name:"Layout",color:"purple",subcategories:["Other"]},{name:"JavaScript",color:"yellow",subcategories:["Other"]},{name:"GC / CC",color:"orange",subcategories:["Other"]},{name:"Network",color:"lightblue",subcategories:["Other"]},{name:"Graphics",color:"green",subcategories:["Other"]},{name:"DOM",color:"blue",subcategories:["Other"]}])e.meta.categories.findIndex(i=>i.name===o.name)===-1&&e.meta.categories.push(o);let r=e.meta.categories.findIndex(o=>o.name==="Other"),n=new Map(t.map(([o,a])=>{let i=e.meta.categories.findIndex(s=>s.name===a);if(i===-1)throw new Error("Could not find a category index to map to.");return[o,i]}));for(let o of e.threads){let{markers:a,stringArray:i}=o;a.category||(a.category=[]);for(let s=0;s<a.length&&typeof a.category[s]!="number";s++){let l=a.name[s],c=a.data[s],u=i[l];c&&c.type&&(u=c.type==="tracing"?c.category:c.type);let d=n.get(u);d===void 0&&(d=r),a.category[s]=d}}}var Jv={1:e=>{Gt("sorting thread markers",()=>{for(let t of e.threads)zv(t.markers,t.markers.time,(r,n)=>r-n)});for(let t of e.threads)"processType"in t||(t.name==="Content"?(t.processType="tab",t.name="GeckoMain"):t.name==="Plugin"?t.processType="plugin":t.processType="default")},2:e=>{for(let t of e.threads)for(let r of t.libs)"debugName"in r||(r.debugName=r.pdbName,r.path=r.name,r.name=r.debugName.endsWith(".pdb")?r.debugName.substr(0,r.debugName.length-4):r.debugName,r.arch=P$(e.meta.abi),delete r.pdbName,delete r.pdbAge,delete r.pdbSignature)},3:e=>{for(let t of e.threads)for(let r of t.libs)r.debugPath=r.debugPath||""},4:e=>{e.threads.forEach(t=>{let{funcTable:r,stringArray:n,resourceTable:o}=t,a=$e.withBackingArray(n),i={length:0,type:[],name:[],lib:[],icon:[],addonId:[],host:[]};function s(f,p){let h=i.length++;i.type[h]=1,i.name[h]=f,i.lib[h]=p}function l(f,p){let h=i.length++;i.type[h]=3,i.name[h]=f,i.host[h]=p}function c(f){let p=i.length++;i.type[p]=5,i.name[p]=f}let u=new Map,d=new Map;for(let f=0;f<o.length;f++)if(o.type[f]===1)u.set(f,i.length),s(o.name[f],o.lib[f]);else if(o.type[f]===5){let p=a.getString(o.name[f]),h=null,y,b;try{let m=new URL(p);if(!(m.protocol==="http:"||m.protocol==="https:"))throw new Error("not a webhost protocol");y=m.origin,b=m.host}catch{y=p,b=null}if(d.has(y))h=d.get(y);else{h=i.length,d.set(y,h);let m=a.indexForString(y);if(b){let g=a.indexForString(b);l(m,g)}else{let g=a.indexForString(p);c(g)}}u.set(f,h)}r.fileName=[],r.lineNumber=[];for(let f=0;f<r.length;f++){let p=r.resource[f];u.has(p)&&(r.resource[f]=u.get(p));let h=null,y=null;if(r.isJS[f]){let b=a.getString(r.name[f]),m=/^(.*) \((.*):([0-9]+)\)$/.exec(b)||/^()(.*):([0-9]+)$/.exec(b);if(m){let g=R$(m[2]);m[1]?r.name[f]=a.indexForString(m[1]):r.name[f]=a.indexForString(g),h=a.indexForString(g),y=Number(m[3])|0}}r.fileName[f]=h,r.lineNumber[f]=y}t.resourceTable=i})},5:e=>{for(let t of e.threads)delete t.samples.frameNumber},6:e=>{for(let t of e.threads){let{stringArray:r,markers:n}=t,o=[];for(let a=0;a<n.length;a++){let i=r[n.name[a]],s=n.data[a];i==="DOMEvent"?o[a]={type:"DOMEvent",startTime:s.startTime,endTime:s.endTime,eventType:s.type,phase:s.phase}:o[a]=s}t.markers.data=o}},7:e=>{for(let t of e.threads)t.pausedRanges=[],t.processStartupTime=0,t.processShutdownTime=null,t.registerTime=0,t.unregisterTime=null},8:e=>{for(let t of e.threads){if(t.processType==="default")continue;let{stringArray:r,markers:n}=t,o=[];for(let a=0;a<n.length;a++){let i=r[n.name[a]],s=n.data[a];i==="DOMEvent"&&s.timeStamp?o[a]={type:"DOMEvent",startTime:s.startTime,endTime:s.endTime,timeStamp:s.timeStamp+t.processStartupTime,eventType:s.eventType,phase:s.phase}:o[a]=s}t.markers.data=o}},9:e=>{function t(a){if("timings"in a&&!("status"in a.timings)){let i=a.timings;i.status="completed",Array.isArray(i.sices)&&(i.slices_list=i.slices,i.slices=i.slices.length),i.allocated_bytes=i.allocated*1024*1024}return a}function r(a){let i=t(a),s=i.timings;switch(s.status){case"completed":{let{totals:l,...c}=s,u={...c,phase_times:o(l),mmu_20ms:s.mmu_20ms/100,mmu_50ms:s.mmu_50ms/100};return{type:"GCMajor",startTime:i.startTime,endTime:i.endTime,timings:u}}case"aborted":return{type:"GCMajor",startTime:i.startTime,endTime:i.endTime,timings:{status:"aborted"}};default:throw console.log("Unknown GCMajor status"),new Error("Unknown GCMajor status")}}function n(a){if("nursery"in a){if("status"in a.nursery)return a.nursery.status==="no collection"&&(a.nursery.status="nursery empty"),Object.assign(a);let i=Object.assign(a,{nursery:Object.assign(a.nursery,{status:"complete",bytes_used:a.nursery.nursery_bytes,new_capacity:a.nursery.new_nursery_bytes,phase_times:a.nursery.timings})});return delete i.nursery.nursery_bytes,delete i.nursery.new_nursery_bytes,delete i.nursery.timings,i}return a}function o(a){let i={};for(let s in a)i[s]=a[s]*1e3;return i}for(let a of e.threads)for(let i=0;i<a.markers.length;i++){let s=a.markers.data[i];if(s){switch(s.type){case"GCMinor":s=n(s);break;case"GCSlice":s.timings&&s.timings.times&&(s.timings.phase_times=o(s.timings.times),delete s.timings.times);break;case"GCMajor":s=r(s);break;default:break}a.markers.data[i]=s}}},10:e=>{Kv(e)},11:e=>{for(let t of e.threads){let{stringArray:r,markers:n}=t;if(n.length===0)continue;let o=[];for(let a=0;a<n.length;a++){let i=r[n.name[a]],s=n.data[a];i==="DOMEvent"&&(n.data[a]={type:"tracing",category:"DOMEvent",timeStamp:s.timeStamp,interval:"start",eventType:s.eventType,phase:s.phase},o.push({data:{type:"tracing",category:"DOMEvent",timeStamp:s.timeStamp,interval:"end",eventType:s.eventType,phase:s.phase},time:s.endTime,name:n.name[a]}))}if(o.length>0){o.sort((u,d)=>u.time-d.time);let a={length:0,name:[],time:[],data:[]},i=0,s=n.time[0],l=0,c=o[0].time;for(;i<n.length||l<o.length;)s<=c?(a.name.push(n.name[i]),a.time.push(n.time[i]),a.data.push(n.data[i]),a.length++,i++,s=i<n.length?n.time[i]:1/0):(a.name.push(o[l].name),a.time.push(o[l].time),a.data.push(o[l].data),a.length++,l++,c=l<o.length?o[l].time:1/0);t.markers=a}}},12:e=>{e.meta.categories=[{name:"Idle",color:"transparent"},{name:"Other",color:"grey"},{name:"JavaScript",color:"yellow"},{name:"Layout",color:"purple"},{name:"Graphics",color:"green"},{name:"DOM",color:"blue"},{name:"GC / CC",color:"orange"},{name:"Network",color:"lightblue"}];let t=0,r=1,n=2,o=3,a=4,i=5,s=6,c={16:r,32:o,64:n,128:s,256:s,512:7,1024:a,2048:r,4096:r},u=new Map([["-[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]",t],["base::MessagePumpDefault::Run(base::MessagePump::Delegate*)",t],["mozilla::widget::WinUtils::WaitForMessage(unsigned long)",t],["mozilla::ThreadEventQueue<mozilla::PrioritizedEventQueue<mozilla::LabeledEventQueue> >::GetEvent(bool,mozilla::EventPriority *)",t],["mozilla::ThreadEventQueue<mozilla::PrioritizedEventQueue<mozilla::EventQueue> >::GetEvent(bool,mozilla::EventPriority *)",t],["mozilla::ThreadEventQueue<mozilla::EventQueue>::GetEvent(bool,mozilla::EventPriority *)",t],["mozilla::layers::PaintThread::AsyncPaintContents(mozilla::layers::CompositorBridgeChild *,mozilla::layers::CapturedPaintState *,bool (*)(mozilla::layers::CapturedPaintState *))",a],["PresShell::DoFlushPendingNotifications InterruptibleLayout",o],["nsRefreshDriver::Tick",o],["nsLayoutUtils::GetFrameForPoint",o],["nsAppShell::ProcessGeckoEvents",r],["PollWrapper(_GPollFD*, unsigned int, int)",t],["mozilla::image::DecodePoolImpl::PopWorkLocked(bool)",t],["nsCCUncollectableMarker::Observe(nsISupports*, char const*, char16_t const*)",s],["g_main_context_dispatch",r],["Events::ProcessGeckoEvents",r],["widget::ChildView::drawUsingOpenGL",r],["nsContentSink::StartLayout(bool)",o],["Paint::PresShell::Paint",a],["JS::EvaluateString",n],["js::RunScript",n]]),d=new Map([["PresShell::DoFlushPendingNotifications",o],["PresShell::DoReflow",o],["layout::DoReflow",o],["JS::Compile",n]]);function f(y){let b=y.indexOf(" ");return b===-1?y:y.substr(0,b)}function p(y){let b=u.get(y);return b!==void 0?b:d.get(f(y))}let h=/^(get |set )?\w+(\.\w+| constructor)$/;for(let y of e.threads){let{frameTable:b,funcTable:m,stringArray:g}=y;for(let T=0;T<b.length;T++){let S=b.func[T],I=g[m.name[S]],v=p(I);if(v!==void 0)b.category[T]=v;else{let w=b.category[T];if(w!==null)if(!m.isJS[S]&&h.test(I))b.category[T]=i;else{let k=w in c?c[w]:1;b.category[T]=k}}}}},13:e=>{let{meta:t,threads:r}=e,n=t.categories.findIndex(o=>o.color==="grey");for(let o of r){let{stackTable:a,frameTable:i}=o;a.category=new Array(a.length);for(let s=0;s<a.length;s++){let l=a.frame[s],c=i.category[l];if(c!==null)a.category[s]=c;else{let u=a.prefix[s];u!==null?a.category[s]=a.category[u]:a.category[s]=n}}}},14:e=>{let{threads:t}=e;for(let r=0;r<t.length;r++){let n=t[r];(n.pid===null||n.pid===void 0)&&(n.pid=`Unknown Process ${r+1}`)}},15:e=>{for(let t of e.threads){t.frameTable.column=new Array(t.frameTable.length);for(let r=0;r<t.frameTable.length;r++)t.frameTable.column[r]=null}},16:e=>{for(let t of e.threads){let{stringArray:r,markers:n}=t,o=[];for(let a=0;a<n.length;a++){let i=r[n.name[a]],s=n.data[a];switch(i){case"VsyncTimestamp":o[a]={type:"VsyncTimestamp",vsync:s.vsync};break;case"LayerTranslation":o[a]={type:"LayerTranslation",layer:s.layer,x:s.x,y:s.y};break;case"CompositorScreenshot":o[a]={type:"CompositorScreenshot",url:s.url,windowID:s.windowID,windowWidth:s.windowWidth,windowHeight:s.windowHeight};break;default:o[a]=s;break}}t.markers.data=o}},17:e=>{let t=/^(get |set )?\w+(\.\w+| constructor)$/;for(let r of e.threads){let{funcTable:n,stringArray:o}=r,a=$e.withBackingArray(o);n.relevantForJS=new Array(n.length);for(let i=0;i<n.length;i++){let s=a.getString(n.name[i]);s.startsWith("AutoEntryScript ")?(n.name[i]=a.indexForString(s.substring(16)),n.relevantForJS[i]=!0):n.relevantForJS[i]=t.test(s)}}},18:e=>{for(let t of e.threads){let{funcTable:r,stringArray:n}=t,o=$e.withBackingArray(n);r.columnNumber=[];for(let a=0;a<t.funcTable.length;a++)if(r.columnNumber[a]=null,r.isJS[a]){let i=r.fileName[a];if(i!==null){let s=o.getString(i),l=/^(.*):([0-9]+)$/.exec(s);l&&(r.columnNumber[a]=r.lineNumber[a],r.fileName[a]=o.indexForString(l[1]),r.lineNumber[a]=parseInt(l[2],10))}}}},19:e=>{for(let t of e.threads){let r=t.markers,n=t.processStartupTime;for(let o=0;o<t.markers.length;o++){let a=r.data[o];a&&"type"in a&&a.type==="Network"&&(a.domainLookupStart&&(a.domainLookupStart+=n),a.domainLookupEnd&&(a.domainLookupEnd+=n),a.connectStart&&(a.connectStart+=n),a.tcpConnectEnd&&(a.tcpConnectEnd+=n),a.secureConnectionStart&&(a.secureConnectionStart+=n),a.connectEnd&&(a.connectEnd+=n),a.requestStart&&(a.requestStart+=n),a.responseStart&&(a.responseStart+=n),a.responseEnd&&(a.responseEnd+=n))}}},20:e=>{},21:e=>{Kv(e)},22:e=>{for(let t of e.threads){let{stringArray:r}=t,n=$e.withBackingArray(r);if(!n.hasString("DiskIO"))continue;let o=n.indexForString("FileIO");for(let a=0;a<t.markers.length;a++){let i=t.markers.data[a];i&&i.type==="DiskIO"&&(i.type="FileIO",t.markers.name[a]=o)}}},23:e=>{for(let t of e.meta.categories)t.subcategories=["Other"];for(let t of e.threads){let{frameTable:r,stackTable:n}=t;r.subcategory=r.category.map(o=>o===null?null:0),n.subcategory=n.category.map(o=>o===null?null:0)}},24:e=>{Zv(e)},25:e=>{if(e.pages&&e.pages.length>0){let t=new Map,r=new Map,n=1,o=1;for(let a of e.pages){t.set(`d${a.docshellId}h${a.historyId}`,o);let i=r.get(a.docshellId);i||(i=n++,r.set(a.docshellId,i)),a.browsingContextID=i,a.innerWindowID=o,a.embedderInnerWindowID=0,o++,delete a.docshellId,delete a.historyId,delete a.isSubFrame}for(let a of e.threads){let{markers:i}=a;i.data=i.data.map(s=>{if(s&&s.docShellId!==void 0&&s.docshellHistoryId!==void 0){let l=t.get(`d${s.docShellId}h${s.docshellHistoryId}`);l===void 0?console.error("No page found with given docShellId and historyId"):s.innerWindowID=l,delete s.docShellId,delete s.docshellHistoryId}return s})}}},26:e=>{if(e.counters&&e.counters.length>0)for(let t of e.counters)t.sampleGroups=[t.sampleGroups]},27:e=>{for(let t of e.threads){let{frameTable:r}=t;r.innerWindowID=new Array(r.length).fill(0)}},28:e=>{for(let t of e.threads){let{markers:r}=t;if(r.category[0]===null){Zv(e);return}}},29:e=>{for(let t of e.threads)t.samples.duration&&(t.samples.weightType="samples",t.samples.weight=t.samples.duration,delete t.samples.duration),t.nativeAllocations&&(t.nativeAllocations.weightType="bytes",t.nativeAllocations.weight=t.nativeAllocations.duration,delete t.nativeAllocations.duration),t.jsAllocations&&(t.jsAllocations.weightType="bytes",t.jsAllocations.weight=t.jsAllocations.duration,delete t.jsAllocations.duration),t.samples.weight||(t.samples.weight=null),t.samples.weightType||(t.samples.weightType="samples")},30:e=>{for(let{markers:a}of e.threads){let i=a.time,s=[],l=[],c=[];delete a.time,a.startTime=s,a.endTime=l,a.phase=c;for(let u=0;u<a.length;u++){let d=a.data[u],f=i[u],p=f,h=null,y=0;if(d){let{startTime:b,endTime:m,type:g,interval:T}=d;g==="tracing"?T==="start"?(p=f,h=null,y=2):(p=null,h=f,y=3):b!==m&&typeof b=="number"&&typeof m=="number"&&(p=b,h=m,y=1),d.type!=="IPC"&&d.type!=="Network"&&(delete d.startTime,delete d.endTime)}s.push(p),l.push(h),c.push(y)}}},31:e=>{for(let{markers:r}of e.threads)for(let n=0;n<r.length;n++){let o=r.data[n];if(o){let{type:a,interval:i}=o;a==="tracing"&&i!=="start"&&i!=="end"&&(r.phase[n]=0,r.startTime[n]=r.endTime[n],r.endTime[n]=null)}}},32:e=>{for(let{markers:t}of e.threads)for(let r=0;r<t.length;r++){let n=t.data[r];if(n&&n.type==="tracing"&&n.category==="DOMEvent"){let o=t.startTime[r];n.type="DOMEvent",n.timeStamp!==void 0&&o!==null&&(n.latency=o-n.timeStamp),delete n.timeStamp}}},33:e=>{e.meta.markerSchema=[{name:"GCMajor",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"GCMinor",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"GCSlice",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"CC",tooltipLabel:"Cycle Collect",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"FileIO",display:["marker-chart","marker-table"],data:[{key:"operation",label:"Operation",format:"string",searchable:!0},{key:"source",label:"Source",format:"string",searchable:!0},{key:"filename",label:"Filename",format:"file-path",searchable:!0}]},{name:"MediaSample",display:["marker-chart","marker-table"],data:[{key:"sampleStartTimeUs",label:"Sample start time",format:"microseconds"},{key:"sampleEndTimeUs",label:"Sample end time",format:"microseconds"}]},{name:"Styles",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"elementsTraversed",label:"Elements traversed",format:"integer"},{key:"elementsStyled",label:"Elements styled",format:"integer"},{key:"elementsMatched",label:"Elements matched",format:"integer"},{key:"stylesShared",label:"Styles shared",format:"integer"},{key:"stylesReused",label:"Styles reused",format:"integer"}]},{name:"PreferenceRead",display:["marker-chart","marker-table"],data:[{key:"prefName",label:"Name",format:"string"},{key:"prefKind",label:"Kind",format:"string"},{key:"prefType",label:"Type",format:"string"},{key:"prefValue",label:"Value",format:"string"}]},{name:"UserTiming",tooltipLabel:"{marker.data.name}",chartLabel:"{marker.data.name}",tableLabel:"{marker.data.name}",display:["marker-chart","marker-table"],data:[{label:"Marker",value:"UserTiming"},{key:"entryType",label:"Entry Type",format:"string"},{label:"Description",value:"UserTiming is created using the DOM APIs performance.mark() and performance.measure()."}]},{name:"Text",tableLabel:"{marker.name} \u2014\xA0{marker.data.name}",chartLabel:"{marker.name} \u2014\xA0{marker.data.name}",display:["marker-chart","marker-table"],data:[{key:"name",label:"Details",format:"string"}]},{name:"Log",display:["marker-table"],tableLabel:"({marker.data.module}) {marker.data.name}",data:[{key:"module",label:"Module",format:"string"},{key:"name",label:"Name",format:"string"}]},{name:"DOMEvent",tooltipLabel:"{marker.data.eventType} \u2014 DOMEvent",tableLabel:"{marker.data.eventType}",chartLabel:"{marker.data.eventType}",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"latency",label:"Latency",format:"duration"}]},{name:"Paint",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"Navigation",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"Layout",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"IPC",tooltipLabel:"IPC \u2014\xA0{marker.data.niceDirection}",tableLabel:"{marker.name} \u2014 {marker.data.messageType} \u2014 {marker.data.niceDirection}",chartLabel:"{marker.data.messageType}",display:["marker-chart","marker-table","timeline-ipc"],data:[{key:"messageType",label:"Type",format:"string"},{key:"sync",label:"Sync",format:"string"},{key:"sendThreadName",label:"From",format:"string"},{key:"recvThreadName",label:"To",format:"string"}]},{name:"RefreshDriverTick",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"name",label:"Tick Reasons",format:"string"}]},{name:"Network",display:["marker-table"],data:[]}]},34:e=>{for(let t of e.threads){let r=t.processStartupTime,{markers:n}=t;for(let o of n.data)o&&o.type!=="tracing"&&o.type!=="Styles"&&o.cause&&o.cause.time!==void 0&&(o.cause.time+=r)}},35:e=>{if(e.meta.configuration&&e.meta.configuration.activeBrowsingContextID&&(e.meta.configuration.activeTabID=e.meta.configuration.activeBrowsingContextID,delete e.meta.configuration.activeBrowsingContextID),e.pages&&e.pages.length>0)for(let t of e.pages)t.tabID=t.browsingContextID,delete t.browsingContextID},36:e=>{for(let t of e.threads){let r={libIndex:[],address:[],name:[],length:0},{frameTable:n,funcTable:o,resourceTable:a}=t,i=new Map;for(let s=0;s<o.length;s++){let l=o.resource[s];if(l===-1||a.type[l]!==1)continue;let u=a.lib[l];if(u==null||u===-1)continue;let d=o.address[s],f=r.length;r.libIndex.push(u),r.address.push(d===-1?null:d),r.name.push(o.name[s]),r.length++,i.set(s,f)}delete o.address,n.nativeSymbol=n.func.map(s=>i.get(s)??null),t.nativeSymbols=r}},37:e=>{for(let t of e.threads)t.name==="Java Main Thread"&&(t.name="AndroidUI (JVM)")},38:e=>{for(let t of e.threads){let r=new Set,n=new Set,{samples:o,markers:a,jsAllocations:i,nativeAllocations:s,stackTable:l,frameTable:c}=t;for(let g=0;g<o.length;g++){let T=o.stack[g];T!==null&&r.add(T)}for(let g=0;g<a.length;g++){let T=a.data[g];if(T&&T.cause){let S=T.cause.stack;S!==null&&n.add(S)}}if(i!==void 0)for(let g=0;g<i.length;g++){let T=i.stack[g];T!==null&&n.add(T)}if(s!==void 0)for(let g=0;g<s.length;g++){let T=s.stack[g];T!==null&&n.add(T)}let u=new Uint32Array(c.length),d=new Set;for(let g of r){let T=l.frame[g];u[T]=T,c.address[T]!==-1&&d.add(T)}let f=new Map,p=new Set;for(let g of n){let T=l.frame[g],S=c.address[T];S!==-1&&f.set(T,S)}for(let g=0;g<l.length;g++){let T=l.prefix[g];if(T===null||p.has(T))continue;p.add(T);let S=l.frame[T],I=c.address[S];I!==-1&&f.set(S,I)}if(d.size===0&&f.size===0)continue;for(let[g,T]of f){if(d.has(g)){let S=c.length;c.address.push(T),c.category.push(c.category[g]),c.subcategory.push(c.subcategory[g]),c.func.push(c.func[g]),c.nativeSymbol.push(c.nativeSymbol[g]),c.innerWindowID.push(c.innerWindowID[g]),c.implementation.push(c.implementation[g]),c.line.push(c.line[g]),c.column.push(c.column[g]),c.optimizations.push(c.optimizations[g]),c.length++,u[g]=S}c.address[g]=T-1}let h={frame:[],prefix:[],category:[],subcategory:[],length:0},y=new Map,b=new Map,m=new Uint32Array(l.length);for(let g=0;g<l.length;g++){let T=l.frame[g],S=l.category[g],I=l.subcategory[g],v=l.prefix[g],w=v===null?null:m[v];if(p.has(g)||n.has(g)){let k=h.length;h.frame.push(T),h.category.push(S),h.subcategory.push(I),h.prefix.push(w),h.length++,m[g]=k,b.set(g,k)}if(r.has(g)){let k=u[T],N=h.length;h.frame.push(k),h.category.push(S),h.subcategory.push(I),h.prefix.push(w),h.length++,y.set(g,N)}}t.stackTable=h,o.stack=o.stack.map(g=>g===null?null:y.get(g)??null),a.data.forEach(g=>{g&&"cause"in g&&g.cause&&(g.cause.stack=b.get(g.cause.stack))}),i!==void 0&&(i.stack=i.stack.map(g=>g===null?null:b.get(g)??null)),s!==void 0&&(s.stack=s.stack.map(g=>g===null?null:b.get(g)??null))}},39:e=>{for(let t of e.threads)t.samples.threadCPUDelta&&(t.samples.threadCPUDelta.some(n=>n!==null)||delete t.samples.threadCPUDelta)},40:e=>{for(let t of e.threads)t.frameTable.inlineDepth=Array(t.frameTable.length).fill(0)},41:e=>{let t=[],r=new Map;for(let n of e.threads){let{libs:o,resourceTable:a,nativeSymbols:i,stringArray:s}=n,l=$e.withBackingArray(s),c=new Map;delete n.libs;let u=d=>{let f=c.get(d);if(f===void 0){let p=o[d],{debugName:h,breakpadId:y}=p,b=`${h}/${y}`;if(f=r.get(b),f===void 0){f=t.length;let{arch:m,name:g,path:T,debugPath:S,codeId:I}=p;t.push({arch:m,name:g,path:T,debugName:h,debugPath:S,breakpadId:y,codeId:I??null}),r.set(b,f)}c.set(d,f)}return f};for(let d=0;d<a.length;d++){let f=a.name[d];(f===-1||f===void 0||f===null)&&(a.name[d]=l.indexForString("<unnamed resource>"));let p=a.host[d];(p===-1||p===void 0)&&(a.host[d]=null);let h=a.lib[d];if(h==null||h===-1){a.lib[d]=null;continue}let y=u(h);a.lib[d]=y}for(let d=0;d<i.length;d++){let f=i.libIndex[d],p=u(f);i.libIndex[d]=p}}e.libs=t},42:e=>{for(let t of e.threads){let{nativeSymbols:r}=t;r.functionSize=Array(r.length).fill(null)}},43:e=>{},44:e=>{for(let t of e.meta.markerSchema){let r;switch(t.name){case"FileIO":{t.data.push({key:"threadId",label:"Thread ID",format:"string",searchable:!0}),r=[];break}case"Log":{r=["name","module"];break}case"DOMEvent":{t.data.push({key:"eventType",label:"Event Type",format:"string",searchable:!0}),r=["target"];break}case"TraceEvent":{r=["name1","name2","val1","val2"];break}default:{r=["name","category"];break}}for(let n of t.data)r.includes(n.key)&&(n.searchable=!0)}},45:e=>{for(let t of e.threads)delete t.frameTable.optimizations},46:e=>{for(let t of e.threads)t.isMainThread=t.name==="GeckoMain"||typeof t.pid=="string"||String(t.pid)===t.tid},47:e=>{for(let t of e.threads){t.pid=`${t.pid}`;for(let r of t.markers.data)r&&r.type==="IPC"&&(r.otherPid=`${r.otherPid}`)}if(e.counters)for(let t of e.counters)t.pid=`${t.pid}`;if(e.profilerOverhead)for(let t of e.profilerOverhead)t.pid=`${t.pid}`},48:e=>{if(e.counters&&e.counters.length>0)for(let t of e.counters)t.samples=t.sampleGroups[0].samples,delete t.sampleGroups},49:e=>{},50:e=>{},51:e=>{},52:e=>{let t=new Set(e.meta.markerSchema.map(i=>i.name)),r="tracingCCFrom52Upgrader",n=t.has("CC"),o=!1,a=!1;for(let i of e.threads){let{markers:s}=i;for(let l=0;l<s.length;l++){let c=s.data[l];c&&c.type==="tracing"&&c.category&&(o=!0,n&&c.category==="CC"&&(c.type=r,a=!0,c.interval&&delete c.interval))}}o&&!t.has("tracing")&&e.meta.markerSchema.push({name:"tracing",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]}),a&&e.meta.markerSchema.push({name:r,display:["marker-chart","marker-table","timeline-memory"],data:[{key:"category",label:"Type",format:"string"}]})},53:e=>{for(let t of e.threads){let{frameTable:r,stackTable:n}=t;if(r.category)r.subcategory||(r.subcategory=new Array(r.length).fill(0));else{r.category=new Array(r.length).fill(null),r.subcategory=new Array(r.length).fill(null);for(let o=0;o<n.length;o++){let a=n.frame[o];r.category[a]=n.category[o],r.subcategory[a]=n.subcategory[o]}}delete n.category,delete n.subcategory}},54:e=>{function t(r){let{categories:n}=r.meta;if(!n||n.some(s=>s.subcategories.length!==1))return;let o=n.findIndex(s=>s.name==="JavaScript");if(o===-1)return;let a=n[o].subcategories,i=new Map;for(let s of r.threads){let{frameTable:l,stringArray:c}=s;for(let u=0;u<l.length;u++){let d=l.implementation[u];if(d===null)continue;let f=c[d],p=i.get(f);p===void 0&&(p=a.length,a[p]=`JIT (${f})`,i.set(f,p)),l.category[u]=o,l.subcategory[u]=p}}}t(e);for(let r of e.threads)delete r.frameTable.implementation;delete e.meta.doesNotUseFrameImplementation},55:e=>{for(let t of e.meta.markerSchema){let r=t.data.filter(l=>l.key===void 0),n=t.data.filter(l=>l.value===void 0);if(t.fields=n,delete t.data,r.length===0)continue;let o=r.findIndex(l=>l.label==="Description");o===-1&&(o=0);let a=r[o].value;t.description=a;let s=r.filter((l,c)=>c!==o).filter(l=>l.label!=="Marker"&&l.value!=="UserTiming");s.length!==0&&console.warn(`Discarding the following static fields from marker schema "${t.name}": ${s.map(l=>l.label+": "+l.value).join(", ")}`)}},56:e=>{let t=[],r=$e.withBackingArray(t),n=new Map;n.set("CompositorScreenshot",["url"]);for(let o of e.meta.markerSchema){let{name:a,fields:i}=o,s=[];for(let l of i)(l.format==="unique-string"||l.format==="flow-id"||l.format==="terminating-flow-id")&&s.push(l.key);s.length!==0&&n.set(a,s)}for(let o of e.threads){let{markers:a,funcTable:i,nativeSymbols:s,resourceTable:l,jsTracer:c,stringArray:u}=o;for(let d=0;d<a.length;d++){let f=u[a.name[d]];a.name[d]=r.indexForString(f);let p=a.data[d];if(!p||!p.type)continue;let h=n.get(p.type);if(h!==void 0)for(let y of h){let b=p[y],m=u[b];m!==void 0&&(p[y]=r.indexForString(m))}}for(let d=0;d<i.length;d++){i.name[d]=r.indexForString(u[i.name[d]]);let f=i.fileName[d];f!==null&&(i.fileName[d]=r.indexForString(u[f]))}for(let d=0;d<s.length;d++)s.name[d]=r.indexForString(u[s.name[d]]);for(let d=0;d<l.length;d++){l.name[d]=r.indexForString(u[l.name[d]]);let f=l.host[d];f!==null&&(l.host[d]=r.indexForString(u[f]))}if(c!==void 0)for(let d=0;d<c.length;d++)c.events[d]=r.indexForString(u[c.events[d]]);delete o.stringArray}e.shared={stringArray:t}},57:e=>{for(let t of e.meta.markerSchema)for(let r of t.fields)delete r.searchable},58:e=>{let t={length:0,id:[],filename:[]},r=new Map;for(let n of e.threads){let{funcTable:o}=n,a=new Array(o.length);for(let i=0;i<o.length;i++){let s=o.fileName[i];if(s===null)a[i]=null;else{let l=r.get(s);l===void 0&&(l=t.length,t.id.push(null),t.filename.push(s),t.length++,r.set(s,l)),a[i]=l}}o.source=a,delete o.fileName}e.shared||(e.shared={}),e.shared.sources=t},59:e=>{for(let t of e.threads){let{frameTable:r,markers:n}=t,o=new Set;for(let a=0;a<r.length;a++){let i=r.innerWindowID[a];i!==null&&i!==0&&o.add(i)}for(let a=0;a<n.length;a++){let i=n.data[a];if(!i||!("innerWindowID"in i))continue;let s=i.innerWindowID;typeof s=="number"&&s!==0&&o.add(s)}o.size!==0&&(t.usedInnerWindowIDs=Array.from(o))}},60:(e,t)=>{let r=new Map,n=new Map,o=new Map,a={frame:[],prefix:[],length:0},i={address:[],inlineDepth:[],category:[],subcategory:[],func:[],nativeSymbol:[],innerWindowID:[],line:[],column:[],length:0},s={name:[],isJS:[],relevantForJS:[],resource:[],source:[],lineNumber:[],columnNumber:[],length:0},l={type:[],lib:[],name:[],host:[],length:0},c={libIndex:[],address:[],name:[],functionSize:[],length:0};function u(g){let T=new Int32Array(g.length);for(let S=0;S<g.length;S++){let I=g.libIndex[S],v=g.address[S],w=`${I}-${v}`,k=o.get(w);k===void 0&&(k=c.length++,o.set(w,k),c.libIndex[k]=I,c.address[k]=v,c.name[k]=g.name[S],c.functionSize[k]=g.functionSize[S]),T[S]=k}return T}function d(g){let T=new Int32Array(g.length);for(let S=0;S<g.length;S++){let I=g.type[S],v=g.lib[S],w=g.name[S],k=g.host[S],N=`${I}-${v!==null?v:""}-${w}-${k!==null?k:""}`,R=n.get(N);R===void 0&&(R=l.length++,n.set(N,R),l.type[R]=I,l.lib[R]=v,l.name[R]=w,l.host[R]=k),T[S]=R}return T}function f(g,T){let S=new Int32Array(g.length);for(let I=0;I<g.length;I++){let v=g.name[I],w=g.isJS[I],k=g.relevantForJS[I],N=g.resource[I],R=N!==-1?T[N]:-1,F=g.source[I],G=g.lineNumber[I],B=g.columnNumber[I],Z=`${v}-${w}-${k}-${R}-${F!==null?F:""}-${G!==null?G:""}-${B!==null?B:""}`,X=r.get(Z);X===void 0&&(X=s.length++,r.set(Z,X),s.name[X]=v,s.isJS[X]=w,s.relevantForJS[X]=k,s.resource[X]=R,s.source[X]=F,s.lineNumber[X]=G,s.columnNumber[X]=B),S[I]=X}return S}function p(g,T,S){let I=i.length;for(let v=0;v<g.length;v++){let w=v+I;i.address[w]=g.address[v],i.inlineDepth[w]=g.inlineDepth[v],i.category[w]=g.category[v],i.subcategory[w]=g.subcategory[v],i.func[w]=T[g.func[v]];let k=g.nativeSymbol[v],N=k!==null?S[k]:null;i.nativeSymbol[w]=N,i.innerWindowID[w]=g.innerWindowID[v],i.line[w]=g.line[v],i.column[w]=g.column[v]}return i.length+=g.length,I}function h(g,T){let S=a.length;for(let I=0;I<g.length;I++){let v=I+S,w=g.frame[I]+T,k=g.prefix[I],N=k!==null?k+S:null;a.frame[v]=w,a.prefix[v]=N}return a.length+=g.length,S}function y(g,T){for(let S=0;S<g.length;S++){let I=g[S],v=I!==null?I+T:null;g[S]=v}}function b(g,T){for(let S=0;S<g.length;S++){let I=g.data[S];if(!I||!I.cause)continue;let v=I.cause.stack,w=v!=null?v+T:null;I.cause.stack=w}}let m=new Array;for(let g=0;g<e.threads.length;g++){let T=e.threads[g],S=u(T.nativeSymbols);delete T.nativeSymbols;let I=d(T.resourceTable);delete T.resourceTable;let v=f(T.funcTable,I);delete T.funcTable;let w=p(T.frameTable,v,S);delete T.frameTable;let k=h(T.stackTable,w);delete T.stackTable,y(T.samples.stack,k),T.nativeAllocations&&y(T.nativeAllocations.stack,k),T.jsAllocations&&y(T.jsAllocations.stack,k),b(T.markers,k),m[g]={funcTableIndexMap:v,resourceTableIndexMap:I}}e.shared.stackTable=a,e.shared.frameTable=i,e.shared.funcTable=s,e.shared.resourceTable=l,e.shared.nativeSymbols=c,t.v60={threadMappings:m,newFuncCount:s.length}},61:e=>{let t=e.shared&&e.shared.sources;if(t){t.uuid!==void 0&&t.id===void 0&&(t.id=t.uuid,delete t.uuid);let r=t.length;t.startLine=new Array(r).fill(1),t.startColumn=new Array(r).fill(1),t.sourceMapURL=new Array(r).fill(null)}},62:e=>{if(e.counters)for(let t of e.counters){if(t.display!==void 0)continue;let{category:r,name:n}=t;r==="Memory"?t.display={graphType:"line-accumulated",unit:"bytes",color:t.color??"orange",markerSchemaLocation:"timeline-memory",sortWeight:20,label:"Memory"}:r==="power"?t.display={graphType:"line-rate",unit:"pWh",color:t.color??"grey",markerSchemaLocation:null,sortWeight:30,label:n}:r==="Bandwidth"?t.display={graphType:"line-rate",unit:"bytes",color:t.color??"blue",markerSchemaLocation:null,sortWeight:10,label:"Bandwidth"}:r==="CPU"&&n==="processCPU"?t.display={graphType:"line-rate",unit:"percent",color:t.color??"grey",markerSchemaLocation:null,sortWeight:40,label:"Process CPU"}:t.display={graphType:"line-rate",unit:"",color:t.color??"grey",markerSchemaLocation:null,sortWeight:50,label:n},delete t.color}}};ur();cr();var M$=0;function Xv(e){if(e&&typeof e=="object"&&"meta"in e&&e.meta&&typeof e.meta=="object")return e.meta;throw new Error("Could not find the meta property on a profile.")}function ew(e){let t=Xv(e).version||M$;if(t!==34){if(t>34)throw new Error(`Unable to parse a Gecko profile of version ${t}, most likely profiler.firefox.com needs to be refreshed. The most recent version understood by this version of profiler.firefox.com is version ${34}.
663
- You can try refreshing this page in case profiler.firefox.com has updated in the meantime.`);for(let r=t+1;r<=34;r++)r in Qv&&Qv[r](e);Xv(e).version=34}}function F$(e){return e==="x86_64-gcc3"?"x86_64":e}var Qv={1:()=>{throw new Error("Gecko profiles without version numbers are very old and no conversion code has been written for that version of the profile format.")},2:()=>{throw new Error("Gecko profile version 1 is very old and no conversion code has been written for that version of the profile format.")},3:()=>{throw new Error("Gecko profile version 2 is very old and no conversion code has been written for that version of the profile format.")},4:e=>{function t(r){r.libs=JSON.parse(r.libs).map(n=>{if("breakpadId"in n)n.debugName=n.name.substr(n.name.lastIndexOf("/")+1);else{n.debugName=n.pdbName;let o=n.pdbSignature.replace(/[{}-]/g,"").toUpperCase();n.breakpadId=o+n.pdbAge}return delete n.pdbName,delete n.pdbAge,delete n.pdbSignature,n.path=n.name,n.name=n.debugName.endsWith(".pdb")?n.debugName.substr(0,n.debugName.length-4):n.debugName,n.arch=F$(r.meta.abi),n.debugPath="",n}).sort((n,o)=>n.start-o.start);for(let n=0;n<r.threads.length;n++)if(typeof r.threads[n]=="string"){let o=JSON.parse(r.threads[n]);t(o),r.threads[n]=JSON.stringify(o)}else{let o=r.threads[n];"processType"in o||(o.name==="Content"?(o.processType="tab",o.name="GeckoMain"):o.name==="Plugin"?o.processType="plugin":o.processType="default")}r.meta.version=4}t(e)},5:e=>{function t(r){let n=r.threads.map(o=>{if(typeof o=="string"){let a=JSON.parse(o);return t(a),{type:"process",data:a}}return{type:"thread",data:o}});r.processes=n.filter(o=>o.type==="process").map(o=>o.data),r.threads=n.filter(o=>o.type==="thread").map(o=>o.data),r.meta.version=5}t(e)},6:e=>{function t(r){for(let n of r.threads){delete n.samples.schema.frameNumber;for(let o=0;o<n.samples.data.length;o++)n.samples.data[o].splice(5)}for(let n of r.processes)t(n)}t(e)},7:e=>{function t(r){for(let n of r.threads){let o=n.markers.schema.name,a=n.markers.schema.data;for(let i=0;i<n.markers.data.length;i++)if(n.stringTable[n.markers.data[i][o]]==="DOMEvent"){let l=n.markers.data[i][a];l.eventType=l.type,l.type="DOMEvent"}}for(let n of r.processes)t(n)}t(e)},8:e=>{function t(r){r.pausedRanges=[],r.meta.shutdownTime=null;for(let n of r.threads)n.registerTime=0,n.unregisterTime=null;for(let n of r.processes)t(n)}t(e)},9:e=>{function t(o){if("timings"in o&&!("status"in o.timings)){let a=o.timings;a.status="completed",Array.isArray(a.sices)&&(a.slices_list=a.slices,a.slices=a.slices.length),a.allocated_bytes=a.allocated*1024*1024}return o}function r(o){if("nursery"in o){if("status"in o.nursery)return o.nursery.status==="no collection"&&(o.nursery.status="nursery empty"),Object.assign(o);let a=Object.assign(o,{nursery:Object.assign(o.nursery,{status:"complete",bytes_used:o.nursery.nursery_bytes,new_capacity:o.nursery.new_nursery_bytes,phase_times:o.nursery.timings})});return delete a.nursery.nursery_bytes,delete a.nursery.new_nursery_bytes,delete a.nursery.timings,a}return o}function n(o){for(let a of o.threads){let i=a.markers.schema.data;for(let s=0;s<a.markers.data.length;s++){let l=a.markers.data[s][i];if(l){switch(l.type){case"GCMinor":l=r(l);break;case"GCMajor":l=t(l);break;default:break}a.markers.data[s][i]=l}}}for(let a of o.processes)n(a)}n(e)},10:e=>{function t(r){for(let n of r.threads){let{markers:o}=n,a=o.schema.name,i=o.schema.data,s=o.schema.time,l=[];for(let c=0;c<o.data.length;c++){let u=o.data[c],d=n.stringTable[u[a]],f=u[i];if(d==="DOMEvent"&&f.type!=="tracing"){let p=[];p[i]={type:"tracing",category:"DOMEvent",timeStamp:f.timeStamp,interval:"end",eventType:f.eventType,phase:f.phase},p[s]=f.endTime,p[a]=u[a],l.push(p),u[s]=f.startTime,u[i]={type:"tracing",category:"DOMEvent",timeStamp:f.timeStamp,interval:"start",eventType:f.eventType,phase:f.phase}}}o.data=o.data.concat(l)}for(let n of r.processes)t(n)}t(e)},11:e=>{let t=0;function r(i){for(let s of i.threads)(s.pid===null||s.pid===void 0)&&(s.pid=`Unknown Process ${++t}`);for(let s of i.processes)r(s)}r(e);let n=[{name:"Idle",color:"transparent"},{name:"Other",color:"grey"},{name:"JavaScript",color:"yellow"},{name:"Layout",color:"purple"},{name:"Graphics",color:"green"},{name:"DOM",color:"blue"},{name:"GC / CC",color:"orange"},{name:"Network",color:"lightblue"}],o={16:1,32:3,64:2,128:6,256:6,512:7,1024:4,2048:1,4096:1};function a(i){i.meta.categories=n;for(let s of i.threads){let l=s.frameTable.schema.category;for(let c of s.frameTable.data)l in c&&c[l]!==null&&(c[l]in o?c[l]=o[c[l]]:c[l]=1)}for(let s of i.processes)a(s)}a(e)},12:e=>{function n(o){for(let a of o.threads){let i=a.frameTable.schema.category;for(let s of a.frameTable.data)s.hasOwnProperty(i)&&(s[5]=s[4],s[4]=null);a.frameTable.schema.category=5,a.frameTable.schema.column=4}for(let a of o.processes)n(a)}n(e)},13:e=>{function t(r){for(let n of r.threads){let o=n.markers.schema.name,a=n.markers.schema.data;for(let i=0;i<n.markers.data.length;i++){let s=n.stringTable[n.markers.data[i][o]],l=n.markers.data[i][a];switch(s){case"VsyncTimestamp":case"LayerTranslation":case"CompositorScreenshot":l.type=s,delete l.category;break;default:break}}}for(let n of r.processes)t(n)}t(e)},14:e=>{let t=/^(get |set )?\w+(\.\w+| constructor)$/;function r(n){for(let o of n.threads){o.frameTable.schema={location:0,relevantForJS:1,implementation:2,optimizations:3,line:4,column:5,category:6};let a=o.frameTable.schema.location,i=o.frameTable.schema.relevantForJS,s=$e.withBackingArray(o.stringTable);for(let l=0;l<o.frameTable.data.length;l++){let c=o.frameTable.data[l];c.splice(i,0,!1);let u=s.getString(c[a]);u.startsWith("AutoEntryScript ")?(c[i]=!0,c[a]=s.indexForString(u.substring(16))):c[i]=t.test(u)}}for(let o of n.processes)r(o)}r(e)},15:e=>{function t(r){for(let n of r.threads){let o=$e.withBackingArray(n.stringTable);if(!o.hasString("DiskIO"))continue;let a=o.indexForString("FileIO"),i=n.markers.schema.name,s=n.markers.schema.data;for(let l=0;l<n.markers.data.length;l++){let c=n.markers.data[l],u=c[s];u&&u.type==="DiskIO"&&(c[i]=a,u.type="FileIO")}}for(let n of r.processes)t(n)}t(e)},16:e=>{function t(i){for(let s of i.meta.categories)s.subcategories=["Other"];for(let s of i.threads){let{frameTable:l}=s;l.schema.subcategory=7;for(let c=0;c<l.data.length;c++)l.data[c][l.schema.category]&&(l.data[c][l.schema.subcategory]=0)}for(let s of i.processes)t(s)}t(e);let r=[["DOMEvent","DOM"],["Navigation::DOMComplete","DOM"],["Navigation::DOMInteractive","DOM"],["Navigation::Start","DOM"],["UserTiming","DOM"],["CC","GC / CC"],["GCMajor","GC / CC"],["GCMinor","GC / CC"],["GCSlice","GC / CC"],["Paint","Graphics"],["VsyncTimestamp","Graphics"],["CompositorScreenshot","Graphics"],["JS allocation","JavaScript"],["Styles","Layout"],["nsRefreshDriver::Tick waiting for paint","Layout"],["Navigation","Network"],["Network","Network"],["firstLoadURI","Other"],["IPC","Other"],["Text","Other"],["MainThreadLongTask","Other"],["FileIO","Other"],["Log","Other"],["PreferenceRead","Other"],["BHR-detected hang","Other"],["MainThreadLongTask","Other"]];for(let i of[{name:"Idle",color:"transparent",subcategories:["Other"]},{name:"Other",color:"grey",subcategories:["Other"]},{name:"Layout",color:"purple",subcategories:["Other"]},{name:"JavaScript",color:"yellow",subcategories:["Other"]},{name:"GC / CC",color:"orange",subcategories:["Other"]},{name:"Network",color:"lightblue",subcategories:["Other"]},{name:"Graphics",color:"green",subcategories:["Other"]},{name:"DOM",color:"blue",subcategories:["Other"]}])e.meta.categories.findIndex(l=>l.name===i.name)===-1&&e.meta.categories.push(i);let n=e.meta.categories.findIndex(i=>i.name==="Other"),o=new Map(r.map(([i,s])=>{let l=e.meta.categories.findIndex(c=>c.name===s);if(l===-1)throw new Error("Could not find a category index to map to.");return[i,l]}));function a(i){for(let s of i.threads){let{markers:l,stringTable:c}=s;if(l.schema.category!==void 0)return;l.schema.category=3;for(let u=0;u<l.data.length;u++){let d=l.data[u][l.schema.name],f=l.data[u][l.schema.data],p=c[d];f&&f.type&&(p=f.type==="tracing"?f.category:f.type);let h=o.get(p);h===void 0&&(h=n),l.data[u][l.schema.category]=h}}for(let s of i.processes)a(s)}a(e)},17:e=>{let t=1,r=1;function n(o){if(o.pages&&o.pages.length>0){let a=new Map,i=new Map;for(let s of o.pages){a.set(`d${s.docshellId}h${s.historyId}`,r);let l=i.get(s.docshellId);l||(l=t++,i.set(s.docshellId,l)),s.browsingContextID=l,s.innerWindowID=r,s.embedderInnerWindowID=0,r++,delete s.docshellId,delete s.historyId,delete s.isSubFrame}for(let s of o.threads){let{markers:l}=s,c=l.schema.data;for(let u=0;u<s.markers.data.length;u++){let f=s.markers.data[u][c];if(f&&f.docShellId!==void 0&&f.docshellHistoryId!==void 0){let p=a.get(`d${f.docShellId}h${f.docshellHistoryId}`);p===void 0?console.error("No page found with given docShellId and historyId"):f.innerWindowID=p,delete f.docShellId,delete f.docshellHistoryId}}}}for(let a of o.processes)n(a)}n(e)},18:e=>{function t(r){if(r.counters&&r.counters.length>0)for(let n of r.counters)"samples"in n.sample_groups?n.sample_groups=[n.sample_groups]:n.sample_groups=[];for(let n of r.processes)t(n)}t(e)},19:e=>{function t(r){for(let n of r.threads){let{frameTable:o}=n;o.schema={location:0,relevantForJS:1,innerWindowID:2,implementation:3,optimizations:4,line:5,column:6,category:7,subcategory:8};for(let a=0;a<o.data.length;a++){let i=o.schema.innerWindowID;o.data[a].splice(i,0,0)}}for(let n of r.processes)t(n)}t(e)},20:e=>{function a(i){for(let s of i.threads){let{markers:l}=s,c=l.schema,u={name:0,startTime:1,endTime:2,phase:3,category:4,data:5};l.schema=u;for(let d=0;d<l.data.length;d++){let f=l.data[d],p=f[c.name],h=f[c.time],y=f[c.category],b=f[c.data],m=h,g=null,T=0;if(b){let{startTime:I,endTime:v,type:w,interval:k}=b;w==="tracing"?k==="start"?(m=h,g=null,T=2):k==="end"&&(m=null,g=h,T=3):I!==v&&typeof I=="number"&&typeof v=="number"&&(m=I,g=v,T=1),b.type!=="IPC"&&b.type!=="Network"&&(delete b.startTime,delete b.endTime)}let S=[];S[u.name]=p,S[u.startTime]=m,S[u.endTime]=g,S[u.phase]=T,S[u.category]=y,S[u.data]=b,l.data[d]=S}}for(let s of i.processes)a(s)}a(e)},21:e=>{function t(r){for(let n of r.threads){let{markers:o}=n;for(let a=0;a<o.data.length;a++){let i=o.data[a],s=i[o.schema.data];if(s&&s.type==="tracing"&&s.category==="DOMEvent"){let l=i[o.schema.startTime];s.type="DOMEvent",s.timeStamp!==void 0&&(s.latency=l-s.timeStamp),delete s.timeStamp}}}for(let n of r.processes)t(n)}t(e)},22:e=>{let t=e;t.meta.markerSchema=[{name:"GCMajor",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"GCMinor",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"GCSlice",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"CC",tooltipLabel:"Cycle Collect",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"FileIO",display:["marker-chart","marker-table"],data:[{key:"operation",label:"Operation",format:"string",searchable:!0},{key:"source",label:"Source",format:"string",searchable:!0},{key:"filename",label:"Filename",format:"file-path",searchable:!0}]},{name:"MediaSample",display:["marker-chart","marker-table"],data:[{key:"sampleStartTimeUs",label:"Sample start time",format:"microseconds"},{key:"sampleEndTimeUs",label:"Sample end time",format:"microseconds"}]},{name:"Styles",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"elementsTraversed",label:"Elements traversed",format:"integer"},{key:"elementsStyled",label:"Elements styled",format:"integer"},{key:"elementsMatched",label:"Elements matched",format:"integer"},{key:"stylesShared",label:"Styles shared",format:"integer"},{key:"stylesReused",label:"Styles reused",format:"integer"}]},{name:"PreferenceRead",display:["marker-chart","marker-table"],data:[{key:"prefName",label:"Name",format:"string"},{key:"prefKind",label:"Kind",format:"string"},{key:"prefType",label:"Type",format:"string"},{key:"prefValue",label:"Value",format:"string"}]},{name:"UserTiming",tooltipLabel:"{marker.data.name}",chartLabel:"{marker.data.name}",tableLabel:"{marker.data.name}",display:["marker-chart","marker-table"],data:[{label:"Marker",value:"UserTiming"},{key:"entryType",label:"Entry Type",format:"string"},{label:"Description",value:"UserTiming is created using the DOM APIs performance.mark() and performance.measure()."}]},{name:"Text",tableLabel:"{marker.name} \u2014\xA0{marker.data.name}",chartLabel:"{marker.name} \u2014\xA0{marker.data.name}",display:["marker-chart","marker-table"],data:[{key:"name",label:"Details",format:"string"}]},{name:"Log",display:["marker-table"],tableLabel:"({marker.data.module}) {marker.data.name}",data:[{key:"module",label:"Module",format:"string"},{key:"name",label:"Name",format:"string"}]},{name:"DOMEvent",tooltipLabel:"{marker.data.eventType} \u2014 DOMEvent",tableLabel:"{marker.data.eventType}",chartLabel:"{marker.data.eventType}",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"latency",label:"Latency",format:"duration"}]},{name:"Paint",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"Navigation",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"Layout",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"IPC",tooltipLabel:"IPC \u2014\xA0{marker.data.niceDirection}",tableLabel:"{marker.name} \u2014 {marker.data.messageType} \u2014 {marker.data.niceDirection}",chartLabel:"{marker.data.messageType}",display:["marker-chart","marker-table","timeline-ipc"],data:[{key:"messageType",label:"Type",format:"string"},{key:"sync",label:"Sync",format:"string"},{key:"sendThreadName",label:"From",format:"string"},{key:"recvThreadName",label:"To",format:"string"}]},{name:"RefreshDriverTick",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"name",label:"Tick Reasons",format:"string"}]},{name:"Network",display:["marker-table"],data:[]}];for(let r of t.processes)r.meta.markerSchema=[]},23:e=>{function t(r){if(e.meta.configuration&&e.meta.configuration.activeBrowsingContextID&&(e.meta.configuration.activeTabID=e.meta.configuration.activeBrowsingContextID,delete e.meta.configuration.activeBrowsingContextID),r.pages&&r.pages.length>0)for(let n of r.pages)n.tabID=n.browsingContextID,delete n.browsingContextID;for(let n of r.processes)t(n)}t(e)},24:e=>{},25:e=>{},26:e=>{function t(r){for(let n of r.meta.markerSchema){let o;switch(n.name){case"FileIO":{n.data.push({key:"threadId",label:"Thread ID",format:"string",searchable:!0}),o=[];break}case"Log":{o=["name","module"];break}case"DOMEvent":{n.data.push({key:"eventType",label:"Event Type",format:"string",searchable:!0}),o=["target"];break}case"TraceEvent":{o=["name1","name2","val1","val2"];break}default:{o=["name","category"];break}}for(let a of n.data)o.includes(a.key)&&(a.searchable=!0)}for(let n of r.processes)t(n)}t(e)},27:e=>{function t(r){for(let n of r.threads)delete n.frameTable.schema.optimizations;for(let n of r.processes)t(n)}t(e)},28:e=>{},29:e=>{function t(r){if(r.counters&&r.counters.length>0)for(let n of r.counters)n.sample_groups&&(n.samples=n.sample_groups[0].samples,delete n.sample_groups);for(let n of r.processes)t(n)}t(e)},30:e=>{},31:e=>{},32:e=>{},33:e=>{function t(r){r.sources||(r.sources={schema:{uuid:0,filename:1},data:[]});for(let n of r.processes)t(n)}t(e)},34:e=>{function t(r){if(r.sources){let n=r.sources.schema;n.id=n.uuid,delete n.uuid,n.startLine=2,n.startColumn=3,n.sourceMapURL=4;for(let o of r.sources.data)o[2]=1,o[3]=1,o[4]=null}for(let n of r.processes)t(n)}t(e)}};function tw(e){if(e.startsWith(`# ========
661
+ `;break}default:throw ae(y,"Unhandled WeightType.")}r={total:o===0?"\u2014":m,totalWithUnit:o===0?"\u2014":v,self:i===0?"\u2014":T,selfWithUnit:i===0?"\u2014":w,totalPercent:S,name:n,lib:h.slice(0,1e3),isFrameLabel:p,badge:u,categoryName:VS(this._categories,l,c),categoryColor:this._categories[l].color,iconSrc:b,icon:g,ariaLabel:I},this._displayDataByIndex.set(t,r)}return r}_getOriginAnnotation(t){return Ts(t,this._thread.funcTable,this._thread.resourceTable,this._thread.stringTable,this._thread.sources)}getBottomBoxInfoForCallNode(t){return Mv(t,this._callNodeInfo,this._thread,this._previewFilteredCtssSamples)}findHeavyPathToSameFunctionAfterInversion(t){if(t===null)return[];let r=this._internal.findHeaviestPathInSubtree(t),n=this._callNodeInfo.depthForNode(t);return r.slice(n).reverse()}};function Eu(e,t,r){let n=new Float64Array(r);for(let i=0;i<t.length;i++){let s=t[i];if(s!==null){let l=e.weight?e.weight[i]:1;n[s]+=l}}let o=Math.abs,a=0;for(let i=0;i<r;i++)a+=o(n[i]);return{callNodeSelf:n,rootTotalSummary:a}}function Fv(e,t,r){switch(r.type){case"NON_INVERTED":{let{timings:n}=r,o=n.self[e],a=n.total[e];return{self:o,total:a}}case"FUNCTION_LIST":{let n=W(t.asInverted()),{timings:o}=r,{funcSelf:a,funcTotal:i}=o;if(!n.isRoot(e))throw new Error("When using function list timings, callNodeIndex must always refer to a function (an inverted root)");return{self:a[e],total:i[e]}}case"INVERTED":{let n=W(t.asInverted()),{timings:o}=r,{callNodeSelf:a,totalPerRootFunc:i}=o;if(n.isRoot(e)){let l=i[e];return{self:l,total:l}}let{total:s}=Ov(e,n,a);return{self:0,total:s}}default:throw ae(r,"callTreeTimings.type")}}function Ov(e,t,r){let n=t.depthForNode(e),[o,a]=t.getSuffixOrderIndexRangeForCallNode(e),i=t.getSuffixOrderedCallNodes(),s=t.getCallNodeTable().depth,l=0,c=!1;for(let u=o;u<a;u++){let d=i[u],f=r[d];l+=f,c=c||f!==0&&s[d]>n}return{total:l,hasChildren:c}}function T$(e,{callNodeSelf:t,rootTotalSummary:r}){let n=e.getFuncCount(),o=e.getCallNodeTable(),a=o.func,i=o.depth,s=new Float64Array(n),l=new Uint8Array(n),c=new Uint8Array(n),u=[];for(let d=0;d<t.length;d++){let f=t[d];if(f===0)continue;let p=a[d];s[p]+=f,c[p]===0&&(c[p]=1,u.push(p)),i[d]!==0&&(l[p]=1)}return u.sort((d,f)=>Math.abs(s[f])-Math.abs(s[d])),{callNodeSelf:t,rootTotalSummary:r,sortedRoots:u,totalPerRootFunc:s,hasChildrenPerRootFunc:l}}function Os(e,t){let r=e.asInverted();return r!==null?{type:"INVERTED",timings:T$(r,t)}:{type:"NON_INVERTED",timings:lh(e,t)}}function lh(e,t){let r=e.getCallNodeTable(),{callNodeSelf:n,rootTotalSummary:o}=t,a=new Float64Array(r.length),i=new Uint8Array(r.length);for(let s=r.length-1;s>=0;s--){let l=a[s]+n[s],c=i[s]!==0,u=l!==0;if(a[s]=l,!c&&!u)continue;let d=r.prefix[s];d!==-1&&(a[d]+=l,i[d]=1)}return{self:n,total:a,callNodeHasChildren:i,rootTotalSummary:o}}function S$(e,t,r,n){let o=e.func,a=e.prefix,i=e.length,s=new Float64Array(i),l=new Float64Array(n),c=[],u=new Uint8Array(n);for(let f=i-1;f>=0;f--){let p=s[f]+r[f];if(p===0)continue;let h=a[f];if(h!==-1&&(s[h]+=p),!It(t,f)){let y=o[f];l[y]+=p,u[y]===0&&(u[y]=1,c.push(y))}}let d=Math.abs;return c.sort((f,p)=>{let h=d(l[p])-d(l[f]);return h!==0?h:f-p}),{funcTotal:l,sortedFuncs:c}}function x$(e,t,r){let n=e.func,o=t.length,a=new Float64Array(r);for(let i=0;i<o;i++){let s=t[i];if(s!==0){let l=n[i];a[l]+=s}}return a}function Lv(e,t,{callNodeSelf:r,rootTotalSummary:n},o){let a=x$(e,r,o),{funcTotal:i,sortedFuncs:s}=S$(e,t,r,o);return{funcSelf:a,funcTotal:i,sortedFuncs:s,rootTotalSummary:n}}function Ls(e,t,r,n,o,a){return Gt("getCallTree",()=>{switch(o.type){case"NON_INVERTED":{let{timings:i}=o;return new Fs(e,r,t,n,new ah(t,i),i.rootTotalSummary,!!e.isJsTracer,a)}case"FUNCTION_LIST":{let{timings:i}=o;return new Fs(e,r,t,n,new ih(i),i.rootTotalSummary,!!e.isJsTracer,a)}case"INVERTED":{let{timings:i}=o;return new Fs(e,r,t,n,new sh(W(t.asInverted()),i),i.rootTotalSummary,!!e.isJsTracer,a)}default:throw ae(o,"Unhandled CallTreeTimings type.")}})}function ch(e,t){switch(t){case"timing":return e.samples;case"js-allocations":return W(e.jsAllocations,'Expected the NativeAllocationTable to exist when using a "js-allocation" strategy');case"native-retained-allocations":{let r=W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-allocation" strategy');if(!("memoryAddress"in r))throw new Error("Attempting to filter by retained allocations data that is missing the memory addresses.");return KS(r)}case"native-allocations":return jS(W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-allocations" strategy'));case"native-deallocations-sites":return qS(W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-deallocations-sites" strategy'));case"native-deallocations-memory":{let r=W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-deallocations-memory" strategy');if(!("memoryAddress"in r))throw new Error("Attempting to filter by retained allocations data that is missing the memory addresses.");return zS(W(r,'Expected the NativeAllocationTable to exist when using a "js-allocation" strategy'))}default:throw ae(t)}}function Dv(e,t){switch(t){case"timing":return e.samples;case"js-allocations":return W(e.jsAllocations,'Expected the NativeAllocationTable to exist when using a "js-allocation" strategy');case"native-retained-allocations":case"native-allocations":case"native-deallocations-sites":case"native-deallocations-memory":return W(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-allocation" strategy');default:throw ae(t)}}function Bv(e,t,r){if(t===e.samples){let{category:n,subcategory:o}=e.samples;return{sampleCategories:n,sampleSubcategories:o}}return Qf(t.stack,e.stackTable,r)}function Uv(e,t,r,n){if(e.weightType!=="samples"||e.weight)return null;let o=new Float64Array(r),a=0;for(let i=0;i<e.length-1;i++){let s=t[i];if(s!==null){let l=e.time[i+1]-e.time[i];o[s]+=l,a+=l}}if(e.length>0){let i=t[e.length-1];if(i!==null){let s=n;o[i]+=s,a+=s}}return{callNodeSelf:o,rootTotalSummary:a}}nr();ur();xe();function Gv({funcTable:e,sources:t,stringArray:r}){let n=new Map;for(let o=0;o<e.length;o++){if(!e.isJS[o])continue;let a=e.lineNumber[o],i=e.columnNumber[o],s=e.source[o];if(i!==null&&a!==null&&s!==null){let l=t.filename[s],u=`${r[l]}:${a}:${i}`;n.has(u)?n.set(u,null):n.set(u,o)}}return n}function Wv(e,t){let r=[],n=Gv(t),{funcTable:o,stringArray:a}=t;for(let i=0;i<e.length;i++){let s=e.events[i],l=e.column[i],c=e.line[i],u=a[s],d=null;if(l!==null&&c!==null){let f=`${u}:${c}:${l}`,p=n.get(f);p!==void 0&&(p===null?u=`(multiple matching functions) ${u}`:(d=p,u=`\u0192 ${a[o.name[d]]} ${u}`))}for(let f=0;f<=r.length;f++){let p=r[f];p||(p={start:[],end:[],index:[],label:[],func:[],name:"Tracing Information",length:0},r.push(p));let h=e.timestamps[i]/1e3,y=e.durations[i],b=y===null?0:y/1e3,g=p.end[p.length-1];if(g===void 0||g<=h){p.start.push(h),p.end.push(h+b),p.label.push(u),p.index.push(i),p.func.push(d),p.length++;break}}}return r}function Hv(e,t){let r=new Map,n=[],o=/:\/\//;function a(d){let f=n[d];if(f!==void 0)return f;let p=o.test(t.getString(d));return n[d]=p,p}function i(d,f,p){if(f===p)return;let h=e.events[d],y=t.getString(h),b=a(h)?"Script":y,g=r.get(b);g===void 0&&(g={start:[],end:[],index:[],label:[],func:[],name:b,length:0},r.set(b,g));{let m=g.start[g.length-1],T=g.end[g.length-1],S=g.end[g.length-2];if(p<f)throw new Error("end is less than the start");if(T<m)throw new Error(`currEnd < currStart "${y} - ${T} < ${m}"`);if(m<S)throw new Error(`currStart < prevEnd "${y} - ${m} < ${S}"`)}g.start.push(f/1e3),g.end.push(p/1e3),g.label.push(y),g.index.push(d),g.length++}let s=[],l=[],c=[],u=-1;for(let d=0;d<e.length;d++){let f=e.timestamps[d],p=e.durations[d],y=f+(p===null?0:p);if(u===-1){u=0,s[u]=f,l[u]=y,c[u]=d;continue}for(;;){let b=s[u],g=l[u],m=c[u];if(b<=f&&g>f&&g<y&&(y=g),g<=f){if(i(m,b,g),u--,u===-1){u=0,c[u]=d,s[u]=f,l[u]=y;break}continue}else if(g>y){i(m,b,f),s[u]=y,u++,s[u]=f,l[u]=y,c[u]=d;break}else if(g===y){b!==f&&(i(m,b,f),s[u]=f),c[u]=d;break}else{let T=t.getString(e.events[m]),S=t.getString(e.events[d]);throw console.error("Current JS Tracer information:",{jsTracer:e,stringTable:t,prefixEventIndex:m,currentEventIndex:d}),console.error(`Prefix (parent) times for "${T}": ${b}ms to ${g}ms`),console.error(`Current (child) times for "${S}": ${f}ms to ${y}ms`),new Error("The JS Tracer algorithm encountered some data it could not handle.")}}}for(;u>=0;u--)i(c[u],s[u],l[u]);return[...r.values()].sort((d,f)=>d.name>f.name?1:d.name<f.name?-1:0)}function I$(e,t,r,n,o){let a={..._a(),weight:[],weightType:"tracing-ms"},i=Ur(),s={...e,markers:i,samples:a},{funcTable:l,frameTable:c,stackTable:u}=t,d=0,f=[null],p=[0],h=new Map,y=new Map,b=r.indexForString(""),g=o.findIndex(T=>T.name==="Other");if(g===-1)throw new Error("Expected to find an 'Other' category.");let m=Gv(t);for(let T=0;T<n.length;T++){let S=n.events[T],I=r.getString(S),v=n.end[T],w=n.column[T],k=n.line[T],E=null;if(w!==null&&k!==null){let B=`${I}:${k}:${w}`,Z=m.get(B);Z!=null&&(E=Z,h.set(S,E))}if(E===null){let B=h.get(S);B===void 0?(E=l.length++,l.name.push(S),l.isJS.push(!1),l.resource.push(-1),l.relevantForJS.push(!0),l.source.push(null),l.lineNumber.push(null),l.columnNumber.push(null),h.set(S,E)):E=B}let R=f[d];for(;R!==null;){let B=p[d];if(v<=B)break;R=f[d],d--}let F=c.length++;c.address.push(b),c.inlineDepth.push(0),c.category.push(g),c.func.push(E),c.nativeSymbol.push(null),c.innerWindowID.push(0),c.line.push(k),c.column.push(w);let G=u.length++;u.frame.push(F),u.prefix.push(R),y.set(T,G),d++,d===0&&(d=1),f[d]=T,p[d]=v}return{thread:s,stackMap:y}}function v$(e){if(e.length===0)return{events:[],start:[],end:[],line:[],column:[],length:0};let t=e.timestamps[0],r=t+(e.durations[0]||0),n=[t],o=[r],a={events:e.events,start:n,end:o,line:e.line,column:e.column,length:e.length};for(let i=1;i<e.length;i++){let s=e.durations[i],l=e.timestamps[i],c=l+(s===null?0:s);if(l<t)if(t<c)l=t;else{let u=c-l;l=t,c=Math.min(r,l+u)}else c<r||r<=l||(r-l<c-r?l=r:c=r);n.push(l),o.push(c),t=l,r=c}return a}function Vv(e,t,r,n){let o=v$(r),a=$e.withBackingArray(t.stringArray),{thread:i,stackMap:s}=I$(e,t,a,o,n);return i.samples=w$(a,o,s),i}function w$(e,t,r){let o=(f,p)=>Math.abs(f-p)<1e-5,a=_a(),i=[];a.weight=i;function s(f,p,h){if(o(p,h))return;let y=W(r.get(f),"The JS tracer event did not exist in the stack map.");a.stack.push(y),W(a.time).push(p/1e3),i.push((h-p)/1e3),a.length++}let l=[],c=[],u=[],d=-1;for(let f=0;f<t.length;f++){let p=t.start[f],h=t.end[f];if(d===-1){d=0,l[d]=p,c[d]=h,u[d]=f;continue}for(;;){let y=l[d],b=c[d],g=u[d];if(b<=p+1e-5){if(s(g,y,b),d--,d===-1){d=0,u[d]=f,l[d]=p,c[d]=h;break}continue}else if(h<b+1e-5){s(g,y,p),l[d]=h,d++,l[d]=p,c[d]=h,u[d]=f;break}else if(o(b,h)){o(y,p)||(s(g,y,p),l[d]=p),u[d]=f;break}else{let m=e.getString(t.events[g]),T=e.getString(t.events[f]);throw console.error("Current JS Tracer information:",{jsTracer:t,stringTable:e,prefixEventIndex:g,currentEventIndex:f}),console.error(`Prefix (parent) times for "${m}": ${y}ms to ${b}ms`),console.error(`Current (child) times for "${T}": ${p}ms to ${h}ms`),new Error("The JS Tracer information was malformed. Some event lasted longer than its parent event.")}}}for(;d>=0;d--)s(u[d],l[d],c[d]);return a}xe();async function jv(e,t="application/octet-stream"){return new Promise((r,n)=>{let o=Object.assign(new FileReader,{onload:()=>r(o.result),onerror:()=>n(o.error)});o.readAsDataURL(new Blob([e],{type:t}))})}function _$(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r.buffer}function qv(e){return"fromBase64"in Uint8Array?Uint8Array.fromBase64(e).buffer:_$(e)}nr();xe();rr();ur();nr();var an=class{_libs=[];_libKeyToLibIndex=new Map;_stringArray=[];_stringTable=$e.withBackingArray(this._stringArray);_sources=Ra();_frameTable=Ca();_stackTable=nn();_funcTable=Ea();_resourceTable=Aa();_nativeSymbols=Pa();_funcKeyToFuncIndex=new Map;_nativeSymbolKeyToNativeSymbolIndex=new Map;_libIndexToResourceIndex=new Map;_libNameToResourceIndex=new Map;_originToResourceIndex=new Map;_idToSourceIndex=new Map;_filenameToSourceIndex=new Map;indexForLib(t){let{debugName:r,breakpadId:n}=t,o=`${r}/${n}`,a=this._libKeyToLibIndex.get(o);if(a===void 0){a=this._libs.length;let{arch:i,name:s,path:l,debugPath:c,codeId:u}=t;this._libs.push({arch:i,name:s,path:l,debugName:r,debugPath:c,breakpadId:n,codeId:u??null}),this._libKeyToLibIndex.set(o,a)}return a}indexForFunc(t,r,n,o,a,i,s){let l=`${t}-${r}-${n}-${o}-${a}-${i}-${s}`,c=this._funcKeyToFuncIndex.get(l);return c===void 0&&(c=this._funcTable.length++,this._funcTable.name[c]=t,this._funcTable.isJS[c]=r,this._funcTable.relevantForJS[c]=n,this._funcTable.resource[c]=o,this._funcTable.source[c]=a,this._funcTable.lineNumber[c]=i,this._funcTable.columnNumber[c]=s,this._funcKeyToFuncIndex.set(l,c)),c}indexForSource(t,r,n=1,o=1,a=null){let i;if(t!==null)i=this._idToSourceIndex.get(t);else{let s=this._stringTable.indexForString(r);i=this._filenameToSourceIndex.get(s)}if(i===void 0){i=this._sources.length;let s=this._stringTable.indexForString(r),l=a!==null?this._stringTable.indexForString(a):null;this._sources.id[i]=t,this._sources.filename[i]=s,this._sources.startLine[i]=n,this._sources.startColumn[i]=o,this._sources.sourceMapURL[i]=l,this._sources.length++,t!==null?this._idToSourceIndex.set(t,i):this._filenameToSourceIndex.set(s,i)}return i}addExtensionOrigins(t){let r=this._resourceTable;for(let n=0;n<t.length;n++){let o=new URL(t.baseURL[n]).origin,a=this._originToResourceIndex.get(o);if(a===void 0){a=r.length++,this._originToResourceIndex.set(o,a);let s=`Extension ${JSON.stringify(t.name[n])} (ID: ${t.id[n]})`,l=this._stringTable.indexForString(t.id[n]);r.lib[a]=null,r.name[a]=this._stringTable.indexForString(s),r.host[a]=l,r.type[a]=2}}}indexForURIResource(t){let r,n;try{let i=new URL(t);if(!(i.protocol==="http:"||i.protocol==="https:"||i.protocol==="moz-extension:"))throw new Error("not a webhost or extension protocol");r=i.origin,n=i.host}catch{r=t,n=null}let o=this._originToResourceIndex.get(r);if(o!==void 0)return o;let a=this._resourceTable;return o=a.length++,this._originToResourceIndex.set(r,o),n?(a.lib[o]=null,a.name[o]=this._stringTable.indexForString(r),a.host[o]=this._stringTable.indexForString(n),a.type[o]=3):(a.lib[o]=null,a.name[o]=this._stringTable.indexForString(t),a.host[o]=null,a.type[o]=5),o}indexForLibResource(t){let r=this._libIndexToResourceIndex.get(t);if(r!==void 0)return r;let n=this._resourceTable;return r=this._resourceTable.length++,this._libIndexToResourceIndex.set(t,r),n.lib[r]=t,n.name[r]=this._stringTable.indexForString(this._libs[t].name),n.host[r]=null,n.type[r]=1,r}indexForNameOnlyLibResource(t){let r=this._libNameToResourceIndex.get(t);if(r!==void 0)return r;let n=this._resourceTable;return r=this._resourceTable.length++,this._libNameToResourceIndex.set(t,r),n.lib[r]=null,n.name[r]=t,n.host[r]=null,n.type[r]=1,r}indexForNativeSymbol(t,r,n,o){let a=`${t}-${r}-${n}-${o??""}`,i=this._nativeSymbolKeyToNativeSymbolIndex.get(a);return i===void 0&&(i=this._nativeSymbols.length++,this._nativeSymbols.libIndex[i]=t,this._nativeSymbols.address[i]=r,this._nativeSymbols.name[i]=n,this._nativeSymbols.functionSize[i]=o,this._nativeSymbolKeyToNativeSymbolIndex.set(a,i)),i}getStringTable(){return this._stringTable}getFrameTable(){return this._frameTable}getStackTable(){return this._stackTable}finish(){let t={stackTable:this._stackTable,frameTable:this._frameTable,funcTable:this._funcTable,resourceTable:this._resourceTable,nativeSymbols:this._nativeSymbols,stringArray:this._stringArray,sources:this._sources};return{libs:this._libs,shared:t}}};function C$(e){return{name:"CpuProfile",args:{data:{cpuProfile:e}},cat:"other",pid:0,tid:0,ts:0,ph:"I"}}function zv(e,t){if(!e)return null;let r;if(Array.isArray(e)?e.slice(0,5).every(a=>a&&typeof a=="object"&&"ph"in a)&&(r=e):typeof e=="object"&&"samples"in e&&"timeDeltas"in e&&"startTime"in e&&"endTime"in e?(r=[],r.push(C$(e))):typeof e=="object"&&"traceEvents"in e&&Array.isArray(e.traceEvents)&&(r=e.traceEvents),!r)return null;let n=new Map;for(let o of r){if(typeof o!="object"||o===null||typeof o.name!="string")throw new Error("A tracing event in the chrome profile did not follow the expected form.");let{name:a}=o,i=n.get(a);i||(i=[],n.set(a,i)),i.push(o)}return P$(n,t)}function Ds(e,t,r){let n=e.get(t);return n?n.find(r):void 0}function E$(e,t,r){let n=e.get(t);return n?n.filter(r):[]}function uh(e,t,r,n,o){let a=`${o.pid}:${o.tid}`,i=e.get(a);if(i)return i;let s=Ma();s.pid=`${o.pid}`,s.tid=a,s.processType="unknown",s.name="Chrome Thread";let l=Ds(r,"thread_name",g=>g.pid===o.pid&&g.tid===o.tid);l&&(s.name=l.args.name,s.isMainThread=s.name.startsWith("Cr")&&s.name.endsWith("Main")||!!o.pid&&o.pid===o.tid);let c=Ds(r,"process_name",g=>g.pid===o.pid);c&&(s.processName=c.args.name);let u=Ds(r,"process_labels",g=>g.pid===o.pid);if(u){let g=u.args.labels;s.processName?s.processName=`${s.processName} (${g})`:s.processName=`Process ${o.pid} (${g})`}let d=Ds(r,"process_sort_index",g=>g.pid===o.pid),f=0;d&&(f=d.args.sort_index);let p=Ds(r,"thread_sort_index",g=>g.pid===o.pid&&g.tid===o.tid),h=0;p?h=p.args.sort_index:l&&(l.args.name==="CrBrowserMain"||l.args.name==="CrGpuMain")&&(h=-1),n.threads.push(s);let y=new Map;y.set(void 0,null);let b={thread:s,nodeIdToStackId:y,lastSeenTime:o.ts/1e3,lastSampledTime:0,pid:o.pid,processSortIndex:f,threadSortIndex:h,tieBreakerIndex:t.size};return e.set(a,b),t.set(s,b),b}function N$(e){switch(e.name){case"ProfileChunk":return e.args.data.timeDeltas;case"CpuProfile":return e.args.data.cpuProfile.timeDeltas;default:return}}function A$(e){let t=e.findIndex(i=>i.name==="JavaScript"),r=e.findIndex(i=>i.name==="GC / CC"),n=e.findIndex(i=>i.name==="Native"),o=e.findIndex(i=>i.name==="Other"),a=e.findIndex(i=>i.name==="Idle");if(t===-1||r===-1||n===-1||o===-1||a===-1)throw new Error("Unable to find the a category in the the defaultCategories.");return function(s,l){switch(s){case"(idle)":return{category:a,isJS:!1,relevantForJS:!1};case"(root)":case"(program)":return{category:o,isJS:!1,relevantForJS:!1};case"(garbage collector)":return{category:r,isJS:!1,relevantForJS:!1};default:return!l&&s!=="<WASM UNNAMED>"&&s!=="(unresolved function)"?{category:n,isJS:!1,relevantForJS:!0}:{category:t,isJS:!0,relevantForJS:!1}}}}async function P$(e,t){let r=Ro();r.meta.categories=[{name:"Other",color:"grey",subcategories:["Other"]},{name:"Idle",color:"transparent",subcategories:["Other"]},{name:"JavaScript",color:"yellow",subcategories:["Other"]},{name:"GC / CC",color:"orange",subcategories:["Other"]},{name:"Graphics",color:"green",subcategories:["Other"]},{name:"Native",color:"blue",subcategories:["Other"]}],r.meta.product="Chrome Trace",r.meta.importedFrom="Chrome Trace",r.meta.interval=.5;let n=new an,o=n.getStringTable(),a=n.getFrameTable(),i=n.getStackTable(),s=e.get("Profile")||[];if(e.has("CpuProfile")){let f=e.get("CpuProfile");s=s.concat(f)}let l=A$(W(r.meta.categories)),c=new Map,u=new Map;for(let f of s){let p=uh(c,u,e,r,f),{thread:h,nodeIdToStackId:y}=p,b=[];if(f.name==="Profile"){p.lastSeenTime=f.args.data.startTime/1e3;let{id:g,pid:m}=f;b=E$(e,"ProfileChunk",T=>T.id===g&&T.pid===m)}else f.name==="CpuProfile"&&(p.lastSeenTime=r.meta.profilingStartTime=f.args.data.cpuProfile.startTime/1e3,r.meta.profilingEndTime=f.args.data.cpuProfile.endTime/1e3,b=[f]);for(let g of b){if(!g.args.data||!g.args.data.cpuProfile)continue;let{cpuProfile:m}=g.args.data,{nodes:T,samples:S}=m,I=N$(g);if(!I)continue;let{samples:v}=h;if(T){let w=new Map;for(let k of T){let{callFrame:E,id:R}=k,F;if(k.parent!==void 0?F=k.parent:F=w.get(R),k.children!==void 0){let H=k.children;for(let z=0;z<H.length;z++)w.set(H[z],R)}let{url:G,lineNumber:B,columnNumber:Z}=E;B===-1&&(B=void 0),Z===-1&&(Z=void 0),B!==void 0&&B++,Z!==void 0&&Z++,G===""&&(G=void 0);let{functionName:X}=E,{category:_e,isJS:D,relevantForJS:re}=l(X,G!==void 0||B!==void 0),N=o.indexForString(X!==""?X:"(anonymous)"),A=D&&G?n.indexForSource(null,G):null,M=D?n.indexForURIResource(G||"<unknown>"):-1,P=n.indexForFunc(N,D,re,M,A,B===void 0?null:B,Z===void 0?null:Z),$=R-1,J=y.get(F);if(J===void 0)throw new Error("Unable to find the prefix stack index from a node index.");a.address[$]=-1,a.category[$]=_e,a.subcategory[$]=0,a.func[$]=P,a.nativeSymbol[$]=null,a.innerWindowID[$]=0,a.line[$]=B===void 0?null:B,a.column[$]=Z===void 0?null:Z,a.length=Math.max(a.length,$+1),i.frame.push($),i.prefix.push(J),y.set(R,i.length++)}}for(let w=0;w<S.length;w++){let k=S[w];if(p.lastSeenTime+=I[w]/1e3,p.lastSeenTime-p.lastSampledTime>=r.meta.interval){p.lastSampledTime=p.lastSeenTime;let E=W(y.get(k),"Could not find the stack information for a sample when decoding a Chrome profile.");W(v.eventDelay,"Could not find the eventDelay in samplesTable inside the newly created Chrome profile thread.").push(null),v.stack.push(E),W(v.time).push(p.lastSampledTime),v.length++}}}}if(F$(i),await R$(c,u,e,r,e.get("Screenshot")??[],o),O$(c,u,e,r,o),r.meta.profilingStartTime===void 0&&r.meta.profilingEndTime===void 0&&e.has("TracingStartedInBrowser")){let f=W(e.get("TracingStartedInBrowser"))[0];if(f.ts!==void 0&&Number.isFinite(f.ts)){let p=-1/0;r.threads.forEach(h=>{let y=Oa(h,r.meta.interval);p=Math.max(p,y.end)}),r.meta.profilingStartTime=f.ts/1e3,r.meta.profilingEndTime=p}}if(t){let f=/(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})/g,p,h;for(;(h=f.exec(t))!==null;)p=h;if(p){let[,y,b,g,m,T,S]=p,I=`${y}-${b}-${g}T${m}:${T}:${S}`,v=new Date(I);r.meta.startTime=v.getTime()-(r.meta.profilingStartTime??0)}}r.threads.sort((f,p)=>{let h=u.get(f),y=u.get(p);if(!h||!y)throw console.error({threadA:f,threadB:p}),new Error("Unexpected thread");if(h.pid===y.pid){if(h.threadSortIndex!==y.threadSortIndex)return h.threadSortIndex-y.threadSortIndex}else if(h.processSortIndex!==y.processSortIndex)return h.processSortIndex-y.processSortIndex;return h.tieBreakerIndex-y.tieBreakerIndex});let{shared:d}=n.finish();return r.shared=d,r}async function R$(e,t,r,n,o,a){if(o.length===0)return;let{thread:i}=uh(e,t,r,n,o[0]),s=W(n.meta.categories).findIndex(l=>l.name==="Graphics");if(s===-1)throw new Error("Could not find the Graphics category in the profile's category list.");for(let l of o){let c="data:image/jpg;base64,"+l.args.snapshot,u=await M$(c);u!==null&&(i.markers.data.push({type:"CompositorScreenshot",url:a.indexForString(c),windowID:"id",windowWidth:u.width,windowHeight:u.height}),i.markers.name.push(a.indexForString("CompositorScreenshot")),i.markers.startTime.push(l.ts/1e3),i.markers.endTime.push(null),i.markers.phase.push(0),i.markers.category.push(s),i.markers.length++)}}function M$(e){return new Promise(t=>{let r=new Image;r.src=e,r.addEventListener("load",()=>{t({width:r.width,height:r.height})}),r.addEventListener("error",()=>{t(null)})})}function F$(e){let t=new Set([null]);for(let r=0;r<e.length;r++){if(!t.has(e.prefix[r]))throw new Error("The stack ordering is incorrect");t.add(r)}}function O$(e,t,r,n,o){let a=W(n.meta.categories).findIndex(u=>u.name==="Other");if(a===-1)throw new Error('No "Other" category in empty profile category list');let i=new Map,s=W(n.meta.categories);for(let u=0;u<s.length;u++)i.set(s[u].name,u);function l(u){let d=i.get(u);if(d!==void 0)return d;let f=s.length;return s.push({name:u,color:"grey",subcategories:["Other"]}),i.set(u,f),f}n.meta.markerSchema=[{name:"EventDispatch",chartLabel:"{marker.data.type2}",tooltipLabel:"{marker.data.type2} - EventDispatch",tableLabel:"{marker.data.type2}",display:["marker-chart","marker-table","timeline-overview"],fields:[{key:"type2",label:"Event Type",format:"string"}]}];let c=!1;for(let[u,d]of r.entries())if(!(u==="Profile"||u==="ProfileChunk"||u==="CpuProfile")){for(let f of d)if(!(f.ts===void 0||!Number.isFinite(f.ts))&&(f.ph==="X"&&f.dur!==void 0&&Number.isFinite(f.dur)||f.ph==="B"||f.ph==="E"||f.ph==="b"||f.ph==="n"||f.ph==="e"||f.ph==="i"||f.ph==="I"||f.ph==="R")){let p=f.ts/1e3,h=uh(e,t,r,n,f),{thread:y}=h,{markers:b}=y,g=null;"args"in f&&f.args&&typeof f.args=="object"&&(f.args.data?g=f.args.data:"detail"in f.args&&typeof f.args.detail=="string"&&(g={detail:f.args.detail})),b.name.push(o.indexForString(u)),g&&"type"in g&&(g.type2=g.type),g&&"category"in g&&(g.category2=g.category),g!=null&&g.detail&&!c&&(n.meta.markerSchema.push({name:"EventWithDetail",chartLabel:"{marker.data.detail}",tooltipLabel:"{marker.name}: {marker.data.detail}",tableLabel:"{marker.data.detail}",display:["marker-chart","marker-table"],fields:[{key:"detail",label:"Details",format:"string"}]}),c=!0);let m=g?{...g,type:g!=null&&g.detail?"EventWithDetail":u}:null,T=f.cat?l(f.cat):a;if(b.category.push(T),b.data.push(m),f.ph==="X"){let S=f.dur/1e3;b.phase.push(1),b.startTime.push(p),b.endTime.push(p+S)}else f.ph==="B"||f.ph==="b"?(b.startTime.push(p),b.endTime.push(null),b.phase.push(2)):f.ph==="E"||f.ph==="e"?(b.startTime.push(null),b.endTime.push(p),b.phase.push(3)):(b.startTime.push(p),b.endTime.push(null),b.phase.push(0));b.length++}}}nr();xe();function Kv(e){if(!e||typeof e!="object"||!("dhatFileVersion"in e)||typeof e.dhatFileVersion!="number")return null;let{dhatFileVersion:t}=e;if(t!==2)throw new Error(`This importer only supports dhat version 2. The file provided was version ${t}.`);let r=e,n=Ro();n.meta.product=r.cmd+" (dhat)",n.meta.importedFrom="dhat";let o=new an,a=o.getStringTable(),i=Dc(),{funcTable:s,stackTable:l,frameTable:c}=n.shared,u=new Map,d=0,f=0;s.name.push(a.indexForString(r.cmd)),s.isJS.push(!1),s.relevantForJS.push(!1),s.resource.push(-1),s.source.push(null),s.lineNumber.push(null),s.columnNumber.push(null);let p=s.length++;c.address.push(-1),c.line.push(null),c.column.push(null),c.category.push(d),c.subcategory.push(f),c.innerWindowID.push(null),c.nativeSymbol.push(null),c.inlineDepth.push(0),c.func.push(p);let h=c.length++;l.frame.push(h),l.prefix.push(null);let y=l.length++;for(let v of r.ftbl){let w=r.cmd,k=-1,E=null,R=null,F=v.match(/^0x([0-9a-f]+): (.+) \((?:in )?(.+?)(?::(\d+))?(?::(\d+))?\)$/i);F&&(k=parseInt(F[1],16),v=F[2],w=F[3],E=F[4]?Number(F[4]):null,R=F[5]?Number(F[5]):null);let G=`${v} ${w}`,B=u.get(G);B===void 0&&(s.name.push(a.indexForString(v)),s.isJS.push(!1),s.relevantForJS.push(!1),s.resource.push(-1),s.source.push(o.indexForSource(null,w)),s.lineNumber.push(E),s.columnNumber.push(R),B=s.length++,u.set(G,B)),c.address.push(k),c.line.push(E),c.column.push(R),c.category.push(d),c.subcategory.push(f),c.innerWindowID.push(null),c.nativeSymbol.push(null),c.inlineDepth.push(0),c.func.push(B),c.length++}let b=[],g=[],m=[],T=[],S=new Map;for(let v of r.pps){let w=0,k=y;for(let E=v.fs.length-1;E>=0;E--){let R=v.fs[E]+1,F=W(c.func[R],"Expected to find a funcIndex from a frameIndex");w=l.length;let G=S.get(k);if(G)for(let B of G){let Z=l.frame[B];if(c.func[Z]===F){w=B;break}}w===l.length&&(l.frame.push(R),l.prefix.push(k),G?G.push(w):S.set(k,[w]),l.length++),k=w}b.push(v.tb),g.push(v.mb),m.push(v.gb),T.push(v.eb),i.time.push(0),i.stack.push(w),i.length++}n.threads=[{name:"Total Bytes",weight:b},{name:"Maximum Bytes",weight:g},{name:"Bytes at Global Max",weight:m},{name:"Bytes at End",weight:T}].map(({name:v,weight:w},k)=>{let E=Ma();return E.pid=r.pid,E.tid=k,E.name=v,E.nativeAllocations={time:i.time.slice(),stack:i.stack.slice(),weight:w,weightType:"bytes",length:i.length},E});let{shared:I}=o.finish();return n.shared=I,n}var Nu=class{_libs;_libRanges;constructor(t){this._libs=t,this._libRanges=t.map(r=>{let n=BigInt(r.start),o=BigInt(r.offset),a=BigInt(r.end);return{baseAddress:n-o,start:n,end:a}})}locateAddress(t){let r=BigInt(t),n=this._libRanges,o=0,a=n.length-1;for(;o<=a;){let i=(o+a)/2|0;if(r>=n[i].end)o=i+1;else if(r<n[i].start)a=i-1;else{let s=i,l=r-n[s].baseAddress;return{lib:this._libs[s],relativeAddress:Number(l)}}}return{lib:null,relativeAddress:parseInt(t,16)}}};nr();xe();dh();function Zv(e,t,r){function n(i,s){if(i!==s){for(let l in e)if(l!=="length"){let c=e[l],u=c[i];c[i]=c[s],c[s]=u}}}function o(i,s,l){let c=t[i],u=s,d=i;for(let f=s;f<=l;f++)r(t[f],c)<0&&(n(f,u),u===d&&(d=f),u++);return n(u,d),u}function a(i,s){if(i<s){let l=i+s>>1,c=o(l,i,s);a(i,c-1),a(c+1,s)}}return a(0,e.length-1),e}ur();rr();var L$=0;function Qv(e,t){if(!e||typeof e!="object")return null;let{meta:r}=e;if(!r||typeof r!="object")return null;if(typeof r.preprocessedProfileVersion!="number"){let{threads:a}=e;if(!a||!Array.isArray(a))return null;let[i]=a;if(!i||typeof i!="object"||!i.stringArray)return null}let n=typeof r.preprocessedProfileVersion=="number"?r.preprocessedProfileVersion:L$;if(n===62)return e;if(n>62)throw new Error(`Unable to parse a processed profile of version ${n}, most likely profiler.firefox.com needs to be refreshed. The most recent version understood by this version of profiler.firefox.com is version ${62}.
662
+ You can try refreshing this page in case profiler.firefox.com has updated in the meantime.`);for(let a=n+1;a<=62;a++)a in Xv&&Xv[a](e,t);let o=e;return o.meta.preprocessedProfileVersion=62,o}function D$(e){return e==="x86_64-gcc3"?"x86_64":e}function B$(e){if(e){let t=e.split(" -> ");return t[t.length-1]}return e}function Jv(e){for(let t of e.threads)for(let r=0;r<t.markers.length;r++){let n=t.markers.data[r],o=t.processType==="default"?0:t.processStartupTime;if(n){if("stack"in n&&n.stack&&n.stack.samples.data.length>0){let a=n.stack,i=a.samples.data[0][a.samples.schema.stack],s=a.samples.data[0][a.samples.schema.time];i!==null&&(n.cause={time:s+o,stack:i})}delete n.stack}}}function Yv(e){let t=[["DOMEvent","DOM"],["Navigation::DOMComplete","DOM"],["Navigation::DOMInteractive","DOM"],["Navigation::Start","DOM"],["UserTiming","DOM"],["CC","GC / CC"],["GCMajor","GC / CC"],["GCMinor","GC / CC"],["GCSlice","GC / CC"],["Paint","Graphics"],["VsyncTimestamp","Graphics"],["CompositorScreenshot","Graphics"],["JS allocation","JavaScript"],["Styles","Layout"],["nsRefreshDriver::Tick waiting for paint","Layout"],["Navigation","Network"],["Network","Network"],["firstLoadURI","Other"],["IPC","Other"],["Text","Other"],["MainThreadLongTask","Other"],["FileIO","Other"],["Log","Other"],["PreferenceRead","Other"],["BHR-detected hang","Other"],["MainThreadLongTask","Other"]];for(let o of[{name:"Idle",color:"transparent",subcategories:["Other"]},{name:"Other",color:"grey",subcategories:["Other"]},{name:"Layout",color:"purple",subcategories:["Other"]},{name:"JavaScript",color:"yellow",subcategories:["Other"]},{name:"GC / CC",color:"orange",subcategories:["Other"]},{name:"Network",color:"lightblue",subcategories:["Other"]},{name:"Graphics",color:"green",subcategories:["Other"]},{name:"DOM",color:"blue",subcategories:["Other"]}])e.meta.categories.findIndex(i=>i.name===o.name)===-1&&e.meta.categories.push(o);let r=e.meta.categories.findIndex(o=>o.name==="Other"),n=new Map(t.map(([o,a])=>{let i=e.meta.categories.findIndex(s=>s.name===a);if(i===-1)throw new Error("Could not find a category index to map to.");return[o,i]}));for(let o of e.threads){let{markers:a,stringArray:i}=o;a.category||(a.category=[]);for(let s=0;s<a.length&&typeof a.category[s]!="number";s++){let l=a.name[s],c=a.data[s],u=i[l];c&&c.type&&(u=c.type==="tracing"?c.category:c.type);let d=n.get(u);d===void 0&&(d=r),a.category[s]=d}}}var Xv={1:e=>{Gt("sorting thread markers",()=>{for(let t of e.threads)Zv(t.markers,t.markers.time,(r,n)=>r-n)});for(let t of e.threads)"processType"in t||(t.name==="Content"?(t.processType="tab",t.name="GeckoMain"):t.name==="Plugin"?t.processType="plugin":t.processType="default")},2:e=>{for(let t of e.threads)for(let r of t.libs)"debugName"in r||(r.debugName=r.pdbName,r.path=r.name,r.name=r.debugName.endsWith(".pdb")?r.debugName.substr(0,r.debugName.length-4):r.debugName,r.arch=D$(e.meta.abi),delete r.pdbName,delete r.pdbAge,delete r.pdbSignature)},3:e=>{for(let t of e.threads)for(let r of t.libs)r.debugPath=r.debugPath||""},4:e=>{e.threads.forEach(t=>{let{funcTable:r,stringArray:n,resourceTable:o}=t,a=$e.withBackingArray(n),i={length:0,type:[],name:[],lib:[],icon:[],addonId:[],host:[]};function s(f,p){let h=i.length++;i.type[h]=1,i.name[h]=f,i.lib[h]=p}function l(f,p){let h=i.length++;i.type[h]=3,i.name[h]=f,i.host[h]=p}function c(f){let p=i.length++;i.type[p]=5,i.name[p]=f}let u=new Map,d=new Map;for(let f=0;f<o.length;f++)if(o.type[f]===1)u.set(f,i.length),s(o.name[f],o.lib[f]);else if(o.type[f]===5){let p=a.getString(o.name[f]),h=null,y,b;try{let g=new URL(p);if(!(g.protocol==="http:"||g.protocol==="https:"))throw new Error("not a webhost protocol");y=g.origin,b=g.host}catch{y=p,b=null}if(d.has(y))h=d.get(y);else{h=i.length,d.set(y,h);let g=a.indexForString(y);if(b){let m=a.indexForString(b);l(g,m)}else{let m=a.indexForString(p);c(m)}}u.set(f,h)}r.fileName=[],r.lineNumber=[];for(let f=0;f<r.length;f++){let p=r.resource[f];u.has(p)&&(r.resource[f]=u.get(p));let h=null,y=null;if(r.isJS[f]){let b=a.getString(r.name[f]),g=/^(.*) \((.*):([0-9]+)\)$/.exec(b)||/^()(.*):([0-9]+)$/.exec(b);if(g){let m=B$(g[2]);g[1]?r.name[f]=a.indexForString(g[1]):r.name[f]=a.indexForString(m),h=a.indexForString(m),y=Number(g[3])|0}}r.fileName[f]=h,r.lineNumber[f]=y}t.resourceTable=i})},5:e=>{for(let t of e.threads)delete t.samples.frameNumber},6:e=>{for(let t of e.threads){let{stringArray:r,markers:n}=t,o=[];for(let a=0;a<n.length;a++){let i=r[n.name[a]],s=n.data[a];i==="DOMEvent"?o[a]={type:"DOMEvent",startTime:s.startTime,endTime:s.endTime,eventType:s.type,phase:s.phase}:o[a]=s}t.markers.data=o}},7:e=>{for(let t of e.threads)t.pausedRanges=[],t.processStartupTime=0,t.processShutdownTime=null,t.registerTime=0,t.unregisterTime=null},8:e=>{for(let t of e.threads){if(t.processType==="default")continue;let{stringArray:r,markers:n}=t,o=[];for(let a=0;a<n.length;a++){let i=r[n.name[a]],s=n.data[a];i==="DOMEvent"&&s.timeStamp?o[a]={type:"DOMEvent",startTime:s.startTime,endTime:s.endTime,timeStamp:s.timeStamp+t.processStartupTime,eventType:s.eventType,phase:s.phase}:o[a]=s}t.markers.data=o}},9:e=>{function t(a){if("timings"in a&&!("status"in a.timings)){let i=a.timings;i.status="completed",Array.isArray(i.sices)&&(i.slices_list=i.slices,i.slices=i.slices.length),i.allocated_bytes=i.allocated*1024*1024}return a}function r(a){let i=t(a),s=i.timings;switch(s.status){case"completed":{let{totals:l,...c}=s,u={...c,phase_times:o(l),mmu_20ms:s.mmu_20ms/100,mmu_50ms:s.mmu_50ms/100};return{type:"GCMajor",startTime:i.startTime,endTime:i.endTime,timings:u}}case"aborted":return{type:"GCMajor",startTime:i.startTime,endTime:i.endTime,timings:{status:"aborted"}};default:throw console.log("Unknown GCMajor status"),new Error("Unknown GCMajor status")}}function n(a){if("nursery"in a){if("status"in a.nursery)return a.nursery.status==="no collection"&&(a.nursery.status="nursery empty"),Object.assign(a);let i=Object.assign(a,{nursery:Object.assign(a.nursery,{status:"complete",bytes_used:a.nursery.nursery_bytes,new_capacity:a.nursery.new_nursery_bytes,phase_times:a.nursery.timings})});return delete i.nursery.nursery_bytes,delete i.nursery.new_nursery_bytes,delete i.nursery.timings,i}return a}function o(a){let i={};for(let s in a)i[s]=a[s]*1e3;return i}for(let a of e.threads)for(let i=0;i<a.markers.length;i++){let s=a.markers.data[i];if(s){switch(s.type){case"GCMinor":s=n(s);break;case"GCSlice":s.timings&&s.timings.times&&(s.timings.phase_times=o(s.timings.times),delete s.timings.times);break;case"GCMajor":s=r(s);break;default:break}a.markers.data[i]=s}}},10:e=>{Jv(e)},11:e=>{for(let t of e.threads){let{stringArray:r,markers:n}=t;if(n.length===0)continue;let o=[];for(let a=0;a<n.length;a++){let i=r[n.name[a]],s=n.data[a];i==="DOMEvent"&&(n.data[a]={type:"tracing",category:"DOMEvent",timeStamp:s.timeStamp,interval:"start",eventType:s.eventType,phase:s.phase},o.push({data:{type:"tracing",category:"DOMEvent",timeStamp:s.timeStamp,interval:"end",eventType:s.eventType,phase:s.phase},time:s.endTime,name:n.name[a]}))}if(o.length>0){o.sort((u,d)=>u.time-d.time);let a={length:0,name:[],time:[],data:[]},i=0,s=n.time[0],l=0,c=o[0].time;for(;i<n.length||l<o.length;)s<=c?(a.name.push(n.name[i]),a.time.push(n.time[i]),a.data.push(n.data[i]),a.length++,i++,s=i<n.length?n.time[i]:1/0):(a.name.push(o[l].name),a.time.push(o[l].time),a.data.push(o[l].data),a.length++,l++,c=l<o.length?o[l].time:1/0);t.markers=a}}},12:e=>{e.meta.categories=[{name:"Idle",color:"transparent"},{name:"Other",color:"grey"},{name:"JavaScript",color:"yellow"},{name:"Layout",color:"purple"},{name:"Graphics",color:"green"},{name:"DOM",color:"blue"},{name:"GC / CC",color:"orange"},{name:"Network",color:"lightblue"}];let t=0,r=1,n=2,o=3,a=4,i=5,s=6,c={16:r,32:o,64:n,128:s,256:s,512:7,1024:a,2048:r,4096:r},u=new Map([["-[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]",t],["base::MessagePumpDefault::Run(base::MessagePump::Delegate*)",t],["mozilla::widget::WinUtils::WaitForMessage(unsigned long)",t],["mozilla::ThreadEventQueue<mozilla::PrioritizedEventQueue<mozilla::LabeledEventQueue> >::GetEvent(bool,mozilla::EventPriority *)",t],["mozilla::ThreadEventQueue<mozilla::PrioritizedEventQueue<mozilla::EventQueue> >::GetEvent(bool,mozilla::EventPriority *)",t],["mozilla::ThreadEventQueue<mozilla::EventQueue>::GetEvent(bool,mozilla::EventPriority *)",t],["mozilla::layers::PaintThread::AsyncPaintContents(mozilla::layers::CompositorBridgeChild *,mozilla::layers::CapturedPaintState *,bool (*)(mozilla::layers::CapturedPaintState *))",a],["PresShell::DoFlushPendingNotifications InterruptibleLayout",o],["nsRefreshDriver::Tick",o],["nsLayoutUtils::GetFrameForPoint",o],["nsAppShell::ProcessGeckoEvents",r],["PollWrapper(_GPollFD*, unsigned int, int)",t],["mozilla::image::DecodePoolImpl::PopWorkLocked(bool)",t],["nsCCUncollectableMarker::Observe(nsISupports*, char const*, char16_t const*)",s],["g_main_context_dispatch",r],["Events::ProcessGeckoEvents",r],["widget::ChildView::drawUsingOpenGL",r],["nsContentSink::StartLayout(bool)",o],["Paint::PresShell::Paint",a],["JS::EvaluateString",n],["js::RunScript",n]]),d=new Map([["PresShell::DoFlushPendingNotifications",o],["PresShell::DoReflow",o],["layout::DoReflow",o],["JS::Compile",n]]);function f(y){let b=y.indexOf(" ");return b===-1?y:y.substr(0,b)}function p(y){let b=u.get(y);return b!==void 0?b:d.get(f(y))}let h=/^(get |set )?\w+(\.\w+| constructor)$/;for(let y of e.threads){let{frameTable:b,funcTable:g,stringArray:m}=y;for(let T=0;T<b.length;T++){let S=b.func[T],I=m[g.name[S]],v=p(I);if(v!==void 0)b.category[T]=v;else{let w=b.category[T];if(w!==null)if(!g.isJS[S]&&h.test(I))b.category[T]=i;else{let k=w in c?c[w]:1;b.category[T]=k}}}}},13:e=>{let{meta:t,threads:r}=e,n=t.categories.findIndex(o=>o.color==="grey");for(let o of r){let{stackTable:a,frameTable:i}=o;a.category=new Array(a.length);for(let s=0;s<a.length;s++){let l=a.frame[s],c=i.category[l];if(c!==null)a.category[s]=c;else{let u=a.prefix[s];u!==null?a.category[s]=a.category[u]:a.category[s]=n}}}},14:e=>{let{threads:t}=e;for(let r=0;r<t.length;r++){let n=t[r];(n.pid===null||n.pid===void 0)&&(n.pid=`Unknown Process ${r+1}`)}},15:e=>{for(let t of e.threads){t.frameTable.column=new Array(t.frameTable.length);for(let r=0;r<t.frameTable.length;r++)t.frameTable.column[r]=null}},16:e=>{for(let t of e.threads){let{stringArray:r,markers:n}=t,o=[];for(let a=0;a<n.length;a++){let i=r[n.name[a]],s=n.data[a];switch(i){case"VsyncTimestamp":o[a]={type:"VsyncTimestamp",vsync:s.vsync};break;case"LayerTranslation":o[a]={type:"LayerTranslation",layer:s.layer,x:s.x,y:s.y};break;case"CompositorScreenshot":o[a]={type:"CompositorScreenshot",url:s.url,windowID:s.windowID,windowWidth:s.windowWidth,windowHeight:s.windowHeight};break;default:o[a]=s;break}}t.markers.data=o}},17:e=>{let t=/^(get |set )?\w+(\.\w+| constructor)$/;for(let r of e.threads){let{funcTable:n,stringArray:o}=r,a=$e.withBackingArray(o);n.relevantForJS=new Array(n.length);for(let i=0;i<n.length;i++){let s=a.getString(n.name[i]);s.startsWith("AutoEntryScript ")?(n.name[i]=a.indexForString(s.substring(16)),n.relevantForJS[i]=!0):n.relevantForJS[i]=t.test(s)}}},18:e=>{for(let t of e.threads){let{funcTable:r,stringArray:n}=t,o=$e.withBackingArray(n);r.columnNumber=[];for(let a=0;a<t.funcTable.length;a++)if(r.columnNumber[a]=null,r.isJS[a]){let i=r.fileName[a];if(i!==null){let s=o.getString(i),l=/^(.*):([0-9]+)$/.exec(s);l&&(r.columnNumber[a]=r.lineNumber[a],r.fileName[a]=o.indexForString(l[1]),r.lineNumber[a]=parseInt(l[2],10))}}}},19:e=>{for(let t of e.threads){let r=t.markers,n=t.processStartupTime;for(let o=0;o<t.markers.length;o++){let a=r.data[o];a&&"type"in a&&a.type==="Network"&&(a.domainLookupStart&&(a.domainLookupStart+=n),a.domainLookupEnd&&(a.domainLookupEnd+=n),a.connectStart&&(a.connectStart+=n),a.tcpConnectEnd&&(a.tcpConnectEnd+=n),a.secureConnectionStart&&(a.secureConnectionStart+=n),a.connectEnd&&(a.connectEnd+=n),a.requestStart&&(a.requestStart+=n),a.responseStart&&(a.responseStart+=n),a.responseEnd&&(a.responseEnd+=n))}}},20:e=>{},21:e=>{Jv(e)},22:e=>{for(let t of e.threads){let{stringArray:r}=t,n=$e.withBackingArray(r);if(!n.hasString("DiskIO"))continue;let o=n.indexForString("FileIO");for(let a=0;a<t.markers.length;a++){let i=t.markers.data[a];i&&i.type==="DiskIO"&&(i.type="FileIO",t.markers.name[a]=o)}}},23:e=>{for(let t of e.meta.categories)t.subcategories=["Other"];for(let t of e.threads){let{frameTable:r,stackTable:n}=t;r.subcategory=r.category.map(o=>o===null?null:0),n.subcategory=n.category.map(o=>o===null?null:0)}},24:e=>{Yv(e)},25:e=>{if(e.pages&&e.pages.length>0){let t=new Map,r=new Map,n=1,o=1;for(let a of e.pages){t.set(`d${a.docshellId}h${a.historyId}`,o);let i=r.get(a.docshellId);i||(i=n++,r.set(a.docshellId,i)),a.browsingContextID=i,a.innerWindowID=o,a.embedderInnerWindowID=0,o++,delete a.docshellId,delete a.historyId,delete a.isSubFrame}for(let a of e.threads){let{markers:i}=a;i.data=i.data.map(s=>{if(s&&s.docShellId!==void 0&&s.docshellHistoryId!==void 0){let l=t.get(`d${s.docShellId}h${s.docshellHistoryId}`);l===void 0?console.error("No page found with given docShellId and historyId"):s.innerWindowID=l,delete s.docShellId,delete s.docshellHistoryId}return s})}}},26:e=>{if(e.counters&&e.counters.length>0)for(let t of e.counters)t.sampleGroups=[t.sampleGroups]},27:e=>{for(let t of e.threads){let{frameTable:r}=t;r.innerWindowID=new Array(r.length).fill(0)}},28:e=>{for(let t of e.threads){let{markers:r}=t;if(r.category[0]===null){Yv(e);return}}},29:e=>{for(let t of e.threads)t.samples.duration&&(t.samples.weightType="samples",t.samples.weight=t.samples.duration,delete t.samples.duration),t.nativeAllocations&&(t.nativeAllocations.weightType="bytes",t.nativeAllocations.weight=t.nativeAllocations.duration,delete t.nativeAllocations.duration),t.jsAllocations&&(t.jsAllocations.weightType="bytes",t.jsAllocations.weight=t.jsAllocations.duration,delete t.jsAllocations.duration),t.samples.weight||(t.samples.weight=null),t.samples.weightType||(t.samples.weightType="samples")},30:e=>{for(let{markers:a}of e.threads){let i=a.time,s=[],l=[],c=[];delete a.time,a.startTime=s,a.endTime=l,a.phase=c;for(let u=0;u<a.length;u++){let d=a.data[u],f=i[u],p=f,h=null,y=0;if(d){let{startTime:b,endTime:g,type:m,interval:T}=d;m==="tracing"?T==="start"?(p=f,h=null,y=2):(p=null,h=f,y=3):b!==g&&typeof b=="number"&&typeof g=="number"&&(p=b,h=g,y=1),d.type!=="IPC"&&d.type!=="Network"&&(delete d.startTime,delete d.endTime)}s.push(p),l.push(h),c.push(y)}}},31:e=>{for(let{markers:r}of e.threads)for(let n=0;n<r.length;n++){let o=r.data[n];if(o){let{type:a,interval:i}=o;a==="tracing"&&i!=="start"&&i!=="end"&&(r.phase[n]=0,r.startTime[n]=r.endTime[n],r.endTime[n]=null)}}},32:e=>{for(let{markers:t}of e.threads)for(let r=0;r<t.length;r++){let n=t.data[r];if(n&&n.type==="tracing"&&n.category==="DOMEvent"){let o=t.startTime[r];n.type="DOMEvent",n.timeStamp!==void 0&&o!==null&&(n.latency=o-n.timeStamp),delete n.timeStamp}}},33:e=>{e.meta.markerSchema=[{name:"GCMajor",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"GCMinor",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"GCSlice",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"CC",tooltipLabel:"Cycle Collect",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"FileIO",display:["marker-chart","marker-table"],data:[{key:"operation",label:"Operation",format:"string",searchable:!0},{key:"source",label:"Source",format:"string",searchable:!0},{key:"filename",label:"Filename",format:"file-path",searchable:!0}]},{name:"MediaSample",display:["marker-chart","marker-table"],data:[{key:"sampleStartTimeUs",label:"Sample start time",format:"microseconds"},{key:"sampleEndTimeUs",label:"Sample end time",format:"microseconds"}]},{name:"Styles",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"elementsTraversed",label:"Elements traversed",format:"integer"},{key:"elementsStyled",label:"Elements styled",format:"integer"},{key:"elementsMatched",label:"Elements matched",format:"integer"},{key:"stylesShared",label:"Styles shared",format:"integer"},{key:"stylesReused",label:"Styles reused",format:"integer"}]},{name:"PreferenceRead",display:["marker-chart","marker-table"],data:[{key:"prefName",label:"Name",format:"string"},{key:"prefKind",label:"Kind",format:"string"},{key:"prefType",label:"Type",format:"string"},{key:"prefValue",label:"Value",format:"string"}]},{name:"UserTiming",tooltipLabel:"{marker.data.name}",chartLabel:"{marker.data.name}",tableLabel:"{marker.data.name}",display:["marker-chart","marker-table"],data:[{label:"Marker",value:"UserTiming"},{key:"entryType",label:"Entry Type",format:"string"},{label:"Description",value:"UserTiming is created using the DOM APIs performance.mark() and performance.measure()."}]},{name:"Text",tableLabel:"{marker.name} \u2014\xA0{marker.data.name}",chartLabel:"{marker.name} \u2014\xA0{marker.data.name}",display:["marker-chart","marker-table"],data:[{key:"name",label:"Details",format:"string"}]},{name:"Log",display:["marker-table"],tableLabel:"({marker.data.module}) {marker.data.name}",data:[{key:"module",label:"Module",format:"string"},{key:"name",label:"Name",format:"string"}]},{name:"DOMEvent",tooltipLabel:"{marker.data.eventType} \u2014 DOMEvent",tableLabel:"{marker.data.eventType}",chartLabel:"{marker.data.eventType}",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"latency",label:"Latency",format:"duration"}]},{name:"Paint",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"Navigation",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"Layout",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"IPC",tooltipLabel:"IPC \u2014\xA0{marker.data.niceDirection}",tableLabel:"{marker.name} \u2014 {marker.data.messageType} \u2014 {marker.data.niceDirection}",chartLabel:"{marker.data.messageType}",display:["marker-chart","marker-table","timeline-ipc"],data:[{key:"messageType",label:"Type",format:"string"},{key:"sync",label:"Sync",format:"string"},{key:"sendThreadName",label:"From",format:"string"},{key:"recvThreadName",label:"To",format:"string"}]},{name:"RefreshDriverTick",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"name",label:"Tick Reasons",format:"string"}]},{name:"Network",display:["marker-table"],data:[]}]},34:e=>{for(let t of e.threads){let r=t.processStartupTime,{markers:n}=t;for(let o of n.data)o&&o.type!=="tracing"&&o.type!=="Styles"&&o.cause&&o.cause.time!==void 0&&(o.cause.time+=r)}},35:e=>{if(e.meta.configuration&&e.meta.configuration.activeBrowsingContextID&&(e.meta.configuration.activeTabID=e.meta.configuration.activeBrowsingContextID,delete e.meta.configuration.activeBrowsingContextID),e.pages&&e.pages.length>0)for(let t of e.pages)t.tabID=t.browsingContextID,delete t.browsingContextID},36:e=>{for(let t of e.threads){let r={libIndex:[],address:[],name:[],length:0},{frameTable:n,funcTable:o,resourceTable:a}=t,i=new Map;for(let s=0;s<o.length;s++){let l=o.resource[s];if(l===-1||a.type[l]!==1)continue;let u=a.lib[l];if(u==null||u===-1)continue;let d=o.address[s],f=r.length;r.libIndex.push(u),r.address.push(d===-1?null:d),r.name.push(o.name[s]),r.length++,i.set(s,f)}delete o.address,n.nativeSymbol=n.func.map(s=>i.get(s)??null),t.nativeSymbols=r}},37:e=>{for(let t of e.threads)t.name==="Java Main Thread"&&(t.name="AndroidUI (JVM)")},38:e=>{for(let t of e.threads){let r=new Set,n=new Set,{samples:o,markers:a,jsAllocations:i,nativeAllocations:s,stackTable:l,frameTable:c}=t;for(let m=0;m<o.length;m++){let T=o.stack[m];T!==null&&r.add(T)}for(let m=0;m<a.length;m++){let T=a.data[m];if(T&&T.cause){let S=T.cause.stack;S!==null&&n.add(S)}}if(i!==void 0)for(let m=0;m<i.length;m++){let T=i.stack[m];T!==null&&n.add(T)}if(s!==void 0)for(let m=0;m<s.length;m++){let T=s.stack[m];T!==null&&n.add(T)}let u=new Uint32Array(c.length),d=new Set;for(let m of r){let T=l.frame[m];u[T]=T,c.address[T]!==-1&&d.add(T)}let f=new Map,p=new Set;for(let m of n){let T=l.frame[m],S=c.address[T];S!==-1&&f.set(T,S)}for(let m=0;m<l.length;m++){let T=l.prefix[m];if(T===null||p.has(T))continue;p.add(T);let S=l.frame[T],I=c.address[S];I!==-1&&f.set(S,I)}if(d.size===0&&f.size===0)continue;for(let[m,T]of f){if(d.has(m)){let S=c.length;c.address.push(T),c.category.push(c.category[m]),c.subcategory.push(c.subcategory[m]),c.func.push(c.func[m]),c.nativeSymbol.push(c.nativeSymbol[m]),c.innerWindowID.push(c.innerWindowID[m]),c.implementation.push(c.implementation[m]),c.line.push(c.line[m]),c.column.push(c.column[m]),c.optimizations.push(c.optimizations[m]),c.length++,u[m]=S}c.address[m]=T-1}let h={frame:[],prefix:[],category:[],subcategory:[],length:0},y=new Map,b=new Map,g=new Uint32Array(l.length);for(let m=0;m<l.length;m++){let T=l.frame[m],S=l.category[m],I=l.subcategory[m],v=l.prefix[m],w=v===null?null:g[v];if(p.has(m)||n.has(m)){let k=h.length;h.frame.push(T),h.category.push(S),h.subcategory.push(I),h.prefix.push(w),h.length++,g[m]=k,b.set(m,k)}if(r.has(m)){let k=u[T],E=h.length;h.frame.push(k),h.category.push(S),h.subcategory.push(I),h.prefix.push(w),h.length++,y.set(m,E)}}t.stackTable=h,o.stack=o.stack.map(m=>m===null?null:y.get(m)??null),a.data.forEach(m=>{m&&"cause"in m&&m.cause&&(m.cause.stack=b.get(m.cause.stack))}),i!==void 0&&(i.stack=i.stack.map(m=>m===null?null:b.get(m)??null)),s!==void 0&&(s.stack=s.stack.map(m=>m===null?null:b.get(m)??null))}},39:e=>{for(let t of e.threads)t.samples.threadCPUDelta&&(t.samples.threadCPUDelta.some(n=>n!==null)||delete t.samples.threadCPUDelta)},40:e=>{for(let t of e.threads)t.frameTable.inlineDepth=Array(t.frameTable.length).fill(0)},41:e=>{let t=[],r=new Map;for(let n of e.threads){let{libs:o,resourceTable:a,nativeSymbols:i,stringArray:s}=n,l=$e.withBackingArray(s),c=new Map;delete n.libs;let u=d=>{let f=c.get(d);if(f===void 0){let p=o[d],{debugName:h,breakpadId:y}=p,b=`${h}/${y}`;if(f=r.get(b),f===void 0){f=t.length;let{arch:g,name:m,path:T,debugPath:S,codeId:I}=p;t.push({arch:g,name:m,path:T,debugName:h,debugPath:S,breakpadId:y,codeId:I??null}),r.set(b,f)}c.set(d,f)}return f};for(let d=0;d<a.length;d++){let f=a.name[d];(f===-1||f===void 0||f===null)&&(a.name[d]=l.indexForString("<unnamed resource>"));let p=a.host[d];(p===-1||p===void 0)&&(a.host[d]=null);let h=a.lib[d];if(h==null||h===-1){a.lib[d]=null;continue}let y=u(h);a.lib[d]=y}for(let d=0;d<i.length;d++){let f=i.libIndex[d],p=u(f);i.libIndex[d]=p}}e.libs=t},42:e=>{for(let t of e.threads){let{nativeSymbols:r}=t;r.functionSize=Array(r.length).fill(null)}},43:e=>{},44:e=>{for(let t of e.meta.markerSchema){let r;switch(t.name){case"FileIO":{t.data.push({key:"threadId",label:"Thread ID",format:"string",searchable:!0}),r=[];break}case"Log":{r=["name","module"];break}case"DOMEvent":{t.data.push({key:"eventType",label:"Event Type",format:"string",searchable:!0}),r=["target"];break}case"TraceEvent":{r=["name1","name2","val1","val2"];break}default:{r=["name","category"];break}}for(let n of t.data)r.includes(n.key)&&(n.searchable=!0)}},45:e=>{for(let t of e.threads)delete t.frameTable.optimizations},46:e=>{for(let t of e.threads)t.isMainThread=t.name==="GeckoMain"||typeof t.pid=="string"||String(t.pid)===t.tid},47:e=>{for(let t of e.threads){t.pid=`${t.pid}`;for(let r of t.markers.data)r&&r.type==="IPC"&&(r.otherPid=`${r.otherPid}`)}if(e.counters)for(let t of e.counters)t.pid=`${t.pid}`;if(e.profilerOverhead)for(let t of e.profilerOverhead)t.pid=`${t.pid}`},48:e=>{if(e.counters&&e.counters.length>0)for(let t of e.counters)t.samples=t.sampleGroups[0].samples,delete t.sampleGroups},49:e=>{},50:e=>{},51:e=>{},52:e=>{let t=new Set(e.meta.markerSchema.map(i=>i.name)),r="tracingCCFrom52Upgrader",n=t.has("CC"),o=!1,a=!1;for(let i of e.threads){let{markers:s}=i;for(let l=0;l<s.length;l++){let c=s.data[l];c&&c.type==="tracing"&&c.category&&(o=!0,n&&c.category==="CC"&&(c.type=r,a=!0,c.interval&&delete c.interval))}}o&&!t.has("tracing")&&e.meta.markerSchema.push({name:"tracing",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]}),a&&e.meta.markerSchema.push({name:r,display:["marker-chart","marker-table","timeline-memory"],data:[{key:"category",label:"Type",format:"string"}]})},53:e=>{for(let t of e.threads){let{frameTable:r,stackTable:n}=t;if(r.category)r.subcategory||(r.subcategory=new Array(r.length).fill(0));else{r.category=new Array(r.length).fill(null),r.subcategory=new Array(r.length).fill(null);for(let o=0;o<n.length;o++){let a=n.frame[o];r.category[a]=n.category[o],r.subcategory[a]=n.subcategory[o]}}delete n.category,delete n.subcategory}},54:e=>{function t(r){let{categories:n}=r.meta;if(!n||n.some(s=>s.subcategories.length!==1))return;let o=n.findIndex(s=>s.name==="JavaScript");if(o===-1)return;let a=n[o].subcategories,i=new Map;for(let s of r.threads){let{frameTable:l,stringArray:c}=s;for(let u=0;u<l.length;u++){let d=l.implementation[u];if(d===null)continue;let f=c[d],p=i.get(f);p===void 0&&(p=a.length,a[p]=`JIT (${f})`,i.set(f,p)),l.category[u]=o,l.subcategory[u]=p}}}t(e);for(let r of e.threads)delete r.frameTable.implementation;delete e.meta.doesNotUseFrameImplementation},55:e=>{for(let t of e.meta.markerSchema){let r=t.data.filter(l=>l.key===void 0),n=t.data.filter(l=>l.value===void 0);if(t.fields=n,delete t.data,r.length===0)continue;let o=r.findIndex(l=>l.label==="Description");o===-1&&(o=0);let a=r[o].value;t.description=a;let s=r.filter((l,c)=>c!==o).filter(l=>l.label!=="Marker"&&l.value!=="UserTiming");s.length!==0&&console.warn(`Discarding the following static fields from marker schema "${t.name}": ${s.map(l=>l.label+": "+l.value).join(", ")}`)}},56:e=>{let t=[],r=$e.withBackingArray(t),n=new Map;n.set("CompositorScreenshot",["url"]);for(let o of e.meta.markerSchema){let{name:a,fields:i}=o,s=[];for(let l of i)(l.format==="unique-string"||l.format==="flow-id"||l.format==="terminating-flow-id")&&s.push(l.key);s.length!==0&&n.set(a,s)}for(let o of e.threads){let{markers:a,funcTable:i,nativeSymbols:s,resourceTable:l,jsTracer:c,stringArray:u}=o;for(let d=0;d<a.length;d++){let f=u[a.name[d]];a.name[d]=r.indexForString(f);let p=a.data[d];if(!p||!p.type)continue;let h=n.get(p.type);if(h!==void 0)for(let y of h){let b=p[y],g=u[b];g!==void 0&&(p[y]=r.indexForString(g))}}for(let d=0;d<i.length;d++){i.name[d]=r.indexForString(u[i.name[d]]);let f=i.fileName[d];f!==null&&(i.fileName[d]=r.indexForString(u[f]))}for(let d=0;d<s.length;d++)s.name[d]=r.indexForString(u[s.name[d]]);for(let d=0;d<l.length;d++){l.name[d]=r.indexForString(u[l.name[d]]);let f=l.host[d];f!==null&&(l.host[d]=r.indexForString(u[f]))}if(c!==void 0)for(let d=0;d<c.length;d++)c.events[d]=r.indexForString(u[c.events[d]]);delete o.stringArray}e.shared={stringArray:t}},57:e=>{for(let t of e.meta.markerSchema)for(let r of t.fields)delete r.searchable},58:e=>{let t={length:0,id:[],filename:[]},r=new Map;for(let n of e.threads){let{funcTable:o}=n,a=new Array(o.length);for(let i=0;i<o.length;i++){let s=o.fileName[i];if(s===null)a[i]=null;else{let l=r.get(s);l===void 0&&(l=t.length,t.id.push(null),t.filename.push(s),t.length++,r.set(s,l)),a[i]=l}}o.source=a,delete o.fileName}e.shared||(e.shared={}),e.shared.sources=t},59:e=>{for(let t of e.threads){let{frameTable:r,markers:n}=t,o=new Set;for(let a=0;a<r.length;a++){let i=r.innerWindowID[a];i!==null&&i!==0&&o.add(i)}for(let a=0;a<n.length;a++){let i=n.data[a];if(!i||!("innerWindowID"in i))continue;let s=i.innerWindowID;typeof s=="number"&&s!==0&&o.add(s)}o.size!==0&&(t.usedInnerWindowIDs=Array.from(o))}},60:(e,t)=>{let r=new Map,n=new Map,o=new Map,a={frame:[],prefix:[],length:0},i={address:[],inlineDepth:[],category:[],subcategory:[],func:[],nativeSymbol:[],innerWindowID:[],line:[],column:[],length:0},s={name:[],isJS:[],relevantForJS:[],resource:[],source:[],lineNumber:[],columnNumber:[],length:0},l={type:[],lib:[],name:[],host:[],length:0},c={libIndex:[],address:[],name:[],functionSize:[],length:0};function u(m){let T=new Int32Array(m.length);for(let S=0;S<m.length;S++){let I=m.libIndex[S],v=m.address[S],w=`${I}-${v}`,k=o.get(w);k===void 0&&(k=c.length++,o.set(w,k),c.libIndex[k]=I,c.address[k]=v,c.name[k]=m.name[S],c.functionSize[k]=m.functionSize[S]),T[S]=k}return T}function d(m){let T=new Int32Array(m.length);for(let S=0;S<m.length;S++){let I=m.type[S],v=m.lib[S],w=m.name[S],k=m.host[S],E=`${I}-${v!==null?v:""}-${w}-${k!==null?k:""}`,R=n.get(E);R===void 0&&(R=l.length++,n.set(E,R),l.type[R]=I,l.lib[R]=v,l.name[R]=w,l.host[R]=k),T[S]=R}return T}function f(m,T){let S=new Int32Array(m.length);for(let I=0;I<m.length;I++){let v=m.name[I],w=m.isJS[I],k=m.relevantForJS[I],E=m.resource[I],R=E!==-1?T[E]:-1,F=m.source[I],G=m.lineNumber[I],B=m.columnNumber[I],Z=`${v}-${w}-${k}-${R}-${F!==null?F:""}-${G!==null?G:""}-${B!==null?B:""}`,X=r.get(Z);X===void 0&&(X=s.length++,r.set(Z,X),s.name[X]=v,s.isJS[X]=w,s.relevantForJS[X]=k,s.resource[X]=R,s.source[X]=F,s.lineNumber[X]=G,s.columnNumber[X]=B),S[I]=X}return S}function p(m,T,S){let I=i.length;for(let v=0;v<m.length;v++){let w=v+I;i.address[w]=m.address[v],i.inlineDepth[w]=m.inlineDepth[v],i.category[w]=m.category[v],i.subcategory[w]=m.subcategory[v],i.func[w]=T[m.func[v]];let k=m.nativeSymbol[v],E=k!==null?S[k]:null;i.nativeSymbol[w]=E,i.innerWindowID[w]=m.innerWindowID[v],i.line[w]=m.line[v],i.column[w]=m.column[v]}return i.length+=m.length,I}function h(m,T){let S=a.length;for(let I=0;I<m.length;I++){let v=I+S,w=m.frame[I]+T,k=m.prefix[I],E=k!==null?k+S:null;a.frame[v]=w,a.prefix[v]=E}return a.length+=m.length,S}function y(m,T){for(let S=0;S<m.length;S++){let I=m[S],v=I!==null?I+T:null;m[S]=v}}function b(m,T){for(let S=0;S<m.length;S++){let I=m.data[S];if(!I||!I.cause)continue;let v=I.cause.stack,w=v!=null?v+T:null;I.cause.stack=w}}let g=new Array;for(let m=0;m<e.threads.length;m++){let T=e.threads[m],S=u(T.nativeSymbols);delete T.nativeSymbols;let I=d(T.resourceTable);delete T.resourceTable;let v=f(T.funcTable,I);delete T.funcTable;let w=p(T.frameTable,v,S);delete T.frameTable;let k=h(T.stackTable,w);delete T.stackTable,y(T.samples.stack,k),T.nativeAllocations&&y(T.nativeAllocations.stack,k),T.jsAllocations&&y(T.jsAllocations.stack,k),b(T.markers,k),g[m]={funcTableIndexMap:v,resourceTableIndexMap:I}}e.shared.stackTable=a,e.shared.frameTable=i,e.shared.funcTable=s,e.shared.resourceTable=l,e.shared.nativeSymbols=c,t.v60={threadMappings:g,newFuncCount:s.length}},61:e=>{let t=e.shared&&e.shared.sources;if(t){t.uuid!==void 0&&t.id===void 0&&(t.id=t.uuid,delete t.uuid);let r=t.length;t.startLine=new Array(r).fill(1),t.startColumn=new Array(r).fill(1),t.sourceMapURL=new Array(r).fill(null)}},62:e=>{if(e.counters)for(let t of e.counters){if(t.display!==void 0)continue;let{category:r,name:n}=t;r==="Memory"?t.display={graphType:"line-accumulated",unit:"bytes",color:t.color??"orange",markerSchemaLocation:"timeline-memory",sortWeight:20,label:"Memory"}:r==="power"?t.display={graphType:"line-rate",unit:"pWh",color:t.color??"grey",markerSchemaLocation:null,sortWeight:30,label:n}:r==="Bandwidth"?t.display={graphType:"line-rate",unit:"bytes",color:t.color??"blue",markerSchemaLocation:null,sortWeight:10,label:"Bandwidth"}:r==="CPU"&&n==="processCPU"?t.display={graphType:"line-rate",unit:"percent",color:t.color??"grey",markerSchemaLocation:null,sortWeight:40,label:"Process CPU"}:t.display={graphType:"line-rate",unit:"",color:t.color??"grey",markerSchemaLocation:null,sortWeight:50,label:n},delete t.color}}};ur();rr();var U$=0;function ew(e){if(e&&typeof e=="object"&&"meta"in e&&e.meta&&typeof e.meta=="object")return e.meta;throw new Error("Could not find the meta property on a profile.")}function rw(e){let t=ew(e).version||U$;if(t!==34){if(t>34)throw new Error(`Unable to parse a Gecko profile of version ${t}, most likely profiler.firefox.com needs to be refreshed. The most recent version understood by this version of profiler.firefox.com is version ${34}.
663
+ You can try refreshing this page in case profiler.firefox.com has updated in the meantime.`);for(let r=t+1;r<=34;r++)r in tw&&tw[r](e);ew(e).version=34}}function $$(e){return e==="x86_64-gcc3"?"x86_64":e}var tw={1:()=>{throw new Error("Gecko profiles without version numbers are very old and no conversion code has been written for that version of the profile format.")},2:()=>{throw new Error("Gecko profile version 1 is very old and no conversion code has been written for that version of the profile format.")},3:()=>{throw new Error("Gecko profile version 2 is very old and no conversion code has been written for that version of the profile format.")},4:e=>{function t(r){r.libs=JSON.parse(r.libs).map(n=>{if("breakpadId"in n)n.debugName=n.name.substr(n.name.lastIndexOf("/")+1);else{n.debugName=n.pdbName;let o=n.pdbSignature.replace(/[{}-]/g,"").toUpperCase();n.breakpadId=o+n.pdbAge}return delete n.pdbName,delete n.pdbAge,delete n.pdbSignature,n.path=n.name,n.name=n.debugName.endsWith(".pdb")?n.debugName.substr(0,n.debugName.length-4):n.debugName,n.arch=$$(r.meta.abi),n.debugPath="",n}).sort((n,o)=>n.start-o.start);for(let n=0;n<r.threads.length;n++)if(typeof r.threads[n]=="string"){let o=JSON.parse(r.threads[n]);t(o),r.threads[n]=JSON.stringify(o)}else{let o=r.threads[n];"processType"in o||(o.name==="Content"?(o.processType="tab",o.name="GeckoMain"):o.name==="Plugin"?o.processType="plugin":o.processType="default")}r.meta.version=4}t(e)},5:e=>{function t(r){let n=r.threads.map(o=>{if(typeof o=="string"){let a=JSON.parse(o);return t(a),{type:"process",data:a}}return{type:"thread",data:o}});r.processes=n.filter(o=>o.type==="process").map(o=>o.data),r.threads=n.filter(o=>o.type==="thread").map(o=>o.data),r.meta.version=5}t(e)},6:e=>{function t(r){for(let n of r.threads){delete n.samples.schema.frameNumber;for(let o=0;o<n.samples.data.length;o++)n.samples.data[o].splice(5)}for(let n of r.processes)t(n)}t(e)},7:e=>{function t(r){for(let n of r.threads){let o=n.markers.schema.name,a=n.markers.schema.data;for(let i=0;i<n.markers.data.length;i++)if(n.stringTable[n.markers.data[i][o]]==="DOMEvent"){let l=n.markers.data[i][a];l.eventType=l.type,l.type="DOMEvent"}}for(let n of r.processes)t(n)}t(e)},8:e=>{function t(r){r.pausedRanges=[],r.meta.shutdownTime=null;for(let n of r.threads)n.registerTime=0,n.unregisterTime=null;for(let n of r.processes)t(n)}t(e)},9:e=>{function t(o){if("timings"in o&&!("status"in o.timings)){let a=o.timings;a.status="completed",Array.isArray(a.sices)&&(a.slices_list=a.slices,a.slices=a.slices.length),a.allocated_bytes=a.allocated*1024*1024}return o}function r(o){if("nursery"in o){if("status"in o.nursery)return o.nursery.status==="no collection"&&(o.nursery.status="nursery empty"),Object.assign(o);let a=Object.assign(o,{nursery:Object.assign(o.nursery,{status:"complete",bytes_used:o.nursery.nursery_bytes,new_capacity:o.nursery.new_nursery_bytes,phase_times:o.nursery.timings})});return delete a.nursery.nursery_bytes,delete a.nursery.new_nursery_bytes,delete a.nursery.timings,a}return o}function n(o){for(let a of o.threads){let i=a.markers.schema.data;for(let s=0;s<a.markers.data.length;s++){let l=a.markers.data[s][i];if(l){switch(l.type){case"GCMinor":l=r(l);break;case"GCMajor":l=t(l);break;default:break}a.markers.data[s][i]=l}}}for(let a of o.processes)n(a)}n(e)},10:e=>{function t(r){for(let n of r.threads){let{markers:o}=n,a=o.schema.name,i=o.schema.data,s=o.schema.time,l=[];for(let c=0;c<o.data.length;c++){let u=o.data[c],d=n.stringTable[u[a]],f=u[i];if(d==="DOMEvent"&&f.type!=="tracing"){let p=[];p[i]={type:"tracing",category:"DOMEvent",timeStamp:f.timeStamp,interval:"end",eventType:f.eventType,phase:f.phase},p[s]=f.endTime,p[a]=u[a],l.push(p),u[s]=f.startTime,u[i]={type:"tracing",category:"DOMEvent",timeStamp:f.timeStamp,interval:"start",eventType:f.eventType,phase:f.phase}}}o.data=o.data.concat(l)}for(let n of r.processes)t(n)}t(e)},11:e=>{let t=0;function r(i){for(let s of i.threads)(s.pid===null||s.pid===void 0)&&(s.pid=`Unknown Process ${++t}`);for(let s of i.processes)r(s)}r(e);let n=[{name:"Idle",color:"transparent"},{name:"Other",color:"grey"},{name:"JavaScript",color:"yellow"},{name:"Layout",color:"purple"},{name:"Graphics",color:"green"},{name:"DOM",color:"blue"},{name:"GC / CC",color:"orange"},{name:"Network",color:"lightblue"}],o={16:1,32:3,64:2,128:6,256:6,512:7,1024:4,2048:1,4096:1};function a(i){i.meta.categories=n;for(let s of i.threads){let l=s.frameTable.schema.category;for(let c of s.frameTable.data)l in c&&c[l]!==null&&(c[l]in o?c[l]=o[c[l]]:c[l]=1)}for(let s of i.processes)a(s)}a(e)},12:e=>{function n(o){for(let a of o.threads){let i=a.frameTable.schema.category;for(let s of a.frameTable.data)s.hasOwnProperty(i)&&(s[5]=s[4],s[4]=null);a.frameTable.schema.category=5,a.frameTable.schema.column=4}for(let a of o.processes)n(a)}n(e)},13:e=>{function t(r){for(let n of r.threads){let o=n.markers.schema.name,a=n.markers.schema.data;for(let i=0;i<n.markers.data.length;i++){let s=n.stringTable[n.markers.data[i][o]],l=n.markers.data[i][a];switch(s){case"VsyncTimestamp":case"LayerTranslation":case"CompositorScreenshot":l.type=s,delete l.category;break;default:break}}}for(let n of r.processes)t(n)}t(e)},14:e=>{let t=/^(get |set )?\w+(\.\w+| constructor)$/;function r(n){for(let o of n.threads){o.frameTable.schema={location:0,relevantForJS:1,implementation:2,optimizations:3,line:4,column:5,category:6};let a=o.frameTable.schema.location,i=o.frameTable.schema.relevantForJS,s=$e.withBackingArray(o.stringTable);for(let l=0;l<o.frameTable.data.length;l++){let c=o.frameTable.data[l];c.splice(i,0,!1);let u=s.getString(c[a]);u.startsWith("AutoEntryScript ")?(c[i]=!0,c[a]=s.indexForString(u.substring(16))):c[i]=t.test(u)}}for(let o of n.processes)r(o)}r(e)},15:e=>{function t(r){for(let n of r.threads){let o=$e.withBackingArray(n.stringTable);if(!o.hasString("DiskIO"))continue;let a=o.indexForString("FileIO"),i=n.markers.schema.name,s=n.markers.schema.data;for(let l=0;l<n.markers.data.length;l++){let c=n.markers.data[l],u=c[s];u&&u.type==="DiskIO"&&(c[i]=a,u.type="FileIO")}}for(let n of r.processes)t(n)}t(e)},16:e=>{function t(i){for(let s of i.meta.categories)s.subcategories=["Other"];for(let s of i.threads){let{frameTable:l}=s;l.schema.subcategory=7;for(let c=0;c<l.data.length;c++)l.data[c][l.schema.category]&&(l.data[c][l.schema.subcategory]=0)}for(let s of i.processes)t(s)}t(e);let r=[["DOMEvent","DOM"],["Navigation::DOMComplete","DOM"],["Navigation::DOMInteractive","DOM"],["Navigation::Start","DOM"],["UserTiming","DOM"],["CC","GC / CC"],["GCMajor","GC / CC"],["GCMinor","GC / CC"],["GCSlice","GC / CC"],["Paint","Graphics"],["VsyncTimestamp","Graphics"],["CompositorScreenshot","Graphics"],["JS allocation","JavaScript"],["Styles","Layout"],["nsRefreshDriver::Tick waiting for paint","Layout"],["Navigation","Network"],["Network","Network"],["firstLoadURI","Other"],["IPC","Other"],["Text","Other"],["MainThreadLongTask","Other"],["FileIO","Other"],["Log","Other"],["PreferenceRead","Other"],["BHR-detected hang","Other"],["MainThreadLongTask","Other"]];for(let i of[{name:"Idle",color:"transparent",subcategories:["Other"]},{name:"Other",color:"grey",subcategories:["Other"]},{name:"Layout",color:"purple",subcategories:["Other"]},{name:"JavaScript",color:"yellow",subcategories:["Other"]},{name:"GC / CC",color:"orange",subcategories:["Other"]},{name:"Network",color:"lightblue",subcategories:["Other"]},{name:"Graphics",color:"green",subcategories:["Other"]},{name:"DOM",color:"blue",subcategories:["Other"]}])e.meta.categories.findIndex(l=>l.name===i.name)===-1&&e.meta.categories.push(i);let n=e.meta.categories.findIndex(i=>i.name==="Other"),o=new Map(r.map(([i,s])=>{let l=e.meta.categories.findIndex(c=>c.name===s);if(l===-1)throw new Error("Could not find a category index to map to.");return[i,l]}));function a(i){for(let s of i.threads){let{markers:l,stringTable:c}=s;if(l.schema.category!==void 0)return;l.schema.category=3;for(let u=0;u<l.data.length;u++){let d=l.data[u][l.schema.name],f=l.data[u][l.schema.data],p=c[d];f&&f.type&&(p=f.type==="tracing"?f.category:f.type);let h=o.get(p);h===void 0&&(h=n),l.data[u][l.schema.category]=h}}for(let s of i.processes)a(s)}a(e)},17:e=>{let t=1,r=1;function n(o){if(o.pages&&o.pages.length>0){let a=new Map,i=new Map;for(let s of o.pages){a.set(`d${s.docshellId}h${s.historyId}`,r);let l=i.get(s.docshellId);l||(l=t++,i.set(s.docshellId,l)),s.browsingContextID=l,s.innerWindowID=r,s.embedderInnerWindowID=0,r++,delete s.docshellId,delete s.historyId,delete s.isSubFrame}for(let s of o.threads){let{markers:l}=s,c=l.schema.data;for(let u=0;u<s.markers.data.length;u++){let f=s.markers.data[u][c];if(f&&f.docShellId!==void 0&&f.docshellHistoryId!==void 0){let p=a.get(`d${f.docShellId}h${f.docshellHistoryId}`);p===void 0?console.error("No page found with given docShellId and historyId"):f.innerWindowID=p,delete f.docShellId,delete f.docshellHistoryId}}}}for(let a of o.processes)n(a)}n(e)},18:e=>{function t(r){if(r.counters&&r.counters.length>0)for(let n of r.counters)"samples"in n.sample_groups?n.sample_groups=[n.sample_groups]:n.sample_groups=[];for(let n of r.processes)t(n)}t(e)},19:e=>{function t(r){for(let n of r.threads){let{frameTable:o}=n;o.schema={location:0,relevantForJS:1,innerWindowID:2,implementation:3,optimizations:4,line:5,column:6,category:7,subcategory:8};for(let a=0;a<o.data.length;a++){let i=o.schema.innerWindowID;o.data[a].splice(i,0,0)}}for(let n of r.processes)t(n)}t(e)},20:e=>{function a(i){for(let s of i.threads){let{markers:l}=s,c=l.schema,u={name:0,startTime:1,endTime:2,phase:3,category:4,data:5};l.schema=u;for(let d=0;d<l.data.length;d++){let f=l.data[d],p=f[c.name],h=f[c.time],y=f[c.category],b=f[c.data],g=h,m=null,T=0;if(b){let{startTime:I,endTime:v,type:w,interval:k}=b;w==="tracing"?k==="start"?(g=h,m=null,T=2):k==="end"&&(g=null,m=h,T=3):I!==v&&typeof I=="number"&&typeof v=="number"&&(g=I,m=v,T=1),b.type!=="IPC"&&b.type!=="Network"&&(delete b.startTime,delete b.endTime)}let S=[];S[u.name]=p,S[u.startTime]=g,S[u.endTime]=m,S[u.phase]=T,S[u.category]=y,S[u.data]=b,l.data[d]=S}}for(let s of i.processes)a(s)}a(e)},21:e=>{function t(r){for(let n of r.threads){let{markers:o}=n;for(let a=0;a<o.data.length;a++){let i=o.data[a],s=i[o.schema.data];if(s&&s.type==="tracing"&&s.category==="DOMEvent"){let l=i[o.schema.startTime];s.type="DOMEvent",s.timeStamp!==void 0&&(s.latency=l-s.timeStamp),delete s.timeStamp}}}for(let n of r.processes)t(n)}t(e)},22:e=>{let t=e;t.meta.markerSchema=[{name:"GCMajor",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"GCMinor",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"GCSlice",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"CC",tooltipLabel:"Cycle Collect",display:["marker-chart","marker-table","timeline-memory"],data:[]},{name:"FileIO",display:["marker-chart","marker-table"],data:[{key:"operation",label:"Operation",format:"string",searchable:!0},{key:"source",label:"Source",format:"string",searchable:!0},{key:"filename",label:"Filename",format:"file-path",searchable:!0}]},{name:"MediaSample",display:["marker-chart","marker-table"],data:[{key:"sampleStartTimeUs",label:"Sample start time",format:"microseconds"},{key:"sampleEndTimeUs",label:"Sample end time",format:"microseconds"}]},{name:"Styles",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"elementsTraversed",label:"Elements traversed",format:"integer"},{key:"elementsStyled",label:"Elements styled",format:"integer"},{key:"elementsMatched",label:"Elements matched",format:"integer"},{key:"stylesShared",label:"Styles shared",format:"integer"},{key:"stylesReused",label:"Styles reused",format:"integer"}]},{name:"PreferenceRead",display:["marker-chart","marker-table"],data:[{key:"prefName",label:"Name",format:"string"},{key:"prefKind",label:"Kind",format:"string"},{key:"prefType",label:"Type",format:"string"},{key:"prefValue",label:"Value",format:"string"}]},{name:"UserTiming",tooltipLabel:"{marker.data.name}",chartLabel:"{marker.data.name}",tableLabel:"{marker.data.name}",display:["marker-chart","marker-table"],data:[{label:"Marker",value:"UserTiming"},{key:"entryType",label:"Entry Type",format:"string"},{label:"Description",value:"UserTiming is created using the DOM APIs performance.mark() and performance.measure()."}]},{name:"Text",tableLabel:"{marker.name} \u2014\xA0{marker.data.name}",chartLabel:"{marker.name} \u2014\xA0{marker.data.name}",display:["marker-chart","marker-table"],data:[{key:"name",label:"Details",format:"string"}]},{name:"Log",display:["marker-table"],tableLabel:"({marker.data.module}) {marker.data.name}",data:[{key:"module",label:"Module",format:"string"},{key:"name",label:"Name",format:"string"}]},{name:"DOMEvent",tooltipLabel:"{marker.data.eventType} \u2014 DOMEvent",tableLabel:"{marker.data.eventType}",chartLabel:"{marker.data.eventType}",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"latency",label:"Latency",format:"duration"}]},{name:"Paint",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"Navigation",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"Layout",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"category",label:"Type",format:"string"}]},{name:"IPC",tooltipLabel:"IPC \u2014\xA0{marker.data.niceDirection}",tableLabel:"{marker.name} \u2014 {marker.data.messageType} \u2014 {marker.data.niceDirection}",chartLabel:"{marker.data.messageType}",display:["marker-chart","marker-table","timeline-ipc"],data:[{key:"messageType",label:"Type",format:"string"},{key:"sync",label:"Sync",format:"string"},{key:"sendThreadName",label:"From",format:"string"},{key:"recvThreadName",label:"To",format:"string"}]},{name:"RefreshDriverTick",display:["marker-chart","marker-table","timeline-overview"],data:[{key:"name",label:"Tick Reasons",format:"string"}]},{name:"Network",display:["marker-table"],data:[]}];for(let r of t.processes)r.meta.markerSchema=[]},23:e=>{function t(r){if(e.meta.configuration&&e.meta.configuration.activeBrowsingContextID&&(e.meta.configuration.activeTabID=e.meta.configuration.activeBrowsingContextID,delete e.meta.configuration.activeBrowsingContextID),r.pages&&r.pages.length>0)for(let n of r.pages)n.tabID=n.browsingContextID,delete n.browsingContextID;for(let n of r.processes)t(n)}t(e)},24:e=>{},25:e=>{},26:e=>{function t(r){for(let n of r.meta.markerSchema){let o;switch(n.name){case"FileIO":{n.data.push({key:"threadId",label:"Thread ID",format:"string",searchable:!0}),o=[];break}case"Log":{o=["name","module"];break}case"DOMEvent":{n.data.push({key:"eventType",label:"Event Type",format:"string",searchable:!0}),o=["target"];break}case"TraceEvent":{o=["name1","name2","val1","val2"];break}default:{o=["name","category"];break}}for(let a of n.data)o.includes(a.key)&&(a.searchable=!0)}for(let n of r.processes)t(n)}t(e)},27:e=>{function t(r){for(let n of r.threads)delete n.frameTable.schema.optimizations;for(let n of r.processes)t(n)}t(e)},28:e=>{},29:e=>{function t(r){if(r.counters&&r.counters.length>0)for(let n of r.counters)n.sample_groups&&(n.samples=n.sample_groups[0].samples,delete n.sample_groups);for(let n of r.processes)t(n)}t(e)},30:e=>{},31:e=>{},32:e=>{},33:e=>{function t(r){r.sources||(r.sources={schema:{uuid:0,filename:1},data:[]});for(let n of r.processes)t(n)}t(e)},34:e=>{function t(r){if(r.sources){let n=r.sources.schema;n.id=n.uuid,delete n.uuid,n.startLine=2,n.startColumn=3,n.sourceMapURL=4;for(let o of r.sources.data)o[2]=1,o[3]=1,o[4]=null}for(let n of r.processes)t(n)}t(e)}};function nw(e){if(e.startsWith(`# ========
664
664
  `))return!0;if(e.startsWith("{"))return!1;let t=e.substring(0,e.indexOf(`
665
- `));return/^\S.*?\s+(?:\d+\/)?\d+\s+(?:\[\d+\]\s+)?[\d.]+:/.test(t)}var O$=[{name:"User",color:"yellow",subcategories:["Other"]},{name:"Kernel",color:"orange",subcategories:["Other"]}],L$=0,D$=1;function rw(e){function t(l,c,u){let d={schema:{name:0,startTime:1,endTime:2,phase:3,category:4,data:5},data:[]},f={schema:{stack:0,time:1,responsiveness:2},data:[]},p={schema:{location:0,relevantForJS:1,innerWindowID:2,implementation:3,optimizations:4,line:5,column:6,category:7,subcategory:8},data:[]},h={schema:{prefix:0,frame:1},data:[]},y=[],b=new Map;function m(I,v){let w=v===null?`${I}`:`${I},${v}`,k=b.get(w);return k===void 0&&(k=h.data.length,h.data.push([v,I]),b.set(w,k)),k}let g=new Map;function T(I){let v=g.get(I);if(v===void 0){v=p.data.length;let w=y.length;y.push(I);let k=I.includes("kallsyms")||I.includes("/vmlinux)")||I.endsWith(".ko)")?D$:L$;p.data.push([w,!1,0,null,null,null,null,k,null]),g.set(I,v)}return v}function S(I,v,w){l!==I&&(l=I);let k=v.reduce((R,F)=>{let G=T(F);return m(G,R)},null);f.data.push([k,w,0])}return{addSample:S,finish:()=>({tid:u,pid:c,name:l,markers:d,samples:f,frameTable:p,stackTable:h,stringTable:y,registerTime:0,unregisterTime:null,processType:"default"})}}let r=new Map;function n(l,c,u,d,f){let p=r.get(c);p===void 0&&(p=t(u,l,c),r.set(c,p)),p.addSample(u,f,d)}let o=e.split(`
666
- `),a=0,i=0;for(;a<o.length;){let l=o[a++];if(l===""||l.startsWith("#"))continue;let c=l,u=/^(.*)\s+([\d.]+):/.exec(c);if(!u){console.log('Could not parse line as the start of a sample in the "perf script" profile format: "%s"',c);continue}let d=u[1],f=parseFloat(u[2])*1e3,p=/^(.*)\s+(?:(\d+)\/)?(\d+)\b/.exec(d);if(!p){console.log('Could not parse line as the start of a sample in the "perf script" profile format: "%s"',c);continue}let h=p[1].trim(),y=Number(p[2]||0),b=Number(p[3]||0);i===0&&(i=f);let m=[];for(;a<o.length;){let g=o[a++];if(g.trim()==="")break;let T=/^\s*(\w+)\s*(.+) \(([^)]*)\)/.exec(g);if(T){let S=T[2],I=T[3];if(S=S.replace(/\+0x[\da-f]+$/,""),S.startsWith("("))continue;I&&(S+=` (in ${I})`),m.push(S)}}m.length!==0&&(m.reverse(),n(y,b,h,f,m))}let s=Array.from(r.values()).map(l=>l.finish());for(let l of s){let c=l.samples.schema.time;l.samples.data.sort((u,d)=>u[c]-d[c])}return{meta:{interval:1,processType:0,product:"Firefox",stackwalk:1,debug:0,gcpoison:0,asyncstack:1,startTime:i,shutdownTime:null,version:24,presymbolicated:!0,categories:O$,markerSchema:[]},libs:[],threads:s,processes:[],pausedRanges:[]}}rr();xe();function nw(e){return e.startsWith("{")?!1:!!e.substring(0,e.indexOf(`
667
- `)).match(/[^;]*(?:;[^;]*)* [0-9]+/)}var B$=[{name:"Java",color:"yellow",subcategories:["Other"]},{name:"Native",color:"blue",subcategories:["Other"]}],U$=0,$$=1;function ow(e){let t=Po();t.meta.product="Flamegraph",t.meta.categories=B$;let r=new an,n=r.getStringTable(),o=Ra({name:"Program",pid:"0",tid:0}),a=r.getFrameTable(),i=r.getStackTable(),{samples:s}=o,l=new Map,c=new Map;function u(b,m){let g=m===null?`${b}`:`${b},${m}`,T=l.get(g);return T===void 0&&(T=i.length,i.frame.push(b),i.prefix.push(m),i.length++,l.set(g,T)),T}function d(b){let m=c.get(b);if(m!==void 0)return m;let g=b.replace(/_\[j\]$/,""),T=$$;b.endsWith("_[j]")&&(T=U$);let S=n.indexForString(g),I=r.indexForFunc(S,!1,!1,-1,null,null,null);return m=a.length,a.address.push(-1),a.inlineDepth.push(0),a.category.push(T),a.subcategory.push(0),a.func.push(I),a.nativeSymbol.push(null),a.innerWindowID.push(null),a.line.push(null),a.column.push(null),a.length++,c.set(b,m),m}function f(b,m){let g=m.reduce((T,S)=>{let I=d(S);return u(I,T)},null);s.stack.push(g),W(s.time).push(b),s.length++}let p=e.split(`
668
- `),h=0;for(let b of p){if(b.trim()==="")continue;let m=b.match(/([^;]*(?:;[^;]*)*) ([0-9]+)/);if(!m){console.warn("unexpected line format",b);continue}let[,g,T]=m,S=g.split(";"),I=parseInt(T,10);for(;I-- >0;)f(h++,S)}t.threads.push(o);let{shared:y}=r.finish();return t.shared=y,t}var Eu=class{_decoder;_u8View;_dataView;_pos;constructor(t){this._decoder=new TextDecoder("utf-8",{fatal:!0}),this._u8View=t,this._dataView=new DataView(this._u8View.buffer),this._pos=0}eof(){return this._pos>=this._u8View.length}curPos(){return this._pos}setCurPos(t){this._pos=t}getU8(){let t=this._dataView.getUint8(this._pos);return this._pos+=1,t}getU16(){let t=this._dataView.getUint16(this._pos,!0);return this._pos+=2,t}getU32(){let t=this._dataView.getUint32(this._pos,!0);return this._pos+=4,t}getU64(){let t=this.getU32();return this.getU32()*Math.pow(2,32)+t}getBytesUntil(t){if(t<this._pos)throw new Error(`getBytesUntil() called with a target position in the past (curPos: ${this._pos}, endPos: ${t})`);let r=this._u8View.subarray(this._pos,t);return this._pos=t,r}getBytes(t){return this.getBytesUntil(this._pos+t)}getString(t){let r=this.getBytes(t);return this._decoder.decode(r)}getLine(){let t=this._u8View.indexOf(10,this._pos);t===-1&&(t=this._u8View.length);let r=this._u8View.subarray(this._pos,t);return this._pos=t+1,this._decoder.decode(r)}};function aw(e){try{let r=e.subarray(0,11),o=new TextDecoder().decode(r);if(/\*version\n[1-3]\n/.test(o))return"regular"}catch{}try{if(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)===1464814675)return"streaming"}catch{}return"unrecognized"}function iw(e){if(e!==1464814675){let t="0x574f4c53",r=`0x${e.toString(16)}`;throw new Error(`Unexpected magic header, expected ${t} (little endian), got ${r}`)}}function sw(e){if(e<1||e>3)throw new Error(`This code only knows how to parse versions 1 to 3, got version ${e}.`)}function lw(e,t){if(e!==t)throw new Error(`Error: version number mismatch; got ${t} in summary but ${e} in data section`)}function cw(e){let t=e.getLine();if(t!=="*version")throw new Error("Expected *version, got "+t);let r=+e.getLine();sw(r);let n={clock:"thread-cpu"};for(;t=e.getLine(),!(!t||t.startsWith("*"));){let[o,a]=t.split("=");n[o]=a}return{summaryVersion:r,summaryDetails:n,lineAfterSummary:t}}function G$(e){let t=[],r="";for(;r=e.getLine(),!(!r||r.startsWith("*"));){let[n,o]=r.split(" ");t.push({tid:+n,threadName:o})}return{threads:t,lineAfterThreads:r}}function uw(e){let[t,r,n,o]=e.split(" ");return{methodId:+t,className:r,methodName:n,signature:o}}function W$(e){let t=[],r="";for(;r=e.getLine(),!(!r||r.startsWith("*"));)t.push(uw(r));return{methods:t,lineAfterMethods:r}}function dw(e,t){switch(t){case 1:return 9;case 2:return 10;default:return e.getU16()}}function fw(e,t,r,n){let o=e.curPos(),a=t===1?e.getU8():e.getU16(),i=e.getU32(),s=i&-4,l=i&3;if(l>2)throw new Error("Unexpected method action "+l);let c,u;switch(n){case"wall":c=e.getU32(),u=c;break;case"dual":u=e.getU32(),c=e.getU32();break;default:u=e.getU32(),c=u;break}return e.setCurPos(o+r),{tid:a,methodId:s,globalTime:c,threadTime:u,action:["enter","exit","exit-unroll"][l]}}function H$(e){let{summaryVersion:t,summaryDetails:r,lineAfterSummary:n}=cw(e);if(n!=="*threads")throw new Error("Expected *threads, got "+n);let{threads:o,lineAfterThreads:a}=G$(e);if(a!=="*methods")throw new Error("Expected *methods, got "+a);let{methods:i,lineAfterMethods:s}=W$(e);if(s!=="*end")throw new Error("Expected *end, got "+s);let l=e.curPos(),c=e.getU32();iw(c);let u=e.getU16();lw(u,t);let d=e.getU16(),f=e.getU64(),p=dw(e,u);e.setCurPos(l+d);let{clock:h}=r,y=[];for(;!e.eof();)y.push(fw(e,u,p,h));return{summaryDetails:r,threads:o,methods:i,methodActions:y,startTimeInUsecSinceBoot:f}}function V$(e){let t=e.curPos(),r=e.getU32();iw(r);let n=e.getU16()^240;sw(n);let o=e.getU16(),a=e.getU64(),i=dw(e,n);e.setCurPos(t+o);let s=[],l=[],c=[],u={clock:"thread-cpu"};for(;!e.eof();){let p=e.curPos();if(e.getU16()!==0){c.push(p),e.setCurPos(p+i);continue}let y=e.getU8();if(y===1){let b=e.getU16();s.push(uw(e.getString(b)))}else if(y===2){let b=e.getU16(),m=e.getU16(),g=e.getString(m);l.push({tid:b,threadName:g})}else if(y===3){let b=e.getU32(),m=e.getBytes(b),g=cw(new Eu(m));lw(n,g.summaryVersion),u=g.summaryDetails;break}else throw new Error(`Invalid trace format: got invalid code ${y}.`)}let{clock:d}=u,f=[];for(let p of c)e.setCurPos(p),f.push(fw(e,n,i,d));return{summaryDetails:u,threads:l,methods:s,methodActions:f,startTimeInUsecSinceBoot:a}}function j$(e){try{let t=new Eu(e);switch(aw(e)){case"regular":return H$(t);case"streaming":return V$(t);default:throw new Error("Not an ART trace")}}catch(t){throw console.error("Source exception:",t),new Error(`Could not parse the profile array buffer as an ART trace: ${t}`)}}function q$(e){let{methodActions:t}=e,r=[],n=new Map,o=Math.min(500,t.length);for(let s=0;s<o;s++){let{tid:l,globalTime:c}=t[s],u=n.get(l);if(c!==u){if(u!==void 0){let d=c-u;r.push(d)}n.set(l,c)}}if(r.sort((s,l)=>s-l),r.length<5)return r[0];let a=r.slice(0,Math.floor(r.length/5));return a.reduce((s,l)=>s+l,0)/a.length}function z$(e){function t(a){let i=a.startsWith("org.")||a.startsWith("com.")?a.substring(4):a,s=i.indexOf(".");return s===-1?i:i.substring(0,s)}let r=new Map;for(let a=0;a<e.length;a++){let i=t(e[a].className);switch(i){case"android":case"java":case"sun":case"kotlin":case"androidx":case"kotlinx":break;default:{let s=r.get(i)||0;r.set(i,s+1)}}}let n=Array.from(r.entries());if(n.length===0)return;n.sort(([a,i],[s,l])=>l-i);let[o]=n[0];return{prefixes:[`${o}.`,`com.${o}.`,`org.${o}.`],name:o[0].toUpperCase()+o.slice(1)}}var ch=class{idleCategory=0;otherCategory=1;blockingCategory=2;androidCategory=3;javaCategory=4;kotlinCategory=5;androidxCategory=6;specialCategory=7;categories=[{name:"Idle",color:"transparent"},{name:"Other",color:"grey"},{name:"Blocked",color:"lightblue"},{name:"Android",color:"yellow"},{name:"Java",color:"blue"},{name:"Kotlin / KotlinX",color:"purple"},{name:"AndroidX",color:"orange"},{name:"Special",color:"green"}];_specialCategoryInfo;constructor(t){this._specialCategoryInfo=z$(t),this._specialCategoryInfo&&(this.categories[this.specialCategory].name=this._specialCategoryInfo.name)}inferJavaCategory(t){return t==="android.os.MessageQueue.nativePollOnce"?this.idleCategory:t==="java.lang.Object.wait"?this.blockingCategory:t.startsWith("android.")||t.startsWith("com.android.")?this.androidCategory:t.startsWith("java.")||t.startsWith("sun.")||t.startsWith("com.sun.")?this.javaCategory:t.startsWith("kotlin.")||t.startsWith("kotlinx.")?this.kotlinCategory:t.startsWith("androidx.")?this.androidxCategory:this._specialCategoryInfo&&this._specialCategoryInfo.prefixes.some(r=>t.startsWith(r))?this.specialCategory:this.otherCategory}},uh=class{_markers={schema:{name:0,time:1,data:2},data:[]};_samples={schema:{stack:0,time:1,responsiveness:2,rss:3,uss:4},data:[]};_frameTable={schema:{location:0,implementation:1,optimizations:2,line:3,category:4},data:[]};_stackTable={schema:{frame:0,prefix:1},data:[]};_stringTable=[];_currentStack=null;_nextSampleTimestamp=0;_stackMap=new Map;_frameMap=new Map;_registerTime=0;_name;_pid;_tid;_methodMap;_intervalInMsec;_honorOriginalSamplingTimestamps;_categoryInfo;constructor(t,r,n,o,a,i,s){this._name=t,this._pid=r,this._tid=n,this._methodMap=o,this._intervalInMsec=a,this._honorOriginalSamplingTimestamps=i,this._categoryInfo=s}_getOrCreateStack(t,r){let n=r===null?`${t}`:`${t},${r}`,o=this._stackMap.get(n);return o===void 0&&(o=this._stackTable.data.length,this._stackTable.data.push([t,r]),this._stackMap.set(n,o)),o}_getOrCreateFrameForMethodId(t){let r=this._frameMap.get(t);if(r===void 0){let n=this._methodMap.get(t),o;if(n===void 0)o="<unknown method ID 0x"+t.toString(16)+">";else{let{className:s,methodName:l}=n;o=s+"."+l}let a=this._stringTable.length;this._stringTable.push(o);let i=this._categoryInfo.inferJavaCategory(o);r=this._frameTable.data.length,this._frameTable.data.push([a,null,null,null,i]),this._frameMap.set(t,r)}return r}enterMethod(t){let r=this._getOrCreateFrameForMethodId(t);this._currentStack=this._getOrCreateStack(r,this._currentStack)}exitMethod(t){this._currentStack!==null&&(this._currentStack=this._stackTable.data[this._currentStack][1])}advanceTimeTo(t){if(this._nextSampleTimestamp===0){this._nextSampleTimestamp=t,this._name!=="main"&&(this._registerTime=t);return}for(;this._nextSampleTimestamp<t;){if(this._samples.data.push([this._currentStack,this._nextSampleTimestamp]),this._honorOriginalSamplingTimestamps&&t-this._nextSampleTimestamp<2*this._intervalInMsec){this._nextSampleTimestamp=t;break}this._nextSampleTimestamp+=this._intervalInMsec}}finish(){return this._nextSampleTimestamp!==null&&this._samples.data.push([this._currentStack,this._nextSampleTimestamp]),{tid:this._tid,pid:this._pid,name:this._name,registerTime:this._registerTime,unregisterTime:null,markers:this._markers,samples:this._samples,frameTable:this._frameTable,stackTable:this._stackTable,stringTable:this._stringTable}}};function pw(e){return aw(e)!=="unrecognized"}function hw(e){let t=j$(e),r=q$(t),n=!1,o;!r||r<100?o=.1:(o=Math.round(r/100)/10,n=!0);let{summaryDetails:a,threads:i,methods:s,methodActions:l}=t,c=new ch(s),u=new Map(s.map(p=>[p.methodId,p])),d=new Map;if(l.length>0)for(let p=0;p<l.length;p++){let{tid:h,methodId:y,globalTime:b,action:m}=l[p],g=d.get(h);if(g===void 0){let T=i.find(S=>S.tid===h);if(!T)throw new Error(`Encountered method action for unknown thread ${h}`);g=new uh(T.threadName,a.pid?+a.pid:1,h,u,o,n,c),d.set(h,g)}switch(g.advanceTimeTo(b/1e3),m){case"enter":g.enterMethod(y);break;case"exit":case"exit-unroll":g.exitMethod(y);break;default:throw new Error(`Unexpected action ${m}`)}}let f=Array.from(d.values()).map(p=>p.finish());return{meta:{interval:o,processType:0,product:"ART Trace (Android)",importedFrom:"ART Trace (Android)",pid:a.pid,stackwalk:1,startTime:0,shutdownTime:null,version:11,presymbolicated:!0,categories:c.categories},libs:[],threads:f,processes:[],pausedRanges:[]}}cr();var dh=ce(require("zlib"));function za(e){return new Promise((t,r)=>{dh.gunzip(e,(n,o)=>{n?r(n):t(o)})})}function Ka(e){return e.byteLength>=3&&e[0]===31&&e[1]===139&&e[2]===8}function zo(e){let t={length:e.data.length};for(let r in e.schema){let n=e.schema[r];if(typeof n!="number")throw new Error("fieldIndex must be a number in the Gecko profile table.");t[r]=e.data.map(o=>n in o?o[n]:null)}return t}function a3(e){if(e){let t=e.split(" -> ");return t[t.length-1]}return e}function i3(e){let{startTime:t,endTime:r}=e.schema,n=e.data.slice(0);return n.sort((o,a)=>{let i=o[r]||o[t],s=a[r]||a[t];if(i===null)throw console.error(o),new Error("A marker had null start and end time.");if(s===null)throw console.error(a),new Error("A marker had null start and end time.");return i-s}),Object.assign({},e,{data:n})}function s3(e){let t="non-virtual thunk to ";return e.startsWith&&e.startsWith(t)?e.substr(t.length):e}function l3(e,t,r,n,o,a){let i=o.getStringTable(),s={geckoThreadStringArray:r,addressLocator:new _u(n),stringToNewFuncIndexAndFrameAddress:new Map,globalDataCollector:o,geckoSourceTable:a},l=[],c=[];for(let u=0;u<e.length;u++){let d=e[u],f=W(r[d]),p=i.indexForString(f),h=t[u],y=s.stringToNewFuncIndexAndFrameAddress.get(f);if(y!==void 0){let{funcIndex:T,frameAddress:S}=y;l.push(T),c.push(S);continue}let b=null,m=null,g=c3(s,f,p);g!==null?(b=g.funcIndex,m=g.frameAddress):(b=u3(s,f),b===null&&(b=d3(s,f),b===null&&(b=f3(o,p,h)))),s.stringToNewFuncIndexAndFrameAddress.set(f,{funcIndex:b,frameAddress:m}),l.push(b),c.push(m)}return{frameFuncs:l,frameAddresses:c}}function c3(e,t,r){if(!t.startsWith("0x"))return null;let{addressLocator:n,globalDataCollector:o}=e,a=-1,i=-1;try{let l=t,{lib:c,relativeAddress:u}=n.locateAddress(l);if(c!==null){i=u;let d=o.indexForLib(c);a=o.indexForLibResource(d)}}catch{}return{funcIndex:o.indexForFunc(r,!1,!1,a,null,null,null),frameAddress:i}}function u3(e,t){let r=/^(.*) \(in ([^)]*)\) (\+ [0-9]+)$/.exec(t)||/^(.*) \(in ([^)]*)\) (\(.*:.*\))$/.exec(t)||/^(.*) \(in ([^)]*)\)$/.exec(t);if(!r)return null;let{stringToNewFuncIndexAndFrameAddress:n,globalDataCollector:o}=e,a=o.getStringTable(),[,i,s]=r,l=s3(i),c=a.indexForString(l),u=a.indexForString(s),d=n.get(l);if(d!==void 0)return d.funcIndex;let f=o.indexForNameOnlyLibResource(u);return o.indexForFunc(c,!1,!1,f,null,null,null)}function d3(e,t){let r=/^(.*) \((.+?):([0-9]+)(?::([0-9]+))?\)(?:\[(\d+)\])?$/.exec(t)||/^()(.+?):([0-9]+)(?::([0-9]+))?(?:\[(\d+)\])?$/.exec(t);if(!r)return null;let{globalDataCollector:n,geckoSourceTable:o}=e,[,a,i,s,l,c]=r,u=a3(i),d=n.indexForURIResource(u),f=null;if(c!==void 0){let m=parseInt(c,10);if(m<o.data.length){let g=o.schema.id,T=o.schema.filename,S=o.schema.startLine,I=o.schema.startColumn,v=o.schema.sourceMapURL,w=o.data[m][g],k=o.data[m][T],N=o.data[m][S],R=o.data[m][I],F=o.data[m][v];f=n.indexForSource(w,k,N,R,F)}}f===null&&(f=n.indexForSource(null,u));let p=n.getStringTable(),h;a?h=p.indexForString(a):h=p.indexForString(`(root scope) ${u}`);let y=parseInt(s,10),b=l?parseInt(l,10):null;return n.indexForFunc(h,!0,!1,d,f,y,b)}function f3(e,t,r){return e.indexForFunc(t,!1,r,-1,null,null,null)}function p3(e,t,r,n){let o=t.length;for(let a=0;a<e.length;a++){let i=a+o;t.address[i]=n[a]??-1,t.inlineDepth[i]=0,t.category[i]=e.category[a],t.subcategory[i]=e.subcategory[a],t.func[i]=r[a],t.nativeSymbol[i]=null,t.innerWindowID[i]=e.innerWindowID[a],t.line[i]=e.line[a],t.column[i]=e.column[a]}return t.length+=e.length,o}function h3(e,t,r){let n=t.length;for(let o=0;o<e.length;o++){let a=o+n,i=e.prefix[o];t.prefix[a]=i!==null?i+n:null,t.frame[a]=e.frame[o]+r}return t.length+=e.length,n}function m3(e,t){if("stack"in e&&e.stack&&e.stack.samples.data.length>0){let{stack:r,...n}=e,o=r.samples.data[0][r.samples.schema.stack],a=r.samples.data[0][r.samples.schema.time];return o!==null?{...n,cause:{tid:r.tid,time:a,stack:o+t}}:n}return e}function Ak(e,t){if(!e)return null;if("stack"in e&&e.stack&&e.stack.samples.data.length>0){let{samples:r}=e.stack,n=r.data[0][r.schema.stack];if(n!==null)return n+t}return null}function g3(e,t,r,n,o){let a=Ur(),i=nS(),s=Lc(),l=[],c=[],u=n.getStringTable(),d;for(let p=0;p<e.length;p++){let h=e.data[p];if(h)switch(h.type){case"JS allocation":{i.time.push(W(e.startTime[p],"JS Allocations are assumed to have a startTime")),i.className.push(h.className),i.typeName.push(h.typeName),i.coarseType.push(h.coarseType),i.weight.push(h.size),i.inNursery.push(h.inNursery),i.stack.push(Ak(h,o)),i.length++;continue}case"Native allocation":{d===void 0&&(d="memoryAddress"in h),s.time.push(W(e.startTime[p],"Native Allocations are assumed to have a startTime")),s.weight.push(h.size),s.stack.push(Ak(h,o)),s.length++,d&&(l.push(W(h.memoryAddress,"Could not find the memoryAddress property on a gecko marker payload.")),c.push(W(h.threadId,"Could not find a threadId property on a gecko marker payload.")));continue}default:}let y=y3(h,t,u,r,o),b=u.indexForString(t[e.name[p]]),m=e.startTime[p],g=e.endTime[p],T=e.phase[p],S=e.category[p];a.name.push(b),a.startTime.push(m),a.endTime.push(g),a.phase.push(T),a.category.push(S),a.data.push(y),a.length++}let f;return s.length===0?f=null:d?f={time:s.time,weight:s.weight,weightType:s.weightType,stack:s.stack,memoryAddress:l,threadId:c,length:s.length}:f={time:s.time,weight:s.weight,weightType:s.weightType,stack:s.stack,length:s.length},{markers:a,jsAllocations:i.length===0?null:i,nativeAllocations:f}}function Pk(e){let t={};for(let r in e)t[r]=e[r]*1e3;return t}function y3(e,t,r,n,o){if(!e)return null;let a=m3(e,o);switch(a.type){case"GCSlice":{let{times:c,...u}=a.timings;return{type:"GCSlice",timings:{...u,phase_times:c?Pk(c):{}}}}case"GCMajor":{let c=a.timings;switch(c.status){case"completed":{let{totals:u,...d}=c;return{type:"GCMajor",timings:{...d,phase_times:Pk(u),mmu_20ms:c.mmu_20ms/100,mmu_50ms:c.mmu_50ms/100}}}case"aborted":return{type:"GCMajor",timings:{status:"aborted"}};default:throw console.log("Unknown GCMajor status"),new Error("Unknown GCMajor status")}}case"IPC":{let{startTime:c,endTime:u,otherPid:d,messageType:f,messageSeqno:p,side:h,direction:y,phase:b,sync:m,threadId:g}=a;return{type:"IPC",startTime:c,endTime:u,otherPid:`${d}`,messageType:f,messageSeqno:p,side:h,direction:y,phase:b,sync:m,threadId:g}}default:break}let i=a;if(!i.type)return i;let s=n.get(i.type);if(s===void 0)return i;let l=i;for(let c of s){let u=i[c];typeof u=="number"&&(l={...l,[c]:r.indexForString(t[u])})}return l}function Dk(e){let r=new Array(e.length),n=0;for(let o=0;o<e.length;o++){let a=Math.round(e[o]*1e6);r[o]=(a-n)/1e6,n=a}return r}function b3(e,t){let r={stack:e.stack.map(n=>n!==null?n+t:null),timeDeltas:Dk(e.time),weightType:"samples",weight:null,length:e.length};if(e.threadCPUDelta&&e.threadCPUDelta.some(o=>o!==null)&&(r.threadCPUDelta=e.threadCPUDelta),"argumentValues"in e&&(r.argumentValues=e.argumentValues),"eventDelay"in e)r.eventDelay=e.eventDelay;else if("responsiveness"in e)r.responsiveness=e.responsiveness;else throw new Error("The profile processor expected an eventDelay or responsiveness array in the samples table, but none was found.");return r}function T3(e,t){return e==="Memory"?{graphType:"line-accumulated",unit:"bytes",color:"orange",markerSchemaLocation:"timeline-memory",sortWeight:20,label:"Memory"}:e==="power"?{graphType:"line-rate",unit:"pWh",color:"grey",markerSchemaLocation:null,sortWeight:30,label:t}:e==="Bandwidth"?{graphType:"line-rate",unit:"bytes",color:"blue",markerSchemaLocation:null,sortWeight:10,label:"Bandwidth"}:e==="CPU"&&t==="processCPU"?{graphType:"line-rate",unit:"percent",color:"grey",markerSchemaLocation:null,sortWeight:40,label:"Process CPU"}:{graphType:"line-rate",unit:"",color:"grey",markerSchemaLocation:null,sortWeight:50,label:t}}function Rk(e,t,r){let n=e.counters,o=e.threads.find(s=>s.name==="GeckoMain");if(!o||!n)return[];let a=`${o.pid}`,i=t.findIndex(s=>s.name==="GeckoMain"&&s.pid===a);if(i===-1)throw new Error("Unable to find the main thread in the stable thread list. This means that the logic in the _processCounters function is wrong.");return n.reduce((s,{name:l,category:c,description:u,samples:d})=>{if(d.data.length===0)return s;let f=zo(d),p=S3(f);return s.push({name:l,category:c,description:u,pid:a,mainThreadIndex:i,samples:Bk(p,r),display:T3(c,l)}),s},[])}function S3(e){return{timeDeltas:Dk(e.time),number:e.number,count:e.count,length:e.length}}function Mk(e,t,r){let n=e.profilerOverhead,o=e.threads.find(s=>s.name==="GeckoMain");if(!o||!n)return null;let a=`${o.pid}`,i=t.findIndex(s=>s.name==="GeckoMain"&&s.pid===a);if(i===-1)throw new Error("Unable to find the main thread in the stable thread list. This means that the logic in the _processProfilerOverhead function is wrong.");return{samples:I3(zo(n.samples),r),pid:a,mainThreadIndex:i,statistics:n.statistics}}function Fk(e,t,r,n){let o=zo(e.frameTable),a=zo(e.stackTable),i=zo(e.samples),s=zo(i3(e.markers)),{libs:l,pausedRanges:c,meta:u,sources:d}=t,{shutdownTime:f}=u,{frameFuncs:p,frameAddresses:h}=l3(o.location,o.relevantForJS,e.stringTable,l,n,d),y=p3(o,n.getFrameTable(),p,h),b=h3(a,n.getStackTable(),y),{markers:m,jsAllocations:g,nativeAllocations:T}=g3(s,e.stringTable,r,n,b),S=b3(i,b),I,v=new Set;for(let N=0;N<o.length;N++){let R=o.innerWindowID[N];R!==null&&R!==0&&v.add(R)}for(let N=0;N<m.length;N++){let R=m.data[N];if(!R||!("innerWindowID"in R))continue;let F=R.innerWindowID;typeof F=="number"&&F!==0&&v.add(F)}v.size!==0&&(I=Array.from(v));let w={name:e.name,isMainThread:e.name==="GeckoMain","eTLD+1":e["eTLD+1"],processType:e.processType,processName:typeof e.processName=="string"?e.processName:"",processStartupTime:0,processShutdownTime:f,registerTime:e.registerTime,unregisterTime:e.unregisterTime,tid:e.tid,pid:`${e.pid}`,pausedRanges:c||[],markers:m,samples:S};e.isPrivateBrowsing!==void 0&&(w.isPrivateBrowsing=e.isPrivateBrowsing),e.userContextId!==void 0&&(w.userContextId=e.userContextId),I!==void 0&&(w.usedInnerWindowIDs=I),g&&(w.jsAllocations=g),T&&(w.nativeAllocations=T),e.tracedValues&&(w.tracedValuesBuffer=e.tracedValues),e.tracedObjectShapes&&(w.tracedObjectShapes=e.tracedObjectShapes);function k(){let{jsTracerEvents:N}=e,{jsTracerDictionary:R}=t,F=n.getStringTable();if(N&&R){let G=new Array(R.length);for(let Z=0;Z<R.length;Z++)G[Z]=F.indexForString(R[Z]);let B=N.events.slice();for(let Z=0;Z<B.length;Z++){let X=B[Z];B[Z]=G[X]}w.jsTracer={...N,events:B}}}return k(),w}function Ok(e,t){return{...e,time:e.time.map(r=>r+t)}}function Bk(e,t){let{timeDeltas:r}=e;if(r===void 0)throw new Error("Should only be called when a timeDeltas column is present");let n=r.slice();return n[0]+=t,{...e,timeDeltas:n}}function x3(e,t){let r=t*1e3;return{...e,timestamps:e.timestamps.map(n=>n+r)}}function I3(e,t){return{...e,time:e.time.map(r=>r/1e3+t)}}function Uk(e,t){function r(n){return n===null?n:n+t}return{...e,startTime:e.startTime.map(r),endTime:e.endTime.map(r),data:e.data.map(n=>{if(!n)return n;let o=lS(n);return"startTime"in o&&typeof o.startTime=="number"&&(o.startTime+=t),"endTime"in o&&typeof o.endTime=="number"&&(o.endTime+=t),"cause"in o&&o.cause&&o.cause.time!==void 0&&(o.cause.time+=t),o.type==="Network"&&(typeof o.domainLookupStart=="number"&&(o.domainLookupStart+=t),typeof o.domainLookupEnd=="number"&&(o.domainLookupEnd+=t),typeof o.connectStart=="number"&&(o.connectStart+=t),typeof o.tcpConnectEnd=="number"&&(o.tcpConnectEnd+=t),typeof o.secureConnectionStart=="number"&&(o.secureConnectionStart+=t),typeof o.connectEnd=="number"&&(o.connectEnd+=t),typeof o.requestStart=="number"&&(o.requestStart+=t),typeof o.responseStart=="number"&&(o.responseStart+=t),typeof o.responseEnd=="number"&&(o.responseEnd+=t)),o})}}function Lk(e){let{name:t,tooltipLabel:r,tableLabel:n,chartLabel:o,display:a,data:i,graphs:s,colorField:l,isStackBased:c}=e,u=[],d=[];for(let p of i)if("key"in p){let{key:h,label:y,format:b,hidden:m}=p;u.push({key:h,label:y,format:b,hidden:m})}else d.push(p);let f;if(d.length!==0){let p=d.findIndex(b=>b.label==="Description");p===-1&&(p=0);let y=d.filter((b,m)=>m!==p).filter(b=>b.label!=="Marker"&&b.value!=="UserTiming");y.length!==0&&console.warn(`Discarding the following static fields from marker schema "${e.name}": ${y.map(b=>b.label+": "+b.value).join(", ")}`),f=d[p].value}return{name:t,tooltipLabel:r,tableLabel:n,chartLabel:o,display:a,fields:u,description:f,graphs:s,colorField:l,isStackBased:c}}function v3(e){let t=e.meta.markerSchema.map(Lk),r=new Set(t.map(({name:n})=>n));for(let n of e.processes)for(let o of n.meta.markerSchema)r.has(o.name)||(r.add(o.name),t.push(Lk(o)));return t}function w3(e){if(!e)throw new Error("The profile was empty.");if(typeof e!="object")throw new Error("The profile was not an object");let t="profile"in e&&e.profile?e.profile:e;if(!t.meta)throw new Error("This does not appear to be a valid Gecko Profile, there is no meta field.");return $k(t)}function $k(e){ew(e);let t=[],r=v3(e),n=vs(r),o=e.meta.extensions?zo(e.meta.extensions):ds(),a=new an;a.addExtensionOrigins(o);for(let m of e.threads)t.push(Fk(m,e,n,a));let i=Rk(e,t,0),s=[Mk(e,t,0)];for(let m of e.processes){let g=m.meta.startTime-e.meta.startTime;for(let T of m.threads){let S=Fk(T,m,n,a);S.samples=Bk(S.samples,g),S.markers=Uk(S.markers,g),S.jsTracer&&(S.jsTracer=x3(S.jsTracer,g)),S.jsAllocations&&(S.jsAllocations=Ok(S.jsAllocations,g)),S.nativeAllocations&&(S.nativeAllocations=Ok(S.nativeAllocations,g)),S.processStartupTime+=g,S.processShutdownTime!==null&&(S.processShutdownTime+=g),S.registerTime+=g,S.unregisterTime!==null&&(S.unregisterTime+=g),t.push(S)}i.push(...Rk(m,t,g)),s.push(Mk(m,t,g))}let l=[...e.pages||[]];for(let m of e.processes)l=l.concat(m.pages||[]);let c={interval:e.meta.interval,startTime:e.meta.startTime,startTimeAsClockMonotonicNanosecondsSinceBoot:e.meta.startTimeAsClockMonotonicNanosecondsSinceBoot,startTimeAsMachAbsoluteTimeNanoseconds:e.meta.startTimeAsMachAbsoluteTimeNanoseconds,startTimeAsQueryPerformanceCounterValue:e.meta.startTimeAsQueryPerformanceCounterValue,abi:e.meta.abi,extensions:o,misc:e.meta.misc,oscpu:e.meta.oscpu,platform:e.meta.platform,processType:e.meta.processType,product:e.meta.product||"",stackwalk:e.meta.stackwalk,debug:!!e.meta.debug,toolkit:e.meta.toolkit,version:e.meta.version,categories:e.meta.categories,preprocessedProfileVersion:62,appBuildID:e.meta.appBuildID,visualMetrics:e.meta.visualMetrics,configuration:e.meta.configuration,sourceURL:e.meta.sourceURL,physicalCPUs:e.meta.physicalCPUs,logicalCPUs:e.meta.logicalCPUs,CPUName:e.meta.CPUName,symbolicated:!!e.meta.presymbolicated,updateChannel:e.meta.updateChannel,markerSchema:r,sampleUnits:e.meta.sampleUnits,device:e.meta.device};e.meta.profilingStartTime!==void 0&&(c.profilingStartTime=e.meta.profilingStartTime,c.profilingEndTime=e.meta.profilingEndTime);let u=s.reduce((m,g)=>(g!==null&&m.push(g),m),[]),d={...e.profilingLog||{}};for(let m of e.processes)d={...d,...m.profilingLog||{}};let f={...e.profileGatheringLog||{}},p=a.getStringTable(),{libs:h,shared:y}=a.finish();for(let m of t.slice()){let{jsTracer:g}=m;if(g){let T=nr(t,m),S=Wv(m,y,g,e.meta.categories);S.isJsTracer=!0,S.name=`JS Tracer of ${T}`,t.push(S),delete m.jsTracer}}return c.visualMetrics&&_3(t,c,l,p),zS({meta:c,libs:h,pages:l,counters:i,profilerOverhead:u,shared:y,threads:t,profilingLog:d,profileGatheringLog:f})}function k3(e){if(!e||typeof e!="object"||!("meta"in e)||!e.meta||typeof e.meta!="object")return e;let{meta:t}=e;if(!("preprocessedProfileVersion"in t)||typeof t.preprocessedProfileVersion!="number"||!("threads"in e)||!e.threads||!Array.isArray(e.threads)||!e.threads.length)return e;let{threads:r}=e,[n]=r;if(n.stringArray||!n.stringTable)return e;for(let o of e.threads)o.stringArray=o.stringTable._array,delete o.stringTable;return e}async function Lu(e,t,r={}){try{if(String(e)==="[object ArrayBuffer]"){let l=e;e=new Uint8Array(l)}if(e instanceof Uint8Array||globalThis.Buffer&&e instanceof globalThis.Buffer){let l=e;if(Ka(l)&&(l=await za(l)),pw(l))e=hw(l);else if(Cu(Ds,l)){let{convertSimpleperfTraceProfile:c}=await Promise.resolve().then(()=>(Nk(),Ek));e=c(l)}else try{e=await new TextDecoder(void 0,{fatal:!0}).decode(l)}catch(c){throw console.error("Source exception:",c),new Error("The profile array buffer could not be parsed as a UTF-8 string.")}}typeof e=="string"&&(tw(e)?e=rw(e):nw(e)?e=ow(e):e=JSON.parse(e));let n=e,o=k3(n),a=Yv(o,r);if(a)return a;let i=jv(n,t);if(i)return i;let s=qv(n);return s||w3(n)}catch(n){throw console.error("UnserializationError:",n),new Error(`Unserializing the profile failed: ${n}`)}}function _3(e,t,r,n){let{visualMetrics:o}=t;if(r.length===0||!o)return;let a=e.findIndex(p=>p.name==="GeckoMain"&&p.processType==="default"),i=C3(e,r,n);if(a===-1||!i)return;let s=e[a],l=e[i],c=["Visual","ContentfulSpeedIndex","PerceptualSpeedIndex"];if(t.categories===void 0)return;let u=t.categories.findIndex(p=>p.name==="Test");function d(p,h,y,b,m,g){y!==3&&b===null||(y===1||y===3)&&m===null||(p.markers.name.push(n.indexForString(h)),p.markers.startTime.push(b),p.markers.endTime.push(m),p.markers.phase.push(y),p.markers.category.push(u),p.markers.data.push(g??null),p.markers.length++)}let f=null;if(n.hasString("Navigation::Start")){let p=n.indexForString("Navigation::Start"),h=l.markers.name.findIndex(y=>y===p);h!==-1&&(f=l.markers.startTime[h])}for(let p of c){let h=o[`${p}Progress`];if(!h)continue;let y=f??h[0].timestamp,b=h[h.length-1].timestamp,m=`${p} Progress`;d(s,m,1,y,b),d(l,m,1,y,b);let g={name:"VisualMetricProgress",tableLabel:"{marker.name} \u2014 {marker.data.percentage}",display:["marker-chart","marker-table"],fields:[{key:"percentage",label:"Percentage",format:"percentage"}]};t.markerSchema.push(g);let T=`${p} Change`;for(let{timestamp:S,percent:I}of h){let v={type:"VisualMetricProgress",percentage:I/100};d(s,T,0,S,null,v),d(l,T,0,S,null,v)}}}function C3(e,t,r){if(!r.hasString("RefreshDriverTick"))return null;let n=r.indexForString("RefreshDriverTick");for(let o=0;o<e.length;o++){let a=e[o];if(a.name!=="GeckoMain"||a.processType!=="tab")continue;let i=new Set(t.filter(l=>l.embedderInnerWindowID===0).map(l=>l.innerWindowID)),{markers:s}=a;for(let l=0;l<s.length;l++)if(s.name[l]===n){let c=s.data[l];if(c&&"innerWindowID"in c&&c.innerWindowID&&i.has(c.innerWindowID))return o}}return null}rr();xe();ur();function Gk(e){let t=E3(e),r=N3(e),n=1/0,o=-1/0,a=1/0,i=-1/0;for(let l of e)n=Math.min(l.processStartupTime,n),o=Math.max(l.processShutdownTime||1/0,o),a=Math.min(l.registerTime,a),i=Math.max(l.unregisterTime||1/0,i);return{processType:"merged",processStartupTime:n,processShutdownTime:o===1/0?null:o,registerTime:a,unregisterTime:i===1/0?null:i,pausedRanges:[],name:"Merged thread",pid:"Merged thread",tid:"Merged thread",isMainThread:!0,samples:t,markers:r}}function E3(e){let t=e.map(i=>i.samples),r=t.map(ys),n=Array(t.length).fill(0),o=[],a={...ka(),threadId:o};for(;;){let i=null,s=1/0;for(let f=0;f<t.length;f++){let p=t[f],h=n[f];if(h>=p.length)continue;let y=r[f][h];y<s&&(i=f,s=y)}if(i===null)break;let l=i,c=t[l],u=r[l],d=n[l];a.stack.push(c.stack[d]),W(a.eventDelay).push(null),a.time.push(u[d]),o.push(c.threadId?c.threadId[d]:e[l].tid),a.length++,n[l]++}return a}function N3(e){let t=[],r={...Ur(),threadId:t};return e.forEach(n=>{let{markers:o}=n;for(let a=0;a<o.length;a++)r.name.push(o.name[a]),r.data.push(o.data[a]),r.startTime.push(o.startTime[a]),r.endTime.push(o.endTime[a]),r.phase.push(o.phase[a]),r.category.push(o.category[a]),t.push(o.threadId?o.threadId[a]:n.tid),r.length++}),r}var Zk=ce(Oh()),L3=(0,Uu.default)(NS,{limit:2}),D3=(0,Uu.default)(AS,{limit:2});function zk(e,t){let r=e.size===1?W(vn(e)):null,n=(0,De.createSelector)(ge,D=>Gk([...e].map(re=>D.threads[re]))),o=D=>r!==null?ge(D).threads[r]:n(D),a=(0,De.createSelector)(D=>o(D).tracedValuesBuffer,D=>D?Vv(D):void 0),i=D=>o(D).samples,s=(0,De.createSelector)(i,su,Ns,lu,_r,zc),l=(0,De.createSelector)(s,D=>D.hasCPUDeltas?Wa([.05,.2,.4,.6,.8],Float64Array.from(D.threadCPUPercent.subarray(0,D.length),re=>re/100),D.time):null),c=D=>o(D).nativeAllocations,u=D=>o(D).jsAllocations,d=D=>Fa(o(D),Wo(D)),f=D=>i(D).weightType||"samples",p=(0,De.createSelector)(o,s,su,D=>Ct(D).frameTable,ev,D=>Ct(D).nativeSymbols,D=>Ct(D).resourceTable,Rt,An,a,OS),h=(0,De.createSelector)(p,pr,(D,re)=>{let{start:E,end:A}=re;return Qf(D,E,A)}),y=(0,De.createSelector)(h,D=>{let re=D.samples;return re.hasCPUDeltas?Wa([.05,.2,.4,.6,.8],Float64Array.from(re.threadCPUPercent.subarray(0,re.length),E=>E/100),re.time):null}),b=(0,De.createSelector)(p,BI,(D,re)=>{switch(re){case"timing":if(D.samples.length===0&&D.nativeAllocations&&D.nativeAllocations.length>0)return"native-allocations";break;case"js-allocations":if(!D.jsAllocations)return"timing";break;case"native-allocations":case"native-retained-allocations":case"native-deallocations-sites":case"native-deallocations-memory":if(!D.nativeAllocations)return"timing";break;default:ae(re,"Unhandled call tree sumary strategy.")}return re}),m=(0,De.createSelector)(p,b,Ov),g=(0,De.createSelector)(p,m,_r,Lv),T=(0,De.createSelector)(m,pr,(D,{start:re,end:E})=>wn(D,re,E)),S=(0,De.createSelector)(s,pr,(D,{start:re,end:E})=>{let[A]=wn(D,re,E);return A}),I=(0,De.createSelector)(Wt,o,nr),v=(0,De.createSelector)(o,I,DS),w=D=>Gr(D).perThread[t]||Hp,k=(0,De.createSelector)(s,Ct,(D,re)=>eo(D.stack,re)),N=(0,De.createSelector)(u,Ct,(D,re)=>eo(D==null?void 0:D.stack,re)),R=(0,De.createSelector)(c,Ct,(D,re)=>eo(D==null?void 0:D.stack,re)),F=D=>{let re=c(D);return re?"memoryAddress"in re:!1},G=D=>p(D).jsTracer||null,B=(0,De.createSelector)(G,Ct,(D,re)=>D===null?null:$v(D,re)),Z=(0,De.createSelector)(G,Rt,(D,re)=>D===null?null:Gv(D,re)),X=(0,De.createSelector)(s,Wo,(D,re)=>D===null||D.eventDelay===void 0?null:MS(D,re));return{getRawThread:o,getThread:p,getSamplesTable:s,getTracedValuesBuffer:a,getActivitySlices:l,getRangeFilteredActivitySlices:y,getSamplesWeightType:f,getNativeAllocations:c,getJsAllocations:u,getThreadRange:d,getRangeFilteredThread:h,getUnfilteredCtssSamples:m,getUnfilteredCtssSampleCategoriesAndSubcategories:g,getFilteredCtssSampleIndexOffsets:T,getFilteredSampleIndexOffset:S,getFriendlyThreadName:I,getThreadProcessDetails:v,getViewOptions:w,getJsTracerTable:G,getExpensiveJsTracerTiming:B,getExpensiveJsTracerLeafTiming:Z,getHasUsefulTimingSamples:k,getHasUsefulJsAllocations:N,getHasUsefulNativeAllocations:R,getCanShowRetainedMemory:F,getProcessedEventDelays:D=>W(X(D),"Could not get the processed event delays"),getCallTreeSummaryStrategy:b}}function Kk(e,t){let r=(0,Uu.default)(bI,{cache:new jk.default}),n=b=>Uo(b,t),o=(0,De.createSelector)(e.getRangeFilteredThread,n,e.getMarkerGetter,e.getFullMarkerListIndexes,ft,nt,(b,m,g,T,S,I)=>m.reduce((v,w)=>r(v,w,g,T,S,I),b)),a=(0,De.createSelector)(o,Dp,(b,m)=>{let g=L3(b.stackTable,b.frameTable,b.funcTable,b.stringTable,m);return Qn(g,b)}),i=(0,De.createSelector)(a,Gp,(b,m)=>{let g=D3(b.stackTable,b.frameTable,b.funcTable,b.resourceTable,b.sources,b.stringTable,m);return Qn(g,b)}),s=(0,De.createSelector)(i,Go,(b,m)=>{if(!m)return b;let{selectionStart:g,selectionEnd:T}=m;return Qf(b,g,T)}),l=(0,De.createSelector)(i,e.getCallTreeSummaryStrategy,ih),c=(0,De.createSelector)(l,b=>b.length!==0&&b.stack.some(m=>m!==null)),u=(0,De.createSelector)(s,e.getCallTreeSummaryStrategy,ih),d=(0,De.createSelector)(u,b=>b.length!==0&&b.stack.some(m=>m!==null)),f=(0,De.createSelector)(l,Go,e.getFilteredCtssSampleIndexOffsets,(b,m,g)=>{if(!m)return g;let[T]=g,[S,I]=wn(b,m.selectionStart,m.selectionEnd);return[T+S,T+I]}),p=(0,De.createSelector)(e.getUnfilteredCtssSampleCategoriesAndSubcategories,f,({sampleCategories:b,sampleSubcategories:m},[g,T])=>({sampleCategories:b.subarray(g,T),sampleSubcategories:m.subarray(g,T)})),h=(0,De.createSelector)(Ho,o,e.getFriendlyThreadName,n,hI),y=(0,De.createSelector)(h,b=>b.map(m=>(0,Zk.jsx)(qk.Localized,{id:m.l10nId,vars:{item:m.item}},m.item)));return{getTransformStack:n,getRangeAndTransformFilteredThread:o,getFilteredThread:i,getPreviewFilteredThread:s,getFilteredCtssSamples:l,getPreviewFilteredCtssSamples:u,getPreviewFilteredCtssSampleCategoriesAndSubcategories:p,getHasFilteredCtssSamples:c,getHasPreviewFilteredCtssSamples:d,getTransformLabelL10nIds:h,getLocalizedTransformLabels:y}}var Ie=ce(Kt()),Qk=ce(Ir());function $u(e,t,r){let n=new Map,o=new Map;for(let i of t){let s=e(i),l=y=>{y.start.push(s.start),y.end.push(s.end===null?s.start:s.end),y.index.push(i),y.length++},c=r?r[s.category].name:"None",u=s.data&&s.data.type==="Network"?"Network Requests":s.name,d=({instantOnly:y})=>({start:[],end:[],index:[],name:u,bucket:c,instantOnly:y,length:0});if(s.end===null){let y=o.get(u);y||(y=d({instantOnly:!0}),o.set(u,y)),l(y);continue}let f=n.get(u);f===void 0&&(f=[],n.set(u,f));let p=f.find(y=>y.end[y.length-1]<=s.start);if(p){l(p);continue}if(f.length>=300)continue;let h=d({instantOnly:!1});l(h),f.push(h)}let a=[...o.values()].concat(...n.values());return a.sort((i,s)=>{if(i.bucket!==s.bucket)return i.bucket==="Test"?-1:s.bucket==="Test"||i.bucket==="Other"?1:s.bucket==="Other"?-1:i.bucket>s.bucket?1:-1;if(i.name===s.name)return i.instantOnly?-1:s.instantOnly?1:0;if(i.bucket==="Network"){if(i.name==="Network Requests")return 1;if(s.name==="Network Requests")return-1}return i.name.toLowerCase()>s.name.toLowerCase()?1:-1}),a}function Jk(e,t,r){let n=$u(e,t,r),o=[],a;for(let i of n)i.bucket!==a&&(o.push(i.bucket),a=i.bucket),o.push(i);return o}var Yk=ce(Kt());var Xk=(0,Yk.createSelector)(Gr,e=>e.rightClickedMarker);function e_(e,t){let o=(0,Ie.createSelector)(V=>e.getThread(V).markers,V=>ge(V).shared.stringArray,V=>e.getThread(V).tid,e.getThreadRange,tv,Ip),a=(0,Ie.createSelector)(o,({markers:V})=>V),i=(0,Ie.createSelector)(o,({markerIndexToRawMarkerIndexes:V})=>V),s=(0,Ie.createSelector)(e.getSamplesTable,_r,(V,te)=>Yx(V,50,te)),l=(0,Ie.createSelector)(a,s,(V,te)=>[...V,...te].sort((q,Q)=>q.start-Q.start)),c=V=>l(V).length,u=(0,Ie.createSelector)(l,V=>te=>{let q=V[te];if(!q)throw new Error(Qk.stripIndent`
665
+ `));return/^\S.*?\s+(?:\d+\/)?\d+\s+(?:\[\d+\]\s+)?[\d.]+:/.test(t)}var G$=[{name:"User",color:"yellow",subcategories:["Other"]},{name:"Kernel",color:"orange",subcategories:["Other"]}],W$=0,H$=1;function ow(e){function t(l,c,u){let d={schema:{name:0,startTime:1,endTime:2,phase:3,category:4,data:5},data:[]},f={schema:{stack:0,time:1,responsiveness:2},data:[]},p={schema:{location:0,relevantForJS:1,innerWindowID:2,implementation:3,optimizations:4,line:5,column:6,category:7,subcategory:8},data:[]},h={schema:{prefix:0,frame:1},data:[]},y=[],b=new Map;function g(I,v){let w=v===null?`${I}`:`${I},${v}`,k=b.get(w);return k===void 0&&(k=h.data.length,h.data.push([v,I]),b.set(w,k)),k}let m=new Map;function T(I){let v=m.get(I);if(v===void 0){v=p.data.length;let w=y.length;y.push(I);let k=I.includes("kallsyms")||I.includes("/vmlinux)")||I.endsWith(".ko)")?H$:W$;p.data.push([w,!1,0,null,null,null,null,k,null]),m.set(I,v)}return v}function S(I,v,w){l!==I&&(l=I);let k=v.reduce((R,F)=>{let G=T(F);return g(G,R)},null);f.data.push([k,w,0])}return{addSample:S,finish:()=>({tid:u,pid:c,name:l,markers:d,samples:f,frameTable:p,stackTable:h,stringTable:y,registerTime:0,unregisterTime:null,processType:"default"})}}let r=new Map;function n(l,c,u,d,f){let p=r.get(c);p===void 0&&(p=t(u,l,c),r.set(c,p)),p.addSample(u,f,d)}let o=e.split(`
666
+ `),a=0,i=0;for(;a<o.length;){let l=o[a++];if(l===""||l.startsWith("#"))continue;let c=l,u=/^(.*)\s+([\d.]+):/.exec(c);if(!u){console.log('Could not parse line as the start of a sample in the "perf script" profile format: "%s"',c);continue}let d=u[1],f=parseFloat(u[2])*1e3,p=/^(.*)\s+(?:(\d+)\/)?(\d+)\b/.exec(d);if(!p){console.log('Could not parse line as the start of a sample in the "perf script" profile format: "%s"',c);continue}let h=p[1].trim(),y=Number(p[2]||0),b=Number(p[3]||0);i===0&&(i=f);let g=[];for(;a<o.length;){let m=o[a++];if(m.trim()==="")break;let T=/^\s*(\w+)\s*(.+) \(([^)]*)\)/.exec(m);if(T){let S=T[2],I=T[3];if(S=S.replace(/\+0x[\da-f]+$/,""),S.startsWith("("))continue;I&&(S+=` (in ${I})`),g.push(S)}}g.length!==0&&(g.reverse(),n(y,b,h,f,g))}let s=Array.from(r.values()).map(l=>l.finish());for(let l of s){let c=l.samples.schema.time;l.samples.data.sort((u,d)=>u[c]-d[c])}return{meta:{interval:1,processType:0,product:"Firefox",stackwalk:1,debug:0,gcpoison:0,asyncstack:1,startTime:i,shutdownTime:null,version:24,presymbolicated:!0,categories:G$,markerSchema:[]},libs:[],threads:s,processes:[],pausedRanges:[]}}nr();xe();function aw(e){return e.startsWith("{")?!1:!!e.substring(0,e.indexOf(`
667
+ `)).match(/[^;]*(?:;[^;]*)* [0-9]+/)}var V$=[{name:"Java",color:"yellow",subcategories:["Other"]},{name:"Native",color:"blue",subcategories:["Other"]}],j$=0,q$=1;function iw(e){let t=Ro();t.meta.product="Flamegraph",t.meta.categories=V$;let r=new an,n=r.getStringTable(),o=Ma({name:"Program",pid:"0",tid:0}),a=r.getFrameTable(),i=r.getStackTable(),{samples:s}=o,l=new Map,c=new Map;function u(b,g){let m=g===null?`${b}`:`${b},${g}`,T=l.get(m);return T===void 0&&(T=i.length,i.frame.push(b),i.prefix.push(g),i.length++,l.set(m,T)),T}function d(b){let g=c.get(b);if(g!==void 0)return g;let m=b.replace(/_\[j\]$/,""),T=q$;b.endsWith("_[j]")&&(T=j$);let S=n.indexForString(m),I=r.indexForFunc(S,!1,!1,-1,null,null,null);return g=a.length,a.address.push(-1),a.inlineDepth.push(0),a.category.push(T),a.subcategory.push(0),a.func.push(I),a.nativeSymbol.push(null),a.innerWindowID.push(null),a.line.push(null),a.column.push(null),a.length++,c.set(b,g),g}function f(b,g){let m=g.reduce((T,S)=>{let I=d(S);return u(I,T)},null);s.stack.push(m),W(s.time).push(b),s.length++}let p=e.split(`
668
+ `),h=0;for(let b of p){if(b.trim()==="")continue;let g=b.match(/([^;]*(?:;[^;]*)*) ([0-9]+)/);if(!g){console.warn("unexpected line format",b);continue}let[,m,T]=g,S=m.split(";"),I=parseInt(T,10);for(;I-- >0;)f(h++,S)}t.threads.push(o);let{shared:y}=r.finish();return t.shared=y,t}var Pu=class{_decoder;_u8View;_dataView;_pos;constructor(t){this._decoder=new TextDecoder("utf-8",{fatal:!0}),this._u8View=t,this._dataView=new DataView(this._u8View.buffer),this._pos=0}eof(){return this._pos>=this._u8View.length}curPos(){return this._pos}setCurPos(t){this._pos=t}getU8(){let t=this._dataView.getUint8(this._pos);return this._pos+=1,t}getU16(){let t=this._dataView.getUint16(this._pos,!0);return this._pos+=2,t}getU32(){let t=this._dataView.getUint32(this._pos,!0);return this._pos+=4,t}getU64(){let t=this.getU32();return this.getU32()*Math.pow(2,32)+t}getBytesUntil(t){if(t<this._pos)throw new Error(`getBytesUntil() called with a target position in the past (curPos: ${this._pos}, endPos: ${t})`);let r=this._u8View.subarray(this._pos,t);return this._pos=t,r}getBytes(t){return this.getBytesUntil(this._pos+t)}getString(t){let r=this.getBytes(t);return this._decoder.decode(r)}getLine(){let t=this._u8View.indexOf(10,this._pos);t===-1&&(t=this._u8View.length);let r=this._u8View.subarray(this._pos,t);return this._pos=t+1,this._decoder.decode(r)}};function sw(e){try{let r=e.subarray(0,11),o=new TextDecoder().decode(r);if(/\*version\n[1-3]\n/.test(o))return"regular"}catch{}try{if(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)===1464814675)return"streaming"}catch{}return"unrecognized"}function lw(e){if(e!==1464814675){let t="0x574f4c53",r=`0x${e.toString(16)}`;throw new Error(`Unexpected magic header, expected ${t} (little endian), got ${r}`)}}function cw(e){if(e<1||e>3)throw new Error(`This code only knows how to parse versions 1 to 3, got version ${e}.`)}function uw(e,t){if(e!==t)throw new Error(`Error: version number mismatch; got ${t} in summary but ${e} in data section`)}function dw(e){let t=e.getLine();if(t!=="*version")throw new Error("Expected *version, got "+t);let r=+e.getLine();cw(r);let n={clock:"thread-cpu"};for(;t=e.getLine(),!(!t||t.startsWith("*"));){let[o,a]=t.split("=");n[o]=a}return{summaryVersion:r,summaryDetails:n,lineAfterSummary:t}}function z$(e){let t=[],r="";for(;r=e.getLine(),!(!r||r.startsWith("*"));){let[n,o]=r.split(" ");t.push({tid:+n,threadName:o})}return{threads:t,lineAfterThreads:r}}function fw(e){let[t,r,n,o]=e.split(" ");return{methodId:+t,className:r,methodName:n,signature:o}}function K$(e){let t=[],r="";for(;r=e.getLine(),!(!r||r.startsWith("*"));)t.push(fw(r));return{methods:t,lineAfterMethods:r}}function pw(e,t){switch(t){case 1:return 9;case 2:return 10;default:return e.getU16()}}function hw(e,t,r,n){let o=e.curPos(),a=t===1?e.getU8():e.getU16(),i=e.getU32(),s=i&-4,l=i&3;if(l>2)throw new Error("Unexpected method action "+l);let c,u;switch(n){case"wall":c=e.getU32(),u=c;break;case"dual":u=e.getU32(),c=e.getU32();break;default:u=e.getU32(),c=u;break}return e.setCurPos(o+r),{tid:a,methodId:s,globalTime:c,threadTime:u,action:["enter","exit","exit-unroll"][l]}}function Z$(e){let{summaryVersion:t,summaryDetails:r,lineAfterSummary:n}=dw(e);if(n!=="*threads")throw new Error("Expected *threads, got "+n);let{threads:o,lineAfterThreads:a}=z$(e);if(a!=="*methods")throw new Error("Expected *methods, got "+a);let{methods:i,lineAfterMethods:s}=K$(e);if(s!=="*end")throw new Error("Expected *end, got "+s);let l=e.curPos(),c=e.getU32();lw(c);let u=e.getU16();uw(u,t);let d=e.getU16(),f=e.getU64(),p=pw(e,u);e.setCurPos(l+d);let{clock:h}=r,y=[];for(;!e.eof();)y.push(hw(e,u,p,h));return{summaryDetails:r,threads:o,methods:i,methodActions:y,startTimeInUsecSinceBoot:f}}function J$(e){let t=e.curPos(),r=e.getU32();lw(r);let n=e.getU16()^240;cw(n);let o=e.getU16(),a=e.getU64(),i=pw(e,n);e.setCurPos(t+o);let s=[],l=[],c=[],u={clock:"thread-cpu"};for(;!e.eof();){let p=e.curPos();if(e.getU16()!==0){c.push(p),e.setCurPos(p+i);continue}let y=e.getU8();if(y===1){let b=e.getU16();s.push(fw(e.getString(b)))}else if(y===2){let b=e.getU16(),g=e.getU16(),m=e.getString(g);l.push({tid:b,threadName:m})}else if(y===3){let b=e.getU32(),g=e.getBytes(b),m=dw(new Pu(g));uw(n,m.summaryVersion),u=m.summaryDetails;break}else throw new Error(`Invalid trace format: got invalid code ${y}.`)}let{clock:d}=u,f=[];for(let p of c)e.setCurPos(p),f.push(hw(e,n,i,d));return{summaryDetails:u,threads:l,methods:s,methodActions:f,startTimeInUsecSinceBoot:a}}function Y$(e){try{let t=new Pu(e);switch(sw(e)){case"regular":return Z$(t);case"streaming":return J$(t);default:throw new Error("Not an ART trace")}}catch(t){throw console.error("Source exception:",t),new Error(`Could not parse the profile array buffer as an ART trace: ${t}`)}}function X$(e){let{methodActions:t}=e,r=[],n=new Map,o=Math.min(500,t.length);for(let s=0;s<o;s++){let{tid:l,globalTime:c}=t[s],u=n.get(l);if(c!==u){if(u!==void 0){let d=c-u;r.push(d)}n.set(l,c)}}if(r.sort((s,l)=>s-l),r.length<5)return r[0];let a=r.slice(0,Math.floor(r.length/5));return a.reduce((s,l)=>s+l,0)/a.length}function Q$(e){function t(a){let i=a.startsWith("org.")||a.startsWith("com.")?a.substring(4):a,s=i.indexOf(".");return s===-1?i:i.substring(0,s)}let r=new Map;for(let a=0;a<e.length;a++){let i=t(e[a].className);switch(i){case"android":case"java":case"sun":case"kotlin":case"androidx":case"kotlinx":break;default:{let s=r.get(i)||0;r.set(i,s+1)}}}let n=Array.from(r.entries());if(n.length===0)return;n.sort(([a,i],[s,l])=>l-i);let[o]=n[0];return{prefixes:[`${o}.`,`com.${o}.`,`org.${o}.`],name:o[0].toUpperCase()+o.slice(1)}}var fh=class{idleCategory=0;otherCategory=1;blockingCategory=2;androidCategory=3;javaCategory=4;kotlinCategory=5;androidxCategory=6;specialCategory=7;categories=[{name:"Idle",color:"transparent"},{name:"Other",color:"grey"},{name:"Blocked",color:"lightblue"},{name:"Android",color:"yellow"},{name:"Java",color:"blue"},{name:"Kotlin / KotlinX",color:"purple"},{name:"AndroidX",color:"orange"},{name:"Special",color:"green"}];_specialCategoryInfo;constructor(t){this._specialCategoryInfo=Q$(t),this._specialCategoryInfo&&(this.categories[this.specialCategory].name=this._specialCategoryInfo.name)}inferJavaCategory(t){return t==="android.os.MessageQueue.nativePollOnce"?this.idleCategory:t==="java.lang.Object.wait"?this.blockingCategory:t.startsWith("android.")||t.startsWith("com.android.")?this.androidCategory:t.startsWith("java.")||t.startsWith("sun.")||t.startsWith("com.sun.")?this.javaCategory:t.startsWith("kotlin.")||t.startsWith("kotlinx.")?this.kotlinCategory:t.startsWith("androidx.")?this.androidxCategory:this._specialCategoryInfo&&this._specialCategoryInfo.prefixes.some(r=>t.startsWith(r))?this.specialCategory:this.otherCategory}},ph=class{_markers={schema:{name:0,time:1,data:2},data:[]};_samples={schema:{stack:0,time:1,responsiveness:2,rss:3,uss:4},data:[]};_frameTable={schema:{location:0,implementation:1,optimizations:2,line:3,category:4},data:[]};_stackTable={schema:{frame:0,prefix:1},data:[]};_stringTable=[];_currentStack=null;_nextSampleTimestamp=0;_stackMap=new Map;_frameMap=new Map;_registerTime=0;_name;_pid;_tid;_methodMap;_intervalInMsec;_honorOriginalSamplingTimestamps;_categoryInfo;constructor(t,r,n,o,a,i,s){this._name=t,this._pid=r,this._tid=n,this._methodMap=o,this._intervalInMsec=a,this._honorOriginalSamplingTimestamps=i,this._categoryInfo=s}_getOrCreateStack(t,r){let n=r===null?`${t}`:`${t},${r}`,o=this._stackMap.get(n);return o===void 0&&(o=this._stackTable.data.length,this._stackTable.data.push([t,r]),this._stackMap.set(n,o)),o}_getOrCreateFrameForMethodId(t){let r=this._frameMap.get(t);if(r===void 0){let n=this._methodMap.get(t),o;if(n===void 0)o="<unknown method ID 0x"+t.toString(16)+">";else{let{className:s,methodName:l}=n;o=s+"."+l}let a=this._stringTable.length;this._stringTable.push(o);let i=this._categoryInfo.inferJavaCategory(o);r=this._frameTable.data.length,this._frameTable.data.push([a,null,null,null,i]),this._frameMap.set(t,r)}return r}enterMethod(t){let r=this._getOrCreateFrameForMethodId(t);this._currentStack=this._getOrCreateStack(r,this._currentStack)}exitMethod(t){this._currentStack!==null&&(this._currentStack=this._stackTable.data[this._currentStack][1])}advanceTimeTo(t){if(this._nextSampleTimestamp===0){this._nextSampleTimestamp=t,this._name!=="main"&&(this._registerTime=t);return}for(;this._nextSampleTimestamp<t;){if(this._samples.data.push([this._currentStack,this._nextSampleTimestamp]),this._honorOriginalSamplingTimestamps&&t-this._nextSampleTimestamp<2*this._intervalInMsec){this._nextSampleTimestamp=t;break}this._nextSampleTimestamp+=this._intervalInMsec}}finish(){return this._nextSampleTimestamp!==null&&this._samples.data.push([this._currentStack,this._nextSampleTimestamp]),{tid:this._tid,pid:this._pid,name:this._name,registerTime:this._registerTime,unregisterTime:null,markers:this._markers,samples:this._samples,frameTable:this._frameTable,stackTable:this._stackTable,stringTable:this._stringTable}}};function mw(e){return sw(e)!=="unrecognized"}function gw(e){let t=Y$(e),r=X$(t),n=!1,o;!r||r<100?o=.1:(o=Math.round(r/100)/10,n=!0);let{summaryDetails:a,threads:i,methods:s,methodActions:l}=t,c=new fh(s),u=new Map(s.map(p=>[p.methodId,p])),d=new Map;if(l.length>0)for(let p=0;p<l.length;p++){let{tid:h,methodId:y,globalTime:b,action:g}=l[p],m=d.get(h);if(m===void 0){let T=i.find(S=>S.tid===h);if(!T)throw new Error(`Encountered method action for unknown thread ${h}`);m=new ph(T.threadName,a.pid?+a.pid:1,h,u,o,n,c),d.set(h,m)}switch(m.advanceTimeTo(b/1e3),g){case"enter":m.enterMethod(y);break;case"exit":case"exit-unroll":m.exitMethod(y);break;default:throw new Error(`Unexpected action ${g}`)}}let f=Array.from(d.values()).map(p=>p.finish());return{meta:{interval:o,processType:0,product:"ART Trace (Android)",importedFrom:"ART Trace (Android)",pid:a.pid,stackwalk:1,startTime:0,shutdownTime:null,version:11,presymbolicated:!0,categories:c.categories},libs:[],threads:f,processes:[],pausedRanges:[]}}rr();var hh=ce(require("zlib"));function Ka(e){return new Promise((t,r)=>{hh.gunzip(e,(n,o)=>{n?r(n):t(o)})})}function Za(e){return e.byteLength>=3&&e[0]===31&&e[1]===139&&e[2]===8}function Ko(e){let t={length:e.data.length};for(let r in e.schema){let n=e.schema[r];if(typeof n!="number")throw new Error("fieldIndex must be a number in the Gecko profile table.");t[r]=e.data.map(o=>n in o?o[n]:null)}return t}function d3(e){if(e){let t=e.split(" -> ");return t[t.length-1]}return e}function f3(e){let{startTime:t,endTime:r}=e.schema,n=e.data.slice(0);return n.sort((o,a)=>{let i=o[r]||o[t],s=a[r]||a[t];if(i===null)throw console.error(o),new Error("A marker had null start and end time.");if(s===null)throw console.error(a),new Error("A marker had null start and end time.");return i-s}),Object.assign({},e,{data:n})}function p3(e){let t="non-virtual thunk to ";return e.startsWith&&e.startsWith(t)?e.substr(t.length):e}function h3(e,t,r,n,o,a){let i=o.getStringTable(),s={geckoThreadStringArray:r,addressLocator:new Nu(n),stringToNewFuncIndexAndFrameAddress:new Map,globalDataCollector:o,geckoSourceTable:a},l=[],c=[];for(let u=0;u<e.length;u++){let d=e[u],f=W(r[d]),p=i.indexForString(f),h=t[u],y=s.stringToNewFuncIndexAndFrameAddress.get(f);if(y!==void 0){let{funcIndex:T,frameAddress:S}=y;l.push(T),c.push(S);continue}let b=null,g=null,m=m3(s,f,p);m!==null?(b=m.funcIndex,g=m.frameAddress):(b=g3(s,f),b===null&&(b=y3(s,f),b===null&&(b=b3(o,p,h)))),s.stringToNewFuncIndexAndFrameAddress.set(f,{funcIndex:b,frameAddress:g}),l.push(b),c.push(g)}return{frameFuncs:l,frameAddresses:c}}function m3(e,t,r){if(!t.startsWith("0x"))return null;let{addressLocator:n,globalDataCollector:o}=e,a=-1,i=-1;try{let l=t,{lib:c,relativeAddress:u}=n.locateAddress(l);if(c!==null){i=u;let d=o.indexForLib(c);a=o.indexForLibResource(d)}}catch{}return{funcIndex:o.indexForFunc(r,!1,!1,a,null,null,null),frameAddress:i}}function g3(e,t){let r=/^(.*) \(in ([^)]*)\) (\+ [0-9]+)$/.exec(t)||/^(.*) \(in ([^)]*)\) (\(.*:.*\))$/.exec(t)||/^(.*) \(in ([^)]*)\)$/.exec(t);if(!r)return null;let{stringToNewFuncIndexAndFrameAddress:n,globalDataCollector:o}=e,a=o.getStringTable(),[,i,s]=r,l=p3(i),c=a.indexForString(l),u=a.indexForString(s),d=n.get(l);if(d!==void 0)return d.funcIndex;let f=o.indexForNameOnlyLibResource(u);return o.indexForFunc(c,!1,!1,f,null,null,null)}function y3(e,t){let r=/^(.*) \((.+?):([0-9]+)(?::([0-9]+))?\)(?:\[(\d+)\])?$/.exec(t)||/^()(.+?):([0-9]+)(?::([0-9]+))?(?:\[(\d+)\])?$/.exec(t);if(!r)return null;let{globalDataCollector:n,geckoSourceTable:o}=e,[,a,i,s,l,c]=r,u=d3(i),d=n.indexForURIResource(u),f=null;if(c!==void 0){let g=parseInt(c,10);if(g<o.data.length){let m=o.schema.id,T=o.schema.filename,S=o.schema.startLine,I=o.schema.startColumn,v=o.schema.sourceMapURL,w=o.data[g][m],k=o.data[g][T],E=o.data[g][S],R=o.data[g][I],F=o.data[g][v];f=n.indexForSource(w,k,E,R,F)}}f===null&&(f=n.indexForSource(null,u));let p=n.getStringTable(),h;a?h=p.indexForString(a):h=p.indexForString(`(root scope) ${u}`);let y=parseInt(s,10),b=l?parseInt(l,10):null;return n.indexForFunc(h,!0,!1,d,f,y,b)}function b3(e,t,r){return e.indexForFunc(t,!1,r,-1,null,null,null)}function T3(e,t,r,n){let o=t.length;for(let a=0;a<e.length;a++){let i=a+o;t.address[i]=n[a]??-1,t.inlineDepth[i]=0,t.category[i]=e.category[a],t.subcategory[i]=e.subcategory[a],t.func[i]=r[a],t.nativeSymbol[i]=null,t.innerWindowID[i]=e.innerWindowID[a],t.line[i]=e.line[a],t.column[i]=e.column[a]}return t.length+=e.length,o}function S3(e,t,r){let n=t.length;for(let o=0;o<e.length;o++){let a=o+n,i=e.prefix[o];t.prefix[a]=i!==null?i+n:null,t.frame[a]=e.frame[o]+r}return t.length+=e.length,n}function x3(e,t){if("stack"in e&&e.stack&&e.stack.samples.data.length>0){let{stack:r,...n}=e,o=r.samples.data[0][r.samples.schema.stack],a=r.samples.data[0][r.samples.schema.time];return o!==null?{...n,cause:{tid:r.tid,time:a,stack:o+t}}:n}return e}function Rk(e,t){if(!e)return null;if("stack"in e&&e.stack&&e.stack.samples.data.length>0){let{samples:r}=e.stack,n=r.data[0][r.schema.stack];if(n!==null)return n+t}return null}function I3(e,t,r,n,o){let a=Ur(),i=iS(),s=Dc(),l=[],c=[],u=n.getStringTable(),d;for(let p=0;p<e.length;p++){let h=e.data[p];if(h)switch(h.type){case"JS allocation":{i.time.push(W(e.startTime[p],"JS Allocations are assumed to have a startTime")),i.className.push(h.className),i.typeName.push(h.typeName),i.coarseType.push(h.coarseType),i.weight.push(h.size),i.inNursery.push(h.inNursery),i.stack.push(Rk(h,o)),i.length++;continue}case"Native allocation":{d===void 0&&(d="memoryAddress"in h),s.time.push(W(e.startTime[p],"Native Allocations are assumed to have a startTime")),s.weight.push(h.size),s.stack.push(Rk(h,o)),s.length++,d&&(l.push(W(h.memoryAddress,"Could not find the memoryAddress property on a gecko marker payload.")),c.push(W(h.threadId,"Could not find a threadId property on a gecko marker payload.")));continue}default:}let y=v3(h,t,u,r,o),b=u.indexForString(t[e.name[p]]),g=e.startTime[p],m=e.endTime[p],T=e.phase[p],S=e.category[p];a.name.push(b),a.startTime.push(g),a.endTime.push(m),a.phase.push(T),a.category.push(S),a.data.push(y),a.length++}let f;return s.length===0?f=null:d?f={time:s.time,weight:s.weight,weightType:s.weightType,stack:s.stack,memoryAddress:l,threadId:c,length:s.length}:f={time:s.time,weight:s.weight,weightType:s.weightType,stack:s.stack,length:s.length},{markers:a,jsAllocations:i.length===0?null:i,nativeAllocations:f}}function Mk(e){let t={};for(let r in e)t[r]=e[r]*1e3;return t}function v3(e,t,r,n,o){if(!e)return null;let a=x3(e,o);switch(a.type){case"GCSlice":{let{times:c,...u}=a.timings;return{type:"GCSlice",timings:{...u,phase_times:c?Mk(c):{}}}}case"GCMajor":{let c=a.timings;switch(c.status){case"completed":{let{totals:u,...d}=c;return{type:"GCMajor",timings:{...d,phase_times:Mk(u),mmu_20ms:c.mmu_20ms/100,mmu_50ms:c.mmu_50ms/100}}}case"aborted":return{type:"GCMajor",timings:{status:"aborted"}};default:throw console.log("Unknown GCMajor status"),new Error("Unknown GCMajor status")}}case"IPC":{let{startTime:c,endTime:u,otherPid:d,messageType:f,messageSeqno:p,side:h,direction:y,phase:b,sync:g,threadId:m}=a;return{type:"IPC",startTime:c,endTime:u,otherPid:`${d}`,messageType:f,messageSeqno:p,side:h,direction:y,phase:b,sync:g,threadId:m}}default:break}let i=a;if(!i.type)return i;let s=n.get(i.type);if(s===void 0)return i;let l=i;for(let c of s){let u=i[c];typeof u=="number"&&(l={...l,[c]:r.indexForString(t[u])})}return l}function Uk(e){let r=new Array(e.length),n=0;for(let o=0;o<e.length;o++){let a=Math.round(e[o]*1e6);r[o]=(a-n)/1e6,n=a}return r}function w3(e,t){let r={stack:e.stack.map(n=>n!==null?n+t:null),timeDeltas:Uk(e.time),weightType:"samples",weight:null,length:e.length};if(e.threadCPUDelta&&e.threadCPUDelta.some(o=>o!==null)&&(r.threadCPUDelta=e.threadCPUDelta),"argumentValues"in e&&(r.argumentValues=e.argumentValues),"eventDelay"in e)r.eventDelay=e.eventDelay;else if("responsiveness"in e)r.responsiveness=e.responsiveness;else throw new Error("The profile processor expected an eventDelay or responsiveness array in the samples table, but none was found.");return r}function k3(e,t){return e==="Memory"?{graphType:"line-accumulated",unit:"bytes",color:"orange",markerSchemaLocation:"timeline-memory",sortWeight:20,label:"Memory"}:e==="power"?{graphType:"line-rate",unit:"pWh",color:"grey",markerSchemaLocation:null,sortWeight:30,label:t}:e==="Bandwidth"?{graphType:"line-rate",unit:"bytes",color:"blue",markerSchemaLocation:null,sortWeight:10,label:"Bandwidth"}:e==="CPU"&&t==="processCPU"?{graphType:"line-rate",unit:"percent",color:"grey",markerSchemaLocation:null,sortWeight:40,label:"Process CPU"}:{graphType:"line-rate",unit:"",color:"grey",markerSchemaLocation:null,sortWeight:50,label:t}}function Fk(e,t,r){let n=e.counters,o=e.threads.find(s=>s.name==="GeckoMain");if(!o||!n)return[];let a=`${o.pid}`,i=t.findIndex(s=>s.name==="GeckoMain"&&s.pid===a);if(i===-1)throw new Error("Unable to find the main thread in the stable thread list. This means that the logic in the _processCounters function is wrong.");return n.reduce((s,{name:l,category:c,description:u,samples:d})=>{if(d.data.length===0)return s;let f=Ko(d),p=_3(f);return s.push({name:l,category:c,description:u,pid:a,mainThreadIndex:i,samples:$k(p,r),display:k3(c,l)}),s},[])}function _3(e){return{timeDeltas:Uk(e.time),number:e.number,count:e.count,length:e.length}}function Ok(e,t,r){let n=e.profilerOverhead,o=e.threads.find(s=>s.name==="GeckoMain");if(!o||!n)return null;let a=`${o.pid}`,i=t.findIndex(s=>s.name==="GeckoMain"&&s.pid===a);if(i===-1)throw new Error("Unable to find the main thread in the stable thread list. This means that the logic in the _processProfilerOverhead function is wrong.");return{samples:E3(Ko(n.samples),r),pid:a,mainThreadIndex:i,statistics:n.statistics}}function Lk(e,t,r,n){let o=Ko(e.frameTable),a=Ko(e.stackTable),i=Ko(e.samples),s=Ko(f3(e.markers)),{libs:l,pausedRanges:c,meta:u,sources:d}=t,{shutdownTime:f}=u,{frameFuncs:p,frameAddresses:h}=h3(o.location,o.relevantForJS,e.stringTable,l,n,d),y=T3(o,n.getFrameTable(),p,h),b=S3(a,n.getStackTable(),y),{markers:g,jsAllocations:m,nativeAllocations:T}=I3(s,e.stringTable,r,n,b),S=w3(i,b),I,v=new Set;for(let E=0;E<o.length;E++){let R=o.innerWindowID[E];R!==null&&R!==0&&v.add(R)}for(let E=0;E<g.length;E++){let R=g.data[E];if(!R||!("innerWindowID"in R))continue;let F=R.innerWindowID;typeof F=="number"&&F!==0&&v.add(F)}v.size!==0&&(I=Array.from(v));let w={name:e.name,isMainThread:e.name==="GeckoMain","eTLD+1":e["eTLD+1"],processType:e.processType,processName:typeof e.processName=="string"?e.processName:"",processStartupTime:0,processShutdownTime:f,registerTime:e.registerTime,unregisterTime:e.unregisterTime,tid:e.tid,pid:`${e.pid}`,pausedRanges:c||[],markers:g,samples:S};e.isPrivateBrowsing!==void 0&&(w.isPrivateBrowsing=e.isPrivateBrowsing),e.userContextId!==void 0&&(w.userContextId=e.userContextId),I!==void 0&&(w.usedInnerWindowIDs=I),m&&(w.jsAllocations=m),T&&(w.nativeAllocations=T),e.tracedValues&&(w.tracedValuesBuffer=e.tracedValues),e.tracedObjectShapes&&(w.tracedObjectShapes=e.tracedObjectShapes);function k(){let{jsTracerEvents:E}=e,{jsTracerDictionary:R}=t,F=n.getStringTable();if(E&&R){let G=new Array(R.length);for(let Z=0;Z<R.length;Z++)G[Z]=F.indexForString(R[Z]);let B=E.events.slice();for(let Z=0;Z<B.length;Z++){let X=B[Z];B[Z]=G[X]}w.jsTracer={...E,events:B}}}return k(),w}function Dk(e,t){return{...e,time:e.time.map(r=>r+t)}}function $k(e,t){let{timeDeltas:r}=e;if(r===void 0)throw new Error("Should only be called when a timeDeltas column is present");let n=r.slice();return n[0]+=t,{...e,timeDeltas:n}}function C3(e,t){let r=t*1e3;return{...e,timestamps:e.timestamps.map(n=>n+r)}}function E3(e,t){return{...e,time:e.time.map(r=>r/1e3+t)}}function Gk(e,t){function r(n){return n===null?n:n+t}return{...e,startTime:e.startTime.map(r),endTime:e.endTime.map(r),data:e.data.map(n=>{if(!n)return n;let o=dS(n);return"startTime"in o&&typeof o.startTime=="number"&&(o.startTime+=t),"endTime"in o&&typeof o.endTime=="number"&&(o.endTime+=t),"cause"in o&&o.cause&&o.cause.time!==void 0&&(o.cause.time+=t),o.type==="Network"&&(typeof o.domainLookupStart=="number"&&(o.domainLookupStart+=t),typeof o.domainLookupEnd=="number"&&(o.domainLookupEnd+=t),typeof o.connectStart=="number"&&(o.connectStart+=t),typeof o.tcpConnectEnd=="number"&&(o.tcpConnectEnd+=t),typeof o.secureConnectionStart=="number"&&(o.secureConnectionStart+=t),typeof o.connectEnd=="number"&&(o.connectEnd+=t),typeof o.requestStart=="number"&&(o.requestStart+=t),typeof o.responseStart=="number"&&(o.responseStart+=t),typeof o.responseEnd=="number"&&(o.responseEnd+=t)),o})}}function Bk(e){let{name:t,tooltipLabel:r,tableLabel:n,chartLabel:o,display:a,data:i,graphs:s,colorField:l,isStackBased:c}=e,u=[],d=[];for(let p of i)if("key"in p){let{key:h,label:y,format:b,hidden:g}=p;u.push({key:h,label:y,format:b,hidden:g})}else d.push(p);let f;if(d.length!==0){let p=d.findIndex(b=>b.label==="Description");p===-1&&(p=0);let y=d.filter((b,g)=>g!==p).filter(b=>b.label!=="Marker"&&b.value!=="UserTiming");y.length!==0&&console.warn(`Discarding the following static fields from marker schema "${e.name}": ${y.map(b=>b.label+": "+b.value).join(", ")}`),f=d[p].value}return{name:t,tooltipLabel:r,tableLabel:n,chartLabel:o,display:a,fields:u,description:f,graphs:s,colorField:l,isStackBased:c}}function N3(e){let t=e.meta.markerSchema.map(Bk),r=new Set(t.map(({name:n})=>n));for(let n of e.processes)for(let o of n.meta.markerSchema)r.has(o.name)||(r.add(o.name),t.push(Bk(o)));return t}function A3(e){if(!e)throw new Error("The profile was empty.");if(typeof e!="object")throw new Error("The profile was not an object");let t="profile"in e&&e.profile?e.profile:e;if(!t.meta)throw new Error("This does not appear to be a valid Gecko Profile, there is no meta field.");return Wk(t)}function Wk(e){rw(e);let t=[],r=N3(e),n=ws(r),o=e.meta.extensions?Ko(e.meta.extensions):fs(),a=new an;a.addExtensionOrigins(o);for(let g of e.threads)t.push(Lk(g,e,n,a));let i=Fk(e,t,0),s=[Ok(e,t,0)];for(let g of e.processes){let m=g.meta.startTime-e.meta.startTime;for(let T of g.threads){let S=Lk(T,g,n,a);S.samples=$k(S.samples,m),S.markers=Gk(S.markers,m),S.jsTracer&&(S.jsTracer=C3(S.jsTracer,m)),S.jsAllocations&&(S.jsAllocations=Dk(S.jsAllocations,m)),S.nativeAllocations&&(S.nativeAllocations=Dk(S.nativeAllocations,m)),S.processStartupTime+=m,S.processShutdownTime!==null&&(S.processShutdownTime+=m),S.registerTime+=m,S.unregisterTime!==null&&(S.unregisterTime+=m),t.push(S)}i.push(...Fk(g,t,m)),s.push(Ok(g,t,m))}let l=[...e.pages||[]];for(let g of e.processes)l=l.concat(g.pages||[]);let c={interval:e.meta.interval,startTime:e.meta.startTime,startTimeAsClockMonotonicNanosecondsSinceBoot:e.meta.startTimeAsClockMonotonicNanosecondsSinceBoot,startTimeAsMachAbsoluteTimeNanoseconds:e.meta.startTimeAsMachAbsoluteTimeNanoseconds,startTimeAsQueryPerformanceCounterValue:e.meta.startTimeAsQueryPerformanceCounterValue,abi:e.meta.abi,extensions:o,misc:e.meta.misc,oscpu:e.meta.oscpu,platform:e.meta.platform,processType:e.meta.processType,product:e.meta.product||"",stackwalk:e.meta.stackwalk,debug:!!e.meta.debug,toolkit:e.meta.toolkit,version:e.meta.version,categories:e.meta.categories,preprocessedProfileVersion:62,appBuildID:e.meta.appBuildID,visualMetrics:e.meta.visualMetrics,configuration:e.meta.configuration,sourceURL:e.meta.sourceURL,physicalCPUs:e.meta.physicalCPUs,logicalCPUs:e.meta.logicalCPUs,CPUName:e.meta.CPUName,symbolicated:!!e.meta.presymbolicated,updateChannel:e.meta.updateChannel,markerSchema:r,sampleUnits:e.meta.sampleUnits,device:e.meta.device};e.meta.profilingStartTime!==void 0&&(c.profilingStartTime=e.meta.profilingStartTime,c.profilingEndTime=e.meta.profilingEndTime);let u=s.reduce((g,m)=>(m!==null&&g.push(m),g),[]),d={...e.profilingLog||{}};for(let g of e.processes)d={...d,...g.profilingLog||{}};let f={...e.profileGatheringLog||{}},p=a.getStringTable(),{libs:h,shared:y}=a.finish();for(let g of t.slice()){let{jsTracer:m}=g;if(m){let T=or(t,g),S=Vv(g,y,m,e.meta.categories);S.isJsTracer=!0,S.name=`JS Tracer of ${T}`,t.push(S),delete g.jsTracer}}return c.visualMetrics&&R3(t,c,l,p),YS({meta:c,libs:h,pages:l,counters:i,profilerOverhead:u,shared:y,threads:t,profilingLog:d,profileGatheringLog:f})}function P3(e){if(!e||typeof e!="object"||!("meta"in e)||!e.meta||typeof e.meta!="object")return e;let{meta:t}=e;if(!("preprocessedProfileVersion"in t)||typeof t.preprocessedProfileVersion!="number"||!("threads"in e)||!e.threads||!Array.isArray(e.threads)||!e.threads.length)return e;let{threads:r}=e,[n]=r;if(n.stringArray||!n.stringTable)return e;for(let o of e.threads)o.stringArray=o.stringTable._array,delete o.stringTable;return e}async function Uu(e,t,r={}){try{if(String(e)==="[object ArrayBuffer]"){let l=e;e=new Uint8Array(l)}if(e instanceof Uint8Array||globalThis.Buffer&&e instanceof globalThis.Buffer){let l=e;if(Za(l)&&(l=await Ka(l)),mw(l))e=gw(l);else if(Au(Bs,l)){let{convertSimpleperfTraceProfile:c}=await Promise.resolve().then(()=>(Pk(),Ak));e=c(l)}else try{e=await new TextDecoder(void 0,{fatal:!0}).decode(l)}catch(c){throw console.error("Source exception:",c),new Error("The profile array buffer could not be parsed as a UTF-8 string.")}}typeof e=="string"&&(nw(e)?e=ow(e):aw(e)?e=iw(e):e=JSON.parse(e));let n=e,o=P3(n),a=Qv(o,r);if(a)return a;let i=zv(n,t);if(i)return i;let s=Kv(n);return s||A3(n)}catch(n){throw console.error("UnserializationError:",n),new Error(`Unserializing the profile failed: ${n}`)}}function R3(e,t,r,n){let{visualMetrics:o}=t;if(r.length===0||!o)return;let a=e.findIndex(p=>p.name==="GeckoMain"&&p.processType==="default"),i=M3(e,r,n);if(a===-1||!i)return;let s=e[a],l=e[i],c=["Visual","ContentfulSpeedIndex","PerceptualSpeedIndex"];if(t.categories===void 0)return;let u=t.categories.findIndex(p=>p.name==="Test");function d(p,h,y,b,g,m){y!==3&&b===null||(y===1||y===3)&&g===null||(p.markers.name.push(n.indexForString(h)),p.markers.startTime.push(b),p.markers.endTime.push(g),p.markers.phase.push(y),p.markers.category.push(u),p.markers.data.push(m??null),p.markers.length++)}let f=null;if(n.hasString("Navigation::Start")){let p=n.indexForString("Navigation::Start"),h=l.markers.name.findIndex(y=>y===p);h!==-1&&(f=l.markers.startTime[h])}for(let p of c){let h=o[`${p}Progress`];if(!h)continue;let y=f??h[0].timestamp,b=h[h.length-1].timestamp,g=`${p} Progress`;d(s,g,1,y,b),d(l,g,1,y,b);let m={name:"VisualMetricProgress",tableLabel:"{marker.name} \u2014 {marker.data.percentage}",display:["marker-chart","marker-table"],fields:[{key:"percentage",label:"Percentage",format:"percentage"}]};t.markerSchema.push(m);let T=`${p} Change`;for(let{timestamp:S,percent:I}of h){let v={type:"VisualMetricProgress",percentage:I/100};d(s,T,0,S,null,v),d(l,T,0,S,null,v)}}}function M3(e,t,r){if(!r.hasString("RefreshDriverTick"))return null;let n=r.indexForString("RefreshDriverTick");for(let o=0;o<e.length;o++){let a=e[o];if(a.name!=="GeckoMain"||a.processType!=="tab")continue;let i=new Set(t.filter(l=>l.embedderInnerWindowID===0).map(l=>l.innerWindowID)),{markers:s}=a;for(let l=0;l<s.length;l++)if(s.name[l]===n){let c=s.data[l];if(c&&"innerWindowID"in c&&c.innerWindowID&&i.has(c.innerWindowID))return o}}return null}nr();xe();ur();function Hk(e){let t=F3(e),r=O3(e),n=1/0,o=-1/0,a=1/0,i=-1/0;for(let l of e)n=Math.min(l.processStartupTime,n),o=Math.max(l.processShutdownTime||1/0,o),a=Math.min(l.registerTime,a),i=Math.max(l.unregisterTime||1/0,i);return{processType:"merged",processStartupTime:n,processShutdownTime:o===1/0?null:o,registerTime:a,unregisterTime:i===1/0?null:i,pausedRanges:[],name:"Merged thread",pid:"Merged thread",tid:"Merged thread",isMainThread:!0,samples:t,markers:r}}function F3(e){let t=e.map(i=>i.samples),r=t.map(bs),n=Array(t.length).fill(0),o=[],a={..._a(),threadId:o};for(;;){let i=null,s=1/0;for(let f=0;f<t.length;f++){let p=t[f],h=n[f];if(h>=p.length)continue;let y=r[f][h];y<s&&(i=f,s=y)}if(i===null)break;let l=i,c=t[l],u=r[l],d=n[l];a.stack.push(c.stack[d]),W(a.eventDelay).push(null),a.time.push(u[d]),o.push(c.threadId?c.threadId[d]:e[l].tid),a.length++,n[l]++}return a}function O3(e){let t=[],r={...Ur(),threadId:t};return e.forEach(n=>{let{markers:o}=n;for(let a=0;a<o.length;a++)r.name.push(o.name[a]),r.data.push(o.data[a]),r.startTime.push(o.startTime[a]),r.endTime.push(o.endTime[a]),r.phase.push(o.phase[a]),r.category.push(o.category[a]),t.push(o.threadId?o.threadId[a]:n.tid),r.length++}),r}var Yk=ce(Bh()),W3=(0,Wu.default)(MS,{limit:2}),H3=(0,Wu.default)(FS,{limit:2});function Zk(e,t){let r=e.size===1?W(vn(e)):null,n=(0,Me.createSelector)(ge,D=>Hk([...e].map(re=>D.threads[re]))),o=D=>r!==null?ge(D).threads[r]:n(D),a=(0,Me.createSelector)(D=>o(D).tracedValuesBuffer,D=>D?qv(D):void 0),i=D=>o(D).samples,s=(0,Me.createSelector)(i,uu,As,du,_r,Kc),l=(0,Me.createSelector)(s,D=>D.hasCPUDeltas?Ha([.05,.2,.4,.6,.8],Float64Array.from(D.threadCPUPercent.subarray(0,D.length),re=>re/100),D.time):null),c=D=>o(D).nativeAllocations,u=D=>o(D).jsAllocations,d=D=>Oa(o(D),Ho(D)),f=D=>i(D).weightType||"samples",p=(0,Me.createSelector)(o,s,uu,D=>Ct(D).frameTable,rv,D=>Ct(D).nativeSymbols,D=>Ct(D).resourceTable,Rt,An,a,US),h=(0,Me.createSelector)(p,pr,(D,re)=>{let{start:N,end:A}=re;return rp(D,N,A)}),y=(0,Me.createSelector)(h,D=>{let re=D.samples;return re.hasCPUDeltas?Ha([.05,.2,.4,.6,.8],Float64Array.from(re.threadCPUPercent.subarray(0,re.length),N=>N/100),re.time):null}),b=(0,Me.createSelector)(p,WI,(D,re)=>{switch(re){case"timing":if(D.samples.length===0&&D.nativeAllocations&&D.nativeAllocations.length>0)return"native-allocations";break;case"js-allocations":if(!D.jsAllocations)return"timing";break;case"native-allocations":case"native-retained-allocations":case"native-deallocations-sites":case"native-deallocations-memory":if(!D.nativeAllocations)return"timing";break;default:ae(re,"Unhandled call tree sumary strategy.")}return re}),g=(0,Me.createSelector)(p,b,Dv),m=(0,Me.createSelector)(p,g,_r,Bv),T=(0,Me.createSelector)(g,pr,(D,{start:re,end:N})=>wn(D,re,N)),S=(0,Me.createSelector)(s,pr,(D,{start:re,end:N})=>{let[A]=wn(D,re,N);return A}),I=(0,Me.createSelector)(Wt,o,or),v=(0,Me.createSelector)(o,I,GS),w=D=>Gr(D).perThread[t]||qp,k=(0,Me.createSelector)(s,Ct,(D,re)=>eo(D.stack,re)),E=(0,Me.createSelector)(u,Ct,(D,re)=>eo(D==null?void 0:D.stack,re)),R=(0,Me.createSelector)(c,Ct,(D,re)=>eo(D==null?void 0:D.stack,re)),F=D=>{let re=c(D);return re?"memoryAddress"in re:!1},G=D=>p(D).jsTracer||null,B=(0,Me.createSelector)(G,Ct,(D,re)=>D===null?null:Wv(D,re)),Z=(0,Me.createSelector)(G,Rt,(D,re)=>D===null?null:Hv(D,re)),X=(0,Me.createSelector)(s,Ho,(D,re)=>D===null||D.eventDelay===void 0?null:DS(D,re));return{getRawThread:o,getThread:p,getSamplesTable:s,getTracedValuesBuffer:a,getActivitySlices:l,getRangeFilteredActivitySlices:y,getSamplesWeightType:f,getNativeAllocations:c,getJsAllocations:u,getThreadRange:d,getRangeFilteredThread:h,getUnfilteredCtssSamples:g,getUnfilteredCtssSampleCategoriesAndSubcategories:m,getFilteredCtssSampleIndexOffsets:T,getFilteredSampleIndexOffset:S,getFriendlyThreadName:I,getThreadProcessDetails:v,getViewOptions:w,getJsTracerTable:G,getExpensiveJsTracerTiming:B,getExpensiveJsTracerLeafTiming:Z,getHasUsefulTimingSamples:k,getHasUsefulJsAllocations:E,getHasUsefulNativeAllocations:R,getCanShowRetainedMemory:F,getProcessedEventDelays:D=>W(X(D),"Could not get the processed event delays"),getCallTreeSummaryStrategy:b}}function Jk(e,t){let r=(0,Wu.default)(II,{cache:new zk.default}),n=m=>$o(m,t),o=(0,Me.createSelector)(e.getRangeFilteredThread,n,e.getMarkerGetter,e.getFullMarkerListIndexes,ft,nt,(m,T,S,I,v,w)=>T.reduce((k,E)=>r(k,E,S,I,v,w),m)),a=(0,Me.createSelector)(o,$p,(m,T)=>{let S=W3(m.stackTable,m.frameTable,m.funcTable,m.stringTable,T);return Qn(S,m)}),i=(0,Me.createSelector)(a,Vp,(m,T)=>H3(m.stackTable,m.frameTable,m.funcTable,m.resourceTable,m.sources,m.stringTable,T)),s=(0,Me.createSelector)(a,i,(m,{transformOutput:T})=>Qn(T,m)),l=m=>i(m).funcMatchesSearchStrings,c=(0,Me.createSelector)(s,Wo,(m,T)=>{if(!T)return m;let{selectionStart:S,selectionEnd:I}=T;return rp(m,S,I)}),u=(0,Me.createSelector)(s,e.getCallTreeSummaryStrategy,ch),d=(0,Me.createSelector)(u,m=>m.length!==0&&m.stack.some(T=>T!==null)),f=(0,Me.createSelector)(c,e.getCallTreeSummaryStrategy,ch),p=(0,Me.createSelector)(f,m=>m.length!==0&&m.stack.some(T=>T!==null)),h=(0,Me.createSelector)(u,Wo,e.getFilteredCtssSampleIndexOffsets,(m,T,S)=>{if(!T)return S;let[I]=S,[v,w]=wn(m,T.selectionStart,T.selectionEnd);return[I+v,I+w]}),y=(0,Me.createSelector)(e.getUnfilteredCtssSampleCategoriesAndSubcategories,h,({sampleCategories:m,sampleSubcategories:T},[S,I])=>({sampleCategories:m.subarray(S,I),sampleSubcategories:T.subarray(S,I)})),b=(0,Me.createSelector)(Vo,o,e.getFriendlyThreadName,n,bI),g=(0,Me.createSelector)(b,m=>m.map(T=>(0,Yk.jsx)(Kk.Localized,{id:T.l10nId,vars:{item:T.item}},T.item)));return{getTransformStack:n,getRangeAndTransformFilteredThread:o,getFilteredThread:s,getSearchFilteredFuncMatchesBitSet:l,getPreviewFilteredThread:c,getFilteredCtssSamples:u,getPreviewFilteredCtssSamples:f,getPreviewFilteredCtssSampleCategoriesAndSubcategories:y,getHasFilteredCtssSamples:d,getHasPreviewFilteredCtssSamples:p,getTransformLabelL10nIds:b,getLocalizedTransformLabels:g}}var Ie=ce(Kt()),t_=ce(Ir());function Hu(e,t,r){let n=new Map,o=new Map;for(let i of t){let s=e(i),l=y=>{y.start.push(s.start),y.end.push(s.end===null?s.start:s.end),y.index.push(i),y.length++},c=r?r[s.category].name:"None",u=s.data&&s.data.type==="Network"?"Network Requests":s.name,d=({instantOnly:y})=>({start:[],end:[],index:[],name:u,bucket:c,instantOnly:y,length:0});if(s.end===null){let y=o.get(u);y||(y=d({instantOnly:!0}),o.set(u,y)),l(y);continue}let f=n.get(u);f===void 0&&(f=[],n.set(u,f));let p=f.find(y=>y.end[y.length-1]<=s.start);if(p){l(p);continue}if(f.length>=300)continue;let h=d({instantOnly:!1});l(h),f.push(h)}let a=[...o.values()].concat(...n.values());return a.sort((i,s)=>{if(i.bucket!==s.bucket)return i.bucket==="Test"?-1:s.bucket==="Test"||i.bucket==="Other"?1:s.bucket==="Other"?-1:i.bucket>s.bucket?1:-1;if(i.name===s.name)return i.instantOnly?-1:s.instantOnly?1:0;if(i.bucket==="Network"){if(i.name==="Network Requests")return 1;if(s.name==="Network Requests")return-1}return i.name.toLowerCase()>s.name.toLowerCase()?1:-1}),a}function Xk(e,t,r){let n=Hu(e,t,r),o=[],a;for(let i of n)i.bucket!==a&&(o.push(i.bucket),a=i.bucket),o.push(i);return o}var Qk=ce(Kt());var e_=(0,Qk.createSelector)(Gr,e=>e.rightClickedMarker);function r_(e,t){let o=(0,Ie.createSelector)(V=>e.getThread(V).markers,V=>ge(V).shared.stringArray,V=>e.getThread(V).tid,e.getThreadRange,nv,kp),a=(0,Ie.createSelector)(o,({markers:V})=>V),i=(0,Ie.createSelector)(o,({markerIndexToRawMarkerIndexes:V})=>V),s=(0,Ie.createSelector)(e.getSamplesTable,_r,(V,te)=>tI(V,50,te)),l=(0,Ie.createSelector)(a,s,(V,te)=>[...V,...te].sort((q,Q)=>q.start-Q.start)),c=V=>l(V).length,u=(0,Ie.createSelector)(l,V=>te=>{let q=V[te];if(!q)throw new Error(t_.stripIndent`
669
669
  Tried to get marker index ${te} but it's not in the full list.
670
670
  This is a programming error.
671
- `);return q}),d=(0,Ie.createSelector)(l,V=>V.map((te,q)=>q)),f=V=>(te,q)=>eu(te,q,V),p=(0,Ie.createSelector)(u,d,pr,(V,te,q)=>{let{start:Q,end:Te}=q;return vp(V,te,Q,Te)}),h=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-overview",Lo),y=(0,Ie.createSelector)(u,p,f(eI)),b=(0,Ie.createSelector)(u,p,s,(V,te,q)=>{let Q=q.length>0?"Jank":"BHR-detected hang";return f(Te=>!!(Te.data&&Te.data.type===Q))(V,te)}),m=(0,Ie.createSelector)(u,p,ft,HI,Rt,nt,ws),g=(0,Ie.createSelector)(u,m,Go,(V,te,q)=>{if(!q)return te;let{selectionStart:Q,selectionEnd:Te}=q;return vp(V,te,Q,Te)}),T=(0,Ie.createSelector)(l,V=>V.every(te=>!En(te))),S=(0,Ie.createSelector)(u,p,f(En)),I=(0,Ie.createSelector)(u,p,f(Qx)),v=(0,Ie.createSelector)(u,S,ft,VI,Rt,nt,ws),w=(0,Ie.createSelector)(l,V=>V.every(te=>En(te))),k=(0,Ie.createSelector)(u,m,Cr,ft,(V,te,q,Q)=>Lo(V,te,q,Q,"marker-chart",wp(Q))),N=(0,Ie.createSelector)(u,g,Cr,ft,(V,te,q,Q)=>Lo(V,te,q,Q,"marker-table",wp(Q))),R=(0,Ie.createSelector)(u,Cr,ft,nt,Rt,()=>"tooltipLabel",to),F=(0,Ie.createSelector)(u,Cr,ft,nt,Rt,()=>"tableLabel",to),G=(0,Ie.createSelector)(u,Cr,ft,nt,Rt,()=>"chartLabel",to),B=(0,Ie.createSelector)(u,Cr,ft,nt,Rt,()=>"copyLabel",to),Z=(0,Ie.createSelector)(u,ft,Rt,Jx),X=(0,Ie.createSelector)(u,k,nt,Jk),_e=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-fileio",()=>tI,Lo),D=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-memory",Lo),re=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-ipc",Lo),E=(0,Ie.createSelector)(u,S,()=>null,$u),A=(0,Ie.createSelector)(u,I,()=>null,$u),M=(0,Ie.createSelector)(u,p,rI),P=(0,Ie.createSelector)(c,V=>jI(V,t),(V,te)=>te===null||te>=V?null:te),$=V=>{let te=u(V),q=P(V);return q===null?null:te(q)},J=V=>e.getViewOptions(V).selectedNetworkMarker,H=V=>{let te=u(V),q=J(V);return q===null?null:te(q)},z=(0,Ie.createSelector)(Xk,V=>V!==null&&V.threadsKey===t?V.markerIndex:null),se=(0,Ie.createSelector)(u,z,(V,te)=>typeof te=="number"?V(te):null),de=(0,Ie.createSelector)(Gr,({hoveredMarker:V})=>V!==null&&V.threadsKey===t?V.markerIndex:null),ue={},fe=(V,te)=>{let q=V.name;return ue[q]||(ue[q]={}),ue[q][te]||(ue[q][te]=be(V,te)),ue[q][te]};function be(V,te){let q=(0,Ie.createSelector)(l,Rt,(Ne,qe)=>{if(V.graphs===void 0)throw new Error(`No graphs for marker ${te}. This shouldn't happen.`);let lt=[],et=[],{graphs:br,name:Qt}=V,qt=br.map(gt=>(et.push([]),gt.key)),Ot=qe.getString(te);return Ne.forEach((gt,zt)=>{let Lt=gt.data;if(Lt&&gt.name===Ot&&Lt.type===Qt&&qt.every(er=>er in Lt)){lt.push(zt);for(let er=0;er<qt.length;++er){let Tr=Lt[qt[er]];et[er].push(Tr)}}}),{numbersPerLine:et,markerIndexes:lt}}),Q=(0,Ie.createSelector)(q,pr,u,(Ne,qe,lt)=>Xf({time:Ne.markerIndexes.map(et=>lt(et).start),length:Ne.markerIndexes.length},qe.start,qe.end)),Te=(0,Ie.createSelector)(q,Q,(Ne,qe)=>{let[lt,et]=qe,{numbersPerLine:br}=Ne;if(lt>=et)return{minNumber:0,maxNumber:0};let Qt=1/0,qt=-1/0;for(let Ot=lt;Ot<et;Ot++)for(let gt=0;gt<br.length;gt++){let zt=br[gt][Ot];zt<Qt&&(Qt=zt),zt>qt&&(qt=zt)}return{minNumber:Qt,maxNumber:qt}});return{getCollectedCustomMarkerSamples:q,getCommittedRangeMarkerSampleRange:Q,getCommittedRangeMarkerSampleValueBounds:Te}}return{getMarkerGetter:u,getTimelineJankMarkerIndexes:b,getDerivedMarkerInfo:o,getMarkerIndexToRawMarkerIndexes:i,getFullMarkerList:l,getFullMarkerListIndexes:d,getMarkerListLength:c,getNetworkMarkerIndexes:S,getSearchFilteredNetworkMarkerIndexes:v,getAreMarkerPanelsEmptyInFullRange:w,getMarkerTableMarkerIndexes:N,getMarkerChartMarkerIndexes:k,getMarkerChartLabelGetter:G,getMarkerTooltipLabelGetter:R,getMarkerTableLabelGetter:F,getMarkerLabelToCopyGetter:B,getMarkerSearchTermGetter:Z,getMarkerChartTimingAndBuckets:X,getCommittedRangeFilteredMarkerIndexes:p,getTimelineOverviewMarkerIndexes:h,getTimelineVerticalMarkerIndexes:y,getTimelineFileIoMarkerIndexes:_e,getTimelineMemoryMarkerIndexes:D,getTimelineIPCMarkerIndexes:re,getNetworkTrackTiming:E,getRangeFilteredScreenshotsById:M,getSearchFilteredMarkerIndexes:m,getPreviewFilteredMarkerIndexes:g,getSelectedMarkerIndex:P,getSelectedMarker:$,getSelectedNetworkMarkerIndex:J,getSelectedNetworkMarker:H,getIsNetworkChartEmptyInFullRange:T,getUserTimingMarkerIndexes:I,getUserTimingMarkerTiming:A,getRightClickedMarkerIndex:z,getRightClickedMarker:se,getHoveredMarkerIndex:de,getMarkerTrackSelectors:fe}}var Ae=ce(Kt());function t_(e,t,r,n,o){let a=r.getCallNodeTable(),{prefix:i,subtreeRangeEnd:s,depth:l}=a,c=Array.from({length:n},()=>{let g={start:[],end:[],sameWidthsStart:[],sameWidthsEnd:[],callNode:[],length:0};return"argumentValues"in e&&(g.argumentValues=[]),g}),u=[];if(e.length===0)return{timings:c,sameWidthsIndexToTimestampMap:u};let d=-1,f=-1,p=new Float64Array(n),h=new Float64Array(n),y=new Int32Array(n),b=0;for(let g=0;g<e.length;g++){let T=t[g]??-1;if(T===d)continue;let S=-1;if("argumentValues"in e&&e.argumentValues!==void 0){let v=e.argumentValues[g];v!==null&&(S=v)}let I=e.time[g];for(;f!==-1&&(T<d||T>=s[d]);){let v=p[f],w=h[f],k=c[f],N=k.length++;k.start[N]=v,k.end[N]=I,k.sameWidthsStart[N]=w,k.sameWidthsEnd[N]=b,k.callNode[N]=d,k.argumentValues&&(k.argumentValues[N]=y[f]),d=i[d],f--}if(T!==-1){let v=l[T];for(;f<v;)f++,p[f]=I,h[f]=b,"argumentValues"in e&&e.argumentValues!==void 0&&(y[f]=S)}d=T,u[b]=I,b++}let m=e.time[e.length-1]+o;for(;f!==-1;){let g=c[f],T=g.length++,S=p[f],I=h[f];g.start[T]=S,g.end[T]=m,g.sameWidthsStart[T]=I,g.sameWidthsEnd[T]=b,g.callNode[T]=d,g.argumentValues&&(g.argumentValues[T]=y[f]),d=i[d],f--}return u[b]=m,{timings:c,sameWidthsIndexToTimestampMap:u}}function r_(e,t,r){if(e.length===0)return[[]];let{func:n,nextSibling:o,subtreeRangeEnd:a,maxDepth:i}=e,s=t.name,l=Array.from({length:i+1},()=>[]),c=new Int32Array(i+1),u=0,d=0;e:for(;;){let f=l[d],p=f.length;for(let g=u;g!==-1;g=o[g]){let T=f.length;if(p===T)f.push(g);else{let S=n[g],I=r.getString(s[S]),v=fS(f,I,w=>r.getString(s[n[w]]),p,T);f.splice(v,0,g)}}let h=d,y=f,b=c[h],m=y[b];for(;a[m]===m+1;){for(b++,c[h]=b;b===y.length;){if(h===0)break e;h--,y=l[h],b=c[h]}m=y[b]}c[h]=b+1,u=m+1,d=h+1}return l}function n_(e,t,r){let{total:n,self:o,rootTotalSummary:a}=r,{prefix:i}=t,s=[],l=new Float32Array(t.length),c=Math.abs;for(let u=0;u<e.length;u++){let d=e[u],f=[],p=[],h=[],y=[],b=0,m=-1;for(let g=0;g<d.length;g++){let T=d[g],S=n[T];if(S===0)continue;let I=i[T];I!==m&&(b=l[I],m=I),l[T]=b;let v=c(S/a),w=c(o[T]/a),k=b+v;f.push(b),p.push(k),h.push(w),y.push(T),b=k}s[u]={start:f,end:p,selfRelative:h,callNode:y,length:y.length}}return s}var o_=ce(Kt());var a_=(0,o_.createSelector)(Gr,e=>e.rightClickedCallNode);var Lh=ce(xa()),i_=(0,Ae.createSelectorCreator)(Ae.defaultMemoize,{maxSize:2}),G3=(0,Lh.default)(wS,{limit:2}),W3=(0,Lh.default)(Vc,{limit:2});function s_(e,t){let r=(0,Ae.createSelector)(e.getThread,Wo,(P,$)=>{let{time:J}=P.samples;return J.length===0?null:{start:J[0],end:J[J.length-1]+$}}),n=i_(P=>e.getFilteredThread(P).stackTable,P=>e.getFilteredThread(P).frameTable,_r,G3),o=i_(n,_r,P=>e.getFilteredThread(P).funcTable.length,W3),a=P=>Cs(P)?o(P):n(P),i=P=>n(P).getCallNodeTable(),s=(0,Ae.createSelector)(i,ES),l=(0,Ae.createSelector)(e.getFilteredThread,so,({stackTable:P,frameTable:$,funcTable:J},H)=>H===null?null:Su(P,$,J,H)),c=(0,Ae.createSelector)(e.getFilteredThread,Ua,({nativeSymbols:P},$)=>$===null?null:P.address.findIndex((J,H)=>J===$.address&&P.libIndex[H]===$.libIndex)),u=(0,Ae.createSelector)(e.getFilteredThread,c,({stackTable:P,frameTable:$,funcTable:J},H)=>H===null?null:Iu(P,$,J,H)),d=(0,Ae.createSelector)(e.getViewOptions,Cs,(P,$)=>$?P.selectedInvertedCallNodePath:P.selectedNonInvertedCallNodePath),f=(0,Ae.createSelector)(a,d,(P,$)=>P.getCallNodeIndexFromPath($)),p=(0,Ae.createSelector)(e.getViewOptions,Cs,(P,$)=>$?P.expandedInvertedCallNodePaths:P.expandedNonInvertedCallNodePaths),h=(0,Ae.createSelector)(a,p,(P,$)=>Array.from($).map(J=>P.getCallNodeIndexFromPath(J))),y=(0,Ae.createSelector)(P=>e.getPreviewFilteredCtssSamples(P).stack,P=>a(P).getStackIndexToNonInvertedCallNodeIndex(),jc),b=(0,Ae.createSelector)(P=>e.getFilteredCtssSamples(P).stack,P=>a(P).getStackIndexToNonInvertedCallNodeIndex(),jc),m=(0,Ae.createSelector)(P=>e.getFilteredThread(P).samples.stack,P=>a(P).getStackIndexToNonInvertedCallNodeIndex(),jc),g=(0,Ae.createSelector)(m,a,f,(P,$,J)=>_S($,P,J)),T=(0,Ae.createSelector)(m,a,US),S=(0,Ae.createSelector)(e.getFilteredCtssSamples,a,FS),I=(0,Ae.createSelector)(e.getUnfilteredCtssSamples,P=>P.weightType||"samples"),v=(0,Ae.createSelector)(e.getPreviewFilteredCtssSamples,y,a,(P,$,J)=>ku(P,$,J.getCallNodeTable().length)),w=(0,Ae.createSelector)(a,v,Fs),k=(0,Ae.createSelector)(a,v,ah),N=(0,Ae.createSelector)(i,s,v,P=>e.getFilteredThread(P).funcTable.length,Fv),R=(0,Ae.createSelector)(e.getFilteredThread,a,nt,e.getPreviewFilteredCtssSamples,w,I,An,Os),F=(0,Ae.createSelector)(e.getFilteredThread,o,nt,e.getPreviewFilteredCtssSamples,N,I,(P,$,J,H,z,se)=>Os(P,$,J,H,{type:"FUNCTION_LIST",timings:z},se)),G=(0,Ae.createSelector)(l,e.getPreviewFilteredCtssSamples,xu),B=(0,Ae.createSelector)(u,e.getPreviewFilteredCtssSamples,vu),Z=(0,Ae.createSelector)(e.getPreviewFilteredCtssSamples,y,a,Wo,(P,$,J,H)=>{let z=Dv(P,$,J.getCallNodeTable().length,H);return z===null?null:Fs(J,z)}),X=(0,Ae.createSelector)(f,a,Z,(P,$,J)=>P===null||J===null?null:Rv(P,$,J)),_e=(0,Ae.createSelector)(e.getFilteredCtssSamples,b,a,S,Wo,t_),D=P=>_e(P).timings,re=P=>_e(P).sameWidthsIndexToTimestampMap,E=(0,Ae.createSelector)(P=>a(P).getCallNodeTable(),P=>e.getFilteredThread(P).funcTable,P=>e.getFilteredThread(P).stringTable,r_),A=(0,Ae.createSelector)(E,P=>a(P).getCallNodeTable(),k,n_),M=(0,Ae.createSelector)(a_,a,(P,$)=>P!==null&&t===P.threadsKey?$.getCallNodeIndexFromPath(P.callNodePath):null);return{unfilteredSamplesRange:r,getWeightTypeForCallTree:I,getCallNodeInfo:a,getSourceViewStackLineInfo:l,getAssemblyViewNativeSymbolIndex:c,getAssemblyViewStackAddressInfo:u,getSelectedCallNodePath:d,getSelectedCallNodeIndex:f,getExpandedCallNodePaths:p,getExpandedCallNodeIndexes:h,getSampleIndexToNonInvertedCallNodeIndexForFilteredThread:m,getSampleSelectedStatesInFilteredThread:g,getTreeOrderComparatorInFilteredThread:T,getCallTree:R,getFunctionListTree:F,getSourceViewLineTimings:G,getAssemblyViewAddressTimings:B,getTracedTiming:Z,getTracedSelfAndTotalForSelectedCallNode:X,getStackTimingByDepth:D,getSameWidthsIndexToTimestampMap:re,getFilteredCallNodeMaxDepthPlusOne:S,getFlameGraphTiming:A,getRightClickedCallNodeIndex:M}}var Dh=ce(Kt());function l_(e){let t=(0,Dh.createSelector)(Ct,e.getRawThread,e.getIsNetworkChartEmptyInFullRange,e.getJsTracerTable,(n,o,a,i)=>{if(o.processType==="comparison")return["calltree"];let s=ro;a&&(s=s.filter(f=>f!=="network-chart")),i||(s=s.filter(f=>f!=="js-tracer"));let{samples:l,jsAllocations:c,nativeAllocations:u}=o;return[l,c,u].some(f=>eo(f==null?void 0:f.stack,n))||(s=s.filter(f=>!no.includes(f))),s}),r=(0,Dh.createSelector)(e.getUserTimingMarkerTiming,e.getStackTimingByDepth,(n,o)=>[...n,...o]);return{getUsefulTabs:t,getCombinedTimingRows:r}}xe();var Bh={},H3=(0,c_.default)(e=>{let t=new Set((""+e).split(",").map(r=>+r));return d_(t,e)},{limit:5}),u_=e=>{if(e in Bh)return Bh[e];let r=d_(new Set([e]));return Bh[e]=r,r},ht=e=>{let t=null,r=null;return typeof e=="number"?t=e:r=e,t!==null?u_(t):(r=W(r),Uh(ut(r),r))},Uh=(e,t=new Set((""+e).split(",").map(r=>+r)))=>t.size===1?u_(W(vn(t))):H3(e);function d_(e,t=ut(e)){let r=zk(e,t);return r={...r,...e_(r,t)},r={...r,...Kk(r,t)},r={...r,...s_(r,t)},r={...r,...l_(r)},r}var Rr=(()=>{let e=ht(0),t={};for(let n in e)t[n]=o=>ht(Je(o))[n](o);return t})(),V3=(()=>{let e=(0,Gs.createSelector)(Rr.getSelectedCallNodePath,Rr.getFilteredThread,(o,{stringTable:a,funcTable:i})=>{if(!o.length)return"";let s=qc(o);return a.getString(i.name[s])}),t=(0,Gs.createSelector)(Rr.getSelectedCallNodePath,Rr.getFilteredThread,(o,{funcTable:a})=>{if(!o.length)return!1;let i=qc(o);return a.isJS[i]}),r=(0,Gs.createSelector)(Rr.getSelectedCallNodePath,Rr.getFilteredThread,An,(o,{stringTable:a,funcTable:i,resourceTable:s},l)=>o.length?bs(qc(o),i,s,a,l):""),n=(0,Gs.createSelector)(Rr.getSelectedCallNodePath,Rr.getCallNodeInfo,nt,Rr.getPreviewFilteredCtssSamples,Rr.getPreviewFilteredCtssSampleCategoriesAndSubcategories,CS);return{getName:e,getIsJS:t,getLib:r,getTimingsForSidebar:n}})();xe();var Wh=(e,t)=>t.some(r=>e instanceof r),f_,p_;function j3(){return f_||(f_=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function q3(){return p_||(p_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Hh=new WeakMap,$h=new WeakMap,Wu=new WeakMap;function z3(e){let t=new Promise((r,n)=>{let o=()=>{e.removeEventListener("success",a),e.removeEventListener("error",i)},a=()=>{r(Gu(e.result)),o()},i=()=>{n(e.error),o()};e.addEventListener("success",a),e.addEventListener("error",i)});return Wu.set(t,e),t}function K3(e){if(Hh.has(e))return;let t=new Promise((r,n)=>{let o=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",i),e.removeEventListener("abort",i)},a=()=>{r(),o()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",a),e.addEventListener("error",i),e.addEventListener("abort",i)});Hh.set(e,t)}var Vh={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return Hh.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Gu(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function y_(e){Vh=e(Vh)}function Z3(e){return q3().includes(e)?function(...t){return e.apply(jh(this),t),Gu(this.request)}:function(...t){return Gu(e.apply(jh(this),t))}}function J3(e){return typeof e=="function"?Z3(e):(e instanceof IDBTransaction&&K3(e),Wh(e,j3())?new Proxy(e,Vh):e)}function Gu(e){if(e instanceof IDBRequest)return z3(e);if($h.has(e))return $h.get(e);let t=J3(e);return t!==e&&($h.set(e,t),Wu.set(t,e)),t}var jh=e=>Wu.get(e);var Y3=["get","getKey","getAll","getAllKeys","count"],X3=["put","add","delete","clear"],Gh=new Map;function h_(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Gh.get(t))return Gh.get(t);let r=t.replace(/FromIndex$/,""),n=t!==r,o=X3.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||Y3.includes(r)))return;let a=async function(i,...s){let l=this.transaction(i,o?"readwrite":"readonly"),c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),o&&l.done]))[0]};return Gh.set(t,a),a}y_(e=>({...e,get:(t,r,n)=>h_(t,r)||e.get(t,r,n),has:(t,r)=>!!h_(t,r)||e.has(t,r)}));var Q3=["continue","continuePrimaryKey","advance"],m_={},qh=new WeakMap,b_=new WeakMap,eG={get(e,t){if(!Q3.includes(t))return e[t];let r=m_[t];return r||(r=m_[t]=function(...n){qh.set(this,b_.get(this)[t](...n))}),r}};async function*tG(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;let r=new Proxy(t,eG);for(b_.set(r,t),Wu.set(r,jh(t));t;)yield r,t=await(qh.get(r)||t.continue()),qh.delete(r)}function g_(e,t){return t===Symbol.asyncIterator&&Wh(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Wh(e,[IDBIndex,IDBObjectStore])}y_(e=>({...e,get(t,r,n){return g_(t,r)?tG:e.get(t,r,n)},has(t,r){return g_(t,r)||e.has(t,r)}}));var nG=ce(Ir());function S_(e){return{type:"CHANGE_SELECTED_THREAD",selectedThreadIndexes:e}}var T_=!1;function zh(e){return T_||(T_=!0,ps({hitType:"event",eventCategory:"profile",eventAction:"call tree search string"})),{type:"CHANGE_CALL_TREE_SEARCH_STRING",searchString:e}}function Kh(e){return{type:"CHANGE_MARKER_SEARCH_STRING",searchString:e}}function x_(e,t){return t===e&&(t=t+1e-6),{type:"COMMIT_RANGE",start:e,end:t}}function Zh(e){return(t,r)=>{t({type:"POP_COMMITTED_RANGES",firstPoppedFilterIndex:e,committedRange:dr(r()).length!==e&&pr(r())})}}function qr(e,t){return(r,n)=>{let o=Uh(e),a=o.getRangeAndTransformFilteredThread(n()),i=o.getCallNodeInfo(n());r({type:"ADD_TRANSFORM_TO_STACK",threadsKey:e,transform:t,transformedThread:a,callNodeInfo:i}),ps({hitType:"event",eventCategory:"profile",eventAction:"add transform",eventLabel:t.type})}}function aG(){let e=[];for(let n=0;n<10;n++)e.push(""+n);let t=97,r=65;for(let n=0;n<26;n++)e.push(String.fromCharCode(t+n)),e.push(String.fromCharCode(r+n));return e}function Xa(e){if(!e)throw new Error("assert failed")}var Ws=class e{index;timestamp;_children=null;constructor(t,r){this.index=t,this.timestamp=r}nameForTimestamp(t,r,n){let o=this.timestamp;if(t<o||t>r)throw new Error("out of range");if(t===o)return n;this._children===null&&(this._children=[new e(0,o),new e(iG-1,r)]);let a=Bc(this._children,t,m=>m.timestamp)-1;Xa(a>=0),Xa(a+1<this._children.length);let i=this._children[a],s=this._children[a+1];Xa(t>=i.timestamp),Xa(t<s.timestamp);let l=i.index,c=s.index,u=c-l,d=s.timestamp;if(u===1)return i.nameForTimestamp(t,d,n+Jh[l]);let f=i.timestamp,p=t-f,h=d-f,y=l+1+Math.floor(p/h*(u-1));Xa(y>l),Xa(y<c);let b=new e(y,t);return this._children.splice(a+1,0,b),n+Jh[y]}},Jh=aG(),iG=Jh.length,Hu=class{_rootRangeStart;_rootRangeEnd;_rootRangeLength;_mainTree;_beforeBuckets=new Map;_afterBuckets=new Map;_nameToTimestamp=new Map;constructor(t){this._rootRangeStart=t.start,this._rootRangeEnd=t.end,this._rootRangeLength=t.end-t.start,this._mainTree=new Ws(0,t.start)}nameForTimestamp(t){for(let[n,o]of this._nameToTimestamp.entries())if(o===t)return n;let r;if(t===this._rootRangeStart)r="ts-0";else if(t===this._rootRangeEnd)r="ts-Z";else if(t<this._rootRangeStart){let n=this._rootRangeStart-t,o=this._getBucketNumber(n),a=this._getOrCreateBeforeBucket(o),i=this._getBeforeBucketEnd(o);r=a.nameForTimestamp(t,i,`ts<${o}`)}else if(t>this._rootRangeEnd){let n=t-this._rootRangeEnd,o=this._getBucketNumber(n),a=this._getOrCreateAfterBucket(o),i=this._getAfterBucketEnd(o);r=a.nameForTimestamp(t,i,`ts>${o}`)}else r=this._mainTree.nameForTimestamp(t,this._rootRangeEnd,"ts-");return this._nameToTimestamp.set(r,t),r}timestampForName(t){return this._nameToTimestamp.get(t)??null}timestampString(t){return on(t-this._rootRangeStart)}_getBucketNumber(t){let r=t/this._rootRangeLength;return r<=1?0:Math.ceil(Math.log2(r))}_getBeforeBucketStart(t){let r=Math.pow(2,t)*this._rootRangeLength;return this._rootRangeStart-r}_getBeforeBucketEnd(t){if(t===0)return this._rootRangeStart;let r=Math.pow(2,t-1)*this._rootRangeLength;return this._rootRangeStart-r}_getAfterBucketStart(t){if(t===0)return this._rootRangeEnd;let r=Math.pow(2,t-1)*this._rootRangeLength;return this._rootRangeEnd+r}_getAfterBucketEnd(t){let r=Math.pow(2,t)*this._rootRangeLength;return this._rootRangeEnd+r}_getOrCreateBeforeBucket(t){let r=this._beforeBuckets.get(t);if(!r){let n=this._getBeforeBucketStart(t);r=new Ws(0,n),this._beforeBuckets.set(t,r)}return r}_getOrCreateAfterBucket(t){let r=this._afterBuckets.get(t);if(!r){let n=this._getAfterBucketStart(t);r=new Ws(0,n),this._afterBuckets.set(t,r)}return r}};var Vu=class{_map=new Map;handleForThreadIndex(t){let r="t-"+t;return this._map.has(r)||this._map.set(r,t),r}threadIndexForHandle(t){let r=this._map.get(t);if(r===void 0)throw new Error(`Unknown thread ${t}`);return r}threadIndexesForHandle(t){let n=t.split(",").map(o=>o.trim()).map(o=>{let a=this._map.get(o);if(a===void 0)throw new Error(`Unknown thread ${o}`);return a});return new Set(n)}handleForThreadIndexes(t){return Array.from(t).sort((n,o)=>n-o).map(n=>this.handleForThreadIndex(n)).join(",")}handleForKey(t){return typeof t=="number"?this.handleForThreadIndex(t):t.split(",").map(Number).sort((n,o)=>n-o).map(n=>this.handleForThreadIndex(n)).join(",")}};function Ko(e){return`f-${e}`}function ju(e,t){let r=/^f-(\d+)$/.exec(e);if(r===null)throw new Error(`Unknown function ${e}`);let n=Number(r[1]);if(!Number.isInteger(n)||n<0||n>=t)throw new Error(`Unknown function ${e}`);return n}var qu=class{_handleToMarker=new Map;_nextHandleId=1;handleForMarker(t,r){let n=ut(t);for(let[a,i]of this._handleToMarker.entries())if(i.threadsKey===n&&i.markerIndex===r)return a;let o="m-"+this._nextHandleId++;return this._handleToMarker.set(o,{threadIndexes:t,threadsKey:n,markerIndex:r}),o}markerForHandle(t){let r=this._handleToMarker.get(t);if(r===void 0)throw new Error(`Unknown marker ${t}`);return r}};var yA=ce(require("fs"));function sG(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var I_=sG();var B_=ce(w_());var lG=(e={phase:"INITIALIZING"},t)=>{switch(t.type){case"TEMPORARY_ERROR":return{phase:"INITIALIZING",additionalData:{message:t.error.message,attempt:t.error.attempt}};case"FATAL_ERROR":return{phase:"FATAL_ERROR",error:t.error};case"WAITING_FOR_PROFILE_FROM_BROWSER":case"WAITING_FOR_PROFILE_FROM_URL":case"WAITING_FOR_PROFILE_FROM_FILE":return{phase:"INITIALIZING"};case"ROUTE_NOT_FOUND":return{phase:"ROUTE_NOT_FOUND"};case"REVERT_TO_PRE_PUBLISHED_STATE":case"SANITIZED_PROFILE_PUBLISHED":return{phase:"TRANSITIONING_FROM_STALE_PROFILE"};case"PROFILE_LOADED":return{phase:"PROFILE_LOADED"};case"DATA_RELOAD":return{phase:"DATA_RELOAD"};case"RECEIVE_ZIP_FILE":case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return{phase:"DATA_LOADED"};default:return e}},cG=(e="initial-load",t)=>{switch(t.type){case"START_FETCHING_PROFILES":return"loading-profile";case"ROUTE_NOT_FOUND":case"FATAL_ERROR":case"URL_SETUP_DONE":return"done";default:return e}},uG=(e=!1,t)=>t.type==="HAS_ZOOMED_VIA_MOUSEWHEEL"?!0:e;function dG(){let e={};return ro.forEach(t=>e[t]=!1),e.calltree=!0,e["marker-table"]=!0,e}var fG=(e=dG(),t)=>{if(t.type==="CHANGE_SIDEBAR_OPEN_STATE"){let{tab:r,isOpen:n}=t;return{...e,[r]:n}}else return e},pG=(e="calltree",t)=>{switch(t.type){case"SELECT_TRACK":case"CHANGE_SELECTED_TAB":return t.selectedTab!=="network-chart"?t.selectedTab:e;case"FOCUS_CALL_TREE":return no.includes(e)?e:"calltree";default:return e}},hG=(e={},t)=>{if(t.type==="UPDATE_TRACK_THREAD_HEIGHT"){let r={...e};return r[t.threadsKey]=t.height,r}else return e},mG=(e=!1,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return!0;case"DISMISS_NEWLY_PUBLISHED":return!1;default:return e}},gG=(e=!1,t)=>{switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1;default:return e}},yG=(e=!1,t)=>{switch(t.type){case"REGISTER_DRAG_AND_DROP_OVERLAY":return!0;case"UNREGISTER_DRAG_AND_DROP_OVERLAY":return!1;default:return e}},bG=(e=!1,t)=>t.type==="ENABLE_EVENT_DELAY_TRACKS"?!0:e,TG=(e=!1,t)=>t.type==="ENABLE_EXPERIMENTAL_CPU_GRAPHS"?!0:e,SG=(e=!1,t)=>t.type==="ENABLE_EXPERIMENTAL_PROCESS_CPU_TRACKS"?!0:e,xG=(e=null,t)=>t.type==="SET_CURRENT_PROFILE_UPLOADED_INFORMATION"?t.uploadedProfileInformation:e,IG=_t({eventDelayTracks:bG,cpuGraphs:TG,processCPUTracks:SG}),vG=(e={status:"NO_ATTEMPT"},t)=>t.type==="UPDATE_BROWSER_CONNECTION_STATUS"?t.browserConnectionStatus:e,wG=(e=new Map,t)=>{if(t.type==="TOGGLE_SIDEBAR_OPEN_CATEGORY"){let r=new Map(e),n=r.get(t.kind);return n===void 0&&(n=new Set),n.has(t.category)?n.delete(t.category):n.add(t.category),r.set(t.kind,n),r}else return e},kG=_t({view:lG,urlSetupPhase:cG,hasZoomedViaMousewheel:uG,isSidebarOpenPerPanel:fG,lastVisibleThreadTabSlug:pG,trackThreadHeights:hG,isNewlyPublished:mG,isDragAndDropDragging:gG,isDragAndDropOverlayRegistered:yG,experimental:IG,currentProfileUploadedInformation:xG,browserConnectionStatus:vG,sidebarOpenCategories:wG}),k_=kG;var _G=(e=new Map,t)=>{switch(t.type){case"ICON_HAS_LOADED":{let{icon:r,className:n}=t.iconWithClassName;return new Map([...e.entries(),[r,n]])}case"ICON_BATCH_ADD":{let r=new Map([...e.entries()]);for(let{icon:n,className:o}of t.icons)r.set(n,o);return r}default:return e}},__=_G;var C_=ce(Ir());xe();var CG=(e={phase:"NO_ZIP_FILE",zip:null,pathInZipFile:null},t)=>{switch(t.type){case"UPDATE_URL_STATE":return t.newUrlState&&t.newUrlState.pathInZipFile===null&&e.phase==="VIEW_PROFILE_IN_ZIP_FILE"?po(e,{phase:"LIST_FILES_IN_ZIP_FILE",zip:e.zip,pathInZipFile:null}):e;case"RECEIVE_ZIP_FILE":return po(e,{phase:"LIST_FILES_IN_ZIP_FILE",zip:t.zip,pathInZipFile:null});case"RETURN_TO_ZIP_FILE_LIST":case"DISMISS_PROCESS_PROFILE_FROM_ZIP_ERROR":return po(e,{phase:"LIST_FILES_IN_ZIP_FILE",zip:W(e.zip),pathInZipFile:null});case"PROCESS_PROFILE_FROM_ZIP_FILE":return po(e,{phase:"PROCESS_PROFILE_FROM_ZIP_FILE",zip:W(e.zip),pathInZipFile:t.pathInZipFile});case"FILE_NOT_FOUND_IN_ZIP_FILE":return po(e,{phase:"FILE_NOT_FOUND_IN_ZIP_FILE",zip:W(e.zip),pathInZipFile:t.pathInZipFile});case"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE":return po(e,{phase:"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE",zip:W(e.zip),pathInZipFile:W(e.pathInZipFile)});case"FATAL_ERROR":return e.phase==="NO_ZIP_FILE"||e.phase==="LIST_FILES_IN_ZIP_FILE"?e:po(e,{phase:"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE",zip:W(e.zip),pathInZipFile:W(e.pathInZipFile)});case"VIEW_FULL_PROFILE":return e.phase==="NO_ZIP_FILE"?e:po(e,{phase:"VIEW_PROFILE_IN_ZIP_FILE",zip:W(e.zip),pathInZipFile:W(e.pathInZipFile)});case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"WAITING_FOR_PROFILE_FROM_FILE":return{phase:"NO_ZIP_FILE",zip:null,pathInZipFile:null};default:return e}},EG=(e=null,t)=>{switch(t.type){case"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE":case"FATAL_ERROR":return t.error;default:return e}};function po(e,t){let r=e.phase;if(r===t.phase)return t;let n;switch(r){case"NO_ZIP_FILE":n=["LIST_FILES_IN_ZIP_FILE","PROCESS_PROFILE_FROM_ZIP_FILE"];break;case"LIST_FILES_IN_ZIP_FILE":n=["PROCESS_PROFILE_FROM_ZIP_FILE","FILE_NOT_FOUND_IN_ZIP_FILE"];break;case"PROCESS_PROFILE_FROM_ZIP_FILE":n=["VIEW_PROFILE_IN_ZIP_FILE","FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE","LIST_FILES_IN_ZIP_FILE"];break;case"FILE_NOT_FOUND_IN_ZIP_FILE":n=["LIST_FILES_IN_ZIP_FILE"];break;case"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE":n=["LIST_FILES_IN_ZIP_FILE"];break;case"VIEW_PROFILE_IN_ZIP_FILE":n=["LIST_FILES_IN_ZIP_FILE"];break;default:throw new Error(`Unhandled ZipFileState "${r}"`)}if(!n.includes(t.phase))throw console.error("Previous ZipFileState:",e),console.error("Next ZipFileState:",t),new Error(C_.oneLine`
671
+ `);return q}),d=(0,Ie.createSelector)(l,V=>V.map((te,q)=>q)),f=V=>(te,q)=>tu(te,q,V),p=(0,Ie.createSelector)(u,d,pr,(V,te,q)=>{let{start:Q,end:Te}=q;return _p(V,te,Q,Te)}),h=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-overview",Do),y=(0,Ie.createSelector)(u,p,f(oI)),b=(0,Ie.createSelector)(u,p,s,(V,te,q)=>{let Q=q.length>0?"Jank":"BHR-detected hang";return f(Te=>!!(Te.data&&Te.data.type===Q))(V,te)}),g=(0,Ie.createSelector)(u,p,ft,zI,Rt,nt,ks),m=(0,Ie.createSelector)(u,g,Wo,(V,te,q)=>{if(!q)return te;let{selectionStart:Q,selectionEnd:Te}=q;return _p(V,te,Q,Te)}),T=(0,Ie.createSelector)(l,V=>V.every(te=>!En(te))),S=(0,Ie.createSelector)(u,p,f(En)),I=(0,Ie.createSelector)(u,p,f(nI)),v=(0,Ie.createSelector)(u,S,ft,KI,Rt,nt,ks),w=(0,Ie.createSelector)(l,V=>V.every(te=>En(te))),k=(0,Ie.createSelector)(u,g,Cr,ft,(V,te,q,Q)=>Do(V,te,q,Q,"marker-chart",Cp(Q))),E=(0,Ie.createSelector)(u,m,Cr,ft,(V,te,q,Q)=>Do(V,te,q,Q,"marker-table",Cp(Q))),R=(0,Ie.createSelector)(u,Cr,ft,nt,Rt,()=>"tooltipLabel",to),F=(0,Ie.createSelector)(u,Cr,ft,nt,Rt,()=>"tableLabel",to),G=(0,Ie.createSelector)(u,Cr,ft,nt,Rt,()=>"chartLabel",to),B=(0,Ie.createSelector)(u,Cr,ft,nt,Rt,()=>"copyLabel",to),Z=(0,Ie.createSelector)(u,ft,Rt,eI),X=(0,Ie.createSelector)(u,k,nt,Xk),_e=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-fileio",()=>aI,Do),D=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-memory",Do),re=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-ipc",Do),N=(0,Ie.createSelector)(u,S,()=>null,Hu),A=(0,Ie.createSelector)(u,I,()=>null,Hu),M=(0,Ie.createSelector)(u,p,iI),P=(0,Ie.createSelector)(c,V=>ZI(V,t),(V,te)=>te===null||te>=V?null:te),$=V=>{let te=u(V),q=P(V);return q===null?null:te(q)},J=V=>e.getViewOptions(V).selectedNetworkMarker,H=V=>{let te=u(V),q=J(V);return q===null?null:te(q)},z=(0,Ie.createSelector)(e_,V=>V!==null&&V.threadsKey===t?V.markerIndex:null),se=(0,Ie.createSelector)(u,z,(V,te)=>typeof te=="number"?V(te):null),de=(0,Ie.createSelector)(Gr,({hoveredMarker:V})=>V!==null&&V.threadsKey===t?V.markerIndex:null),ue={},fe=(V,te)=>{let q=V.name;return ue[q]||(ue[q]={}),ue[q][te]||(ue[q][te]=be(V,te)),ue[q][te]};function be(V,te){let q=(0,Ie.createSelector)(l,Rt,(Ne,qe)=>{if(V.graphs===void 0)throw new Error(`No graphs for marker ${te}. This shouldn't happen.`);let lt=[],et=[],{graphs:br,name:Qt}=V,qt=br.map(gt=>(et.push([]),gt.key)),Ot=qe.getString(te);return Ne.forEach((gt,zt)=>{let Lt=gt.data;if(Lt&&gt.name===Ot&&Lt.type===Qt&&qt.every(er=>er in Lt)){lt.push(zt);for(let er=0;er<qt.length;++er){let Tr=Lt[qt[er]];et[er].push(Tr)}}}),{numbersPerLine:et,markerIndexes:lt}}),Q=(0,Ie.createSelector)(q,pr,u,(Ne,qe,lt)=>tp({time:Ne.markerIndexes.map(et=>lt(et).start),length:Ne.markerIndexes.length},qe.start,qe.end)),Te=(0,Ie.createSelector)(q,Q,(Ne,qe)=>{let[lt,et]=qe,{numbersPerLine:br}=Ne;if(lt>=et)return{minNumber:0,maxNumber:0};let Qt=1/0,qt=-1/0;for(let Ot=lt;Ot<et;Ot++)for(let gt=0;gt<br.length;gt++){let zt=br[gt][Ot];zt<Qt&&(Qt=zt),zt>qt&&(qt=zt)}return{minNumber:Qt,maxNumber:qt}});return{getCollectedCustomMarkerSamples:q,getCommittedRangeMarkerSampleRange:Q,getCommittedRangeMarkerSampleValueBounds:Te}}return{getMarkerGetter:u,getTimelineJankMarkerIndexes:b,getDerivedMarkerInfo:o,getMarkerIndexToRawMarkerIndexes:i,getFullMarkerList:l,getFullMarkerListIndexes:d,getMarkerListLength:c,getNetworkMarkerIndexes:S,getSearchFilteredNetworkMarkerIndexes:v,getAreMarkerPanelsEmptyInFullRange:w,getMarkerTableMarkerIndexes:E,getMarkerChartMarkerIndexes:k,getMarkerChartLabelGetter:G,getMarkerTooltipLabelGetter:R,getMarkerTableLabelGetter:F,getMarkerLabelToCopyGetter:B,getMarkerSearchTermGetter:Z,getMarkerChartTimingAndBuckets:X,getCommittedRangeFilteredMarkerIndexes:p,getTimelineOverviewMarkerIndexes:h,getTimelineVerticalMarkerIndexes:y,getTimelineFileIoMarkerIndexes:_e,getTimelineMemoryMarkerIndexes:D,getTimelineIPCMarkerIndexes:re,getNetworkTrackTiming:N,getRangeFilteredScreenshotsById:M,getSearchFilteredMarkerIndexes:g,getPreviewFilteredMarkerIndexes:m,getSelectedMarkerIndex:P,getSelectedMarker:$,getSelectedNetworkMarkerIndex:J,getSelectedNetworkMarker:H,getIsNetworkChartEmptyInFullRange:T,getUserTimingMarkerIndexes:I,getUserTimingMarkerTiming:A,getRightClickedMarkerIndex:z,getRightClickedMarker:se,getHoveredMarkerIndex:de,getMarkerTrackSelectors:fe}}var Ae=ce(Kt());function n_(e,t,r,n,o){let a=r.getCallNodeTable(),{prefix:i,subtreeRangeEnd:s,depth:l}=a,c=Array.from({length:n},()=>{let m={start:[],end:[],sameWidthsStart:[],sameWidthsEnd:[],callNode:[],length:0};return"argumentValues"in e&&(m.argumentValues=[]),m}),u=[];if(e.length===0)return{timings:c,sameWidthsIndexToTimestampMap:u};let d=-1,f=-1,p=new Float64Array(n),h=new Float64Array(n),y=new Int32Array(n),b=0;for(let m=0;m<e.length;m++){let T=t[m]??-1;if(T===d)continue;let S=-1;if("argumentValues"in e&&e.argumentValues!==void 0){let v=e.argumentValues[m];v!==null&&(S=v)}let I=e.time[m];for(;f!==-1&&(T<d||T>=s[d]);){let v=p[f],w=h[f],k=c[f],E=k.length++;k.start[E]=v,k.end[E]=I,k.sameWidthsStart[E]=w,k.sameWidthsEnd[E]=b,k.callNode[E]=d,k.argumentValues&&(k.argumentValues[E]=y[f]),d=i[d],f--}if(T!==-1){let v=l[T];for(;f<v;)f++,p[f]=I,h[f]=b,"argumentValues"in e&&e.argumentValues!==void 0&&(y[f]=S)}d=T,u[b]=I,b++}let g=e.time[e.length-1]+o;for(;f!==-1;){let m=c[f],T=m.length++,S=p[f],I=h[f];m.start[T]=S,m.end[T]=g,m.sameWidthsStart[T]=I,m.sameWidthsEnd[T]=b,m.callNode[T]=d,m.argumentValues&&(m.argumentValues[T]=y[f]),d=i[d],f--}return u[b]=g,{timings:c,sameWidthsIndexToTimestampMap:u}}function o_(e,t,r){if(e.length===0)return[[]];let{func:n,nextSibling:o,subtreeRangeEnd:a,maxDepth:i}=e,s=t.name,l=Array.from({length:i+1},()=>[]),c=new Int32Array(i+1),u=0,d=0;e:for(;;){let f=l[d],p=f.length;for(let m=u;m!==-1;m=o[m]){let T=f.length;if(p===T)f.push(m);else{let S=n[m],I=r.getString(s[S]),v=mS(f,I,w=>r.getString(s[n[w]]),p,T);f.splice(v,0,m)}}let h=d,y=f,b=c[h],g=y[b];for(;a[g]===g+1;){for(b++,c[h]=b;b===y.length;){if(h===0)break e;h--,y=l[h],b=c[h]}g=y[b]}c[h]=b+1,u=g+1,d=h+1}return l}function a_(e,t,r){let{total:n,self:o,rootTotalSummary:a}=r,{prefix:i}=t,s=[],l=new Float32Array(t.length),c=Math.abs;for(let u=0;u<e.length;u++){let d=e[u],f=[],p=[],h=[],y=[],b=0,g=-1;for(let m=0;m<d.length;m++){let T=d[m],S=n[T];if(S===0)continue;let I=i[T];I!==g&&(b=l[I],g=I),l[T]=b;let v=c(S/a),w=c(o[T]/a),k=b+v;f.push(b),p.push(k),h.push(w),y.push(T),b=k}s[u]={start:f,end:p,selfRelative:h,callNode:y,length:y.length}}return s}var i_=ce(Kt());var s_=(0,i_.createSelector)(Gr,e=>e.rightClickedCallNode);var Uh=ce(Ia()),l_=(0,Ae.createSelectorCreator)(Ae.defaultMemoize,{maxSize:2}),z3=(0,Uh.default)(ES,{limit:2}),K3=(0,Uh.default)(jc,{limit:2});function c_(e,t){let r=(0,Ae.createSelector)(e.getThread,Ho,(P,$)=>{let{time:J}=P.samples;return J.length===0?null:{start:J[0],end:J[J.length-1]+$}}),n=l_(P=>e.getFilteredThread(P).stackTable,P=>e.getFilteredThread(P).frameTable,_r,z3),o=l_(n,_r,P=>e.getFilteredThread(P).funcTable.length,K3),a=P=>Es(P)?o(P):n(P),i=P=>n(P).getCallNodeTable(),s=(0,Ae.createSelector)(i,RS),l=(0,Ae.createSelector)(e.getFilteredThread,so,({stackTable:P,frameTable:$,funcTable:J},H)=>H===null?null:vu(P,$,J,H)),c=(0,Ae.createSelector)(e.getFilteredThread,$a,({nativeSymbols:P},$)=>$===null?null:P.address.findIndex((J,H)=>J===$.address&&P.libIndex[H]===$.libIndex)),u=(0,Ae.createSelector)(e.getFilteredThread,c,({stackTable:P,frameTable:$,funcTable:J},H)=>H===null?null:ku(P,$,J,H)),d=(0,Ae.createSelector)(e.getViewOptions,Es,(P,$)=>$?P.selectedInvertedCallNodePath:P.selectedNonInvertedCallNodePath),f=(0,Ae.createSelector)(a,d,(P,$)=>P.getCallNodeIndexFromPath($)),p=(0,Ae.createSelector)(e.getViewOptions,Es,(P,$)=>$?P.expandedInvertedCallNodePaths:P.expandedNonInvertedCallNodePaths),h=(0,Ae.createSelector)(a,p,(P,$)=>Array.from($).map(J=>P.getCallNodeIndexFromPath(J))),y=(0,Ae.createSelector)(P=>e.getPreviewFilteredCtssSamples(P).stack,P=>a(P).getStackIndexToNonInvertedCallNodeIndex(),qc),b=(0,Ae.createSelector)(P=>e.getFilteredCtssSamples(P).stack,P=>a(P).getStackIndexToNonInvertedCallNodeIndex(),qc),g=(0,Ae.createSelector)(P=>e.getFilteredThread(P).samples.stack,P=>a(P).getStackIndexToNonInvertedCallNodeIndex(),qc),m=(0,Ae.createSelector)(g,a,f,(P,$,J)=>AS($,P,J)),T=(0,Ae.createSelector)(g,a,HS),S=(0,Ae.createSelector)(e.getFilteredCtssSamples,a,BS),I=(0,Ae.createSelector)(e.getUnfilteredCtssSamples,P=>P.weightType||"samples"),v=(0,Ae.createSelector)(e.getPreviewFilteredCtssSamples,y,a,(P,$,J)=>Eu(P,$,J.getCallNodeTable().length)),w=(0,Ae.createSelector)(a,v,Os),k=(0,Ae.createSelector)(a,v,lh),E=(0,Ae.createSelector)(i,s,v,P=>e.getFilteredThread(P).funcTable.length,Lv),R=(0,Ae.createSelector)(e.getFilteredThread,a,nt,e.getPreviewFilteredCtssSamples,w,I,An,Ls),F=(0,Ae.createSelector)(e.getFilteredThread,o,nt,e.getPreviewFilteredCtssSamples,E,I,(P,$,J,H,z,se)=>Ls(P,$,J,H,{type:"FUNCTION_LIST",timings:z},se)),G=(0,Ae.createSelector)(l,e.getPreviewFilteredCtssSamples,wu),B=(0,Ae.createSelector)(u,e.getPreviewFilteredCtssSamples,_u),Z=(0,Ae.createSelector)(e.getPreviewFilteredCtssSamples,y,a,Ho,(P,$,J,H)=>{let z=Uv(P,$,J.getCallNodeTable().length,H);return z===null?null:Os(J,z)}),X=(0,Ae.createSelector)(f,a,Z,(P,$,J)=>P===null||J===null?null:Fv(P,$,J)),_e=(0,Ae.createSelector)(e.getFilteredCtssSamples,b,a,S,Ho,n_),D=P=>_e(P).timings,re=P=>_e(P).sameWidthsIndexToTimestampMap,N=(0,Ae.createSelector)(P=>a(P).getCallNodeTable(),P=>e.getFilteredThread(P).funcTable,P=>e.getFilteredThread(P).stringTable,o_),A=(0,Ae.createSelector)(N,P=>a(P).getCallNodeTable(),k,a_),M=(0,Ae.createSelector)(s_,a,(P,$)=>P!==null&&t===P.threadsKey?$.getCallNodeIndexFromPath(P.callNodePath):null);return{unfilteredSamplesRange:r,getWeightTypeForCallTree:I,getCallNodeInfo:a,getSourceViewStackLineInfo:l,getAssemblyViewNativeSymbolIndex:c,getAssemblyViewStackAddressInfo:u,getSelectedCallNodePath:d,getSelectedCallNodeIndex:f,getExpandedCallNodePaths:p,getExpandedCallNodeIndexes:h,getSampleIndexToNonInvertedCallNodeIndexForFilteredThread:g,getSampleSelectedStatesInFilteredThread:m,getTreeOrderComparatorInFilteredThread:T,getCallTree:R,getFunctionListTree:F,getSourceViewLineTimings:G,getAssemblyViewAddressTimings:B,getTracedTiming:Z,getTracedSelfAndTotalForSelectedCallNode:X,getStackTimingByDepth:D,getSameWidthsIndexToTimestampMap:re,getFilteredCallNodeMaxDepthPlusOne:S,getFlameGraphTiming:A,getRightClickedCallNodeIndex:M}}var $h=ce(Kt());function u_(e){let t=(0,$h.createSelector)(Ct,e.getRawThread,e.getIsNetworkChartEmptyInFullRange,e.getJsTracerTable,(n,o,a,i)=>{if(o.processType==="comparison")return["calltree"];let s=ro;a&&(s=s.filter(f=>f!=="network-chart")),i||(s=s.filter(f=>f!=="js-tracer"));let{samples:l,jsAllocations:c,nativeAllocations:u}=o;return[l,c,u].some(f=>eo(f==null?void 0:f.stack,n))||(s=s.filter(f=>!no.includes(f))),s}),r=(0,$h.createSelector)(e.getUserTimingMarkerTiming,e.getStackTimingByDepth,(n,o)=>[...n,...o]);return{getUsefulTabs:t,getCombinedTimingRows:r}}xe();var Gh={},Z3=(0,d_.default)(e=>{let t=new Set((""+e).split(",").map(r=>+r));return p_(t,e)},{limit:5}),f_=e=>{if(e in Gh)return Gh[e];let r=p_(new Set([e]));return Gh[e]=r,r},ht=e=>{let t=null,r=null;return typeof e=="number"?t=e:r=e,t!==null?f_(t):(r=W(r),Wh(ut(r),r))},Wh=(e,t=new Set((""+e).split(",").map(r=>+r)))=>t.size===1?f_(W(vn(t))):Z3(e);function p_(e,t=ut(e)){let r=Zk(e,t);return r={...r,...r_(r,t)},r={...r,...Jk(r,t)},r={...r,...c_(r,t)},r={...r,...u_(r)},r}var Rr=(()=>{let e=ht(0),t={};for(let n in e)t[n]=o=>ht(Je(o))[n](o);return t})(),J3=(()=>{let e=(0,Ws.createSelector)(Rr.getSelectedCallNodePath,Rr.getFilteredThread,(o,{stringTable:a,funcTable:i})=>{if(!o.length)return"";let s=zc(o);return a.getString(i.name[s])}),t=(0,Ws.createSelector)(Rr.getSelectedCallNodePath,Rr.getFilteredThread,(o,{funcTable:a})=>{if(!o.length)return!1;let i=zc(o);return a.isJS[i]}),r=(0,Ws.createSelector)(Rr.getSelectedCallNodePath,Rr.getFilteredThread,An,(o,{stringTable:a,funcTable:i,resourceTable:s},l)=>o.length?Ts(zc(o),i,s,a,l):""),n=(0,Ws.createSelector)(Rr.getSelectedCallNodePath,Rr.getCallNodeInfo,nt,Rr.getPreviewFilteredCtssSamples,Rr.getPreviewFilteredCtssSampleCategoriesAndSubcategories,PS);return{getName:e,getIsJS:t,getLib:r,getTimingsForSidebar:n}})();xe();var jh=(e,t)=>t.some(r=>e instanceof r),h_,m_;function Y3(){return h_||(h_=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function X3(){return m_||(m_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var qh=new WeakMap,Hh=new WeakMap,ju=new WeakMap;function Q3(e){let t=new Promise((r,n)=>{let o=()=>{e.removeEventListener("success",a),e.removeEventListener("error",i)},a=()=>{r(Vu(e.result)),o()},i=()=>{n(e.error),o()};e.addEventListener("success",a),e.addEventListener("error",i)});return ju.set(t,e),t}function eG(e){if(qh.has(e))return;let t=new Promise((r,n)=>{let o=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",i),e.removeEventListener("abort",i)},a=()=>{r(),o()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",a),e.addEventListener("error",i),e.addEventListener("abort",i)});qh.set(e,t)}var zh={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return qh.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Vu(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function T_(e){zh=e(zh)}function tG(e){return X3().includes(e)?function(...t){return e.apply(Kh(this),t),Vu(this.request)}:function(...t){return Vu(e.apply(Kh(this),t))}}function rG(e){return typeof e=="function"?tG(e):(e instanceof IDBTransaction&&eG(e),jh(e,Y3())?new Proxy(e,zh):e)}function Vu(e){if(e instanceof IDBRequest)return Q3(e);if(Hh.has(e))return Hh.get(e);let t=rG(e);return t!==e&&(Hh.set(e,t),ju.set(t,e)),t}var Kh=e=>ju.get(e);var nG=["get","getKey","getAll","getAllKeys","count"],oG=["put","add","delete","clear"],Vh=new Map;function g_(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Vh.get(t))return Vh.get(t);let r=t.replace(/FromIndex$/,""),n=t!==r,o=oG.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||nG.includes(r)))return;let a=async function(i,...s){let l=this.transaction(i,o?"readwrite":"readonly"),c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),o&&l.done]))[0]};return Vh.set(t,a),a}T_(e=>({...e,get:(t,r,n)=>g_(t,r)||e.get(t,r,n),has:(t,r)=>!!g_(t,r)||e.has(t,r)}));var aG=["continue","continuePrimaryKey","advance"],y_={},Zh=new WeakMap,S_=new WeakMap,iG={get(e,t){if(!aG.includes(t))return e[t];let r=y_[t];return r||(r=y_[t]=function(...n){Zh.set(this,S_.get(this)[t](...n))}),r}};async function*sG(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;let r=new Proxy(t,iG);for(S_.set(r,t),ju.set(r,Kh(t));t;)yield r,t=await(Zh.get(r)||t.continue()),Zh.delete(r)}function b_(e,t){return t===Symbol.asyncIterator&&jh(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&jh(e,[IDBIndex,IDBObjectStore])}T_(e=>({...e,get(t,r,n){return b_(t,r)?sG:e.get(t,r,n)},has(t,r){return b_(t,r)||e.has(t,r)}}));var cG=ce(Ir());function I_(e){return{type:"CHANGE_SELECTED_THREAD",selectedThreadIndexes:e}}var x_=!1;function Jh(e){return x_||(x_=!0,hs({hitType:"event",eventCategory:"profile",eventAction:"call tree search string"})),{type:"CHANGE_CALL_TREE_SEARCH_STRING",searchString:e}}function Yh(e){return{type:"CHANGE_MARKER_SEARCH_STRING",searchString:e}}function v_(e,t){return t===e&&(t=t+1e-6),{type:"COMMIT_RANGE",start:e,end:t}}function Xh(e){return(t,r)=>{t({type:"POP_COMMITTED_RANGES",firstPoppedFilterIndex:e,committedRange:dr(r()).length!==e&&pr(r())})}}function qr(e,t){return(r,n)=>{let o=Wh(e),a=o.getRangeAndTransformFilteredThread(n()),i=o.getCallNodeInfo(n());r({type:"ADD_TRANSFORM_TO_STACK",threadsKey:e,transform:t,transformedThread:a,callNodeInfo:i}),hs({hitType:"event",eventCategory:"profile",eventAction:"add transform",eventLabel:t.type})}}function dG(){let e=[];for(let n=0;n<10;n++)e.push(""+n);let t=97,r=65;for(let n=0;n<26;n++)e.push(String.fromCharCode(t+n)),e.push(String.fromCharCode(r+n));return e}function Qa(e){if(!e)throw new Error("assert failed")}var Hs=class e{index;timestamp;_children=null;constructor(t,r){this.index=t,this.timestamp=r}nameForTimestamp(t,r,n){let o=this.timestamp;if(t<o||t>r)throw new Error("out of range");if(t===o)return n;this._children===null&&(this._children=[new e(0,o),new e(fG-1,r)]);let a=Uc(this._children,t,g=>g.timestamp)-1;Qa(a>=0),Qa(a+1<this._children.length);let i=this._children[a],s=this._children[a+1];Qa(t>=i.timestamp),Qa(t<s.timestamp);let l=i.index,c=s.index,u=c-l,d=s.timestamp;if(u===1)return i.nameForTimestamp(t,d,n+Qh[l]);let f=i.timestamp,p=t-f,h=d-f,y=l+1+Math.floor(p/h*(u-1));Qa(y>l),Qa(y<c);let b=new e(y,t);return this._children.splice(a+1,0,b),n+Qh[y]}},Qh=dG(),fG=Qh.length,qu=class{_rootRangeStart;_rootRangeEnd;_rootRangeLength;_mainTree;_beforeBuckets=new Map;_afterBuckets=new Map;_nameToTimestamp=new Map;constructor(t){this._rootRangeStart=t.start,this._rootRangeEnd=t.end,this._rootRangeLength=t.end-t.start,this._mainTree=new Hs(0,t.start)}nameForTimestamp(t){for(let[n,o]of this._nameToTimestamp.entries())if(o===t)return n;let r;if(t===this._rootRangeStart)r="ts-0";else if(t===this._rootRangeEnd)r="ts-Z";else if(t<this._rootRangeStart){let n=this._rootRangeStart-t,o=this._getBucketNumber(n),a=this._getOrCreateBeforeBucket(o),i=this._getBeforeBucketEnd(o);r=a.nameForTimestamp(t,i,`ts<${o}`)}else if(t>this._rootRangeEnd){let n=t-this._rootRangeEnd,o=this._getBucketNumber(n),a=this._getOrCreateAfterBucket(o),i=this._getAfterBucketEnd(o);r=a.nameForTimestamp(t,i,`ts>${o}`)}else r=this._mainTree.nameForTimestamp(t,this._rootRangeEnd,"ts-");return this._nameToTimestamp.set(r,t),r}timestampForName(t){return this._nameToTimestamp.get(t)??null}timestampString(t){return on(t-this._rootRangeStart)}_getBucketNumber(t){let r=t/this._rootRangeLength;return r<=1?0:Math.ceil(Math.log2(r))}_getBeforeBucketStart(t){let r=Math.pow(2,t)*this._rootRangeLength;return this._rootRangeStart-r}_getBeforeBucketEnd(t){if(t===0)return this._rootRangeStart;let r=Math.pow(2,t-1)*this._rootRangeLength;return this._rootRangeStart-r}_getAfterBucketStart(t){if(t===0)return this._rootRangeEnd;let r=Math.pow(2,t-1)*this._rootRangeLength;return this._rootRangeEnd+r}_getAfterBucketEnd(t){let r=Math.pow(2,t)*this._rootRangeLength;return this._rootRangeEnd+r}_getOrCreateBeforeBucket(t){let r=this._beforeBuckets.get(t);if(!r){let n=this._getBeforeBucketStart(t);r=new Hs(0,n),this._beforeBuckets.set(t,r)}return r}_getOrCreateAfterBucket(t){let r=this._afterBuckets.get(t);if(!r){let n=this._getAfterBucketStart(t);r=new Hs(0,n),this._afterBuckets.set(t,r)}return r}};var zu=class{_map=new Map;handleForThreadIndex(t){let r="t-"+t;return this._map.has(r)||this._map.set(r,t),r}threadIndexForHandle(t){let r=this._map.get(t);if(r===void 0)throw new Error(`Unknown thread ${t}`);return r}threadIndexesForHandle(t){let n=t.split(",").map(o=>o.trim()).map(o=>{let a=this._map.get(o);if(a===void 0)throw new Error(`Unknown thread ${o}`);return a});return new Set(n)}handleForThreadIndexes(t){return Array.from(t).sort((n,o)=>n-o).map(n=>this.handleForThreadIndex(n)).join(",")}handleForKey(t){return typeof t=="number"?this.handleForThreadIndex(t):t.split(",").map(Number).sort((n,o)=>n-o).map(n=>this.handleForThreadIndex(n)).join(",")}};function Zo(e){return`f-${e}`}function Ku(e,t){let r=/^f-(\d+)$/.exec(e);if(r===null)throw new Error(`Unknown function ${e}`);let n=Number(r[1]);if(!Number.isInteger(n)||n<0||n>=t)throw new Error(`Unknown function ${e}`);return n}var Zu=class{_handleToMarker=new Map;_nextHandleId=1;handleForMarker(t,r){let n=ut(t);for(let[a,i]of this._handleToMarker.entries())if(i.threadsKey===n&&i.markerIndex===r)return a;let o="m-"+this._nextHandleId++;return this._handleToMarker.set(o,{threadIndexes:t,threadsKey:n,markerIndex:r}),o}markerForHandle(t){let r=this._handleToMarker.get(t);if(r===void 0)throw new Error(`Unknown marker ${t}`);return r}};var IA=ce(require("fs"));function pG(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var w_=pG();var $_=ce(__());var hG=(e={phase:"INITIALIZING"},t)=>{switch(t.type){case"TEMPORARY_ERROR":return{phase:"INITIALIZING",additionalData:{message:t.error.message,attempt:t.error.attempt}};case"FATAL_ERROR":return{phase:"FATAL_ERROR",error:t.error};case"WAITING_FOR_PROFILE_FROM_BROWSER":case"WAITING_FOR_PROFILE_FROM_URL":case"WAITING_FOR_PROFILE_FROM_FILE":return{phase:"INITIALIZING"};case"ROUTE_NOT_FOUND":return{phase:"ROUTE_NOT_FOUND"};case"REVERT_TO_PRE_PUBLISHED_STATE":case"SANITIZED_PROFILE_PUBLISHED":return{phase:"TRANSITIONING_FROM_STALE_PROFILE"};case"PROFILE_LOADED":return{phase:"PROFILE_LOADED"};case"DATA_RELOAD":return{phase:"DATA_RELOAD"};case"RECEIVE_ZIP_FILE":case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return{phase:"DATA_LOADED"};default:return e}},mG=(e="initial-load",t)=>{switch(t.type){case"START_FETCHING_PROFILES":return"loading-profile";case"ROUTE_NOT_FOUND":case"FATAL_ERROR":case"URL_SETUP_DONE":return"done";default:return e}},gG=(e=!1,t)=>t.type==="HAS_ZOOMED_VIA_MOUSEWHEEL"?!0:e;function yG(){let e={};return ro.forEach(t=>e[t]=!1),e.calltree=!0,e["marker-table"]=!0,e}var bG=(e=yG(),t)=>{if(t.type==="CHANGE_SIDEBAR_OPEN_STATE"){let{tab:r,isOpen:n}=t;return{...e,[r]:n}}else return e},TG=(e="calltree",t)=>{switch(t.type){case"SELECT_TRACK":case"CHANGE_SELECTED_TAB":return t.selectedTab!=="network-chart"?t.selectedTab:e;case"FOCUS_CALL_TREE":return no.includes(e)?e:"calltree";default:return e}},SG=(e={},t)=>{if(t.type==="UPDATE_TRACK_THREAD_HEIGHT"){let r={...e};return r[t.threadsKey]=t.height,r}else return e},xG=(e=!1,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return!0;case"DISMISS_NEWLY_PUBLISHED":return!1;default:return e}},IG=(e=!1,t)=>{switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1;default:return e}},vG=(e=!1,t)=>{switch(t.type){case"REGISTER_DRAG_AND_DROP_OVERLAY":return!0;case"UNREGISTER_DRAG_AND_DROP_OVERLAY":return!1;default:return e}},wG=(e=!1,t)=>t.type==="ENABLE_EVENT_DELAY_TRACKS"?!0:e,kG=(e=!1,t)=>t.type==="ENABLE_EXPERIMENTAL_CPU_GRAPHS"?!0:e,_G=(e=!1,t)=>t.type==="ENABLE_EXPERIMENTAL_PROCESS_CPU_TRACKS"?!0:e,CG=(e=null,t)=>t.type==="SET_CURRENT_PROFILE_UPLOADED_INFORMATION"?t.uploadedProfileInformation:e,EG=_t({eventDelayTracks:wG,cpuGraphs:kG,processCPUTracks:_G}),NG=(e={status:"NO_ATTEMPT"},t)=>t.type==="UPDATE_BROWSER_CONNECTION_STATUS"?t.browserConnectionStatus:e,AG=(e=new Map,t)=>{if(t.type==="TOGGLE_SIDEBAR_OPEN_CATEGORY"){let r=new Map(e),n=r.get(t.kind);return n===void 0&&(n=new Set),n.has(t.category)?n.delete(t.category):n.add(t.category),r.set(t.kind,n),r}else return e},PG=_t({view:hG,urlSetupPhase:mG,hasZoomedViaMousewheel:gG,isSidebarOpenPerPanel:bG,lastVisibleThreadTabSlug:TG,trackThreadHeights:SG,isNewlyPublished:xG,isDragAndDropDragging:IG,isDragAndDropOverlayRegistered:vG,experimental:EG,currentProfileUploadedInformation:CG,browserConnectionStatus:NG,sidebarOpenCategories:AG}),C_=PG;var RG=(e=new Map,t)=>{switch(t.type){case"ICON_HAS_LOADED":{let{icon:r,className:n}=t.iconWithClassName;return new Map([...e.entries(),[r,n]])}case"ICON_BATCH_ADD":{let r=new Map([...e.entries()]);for(let{icon:n,className:o}of t.icons)r.set(n,o);return r}default:return e}},E_=RG;var N_=ce(Ir());xe();var MG=(e={phase:"NO_ZIP_FILE",zip:null,pathInZipFile:null},t)=>{switch(t.type){case"UPDATE_URL_STATE":return t.newUrlState&&t.newUrlState.pathInZipFile===null&&e.phase==="VIEW_PROFILE_IN_ZIP_FILE"?po(e,{phase:"LIST_FILES_IN_ZIP_FILE",zip:e.zip,pathInZipFile:null}):e;case"RECEIVE_ZIP_FILE":return po(e,{phase:"LIST_FILES_IN_ZIP_FILE",zip:t.zip,pathInZipFile:null});case"RETURN_TO_ZIP_FILE_LIST":case"DISMISS_PROCESS_PROFILE_FROM_ZIP_ERROR":return po(e,{phase:"LIST_FILES_IN_ZIP_FILE",zip:W(e.zip),pathInZipFile:null});case"PROCESS_PROFILE_FROM_ZIP_FILE":return po(e,{phase:"PROCESS_PROFILE_FROM_ZIP_FILE",zip:W(e.zip),pathInZipFile:t.pathInZipFile});case"FILE_NOT_FOUND_IN_ZIP_FILE":return po(e,{phase:"FILE_NOT_FOUND_IN_ZIP_FILE",zip:W(e.zip),pathInZipFile:t.pathInZipFile});case"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE":return po(e,{phase:"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE",zip:W(e.zip),pathInZipFile:W(e.pathInZipFile)});case"FATAL_ERROR":return e.phase==="NO_ZIP_FILE"||e.phase==="LIST_FILES_IN_ZIP_FILE"?e:po(e,{phase:"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE",zip:W(e.zip),pathInZipFile:W(e.pathInZipFile)});case"VIEW_FULL_PROFILE":return e.phase==="NO_ZIP_FILE"?e:po(e,{phase:"VIEW_PROFILE_IN_ZIP_FILE",zip:W(e.zip),pathInZipFile:W(e.pathInZipFile)});case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"WAITING_FOR_PROFILE_FROM_FILE":return{phase:"NO_ZIP_FILE",zip:null,pathInZipFile:null};default:return e}},FG=(e=null,t)=>{switch(t.type){case"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE":case"FATAL_ERROR":return t.error;default:return e}};function po(e,t){let r=e.phase;if(r===t.phase)return t;let n;switch(r){case"NO_ZIP_FILE":n=["LIST_FILES_IN_ZIP_FILE","PROCESS_PROFILE_FROM_ZIP_FILE"];break;case"LIST_FILES_IN_ZIP_FILE":n=["PROCESS_PROFILE_FROM_ZIP_FILE","FILE_NOT_FOUND_IN_ZIP_FILE"];break;case"PROCESS_PROFILE_FROM_ZIP_FILE":n=["VIEW_PROFILE_IN_ZIP_FILE","FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE","LIST_FILES_IN_ZIP_FILE"];break;case"FILE_NOT_FOUND_IN_ZIP_FILE":n=["LIST_FILES_IN_ZIP_FILE"];break;case"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE":n=["LIST_FILES_IN_ZIP_FILE"];break;case"VIEW_PROFILE_IN_ZIP_FILE":n=["LIST_FILES_IN_ZIP_FILE"];break;default:throw new Error(`Unhandled ZipFileState "${r}"`)}if(!n.includes(t.phase))throw console.error("Previous ZipFileState:",e),console.error("Next ZipFileState:",t),new Error(N_.oneLine`
672
672
  Attempted to transition the ZipFileState from the phase “${e.phase}”
673
673
  to “${t.phase}”, however “${e.phase}” can only transition to
674
674
  “${n.join("\u201D, \u201C")}”.
675
- `);return t}var NG=(e=null,t)=>t.type==="CHANGE_SELECTED_ZIP_FILE"?t.selectedZipFileIndex:e,AG=(e=[],t)=>t.type==="CHANGE_EXPANDED_ZIP_FILES"?t.expandedZipFileIndexes:e,PG=_t({zipFile:CG,error:EG,selectedZipFileIndex:NG,expandedZipFileIndexes:AG}),E_=PG;rr();xe();var Ge={indexRef:e=>({type:"INDEX_REF",referencedTable:e}),indexRefOrNull:e=>({type:"INDEX_REF_OR_NULL",referencedTable:e}),indexRefOrNegOne:e=>({type:"INDEX_REF_OR_NEG_ONE",referencedTable:e}),selfIndexRefOrNull:()=>({type:"SELF_INDEX_REF_OR_NULL"}),noRef:()=>({type:"NO_REF"})},ln=class{markBuffer;oldIndexToNewIndexPlusOne;newLength=null;constructor(t){this.markBuffer=vr(t),this.oldIndexToNewIndexPlusOne=new Int32Array(t)}computeIndexTranslation(){let t=0;for(let r=0;r<this.oldIndexToNewIndexPlusOne.length;r++)It(this.markBuffer,r)&&(this.oldIndexToNewIndexPlusOne[r]=t+1,t++);this.newLength=t}};function A_(e){let{shared:t,threads:r}=e,n={stackTable:new ln(t.stackTable.length),frameTable:new ln(t.frameTable.length),funcTable:new ln(t.funcTable.length),resourceTable:new ln(t.resourceTable.length),nativeSymbols:new ln(t.nativeSymbols.length),sources:new ln(t.sources.length),libs:new ln(e.libs.length),stringArray:new ln(t.stringArray.length)},o={frame:Ge.indexRef(n.frameTable),prefix:Ge.selfIndexRefOrNull()},a={address:Ge.noRef(),inlineDepth:Ge.noRef(),category:Ge.noRef(),subcategory:Ge.noRef(),func:Ge.indexRef(n.funcTable),nativeSymbol:Ge.indexRefOrNull(n.nativeSymbols),innerWindowID:Ge.noRef(),line:Ge.noRef(),column:Ge.noRef()},i={name:Ge.indexRef(n.stringArray),isJS:Ge.noRef(),relevantForJS:Ge.noRef(),resource:Ge.indexRefOrNegOne(n.resourceTable),source:Ge.indexRefOrNull(n.sources),lineNumber:Ge.noRef(),columnNumber:Ge.noRef()},s={name:Ge.indexRef(n.stringArray),host:Ge.indexRefOrNull(n.stringArray),lib:Ge.indexRefOrNull(n.libs),type:Ge.noRef()},l={libIndex:Ge.indexRef(n.libs),address:Ge.noRef(),name:Ge.indexRef(n.stringArray),functionSize:Ge.noRef()},c={id:Ge.noRef(),filename:Ge.indexRef(n.stringArray),startLine:Ge.noRef(),startColumn:Ge.noRef(),sourceMapURL:Ge.indexRefOrNull(n.stringArray)},u=vs(e.meta.markerSchema);for(let h of r)LG(h,n,u);Qa(t.stackTable,n.stackTable,o),Qa(t.frameTable,n.frameTable,a),Qa(t.funcTable,n.funcTable,i),Qa(t.resourceTable,n.resourceTable,s),Qa(t.nativeSymbols,n.nativeSymbols,l),Qa(t.sources,n.sources,c),n.stringArray.computeIndexTranslation(),n.libs.computeIndexTranslation();let d={stackTable:ei(t.stackTable,n.stackTable,o),frameTable:ei(t.frameTable,n.frameTable,a),funcTable:ei(t.funcTable,n.funcTable,i),resourceTable:ei(t.resourceTable,n.resourceTable,s),nativeSymbols:ei(t.nativeSymbols,n.nativeSymbols,l),sources:ei(t.sources,n.sources,c),stringArray:WG(t.stringArray,n)},f={...e,libs:HG(e.libs,n),shared:d,threads:e.threads.map(h=>$G(h,n,u))},p={oldStackToNewStackPlusOne:n.stackTable.oldIndexToNewIndexPlusOne,oldFrameToNewFramePlusOne:n.frameTable.oldIndexToNewIndexPlusOne,oldFuncToNewFuncPlusOne:n.funcTable.oldIndexToNewIndexPlusOne,oldResourceToNewResourcePlusOne:n.resourceTable.oldIndexToNewIndexPlusOne,oldNativeSymbolToNewNativeSymbolPlusOne:n.nativeSymbols.oldIndexToNewIndexPlusOne,oldSourceToNewSourcePlusOne:n.sources.oldIndexToNewIndexPlusOne,oldStringToNewStringPlusOne:n.stringArray.oldIndexToNewIndexPlusOne,oldLibToNewLibPlusOne:n.libs.oldIndexToNewIndexPlusOne};return{profile:f,translationMaps:p}}function Qa(e,t,r){let{markBuffer:n}=t,o=Object.keys(r);for(let a of o)r[a].type==="SELF_INDEX_REF_OR_NULL"&&FG(e[a],n);for(let a of o){let i=r[a],s=e[a];switch(i.type){case"INDEX_REF":RG(s,n,i.referencedTable.markBuffer);break;case"INDEX_REF_OR_NULL":MG(s,n,i.referencedTable.markBuffer);break;case"SELF_INDEX_REF_OR_NULL":break;case"INDEX_REF_OR_NEG_ONE":OG(s,n,i.referencedTable.markBuffer);break;case"NO_REF":break;default:throw ae(i)}}t.computeIndexTranslation()}function RG(e,t,r){for(let n=0;n<e.length;n++)if(It(t,n)){let o=e[n];bt(r,o)}}function MG(e,t,r){for(let n=0;n<e.length;n++)if(It(t,n)){let o=e[n];o!==null&&bt(r,o)}}function FG(e,t){for(let r=e.length-1;r>=0;r--)if(It(t,r)){let n=e[r];n!==null&&bt(t,n)}}function OG(e,t,r){for(let n=0;n<e.length;n++)if(It(t,n)){let o=e[n];o!==-1&&bt(r,o)}}function LG(e,t,r){Yh(e.samples.stack,t),e.jsAllocations&&Yh(e.jsAllocations.stack,t),e.nativeAllocations&&Yh(e.nativeAllocations.stack,t),DG(e.markers,t,r)}function Yh(e,t){for(let r=0;r<e.length;r++){let n=e[r];n!==null&&bt(t.stackTable.markBuffer,n)}}function DG(e,t,r){let n=t.stackTable.markBuffer,o=t.stringArray.markBuffer;for(let a=0;a<e.length;a++){bt(o,e.name[a]);let i=e.data[a];if(i&&("cause"in i&&i.cause&&i.cause.stack!==null&&bt(n,i.cause.stack),i.type)){let s=r.get(i.type);if(s!==void 0)for(let l of s){let c=i[l];typeof c=="number"&&bt(o,c)}}}}function ei(e,t,r){let{markBuffer:n}=t,o=W(t.newLength),a={length:o};for(let i of Object.keys(r)){let s=r[i],l=e[i];switch(s.type){case"INDEX_REF":a[i]=BG(l,n,s.referencedTable.oldIndexToNewIndexPlusOne,o);break;case"INDEX_REF_OR_NULL":a[i]=N_(l,n,s.referencedTable.oldIndexToNewIndexPlusOne,o);break;case"SELF_INDEX_REF_OR_NULL":a[i]=N_(l,n,t.oldIndexToNewIndexPlusOne,o);break;case"INDEX_REF_OR_NEG_ONE":a[i]=UG(l,n,s.referencedTable.oldIndexToNewIndexPlusOne,o);break;case"NO_REF":a[i]=Qh(l,n,o);break;default:throw ae(s)}}return a}function Qh(e,t,r){let n=new Array(r),o=0;for(let a=0;a<e.length;a++)It(t,a)&&(n[o++]=e[a]);return n}function BG(e,t,r,n){let o=new Array(n),a=0;for(let i=0;i<e.length;i++)It(t,i)&&(o[a++]=r[e[i]]-1);return o}function N_(e,t,r,n){let o=new Array(n),a=0;for(let i=0;i<e.length;i++)if(It(t,i)){let s=e[i];o[a++]=s!==null?r[s]-1:null}return o}function UG(e,t,r,n){let o=new Array(n),a=0;for(let i=0;i<e.length;i++)if(It(t,i)){let s=e[i];o[a++]=s!==-1?r[s]-1:-1}return o}function $G(e,t,r){return{...e,samples:{...e.samples,stack:Xh(e.samples.stack,t)},jsAllocations:e.jsAllocations?{...e.jsAllocations,stack:Xh(e.jsAllocations.stack,t)}:void 0,nativeAllocations:e.nativeAllocations?{...e.nativeAllocations,stack:Xh(e.nativeAllocations.stack,t)}:void 0,markers:GG(e.markers,t,r)}}function Xh(e,t){let{oldIndexToNewIndexPlusOne:r}=t.stackTable,n=e.slice();for(let o=0;o<e.length;o++){let a=e[o];n[o]=a!==null?r[a]-1:null}return n}function GG(e,t,r){let n=t.stackTable.oldIndexToNewIndexPlusOne,o=t.stringArray.oldIndexToNewIndexPlusOne,a=e.data.slice(),i=e.name.slice();for(let s=0;s<e.length;s++){i[s]=o[e.name[s]]-1;let l=e.data[s];if(!l)continue;let c=l;if("cause"in c&&c.cause){let u=c.cause.stack;u!==null&&(c={...c,cause:{...c.cause,stack:n[u]-1}})}if(l.type){let u=r.get(l.type);if(u!==void 0)for(let d of u){let f=l[d];typeof f=="number"&&(c={...c,[d]:o[f]-1})}}a[s]=c}return{...e,name:i,data:a}}function WG(e,t){return Qh(e,t.stringArray.markBuffer,W(t.stringArray.newLength))}function HG(e,t){return Qh(e,t.libs.markBuffer,W(t.libs.newLength))}ur();var em=1;function R_(e,t,r,n){if(r===null)return{profile:e,isSanitized:!1,translationMaps:null,committedRanges:null};let o=r,a=new Map,i=new Set,s=e.pages;if(s){if(o.shouldRemovePrivateBrowsingData){s=s.slice();for(let y=s.length-1;y>=0;y--){let b=s[y],m=!1;o.shouldRemovePrivateBrowsingData&&b.isPrivateBrowsing&&(i.add(b.innerWindowID),m=!0),m&&s.splice(y,1)}}o.shouldRemoveUrls&&(s=s.map((y,b)=>({...y,url:La(y.url,`<Page #${b}>`),favicon:null})))}let l=e.shared.stringArray;o.shouldRemoveUrls&&(l=l.map(y=>La(y)));let c=$e.withBackingArray(l),u={...e.shared,stringArray:l},d=null;if(i.size>0){let y=new Map,b=new Set,{frameTable:m,funcTable:g,resourceTable:T,stackTable:S}=u;for(let I=0;I<m.length;I++){let v=m.innerWindowID[I],w=m.func[I];if(v&&i.has(v)){let N=y.get(w);N||(N=[],y.set(w,N)),N.push(I)}else b.add(w)}if(y.size){let I=new Set,v=u.funcTable=Ea(g),w=u.frameTable={...m,innerWindowID:m.innerWindowID.slice(),func:m.func.slice(),line:m.line.slice(),column:m.column.slice()};for(let[k,N]of y.entries()){if(b.has(k)){let R=v.length,F=c.indexForString(`<Func #${R}>`);v.name.push(F),v.isJS.push(g.isJS[k]),v.relevantForJS.push(g.isJS[k]),v.resource.push(-1),v.source.push(null),v.lineNumber.push(null),v.columnNumber.push(null),v.length++,N.forEach(G=>w.func[G]=R)}else{let R=c.indexForString(`<Func #${k}>`);v.name[k]=R,v.source[k]=null,v.resource[k]>=0&&I.add(v.resource[k]),v.resource[k]=-1,v.lineNumber[k]=null,v.columnNumber[k]=null}N.forEach(R=>{w.line[R]=null,w.column[R]=null,w.innerWindowID[R]=null})}if(I.size){let k=u.resourceTable={...T,lib:T.lib.slice(),name:T.name.slice(),host:T.host.slice()},N=new Set(v.resource);for(let R of I)if(!N.has(R)){let F=c.indexForString(`<Resource #${R}>`);k.name[R]=F,k.lib[R]=null,k.host[R]=null}}}d=new Uint8Array(S.length);for(let I=0;I<S.length;I++){let v=S.prefix[I];if(v!==null&&(d[I]=d[v],d[I]===em))continue;let w=S.frame[I],k=m.innerWindowID[w];if(!k)continue;i.has(k)&&(d[I]=em)}}let f=!1,p={...e,meta:{...e.meta,extensions:o.shouldRemoveExtensions?ds():e.meta.extensions},pages:s,shared:u,threads:e.threads.reduce((y,b,m)=>{let g=VG(b,c,t[m],m,o,i,n,d);return g!==null&&(a.set(m,y.length),y.push(g)),y},[]),counters:e.counters?e.counters.reduce((y,b,m)=>{if(o.shouldRemoveCounters.has(m))return f=!0,y;let g=jG(b,o,a);return g!==null&&y.push(g),y},[]):void 0,profilerOverhead:e.profilerOverhead?e.profilerOverhead.reduce((y,b)=>{let m=a.get(b.mainThreadIndex);return m!==void 0&&y.push({...b,mainThreadIndex:m}),y},[]):void 0};if(o.shouldFilterToCommittedRange!==null){let{start:y,end:b}=o.shouldFilterToCommittedRange;p.meta.profilingStartTime=y,p.meta.profilingEndTime=b}let h=A_(p);return{profile:h.profile,isSanitized:!0,committedRanges:o.shouldFilterToCommittedRange?[]:null,translationMaps:{oldThreadIndexToNew:a.size===e.threads.length&&!f?null:a,oldFuncCount:e.shared.funcTable.length,newFuncCount:h.profile.shared.funcTable.length,...h.translationMaps}}}function Ku(e){switch(e.meta.updateChannel){case"esr":case"release":case"beta":return!0;default:return!1}}function VG(e,t,r,n,o,a,i,s){if(o.shouldRemoveThreads.has(n)||o.shouldRemovePrivateBrowsingData&&e.isPrivateBrowsing)return null;let l=qf(e.markers),c=new Set;if(o.shouldRemoveUrls||o.shouldRemovePreferenceValues||o.shouldRemoveExtensions||o.shouldRemoveThreadsWithScreenshots.size>0||o.shouldRemovePrivateBrowsingData)for(let f=0;f<l.length;f++){let p=l.data[f];if(o.shouldRemovePreferenceValues&&p&&p.type==="PreferenceRead"&&(l.data[f]=oI(p)),p&&o.shouldRemoveUrls){let h=Is(i,p);if(h&&(p=l.data[f]=sI(h,p)),p.type==="Network"){l.data[f]=nI(p);let b=t.getString(l.name[f]).replace(/:.*/,"");l.name[f]=t.indexForString(b)}p.type==="Text"&&(l.data[f]=aI(p),p=l.data[f])}if(o.shouldRemoveExtensions&&p&&p.type==="Text"){let h=t.getString(l.name[f]);l.data[f]=iI(h,p)}o.shouldRemoveThreadsWithScreenshots.has(n)&&p&&p.type==="CompositorScreenshot"&&c.add(f),o.shouldRemovePrivateBrowsingData&&(p&&p.type==="Network"&&p.isPrivateBrowsing&&c.add(f),p&&"innerWindowID"in p&&p.innerWindowID&&a.has(p.innerWindowID)&&c.add(f))}let u;if(c.size>0||o.shouldFilterToCommittedRange!==null)if(l=Xx(l,r,c,o.shouldFilterToCommittedRange).rawMarkerTable,o.shouldFilterToCommittedRange!==null){let{start:f,end:p}=o.shouldFilterToCommittedRange;if(e.registerTime>p||e.unregisterTime&&e.unregisterTime<f)return null;u=ep(e,f,p)}else u={...e};else u={...e};o.shouldRemoveUrls&&u["eTLD+1"]&&delete u["eTLD+1"],delete u.tracedValuesBuffer,delete u.tracedObjectShapes;let{samples:d}=u;if(s!==null&&a.size>0){let f=u.samples={...d,stack:d.stack.slice()};for(let p=0;p<d.length;p++){let h=d.stack[p];if(h===null)continue;if(s[h]===em){f.stack[p]=null;continue}}}return u.markers=l,P_(u)||!P_(e)?u:null}function P_(e){return e.markers.length>0?!0:e.samples.stack.some(n=>n!==null)}function jG(e,t,r){let n=r.get(e.mainThreadIndex);if(n===void 0)return null;let o=e;if(t.shouldFilterToCommittedRange!==null){let{start:a,end:i}=t.shouldFilterToCommittedRange;o=RS(o,a,i)}return{...o,mainThreadIndex:n}}function M_(){return{includeHiddenThreads:!1,includeAllTabs:!1,includeFullTimeRange:!1,includeScreenshots:!1,includeUrls:!1,includeExtension:!1,includePreferenceValues:!1,includePrivateBrowsingData:!1}}function qG(){return{includeHiddenThreads:!0,includeAllTabs:!0,includeFullTimeRange:!0,includeScreenshots:!0,includeUrls:!0,includeExtension:!0,includePreferenceValues:!0,includePrivateBrowsingData:!1}}var zG=(e=M_(),t)=>{switch(t.type){case"PROFILE_LOADED":return Ku(t.profile)?M_():qG();case"UPDATE_SHARING_OPTION":return{...e,[t.slug]:t.value};default:return e}},KG=(e="local",t)=>{switch(t.type){case"UPLOAD_COMPRESSION_STARTED":return"compressing";case"UPLOAD_STARTED":return"uploading";case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return"uploaded";case"UPLOAD_FAILED":return"error";case"UPLOAD_ABORTED":case"UPLOAD_RESET":return"local";default:return e}},ZG=(e=0,t)=>{switch(t.type){case"UPDATE_UPLOAD_PROGRESS":return t.uploadProgress;case"UPLOAD_STARTED":case"UPLOAD_ABORTED":case"UPLOAD_RESET":case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"UPLOAD_COMPRESSION_STARTED":case"UPLOAD_FAILED":return 0;default:return e}},JG=(e=null,t)=>{switch(t.type){case"UPLOAD_FAILED":return t.error;case"UPLOAD_COMPRESSION_STARTED":return null;default:return e}},F_=()=>{},YG=(e=F_,t)=>{switch(t.type){case"UPLOAD_ABORTED":case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"UPLOAD_FAILED":return F_;case"UPLOAD_COMPRESSION_STARTED":return t.abortFunction;default:return e}},XG=(e=0,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"UPLOAD_ABORTED":case"UPLOAD_FAILED":case"HIDE_STALE_PROFILE":return e+1;default:return e}},QG=_t({phase:KG,uploadProgress:ZG,abortFunction:YG,error:JG,generation:XG}),eW=(e=null,t)=>{switch(t.type){case"SANITIZED_PROFILE_PUBLISHED":case"PROFILE_PUBLISHED":return t.prePublishedState;case"REVERT_TO_PRE_PUBLISHED_STATE":return null;default:return e}},tW=(e=!1,t)=>{switch(t.type){case"HIDE_STALE_PROFILE":return!0;case"VIEW_FULL_PROFILE":return!1;default:return e}},rW=(e=!1,t)=>t.type==="HIDE_STALE_PROFILE"?!0:e,nW=(e={phase:"INITIAL"},t)=>{switch(t.type){case"SANITIZED_PROFILE_ENCODING_STARTED":{let{sanitizedProfile:r}=t;return{phase:"ENCODING",sanitizedProfile:r}}case"SANITIZED_PROFILE_ENCODING_COMPLETED":{let{sanitizedProfile:r,profileData:n}=t;return e.phase==="ENCODING"&&e.sanitizedProfile===r?{phase:"DONE",sanitizedProfile:r,profileData:n}:e}case"SANITIZED_PROFILE_ENCODING_FAILED":{let{sanitizedProfile:r,error:n}=t;return e.phase==="ENCODING"&&e.sanitizedProfile===r?{phase:"ERROR",sanitizedProfile:r,error:n}:e}default:return e}},oW=_t({checkedSharingOptions:zG,sanitizedProfileEncodingState:nW,upload:QG,isHidingStaleProfile:tW,hasSanitizedProfile:rW,prePublishedState:eW}),O_=oW;var aW=(e=new Map,t)=>{switch(t.type){case"SOURCE_CODE_LOADING_BEGIN_URL":{let{sourceIndex:r,url:n}=t,o=new Map(e);return o.set(r,{type:"LOADING",source:{type:"URL",url:n}}),o}case"SOURCE_CODE_LOADING_BEGIN_BROWSER_CONNECTION":{let{sourceIndex:r}=t,n=new Map(e);return n.set(r,{type:"LOADING",source:{type:"BROWSER_CONNECTION"}}),n}case"SOURCE_CODE_LOADING_SUCCESS":{let{sourceIndex:r,code:n}=t,o=new Map(e);return o.set(r,{type:"AVAILABLE",code:n}),o}case"SOURCE_CODE_LOADING_ERROR":{let{sourceIndex:r,errors:n}=t,o=new Map(e);return o.set(r,{type:"ERROR",errors:n}),o}case"SANITIZED_PROFILE_PUBLISHED":{if(!t.translationMaps)return e;let{oldSourceToNewSourcePlusOne:r}=t.translationMaps,n=new Map;for(let[o,a]of e){let i=r[o];if(i===0)continue;let s=i-1;n.set(s,a)}return n}default:return e}},iW=(e=new Map,t)=>{switch(t.type){case"ASSEMBLY_CODE_LOADING_BEGIN_URL":{let{nativeSymbolKey:r,url:n}=t,o=new Map(e);return o.set(r,{type:"LOADING",source:{type:"URL",url:n}}),o}case"ASSEMBLY_CODE_LOADING_BEGIN_BROWSER_CONNECTION":{let{nativeSymbolKey:r}=t,n=new Map(e);return n.set(r,{type:"LOADING",source:{type:"BROWSER_CONNECTION"}}),n}case"ASSEMBLY_CODE_LOADING_SUCCESS":{let{nativeSymbolKey:r,instructions:n}=t,o=new Map(e);return o.set(r,{type:"AVAILABLE",instructions:n}),o}case"ASSEMBLY_CODE_LOADING_ERROR":{let{nativeSymbolKey:r,errors:n}=t,o=new Map(e);return o.set(r,{type:"ERROR",errors:n}),o}default:return e}},sW=_t({sourceCodeCache:aW,assemblyCodeCache:iW}),L_=sW;var lW=e=>(t,r)=>r.type==="REVERT_TO_PRE_PUBLISHED_STATE"?r.prePublishedState:e(t,r),cW=lW(_t({app:k_,profileView:QI,urlState:ou,icons:__,zippedProfiles:E_,publish:O_,code:L_})),D_=cW;function tm(){let e=null;process.env.NODE_ENV==="development"&&(e=(0,B_.createLogger)({collapsed:!0,titleFormatter:(n,o,a)=>`[action] ${n.type} (in ${a.toFixed(2)} ms)`,logErrors:!1,duration:!0}));let t=I_,r=e?Op(t,e):Op(t);return Fp(D_,r)}var _q=ce(Ir());var Bd=ce(Ir());xe();var Hs=class e extends Error{attempt;constructor(t,r=null){super(t),this.__proto__=e.prototype,this.name="TemporaryError",this.attempt=r}};cr();function QN(e){return`https://storage.googleapis.com/${eS}/${e}`}function eA(e){try{let t;e.startsWith("http://")||e.startsWith("https://")?t=new URL(e).pathname:t=e;let r=t.split("/").filter(n=>n);if(r[0]==="from-url"&&r[1])return decodeURIComponent(r[1]);if(r[0]==="public"&&r[1]){let n=r[1];return QN(n)}return null}catch(t){return console.error("Failed to parse profiler URL:",t),null}}function H4(e){return new Promise(t=>setTimeout(t,e))}function V4(e,t){if(typeof navigator>"u"||!navigator.userAgent.match(/Safari\/\d+\.\d+/))return!1;try{let r=new URL(e);return t.name==="TypeError"&&r.protocol==="http:"&&oo(r)&&typeof location<"u"&&location.protocol==="https:"}catch{return!1}}var jg=class extends Error{name="SafariLocalhostHTTPLoadError"};function tA(e,t){return t==="application/zip"||t==="application/json"?t:e.match(/\.zip$/)?"application/zip":e.match(/\.json/)?"application/json":null}async function rA(e){let t=new Uint8Array(e);Ka(t)&&(t=await za(t));let r=new TextDecoder;return JSON.parse(r.decode(t))}async function j4(e,t,r){let n=null;try{return n=await e.arrayBuffer(),await rA(n)}catch(o){let a;if(o&&typeof o=="object"&&o.name==="AbortError")a="The network request to load the profile was aborted.";else if(r==="application/json")a="The profile\u2019s JSON could not be decoded.";else{if(r===null&&n!==null)return n;a=Bd.oneLine`
675
+ `);return t}var OG=(e=null,t)=>t.type==="CHANGE_SELECTED_ZIP_FILE"?t.selectedZipFileIndex:e,LG=(e=[],t)=>t.type==="CHANGE_EXPANDED_ZIP_FILES"?t.expandedZipFileIndexes:e,DG=_t({zipFile:MG,error:FG,selectedZipFileIndex:OG,expandedZipFileIndexes:LG}),A_=DG;nr();xe();var Ge={indexRef:e=>({type:"INDEX_REF",referencedTable:e}),indexRefOrNull:e=>({type:"INDEX_REF_OR_NULL",referencedTable:e}),indexRefOrNegOne:e=>({type:"INDEX_REF_OR_NEG_ONE",referencedTable:e}),selfIndexRefOrNull:()=>({type:"SELF_INDEX_REF_OR_NULL"}),noRef:()=>({type:"NO_REF"})},ln=class{markBuffer;oldIndexToNewIndexPlusOne;newLength=null;constructor(t){this.markBuffer=vr(t),this.oldIndexToNewIndexPlusOne=new Int32Array(t)}computeIndexTranslation(){let t=0;for(let r=0;r<this.oldIndexToNewIndexPlusOne.length;r++)It(this.markBuffer,r)&&(this.oldIndexToNewIndexPlusOne[r]=t+1,t++);this.newLength=t}};function R_(e){let{shared:t,threads:r}=e,n={stackTable:new ln(t.stackTable.length),frameTable:new ln(t.frameTable.length),funcTable:new ln(t.funcTable.length),resourceTable:new ln(t.resourceTable.length),nativeSymbols:new ln(t.nativeSymbols.length),sources:new ln(t.sources.length),libs:new ln(e.libs.length),stringArray:new ln(t.stringArray.length)},o={frame:Ge.indexRef(n.frameTable),prefix:Ge.selfIndexRefOrNull()},a={address:Ge.noRef(),inlineDepth:Ge.noRef(),category:Ge.noRef(),subcategory:Ge.noRef(),func:Ge.indexRef(n.funcTable),nativeSymbol:Ge.indexRefOrNull(n.nativeSymbols),innerWindowID:Ge.noRef(),line:Ge.noRef(),column:Ge.noRef()},i={name:Ge.indexRef(n.stringArray),isJS:Ge.noRef(),relevantForJS:Ge.noRef(),resource:Ge.indexRefOrNegOne(n.resourceTable),source:Ge.indexRefOrNull(n.sources),lineNumber:Ge.noRef(),columnNumber:Ge.noRef()},s={name:Ge.indexRef(n.stringArray),host:Ge.indexRefOrNull(n.stringArray),lib:Ge.indexRefOrNull(n.libs),type:Ge.noRef()},l={libIndex:Ge.indexRef(n.libs),address:Ge.noRef(),name:Ge.indexRef(n.stringArray),functionSize:Ge.noRef()},c={id:Ge.noRef(),filename:Ge.indexRef(n.stringArray),startLine:Ge.noRef(),startColumn:Ge.noRef(),sourceMapURL:Ge.indexRefOrNull(n.stringArray)},u=ws(e.meta.markerSchema);for(let h of r)WG(h,n,u);ei(t.stackTable,n.stackTable,o),ei(t.frameTable,n.frameTable,a),ei(t.funcTable,n.funcTable,i),ei(t.resourceTable,n.resourceTable,s),ei(t.nativeSymbols,n.nativeSymbols,l),ei(t.sources,n.sources,c),n.stringArray.computeIndexTranslation(),n.libs.computeIndexTranslation();let d={stackTable:ti(t.stackTable,n.stackTable,o),frameTable:ti(t.frameTable,n.frameTable,a),funcTable:ti(t.funcTable,n.funcTable,i),resourceTable:ti(t.resourceTable,n.resourceTable,s),nativeSymbols:ti(t.nativeSymbols,n.nativeSymbols,l),sources:ti(t.sources,n.sources,c),stringArray:KG(t.stringArray,n)},f={...e,libs:ZG(e.libs,n),shared:d,threads:e.threads.map(h=>qG(h,n,u))},p={oldStackToNewStackPlusOne:n.stackTable.oldIndexToNewIndexPlusOne,oldFrameToNewFramePlusOne:n.frameTable.oldIndexToNewIndexPlusOne,oldFuncToNewFuncPlusOne:n.funcTable.oldIndexToNewIndexPlusOne,oldResourceToNewResourcePlusOne:n.resourceTable.oldIndexToNewIndexPlusOne,oldNativeSymbolToNewNativeSymbolPlusOne:n.nativeSymbols.oldIndexToNewIndexPlusOne,oldSourceToNewSourcePlusOne:n.sources.oldIndexToNewIndexPlusOne,oldStringToNewStringPlusOne:n.stringArray.oldIndexToNewIndexPlusOne,oldLibToNewLibPlusOne:n.libs.oldIndexToNewIndexPlusOne};return{profile:f,translationMaps:p}}function ei(e,t,r){let{markBuffer:n}=t,o=Object.keys(r);for(let a of o)r[a].type==="SELF_INDEX_REF_OR_NULL"&&$G(e[a],n);for(let a of o){let i=r[a],s=e[a];switch(i.type){case"INDEX_REF":BG(s,n,i.referencedTable.markBuffer);break;case"INDEX_REF_OR_NULL":UG(s,n,i.referencedTable.markBuffer);break;case"SELF_INDEX_REF_OR_NULL":break;case"INDEX_REF_OR_NEG_ONE":GG(s,n,i.referencedTable.markBuffer);break;case"NO_REF":break;default:throw ae(i)}}t.computeIndexTranslation()}function BG(e,t,r){for(let n=0;n<e.length;n++)if(It(t,n)){let o=e[n];bt(r,o)}}function UG(e,t,r){for(let n=0;n<e.length;n++)if(It(t,n)){let o=e[n];o!==null&&bt(r,o)}}function $G(e,t){for(let r=e.length-1;r>=0;r--)if(It(t,r)){let n=e[r];n!==null&&bt(t,n)}}function GG(e,t,r){for(let n=0;n<e.length;n++)if(It(t,n)){let o=e[n];o!==-1&&bt(r,o)}}function WG(e,t,r){em(e.samples.stack,t),e.jsAllocations&&em(e.jsAllocations.stack,t),e.nativeAllocations&&em(e.nativeAllocations.stack,t),HG(e.markers,t,r)}function em(e,t){for(let r=0;r<e.length;r++){let n=e[r];n!==null&&bt(t.stackTable.markBuffer,n)}}function HG(e,t,r){let n=t.stackTable.markBuffer,o=t.stringArray.markBuffer;for(let a=0;a<e.length;a++){bt(o,e.name[a]);let i=e.data[a];if(i&&("cause"in i&&i.cause&&i.cause.stack!==null&&bt(n,i.cause.stack),i.type)){let s=r.get(i.type);if(s!==void 0)for(let l of s){let c=i[l];typeof c=="number"&&bt(o,c)}}}}function ti(e,t,r){let{markBuffer:n}=t,o=W(t.newLength),a={length:o};for(let i of Object.keys(r)){let s=r[i],l=e[i];switch(s.type){case"INDEX_REF":a[i]=VG(l,n,s.referencedTable.oldIndexToNewIndexPlusOne,o);break;case"INDEX_REF_OR_NULL":a[i]=P_(l,n,s.referencedTable.oldIndexToNewIndexPlusOne,o);break;case"SELF_INDEX_REF_OR_NULL":a[i]=P_(l,n,t.oldIndexToNewIndexPlusOne,o);break;case"INDEX_REF_OR_NEG_ONE":a[i]=jG(l,n,s.referencedTable.oldIndexToNewIndexPlusOne,o);break;case"NO_REF":a[i]=rm(l,n,o);break;default:throw ae(s)}}return a}function rm(e,t,r){let n=new Array(r),o=0;for(let a=0;a<e.length;a++)It(t,a)&&(n[o++]=e[a]);return n}function VG(e,t,r,n){let o=new Array(n),a=0;for(let i=0;i<e.length;i++)It(t,i)&&(o[a++]=r[e[i]]-1);return o}function P_(e,t,r,n){let o=new Array(n),a=0;for(let i=0;i<e.length;i++)if(It(t,i)){let s=e[i];o[a++]=s!==null?r[s]-1:null}return o}function jG(e,t,r,n){let o=new Array(n),a=0;for(let i=0;i<e.length;i++)if(It(t,i)){let s=e[i];o[a++]=s!==-1?r[s]-1:-1}return o}function qG(e,t,r){return{...e,samples:{...e.samples,stack:tm(e.samples.stack,t)},jsAllocations:e.jsAllocations?{...e.jsAllocations,stack:tm(e.jsAllocations.stack,t)}:void 0,nativeAllocations:e.nativeAllocations?{...e.nativeAllocations,stack:tm(e.nativeAllocations.stack,t)}:void 0,markers:zG(e.markers,t,r)}}function tm(e,t){let{oldIndexToNewIndexPlusOne:r}=t.stackTable,n=e.slice();for(let o=0;o<e.length;o++){let a=e[o];n[o]=a!==null?r[a]-1:null}return n}function zG(e,t,r){let n=t.stackTable.oldIndexToNewIndexPlusOne,o=t.stringArray.oldIndexToNewIndexPlusOne,a=e.data.slice(),i=e.name.slice();for(let s=0;s<e.length;s++){i[s]=o[e.name[s]]-1;let l=e.data[s];if(!l)continue;let c=l;if("cause"in c&&c.cause){let u=c.cause.stack;u!==null&&(c={...c,cause:{...c.cause,stack:n[u]-1}})}if(l.type){let u=r.get(l.type);if(u!==void 0)for(let d of u){let f=l[d];typeof f=="number"&&(c={...c,[d]:o[f]-1})}}a[s]=c}return{...e,name:i,data:a}}function KG(e,t){return rm(e,t.stringArray.markBuffer,W(t.stringArray.newLength))}function ZG(e,t){return rm(e,t.libs.markBuffer,W(t.libs.newLength))}ur();var nm=1;function F_(e,t,r,n){if(r===null)return{profile:e,isSanitized:!1,translationMaps:null,committedRanges:null};let o=r,a=new Map,i=new Set,s=e.pages;if(s){if(o.shouldRemovePrivateBrowsingData){s=s.slice();for(let y=s.length-1;y>=0;y--){let b=s[y],g=!1;o.shouldRemovePrivateBrowsingData&&b.isPrivateBrowsing&&(i.add(b.innerWindowID),g=!0),g&&s.splice(y,1)}}o.shouldRemoveUrls&&(s=s.map((y,b)=>({...y,url:Da(y.url,`<Page #${b}>`),favicon:null})))}let l=e.shared.stringArray;o.shouldRemoveUrls&&(l=l.map(y=>Da(y)));let c=$e.withBackingArray(l),u={...e.shared,stringArray:l},d=null;if(i.size>0){let y=new Map,b=new Set,{frameTable:g,funcTable:m,resourceTable:T,stackTable:S}=u;for(let I=0;I<g.length;I++){let v=g.innerWindowID[I],w=g.func[I];if(v&&i.has(v)){let E=y.get(w);E||(E=[],y.set(w,E)),E.push(I)}else b.add(w)}if(y.size){let I=new Set,v=u.funcTable=Na(m),w=u.frameTable={...g,innerWindowID:g.innerWindowID.slice(),func:g.func.slice(),line:g.line.slice(),column:g.column.slice()};for(let[k,E]of y.entries()){if(b.has(k)){let R=v.length,F=c.indexForString(`<Func #${R}>`);v.name.push(F),v.isJS.push(m.isJS[k]),v.relevantForJS.push(m.isJS[k]),v.resource.push(-1),v.source.push(null),v.lineNumber.push(null),v.columnNumber.push(null),v.length++,E.forEach(G=>w.func[G]=R)}else{let R=c.indexForString(`<Func #${k}>`);v.name[k]=R,v.source[k]=null,v.resource[k]>=0&&I.add(v.resource[k]),v.resource[k]=-1,v.lineNumber[k]=null,v.columnNumber[k]=null}E.forEach(R=>{w.line[R]=null,w.column[R]=null,w.innerWindowID[R]=null})}if(I.size){let k=u.resourceTable={...T,lib:T.lib.slice(),name:T.name.slice(),host:T.host.slice()},E=new Set(v.resource);for(let R of I)if(!E.has(R)){let F=c.indexForString(`<Resource #${R}>`);k.name[R]=F,k.lib[R]=null,k.host[R]=null}}}d=new Uint8Array(S.length);for(let I=0;I<S.length;I++){let v=S.prefix[I];if(v!==null&&(d[I]=d[v],d[I]===nm))continue;let w=S.frame[I],k=g.innerWindowID[w];if(!k)continue;i.has(k)&&(d[I]=nm)}}let f=!1,p={...e,meta:{...e.meta,extensions:o.shouldRemoveExtensions?fs():e.meta.extensions},pages:s,shared:u,threads:e.threads.reduce((y,b,g)=>{let m=JG(b,c,t[g],g,o,i,n,d);return m!==null&&(a.set(g,y.length),y.push(m)),y},[]),counters:e.counters?e.counters.reduce((y,b,g)=>{if(o.shouldRemoveCounters.has(g))return f=!0,y;let m=YG(b,o,a);return m!==null&&y.push(m),y},[]):void 0,profilerOverhead:e.profilerOverhead?e.profilerOverhead.reduce((y,b)=>{let g=a.get(b.mainThreadIndex);return g!==void 0&&y.push({...b,mainThreadIndex:g}),y},[]):void 0};if(o.shouldFilterToCommittedRange!==null){let{start:y,end:b}=o.shouldFilterToCommittedRange;p.meta.profilingStartTime=y,p.meta.profilingEndTime=b}let h=R_(p);return{profile:h.profile,isSanitized:!0,committedRanges:o.shouldFilterToCommittedRange?[]:null,translationMaps:{oldThreadIndexToNew:a.size===e.threads.length&&!f?null:a,oldFuncCount:e.shared.funcTable.length,newFuncCount:h.profile.shared.funcTable.length,...h.translationMaps}}}function Yu(e){switch(e.meta.updateChannel){case"esr":case"release":case"beta":return!0;default:return!1}}function JG(e,t,r,n,o,a,i,s){if(o.shouldRemoveThreads.has(n)||o.shouldRemovePrivateBrowsingData&&e.isPrivateBrowsing)return null;let l=Zf(e.markers),c=new Set;if(o.shouldRemoveUrls||o.shouldRemovePreferenceValues||o.shouldRemoveExtensions||o.shouldRemoveThreadsWithScreenshots.size>0||o.shouldRemovePrivateBrowsingData)for(let f=0;f<l.length;f++){let p=l.data[f];if(o.shouldRemovePreferenceValues&&p&&p.type==="PreferenceRead"&&(l.data[f]=lI(p)),p&&o.shouldRemoveUrls){let h=vs(i,p);if(h&&(p=l.data[f]=dI(h,p)),p.type==="Network"){l.data[f]=sI(p);let b=t.getString(l.name[f]).replace(/:.*/,"");l.name[f]=t.indexForString(b)}p.type==="Text"&&(l.data[f]=cI(p),p=l.data[f])}if(o.shouldRemoveExtensions&&p&&p.type==="Text"){let h=t.getString(l.name[f]);l.data[f]=uI(h,p)}o.shouldRemoveThreadsWithScreenshots.has(n)&&p&&p.type==="CompositorScreenshot"&&c.add(f),o.shouldRemovePrivateBrowsingData&&(p&&p.type==="Network"&&p.isPrivateBrowsing&&c.add(f),p&&"innerWindowID"in p&&p.innerWindowID&&a.has(p.innerWindowID)&&c.add(f))}let u;if(c.size>0||o.shouldFilterToCommittedRange!==null)if(l=rI(l,r,c,o.shouldFilterToCommittedRange).rawMarkerTable,o.shouldFilterToCommittedRange!==null){let{start:f,end:p}=o.shouldFilterToCommittedRange;if(e.registerTime>p||e.unregisterTime&&e.unregisterTime<f)return null;u=np(e,f,p)}else u={...e};else u={...e};o.shouldRemoveUrls&&u["eTLD+1"]&&delete u["eTLD+1"],delete u.tracedValuesBuffer,delete u.tracedObjectShapes;let{samples:d}=u;if(s!==null&&a.size>0){let f=u.samples={...d,stack:d.stack.slice()};for(let p=0;p<d.length;p++){let h=d.stack[p];if(h===null)continue;if(s[h]===nm){f.stack[p]=null;continue}}}return u.markers=l,M_(u)||!M_(e)?u:null}function M_(e){return e.markers.length>0?!0:e.samples.stack.some(n=>n!==null)}function YG(e,t,r){let n=r.get(e.mainThreadIndex);if(n===void 0)return null;let o=e;if(t.shouldFilterToCommittedRange!==null){let{start:a,end:i}=t.shouldFilterToCommittedRange;o=LS(o,a,i)}return{...o,mainThreadIndex:n}}function O_(){return{includeHiddenThreads:!1,includeAllTabs:!1,includeFullTimeRange:!1,includeScreenshots:!1,includeUrls:!1,includeExtension:!1,includePreferenceValues:!1,includePrivateBrowsingData:!1}}function XG(){return{includeHiddenThreads:!0,includeAllTabs:!0,includeFullTimeRange:!0,includeScreenshots:!0,includeUrls:!0,includeExtension:!0,includePreferenceValues:!0,includePrivateBrowsingData:!1}}var QG=(e=O_(),t)=>{switch(t.type){case"PROFILE_LOADED":return Yu(t.profile)?O_():XG();case"UPDATE_SHARING_OPTION":return{...e,[t.slug]:t.value};default:return e}},eW=(e="local",t)=>{switch(t.type){case"UPLOAD_COMPRESSION_STARTED":return"compressing";case"UPLOAD_STARTED":return"uploading";case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return"uploaded";case"UPLOAD_FAILED":return"error";case"UPLOAD_ABORTED":case"UPLOAD_RESET":return"local";default:return e}},tW=(e=0,t)=>{switch(t.type){case"UPDATE_UPLOAD_PROGRESS":return t.uploadProgress;case"UPLOAD_STARTED":case"UPLOAD_ABORTED":case"UPLOAD_RESET":case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"UPLOAD_COMPRESSION_STARTED":case"UPLOAD_FAILED":return 0;default:return e}},rW=(e=null,t)=>{switch(t.type){case"UPLOAD_FAILED":return t.error;case"UPLOAD_COMPRESSION_STARTED":return null;default:return e}},L_=()=>{},nW=(e=L_,t)=>{switch(t.type){case"UPLOAD_ABORTED":case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"UPLOAD_FAILED":return L_;case"UPLOAD_COMPRESSION_STARTED":return t.abortFunction;default:return e}},oW=(e=0,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"UPLOAD_ABORTED":case"UPLOAD_FAILED":case"HIDE_STALE_PROFILE":return e+1;default:return e}},aW=_t({phase:eW,uploadProgress:tW,abortFunction:nW,error:rW,generation:oW}),iW=(e=null,t)=>{switch(t.type){case"SANITIZED_PROFILE_PUBLISHED":case"PROFILE_PUBLISHED":return t.prePublishedState;case"REVERT_TO_PRE_PUBLISHED_STATE":return null;default:return e}},sW=(e=!1,t)=>{switch(t.type){case"HIDE_STALE_PROFILE":return!0;case"VIEW_FULL_PROFILE":return!1;default:return e}},lW=(e=!1,t)=>t.type==="HIDE_STALE_PROFILE"?!0:e,cW=(e={phase:"INITIAL"},t)=>{switch(t.type){case"SANITIZED_PROFILE_ENCODING_STARTED":{let{sanitizedProfile:r}=t;return{phase:"ENCODING",sanitizedProfile:r}}case"SANITIZED_PROFILE_ENCODING_COMPLETED":{let{sanitizedProfile:r,profileData:n}=t;return e.phase==="ENCODING"&&e.sanitizedProfile===r?{phase:"DONE",sanitizedProfile:r,profileData:n}:e}case"SANITIZED_PROFILE_ENCODING_FAILED":{let{sanitizedProfile:r,error:n}=t;return e.phase==="ENCODING"&&e.sanitizedProfile===r?{phase:"ERROR",sanitizedProfile:r,error:n}:e}default:return e}},uW=_t({checkedSharingOptions:QG,sanitizedProfileEncodingState:cW,upload:aW,isHidingStaleProfile:sW,hasSanitizedProfile:lW,prePublishedState:iW}),D_=uW;var dW=(e=new Map,t)=>{switch(t.type){case"SOURCE_CODE_LOADING_BEGIN_URL":{let{sourceIndex:r,url:n}=t,o=new Map(e);return o.set(r,{type:"LOADING",source:{type:"URL",url:n}}),o}case"SOURCE_CODE_LOADING_BEGIN_BROWSER_CONNECTION":{let{sourceIndex:r}=t,n=new Map(e);return n.set(r,{type:"LOADING",source:{type:"BROWSER_CONNECTION"}}),n}case"SOURCE_CODE_LOADING_SUCCESS":{let{sourceIndex:r,code:n}=t,o=new Map(e);return o.set(r,{type:"AVAILABLE",code:n}),o}case"SOURCE_CODE_LOADING_ERROR":{let{sourceIndex:r,errors:n}=t,o=new Map(e);return o.set(r,{type:"ERROR",errors:n}),o}case"SANITIZED_PROFILE_PUBLISHED":{if(!t.translationMaps)return e;let{oldSourceToNewSourcePlusOne:r}=t.translationMaps,n=new Map;for(let[o,a]of e){let i=r[o];if(i===0)continue;let s=i-1;n.set(s,a)}return n}default:return e}},fW=(e=new Map,t)=>{switch(t.type){case"ASSEMBLY_CODE_LOADING_BEGIN_URL":{let{nativeSymbolKey:r,url:n}=t,o=new Map(e);return o.set(r,{type:"LOADING",source:{type:"URL",url:n}}),o}case"ASSEMBLY_CODE_LOADING_BEGIN_BROWSER_CONNECTION":{let{nativeSymbolKey:r}=t,n=new Map(e);return n.set(r,{type:"LOADING",source:{type:"BROWSER_CONNECTION"}}),n}case"ASSEMBLY_CODE_LOADING_SUCCESS":{let{nativeSymbolKey:r,instructions:n}=t,o=new Map(e);return o.set(r,{type:"AVAILABLE",instructions:n}),o}case"ASSEMBLY_CODE_LOADING_ERROR":{let{nativeSymbolKey:r,errors:n}=t,o=new Map(e);return o.set(r,{type:"ERROR",errors:n}),o}default:return e}},pW=_t({sourceCodeCache:dW,assemblyCodeCache:fW}),B_=pW;var hW=e=>(t,r)=>r.type==="REVERT_TO_PRE_PUBLISHED_STATE"?r.prePublishedState:e(t,r),mW=hW(_t({app:C_,profileView:tv,urlState:au,icons:E_,zippedProfiles:A_,publish:D_,code:B_})),U_=mW;function om(){let e=null;process.env.NODE_ENV==="development"&&(e=(0,$_.createLogger)({collapsed:!0,titleFormatter:(n,o,a)=>`[action] ${n.type} (in ${a.toFixed(2)} ms)`,logErrors:!1,duration:!0}));let t=w_,r=e?Bp(t,e):Bp(t);return Dp(U_,r)}var Pq=ce(Ir());var Gd=ce(Ir());xe();var Vs=class e extends Error{attempt;constructor(t,r=null){super(t),this.__proto__=e.prototype,this.name="TemporaryError",this.attempt=r}};rr();function tA(e){return`https://storage.googleapis.com/${nS}/${e}`}function rA(e){try{let t;e.startsWith("http://")||e.startsWith("https://")?t=new URL(e).pathname:t=e;let r=t.split("/").filter(n=>n);if(r[0]==="from-url"&&r[1])return decodeURIComponent(r[1]);if(r[0]==="public"&&r[1]){let n=r[1];return tA(n)}return null}catch(t){return console.error("Failed to parse profiler URL:",t),null}}function Z4(e){return new Promise(t=>setTimeout(t,e))}function J4(e,t){if(typeof navigator>"u"||!navigator.userAgent.match(/Safari\/\d+\.\d+/))return!1;try{let r=new URL(e);return t.name==="TypeError"&&r.protocol==="http:"&&oo(r)&&typeof location<"u"&&location.protocol==="https:"}catch{return!1}}var Kg=class extends Error{name="SafariLocalhostHTTPLoadError"};function nA(e,t){return t==="application/zip"||t==="application/json"?t:e.match(/\.zip$/)?"application/zip":e.match(/\.json/)?"application/json":null}async function oA(e){let t=new Uint8Array(e);Za(t)&&(t=await Ka(t));let r=new TextDecoder;return JSON.parse(r.decode(t))}async function Y4(e,t,r){let n=null;try{return n=await e.arrayBuffer(),await oA(n)}catch(o){let a;if(o&&typeof o=="object"&&o.name==="AbortError")a="The network request to load the profile was aborted.";else if(r==="application/json")a="The profile\u2019s JSON could not be decoded.";else{if(r===null&&n!==null)return n;a=Gd.oneLine`
676
676
  The profile could not be downloaded and decoded. This does not look like a supported file
677
677
  type.
678
- `}throw t(a),t("JSON parsing error:",o),t("Fetch response:",e),new Error(`${a} The full error information has been printed out to the DevTool\u2019s console.`)}}async function q4(e,t){let r=await e.arrayBuffer(),n=new Uint8Array(r);try{let{default:o}=await Promise.resolve().then(()=>ce(XN()));return await o.loadAsync(n)}catch(o){let a="Unable to open the archive file.";throw t(a),t("Error:",o),t("Fetch response:",e),new Error(`${a} The full error information has been printed out to the DevTool\u2019s console.`)}}async function z4(e,t,r){let n=tA(e,t.headers.get("content-type"));switch(n){case"application/zip":return{responseType:"ZIP",zip:await q4(t,r)};case"application/json":case null:return{responseType:"PROFILE",profile:await j4(t,r,n)};default:throw ae(n)}}async function qg(e){let r=0,{url:n,onTemporaryError:o}=e,a=e.reportError||console.error;for(;;){let i;try{i=await fetch(n)}catch(s){throw V4(n,s)?new jg:s}if(i.ok)return z4(n,i,a);if(i.status!==403)throw new Error(Bd.oneLine`
678
+ `}throw t(a),t("JSON parsing error:",o),t("Fetch response:",e),new Error(`${a} The full error information has been printed out to the DevTool\u2019s console.`)}}async function X4(e,t){let r=await e.arrayBuffer(),n=new Uint8Array(r);try{let{default:o}=await Promise.resolve().then(()=>ce(eA()));return await o.loadAsync(n)}catch(o){let a="Unable to open the archive file.";throw t(a),t("Error:",o),t("Fetch response:",e),new Error(`${a} The full error information has been printed out to the DevTool\u2019s console.`)}}async function Q4(e,t,r){let n=nA(e,t.headers.get("content-type"));switch(n){case"application/zip":return{responseType:"ZIP",zip:await X4(t,r)};case"application/json":case null:return{responseType:"PROFILE",profile:await Y4(t,r,n)};default:throw ae(n)}}async function Zg(e){let r=0,{url:n,onTemporaryError:o}=e,a=e.reportError||console.error;for(;;){let i;try{i=await fetch(n)}catch(s){throw J4(n,s)?new Kg:s}if(i.ok)return Q4(n,i,a);if(i.status!==403)throw new Error(Gd.oneLine`
679
679
  Could not fetch the profile on remote server.
680
680
  Response was: ${i.status} ${i.statusText}.
681
- `);if(r++===10)break;o(new Hs("Profile not found on remote server.",{count:r,total:11})),await H4(1e3)}throw new Error(Bd.oneLine`
681
+ `);if(r++===10)break;o(new Vs("Profile not found on remote server.",{count:r,total:11})),await Z4(1e3)}throw new Error(Gd.oneLine`
682
682
  Could not fetch the profile on remote server:
683
683
  still not found after ${10} seconds.
684
- `)}xe();var K4=10;function nA(e,t,r){let[n,o,a]=t,i=Uint32Array.from(e);i.sort();let s=new TextDecoder,l=new Map,c,u="",d;for(let f=0;f<i.length;f++){let p=i[f],h=Kf(n,p,c)-1;if(h>=0){if(h!==c){let y=o[h],b=o[h+1],m=a.subarray(y,b);u=r(s.decode(m)),d=h<n.length-1?n[h+1]-n[h]:void 0,c=h}l.set(p,{symbolAddress:n[h],name:u,functionSize:d})}else l.set(p,{symbolAddress:0,name:"<before first symbol>"})}return l}function Z4(e,t,r,n){let o=[];for(let a of e){let i=n(a),s=o.find(({value:l,elements:c})=>l+i<=t&&c.length+1<=r);s===void 0&&(s={value:0,elements:[]},o.push(s)),s.elements.push(a),s.value+=i}return o.map(({elements:a})=>a)}var Ud=class{_symbolProvider;constructor(t){this._symbolProvider=t}async getSymbols(t,r,n,o=!1){t=t.filter(s=>{let{debugName:l,breakpadId:c}=s.lib;return l===""||c===""?(n(s,new $o(`Failed to symbolicate library ${l}/${c}`,s.lib,new Error("Invalid debugName or breakpadId"))),!1):!0});let i=Z4(t,1e4,K4,({addresses:s})=>s.size).map(s=>[s,this._symbolProvider.requestSymbolsFromServer(s)]);await Promise.all(i.map(async([s,l])=>{let c=new Map(t.map(y=>[y,[]])),u=await this._processSuccessfulResponsesAndReturnRemaining(s,l,c,r);if(u.length===0)return;let d=this._symbolProvider.requestSymbolsFromBrowser(u),f=await this._processSuccessfulResponsesAndReturnRemaining(u,d,c,r);if(f.length===0)return;let p=Promise.all(f.map(async y=>{try{let{lib:b}=y,m=await this._symbolProvider.requestSymbolsViaSymbolTableFromBrowser(y,o);return{type:"SUCCESS",lib:b,results:m}}catch(b){return{type:"ERROR",request:y,error:b}}})),h=await this._processSuccessfulResponsesAndReturnRemaining(f,p,c,r);if(h.length!==0)for(let y of h){let{lib:b}=y;n(y,new $o(`Could not obtain symbols for ${b.debugName}/${b.breakpadId}.`,b,...c.get(y)??[]))}}))}async _processSuccessfulResponsesAndReturnRemaining(t,r,n,o){try{let a=await r,i=[];for(let s=0;s<a.length;s++){let l=a[s];if(l.type==="SUCCESS"){let{lib:c,results:u}=l;o(c,u)}else{let{request:c,error:u}=l;i.push(c),W(n.get(c)).push(u)}}return i}catch(a){for(let i of t)W(n.get(i)).push(a);return t}}};var qn;function oA(e){return{lang:(e==null?void 0:e.lang)??(qn==null?void 0:qn.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(qn==null?void 0:qn.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(qn==null?void 0:qn.abortPipeEarly)}}var zg;function J4(e){return zg==null?void 0:zg.get(e)}var Kg;function Y4(e){return Kg==null?void 0:Kg.get(e)}var Zg;function X4(e,t){var r;return(r=Zg==null?void 0:Zg.get(e))==null?void 0:r.get(t)}function Q4(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function ca(e,t,r,n,o){let a=o&&"input"in o?o.input:r.value,i=(o==null?void 0:o.expected)??e.expects??null,s=(o==null?void 0:o.received)??Q4(a),l={kind:e.kind,type:e.type,input:a,expected:i,received:s,message:`Invalid ${t}: ${i?`Expected ${i} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:o==null?void 0:o.path,issues:o==null?void 0:o.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",u=(o==null?void 0:o.message)??e.message??X4(e.reference,l.lang)??(c?Y4(l.lang):null)??n.message??J4(l.lang);u!==void 0&&(l.message=typeof u=="function"?u(l):u),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ko(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},oA())}}}function eq(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}var tq=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};var RY=new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation}))*)+$","u");function rq(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Jg(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ei(e,t){return{kind:"schema",type:"array",reference:Ei,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ko(this)},"~run"(r,n){var a;let o=r.value;if(Array.isArray(o)){r.typed=!0,r.value=[];for(let i=0;i<o.length;i++){let s=o[i],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:o,key:i,value:s};for(let u of l.issues)u.path?u.path.unshift(c):u.path=[c],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else ca(this,"type",r,n);return r}}}function Yg(e){return{kind:"schema",type:"boolean",reference:Yg,expects:"boolean",async:!1,message:e,get"~standard"(){return ko(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:ca(this,"type",t,r),t}}}function Xg(e,t){return{kind:"schema",type:"nullable",reference:Xg,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ko(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=Jg(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function kl(e){return{kind:"schema",type:"number",reference:kl,expects:"number",async:!1,message:e,get"~standard"(){return ko(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ca(this,"type",t,r),t}}}function Ni(e,t){return{kind:"schema",type:"object",reference:Ni,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ko(this)},"~run"(r,n){var a;let o=r.value;if(o&&typeof o=="object"){r.typed=!0,r.value={};for(let i in this.entries){let s=this.entries[i];if(i in o||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=i in o?o[i]:Jg(s),c=s["~run"]({value:l},n);if(c.issues){let u={type:"object",origin:"value",input:o,key:i,value:l};for(let d of c.issues)d.path?d.path.unshift(u):d.path=[u],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[i]=c.value}else if(s.fallback!==void 0)r.value[i]=rq(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(ca(this,"key",r,n,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:o,key:i,value:o[i]}]}),n.abortEarly))break}}else ca(this,"type",r,n);return r}}}function Xr(e,t){return{kind:"schema",type:"optional",reference:Xr,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ko(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Jg(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Qg(e,t,r){return{kind:"schema",type:"record",reference:Qg,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ko(this)},"~run"(n,o){var i,s;let a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(let l in a)if(eq(a,l)){let c=a[l],u=this.key["~run"]({value:l},o);if(u.issues){let f={type:"object",origin:"key",input:a,key:l,value:c};for(let p of u.issues)p.path=[f],(i=n.issues)==null||i.push(p);if(n.issues||(n.issues=u.issues),o.abortEarly){n.typed=!1;break}}let d=this.value["~run"]({value:c},o);if(d.issues){let f={type:"object",origin:"value",input:a,key:l,value:c};for(let p of d.issues)p.path?p.path.unshift(f):p.path=[f],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),o.abortEarly){n.typed=!1;break}}(!u.typed||!d.typed)&&(n.typed=!1),u.typed&&(n.value[u.value]=d.value)}}else ca(this,"type",n,o);return n}}}function Qr(e){return{kind:"schema",type:"string",reference:Qr,expects:"string",async:!1,message:e,get"~standard"(){return ko(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:ca(this,"type",t,r),t}}}function aA(e,t,r){let n=e["~run"]({value:t},oA(r));if(n.issues)throw new tq(n.issues);return n.value}var oq=Qg(Qr(),Xg(Yg())),aq=Ni({function:Xr(Qr()),file:Xr(Qr()),line:Xr(kl())}),iq=Ni({module_offset:Qr(),module:Qr(),frame:kl(),function:Xr(Qr()),function_offset:Xr(Qr()),function_size:Xr(Qr()),file:Xr(Qr()),line:Xr(kl()),inlines:Xr(Ei(aq))}),sq=Ei(iq),lq=Ni({found_modules:oq,stacks:Ei(sq)}),cq=Ni({results:Ei(lq)});function uq(e){return aA(cq,e)}function dq(e,t,r,n){let{lib:o}=t,{debugName:a,breakpadId:i}=o;if(!n.found_modules[`${a}/${i}`])throw new Error(`The ${e} does not have symbols for ${a}/${i}.`);let s=n.stacks[0];if(s.length!==r.length)throw new Error(`The result from the ${e} has an unexpected length.`);let l=new Map;for(let c=0;c<s.length;c++){let u=r[c],d=s[c],f;if(d.function!==void 0&&d.function_offset!==void 0){let p=d.function,h=parseInt(d.function_offset.substr(2),16),y;if(d.inlines!==void 0){let m=d.inlines.length;y=d.inlines.map(({function:g,file:T,line:S},I)=>{let v=m-I;return{name:g??`<unknown at ${d.module_offset} at inline depth ${v}>`,file:T,line:S}})}let b;d.function_size!==void 0&&(b=parseInt(d.function_size.substr(2),16)),f={name:p,symbolAddress:u-h,file:d.file,line:d.line,inlines:y,functionSize:b}}else f={name:`<unknown at ${d.module_offset}>`,symbolAddress:u};l.set(u,f)}return l}async function iA(e,t,r){let n=t.map(i=>({request:i,addressArray:Array.from(i.addresses)})),o={jobs:n.map(({request:i,addressArray:s})=>{let{debugName:l,breakpadId:c}=i.lib;return{memoryMap:[[l,c]],stacks:[s.map(u=>[0,u])]}})},a=uq(await r("/symbolicate/v5",JSON.stringify(o)));return n.map(({request:i,addressArray:s},l)=>{let c=a.results[l];try{let{lib:u}=i,d=dq(e,i,s,c);return{type:"SUCCESS",lib:u,results:d}}catch(u){return{type:"ERROR",request:i,error:u}}})}cr();var ua=ce(Kt()),uA=ce(lA());xe();var dA=e=>e.publish,mq=e=>dA(e).checkedSharingOptions,VY=(0,ua.createSelector)(ge,fr,(e,t)=>{let{startTime:r,product:n}=e.meta,o=f=>f<10?`0${f}`:`${f}`,a=new Date(r+t.start),i=o(a.getFullYear()),s=o(a.getMonth()+1),l=o(a.getDate()),c=o(a.getHours()),u=o(a.getMinutes()),d=`${i}-${s}-${l} ${c}.${u}`;return`${n} ${d} profile.json`}),gq=(0,ua.createSelector)(mq,ge,pr,Nn,lo,Pn,Rn,rv,sv,(e,t,r,n,o,a,i,s,l)=>{let c=!0;for(let[f,p]of Object.entries(e))f==="includePreferenceValues"&&!s||f==="includePrivateBrowsingData"&&!l||(c=c&&p);if(c)return null;let u=new Set,d=new Set;if(!e.includeHiddenThreads){for(let f of n){let p=a[f];if(p.type==="process"){p.mainThreadIndex!==null&&u.add(p.mainThreadIndex);let h=W(i.get(p.pid),"Expected to be able to get a local track by PID.");for(let y of h)y.type==="thread"&&u.add(y.threadIndex)}}for(let[f,p]of o){let h=W(i.get(f),"Expected to be able to get a local track by PID");for(let y of p){let b=h[y];b.type==="thread"?u.add(b.threadIndex):"counterIndex"in b&&typeof b.counterIndex=="number"&&d.add(b.counterIndex)}}}return{shouldFilterToCommittedRange:e.includeFullTimeRange?null:r,shouldRemoveUrls:!e.includeUrls,shouldRemoveThreadsWithScreenshots:new Set(e.includeScreenshots?[]:t.threads.map((f,p)=>p)),shouldRemoveThreads:u,shouldRemoveCounters:d,shouldRemoveExtensions:!e.includeExtension,shouldRemovePreferenceValues:!e.includePreferenceValues,shouldRemovePrivateBrowsingData:!e.includePrivateBrowsingData}}),cA=null,ey=null;function yq(e){let t=Wt(e);return(cA!==t||ey===null)&&(cA=t,ey=Wt(e).map((r,n)=>ht(n).getDerivedMarkerInfo(e))),ey}var jY=(0,ua.createSelector)(ge,yq,gq,ft,R_);var bq=e=>dA(e).upload;var Tq=(0,ua.createSelector)(bq,({uploadProgress:e})=>(0,uA.default)(e,.1,.95));var qY=(0,ua.createSelector)(Tq,e=>dt(e,0,0,"percent"));var zY=(0,ua.createSelector)(ge,Ku);var ty=ce(Kt());var ZY=(0,ty.createSelector)(Ns,Ho,Wt,(e,t,r)=>e!==void 0&&(t.configuration&&t.configuration.features.includes("cpu")||r.some(n=>n.samples.threadCPUDelta!==void 0))),JY=(0,ty.createSelector)(jp,e=>e!==null&&e.some(t=>t.category==="CPU"));var _l=ce(Kt());var Iq=e=>e.code.sourceCodeCache,QY=(0,_l.createSelector)(Iq,so,(e,t)=>t!==null?e.get(t):void 0),vq=e=>e.code.assemblyCodeCache,fA=(0,_l.createSelector)(Ua,Es,(e,t)=>t===null||e===null||t.libs.length===0?null:t.libs[e.libIndex]),eX=(0,_l.createSelector)(Ua,fA,(e,t)=>e!==null&&t!==null),tX=(0,_l.createSelector)(vq,Ua,fA,(e,t,r)=>{if(t===null||r===null)return;let{debugName:n,breakpadId:o}=r,a=t.address.toString(16),i=`${n}/${o}/${a}`;return e.get(i)});function pA(e){return{type:"FATAL_ERROR",error:e}}xe();var hA=new Set,kq=0;function mA(e){return t=>{let r=[];for(let n of e){if(!n||hA.has(n))continue;hA.add(n);let o=`favicon-${++kq}`;r.push({icon:n,className:o})}t({type:"ICON_BATCH_ADD",icons:r})}}xe();var Cl=class{_dbPromise;_maxCount;_maxAge;constructor(t,r=200,n=12096e5){this._dbPromise=this._setupDB(t),this._maxCount=r,this._maxAge=n}_getDB(){return this._dbPromise?this._dbPromise:Promise.reject(new Error("The database is closed."))}_setupDB(t){let r=window.indexedDB;if(!r)throw new Error("Could not find indexedDB on the window object.");return new Promise((n,o)=>{let a=r.open(t,2);a.onerror=()=>{if(a.error&&a.error.name==="VersionError"){let i=r.deleteDatabase(t);i.onerror=()=>o(i.error),i.onsuccess=()=>{this._setupDB(t).then(n,o)}}else o(a.error)},a.onupgradeneeded=({oldVersion:i})=>{let s=a.result;s.onerror=o,i===1&&s.deleteObjectStore("symbol-tables"),s.createObjectStore("symbol-tables",{keyPath:["debugName","breakpadId"]}).createIndex("lastUsedDate","lastUsedDate")},a.onblocked=()=>{o(new Error("The symbol store database could not be upgraded because it is open in another tab. Please close all your other profiler.firefox.com tabs and refresh."))},a.onsuccess=()=>{let i=a.result;i.onversionchange=()=>{i.close()},n(i),this._deleteAllBeforeDate(i,new Date(+new Date-this._maxAge)).catch(s=>{console.error("Encountered error while cleaning out database:",s)})}})}storeSymbolTable(t,r,[n,o,a]){return this._getDB().then(i=>new Promise((s,l)=>{let c=i.transaction("symbol-tables","readwrite");c.onerror=()=>l(c.error);let u=c.objectStore("symbol-tables");this._deleteLeastRecentlyUsedUntilCountIsNoMoreThanN(u,this._maxCount-1,()=>{let d=new Date,f=u.put({debugName:t,breakpadId:r,addrs:n,index:o,buffer:a,lastUsedDate:d});f.onsuccess=()=>s()})}))}getSymbolTable(t,r){return this._getDB().then(n=>new Promise((o,a)=>{let i=n.transaction("symbol-tables","readwrite");i.onerror=()=>a(i.error);let l=i.objectStore("symbol-tables").openCursor([t,r]);l.onsuccess=()=>{let c=l.result;if(c){let u=c.value;u.lastUsedDate=new Date;let d=c.update(u),{addrs:f,index:p,buffer:h}=u;d.onsuccess=()=>o([f,p,h])}else o(null)}}))}close(){return this._getDB().then(t=>{t.close(),this._dbPromise=null})}_deleteAllBeforeDate(t,r){return new Promise((n,o)=>{let a=t.transaction("symbol-tables","readwrite");a.onerror=()=>o(a.error);let i=a.objectStore("symbol-tables");this._deleteRecordsLastUsedBeforeDate(i,r,n)})}_deleteRecordsLastUsedBeforeDate(t,r,n){let o=t.index("lastUsedDate"),a=window.IDBKeyRange.upperBound(r,!0),i=o.openCursor(a);i.onsuccess=()=>{let s=i.result;s?s.delete().onsuccess=()=>{s.continue()}:n()}}_deleteNLeastRecentlyUsedRecords(t,r,n){let a=t.index("lastUsedDate").openCursor(),i=0;a.onsuccess=()=>{let s=a.result;if(s){let l=s.delete();l.onsuccess=()=>{i++,i<r?s.continue():n()}}else n()}}_count(t,r){let n=t.count();n.onsuccess=()=>r(n.result)}_deleteLeastRecentlyUsedUntilCountIsNoMoreThanN(t,r,n){this._count(t,o=>{if(o>r){let a=o-r;this._deleteNLeastRecentlyUsedRecords(t,a,n)}else n()})}};function ay(e,t={},r=!1){return async n=>{if(e.threads.length===0){console.error("This profile has no threads.",e),n(pA(new Error("No threads were captured in this profile, there is nothing to display.")));return}n({type:"PROFILE_LOADED",profile:e,pathInZipFile:t.pathInZipFile??null,implementationFilter:t.implementationFilter??null,transformStacks:t.transformStacks??null}),r===!1&&await n(Gd(t.browserConnection??null,t.skipSymbolication))}}function Gd(e=null,t){return async(r,n)=>{if(t&&process.env.NODE_ENV!=="test")throw new Error("Please do not use skipSymbolication outside of tests");let o=Es(n());if(o===null||Zp(n()).phase!=="PROFILE_LOADED")return;let a=Up(n()),i=o.pages;r(Cq(o,a));let s=null;e&&i&&i.length>0&&(s=Fq(r,i,e));let l=null;if(!t&&o.meta.symbolicated===!1){let c=Rq(r,KI(n()),e);c&&(l=Mq(r,o,c))}await Promise.all([s,l])}}function Cq(e,t){return(r,n)=>{let o=t!==null,a=qp(n()),i=o?WI(n()):null,s=fx(e,i,a),l=dx(e,s),c=zp(n()),u=UI(n()),d=px(s,o?$p(n()):null,u,c),f=ux(o?GI(n()):null,l,u,e),p={globalTracks:s,globalTrackOrder:d,localTracksByPid:l,localTrackOrderByPid:f},h=null,y=$I(n());y!==null?h=mx(p,y,e):o&&(h=gx(p,Nn(n()),lo(n()))),h===null&&(h=yx(p,e,c,i===null));let b=hx(t,np(p,h),e,c),m=null;o||(m=YS(e));let g=$a(n());if(no.includes(g)){let T=!1;for(let S of b){let I=e.threads[S],{samples:v,jsAllocations:w,nativeAllocations:k}=I;if(T=[v,w,k].some(N=>eo(N==null?void 0:N.stack,e.shared)),T)break}T||(g="marker-chart")}vI(()=>{r({type:"VIEW_FULL_PROFILE",selectedThreadIndexes:b,selectedTab:g,globalTracks:s,globalTrackOrder:d,localTracksByPid:l,localTrackOrderByPid:f,timelineType:m,...h})})}}function gA(e){return{type:"REQUESTING_SYMBOL_TABLE",requestedLib:e}}function ry(e){return{type:"RECEIVED_SYMBOL_TABLE_REPLY",requestedLib:e}}function Eq(){return{type:"START_SYMBOLICATING"}}function Nq(){return{type:"DONE_SYMBOLICATING"}}function Aq(e){return(t,r)=>{let{threads:n,shared:o}=ge(r()),{threads:a,shared:i,oldFuncToNewFuncsMap:s}=JI(n,o,e);t({type:"BULK_SYMBOLICATION",oldFuncToNewFuncsMap:s,symbolicatedThreads:a,symbolicatedShared:i})}}var $d;typeof window=="object"&&window.requestIdleCallback?$d=window.requestIdleCallback:typeof process=="object"&&process.nextTick?$d=process.nextTick:$d=e=>setTimeout(e,0);var ny=class{_updates;_updateObservers;_requestedUpdate;constructor(){this._updates=[],this._updateObservers=[],this._requestedUpdate=!1}_scheduleUpdate(t){this._requestedUpdate||($d(()=>this._dispatchUpdate(t),{timeout:2e3}),this._requestedUpdate=!0)}_dispatchUpdate(t){let r=this._updates,n=this._updateObservers;this._updates=[],this._updateObservers=[],this._requestedUpdate=!1,t(Aq(r));for(let o of n)o()}enqueueSingleSymbolicationStep(t,r,n){this._scheduleUpdate(t),this._updates.push(r),this._updateObservers.push(n)}},Pq=new ny;function Rq(e,t,r){if(typeof window>"u"||!window.indexedDB)return null;let n=new oy("perf-html-async-storage",e,t,r);return new Ud(n)}var oy=class{_dispatch;_symbolServerUrl;_browserConnection;_symbolDb;_demangleCallback=null;constructor(t,r,n,o){this._dispatch=r,this._symbolServerUrl=n,this._browserConnection=o,this._symbolDb=new Cl(`${t}-symbol-tables`)}async _makeSymbolicationAPIRequestWithCallback(t,r,n){for(let{lib:o}of r)this._dispatch(gA(o));try{return await iA(t,r,n)}catch(o){throw new Error(`There was a problem with the symbolication API request to the ${t}: ${o.message}`)}finally{for(let{lib:o}of r)this._dispatch(ry(o))}}requestSymbolsFromServer(t){return this._makeSymbolicationAPIRequestWithCallback("symbol server",t,async(r,n)=>(await fetch(this._symbolServerUrl+r,{body:n,method:"POST",mode:"cors",headers:new Headers({"User-Agent":`FirefoxProfiler/1.0 (+${location.origin})`})})).json())}async requestSymbolsFromBrowser(t){if(this._browserConnection===null)throw new Error("No connection to the browser, cannot run querySymbolicationApi");let r=this._browserConnection;return this._makeSymbolicationAPIRequestWithCallback("browser",t,async(n,o)=>JSON.parse(await r.querySymbolicationApi(n,o)))}async _createDemangleCallback(){try{let{demangle_any:t}=await import("gecko-profiler-demangle");return t}catch(t){return console.error("Demangling module could not be imported.",t),r=>r}}async _getDemangleCallback(){return this._demangleCallback??=await this._createDemangleCallback()}async requestSymbolsViaSymbolTableFromBrowser(t,r){let n=await this._getDemangleCallback(),{lib:o,addresses:a}=t,{debugName:i,breakpadId:s}=o,l=null;return r||(l=await this._symbolDb.getSymbolTable(i,s)),l===null&&(l=await this._requestSymbolTableFromBrowser(o),this._storeSymbolTableInDB(o,l)),nA(a,l,n)}async _requestSymbolTableFromBrowser(t){if(this._browserConnection===null)throw new Error("No connection to the browser, cannot obtain symbol tables");let{debugName:r,breakpadId:n}=t;this._dispatch(gA(t));try{let o=await this._browserConnection.getSymbolTable(r,n);return this._dispatch(ry(t)),o}catch(o){throw this._dispatch(ry(t)),o}}async _storeSymbolTableInDB(t,r){let{debugName:n,breakpadId:o}=t;try{await this._symbolDb.storeSymbolTable(n,o,r)}catch(a){console.log(`Failed to store the symbol table for ${n} in the database:`,a)}}};async function Mq(e,t,r,n){e(Eq());let o=[];await YI(t,r,a=>{o.push(new Promise(i=>{Pq.enqueueSingleSymbolicationStep(e,a,()=>i(void 0))}))},n),await Promise.all(o),e(Nq())}async function Fq(e,t,r){let n=[...t],o=await r.getPageFavicons(n.map(s=>s.url));if(n.length!==o.length)return;let a=o.map(s=>s?Hv(s.data,s.mimeType):Promise.resolve(null)),i=await Promise.all(a);for(let s=0;s<o.length;s++)i[s]&&(n[s]={...n[s],favicon:i[s]});e(mA(i)),e({type:"UPDATE_PAGES",newPages:n})}function Oq(e){return e.startsWith("http://")||e.startsWith("https://")}async function Lq(e){return(await fetch(e,{method:"HEAD",redirect:"follow"})).url}async function bA(e){let t=tm();if(console.log(`Loading profile from ${e}`),Oq(e)){let i=e;if(e.includes("profiler.firefox.com")||e.includes("share.firefox.dev")){e.includes("share.firefox.dev")&&(console.log("Following redirect from short URL..."),i=await Lq(e),console.log(`Redirected to: ${i}`));let d=eA(i);if(d)console.log(`Extracted profile URL: ${d}`),i=d;else throw new Error(`Unable to extract profile URL from profiler URL: ${i}`)}console.log(`Fetching profile from ${i}`);let s=await qg({url:i,onTemporaryError:d=>{d.attempt&&console.log(`Retry ${d.attempt.count}/${d.attempt.total}...`)}});if(s.responseType==="ZIP")throw new Error("Zip files are not yet supported in the CLI. Please extract the profile from the zip file first, or use the web interface at profiler.firefox.com");let l=await Lu(s.profile);if(l===void 0)throw new Error("Unable to parse the profile.");await t.dispatch(ay(l,{},!0)),await t.dispatch(Gd());let c=t.getState(),u=fr(c);return{store:t,rootRange:u}}let r=yA.readFileSync(e,null),n=await Lu(r);if(n===void 0)throw new Error("Unable to parse the profile.");await t.dispatch(ay(n,{},!0)),await t.dispatch(Gd());let o=t.getState(),a=fr(o);return{store:t,rootRange:a}}function TA(e,t,r=!1){let n=new Map;e.forEach(y=>{let{pid:b,threadIndex:m,name:g,tid:T,cpuMs:S}=y,I=n.get(b);if(I)I.cpuMs+=S,I.threads.push({threadIndex:m,name:g,tid:T,cpuMs:S});else{let v=t.get(b);if(v===void 0)throw new Error(`Process index not found for pid ${b}`);n.set(b,{pid:b,processIndex:v,name:b,cpuMs:S,threads:[{threadIndex:m,name:g,tid:T,cpuMs:S}]})}}),n.forEach(y=>{y.threads.sort((b,m)=>m.cpuMs-b.cpuMs)});let o=Array.from(n.values());if(o.sort((y,b)=>b.cpuMs-y.cpuMs),r)return{processes:o.map(({pid:y,processIndex:b,name:m,cpuMs:g,threads:T})=>({processIndex:b,pid:y,name:m,cpuMs:g,threads:T}))};let a=new Set(o.slice(0,5).map(y=>y.pid)),s=[...e].sort((y,b)=>b.cpuMs-y.cpuMs).slice(0,20),l=new Set(s.map(y=>y.pid)),c=new Set(s.map(y=>y.threadIndex)),u=o.filter(y=>a.has(y.pid)||l.has(y.pid)),d=new Set(u.map(y=>y.pid)),f=u.map(y=>{let{pid:b,processIndex:m,name:g,cpuMs:T,threads:S}=y,I=S.filter(F=>c.has(F.threadIndex)),v=S.filter(F=>!c.has(F.threadIndex)),w=[...I],k=Math.max(0,5-w.length);w.push(...v.slice(0,k));let N=v.slice(k),R;if(N.length>0){let F=N.reduce((B,Z)=>B+Z.cpuMs,0),G=Math.max(...N.map(B=>B.cpuMs));R={count:N.length,combinedCpuMs:F,maxCpuMs:G}}return{processIndex:m,pid:b,name:g,cpuMs:T,threads:w,remainingThreads:R}}),p=o.filter(y=>!d.has(y.pid)),h;if(p.length>0){let y=p.reduce((m,g)=>m+g.cpuMs,0),b=Math.max(...p.map(m=>m.cpuMs));h={count:p.length,combinedCpuMs:y,maxCpuMs:b}}return{processes:f,remainingProcesses:h}}function Wd({slices:e,time:t},r){if(e.length===0)return[];let n=new Array(e.length),o=new Array(e.length);for(let s=0;s<e.length;s++){n[s]=null;let{parent:l,sum:c}=e[s];o.push({i:s,sum:c}),l!==null&&n[l]===null&&(n[l]=s)}o.sort((s,l)=>l.sum-s.sum);let a=new Set(o.slice(0,20).map(s=>s.i)),i=[];return SA(e,0,null,n,a,0,t,i,r),i}function SA(e,t,r,n,o,a,i,s,l){for(let c=t;c<e.length;c++){if(!o.has(c))continue;let u=e[c];if(u.parent!==r)break;let{start:d,end:f,avg:p}=u,h=i[d],y=i[f],m=(y-h)*p;s.push({startTime:h,startTimeName:l.nameForTimestamp(h),startTimeStr:l.timestampString(h),endTime:y,endTimeName:l.nameForTimestamp(y),endTimeStr:l.timestampString(y),cpuMs:m,depthLevel:a});let g=n[c];g!==null&&SA(e,g,c,n,o,a+1,i,s,l)}}function Dq(e,t){let r=t.toLowerCase(),n=[];for(let o of e){let i=o.name.toLowerCase().includes(r)||String(o.pid).includes(r)?o.threads:o.threads.filter(s=>s.name.toLowerCase().includes(r)||String(s.tid).includes(r));i.length>0&&n.push({...o,threads:i,remainingThreads:void 0})}return n}function xA(e,t,r,n,o=!1,a){let i=e.getState(),s=ge(i),l=zI(i),c=new Set(s.threads.map(m=>m.pid)).size,u=nv(i),d=s.threads.map((m,g)=>({threadIndex:g,name:m.name,tid:m.tid,cpuMs:u?u[g]:0,pid:m.pid})),f=TA(d,n,o||a!==void 0);f.processes.forEach(m=>{let g=s.threads.find(T=>T.pid===m.pid);g&&(m.name=g.processName||g.processType||"unknown",m.etld1=g["eTLD+1"],m.startTime=g.processStartupTime,m.endTime=g.processShutdownTime)});let h=(a!==void 0?Dq(f.processes,a):f.processes).map(m=>{let g,T;return m.startTime!==void 0&&(g=t.nameForTimestamp(m.startTime),m.endTime!==null&&m.endTime!==void 0?T=t.nameForTimestamp(m.endTime):T=null),{processIndex:m.processIndex,pid:m.pid,name:m.name,etld1:m.etld1,cpuMs:m.cpuMs,startTime:m.startTime,startTimeName:g,endTime:m.endTime,endTimeName:T,threads:m.threads.map(S=>({threadIndex:S.threadIndex,threadHandle:r.handleForThreadIndex(S.threadIndex),name:S.name,tid:S.tid,cpuMs:S.cpuMs})),remainingThreads:m.remainingThreads}}),y=av(i),b=y!==null?Wd(y,t):null;return{type:"profile-info",name:l||"Unknown Profile",platform:s.meta.oscpu||"Unknown",threadCount:s.threads.length,processCount:c,showAll:o&&a===void 0,searchQuery:a,processes:h,remainingProcesses:a!==void 0?void 0:f.remainingProcesses,cpuActivity:b}}function Bq(e){let t=[[]],r="",n=()=>{r&&(t[t.length-1].push({type:"text",text:r,children:[]}),r="")};for(let o=0;o<e.length;o++){let a=e[o];if(a==="<"||a==="("){n();let i={type:"nested",text:"",openBracket:a,closeBracket:a==="<"?">":")",children:[]};t[t.length-1].push(i),t.push(i.children)}else a===">"||a===")"?(n(),t.length>1&&t.pop()):r+=a}return n(),t[0]}function iy(e){return e.map(t=>{if(t.type==="text")return t.text;let r=iy(t.children);return`${t.openBracket}${r}${t.closeBracket}`}).join("")}function Vd(e){return e.reduce((t,r)=>r.type==="text"?t+r.text.length:t+2+Vd(r.children),0)}function Hd(e,t){if(Vd(e)<=t)return iy(e);let r="";for(let n of e){let o=t-r.length;if(o<=0)break;if(n.type==="text")if(n.text.length<=o)r+=n.text;else{let a=n.text.split("::");for(let i=0;i<a.length;i++){let s=a[i]+(i<a.length-1?"::":"");if(r.length+s.length<=t)r+=s;else break}break}else{let a=iy(n.children),i=`${n.openBracket}${a}${n.closeBracket}`,s=`${n.openBracket}...${n.closeBracket}`;if(i.length<=o)r+=i;else if(s.length<=o){let l=o-2,c=Hd(n.children,l);c.length<=l?r+=`${n.openBracket}${c}${n.closeBracket}`:r+=s}else break}}return r}function Uq(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r.type==="text"){let n=r.text.lastIndexOf("::");if(n!==-1)return{nodeIndex:t,position:n}}}return null}function gn(e,t){if(e.length<=t)return e;let r=e.indexOf("!"),n="",o=e;if(r!==-1){n=e.substring(0,r+1),o=e.substring(r+1);let S=t-n.length;if(S<=10)return e.substring(0,t-3)+"...";if(o.length<=S)return e;t=S}let a=Bq(o),i=Uq(a);if(i===null)return n+Hd(a,t);let{nodeIndex:s,position:l}=i,c=a[s],u=a.slice(0,s);l>0?u.push({type:"text",text:c.text.substring(0,l+2),children:[]}):u.push({type:"text",text:"::",children:[]});let d=[],f=c.text.substring(l+2);f&&d.push({type:"text",text:f,children:[]}),d.push(...a.slice(s+1));let p=Vd(u),h=Vd(d);if(p+h<=t)return n+o;let y=Math.floor(t*.7),b,m;h<=y?(b=h,m=t-h):(m=Math.floor(t*.3),b=t-m);let g=Hd(u,m),T=Hd(d,b);return n+g+T}function Ai(e,t,r){let n=t.stringTable.getString(t.funcTable.name[e]),o=t.funcTable.resource[e];if(o===-1)return n;let a=t.stringTable.getString(t.resourceTable.name[o]),i=t.resourceTable.lib[o];return i!==null&&r?`${r[i].name}!${n}`:a&&a!==n?`${a}!${n}`:n}function sy(e,t,r){return e.getRoots().map(o=>{let a=e.getNodeData(o),i=Ai(o,t,r);return{...a,funcName:i,funcIndex:o}})}function IA(e,t,r){switch(r){case"exponential-0.95":return e*Math.pow(.95,t);case"exponential-0.9":return e*Math.pow(.9,t);case"exponential-0.8":return e*Math.pow(.8,t);case"harmonic-0.1":return e/(1+.1*t);case"harmonic-0.5":return e/(1+.5*t);case"harmonic-1.0":return e/(1+t);case"percentage-only":return e;default:return e*Math.pow(.94,t)}}var ly=class{items=[];push(t,r){this.items.push({item:t,priority:r}),this._bubbleUp(this.items.length-1)}popMax(){if(this.items.length===0)return null;if(this.items.length===1)return this.items.pop().item;let t=this.items[0].item;return this.items[0]=this.items.pop(),this._bubbleDown(0),t}isEmpty(){return this.items.length===0}size(){return this.items.length}_bubbleUp(t){for(;t>0;){let r=Math.floor((t-1)/2);if(this.items[t].priority<=this.items[r].priority)break;[this.items[t],this.items[r]]=[this.items[r],this.items[t]],t=r}}_bubbleDown(t){for(;;){let r=2*t+1,n=2*t+2,o=t;if(r<this.items.length&&this.items[r].priority>this.items[o].priority&&(o=r),n<this.items.length&&this.items[n].priority>this.items[o].priority&&(o=n),o===t)break;[this.items[t],this.items[o]]=[this.items[o],this.items[t]],t=o}}};function cy(e,t,r={}){let n=r.maxNodes??100,o=r.scoringStrategy??"exponential-0.9",a=r.maxDepth??200,i=r.maxChildrenPerNode??100,s=new Set,l=new ly,c=e.getRoots(),u=Math.min(c.length,Math.ceil(n*.7));for(let d=0;d<u;d++){let f=c[d],h=e.getNodeData(f).totalRelative*100,y=IA(h,0,o),b={callNodeIndex:f,depth:0};l.push(b,y)}for(;s.size<n;){let d=l.popMax();if(!d)break;if(s.add(d.callNodeIndex),d.depth>=a||!e.hasChildren(d.callNodeIndex))continue;let f=d.depth+1,h=e.getChildren(d.callNodeIndex).slice(0,i);for(let y of h){let m=e.getNodeData(y).totalRelative*100,g=IA(m,f,o),T={callNodeIndex:y,depth:f};l.push(T,g)}}return $q(e,s,t)}function $q(e,t,r){let n=e.getTotal(),o={name:"<root>",nameWithLibrary:"<root>",totalSamples:n,totalPercentage:100,selfSamples:0,selfPercentage:0,originalDepth:-1,children:[]},a=[o];for(;;){let i=a.pop();if(i===void 0)break;let s=i.callNodeIndex!==void 0?e.getChildren(i.callNodeIndex):e.getRoots(),l=[],c=i.originalDepth+1;for(let u of s){if(!t.has(u)){l.push(u);continue}let d=e.getNodeData(u),f=e._callNodeInfo.funcForNode(u),p=d.totalRelative*100,h=Ai(f,e._thread,r),y={callNodeIndex:u,functionHandle:Ko(f),functionIndex:f,name:d.funcName,nameWithLibrary:h,totalSamples:d.total,totalPercentage:p,selfSamples:d.self,selfPercentage:d.selfRelative*100,originalDepth:c,children:[]};i.children.push(y),a.push(y)}if(l.length>0){let u=0,d=0;for(let h of l){let y=e.getNodeData(h);u+=y.total,d=Math.max(d,y.total)}let f=u/n,p=d/n;i.childrenTruncated={count:l.length,combinedSamples:u,combinedPercentage:f*100,maxSamples:d,maxPercentage:p*100,depth:c}}}return o}function vA(e,t,r,n){let o=e.getState(),a=n!==void 0?r.threadIndexesForHandle(n):Je(o),i=ht(a),s=i.getRawThread(o),l=i.getFriendlyThreadName(o),c=i.getRangeFilteredActivitySlices(o),u=c!==null?Wd(c,t):null;return{type:"thread-info",threadHandle:n??r.handleForThreadIndexes(a),name:s.name,friendlyName:l,tid:s.tid,createdAt:s.registerTime,createdAtName:t.nameForTimestamp(s.registerTime),endedAt:s.unregisterTime,endedAtName:s.unregisterTime!==null?t.nameForTimestamp(s.unregisterTime):null,sampleCount:s.samples.length,markerCount:s.markers.length,cpuActivity:u}}function wA(e,t,r){let n=e.getState(),o=r!==void 0?t.threadIndexesForHandle(r):Je(n),a=t.handleForThreadIndexes(o),i=ht(o),s=i.getFriendlyThreadName(n),l=i.getFilteredThread(n),c=ge(n).libs,u=i.getFunctionListTree(n),d=i.getCallTree(n),f=sy(u,l,c),p=f.slice().sort((S,I)=>I.total-S.total).slice(0,50),h=f.slice().sort((S,I)=>I.self-S.self).slice(0,50),y=p.map(S=>({functionHandle:Ko(S.funcIndex),functionIndex:S.funcIndex,name:S.funcName,nameWithLibrary:S.funcName,totalSamples:S.total,totalPercentage:S.totalRelative*100,selfSamples:S.self,selfPercentage:S.selfRelative*100,library:void 0})),b=h.map(S=>({functionHandle:Ko(S.funcIndex),functionIndex:S.funcIndex,name:S.funcName,nameWithLibrary:S.funcName,totalSamples:S.total,totalPercentage:S.totalRelative*100,selfSamples:S.self,selfPercentage:S.selfRelative*100,library:void 0})),m=new Map(f.map(S=>[S.funcIndex,S])),g=d.getRoots(),T={selfSamples:0,frameCount:0,frames:[]};if(g.length>0){let S=[],I=Number.NEGATIVE_INFINITY;for(let v of g){let w=d._internal.findHeaviestPathInSubtree(v),k=d._callNodeInfo.getCallNodeIndexFromPath(w);if(k===null)continue;let N=d.getNodeData(k).self;N>I&&(S=w,I=N)}if(S.length>0){let w=d._callNodeInfo.getCallNodeIndexFromPath(S);w!==null&&(T={selfSamples:d.getNodeData(w).self,frameCount:S.length,frames:S.map(N=>{let R=Ai(N,l,c),F=m.get(N);return{funcIndex:N,name:R,nameWithLibrary:R,totalSamples:(F==null?void 0:F.total)??0,totalPercentage:((F==null?void 0:F.totalRelative)??0)*100,selfSamples:(F==null?void 0:F.self)??0,selfPercentage:((F==null?void 0:F.selfRelative)??0)*100}})})}}return{type:"thread-samples",threadHandle:a,friendlyThreadName:s,topFunctionsByTotal:y,topFunctionsBySelf:b,heaviestStack:T}}function kA(e,t,r,n){let o=e.getState(),a=r!==void 0?t.threadIndexesForHandle(r):Je(o),i=t.handleForThreadIndexes(a),s=ht(a),l=s.getFriendlyThreadName(o),c=s.getFilteredThread(o),u=null;try{let d=s.getCallNodeInfo(o),f=nt(o),p=_r(o),h=s.getWeightTypeForCallTree(o),y=s.getPreviewFilteredCtssSamples(o),b=s.getSampleIndexToNonInvertedCallNodeIndexForFilteredThread(o),m=ku(y,b,d.getCallNodeTable().length),g=Vc(d,p,c.funcTable.length),T=Fs(g,m),S=Os(c,g,f,y,T,h),I=ge(o).libs;u=cy(S,I,n)}catch{}return{type:"thread-samples-bottom-up",threadHandle:i,friendlyThreadName:l,invertedCallTree:u}}function _A(e,t,r,n){let o=e.getState(),a=r!==void 0?t.threadIndexesForHandle(r):Je(o),i=t.handleForThreadIndexes(a),s=ht(a),l=s.getFriendlyThreadName(o),c=s.getCallTree(o),u=ge(o).libs,d=cy(c,u,n);return{type:"thread-samples-top-down",threadHandle:i,friendlyThreadName:l,regularCallTree:d}}function CA(e,t,r,n){let o=e.getState(),a=r!==void 0?t.threadIndexesForHandle(r):Je(o),i=t.handleForThreadIndexes(a),s=ht(a),l=s.getFriendlyThreadName(o),c=s.getFilteredThread(o),u=ge(o).libs,d=s.getFunctionListTree(o),f=sy(d,c,u),p=f.length,y=dr(o).length>0,b=null;y&&(b=s.getRawThread(o).samples.length);let m=f;if(n!=null&&n.searchString){let I=n.searchString.toLowerCase();m=m.filter(v=>v.funcName.toLowerCase().includes(I))}if((n==null?void 0:n.minSelf)!==void 0){let I=n.minSelf/100;m=m.filter(v=>v.selfRelative>=I)}m.sort((I,v)=>v.self-I.self);let g=(n==null?void 0:n.limit)??m.length,S=m.slice(0,g).map(I=>{let v=I.funcName,w=v.indexOf("!"),k=w!==-1?v.substring(0,w):void 0,N=w!==-1?v.substring(w+1):v,R,F;return b!==null&&(R=I.self/b*100,F=I.total/b*100),{functionHandle:Ko(I.funcIndex),functionIndex:I.funcIndex,name:N,nameWithLibrary:v,selfSamples:I.self,selfPercentage:I.selfRelative*100,totalSamples:I.total,totalPercentage:I.totalRelative*100,library:k,fullSelfPercentage:R,fullTotalPercentage:F}});return{type:"thread-functions",threadHandle:i,friendlyThreadName:l,totalFunctionCount:p,filteredFunctionCount:m.length,filters:n?{searchString:n.searchString,minSelf:n.minSelf,limit:n.limit}:void 0,functions:S}}function NA(e){let t=e.filter(r=>r.end!==null).map(r=>r.end-r.start).sort((r,n)=>r-n);if(t.length!==0)return{min:t[0],max:t[t.length-1],avg:t.reduce((r,n)=>r+n,0)/t.length,median:t[Math.floor(t.length/2)],p95:t[Math.floor(t.length*.95)],p99:t[Math.floor(t.length*.99)]}}function AA(e){if(e.length<2)return{markersPerSecond:0,minGap:0,avgGap:0,maxGap:0};let t=[...e].sort((a,i)=>a.start-i.start),r=[];for(let a=1;a<t.length;a++)r.push(t[a].start-t[a-1].start);let n=t[t.length-1].start-t[0].start;return{markersPerSecond:n>0?e.length/n*1e3:0,minGap:Math.min(...r),avgGap:r.reduce((a,i)=>a+i,0)/r.length,maxGap:Math.max(...r)}}function Gq(e,t,r,n){let o=e,{minDuration:a,maxDuration:i,category:s,hasStack:l,limit:c}=n;if((a!==void 0||i!==void 0)&&(o=o.filter(u=>{let d=t[u];if(d.end===null)return!1;let f=d.end-d.start;return!(a!==void 0&&f<a||i!==void 0&&f>i)})),s!==void 0){let u=s.toLowerCase();o=o.filter(d=>{var h;let f=t[d];return(((h=r[f.category])==null?void 0:h.name)??"Unknown").toLowerCase().includes(u)})}return l&&(o=o.filter(u=>{let d=t[u];return d.data&&"cause"in d.data&&d.data.cause})),c!==void 0&&o.length>c&&(o=o.slice(0,c)),o}function PA(e,t,r,n,o=5){return(e.some(s=>s.marker.end!==null)?[...e].sort((s,l)=>l.marker.end-l.marker.start-(s.marker.end-s.marker.start)):e.slice(0,o)).slice(0,o).map(s=>{let l=r.handleForMarker(t,s.index),c=n(s.index),u=s.marker.end!==null?s.marker.end-s.marker.start:void 0,d=!!(s.marker.data&&"cause"in s.marker.data&&s.marker.data.cause);return{handle:l,label:c||s.marker.name,start:s.marker.start,duration:u,hasStack:d}})}function Wq(e){return e.split(",").map(t=>{let r=t.trim();return r.startsWith("field:")?{field:r.substring(6)}:r})}function Hq(e,t,r){var o,a,i;if(t==="type")return((o=e.data)==null?void 0:o.type)??e.name;if(t==="name")return e.name;if(t==="category")return((a=r[e.category])==null?void 0:a.name)??"Unknown";let n=(i=e.data)==null?void 0:i[t.field];return n==null?"(no value)":String(n)}function Vq(e){var a,i;if(e.length===0||!((a=e[0].data)==null?void 0:a.type))return null;let r=[],n=e[0].data;if(!n)return null;let o=Object.keys(n).filter(s=>!(s==="type"||s==="cause"||s.endsWith("ID")||s.endsWith("Id")));for(let s of o){let l=new Set,c=0;for(let p of e){let h=(i=p.data)==null?void 0:i[s];h!=null&&(l.add(String(h)),c++)}let u=l.size;if(c<e.length*.8||u<3)continue;let d=0;u>=3&&u<=20?d=100:u>20&&u<=50?d=100-(u-20)*2:u>50&&(d=10),c===e.length&&(d+=10),["eventType","phase","status","operation","category"].includes(s)&&(d+=20),r.push({field:s,score:d,uniqueCount:u})}return r.length===0?null:(r.sort((s,l)=>l.score-s.score),{field:r[0].field,variance:r[0].score/100})}function dy(e,t,r,n,o,a,i=0,s=5){if(t.length===0||e.length===0)return[];let[l,...c]=t,u=new Map;for(let f of e){let p=Hq(f.marker,l,r);u.has(p)||u.set(p,[]),u.get(p).push(f)}let d=[];for(let[f,p]of u.entries()){let h=p.map(S=>S.marker),y=h.some(S=>S.end!==null),b=y?NA(h):void 0,m=AA(h),g=PA(p,n,o,a,s),T=c.length>0&&i<2?dy(p,c,r,n,o,a,i+1,s):void 0;d.push({groupName:f,count:h.length,isInterval:y,durationStats:b,rateStats:m,topMarkers:g,subGroups:T})}return d.sort((f,p)=>p.count-f.count),d}function jq(e,t,r,n,o,a,i=!1,s=5){let l=new Map;for(let u of t){let d=e[u],f=d.name;l.has(f)||l.set(f,[]),l.get(f).push({marker:d,index:u})}let c=[];for(let[u,d]of l.entries()){let f=d.map(T=>T.marker),p=f.some(T=>T.end!==null),h=p?NA(f):void 0,y=AA(f),b=PA(d,r,n,o,s),m,g;if(i&&f.length>5){let T=Vq(f);T&&(m=dy(d,[{field:T.field}],a,r,n,o,1,s),g=T.field)}c.push({markerName:u,count:f.length,isInterval:p,durationStats:h,rateStats:y,topMarkers:b,subGroups:m,subGroupKey:g})}return c.sort((u,d)=>d.count-u.count),c}function qq(e,t,r){var i;let n=new Map;for(let s of t){let l=e[s],c=((i=r[l.category])==null?void 0:i.name)??"Unknown";n.set(c,(n.get(c)??0)+1)}let o=t.length;return Array.from(n.entries()).map(([s,l])=>({categoryName:s,count:l,percentage:l/o*100})).sort((s,l)=>l.count-s.count)}function RA(e,t,r,n,o={}){var i;let a=o.searchString||"";a&&e.dispatch(Kh(a));try{let s=e.getState(),l=n!==void 0?t.threadIndexesForHandle(n):Je(s),c=ht(l),u=c.getFriendlyThreadName(s),d=c.getFullMarkerList(s),f=nt(s),p=ft(s),h=Rt(s),y=c.getFullMarkerListIndexes(s).length,b=a?c.getSearchFilteredMarkerIndexes(s):c.getFullMarkerListIndexes(s);b=Gq(b,d,f,o);let m=to(E=>d[E],ge(s).meta.markerSchema,p,f,h,"tableLabel"),g=n??t.handleForThreadIndexes(l),{groupBy:T,autoGroup:S,topN:I}=o,v=I??5,w;if(T){let E=Wq(T),A=[];for(let P of b)A.push({marker:d[P],index:P});let M=dy(A,E,f,l,r,m,0,v);w=uy(M)}let N=jq(d,b,l,r,m,f,S||!1,v).map(E=>({markerName:E.markerName,count:E.count,isInterval:E.isInterval,durationStats:E.durationStats,rateStats:E.rateStats,topMarkers:E.topMarkers.map(A=>({handle:A.handle,label:A.label,start:A.start,duration:A.duration,hasStack:A.hasStack})),subGroups:E.subGroups?uy(E.subGroups):void 0,subGroupKey:E.subGroupKey})),F=qq(d,b,f).map(E=>({categoryName:E.categoryName,categoryIndex:f.findIndex(A=>(A==null?void 0:A.name)===E.categoryName),count:E.count,percentage:E.percentage})),{minDuration:G,maxDuration:B,category:Z,hasStack:X,limit:_e}=o,D=a||G!==void 0||B!==void 0||Z!==void 0||X||_e!==void 0?{searchString:a||void 0,minDuration:G,maxDuration:B,category:Z,hasStack:X,limit:_e}:void 0,re;if(o.list){re=[];for(let E of b){let A=d[E],M=r.handleForMarker(l,E),P=A.end!==null?A.end-A.start:void 0,$=!!(A.data&&"cause"in A.data&&A.data.cause),J=((i=f[A.category])==null?void 0:i.name)??"Other",H=m(E);re.push({handle:M,name:A.name,label:H||A.name,start:A.start,duration:P,hasStack:$,category:J})}}return{type:"thread-markers",threadHandle:g,friendlyThreadName:u,totalMarkerCount:y,filteredMarkerCount:b.length,filters:D,byType:N,byCategory:F,customGroups:w,flatMarkers:re}}finally{a&&e.dispatch(Kh(""))}}function uy(e){return e.map(t=>({groupName:t.groupName,count:t.count,isInterval:t.isInterval,durationStats:t.durationStats,rateStats:t.rateStats,topMarkers:t.topMarkers.map(r=>({handle:r.handle,label:r.label,start:r.start,duration:r.duration,hasStack:r.hasStack})),subGroups:t.subGroups?uy(t.subGroups):void 0}))}function MA(e,t,r,n){if(e===null)return null;let{stackTable:o,frameTable:a,funcTable:i,stringTable:s,resourceTable:l}=t,c=[],u=e;for(;u!==null;){let d=o.frame[u],f=a.func[d],p=s.getString(i.name[f]),h=i.resource[f],y,b=p;if(h!==-1){let m=l.lib[h];if(m!==null&&r)y=r[m].name,b=`${y}!${p}`;else{let g=s.getString(l.name[h]);g&&g!==p&&(b=`${g}!${p}`)}}c.push({name:p,nameWithLibrary:b,library:y}),u=o.prefix[u]}return{frames:c,truncated:!1,capturedAt:n}}function FA(e,t,r,n){let o=e.getState(),{threadIndexes:a,markerIndex:i}=t.markerForHandle(n),s=ht(a),l=s.getFriendlyThreadName(o),u=s.getFullMarkerList(o)[i];if(!u)throw new Error(`Marker ${n} not found`);let d=r.handleForThreadIndexes(a),f=ge(o),p=s.getFilteredThread(o),h=f.libs,y=null;if(u.data&&"cause"in u.data&&u.data.cause){let b=u.data.cause;y=MA(b.stack,p,h,b.time)}return{type:"marker-stack",markerHandle:n,markerIndex:i,threadHandle:d,friendlyThreadName:l,markerName:u.name,stack:y}}function OA(e,t,r,n){var S,I;let o=e.getState(),{threadIndexes:a,markerIndex:i}=t.markerForHandle(n),s=ht(a),l=s.getFriendlyThreadName(o),c=s.getFullMarkerList(o),u=c[i];if(!u)throw new Error(`Marker ${n} not found`);let d=nt(o),f=ft(o),p=Rt(o),h=r.handleForThreadIndexes(a),b=to(v=>c[v],ge(o).meta.markerSchema,f,d,p,"tooltipLabel")(i),m,g;if(u.data){let v=f[u.data.type];if(v&&v.fields.length>0){m=[];for(let w of v.fields){if(w.hidden)continue;let k=u.data[w.key];if(k!=null){let N=Ba(u.data.type,w.format,k,p);m.push({key:w.key,label:w.label||w.key,value:k,formattedValue:N})}}}v!=null&&v.description&&(g={description:v.description})}let T;if(u.data&&"cause"in u.data&&u.data.cause){let v=u.data.cause,w=ge(o),k=s.getFilteredThread(o),N=w.libs,R=MA(v.stack,k,N,v.time);if(R&&R.frames.length>0){let F=R.frames.length>20;T={frames:R.frames.slice(0,20),truncated:F,capturedAt:R.capturedAt}}}return{type:"marker-info",markerHandle:n,markerIndex:i,threadHandle:h,friendlyThreadName:l,name:u.name,tooltipLabel:b||void 0,markerType:(S=u.data)==null?void 0:S.type,category:{index:u.category,name:((I=d[u.category])==null?void 0:I.name)??"Unknown"},start:u.start,end:u.end,duration:u.end!==null?u.end-u.start:void 0,fields:m,schema:g,stack:T}}function EA(e){let t={};return e.domainLookupStart!==void 0&&e.domainLookupEnd!==void 0&&(t.dns=e.domainLookupEnd-e.domainLookupStart),e.connectStart!==void 0&&e.tcpConnectEnd!==void 0&&(t.tcp=e.tcpConnectEnd-e.connectStart),e.secureConnectionStart!==void 0&&e.secureConnectionStart>0&&e.connectEnd!==void 0&&(t.tls=e.connectEnd-e.secureConnectionStart),e.requestStart!==void 0&&e.responseStart!==void 0&&(t.ttfb=e.responseStart-e.requestStart),e.responseStart!==void 0&&e.responseEnd!==void 0&&(t.download=e.responseEnd-e.responseStart),e.responseEnd!==void 0&&(t.mainThread=e.endTime-e.responseEnd),t}function LA(e,t,r,n={}){let{searchString:o,minDuration:a,maxDuration:i,limit:s}=n,l=e.getState(),c=r!==void 0?t.threadIndexesForHandle(r):Je(l),u=ht(c),d=u.getFriendlyThreadName(l),f=u.getFullMarkerList(l),h=u.getFullMarkerListIndexes(l).filter(N=>{let R=f[N];return En(R)?R.data.status==="STATUS_STOP":!1}),y=h.length,b=h;if(o){let N=o.toLowerCase();b=b.filter(R=>f[R].data.URI.toLowerCase().includes(N))}(a!==void 0||i!==void 0)&&(b=b.filter(N=>{let R=f[N].data,F=R.endTime-R.startTime;return!(a!==void 0&&F<a||i!==void 0&&F>i)}));let m=b.length,g={},T=0,S=0,I=0;for(let N of b){let R=f[N].data,F=R.cache;F==="Hit"||F==="MemoryHit"||F==="Prefetched"?T++:F==="Miss"||F==="Unresolved"||F==="DiskStorage"||F==="Push"?S++:I++;let G=EA(R);G.dns!==void 0&&(g.dns=(g.dns??0)+G.dns),G.tcp!==void 0&&(g.tcp=(g.tcp??0)+G.tcp),G.tls!==void 0&&(g.tls=(g.tls??0)+G.tls),G.ttfb!==void 0&&(g.ttfb=(g.ttfb??0)+G.ttfb),G.download!==void 0&&(g.download=(g.download??0)+G.download),G.mainThread!==void 0&&(g.mainThread=(g.mainThread??0)+G.mainThread)}let w=(s!==void 0&&s>0?b.slice(0,s):b).map(N=>{let R=f[N].data,F=R.endTime-R.startTime;return{url:R.URI,httpStatus:R.responseStatus,httpVersion:R.httpVersion,cacheStatus:R.cache,transferSizeKB:R.count!==void 0?R.count/1024:void 0,startTime:R.startTime,duration:F,phases:EA(R)}});return{type:"thread-network",threadHandle:r??t.handleForThreadIndexes(c),friendlyThreadName:d,totalRequestCount:y,filteredRequestCount:m,filters:o!==void 0||a!==void 0||i!==void 0||s!==void 0?{searchString:o,minDuration:a,maxDuration:i,limit:s}:void 0,summary:{cacheHit:T,cacheMiss:S,cacheUnknown:I,phaseTotals:g},requests:w}}function DA(e,t,r={}){let{module:n,level:o,search:a,limit:i}=r,s=e.getState(),l=ge(s),c=l.meta.startTime,u=l.shared.stringArray,d=r.thread!==void 0?new Set(t.threadIndexesForHandle(r.thread)):null,p=o!==void 0?{error:1,warn:2,info:3,debug:4,verbose:5}[o.toLowerCase()]??5:5,h=n==null?void 0:n.toLowerCase(),y=a==null?void 0:a.toLowerCase(),b=[];for(let T=0;T<l.threads.length;T++){if(d!==null&&!d.has(T))continue;let S=l.threads[T],{markers:I}=S,v=S.processName??"Unknown Process",w=S.pid,k=S.name;for(let N=0;N<I.length;N++){let R=I.startTime[N];if(R===null)continue;let F=I.data[N];if((F==null?void 0:F.type)!=="Log")continue;let G=F,B,Z,X;if("message"in G){if(!G.message)continue;B=u[I.name[N]]??"";let re=u[G.level]??"";X=kp[re]??"D",Z=G.message.trim()}else{if(!G.name)continue;let re=G.module,E=re.indexOf("/");E!==-1?(X=re.slice(0,E),B=re.slice(E+1)):(X="D",B=re),Z=G.name.trim()}if(h!==void 0&&!B.toLowerCase().includes(h)||(lI[X]??5)>p||y!==void 0&&!Z.toLowerCase().includes(y))continue;let _e=cI(c+R),D=uI(_e,v,w,k,G,B,u);D!==null&&b.push(D)}}b.sort();let m=b.length;return{type:"profile-logs",entries:i!==void 0?b.slice(0,i):b,totalCount:m,filters:r.thread!==void 0||n!==void 0||o!==void 0||a!==void 0||i!==void 0?{thread:r.thread,module:n,level:o,search:a,limit:i}:void 0}}function fy(e){if(e!==null&&typeof e=="object"&&"innerWindowID"in e){let t=e.innerWindowID;if(typeof t=="number")return t}}var zq={FirstContentfulPaint:"FCP",FirstContentfulComposite:"FCC",LargestContentfulPaint:"LCP","TimeToFirstInteractive (TTFI)":"TTFI"};function py(e,t,r){let n=e.get(t);return n||(n={innerWindowID:t,navStart:r,loadEnd:null,url:null,milestones:[]},e.set(t,n)),n}function hy(e,t,r,n){e.milestones.some(o=>o.name===t)||e.milestones.push({name:t,timeMs:r-e.navStart,markerIndex:n})}function Kq(e){if(!e)return"Other";let t=e.toLowerCase().split(";")[0].trim();return t.includes("javascript")||t.includes("ecmascript")?"JS":t==="text/css"?"CSS":t.startsWith("image/")?"Image":t==="text/html"||t==="application/xhtml+xml"?"HTML":t==="application/json"||t==="text/json"?"JSON":t.startsWith("font/")||t.startsWith("application/font")||t==="application/x-font-woff"?"Font":t==="application/wasm"?"Wasm":"Other"}function Zq(e){let t=e;try{t=new URL(e).pathname}catch{}let r=t.split("/"),n=r[r.length-1]||e;return n.length>50?n.slice(0,47)+"...":n}function Jq(e,t){let r=t.samples.stack[e];if(r==null)return null;let n=t.stackTable.frame[r],o=t.frameTable.func[n],a=t.funcTable.name[o];return t.stringTable.getString(a)}function Yq(e,t,r,n){let o=new Map,a=0;for(let i=0;i<e.samples.length;i++){let s=e.samples.time[i];if(s<r||s>n)continue;let l=e.samples.category[i],c=l<t.length?t[l].name:"Other";o.set(c,(o.get(c)??0)+1),a++}return a===0?[]:Array.from(o.entries()).sort((i,s)=>s[1]-i[1]).map(([i,s])=>({name:i,count:s,percentage:s/a*100}))}function BA(e,t,r,n,o,a={}){let{jankLimit:i=10}=a,s=e.getState(),l=o!==void 0?t.threadIndexesForHandle(o):Je(s),c=o??t.handleForThreadIndexes(l),u=ht(l),d=u.getFriendlyThreadName(s),f=u.getFullMarkerList(s),p=u.getFullMarkerListIndexes(s),h=nt(s),y=u.getThread(s),b=new Map;for(let H of p){let z=f[H],{name:se,data:de}=z;if(z.end!==null)if(se==="DocumentLoad"){let ue=fy(de);if(ue===void 0)continue;let fe=py(b,ue,z.start);if(fe.loadEnd=z.end,hy(fe,"Load",z.end,H),de!==null&&typeof de=="object"&&"name"in de){let be=de.name;if(typeof be=="string"){let V=be.match(/^Document (.+) loaded after/);V&&(fe.url=V[1])}}}else if(se==="DOMContentLoaded"&&de!==null&&typeof de=="object"&&"category"in de&&de.category==="Navigation"){let ue=fy(de);if(ue===void 0)continue;let fe=py(b,ue,z.start);hy(fe,"DCL",z.end,H)}else{let ue=zq[se];if(ue===void 0)continue;let fe=fy(de);if(fe===void 0)continue;let be=py(b,fe,z.start);hy(be,ue,z.end,H)}}let m=Array.from(b.values());m.sort((H,z)=>H.navStart-z.navStart);let g=m.filter(H=>H.loadEnd!==null);if(g.length===0)return{type:"thread-page-load",threadHandle:c,friendlyThreadName:d,url:null,navigationIndex:0,navigationTotal:0,navStartMs:0,milestones:[],resourceCount:0,resourceAvgMs:null,resourceMaxMs:null,resourcesByType:[],topResources:[],totalSamples:0,categories:[],jankTotal:0,jankPeriods:[]};let T=g.length,S=a.navigationIndex??T,I=Math.max(1,Math.min(S,T)),v=g[I-1],w=v.navStart,k=v.loadEnd;if(v.url)for(let H of p){let z=f[H];if(!En(z))continue;let se=z.data;if(se.status==="STATUS_STOP"&&se.URI===v.url&&se.requestStart!==void 0&&se.responseStart!==void 0){v.milestones.push({name:"TTFB",timeMs:se.responseStart-w,markerIndex:H});break}}v.milestones.sort((H,z)=>H.timeMs-z.timeMs);let N=v.milestones.filter(H=>H.name!=="TTFI").map(H=>H.timeMs),R=N.length>0?Math.max(...N):k-w,F=w+R,G=[],B=[];for(let H of p){let z=f[H];if(En(z)){let se=z.data;se.status==="STATUS_STOP"&&se.startTime>=w&&se.startTime<=F&&G.push({filename:Zq(se.URI),url:se.URI,durationMs:se.endTime-se.startTime,resourceType:Kq(se.contentType),markerHandle:n.handleForMarker(l,H)})}else z.name==="Jank"&&z.start>=w&&(z.end??z.start)<=F&&B.push(H)}G.sort((H,z)=>z.durationMs-H.durationMs);let Z=G.length,X=null,_e=null;Z>0&&(X=G.reduce((z,se)=>z+se.durationMs,0)/Z,_e=G[0].durationMs);let D=new Map;for(let H of G)D.set(H.resourceType,(D.get(H.resourceType)??0)+1);let re=Array.from(D.entries()).sort((H,z)=>z[1]-H[1]).map(([H,z])=>({type:H,count:z,percentage:z/Z*100})),E=G.slice(0,10),A=Yq(y,h,w,F),M=A.reduce((H,z)=>H+z.count,0),P=B.length,J=B.slice(0,i).map(H=>{let z=f[H],se=z.start,de=z.end??z.start,ue=new Map,fe=new Map,be=0;for(let q=0;q<y.samples.length;q++){let Q=y.samples.time[q];if(Q<se||Q>de)continue;let Te=y.samples.category[q],Ne=Te<h.length?h[Te].name:"Other";ue.set(Ne,(ue.get(Ne)??0)+1),be++;let qe=Jq(q,y);qe!==null&&fe.set(qe,(fe.get(qe)??0)+1)}let V=be===0?[]:Array.from(ue.entries()).sort((q,Q)=>Q[1]-q[1]).map(([q,Q])=>({name:q,count:Q,percentage:Q/be*100})),te=Array.from(fe.entries()).sort((q,Q)=>Q[1]-q[1]).slice(0,5).map(([q,Q])=>({name:q,sampleCount:Q}));return{startMs:se-w,durationMs:de-se,markerHandle:n.handleForMarker(l,H),startHandle:r.nameForTimestamp(se),endHandle:r.nameForTimestamp(de),topFunctions:te,categories:V}});return{type:"thread-page-load",threadHandle:c,friendlyThreadName:d,url:v.url,navigationIndex:I,navigationTotal:T,navStartMs:w,milestones:v.milestones.map(H=>({name:H.name,timeMs:H.timeMs,markerHandle:n.handleForMarker(l,H.markerIndex)})),resourceCount:Z,resourceAvgMs:X,resourceMaxMs:_e,resourcesByType:re,topResources:E,totalSamples:M,categories:A,jankTotal:P,jankPeriods:J}}function my(e,t){if(e.startsWith("ts"))return null;if(e.endsWith("%")){let n=parseFloat(e.slice(0,-1));if(isNaN(n))throw new Error(`Invalid percentage: "${e}"`);let o=t.end-t.start;return t.start+n/100*o}if(e.endsWith("ms")){let n=parseFloat(e.slice(0,-2));if(isNaN(n))throw new Error(`Invalid milliseconds: "${e}"`);return t.start+n}if(e.endsWith("s")){let n=parseFloat(e.slice(0,-1));if(isNaN(n))throw new Error(`Invalid seconds: "${e}"`);return t.start+n*1e3}let r=parseFloat(e);if(isNaN(r))throw new Error(`Invalid time value: "${e}". Expected timestamp name (ts-X), seconds (2.7), milliseconds (2700ms), or percentage (10%)`);return t.start+r*1e3}function Pi(e){switch(e.type){case"excludes-function":return`excludes function: f-${e.funcIndexes.join(", f-")}`;case"merge":return`merge: f-${e.funcIndexes.join(", f-")}`;case"root-at":return`root-at: f-${e.funcIndex}`;case"during-marker":return`during marker matching: "${e.searchString}"`;case"includes-function":return`includes function: f-${e.funcIndexes.join(", f-")}`;case"includes-prefix":return`includes prefix: f-${e.funcIndexes.join(" \u2192 f-")}`;case"includes-suffix":return`includes suffix: f-${e.funcIndex}`;case"outside-marker":return`outside marker matching: "${e.searchString}"`;default:throw new Error(`Unhandled filter spec type: ${e.type}`)}}function gy(e,t,r){switch(r.type){case"excludes-function":{for(let n of r.funcIndexes)e.dispatch(qr(t,{type:"drop-function",funcIndex:n}));return r.funcIndexes.length}case"merge":{for(let n of r.funcIndexes)e.dispatch(qr(t,{type:"merge-function",funcIndex:n}));return r.funcIndexes.length}case"root-at":return e.dispatch(qr(t,{type:"focus-function",funcIndex:r.funcIndex})),1;case"during-marker":return e.dispatch(qr(t,{type:"filter-samples",filterType:"marker-search",filter:r.searchString})),1;case"includes-function":return e.dispatch(qr(t,{type:"filter-samples",filterType:"function-include",filter:r.funcIndexes.join(",")})),1;case"includes-prefix":return e.dispatch(qr(t,{type:"filter-samples",filterType:"stack-prefix",filter:r.funcIndexes.join(",")})),1;case"includes-suffix":return e.dispatch(qr(t,{type:"filter-samples",filterType:"stack-suffix",filter:String(r.funcIndex)})),1;case"outside-marker":return e.dispatch(qr(t,{type:"filter-samples",filterType:"outside-marker",filter:r.searchString})),1;default:throw new Error(`Unhandled filter spec type: ${r.type}`)}}var jd=class{_stacks=new Map;push(t,r,n){let o=this._getOrCreate(r),a=gy(t,r,n),i={index:o.length+1,spec:n,description:Pi(n),reduxTransformCount:a};return o.push(i),i}pop(t,r,n=1){let o=this._getOrCreate(r);if(n<=0||o.length===0)return[];let a=Math.min(n,o.length),i=o.splice(o.length-a,a),s=i.reduce((l,c)=>l+c.reduxTransformCount,0);if(s>0){let l=t.getState(),c=Uo(l,r).length;t.dispatch({type:"POP_TRANSFORMS_FROM_STACK",threadsKey:r,firstPoppedFilterIndex:c-s})}return i.reverse()}clear(t,r){let o=this._getOrCreate(r).length;return o===0?[]:this.pop(t,r,o)}list(t){return[...this._stacks.get(t)??[]]}activeThreadsKeys(){return Array.from(this._stacks.entries()).filter(([,t])=>t.length>0).map(([t])=>t)}_getOrCreate(t){let r=this._stacks.get(t);return r===void 0&&(r=[],this._stacks.set(t,r)),r}};xe();async function qd(e,t,r,n,o){let a=[];try{let i=await n.queryBrowserSymbolicationApi(e,t);try{let s=JSON.parse(i);if(!s.error)return{type:"SUCCESS",convertedResponse:o(s)};a.push({type:"BROWSER_API_ERROR",apiErrorMessage:s.error})}catch(s){a.push({type:"BROWSER_API_MALFORMED_RESPONSE",errorMessage:s.toString()})}}catch(i){a.push({type:"BROWSER_CONNECTION_ERROR",browserConnectionErrorMessage:i.toString()})}if(r!==null){let i=r+e;try{let l=await(await n.fetchUrlResponse(i,t)).text();try{let c=JSON.parse(l);if(!c.error)return{type:"SUCCESS",convertedResponse:o(c)};a.push({type:"SYMBOL_SERVER_API_ERROR",apiErrorMessage:c.error})}catch(c){a.push({type:"SYMBOL_SERVER_API_MALFORMED_RESPONSE",errorMessage:c.toString()})}}catch(s){a.push({type:"NETWORK_ERROR",url:i,networkErrorMessage:s.toString()})}}return{type:"ERROR",errors:a}}async function UA(e,t,r,n){let o=Xq(r)?r:null,{debugName:a,breakpadId:i,name:s,codeId:l}=t,{address:c}=e,u=await qd("/asm/v1",JSON.stringify({debugName:a,debugId:i,name:s,codeId:l,startAddress:`0x${c.toString(16)}`,size:`0x${e.functionSize.toString(16)}`,continueUntilFunctionEnd:!e.functionSizeIsKnown}),o,n,Qq);switch(u.type){case"SUCCESS":return{type:"SUCCESS",instructions:u.convertedResponse};case"ERROR":return{type:"ERROR",errors:u.errors};default:throw ae(u,"queryResult.type")}}function Xq(e){return oo(e)}function Qq(e){if(!e.startAddress)throw new Error("Missing startAddress field in asm response");if(!e.instructions)throw new Error("Missing instructions field in asm response");if(!Array.isArray(e.instructions))throw new Error("The instructions field in asm response is not an array");let{startAddress:t,instructions:r}=e,n=parseInt(t,16);if(isNaN(n))throw new Error("Invalid startAddress value in asm response");return r.map(o=>{if(!Array.isArray(o))throw new Error("Invalid instruction data (not an array)");if(o.length<2)throw new Error("Invalid instruction data (< 2 elements)");let[a,i]=o;if(typeof a!="number")throw new Error("Invalid instruction offset");if(typeof i!="string")throw new Error("Invalid instruction decodedString value");return{address:n+a,decodedString:i}})}xe();var yy=class{_uint8Array;_bufferView;_position=0;_asciiDecoder=new TextDecoder("ascii",{fatal:!0});constructor(t){this._uint8Array=new Uint8Array(t),this._bufferView=new DataView(t)}readString(t){let r=this.readBuffer(t),n=r.indexOf(0);return n===-1?this._asciiDecoder.decode(r):this._asciiDecoder.decode(r.subarray(0,n))}readBuffer(t){let r=this._uint8Array.subarray(this.position(),this.position()+t);return this.seekBy(t),r}seekBy(t){this._position+=t}seekTo(t){this._position=t}peekUint32(){return this._bufferView.getUint32(this.position(),!0)}position(){return this._position}size(){return this._bufferView.byteLength}};function zd(e,t){let r=parseInt(e,t);if(isNaN(r))throw new Error("Parsing number failed");return r}function Ri(e,t){return e===""?null:zd(e,t)}var Kd=class e{_fields;static parse(t){let r=new Uint8Array(t),n=[],o=new TextDecoder("utf-8",{fatal:!0});for(;r.length>0;){let a=r.indexOf(32);if(a===-1)throw new Error("Expected space character");let i=zd(o.decode(r.subarray(0,a)),10),l=o.decode(r.subarray(0,i)).match(/^\d+ ([^=]+)=(.*)\n$/);if(l===null)throw new Error("Invalid PAX header data format.");let c=l[1],u=l[2];typeof u=="string"&&u.length===0?u=null:typeof u=="string"&&/^\d+$/.test(u)&&(u=zd(u,10));let d={name:c,value:u};n.push(d),r=r.subarray(i)}return new e(n)}constructor(t){this._fields=t}applyHeader(t){for(let r of this._fields){let n=r.name,o=r.value;n==="path"?(n="name",t.namePrefix!==void 0&&delete t.namePrefix):n==="linkpath"&&(n="linkname"),o===null?delete t[n]:t[n]=o}}},Zd=class{_reader;_globalPaxHeader=null;constructor(t){this._reader=new yy(t)}hasNext(){return this._reader.position()+4<this._reader.size()&&this._reader.peekUint32()!==0}next(){return this._readNextFile()}_readNextFile(){let t=this._reader,r=t.position(),n=t.readString(100),o=t.readString(8),a=Ri(t.readString(8),8),i=Ri(t.readString(8),8),s=zd(t.readString(12),8),l=Ri(t.readString(12),8),c=Ri(t.readString(8),10),u=t.readString(1),d=t.readString(100),f=t.readString(6),p=null,h=null,y=null,b=null,m=null,g=null;f.indexOf("ustar")>-1&&(p=t.readString(2),h=t.readString(32),y=t.readString(32),b=Ri(t.readString(8),10),m=Ri(t.readString(8),10),g=t.readString(155),g.length>0&&(n=g+"/"+n));let T=(s-1|511)+1,S=r+512,I=S+T;if(t.seekTo(S),u==="g")return this._globalPaxHeader=Kd.parse(t.readBuffer(s)),t.seekTo(I),this._readNextFile();if(u==="x"){let N=Kd.parse(t.readBuffer(s));t.seekTo(I);let R=this._readNextFile();return N.applyHeader(R),R}let w=u==="0"||u===""||u==="7"?t.readBuffer(s):null;t.seekTo(I);let k={name:n,type:u,buffer:w,mode:o,uid:a,gid:i,size:s,mtime:l,checksum:c,linkname:d,ustarFormat:f,version:p,uname:h,gname:y,devmajor:b,devminor:m,namePrefix:g};return this._globalPaxHeader!==null&&this._globalPaxHeader.applyHeader(k),k}};async function $A(e,t,r,n,o,a){let i=[];if(n!==null){let c=t6(r)?r:null,{debugName:u,breakpadId:d,address:f}=n,p=await qd("/source/v1",JSON.stringify({debugName:u,debugId:d,moduleOffset:`0x${f.toString(16)}`,file:e}),c,a,e6);switch(p.type){case"SUCCESS":return{type:"SUCCESS",source:p.convertedResponse};case"ERROR":{i.push(...p.errors);break}default:throw ae(p)}}if(t!==null)try{let c=await a.fetchJSSourceFromBrowser(t);if(c)return{type:"SUCCESS",source:c}}catch(c){i.push({type:"NOT_PRESENT_IN_BROWSER",sourceUuid:t,url:e,errorMessage:c.toString()})}let s=Hc(e),l=bS(s);switch(l.type){case"CORS_ENABLED_SINGLE_FILE":{let{url:c}=l;try{return{type:"SUCCESS",source:await(await a.fetchUrlResponse(c)).text()}}catch(u){i.push({type:"NETWORK_ERROR",url:c,networkErrorMessage:u.toString()})}break}case"CORS_ENABLED_ARCHIVE":{let{archiveUrl:c,pathInArchive:u}=l,d=o.get(c);d===void 0&&(d=(async()=>{let f=await a.fetchUrlResponse(c),p=new Uint8Array(await f.arrayBuffer());return Ka(p)?za(p):p})(),o.set(c,d));try{let f=await d,p=new Zd(f.buffer),h=new TextDecoder;for(;p.hasNext();){let y=p.next();if(y.name===u&&y.buffer!==null)return{type:"SUCCESS",source:h.decode(y.buffer)}}i.push({type:"NOT_PRESENT_IN_ARCHIVE",url:c,pathInArchive:u})}catch(f){i.push({type:"ARCHIVE_PARSING_ERROR",url:c,parsingErrorMessage:f.toString()})}break}case"NO_KNOWN_CORS_URL":{i.push({type:"NO_KNOWN_CORS_URL"});break}default:throw ae(l)}return{type:"ERROR",errors:i}}function e6(e){if(!("source"in e)||typeof e.source!="string")throw new Error('No string "source" property on API response');return e.source}function t6(e){return oo(e)}var by=class{async fetchUrlResponse(t,r){return fetch(t,r!==void 0?{method:"POST",body:r}:{})}async queryBrowserSymbolicationApi(t,r){throw new Error("No browser connection available in profiler-cli")}async fetchJSSourceFromBrowser(t){throw new Error("No browser connection available in profiler-cli")}},GA=new by,Jd=class e{_store;_processIndexMap;_timestampManager;_threadMap;_markerMap;_filterStack;_archiveCache;constructor(t,r){this._store=t,this._processIndexMap=new Map,this._timestampManager=new Hu(r),this._threadMap=new Vu,this._filterStack=new jd,this._archiveCache=new Map;let n=this._store.getState(),o=ge(n);this._markerMap=new qu,Array.from(new Set(o.threads.map(i=>i.pid))).forEach((i,s)=>{this._processIndexMap.set(i,s)}),o.threads.forEach((i,s)=>{this._threadMap.handleForThreadIndex(s)})}static async load(t){let{store:r,rootRange:n}=await bA(t);return new e(r,n)}async profileInfo(t=!1,r){return{...await xA(this._store,this._timestampManager,this._threadMap,this._processIndexMap,t,r),context:this._getContext()}}async threadInfo(t){return{...await vA(this._store,this._timestampManager,this._threadMap,t),context:this._getContext()}}async threadSamples(t,r=!1,n,o){let a=!r,i=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),s=()=>wA(this._store,this._threadMap,t),l=a?()=>this._withDroppedIdle(i,s):s,c=n?()=>this._withCallTreeSearch(n,l):l,u=o&&o.length>0?this._withEphemeralFilters(i,o,c):c(),d=this._filterStack.list(ut(i));return{...u,activeOnly:a,search:n||void 0,activeFilters:d.length>0?d:void 0,ephemeralFilters:o&&o.length>0?o:void 0,context:this._getContext()}}async threadSamplesTopDown(t,r,n=!1,o,a){let i=!n,s=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),l=()=>_A(this._store,this._threadMap,t,r),c=i?()=>this._withDroppedIdle(s,l):l,u=o?()=>this._withCallTreeSearch(o,c):c,d=a&&a.length>0?this._withEphemeralFilters(s,a,u):u(),f=this._filterStack.list(ut(s));return{...d,activeOnly:i,search:o||void 0,activeFilters:f.length>0?f:void 0,ephemeralFilters:a&&a.length>0?a:void 0,context:this._getContext()}}async threadSamplesBottomUp(t,r,n=!1,o,a){let i=!n,s=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),l=()=>kA(this._store,this._threadMap,t,r),c=i?()=>this._withDroppedIdle(s,l):l,u=o?()=>this._withCallTreeSearch(o,c):c,d=a&&a.length>0?this._withEphemeralFilters(s,a,u):u(),f=this._filterStack.list(ut(s));return{...d,activeOnly:i,search:o||void 0,activeFilters:f.length>0?f:void 0,ephemeralFilters:a&&a.length>0?a:void 0,context:this._getContext()}}async pushViewRange(t){let r=this._store.getState(),n=fr(r),o=n.start,a,i,s;if(t.startsWith("m-")&&!t.includes(",")){let{threadIndexes:g,markerIndex:T}=this._markerMap.markerForHandle(t),S=ht(g),v=S.getFullMarkerList(r)[T];if(!v)throw new Error(`Marker ${t} not found`);if(v.end===null)throw new Error(`Marker ${t} is an instant marker (no duration). Only interval markers can be used for zoom ranges.`);a=v.start,i=v.end;let w=this._threadMap.handleForThreadIndexes(g),k=S.getFriendlyThreadName(r);s={markerHandle:t,markerName:v.name,threadHandle:w,threadName:k}}else{let g=t.split(",").map(I=>I.trim());if(g.length!==2)throw new Error(`Invalid range format: "${t}". Expected a marker handle (e.g., "m-1") or two comma-separated values (e.g., "2.7,3.1" or "ts-6,ts-7")`);let T=my(g[0],n),S=my(g[1],n);a=T??(()=>{let I=this._timestampManager.timestampForName(g[0]);if(I===null)throw new Error(`Unknown timestamp name: "${g[0]}"`);return I})(),i=S??(()=>{let I=this._timestampManager.timestampForName(g[1]);if(I===null)throw new Error(`Unknown timestamp name: "${g[1]}"`);return I})()}let l;(a<n.start||i>n.end)&&(l=`Range extends outside the profile duration (${((n.end-n.start)/1e3).toFixed(3)}s). Did you mean to use milliseconds? Use the "ms" suffix for milliseconds (e.g. 0ms,400ms).`);let c=this._timestampManager.nameForTimestamp(a),u=this._timestampManager.nameForTimestamp(i),d=a-o,f=i-o;this._store.dispatch(x_(d,f));let p=this._store.getState(),y=dr(p).length,b=i-a,m=`Pushed view range: ${c} (${this._timestampManager.timestampString(a)}) to ${u} (${this._timestampManager.timestampString(i)})`;return{type:"view-range",action:"push",range:{start:a,startName:c,end:i,endName:u},message:m,duration:b,zoomDepth:y,markerInfo:s,warning:l}}async popViewRange(){let t=this._store.getState(),r=dr(t);if(r.length===0)throw new Error("No view ranges to pop");let n=r.length-1;this._store.dispatch(Zh(n));let o=r[n],i=fr(t).start,s=o.start+i,l=o.end+i,c=this._timestampManager.nameForTimestamp(s),u=this._timestampManager.nameForTimestamp(l),d=`Popped view range: ${c} (${this._timestampManager.timestampString(s)}) to ${u} (${this._timestampManager.timestampString(l)})`;return{type:"view-range",action:"pop",range:{start:s,startName:c,end:l,endName:u},message:d}}async clearViewRange(){let t=this._store.getState();if(dr(t).length===0)throw new Error("No view ranges to clear");this._store.dispatch(Zh(0));let n=fr(t),o=this._timestampManager.nameForTimestamp(n.start),a=this._timestampManager.nameForTimestamp(n.end),i=`Cleared all view ranges, returned to full profile: ${o} (${this._timestampManager.timestampString(n.start)}) to ${a} (${this._timestampManager.timestampString(n.end)})`;return{type:"view-range",action:"pop",range:{start:n.start,startName:o,end:n.end,endName:a},message:i}}async threadSelect(t){let r=this._threadMap.threadIndexesForHandle(t);this._store.dispatch(S_(r));let n=this._store.getState(),o=ge(n);if(r.size===1){let i=Array.from(r)[0],s=o.threads[i];return`Selected thread: ${t} (${s.name})`}let a=Array.from(r).map(i=>o.threads[i].name).join(", ");return`Selected ${r.size} threads: ${t} (${a})`}filterPush(t,r){let n=r!==void 0?this._threadMap.threadIndexesForHandle(r):Je(this._store.getState()),o=ut(n),a=r??this._threadMap.handleForThreadIndexes(n),i=this._filterStack.push(this._store,o,t),s=this._filterStack.list(o);return{type:"filter-stack",threadHandle:a,filters:s,action:"push",message:`Pushed filter ${i.index}: ${i.description}`}}filterPop(t=1,r){let n=r!==void 0?this._threadMap.threadIndexesForHandle(r):Je(this._store.getState()),o=ut(n),a=r??this._threadMap.handleForThreadIndexes(n),i=this._filterStack.pop(this._store,o,t),s=this._filterStack.list(o),l;return i.length===0?l="No filters to pop":i.length===1?l=`Popped filter: ${i[0].description}`:l=`Popped ${i.length} filters`,{type:"filter-stack",threadHandle:a,filters:s,action:"pop",message:l}}filterClear(t){let r=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),n=ut(r),o=t??this._threadMap.handleForThreadIndexes(r),a=this._filterStack.clear(this._store,n),i=a.length===0?"No filters to clear":`Cleared ${a.length} filter(s)`;return{type:"filter-stack",threadHandle:o,filters:[],action:"clear",message:i}}filterList(t){let r=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),n=ut(r),o=t??this._threadMap.handleForThreadIndexes(r),a=this._filterStack.list(n);return{type:"filter-stack",threadHandle:o,filters:a}}_withEphemeralFilters(t,r,n){if(r.length===0)return n();let o=ut(t),a=Uo(this._store.getState(),o).length;for(let i of r)gy(this._store,o,i);try{return n()}finally{this._store.dispatch({type:"POP_TRANSFORMS_FROM_STACK",threadsKey:o,firstPoppedFilterIndex:a})}}_withDroppedIdle(t,r){var l;let n=this._store.getState(),a=((l=ge(n).meta.categories)==null?void 0:l.findIndex(c=>c.name==="Idle"))??-1;if(a===-1)return r();let i=ut(t),s=Uo(n,i).length;this._store.dispatch(qr(i,{type:"drop-category",category:a}));try{return r()}finally{this._store.dispatch({type:"POP_TRANSFORMS_FROM_STACK",threadsKey:i,firstPoppedFilterIndex:s})}}_withCallTreeSearch(t,r){let n=Bp(this._store.getState());this._store.dispatch(zh(t));try{return r()}finally{this._store.dispatch(zh(n))}}_getContext(){let t=this._store.getState(),r=ge(t),n=fr(t),o=dr(t),a=Je(t),i=a.size>0?this._threadMap.handleForThreadIndexes(a):null,s=Array.from(a).map(u=>({threadIndex:u,name:r.threads[u].name})),l=n.start,c=null;if(o.length>0){let u=o[o.length-1],d=u.start+l,f=u.end+l,p=this._timestampManager.nameForTimestamp(d),h=this._timestampManager.nameForTimestamp(f);c={start:d,startName:p,end:f,endName:h}}return{selectedThreadHandle:i,selectedThreads:s,currentViewRange:c,rootRange:{start:n.start,end:n.end}}}async getStatus(){let t=this._store.getState(),r=ge(t),n=fr(t),o=dr(t),a=Je(t),i=a.size>0?this._threadMap.handleForThreadIndexes(a):null,s=Array.from(a).map(d=>({threadIndex:d,name:r.threads[d].name})),l=n.start,c=o.map(d=>{let f=d.start+l,p=d.end+l,h=this._timestampManager.nameForTimestamp(f),y=this._timestampManager.nameForTimestamp(p);return{start:f,startName:h,end:p,endName:y}}),u=this._filterStack.activeThreadsKeys().map(d=>({threadsKey:d,threadHandle:this._threadMap.handleForKey(d),filters:this._filterStack.list(d)}));return{type:"status",selectedThreadHandle:i,selectedThreads:s,viewRanges:c,rootRange:{start:n.start,end:n.end},filterStacks:u}}async functionExpand(t){let r=this._store.getState(),n=ge(r),{funcTable:o,resourceTable:a,stringArray:i}=n.shared,s=ju(t,o.length),l=i[o.name[s]],c=o.resource[s],u;if(c!==-1){let f=a.lib[c];f!=null&&n.libs&&(u=n.libs[f].name)}let d=u?`${u}!${l}`:l;return{type:"function-expand",functionHandle:t,funcIndex:s,name:l,fullName:d,library:u,context:this._getContext()}}async functionInfo(t){let r=this._store.getState(),n=ge(r),{funcTable:o,resourceTable:a,stringArray:i}=n.shared,s=ju(t,o.length),l=i[o.name[s]],c=o.resource[s],u=o.isJS[s],d=o.relevantForJS[s],f,p,h;if(c!==-1){f={name:i[a.name[c]],index:c};let m=a.lib[c];if(m!=null&&m>=0&&n.libs){let g=n.libs[m];h=g.name,p={name:g.name,path:g.path,debugName:g.debugName,debugPath:g.debugPath,breakpadId:g.breakpadId}}}let y=h?`${h}!${l}`:l;return{type:"function-info",functionHandle:t,funcIndex:s,name:l,fullName:y,isJS:u,relevantForJS:d,resource:f,library:p,context:this._getContext()}}async threadMarkers(t,r){return{...await RA(this._store,this._threadMap,this._markerMap,t,r),context:this._getContext()}}async threadNetwork(t,r){return{...LA(this._store,this._threadMap,t,r),context:this._getContext()}}async threadPageLoad(t,r){return{...BA(this._store,this._threadMap,this._timestampManager,this._markerMap,t,r),context:this._getContext()}}async profileLogs(t={}){return{...DA(this._store,this._threadMap,t),context:this._getContext()}}async threadFunctions(t,r,n=!1,o){let a=!n,i=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),s=()=>CA(this._store,this._threadMap,t,r),l=a?()=>this._withDroppedIdle(i,s):s,c=o&&o.length>0?this._withEphemeralFilters(i,o,l):l(),u=this._filterStack.list(ut(i));return{...c,activeOnly:a,activeFilters:u.length>0?u:void 0,ephemeralFilters:o&&o.length>0?o:void 0,context:this._getContext()}}async markerInfo(t){return{...await OA(this._store,this._markerMap,this._threadMap,t),context:this._getContext()}}async markerStack(t){return{...await FA(this._store,this._markerMap,this._threadMap,t),context:this._getContext()}}async functionAnnotate(t,r,n,o="2"){let a=this._store.getState(),i=ge(a),{funcTable:s,stringArray:l,resourceTable:c}=i.shared,u=ju(t,s.length),d=l[s.name[u]],f=[],p=s.resource[u],h;if(p!==-1){let D=c.lib[p];D!=null&&D>=0&&i.libs&&(h=i.libs[D].name)}let y=h?`${h}!${d}`:d,b=Je(a),m=ht(b),g=m.getFilteredThread(a),{stackTable:T,frameTable:S,funcTable:I,nativeSymbols:v}=g,w=g.samples,k=m.getFriendlyThreadName(a),N=this._threadMap.handleForThreadIndexes(b),R=new Uint8Array(S.func.length);for(let D=0;D<S.func.length;D++)S.func[D]===u&&(R[D]=1);let F=new Int8Array(T.length);for(let D=0;D<T.length;D++){let re=T.frame[D];if(R[re])F[D]=1;else{let E=T.prefix[D];F[D]=E!==null?F[E]:-1}}let G=0,B=0;for(let D=0;D<w.length;D++){let re=w.stack[D];if(re===null)continue;let E=w.weight?w.weight[D]:1;F[re]===1&&(B+=E),R[T.frame[re]]&&(G+=E)}let Z=null;if(r==="src"||r==="all"){let D=s.source[u];if(D!==null){let re=g.sources.filename[D],E=g.stringTable.getString(re),A=g.sources.id[D],M=Su(T,S,I,D),{totalLineHits:P,selfLineHits:$}=xu(M,w),J=0,H=0;for(let q=0;q<w.length;q++){let Q=w.stack[q];if(Q===null)continue;let Te=M.stackIndexToLineSetIndex[Q];if(Te===-1)continue;let Ne=w.weight?w.weight[q]:1;J+=Ne,M.lineSetTable.self[Te]!==-1&&(H+=Ne)}let z=null;for(let q=0;q<S.func.length;q++)if(S.func[q]===u){let Q=S.nativeSymbol[q];if(Q!==null){let Te=v.libIndex[Q],Ne=i.libs[Te];Ne.debugName&&Ne.breakpadId&&(z={debugName:Ne.debugName,breakpadId:Ne.breakpadId,address:v.address[Q]});break}}let se=null,de=null,ue=await $A(E,A,n,z,this._archiveCache,GA);if(ue.type==="SUCCESS")se=ue.source.split(`
685
- `),de=se.length;else{let q=ue.errors.map(Q=>JSON.stringify(Q)).join("; ");f.push(`Could not fetch source for ${E}: ${q}`)}let fe=new Set([...P.keys(),...$.keys()]),be,V;if(o==="file"){be=new Set;let q=de??Math.max(...fe);for(let Q=1;Q<=q;Q++)be.add(Q);V="full file"}else{let q=parseInt(o,10),Q=Math.max(0,isNaN(q)?2:q);be=new Set;for(let Te of fe)for(let Ne=Math.max(1,Te-Q);Ne<=Te+Q;Ne++)be.add(Ne);V=Q===0?"annotated lines only":`\xB1${Q} lines context`}let te=Array.from(be).sort((q,Q)=>q-Q);Z={filename:E,totalFileLines:de,samplesWithFunction:J,samplesWithLineInfo:H,contextMode:V,lines:te.map(q=>({lineNumber:q,selfSamples:$.get(q)??0,totalSamples:P.get(q)??0,sourceText:se!==null?se[q-1]??null:null}))}}else r==="src"&&f.push(`Function ${t} has no source index. Use --mode asm for assembly view.`)}let X=[];if(r==="asm"||r==="all"){let D=new Set;for(let A=0;A<S.func.length;A++)if(S.func[A]===u){let M=S.nativeSymbol[A];M!==null&&D.add(M)}D.size===0&&f.push(`Function ${t} has no native symbols \u2014 may be JS-only or not symbolicated.`);let re=D.size,E=1;for(let A of D){let M=g.stringTable.getString(v.name[A]),P=v.address[A],$=v.functionSize[A]??null,J=v.libIndex[A],H=i.libs[J],z=Iu(T,S,I,A),{totalAddressHits:se,selfAddressHits:de}=vu(z,w),ue={name:M,address:P,functionSize:$??0,functionSizeIsKnown:$!==null,libIndex:J},fe=null,be=[];try{let V=await UA(ue,H,n,GA);V.type==="SUCCESS"?be=V.instructions.map(te=>({address:te.address,selfSamples:de.get(te.address)??0,totalSamples:se.get(te.address)??0,decodedString:te.decodedString})):(fe=V.errors.map(te=>JSON.stringify(te)).join("; "),f.push(`Assembly fetch failed for ${M}: ${fe}`))}catch(V){fe=V instanceof Error?V.message:String(V),f.push(`Assembly fetch threw for ${M}: ${fe}`)}X.push({compilationIndex:E,symbolName:M,symbolAddress:P,functionSize:$,nativeSymbolCount:re,fetchError:fe,instructions:be}),E++}}return{...{type:"function-annotate",functionHandle:t,funcIndex:u,name:d,fullName:y,threadHandle:N,friendlyThreadName:k,totalSelfSamples:G,totalTotalSamples:B,mode:r,srcAnnotation:Z,asmAnnotations:X,warnings:f},context:this._getContext()}}};var kt=ce(require("fs")),en=ce(require("path")),WA=ce(require("crypto"));function El(e){kt.existsSync(e)||kt.mkdirSync(e,{recursive:!0})}function Yd(){return Math.random().toString(36).substring(2,15)}function r6(e){let t=en.resolve(e).toLowerCase();return WA.createHash("sha256").update(t).digest("hex").slice(0,12)}function Mi(e,t){return process.platform==="win32"?`\\\\.\\pipe\\profiler-cli-${r6(e)}-${t}`:en.join(e,`${t}.sock`)}function HA(e,t){return en.join(e,`${t}.log`)}function Ty(e,t){return en.join(e,`${t}.json`)}function VA(e,t){El(e);let r=Ty(e,t.id);kt.writeFileSync(r,JSON.stringify(t,null,2))}function Xd(e,t){let r=Ty(e,t);if(!kt.existsSync(r))return null;try{let n=kt.readFileSync(r,"utf-8");return JSON.parse(n)}catch{return null}}function Qd(e,t){El(e);let r=en.join(e,"current.txt");kt.writeFileSync(r,t,"utf-8")}function fa(e){let t=en.join(e,"current.txt");if(!kt.existsSync(t))return null;try{return kt.readFileSync(t,"utf-8").trim()}catch{return null}}function jA(e){let t=fa(e);return t?Mi(e,t):null}function da(e){try{return process.kill(e,0),!0}catch{return!1}}async function qA(e,t=5e3,r=50){let n=Date.now()+t;for(;Date.now()<n;){if(!da(e))return!0;await new Promise(o=>setTimeout(o,r))}return!da(e)}function yn(e,t){let r=Mi(e,t),n=Ty(e,t),o=en.join(e,"current.txt");process.platform!=="win32"&&kt.rmSync(r,{force:!0}),kt.rmSync(n,{force:!0}),fa(e)===t&&kt.rmSync(o,{force:!0})}function _o(e,t){let r=Xd(e,t);return!r||!da(r.pid)||process.platform!=="win32"&&!kt.existsSync(r.socketPath)?null:r}function ef(e){return El(e),kt.readdirSync(e).filter(r=>r.endsWith(".json")).map(r=>en.basename(r,".json"))}xe();var Nl="mo31yxl3",zA="0.1.0-alpha.2";var Sy=class{querier=null;server=null;sessionDir;sessionId;socketPath;logPath;logStream;profilePath;loadingProfile=!1;profileLoadError=null;constructor(t,r,n){this.sessionDir=t,this.profilePath=r,this.sessionId=n||Yd(),this.socketPath=Mi(t,this.sessionId),this.logPath=HA(t,this.sessionId),this.logStream=Fi.createWriteStream(this.logPath,{flags:"a"}),this.redirectConsole(),process.on("SIGINT",()=>this.shutdown("SIGINT")),process.on("SIGTERM",()=>this.shutdown("SIGTERM"))}redirectConsole(){let t=console.log,r=console.error,n=console.warn;console.log=(...o)=>{let a=o.map(i=>String(i)).join(" ");this.logStream.write(`[LOG] ${new Date().toISOString()} ${a}
684
+ `)}xe();var eq=10;function aA(e,t,r){let[n,o,a]=t,i=Uint32Array.from(e);i.sort();let s=new TextDecoder,l=new Map,c,u="",d;for(let f=0;f<i.length;f++){let p=i[f],h=Yf(n,p,c)-1;if(h>=0){if(h!==c){let y=o[h],b=o[h+1],g=a.subarray(y,b);u=r(s.decode(g)),d=h<n.length-1?n[h+1]-n[h]:void 0,c=h}l.set(p,{symbolAddress:n[h],name:u,functionSize:d})}else l.set(p,{symbolAddress:0,name:"<before first symbol>"})}return l}function tq(e,t,r,n){let o=[];for(let a of e){let i=n(a),s=o.find(({value:l,elements:c})=>l+i<=t&&c.length+1<=r);s===void 0&&(s={value:0,elements:[]},o.push(s)),s.elements.push(a),s.value+=i}return o.map(({elements:a})=>a)}var Ni=class{_symbolProvider;constructor(t){this._symbolProvider=t}async getSymbols(t,r,n,o=!1){t=t.filter(s=>{let{debugName:l,breakpadId:c}=s.lib;return l===""||c===""?(n(s,new Go(`Failed to symbolicate library ${l}/${c}`,s.lib,new Error("Invalid debugName or breakpadId"))),!1):!0});let i=tq(t,1e4,eq,({addresses:s})=>s.size).map(s=>[s,this._symbolProvider.requestSymbolsFromServer(s)]);await Promise.all(i.map(async([s,l])=>{let c=new Map(t.map(y=>[y,[]])),u=await this._processSuccessfulResponsesAndReturnRemaining(s,l,c,r);if(u.length===0)return;let d=this._symbolProvider.requestSymbolsFromBrowser(u),f=await this._processSuccessfulResponsesAndReturnRemaining(u,d,c,r);if(f.length===0)return;let p=Promise.all(f.map(async y=>{try{let{lib:b}=y,g=await this._symbolProvider.requestSymbolsViaSymbolTableFromBrowser(y,o);return{type:"SUCCESS",lib:b,results:g}}catch(b){return{type:"ERROR",request:y,error:b}}})),h=await this._processSuccessfulResponsesAndReturnRemaining(f,p,c,r);if(h.length!==0)for(let y of h){let{lib:b}=y;n(y,new Go(`Could not obtain symbols for ${b.debugName}/${b.breakpadId}.`,b,...c.get(y)??[]))}}))}async _processSuccessfulResponsesAndReturnRemaining(t,r,n,o){try{let a=await r,i=[];for(let s=0;s<a.length;s++){let l=a[s];if(l.type==="SUCCESS"){let{lib:c,results:u}=l;o(c,u)}else{let{request:c,error:u}=l;i.push(c),W(n.get(c)).push(u)}}return i}catch(a){for(let i of t)W(n.get(i)).push(a);return t}}};var qn;function iA(e){return{lang:(e==null?void 0:e.lang)??(qn==null?void 0:qn.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(qn==null?void 0:qn.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(qn==null?void 0:qn.abortPipeEarly)}}var Jg;function rq(e){return Jg==null?void 0:Jg.get(e)}var Yg;function nq(e){return Yg==null?void 0:Yg.get(e)}var Xg;function oq(e,t){var r;return(r=Xg==null?void 0:Xg.get(e))==null?void 0:r.get(t)}function aq(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function ua(e,t,r,n,o){let a=o&&"input"in o?o.input:r.value,i=(o==null?void 0:o.expected)??e.expects??null,s=(o==null?void 0:o.received)??aq(a),l={kind:e.kind,type:e.type,input:a,expected:i,received:s,message:`Invalid ${t}: ${i?`Expected ${i} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:o==null?void 0:o.path,issues:o==null?void 0:o.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",u=(o==null?void 0:o.message)??e.message??oq(e.reference,l.lang)??(c?nq(l.lang):null)??n.message??rq(l.lang);u!==void 0&&(l.message=typeof u=="function"?u(l):u),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ko(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},iA())}}}function iq(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}var sq=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};var DY=new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation}))*)+$","u");function lq(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Qg(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ai(e,t){return{kind:"schema",type:"array",reference:Ai,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ko(this)},"~run"(r,n){var a;let o=r.value;if(Array.isArray(o)){r.typed=!0,r.value=[];for(let i=0;i<o.length;i++){let s=o[i],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:o,key:i,value:s};for(let u of l.issues)u.path?u.path.unshift(c):u.path=[c],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else ua(this,"type",r,n);return r}}}function ey(e){return{kind:"schema",type:"boolean",reference:ey,expects:"boolean",async:!1,message:e,get"~standard"(){return ko(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:ua(this,"type",t,r),t}}}function ty(e,t){return{kind:"schema",type:"nullable",reference:ty,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ko(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=Qg(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function _l(e){return{kind:"schema",type:"number",reference:_l,expects:"number",async:!1,message:e,get"~standard"(){return ko(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ua(this,"type",t,r),t}}}function Pi(e,t){return{kind:"schema",type:"object",reference:Pi,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ko(this)},"~run"(r,n){var a;let o=r.value;if(o&&typeof o=="object"){r.typed=!0,r.value={};for(let i in this.entries){let s=this.entries[i];if(i in o||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=i in o?o[i]:Qg(s),c=s["~run"]({value:l},n);if(c.issues){let u={type:"object",origin:"value",input:o,key:i,value:l};for(let d of c.issues)d.path?d.path.unshift(u):d.path=[u],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[i]=c.value}else if(s.fallback!==void 0)r.value[i]=lq(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(ua(this,"key",r,n,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:o,key:i,value:o[i]}]}),n.abortEarly))break}}else ua(this,"type",r,n);return r}}}function Xr(e,t){return{kind:"schema",type:"optional",reference:Xr,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ko(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Qg(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ry(e,t,r){return{kind:"schema",type:"record",reference:ry,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ko(this)},"~run"(n,o){var i,s;let a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(let l in a)if(iq(a,l)){let c=a[l],u=this.key["~run"]({value:l},o);if(u.issues){let f={type:"object",origin:"key",input:a,key:l,value:c};for(let p of u.issues)p.path=[f],(i=n.issues)==null||i.push(p);if(n.issues||(n.issues=u.issues),o.abortEarly){n.typed=!1;break}}let d=this.value["~run"]({value:c},o);if(d.issues){let f={type:"object",origin:"value",input:a,key:l,value:c};for(let p of d.issues)p.path?p.path.unshift(f):p.path=[f],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),o.abortEarly){n.typed=!1;break}}(!u.typed||!d.typed)&&(n.typed=!1),u.typed&&(n.value[u.value]=d.value)}}else ua(this,"type",n,o);return n}}}function Qr(e){return{kind:"schema",type:"string",reference:Qr,expects:"string",async:!1,message:e,get"~standard"(){return ko(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:ua(this,"type",t,r),t}}}function sA(e,t,r){let n=e["~run"]({value:t},iA(r));if(n.issues)throw new sq(n.issues);return n.value}var uq=ry(Qr(),ty(ey())),dq=Pi({function:Xr(Qr()),file:Xr(Qr()),line:Xr(_l())}),fq=Pi({module_offset:Qr(),module:Qr(),frame:_l(),function:Xr(Qr()),function_offset:Xr(Qr()),function_size:Xr(Qr()),file:Xr(Qr()),line:Xr(_l()),inlines:Xr(Ai(dq))}),pq=Ai(fq),hq=Pi({found_modules:uq,stacks:Ai(pq)}),mq=Pi({results:Ai(hq)});function gq(e){return sA(mq,e)}function yq(e,t,r,n){let{lib:o}=t,{debugName:a,breakpadId:i}=o;if(!n.found_modules[`${a}/${i}`])throw new Error(`The ${e} does not have symbols for ${a}/${i}.`);let s=n.stacks[0];if(s.length!==r.length)throw new Error(`The result from the ${e} has an unexpected length.`);let l=new Map;for(let c=0;c<s.length;c++){let u=r[c],d=s[c],f;if(d.function!==void 0&&d.function_offset!==void 0){let p=d.function,h=parseInt(d.function_offset.substr(2),16),y;if(d.inlines!==void 0){let g=d.inlines.length;y=d.inlines.map(({function:m,file:T,line:S},I)=>{let v=g-I;return{name:m??`<unknown at ${d.module_offset} at inline depth ${v}>`,file:T,line:S}})}let b;d.function_size!==void 0&&(b=parseInt(d.function_size.substr(2),16)),f={name:p,symbolAddress:u-h,file:d.file,line:d.line,inlines:y,functionSize:b}}else f={name:`<unknown at ${d.module_offset}>`,symbolAddress:u};l.set(u,f)}return l}async function Wd(e,t,r){let n=t.map(i=>({request:i,addressArray:Array.from(i.addresses)})),o={jobs:n.map(({request:i,addressArray:s})=>{let{debugName:l,breakpadId:c}=i.lib;return{memoryMap:[[l,c]],stacks:[s.map(u=>[0,u])]}})},a=gq(await r("/symbolicate/v5",JSON.stringify(o)));return n.map(({request:i,addressArray:s},l)=>{let c=a.results[l];try{let{lib:u}=i,d=yq(e,i,s,c);return{type:"SUCCESS",lib:u,results:d}}catch(u){return{type:"ERROR",request:i,error:u}}})}rr();var da=ce(Kt()),fA=ce(uA());xe();var pA=e=>e.publish,Sq=e=>pA(e).checkedSharingOptions,ZY=(0,da.createSelector)(ge,fr,(e,t)=>{let{startTime:r,product:n}=e.meta,o=f=>f<10?`0${f}`:`${f}`,a=new Date(r+t.start),i=o(a.getFullYear()),s=o(a.getMonth()+1),l=o(a.getDate()),c=o(a.getHours()),u=o(a.getMinutes()),d=`${i}-${s}-${l} ${c}.${u}`;return`${n} ${d} profile.json`}),xq=(0,da.createSelector)(Sq,ge,pr,Nn,lo,Pn,Rn,ov,cv,(e,t,r,n,o,a,i,s,l)=>{let c=!0;for(let[f,p]of Object.entries(e))f==="includePreferenceValues"&&!s||f==="includePrivateBrowsingData"&&!l||(c=c&&p);if(c)return null;let u=new Set,d=new Set;if(!e.includeHiddenThreads){for(let f of n){let p=a[f];if(p.type==="process"){p.mainThreadIndex!==null&&u.add(p.mainThreadIndex);let h=W(i.get(p.pid),"Expected to be able to get a local track by PID.");for(let y of h)y.type==="thread"&&u.add(y.threadIndex)}}for(let[f,p]of o){let h=W(i.get(f),"Expected to be able to get a local track by PID");for(let y of p){let b=h[y];b.type==="thread"?u.add(b.threadIndex):"counterIndex"in b&&typeof b.counterIndex=="number"&&d.add(b.counterIndex)}}}return{shouldFilterToCommittedRange:e.includeFullTimeRange?null:r,shouldRemoveUrls:!e.includeUrls,shouldRemoveThreadsWithScreenshots:new Set(e.includeScreenshots?[]:t.threads.map((f,p)=>p)),shouldRemoveThreads:u,shouldRemoveCounters:d,shouldRemoveExtensions:!e.includeExtension,shouldRemovePreferenceValues:!e.includePreferenceValues,shouldRemovePrivateBrowsingData:!e.includePrivateBrowsingData}}),dA=null,ny=null;function Iq(e){let t=Wt(e);return(dA!==t||ny===null)&&(dA=t,ny=Wt(e).map((r,n)=>ht(n).getDerivedMarkerInfo(e))),ny}var JY=(0,da.createSelector)(ge,Iq,xq,ft,F_);var vq=e=>pA(e).upload;var wq=(0,da.createSelector)(vq,({uploadProgress:e})=>(0,fA.default)(e,.1,.95));var YY=(0,da.createSelector)(wq,e=>dt(e,0,0,"percent"));var XY=(0,da.createSelector)(ge,Yu);var oy=ce(Kt());var eX=(0,oy.createSelector)(As,Vo,Wt,(e,t,r)=>e!==void 0&&(t.configuration&&t.configuration.features.includes("cpu")||r.some(n=>n.samples.threadCPUDelta!==void 0))),tX=(0,oy.createSelector)(Kp,e=>e!==null&&e.some(t=>t.category==="CPU"));var Cl=ce(Kt());var Cq=e=>e.code.sourceCodeCache,oX=(0,Cl.createSelector)(Cq,so,(e,t)=>t!==null?e.get(t):void 0),Eq=e=>e.code.assemblyCodeCache,hA=(0,Cl.createSelector)($a,Ns,(e,t)=>t===null||e===null||t.libs.length===0?null:t.libs[e.libIndex]),aX=(0,Cl.createSelector)($a,hA,(e,t)=>e!==null&&t!==null),iX=(0,Cl.createSelector)(Eq,$a,hA,(e,t,r)=>{if(t===null||r===null)return;let{debugName:n,breakpadId:o}=r,a=t.address.toString(16),i=`${n}/${o}/${a}`;return e.get(i)});function mA(e){return{type:"FATAL_ERROR",error:e}}xe();var gA=new Set,Aq=0;function yA(e){return t=>{let r=[];for(let n of e){if(!n||gA.has(n))continue;gA.add(n);let o=`favicon-${++Aq}`;r.push({icon:n,className:o})}t({type:"ICON_BATCH_ADD",icons:r})}}xe();var El=class{_dbPromise;_maxCount;_maxAge;constructor(t,r=200,n=12096e5){this._dbPromise=this._setupDB(t),this._maxCount=r,this._maxAge=n}_getDB(){return this._dbPromise?this._dbPromise:Promise.reject(new Error("The database is closed."))}_setupDB(t){let r=window.indexedDB;if(!r)throw new Error("Could not find indexedDB on the window object.");return new Promise((n,o)=>{let a=r.open(t,2);a.onerror=()=>{if(a.error&&a.error.name==="VersionError"){let i=r.deleteDatabase(t);i.onerror=()=>o(i.error),i.onsuccess=()=>{this._setupDB(t).then(n,o)}}else o(a.error)},a.onupgradeneeded=({oldVersion:i})=>{let s=a.result;s.onerror=o,i===1&&s.deleteObjectStore("symbol-tables"),s.createObjectStore("symbol-tables",{keyPath:["debugName","breakpadId"]}).createIndex("lastUsedDate","lastUsedDate")},a.onblocked=()=>{o(new Error("The symbol store database could not be upgraded because it is open in another tab. Please close all your other profiler.firefox.com tabs and refresh."))},a.onsuccess=()=>{let i=a.result;i.onversionchange=()=>{i.close()},n(i),this._deleteAllBeforeDate(i,new Date(+new Date-this._maxAge)).catch(s=>{console.error("Encountered error while cleaning out database:",s)})}})}storeSymbolTable(t,r,[n,o,a]){return this._getDB().then(i=>new Promise((s,l)=>{let c=i.transaction("symbol-tables","readwrite");c.onerror=()=>l(c.error);let u=c.objectStore("symbol-tables");this._deleteLeastRecentlyUsedUntilCountIsNoMoreThanN(u,this._maxCount-1,()=>{let d=new Date,f=u.put({debugName:t,breakpadId:r,addrs:n,index:o,buffer:a,lastUsedDate:d});f.onsuccess=()=>s()})}))}getSymbolTable(t,r){return this._getDB().then(n=>new Promise((o,a)=>{let i=n.transaction("symbol-tables","readwrite");i.onerror=()=>a(i.error);let l=i.objectStore("symbol-tables").openCursor([t,r]);l.onsuccess=()=>{let c=l.result;if(c){let u=c.value;u.lastUsedDate=new Date;let d=c.update(u),{addrs:f,index:p,buffer:h}=u;d.onsuccess=()=>o([f,p,h])}else o(null)}}))}close(){return this._getDB().then(t=>{t.close(),this._dbPromise=null})}_deleteAllBeforeDate(t,r){return new Promise((n,o)=>{let a=t.transaction("symbol-tables","readwrite");a.onerror=()=>o(a.error);let i=a.objectStore("symbol-tables");this._deleteRecordsLastUsedBeforeDate(i,r,n)})}_deleteRecordsLastUsedBeforeDate(t,r,n){let o=t.index("lastUsedDate"),a=window.IDBKeyRange.upperBound(r,!0),i=o.openCursor(a);i.onsuccess=()=>{let s=i.result;s?s.delete().onsuccess=()=>{s.continue()}:n()}}_deleteNLeastRecentlyUsedRecords(t,r,n){let a=t.index("lastUsedDate").openCursor(),i=0;a.onsuccess=()=>{let s=a.result;if(s){let l=s.delete();l.onsuccess=()=>{i++,i<r?s.continue():n()}}else n()}}_count(t,r){let n=t.count();n.onsuccess=()=>r(n.result)}_deleteLeastRecentlyUsedUntilCountIsNoMoreThanN(t,r,n){this._count(t,o=>{if(o>r){let a=o-r;this._deleteNLeastRecentlyUsedRecords(t,a,n)}else n()})}};function ly(e,t={},r=!1){return async n=>{if(e.threads.length===0){console.error("This profile has no threads.",e),n(mA(new Error("No threads were captured in this profile, there is nothing to display.")));return}n({type:"PROFILE_LOADED",profile:e,pathInZipFile:t.pathInZipFile??null,implementationFilter:t.implementationFilter??null,transformStacks:t.transformStacks??null}),r===!1&&await n(Vd(t.browserConnection??null,t.skipSymbolication))}}function Vd(e=null,t){return async(r,n)=>{if(t&&process.env.NODE_ENV!=="test")throw new Error("Please do not use skipSymbolication outside of tests");let o=Ns(n());if(o===null||Xp(n()).phase!=="PROFILE_LOADED")return;let a=Wp(n()),i=o.pages;r(Rq(o,a));let s=null;e&&i&&i.length>0&&(s=Uq(r,i,e));let l=null;if(!t&&o.meta.symbolicated===!1){let c=Dq(r,XI(n()),e);c&&(l=Bq(r,o,c))}await Promise.all([s,l])}}function Rq(e,t){return(r,n)=>{let o=t!==null,a=Zp(n()),i=o?qI(n()):null,s=gx(e,i,a),l=mx(e,s),c=Jp(n()),u=HI(n()),d=yx(s,o?Hp(n()):null,u,c),f=hx(o?jI(n()):null,l,u,e),p={globalTracks:s,globalTrackOrder:d,localTracksByPid:l,localTrackOrderByPid:f},h=null,y=VI(n());y!==null?h=Tx(p,y,e):o&&(h=Sx(p,Nn(n()),lo(n()))),h===null&&(h=xx(p,e,c,i===null));let b=bx(t,ip(p,h),e,c),g=null;o||(g=tx(e));let m=Ga(n());if(no.includes(m)){let T=!1;for(let S of b){let I=e.threads[S],{samples:v,jsAllocations:w,nativeAllocations:k}=I;if(T=[v,w,k].some(E=>eo(E==null?void 0:E.stack,e.shared)),T)break}T||(m="marker-chart")}CI(()=>{r({type:"VIEW_FULL_PROFILE",selectedThreadIndexes:b,selectedTab:m,globalTracks:s,globalTrackOrder:d,localTracksByPid:l,localTrackOrderByPid:f,timelineType:g,...h})})}}function bA(e){return{type:"REQUESTING_SYMBOL_TABLE",requestedLib:e}}function ay(e){return{type:"RECEIVED_SYMBOL_TABLE_REPLY",requestedLib:e}}function Mq(){return{type:"START_SYMBOLICATING"}}function Fq(){return{type:"DONE_SYMBOLICATING"}}function Oq(e){return(t,r)=>{let{threads:n,shared:o}=ge(r()),{threads:a,shared:i,oldFuncToNewFuncsMap:s}=iu(n,o,e);t({type:"BULK_SYMBOLICATION",oldFuncToNewFuncsMap:s,symbolicatedThreads:a,symbolicatedShared:i})}}var Hd;typeof window=="object"&&window.requestIdleCallback?Hd=window.requestIdleCallback:typeof process=="object"&&process.nextTick?Hd=process.nextTick:Hd=e=>setTimeout(e,0);var iy=class{_updates;_updateObservers;_requestedUpdate;constructor(){this._updates=[],this._updateObservers=[],this._requestedUpdate=!1}_scheduleUpdate(t){this._requestedUpdate||(Hd(()=>this._dispatchUpdate(t),{timeout:2e3}),this._requestedUpdate=!0)}_dispatchUpdate(t){let r=this._updates,n=this._updateObservers;this._updates=[],this._updateObservers=[],this._requestedUpdate=!1,t(Oq(r));for(let o of n)o()}enqueueSingleSymbolicationStep(t,r,n){this._scheduleUpdate(t),this._updates.push(r),this._updateObservers.push(n)}},Lq=new iy;function Dq(e,t,r){if(typeof window>"u"||!window.indexedDB)return null;let n=new sy("perf-html-async-storage",e,t,r);return new Ni(n)}var sy=class{_dispatch;_symbolServerUrl;_browserConnection;_symbolDb;_demangleCallback=null;constructor(t,r,n,o){this._dispatch=r,this._symbolServerUrl=n,this._browserConnection=o,this._symbolDb=new El(`${t}-symbol-tables`)}async _makeSymbolicationAPIRequestWithCallback(t,r,n){for(let{lib:o}of r)this._dispatch(bA(o));try{return await Wd(t,r,n)}catch(o){throw new Error(`There was a problem with the symbolication API request to the ${t}: ${o.message}`)}finally{for(let{lib:o}of r)this._dispatch(ay(o))}}requestSymbolsFromServer(t){return this._makeSymbolicationAPIRequestWithCallback("symbol server",t,async(r,n)=>(await fetch(this._symbolServerUrl+r,{body:n,method:"POST",mode:"cors",headers:new Headers({"User-Agent":`FirefoxProfiler/1.0 (+${location.origin})`})})).json())}async requestSymbolsFromBrowser(t){if(this._browserConnection===null)throw new Error("No connection to the browser, cannot run querySymbolicationApi");let r=this._browserConnection;return this._makeSymbolicationAPIRequestWithCallback("browser",t,async(n,o)=>JSON.parse(await r.querySymbolicationApi(n,o)))}async _createDemangleCallback(){try{let{demangle_any:t}=await import("gecko-profiler-demangle");return t}catch(t){return console.error("Demangling module could not be imported.",t),r=>r}}async _getDemangleCallback(){return this._demangleCallback??=await this._createDemangleCallback()}async requestSymbolsViaSymbolTableFromBrowser(t,r){let n=await this._getDemangleCallback(),{lib:o,addresses:a}=t,{debugName:i,breakpadId:s}=o,l=null;return r||(l=await this._symbolDb.getSymbolTable(i,s)),l===null&&(l=await this._requestSymbolTableFromBrowser(o),this._storeSymbolTableInDB(o,l)),aA(a,l,n)}async _requestSymbolTableFromBrowser(t){if(this._browserConnection===null)throw new Error("No connection to the browser, cannot obtain symbol tables");let{debugName:r,breakpadId:n}=t;this._dispatch(bA(t));try{let o=await this._browserConnection.getSymbolTable(r,n);return this._dispatch(ay(t)),o}catch(o){throw this._dispatch(ay(t)),o}}async _storeSymbolTableInDB(t,r){let{debugName:n,breakpadId:o}=t;try{await this._symbolDb.storeSymbolTable(n,o,r)}catch(a){console.log(`Failed to store the symbol table for ${n} in the database:`,a)}}};async function Bq(e,t,r,n){e(Mq());let o=[];await su(t,r,a=>{o.push(new Promise(i=>{Lq.enqueueSingleSymbolicationStep(e,a,()=>i(void 0))}))},n),await Promise.all(o),e(Fq())}async function Uq(e,t,r){let n=[...t],o=await r.getPageFavicons(n.map(s=>s.url));if(n.length!==o.length)return;let a=o.map(s=>s?jv(s.data,s.mimeType):Promise.resolve(null)),i=await Promise.all(a);for(let s=0;s<o.length;s++)i[s]&&(n[s]={...n[s],favicon:i[s]});e(yA(i)),e({type:"UPDATE_PAGES",newPages:n})}rr();function TA(e){return e.startsWith("http://")||e.startsWith("https://")}function SA(e){try{return new URL(e).searchParams.get("symbolServer")??void 0}catch{return}}async function $q(e,t,r){r(),console.log(`Symbolicating profile using ${t}...`);let n=new Ni({requestSymbolsFromServer:async s=>Wd("symbol server",s,async(l,c)=>(await fetch(t+l,{body:c,method:"POST"})).json()),requestSymbolsFromBrowser:async()=>[],requestSymbolsViaSymbolTableFromBrowser:async()=>{throw new Error("Not supported in this context")}}),o=[];await su(e,n,s=>{o.push(s)});let{shared:a,threads:i}=iu(e.threads,e.shared,o);e.shared=a,e.threads=i,e.meta.symbolicated=!0,console.log("Symbolication complete")}async function Gq(e){return(await fetch(e,{method:"HEAD",redirect:"follow"})).url}async function vA(e,t,r){let n=om();console.log(`Loading profile from ${e}`);let o=TA(e)?SA(e):void 0;if(TA(e)){let c=e;if(e.includes("profiler.firefox.com")||e.includes("share.firefox.dev")){e.includes("share.firefox.dev")&&(console.log("Following redirect from short URL..."),c=await Gq(e),console.log(`Redirected to: ${c}`),o=SA(c));let h=rA(c);if(h)console.log(`Extracted profile URL: ${h}`),c=h;else throw new Error(`Unable to extract profile URL from profiler URL: ${c}`)}console.log(`Fetching profile from ${c}`);let u=await Zg({url:c,onTemporaryError:h=>{h.attempt&&console.log(`Retry ${h.attempt.count}/${h.attempt.total}...`)}});if(u.responseType==="ZIP")throw new Error("Zip files are not yet supported in the CLI. Please extract the profile from the zip file first, or use the web interface at profiler.firefox.com");let d=await Uu(u.profile);if(d===void 0)throw new Error("Unable to parse the profile.");await xA(d,t,o,r),await n.dispatch(ly(d,{},!0)),await n.dispatch(Vd());let f=n.getState(),p=fr(f);return{store:n,rootRange:p}}let a=IA.readFileSync(e,null),i=await Uu(a);if(i===void 0)throw new Error("Unable to parse the profile.");await xA(i,t,o,r),await n.dispatch(ly(i,{},!0)),await n.dispatch(Vd());let s=n.getState(),l=fr(s);return{store:n,rootRange:l}}async function xA(e,t,r,n){if(e.meta.symbolicated===!0)return;let o=t??r??Ao;try{await $q(e,o,n??(()=>{}))}catch(a){console.warn(`Symbolication failed: ${a}. Loading profile without symbols.`)}}function wA(e,t,r=!1){let n=new Map;e.forEach(y=>{let{pid:b,threadIndex:g,name:m,tid:T,cpuMs:S}=y,I=n.get(b);if(I)I.cpuMs+=S,I.threads.push({threadIndex:g,name:m,tid:T,cpuMs:S});else{let v=t.get(b);if(v===void 0)throw new Error(`Process index not found for pid ${b}`);n.set(b,{pid:b,processIndex:v,name:b,cpuMs:S,threads:[{threadIndex:g,name:m,tid:T,cpuMs:S}]})}}),n.forEach(y=>{y.threads.sort((b,g)=>g.cpuMs-b.cpuMs)});let o=Array.from(n.values());if(o.sort((y,b)=>b.cpuMs-y.cpuMs),r)return{processes:o.map(({pid:y,processIndex:b,name:g,cpuMs:m,threads:T})=>({processIndex:b,pid:y,name:g,cpuMs:m,threads:T}))};let a=new Set(o.slice(0,5).map(y=>y.pid)),s=[...e].sort((y,b)=>b.cpuMs-y.cpuMs).slice(0,20),l=new Set(s.map(y=>y.pid)),c=new Set(s.map(y=>y.threadIndex)),u=o.filter(y=>a.has(y.pid)||l.has(y.pid)),d=new Set(u.map(y=>y.pid)),f=u.map(y=>{let{pid:b,processIndex:g,name:m,cpuMs:T,threads:S}=y,I=S.filter(F=>c.has(F.threadIndex)),v=S.filter(F=>!c.has(F.threadIndex)),w=[...I],k=Math.max(0,5-w.length);w.push(...v.slice(0,k));let E=v.slice(k),R;if(E.length>0){let F=E.reduce((B,Z)=>B+Z.cpuMs,0),G=Math.max(...E.map(B=>B.cpuMs));R={count:E.length,combinedCpuMs:F,maxCpuMs:G}}return{processIndex:g,pid:b,name:m,cpuMs:T,threads:w,remainingThreads:R}}),p=o.filter(y=>!d.has(y.pid)),h;if(p.length>0){let y=p.reduce((g,m)=>g+m.cpuMs,0),b=Math.max(...p.map(g=>g.cpuMs));h={count:p.length,combinedCpuMs:y,maxCpuMs:b}}return{processes:f,remainingProcesses:h}}function jd({slices:e,time:t},r){if(e.length===0)return[];let n=new Array(e.length),o=new Array(e.length);for(let s=0;s<e.length;s++){n[s]=null;let{parent:l,sum:c}=e[s];o.push({i:s,sum:c}),l!==null&&n[l]===null&&(n[l]=s)}o.sort((s,l)=>l.sum-s.sum);let a=new Set(o.slice(0,20).map(s=>s.i)),i=[];return kA(e,0,null,n,a,0,t,i,r),i}function kA(e,t,r,n,o,a,i,s,l){for(let c=t;c<e.length;c++){if(!o.has(c))continue;let u=e[c];if(u.parent!==r)break;let{start:d,end:f,avg:p}=u,h=i[d],y=i[f],g=(y-h)*p;s.push({startTime:h,startTimeName:l.nameForTimestamp(h),startTimeStr:l.timestampString(h),endTime:y,endTimeName:l.nameForTimestamp(y),endTimeStr:l.timestampString(y),cpuMs:g,depthLevel:a});let m=n[c];m!==null&&kA(e,m,c,n,o,a+1,i,s,l)}}function Wq(e,t){let r=t.toLowerCase(),n=[];for(let o of e){let i=o.name.toLowerCase().includes(r)||String(o.pid).includes(r)?o.threads:o.threads.filter(s=>s.name.toLowerCase().includes(r)||String(s.tid).includes(r));i.length>0&&n.push({...o,threads:i,remainingThreads:void 0})}return n}function _A(e,t,r,n,o=!1,a){let i=e.getState(),s=ge(i),l=YI(i),c=new Set(s.threads.map(g=>g.pid)).size,u=av(i),d=s.threads.map((g,m)=>({threadIndex:m,name:g.name,tid:g.tid,cpuMs:u?u[m]:0,pid:g.pid})),f=wA(d,n,o||a!==void 0);f.processes.forEach(g=>{let m=s.threads.find(T=>T.pid===g.pid);m&&(g.name=m.processName||m.processType||"unknown",g.etld1=m["eTLD+1"],g.startTime=m.processStartupTime,g.endTime=m.processShutdownTime)});let h=(a!==void 0?Wq(f.processes,a):f.processes).map(g=>{let m,T;return g.startTime!==void 0&&(m=t.nameForTimestamp(g.startTime),g.endTime!==null&&g.endTime!==void 0?T=t.nameForTimestamp(g.endTime):T=null),{processIndex:g.processIndex,pid:g.pid,name:g.name,etld1:g.etld1,cpuMs:g.cpuMs,startTime:g.startTime,startTimeName:m,endTime:g.endTime,endTimeName:T,threads:g.threads.map(S=>({threadIndex:S.threadIndex,threadHandle:r.handleForThreadIndex(S.threadIndex),name:S.name,tid:S.tid,cpuMs:S.cpuMs})),remainingThreads:g.remainingThreads}}),y=sv(i),b=y!==null?jd(y,t):null;return{type:"profile-info",name:l||"Unknown Profile",platform:s.meta.oscpu||"Unknown",threadCount:s.threads.length,processCount:c,showAll:o&&a===void 0,searchQuery:a,processes:h,remainingProcesses:a!==void 0?void 0:f.remainingProcesses,cpuActivity:b}}function Hq(e){let t=[[]],r="",n=()=>{r&&(t[t.length-1].push({type:"text",text:r,children:[]}),r="")};for(let o=0;o<e.length;o++){let a=e[o];if(a==="<"||a==="("){n();let i={type:"nested",text:"",openBracket:a,closeBracket:a==="<"?">":")",children:[]};t[t.length-1].push(i),t.push(i.children)}else a===">"||a===")"?(n(),t.length>1&&t.pop()):r+=a}return n(),t[0]}function cy(e){return e.map(t=>{if(t.type==="text")return t.text;let r=cy(t.children);return`${t.openBracket}${r}${t.closeBracket}`}).join("")}function zd(e){return e.reduce((t,r)=>r.type==="text"?t+r.text.length:t+2+zd(r.children),0)}function qd(e,t){if(zd(e)<=t)return cy(e);let r="";for(let n of e){let o=t-r.length;if(o<=0)break;if(n.type==="text")if(n.text.length<=o)r+=n.text;else{let a=n.text.split("::");for(let i=0;i<a.length;i++){let s=a[i]+(i<a.length-1?"::":"");if(r.length+s.length<=t)r+=s;else break}break}else{let a=cy(n.children),i=`${n.openBracket}${a}${n.closeBracket}`,s=`${n.openBracket}...${n.closeBracket}`;if(i.length<=o)r+=i;else if(s.length<=o){let l=o-2,c=qd(n.children,l);c.length<=l?r+=`${n.openBracket}${c}${n.closeBracket}`:r+=s}else break}}return r}function Vq(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r.type==="text"){let n=r.text.lastIndexOf("::");if(n!==-1)return{nodeIndex:t,position:n}}}return null}function gn(e,t){if(e.length<=t)return e;let r=e.indexOf("!"),n="",o=e;if(r!==-1){n=e.substring(0,r+1),o=e.substring(r+1);let S=t-n.length;if(S<=10)return e.substring(0,t-3)+"...";if(o.length<=S)return e;t=S}let a=Hq(o),i=Vq(a);if(i===null)return n+qd(a,t);let{nodeIndex:s,position:l}=i,c=a[s],u=a.slice(0,s);l>0?u.push({type:"text",text:c.text.substring(0,l+2),children:[]}):u.push({type:"text",text:"::",children:[]});let d=[],f=c.text.substring(l+2);f&&d.push({type:"text",text:f,children:[]}),d.push(...a.slice(s+1));let p=zd(u),h=zd(d);if(p+h<=t)return n+o;let y=Math.floor(t*.7),b,g;h<=y?(b=h,g=t-h):(g=Math.floor(t*.3),b=t-g);let m=qd(u,g),T=qd(d,b);return n+m+T}function Ri(e,t,r){let n=t.stringTable.getString(t.funcTable.name[e]),o=t.funcTable.resource[e];if(o===-1)return n;let a=t.stringTable.getString(t.resourceTable.name[o]),i=t.resourceTable.lib[o];return i!==null&&r?`${r[i].name}!${n}`:a&&a!==n?`${a}!${n}`:n}function uy(e,t,r){return e.getRoots().map(o=>{let a=e.getNodeData(o),i=Ri(o,t,r);return{...a,funcName:i,funcIndex:o}})}function CA(e,t,r){switch(r){case"exponential-0.95":return e*Math.pow(.95,t);case"exponential-0.9":return e*Math.pow(.9,t);case"exponential-0.8":return e*Math.pow(.8,t);case"harmonic-0.1":return e/(1+.1*t);case"harmonic-0.5":return e/(1+.5*t);case"harmonic-1.0":return e/(1+t);case"percentage-only":return e;default:return e*Math.pow(.94,t)}}var dy=class{items=[];push(t,r){this.items.push({item:t,priority:r}),this._bubbleUp(this.items.length-1)}popMax(){if(this.items.length===0)return null;if(this.items.length===1)return this.items.pop().item;let t=this.items[0].item;return this.items[0]=this.items.pop(),this._bubbleDown(0),t}isEmpty(){return this.items.length===0}size(){return this.items.length}_bubbleUp(t){for(;t>0;){let r=Math.floor((t-1)/2);if(this.items[t].priority<=this.items[r].priority)break;[this.items[t],this.items[r]]=[this.items[r],this.items[t]],t=r}}_bubbleDown(t){for(;;){let r=2*t+1,n=2*t+2,o=t;if(r<this.items.length&&this.items[r].priority>this.items[o].priority&&(o=r),n<this.items.length&&this.items[n].priority>this.items[o].priority&&(o=n),o===t)break;[this.items[t],this.items[o]]=[this.items[o],this.items[t]],t=o}}};function fy(e,t,r={}){let n=r.maxNodes??100,o=r.scoringStrategy??"exponential-0.9",a=r.maxDepth??200,i=r.maxChildrenPerNode??100,s=new Set,l=new dy,c=e.getRoots(),u=Math.min(c.length,Math.ceil(n*.7));for(let d=0;d<u;d++){let f=c[d],h=e.getNodeData(f).totalRelative*100,y=CA(h,0,o),b={callNodeIndex:f,depth:0};l.push(b,y)}for(;s.size<n;){let d=l.popMax();if(!d)break;if(s.add(d.callNodeIndex),d.depth>=a||!e.hasChildren(d.callNodeIndex))continue;let f=d.depth+1,h=e.getChildren(d.callNodeIndex).slice(0,i);for(let y of h){let g=e.getNodeData(y).totalRelative*100,m=CA(g,f,o),T={callNodeIndex:y,depth:f};l.push(T,m)}}return jq(e,s,t)}function jq(e,t,r){let n=e.getTotal(),o={name:"<root>",nameWithLibrary:"<root>",totalSamples:n,totalPercentage:100,selfSamples:0,selfPercentage:0,originalDepth:-1,children:[]},a=[o];for(;;){let i=a.pop();if(i===void 0)break;let s=i.callNodeIndex!==void 0?e.getChildren(i.callNodeIndex):e.getRoots(),l=[],c=i.originalDepth+1;for(let u of s){if(!t.has(u)){l.push(u);continue}let d=e.getNodeData(u),f=e._callNodeInfo.funcForNode(u),p=d.totalRelative*100,h=Ri(f,e._thread,r),y={callNodeIndex:u,functionHandle:Zo(f),functionIndex:f,name:d.funcName,nameWithLibrary:h,totalSamples:d.total,totalPercentage:p,selfSamples:d.self,selfPercentage:d.selfRelative*100,originalDepth:c,children:[]};i.children.push(y),a.push(y)}if(l.length>0){let u=0,d=0;for(let h of l){let y=e.getNodeData(h);u+=y.total,d=Math.max(d,y.total)}let f=u/n,p=d/n;i.childrenTruncated={count:l.length,combinedSamples:u,combinedPercentage:f*100,maxSamples:d,maxPercentage:p*100,depth:c}}}return o}function EA(e,t,r,n){let o=e.getState(),a=n!==void 0?r.threadIndexesForHandle(n):Je(o),i=ht(a),s=i.getRawThread(o),l=i.getFriendlyThreadName(o),c=i.getRangeFilteredActivitySlices(o),u=c!==null?jd(c,t):null;return{type:"thread-info",threadHandle:n??r.handleForThreadIndexes(a),name:s.name,friendlyName:l,tid:s.tid,createdAt:s.registerTime,createdAtName:t.nameForTimestamp(s.registerTime),endedAt:s.unregisterTime,endedAtName:s.unregisterTime!==null?t.nameForTimestamp(s.unregisterTime):null,sampleCount:s.samples.length,markerCount:s.markers.length,cpuActivity:u}}function NA(e,t,r){let n=e.getState(),o=r!==void 0?t.threadIndexesForHandle(r):Je(n),a=t.handleForThreadIndexes(o),i=ht(o),s=i.getFriendlyThreadName(n),l=i.getFilteredThread(n),c=ge(n).libs,u=i.getFunctionListTree(n),d=i.getCallTree(n),f=uy(u,l,c),p=f.slice().sort((S,I)=>I.total-S.total).slice(0,50),h=f.slice().sort((S,I)=>I.self-S.self).slice(0,50),y=p.map(S=>({functionHandle:Zo(S.funcIndex),functionIndex:S.funcIndex,name:S.funcName,nameWithLibrary:S.funcName,totalSamples:S.total,totalPercentage:S.totalRelative*100,selfSamples:S.self,selfPercentage:S.selfRelative*100,library:void 0})),b=h.map(S=>({functionHandle:Zo(S.funcIndex),functionIndex:S.funcIndex,name:S.funcName,nameWithLibrary:S.funcName,totalSamples:S.total,totalPercentage:S.totalRelative*100,selfSamples:S.self,selfPercentage:S.selfRelative*100,library:void 0})),g=new Map(f.map(S=>[S.funcIndex,S])),m=d.getRoots(),T={selfSamples:0,frameCount:0,frames:[]};if(m.length>0){let S=[],I=Number.NEGATIVE_INFINITY;for(let v of m){let w=d._internal.findHeaviestPathInSubtree(v),k=d._callNodeInfo.getCallNodeIndexFromPath(w);if(k===null)continue;let E=d.getNodeData(k).self;E>I&&(S=w,I=E)}if(S.length>0){let w=d._callNodeInfo.getCallNodeIndexFromPath(S);w!==null&&(T={selfSamples:d.getNodeData(w).self,frameCount:S.length,frames:S.map(E=>{let R=Ri(E,l,c),F=g.get(E);return{funcIndex:E,name:R,nameWithLibrary:R,totalSamples:(F==null?void 0:F.total)??0,totalPercentage:((F==null?void 0:F.totalRelative)??0)*100,selfSamples:(F==null?void 0:F.self)??0,selfPercentage:((F==null?void 0:F.selfRelative)??0)*100}})})}}return{type:"thread-samples",threadHandle:a,friendlyThreadName:s,topFunctionsByTotal:y,topFunctionsBySelf:b,heaviestStack:T}}function AA(e,t,r,n){let o=e.getState(),a=r!==void 0?t.threadIndexesForHandle(r):Je(o),i=t.handleForThreadIndexes(a),s=ht(a),l=s.getFriendlyThreadName(o),c=s.getFilteredThread(o),u=null;try{let d=s.getCallNodeInfo(o),f=nt(o),p=_r(o),h=s.getWeightTypeForCallTree(o),y=s.getPreviewFilteredCtssSamples(o),b=s.getSampleIndexToNonInvertedCallNodeIndexForFilteredThread(o),g=Eu(y,b,d.getCallNodeTable().length),m=jc(d,p,c.funcTable.length),T=Os(m,g),S=Ls(c,m,f,y,T,h),I=ge(o).libs;u=fy(S,I,n)}catch{}return{type:"thread-samples-bottom-up",threadHandle:i,friendlyThreadName:l,invertedCallTree:u}}function PA(e,t,r,n){let o=e.getState(),a=r!==void 0?t.threadIndexesForHandle(r):Je(o),i=t.handleForThreadIndexes(a),s=ht(a),l=s.getFriendlyThreadName(o),c=s.getCallTree(o),u=ge(o).libs,d=fy(c,u,n);return{type:"thread-samples-top-down",threadHandle:i,friendlyThreadName:l,regularCallTree:d}}function RA(e,t,r,n){let o=e.getState(),a=r!==void 0?t.threadIndexesForHandle(r):Je(o),i=t.handleForThreadIndexes(a),s=ht(a),l=s.getFriendlyThreadName(o),c=s.getFilteredThread(o),u=ge(o).libs,d=s.getFunctionListTree(o),f=uy(d,c,u),p=f.length,y=dr(o).length>0,b=null;y&&(b=s.getRawThread(o).samples.length);let g=f;if(n!=null&&n.searchString){let I=n.searchString.toLowerCase();g=g.filter(v=>v.funcName.toLowerCase().includes(I))}if((n==null?void 0:n.minSelf)!==void 0){let I=n.minSelf/100;g=g.filter(v=>v.selfRelative>=I)}g.sort((I,v)=>v.self-I.self);let m=(n==null?void 0:n.limit)??g.length,S=g.slice(0,m).map(I=>{let v=I.funcName,w=v.indexOf("!"),k=w!==-1?v.substring(0,w):void 0,E=w!==-1?v.substring(w+1):v,R,F;return b!==null&&(R=I.self/b*100,F=I.total/b*100),{functionHandle:Zo(I.funcIndex),functionIndex:I.funcIndex,name:E,nameWithLibrary:v,selfSamples:I.self,selfPercentage:I.selfRelative*100,totalSamples:I.total,totalPercentage:I.totalRelative*100,library:k,fullSelfPercentage:R,fullTotalPercentage:F}});return{type:"thread-functions",threadHandle:i,friendlyThreadName:l,totalFunctionCount:p,filteredFunctionCount:g.length,filters:n?{searchString:n.searchString,minSelf:n.minSelf,limit:n.limit}:void 0,functions:S}}function FA(e){let t=e.filter(r=>r.end!==null).map(r=>r.end-r.start).sort((r,n)=>r-n);if(t.length!==0)return{min:t[0],max:t[t.length-1],avg:t.reduce((r,n)=>r+n,0)/t.length,median:t[Math.floor(t.length/2)],p95:t[Math.floor(t.length*.95)],p99:t[Math.floor(t.length*.99)]}}function OA(e){if(e.length<2)return{markersPerSecond:0,minGap:0,avgGap:0,maxGap:0};let t=[...e].sort((a,i)=>a.start-i.start),r=[];for(let a=1;a<t.length;a++)r.push(t[a].start-t[a-1].start);let n=t[t.length-1].start-t[0].start;return{markersPerSecond:n>0?e.length/n*1e3:0,minGap:Math.min(...r),avgGap:r.reduce((a,i)=>a+i,0)/r.length,maxGap:Math.max(...r)}}function qq(e,t,r,n){let o=e,{minDuration:a,maxDuration:i,category:s,hasStack:l,limit:c}=n;if((a!==void 0||i!==void 0)&&(o=o.filter(u=>{let d=t[u];if(d.end===null)return!1;let f=d.end-d.start;return!(a!==void 0&&f<a||i!==void 0&&f>i)})),s!==void 0){let u=s.toLowerCase();o=o.filter(d=>{var h;let f=t[d];return(((h=r[f.category])==null?void 0:h.name)??"Unknown").toLowerCase().includes(u)})}return l&&(o=o.filter(u=>{let d=t[u];return d.data&&"cause"in d.data&&d.data.cause})),c!==void 0&&o.length>c&&(o=o.slice(0,c)),o}function LA(e,t,r,n,o=5){return(e.some(s=>s.marker.end!==null)?[...e].sort((s,l)=>l.marker.end-l.marker.start-(s.marker.end-s.marker.start)):e.slice(0,o)).slice(0,o).map(s=>{let l=r.handleForMarker(t,s.index),c=n(s.index),u=s.marker.end!==null?s.marker.end-s.marker.start:void 0,d=!!(s.marker.data&&"cause"in s.marker.data&&s.marker.data.cause);return{handle:l,label:c||s.marker.name,start:s.marker.start,duration:u,hasStack:d}})}function zq(e){return e.split(",").map(t=>{let r=t.trim();return r.startsWith("field:")?{field:r.substring(6)}:r})}function Kq(e,t,r){var o,a,i;if(t==="type")return((o=e.data)==null?void 0:o.type)??e.name;if(t==="name")return e.name;if(t==="category")return((a=r[e.category])==null?void 0:a.name)??"Unknown";let n=(i=e.data)==null?void 0:i[t.field];return n==null?"(no value)":String(n)}function Zq(e){var a,i;if(e.length===0||!((a=e[0].data)==null?void 0:a.type))return null;let r=[],n=e[0].data;if(!n)return null;let o=Object.keys(n).filter(s=>!(s==="type"||s==="cause"||s.endsWith("ID")||s.endsWith("Id")));for(let s of o){let l=new Set,c=0;for(let p of e){let h=(i=p.data)==null?void 0:i[s];h!=null&&(l.add(String(h)),c++)}let u=l.size;if(c<e.length*.8||u<3)continue;let d=0;u>=3&&u<=20?d=100:u>20&&u<=50?d=100-(u-20)*2:u>50&&(d=10),c===e.length&&(d+=10),["eventType","phase","status","operation","category"].includes(s)&&(d+=20),r.push({field:s,score:d,uniqueCount:u})}return r.length===0?null:(r.sort((s,l)=>l.score-s.score),{field:r[0].field,variance:r[0].score/100})}function hy(e,t,r,n,o,a,i=0,s=5){if(t.length===0||e.length===0)return[];let[l,...c]=t,u=new Map;for(let f of e){let p=Kq(f.marker,l,r);u.has(p)||u.set(p,[]),u.get(p).push(f)}let d=[];for(let[f,p]of u.entries()){let h=p.map(S=>S.marker),y=h.some(S=>S.end!==null),b=y?FA(h):void 0,g=OA(h),m=LA(p,n,o,a,s),T=c.length>0&&i<2?hy(p,c,r,n,o,a,i+1,s):void 0;d.push({groupName:f,count:h.length,isInterval:y,durationStats:b,rateStats:g,topMarkers:m,subGroups:T})}return d.sort((f,p)=>p.count-f.count),d}function Jq(e,t,r,n,o,a,i=!1,s=5){let l=new Map;for(let u of t){let d=e[u],f=d.name;l.has(f)||l.set(f,[]),l.get(f).push({marker:d,index:u})}let c=[];for(let[u,d]of l.entries()){let f=d.map(T=>T.marker),p=f.some(T=>T.end!==null),h=p?FA(f):void 0,y=OA(f),b=LA(d,r,n,o,s),g,m;if(i&&f.length>5){let T=Zq(f);T&&(g=hy(d,[{field:T.field}],a,r,n,o,1,s),m=T.field)}c.push({markerName:u,count:f.length,isInterval:p,durationStats:h,rateStats:y,topMarkers:b,subGroups:g,subGroupKey:m})}return c.sort((u,d)=>d.count-u.count),c}function Yq(e,t,r){var i;let n=new Map;for(let s of t){let l=e[s],c=((i=r[l.category])==null?void 0:i.name)??"Unknown";n.set(c,(n.get(c)??0)+1)}let o=t.length;return Array.from(n.entries()).map(([s,l])=>({categoryName:s,count:l,percentage:l/o*100})).sort((s,l)=>l.count-s.count)}function DA(e,t,r,n,o={}){var i;let a=o.searchString||"";a&&e.dispatch(Yh(a));try{let s=e.getState(),l=n!==void 0?t.threadIndexesForHandle(n):Je(s),c=ht(l),u=c.getFriendlyThreadName(s),d=c.getFullMarkerList(s),f=nt(s),p=ft(s),h=Rt(s),y=c.getFullMarkerListIndexes(s).length,b=a?c.getSearchFilteredMarkerIndexes(s):c.getFullMarkerListIndexes(s);b=qq(b,d,f,o);let g=to(N=>d[N],ge(s).meta.markerSchema,p,f,h,"tableLabel"),m=n??t.handleForThreadIndexes(l),{groupBy:T,autoGroup:S,topN:I}=o,v=I??5,w;if(T){let N=zq(T),A=[];for(let P of b)A.push({marker:d[P],index:P});let M=hy(A,N,f,l,r,g,0,v);w=py(M)}let E=Jq(d,b,l,r,g,f,S||!1,v).map(N=>({markerName:N.markerName,count:N.count,isInterval:N.isInterval,durationStats:N.durationStats,rateStats:N.rateStats,topMarkers:N.topMarkers.map(A=>({handle:A.handle,label:A.label,start:A.start,duration:A.duration,hasStack:A.hasStack})),subGroups:N.subGroups?py(N.subGroups):void 0,subGroupKey:N.subGroupKey})),F=Yq(d,b,f).map(N=>({categoryName:N.categoryName,categoryIndex:f.findIndex(A=>(A==null?void 0:A.name)===N.categoryName),count:N.count,percentage:N.percentage})),{minDuration:G,maxDuration:B,category:Z,hasStack:X,limit:_e}=o,D=a||G!==void 0||B!==void 0||Z!==void 0||X||_e!==void 0?{searchString:a||void 0,minDuration:G,maxDuration:B,category:Z,hasStack:X,limit:_e}:void 0,re;if(o.list){re=[];for(let N of b){let A=d[N],M=r.handleForMarker(l,N),P=A.end!==null?A.end-A.start:void 0,$=!!(A.data&&"cause"in A.data&&A.data.cause),J=((i=f[A.category])==null?void 0:i.name)??"Other",H=g(N);re.push({handle:M,name:A.name,label:H||A.name,start:A.start,duration:P,hasStack:$,category:J})}}return{type:"thread-markers",threadHandle:m,friendlyThreadName:u,totalMarkerCount:y,filteredMarkerCount:b.length,filters:D,byType:E,byCategory:F,customGroups:w,flatMarkers:re}}finally{a&&e.dispatch(Yh(""))}}function py(e){return e.map(t=>({groupName:t.groupName,count:t.count,isInterval:t.isInterval,durationStats:t.durationStats,rateStats:t.rateStats,topMarkers:t.topMarkers.map(r=>({handle:r.handle,label:r.label,start:r.start,duration:r.duration,hasStack:r.hasStack})),subGroups:t.subGroups?py(t.subGroups):void 0}))}function BA(e,t,r,n){if(e===null)return null;let{stackTable:o,frameTable:a,funcTable:i,stringTable:s,resourceTable:l}=t,c=[],u=e;for(;u!==null;){let d=o.frame[u],f=a.func[d],p=s.getString(i.name[f]),h=i.resource[f],y,b=p;if(h!==-1){let g=l.lib[h];if(g!==null&&r)y=r[g].name,b=`${y}!${p}`;else{let m=s.getString(l.name[h]);m&&m!==p&&(b=`${m}!${p}`)}}c.push({name:p,nameWithLibrary:b,library:y}),u=o.prefix[u]}return{frames:c,truncated:!1,capturedAt:n}}function UA(e,t,r,n){let o=e.getState(),{threadIndexes:a,markerIndex:i}=t.markerForHandle(n),s=ht(a),l=s.getFriendlyThreadName(o),u=s.getFullMarkerList(o)[i];if(!u)throw new Error(`Marker ${n} not found`);let d=r.handleForThreadIndexes(a),f=ge(o),p=s.getFilteredThread(o),h=f.libs,y=null;if(u.data&&"cause"in u.data&&u.data.cause){let b=u.data.cause;y=BA(b.stack,p,h,b.time)}return{type:"marker-stack",markerHandle:n,markerIndex:i,threadHandle:d,friendlyThreadName:l,markerName:u.name,stack:y}}function $A(e,t,r,n){var S,I;let o=e.getState(),{threadIndexes:a,markerIndex:i}=t.markerForHandle(n),s=ht(a),l=s.getFriendlyThreadName(o),c=s.getFullMarkerList(o),u=c[i];if(!u)throw new Error(`Marker ${n} not found`);let d=nt(o),f=ft(o),p=Rt(o),h=r.handleForThreadIndexes(a),b=to(v=>c[v],ge(o).meta.markerSchema,f,d,p,"tooltipLabel")(i),g,m;if(u.data){let v=f[u.data.type];if(v&&v.fields.length>0){g=[];for(let w of v.fields){if(w.hidden)continue;let k=u.data[w.key];if(k!=null){let E=Ua(u.data.type,w.format,k,p);g.push({key:w.key,label:w.label||w.key,value:k,formattedValue:E})}}}v!=null&&v.description&&(m={description:v.description})}let T;if(u.data&&"cause"in u.data&&u.data.cause){let v=u.data.cause,w=ge(o),k=s.getFilteredThread(o),E=w.libs,R=BA(v.stack,k,E,v.time);if(R&&R.frames.length>0){let F=R.frames.length>20;T={frames:R.frames.slice(0,20),truncated:F,capturedAt:R.capturedAt}}}return{type:"marker-info",markerHandle:n,markerIndex:i,threadHandle:h,friendlyThreadName:l,name:u.name,tooltipLabel:b||void 0,markerType:(S=u.data)==null?void 0:S.type,category:{index:u.category,name:((I=d[u.category])==null?void 0:I.name)??"Unknown"},start:u.start,end:u.end,duration:u.end!==null?u.end-u.start:void 0,fields:g,schema:m,stack:T}}function MA(e){let t={};return e.domainLookupStart!==void 0&&e.domainLookupEnd!==void 0&&(t.dns=e.domainLookupEnd-e.domainLookupStart),e.connectStart!==void 0&&e.tcpConnectEnd!==void 0&&(t.tcp=e.tcpConnectEnd-e.connectStart),e.secureConnectionStart!==void 0&&e.secureConnectionStart>0&&e.connectEnd!==void 0&&(t.tls=e.connectEnd-e.secureConnectionStart),e.requestStart!==void 0&&e.responseStart!==void 0&&(t.ttfb=e.responseStart-e.requestStart),e.responseStart!==void 0&&e.responseEnd!==void 0&&(t.download=e.responseEnd-e.responseStart),e.responseEnd!==void 0&&(t.mainThread=e.endTime-e.responseEnd),t}function GA(e,t,r,n={}){let{searchString:o,minDuration:a,maxDuration:i,limit:s}=n,l=e.getState(),c=r!==void 0?t.threadIndexesForHandle(r):Je(l),u=ht(c),d=u.getFriendlyThreadName(l),f=u.getFullMarkerList(l),h=u.getFullMarkerListIndexes(l).filter(E=>{let R=f[E];return En(R)?R.data.status==="STATUS_STOP":!1}),y=h.length,b=h;if(o){let E=o.toLowerCase();b=b.filter(R=>f[R].data.URI.toLowerCase().includes(E))}(a!==void 0||i!==void 0)&&(b=b.filter(E=>{let R=f[E].data,F=R.endTime-R.startTime;return!(a!==void 0&&F<a||i!==void 0&&F>i)}));let g=b.length,m={},T=0,S=0,I=0;for(let E of b){let R=f[E].data,F=R.cache;F==="Hit"||F==="MemoryHit"||F==="Prefetched"?T++:F==="Miss"||F==="Unresolved"||F==="DiskStorage"||F==="Push"?S++:I++;let G=MA(R);G.dns!==void 0&&(m.dns=(m.dns??0)+G.dns),G.tcp!==void 0&&(m.tcp=(m.tcp??0)+G.tcp),G.tls!==void 0&&(m.tls=(m.tls??0)+G.tls),G.ttfb!==void 0&&(m.ttfb=(m.ttfb??0)+G.ttfb),G.download!==void 0&&(m.download=(m.download??0)+G.download),G.mainThread!==void 0&&(m.mainThread=(m.mainThread??0)+G.mainThread)}let w=(s!==void 0&&s>0?b.slice(0,s):b).map(E=>{let R=f[E].data,F=R.endTime-R.startTime;return{url:R.URI,httpStatus:R.responseStatus,httpVersion:R.httpVersion,cacheStatus:R.cache,transferSizeKB:R.count!==void 0?R.count/1024:void 0,startTime:R.startTime,duration:F,phases:MA(R)}});return{type:"thread-network",threadHandle:r??t.handleForThreadIndexes(c),friendlyThreadName:d,totalRequestCount:y,filteredRequestCount:g,filters:o!==void 0||a!==void 0||i!==void 0||s!==void 0?{searchString:o,minDuration:a,maxDuration:i,limit:s}:void 0,summary:{cacheHit:T,cacheMiss:S,cacheUnknown:I,phaseTotals:m},requests:w}}function WA(e,t,r={}){let{module:n,level:o,search:a,limit:i}=r,s=e.getState(),l=ge(s),c=l.meta.startTime,u=l.shared.stringArray,d=r.thread!==void 0?new Set(t.threadIndexesForHandle(r.thread)):null,p=o!==void 0?{error:1,warn:2,info:3,debug:4,verbose:5}[o.toLowerCase()]??5:5,h=n==null?void 0:n.toLowerCase(),y=a==null?void 0:a.toLowerCase(),b=[];for(let T=0;T<l.threads.length;T++){if(d!==null&&!d.has(T))continue;let S=l.threads[T],{markers:I}=S,v=S.processName??"Unknown Process",w=S.pid,k=S.name;for(let E=0;E<I.length;E++){let R=I.startTime[E];if(R===null)continue;let F=I.data[E];if((F==null?void 0:F.type)!=="Log")continue;let G=F,B,Z,X;if("message"in G){if(!G.message)continue;B=u[I.name[E]]??"";let re=u[G.level]??"";X=Ep[re]??"D",Z=G.message.trim()}else{if(!G.name)continue;let re=G.module,N=re.indexOf("/");N!==-1?(X=re.slice(0,N),B=re.slice(N+1)):(X="D",B=re),Z=G.name.trim()}if(h!==void 0&&!B.toLowerCase().includes(h)||(fI[X]??5)>p||y!==void 0&&!Z.toLowerCase().includes(y))continue;let _e=pI(c+R),D=hI(_e,v,w,k,G,B,u);D!==null&&b.push(D)}}b.sort();let g=b.length;return{type:"profile-logs",entries:i!==void 0?b.slice(0,i):b,totalCount:g,filters:r.thread!==void 0||n!==void 0||o!==void 0||a!==void 0||i!==void 0?{thread:r.thread,module:n,level:o,search:a,limit:i}:void 0}}function my(e){if(e!==null&&typeof e=="object"&&"innerWindowID"in e){let t=e.innerWindowID;if(typeof t=="number")return t}}var Xq={FirstContentfulPaint:"FCP",FirstContentfulComposite:"FCC",LargestContentfulPaint:"LCP","TimeToFirstInteractive (TTFI)":"TTFI"};function gy(e,t,r){let n=e.get(t);return n||(n={innerWindowID:t,navStart:r,loadEnd:null,url:null,milestones:[]},e.set(t,n)),n}function yy(e,t,r,n){e.milestones.some(o=>o.name===t)||e.milestones.push({name:t,timeMs:r-e.navStart,markerIndex:n})}function Qq(e){if(!e)return"Other";let t=e.toLowerCase().split(";")[0].trim();return t.includes("javascript")||t.includes("ecmascript")?"JS":t==="text/css"?"CSS":t.startsWith("image/")?"Image":t==="text/html"||t==="application/xhtml+xml"?"HTML":t==="application/json"||t==="text/json"?"JSON":t.startsWith("font/")||t.startsWith("application/font")||t==="application/x-font-woff"?"Font":t==="application/wasm"?"Wasm":"Other"}function e6(e){let t=e;try{t=new URL(e).pathname}catch{}let r=t.split("/"),n=r[r.length-1]||e;return n.length>50?n.slice(0,47)+"...":n}function t6(e,t){let r=t.samples.stack[e];if(r==null)return null;let n=t.stackTable.frame[r],o=t.frameTable.func[n],a=t.funcTable.name[o];return t.stringTable.getString(a)}function r6(e,t,r,n){let o=new Map,a=0;for(let i=0;i<e.samples.length;i++){let s=e.samples.time[i];if(s<r||s>n)continue;let l=e.samples.category[i],c=l<t.length?t[l].name:"Other";o.set(c,(o.get(c)??0)+1),a++}return a===0?[]:Array.from(o.entries()).sort((i,s)=>s[1]-i[1]).map(([i,s])=>({name:i,count:s,percentage:s/a*100}))}function HA(e,t,r,n,o,a={}){let{jankLimit:i=10}=a,s=e.getState(),l=o!==void 0?t.threadIndexesForHandle(o):Je(s),c=o??t.handleForThreadIndexes(l),u=ht(l),d=u.getFriendlyThreadName(s),f=u.getFullMarkerList(s),p=u.getFullMarkerListIndexes(s),h=nt(s),y=u.getThread(s),b=new Map;for(let H of p){let z=f[H],{name:se,data:de}=z;if(z.end!==null)if(se==="DocumentLoad"){let ue=my(de);if(ue===void 0)continue;let fe=gy(b,ue,z.start);if(fe.loadEnd=z.end,yy(fe,"Load",z.end,H),de!==null&&typeof de=="object"&&"name"in de){let be=de.name;if(typeof be=="string"){let V=be.match(/^Document (.+) loaded after/);V&&(fe.url=V[1])}}}else if(se==="DOMContentLoaded"&&de!==null&&typeof de=="object"&&"category"in de&&de.category==="Navigation"){let ue=my(de);if(ue===void 0)continue;let fe=gy(b,ue,z.start);yy(fe,"DCL",z.end,H)}else{let ue=Xq[se];if(ue===void 0)continue;let fe=my(de);if(fe===void 0)continue;let be=gy(b,fe,z.start);yy(be,ue,z.end,H)}}let g=Array.from(b.values());g.sort((H,z)=>H.navStart-z.navStart);let m=g.filter(H=>H.loadEnd!==null);if(m.length===0)return{type:"thread-page-load",threadHandle:c,friendlyThreadName:d,url:null,navigationIndex:0,navigationTotal:0,navStartMs:0,milestones:[],resourceCount:0,resourceAvgMs:null,resourceMaxMs:null,resourcesByType:[],topResources:[],totalSamples:0,categories:[],jankTotal:0,jankPeriods:[]};let T=m.length,S=a.navigationIndex??T,I=Math.max(1,Math.min(S,T)),v=m[I-1],w=v.navStart,k=v.loadEnd;if(v.url)for(let H of p){let z=f[H];if(!En(z))continue;let se=z.data;if(se.status==="STATUS_STOP"&&se.URI===v.url&&se.requestStart!==void 0&&se.responseStart!==void 0){v.milestones.push({name:"TTFB",timeMs:se.responseStart-w,markerIndex:H});break}}v.milestones.sort((H,z)=>H.timeMs-z.timeMs);let E=v.milestones.filter(H=>H.name!=="TTFI").map(H=>H.timeMs),R=E.length>0?Math.max(...E):k-w,F=w+R,G=[],B=[];for(let H of p){let z=f[H];if(En(z)){let se=z.data;se.status==="STATUS_STOP"&&se.startTime>=w&&se.startTime<=F&&G.push({filename:e6(se.URI),url:se.URI,durationMs:se.endTime-se.startTime,resourceType:Qq(se.contentType),markerHandle:n.handleForMarker(l,H)})}else z.name==="Jank"&&z.start>=w&&(z.end??z.start)<=F&&B.push(H)}G.sort((H,z)=>z.durationMs-H.durationMs);let Z=G.length,X=null,_e=null;Z>0&&(X=G.reduce((z,se)=>z+se.durationMs,0)/Z,_e=G[0].durationMs);let D=new Map;for(let H of G)D.set(H.resourceType,(D.get(H.resourceType)??0)+1);let re=Array.from(D.entries()).sort((H,z)=>z[1]-H[1]).map(([H,z])=>({type:H,count:z,percentage:z/Z*100})),N=G.slice(0,10),A=r6(y,h,w,F),M=A.reduce((H,z)=>H+z.count,0),P=B.length,J=B.slice(0,i).map(H=>{let z=f[H],se=z.start,de=z.end??z.start,ue=new Map,fe=new Map,be=0;for(let q=0;q<y.samples.length;q++){let Q=y.samples.time[q];if(Q<se||Q>de)continue;let Te=y.samples.category[q],Ne=Te<h.length?h[Te].name:"Other";ue.set(Ne,(ue.get(Ne)??0)+1),be++;let qe=t6(q,y);qe!==null&&fe.set(qe,(fe.get(qe)??0)+1)}let V=be===0?[]:Array.from(ue.entries()).sort((q,Q)=>Q[1]-q[1]).map(([q,Q])=>({name:q,count:Q,percentage:Q/be*100})),te=Array.from(fe.entries()).sort((q,Q)=>Q[1]-q[1]).slice(0,5).map(([q,Q])=>({name:q,sampleCount:Q}));return{startMs:se-w,durationMs:de-se,markerHandle:n.handleForMarker(l,H),startHandle:r.nameForTimestamp(se),endHandle:r.nameForTimestamp(de),topFunctions:te,categories:V}});return{type:"thread-page-load",threadHandle:c,friendlyThreadName:d,url:v.url,navigationIndex:I,navigationTotal:T,navStartMs:w,milestones:v.milestones.map(H=>({name:H.name,timeMs:H.timeMs,markerHandle:n.handleForMarker(l,H.markerIndex)})),resourceCount:Z,resourceAvgMs:X,resourceMaxMs:_e,resourcesByType:re,topResources:N,totalSamples:M,categories:A,jankTotal:P,jankPeriods:J}}function by(e,t){if(e.startsWith("ts"))return null;if(e.endsWith("%")){let n=parseFloat(e.slice(0,-1));if(isNaN(n))throw new Error(`Invalid percentage: "${e}"`);let o=t.end-t.start;return t.start+n/100*o}if(e.endsWith("ms")){let n=parseFloat(e.slice(0,-2));if(isNaN(n))throw new Error(`Invalid milliseconds: "${e}"`);return t.start+n}if(e.endsWith("s")){let n=parseFloat(e.slice(0,-1));if(isNaN(n))throw new Error(`Invalid seconds: "${e}"`);return t.start+n*1e3}let r=parseFloat(e);if(isNaN(r))throw new Error(`Invalid time value: "${e}". Expected timestamp name (ts-X), seconds (2.7), milliseconds (2700ms), or percentage (10%)`);return t.start+r*1e3}function Mi(e){switch(e.type){case"excludes-function":return`excludes function: f-${e.funcIndexes.join(", f-")}`;case"merge":return`merge: f-${e.funcIndexes.join(", f-")}`;case"root-at":return`root-at: f-${e.funcIndex}`;case"during-marker":return`during marker matching: "${e.searchString}"`;case"includes-function":return`includes function: f-${e.funcIndexes.join(", f-")}`;case"includes-prefix":return`includes prefix: f-${e.funcIndexes.join(" \u2192 f-")}`;case"includes-suffix":return`includes suffix: f-${e.funcIndex}`;case"outside-marker":return`outside marker matching: "${e.searchString}"`;default:throw new Error(`Unhandled filter spec type: ${e.type}`)}}function Ty(e,t,r){switch(r.type){case"excludes-function":{for(let n of r.funcIndexes)e.dispatch(qr(t,{type:"drop-function",funcIndex:n}));return r.funcIndexes.length}case"merge":{for(let n of r.funcIndexes)e.dispatch(qr(t,{type:"merge-function",funcIndex:n}));return r.funcIndexes.length}case"root-at":return e.dispatch(qr(t,{type:"focus-function",funcIndex:r.funcIndex})),1;case"during-marker":return e.dispatch(qr(t,{type:"filter-samples",filterType:"marker-search",filter:r.searchString})),1;case"includes-function":return e.dispatch(qr(t,{type:"filter-samples",filterType:"function-include",filter:r.funcIndexes.join(",")})),1;case"includes-prefix":return e.dispatch(qr(t,{type:"filter-samples",filterType:"stack-prefix",filter:r.funcIndexes.join(",")})),1;case"includes-suffix":return e.dispatch(qr(t,{type:"filter-samples",filterType:"stack-suffix",filter:String(r.funcIndex)})),1;case"outside-marker":return e.dispatch(qr(t,{type:"filter-samples",filterType:"outside-marker",filter:r.searchString})),1;default:throw new Error(`Unhandled filter spec type: ${r.type}`)}}var Kd=class{_stacks=new Map;push(t,r,n){let o=this._getOrCreate(r),a=Ty(t,r,n),i={index:o.length+1,spec:n,description:Mi(n),reduxTransformCount:a};return o.push(i),i}pop(t,r,n=1){let o=this._getOrCreate(r);if(n<=0||o.length===0)return[];let a=Math.min(n,o.length),i=o.splice(o.length-a,a),s=i.reduce((l,c)=>l+c.reduxTransformCount,0);if(s>0){let l=t.getState(),c=$o(l,r).length;t.dispatch({type:"POP_TRANSFORMS_FROM_STACK",threadsKey:r,firstPoppedFilterIndex:c-s})}return i.reverse()}clear(t,r){let o=this._getOrCreate(r).length;return o===0?[]:this.pop(t,r,o)}list(t){return[...this._stacks.get(t)??[]]}activeThreadsKeys(){return Array.from(this._stacks.entries()).filter(([,t])=>t.length>0).map(([t])=>t)}_getOrCreate(t){let r=this._stacks.get(t);return r===void 0&&(r=[],this._stacks.set(t,r)),r}};xe();async function Zd(e,t,r,n,o){let a=[];try{let i=await n.queryBrowserSymbolicationApi(e,t);try{let s=JSON.parse(i);if(!s.error)return{type:"SUCCESS",convertedResponse:o(s)};a.push({type:"BROWSER_API_ERROR",apiErrorMessage:s.error})}catch(s){a.push({type:"BROWSER_API_MALFORMED_RESPONSE",errorMessage:s.toString()})}}catch(i){a.push({type:"BROWSER_CONNECTION_ERROR",browserConnectionErrorMessage:i.toString()})}if(r!==null){let i=r+e;try{let l=await(await n.fetchUrlResponse(i,t)).text();try{let c=JSON.parse(l);if(!c.error)return{type:"SUCCESS",convertedResponse:o(c)};a.push({type:"SYMBOL_SERVER_API_ERROR",apiErrorMessage:c.error})}catch(c){a.push({type:"SYMBOL_SERVER_API_MALFORMED_RESPONSE",errorMessage:c.toString()})}}catch(s){a.push({type:"NETWORK_ERROR",url:i,networkErrorMessage:s.toString()})}}return{type:"ERROR",errors:a}}async function VA(e,t,r,n){let o=n6(r)?r:null,{debugName:a,breakpadId:i,name:s,codeId:l}=t,{address:c}=e,u=await Zd("/asm/v1",JSON.stringify({debugName:a,debugId:i,name:s,codeId:l,startAddress:`0x${c.toString(16)}`,size:`0x${e.functionSize.toString(16)}`,continueUntilFunctionEnd:!e.functionSizeIsKnown}),o,n,o6);switch(u.type){case"SUCCESS":return{type:"SUCCESS",instructions:u.convertedResponse};case"ERROR":return{type:"ERROR",errors:u.errors};default:throw ae(u,"queryResult.type")}}function n6(e){return oo(e)}function o6(e){if(!e.startAddress)throw new Error("Missing startAddress field in asm response");if(!e.instructions)throw new Error("Missing instructions field in asm response");if(!Array.isArray(e.instructions))throw new Error("The instructions field in asm response is not an array");let{startAddress:t,instructions:r}=e,n=parseInt(t,16);if(isNaN(n))throw new Error("Invalid startAddress value in asm response");return r.map(o=>{if(!Array.isArray(o))throw new Error("Invalid instruction data (not an array)");if(o.length<2)throw new Error("Invalid instruction data (< 2 elements)");let[a,i]=o;if(typeof a!="number")throw new Error("Invalid instruction offset");if(typeof i!="string")throw new Error("Invalid instruction decodedString value");return{address:n+a,decodedString:i}})}xe();var Sy=class{_uint8Array;_bufferView;_position=0;_asciiDecoder=new TextDecoder("ascii",{fatal:!0});constructor(t){this._uint8Array=new Uint8Array(t),this._bufferView=new DataView(t)}readString(t){let r=this.readBuffer(t),n=r.indexOf(0);return n===-1?this._asciiDecoder.decode(r):this._asciiDecoder.decode(r.subarray(0,n))}readBuffer(t){let r=this._uint8Array.subarray(this.position(),this.position()+t);return this.seekBy(t),r}seekBy(t){this._position+=t}seekTo(t){this._position=t}peekUint32(){return this._bufferView.getUint32(this.position(),!0)}position(){return this._position}size(){return this._bufferView.byteLength}};function Jd(e,t){let r=parseInt(e,t);if(isNaN(r))throw new Error("Parsing number failed");return r}function Fi(e,t){return e===""?null:Jd(e,t)}var Yd=class e{_fields;static parse(t){let r=new Uint8Array(t),n=[],o=new TextDecoder("utf-8",{fatal:!0});for(;r.length>0;){let a=r.indexOf(32);if(a===-1)throw new Error("Expected space character");let i=Jd(o.decode(r.subarray(0,a)),10),l=o.decode(r.subarray(0,i)).match(/^\d+ ([^=]+)=(.*)\n$/);if(l===null)throw new Error("Invalid PAX header data format.");let c=l[1],u=l[2];typeof u=="string"&&u.length===0?u=null:typeof u=="string"&&/^\d+$/.test(u)&&(u=Jd(u,10));let d={name:c,value:u};n.push(d),r=r.subarray(i)}return new e(n)}constructor(t){this._fields=t}applyHeader(t){for(let r of this._fields){let n=r.name,o=r.value;n==="path"?(n="name",t.namePrefix!==void 0&&delete t.namePrefix):n==="linkpath"&&(n="linkname"),o===null?delete t[n]:t[n]=o}}},Xd=class{_reader;_globalPaxHeader=null;constructor(t){this._reader=new Sy(t)}hasNext(){return this._reader.position()+4<this._reader.size()&&this._reader.peekUint32()!==0}next(){return this._readNextFile()}_readNextFile(){let t=this._reader,r=t.position(),n=t.readString(100),o=t.readString(8),a=Fi(t.readString(8),8),i=Fi(t.readString(8),8),s=Jd(t.readString(12),8),l=Fi(t.readString(12),8),c=Fi(t.readString(8),10),u=t.readString(1),d=t.readString(100),f=t.readString(6),p=null,h=null,y=null,b=null,g=null,m=null;f.indexOf("ustar")>-1&&(p=t.readString(2),h=t.readString(32),y=t.readString(32),b=Fi(t.readString(8),10),g=Fi(t.readString(8),10),m=t.readString(155),m.length>0&&(n=m+"/"+n));let T=(s-1|511)+1,S=r+512,I=S+T;if(t.seekTo(S),u==="g")return this._globalPaxHeader=Yd.parse(t.readBuffer(s)),t.seekTo(I),this._readNextFile();if(u==="x"){let E=Yd.parse(t.readBuffer(s));t.seekTo(I);let R=this._readNextFile();return E.applyHeader(R),R}let w=u==="0"||u===""||u==="7"?t.readBuffer(s):null;t.seekTo(I);let k={name:n,type:u,buffer:w,mode:o,uid:a,gid:i,size:s,mtime:l,checksum:c,linkname:d,ustarFormat:f,version:p,uname:h,gname:y,devmajor:b,devminor:g,namePrefix:m};return this._globalPaxHeader!==null&&this._globalPaxHeader.applyHeader(k),k}};async function jA(e,t,r,n,o,a){let i=[];if(n!==null){let c=i6(r)?r:null,{debugName:u,breakpadId:d,address:f}=n,p=await Zd("/source/v1",JSON.stringify({debugName:u,debugId:d,moduleOffset:`0x${f.toString(16)}`,file:e}),c,a,a6);switch(p.type){case"SUCCESS":return{type:"SUCCESS",source:p.convertedResponse};case"ERROR":{i.push(...p.errors);break}default:throw ae(p)}}if(t!==null)try{let c=await a.fetchJSSourceFromBrowser(t);if(c)return{type:"SUCCESS",source:c}}catch(c){i.push({type:"NOT_PRESENT_IN_BROWSER",sourceUuid:t,url:e,errorMessage:c.toString()})}let s=Vc(e),l=IS(s);switch(l.type){case"CORS_ENABLED_SINGLE_FILE":{let{url:c}=l;try{return{type:"SUCCESS",source:await(await a.fetchUrlResponse(c)).text()}}catch(u){i.push({type:"NETWORK_ERROR",url:c,networkErrorMessage:u.toString()})}break}case"CORS_ENABLED_ARCHIVE":{let{archiveUrl:c,pathInArchive:u}=l,d=o.get(c);d===void 0&&(d=(async()=>{let f=await a.fetchUrlResponse(c),p=new Uint8Array(await f.arrayBuffer());return Za(p)?Ka(p):p})(),o.set(c,d));try{let f=await d,p=new Xd(f.buffer),h=new TextDecoder;for(;p.hasNext();){let y=p.next();if(y.name===u&&y.buffer!==null)return{type:"SUCCESS",source:h.decode(y.buffer)}}i.push({type:"NOT_PRESENT_IN_ARCHIVE",url:c,pathInArchive:u})}catch(f){i.push({type:"ARCHIVE_PARSING_ERROR",url:c,parsingErrorMessage:f.toString()})}break}case"NO_KNOWN_CORS_URL":{i.push({type:"NO_KNOWN_CORS_URL"});break}default:throw ae(l)}return{type:"ERROR",errors:i}}function a6(e){if(!("source"in e)||typeof e.source!="string")throw new Error('No string "source" property on API response');return e.source}function i6(e){return oo(e)}var xy=class{async fetchUrlResponse(t,r){return fetch(t,r!==void 0?{method:"POST",body:r}:{})}async queryBrowserSymbolicationApi(t,r){throw new Error("No browser connection available in profiler-cli")}async fetchJSSourceFromBrowser(t){throw new Error("No browser connection available in profiler-cli")}},qA=new xy,Qd=class e{_store;_processIndexMap;_timestampManager;_threadMap;_markerMap;_filterStack;_archiveCache;constructor(t,r){this._store=t,this._processIndexMap=new Map,this._timestampManager=new qu(r),this._threadMap=new zu,this._filterStack=new Kd,this._archiveCache=new Map;let n=this._store.getState(),o=ge(n);this._markerMap=new Zu,Array.from(new Set(o.threads.map(i=>i.pid))).forEach((i,s)=>{this._processIndexMap.set(i,s)}),o.threads.forEach((i,s)=>{this._threadMap.handleForThreadIndex(s)})}static async load(t,r,n){let{store:o,rootRange:a}=await vA(t,r,n);return new e(o,a)}async profileInfo(t=!1,r){return{...await _A(this._store,this._timestampManager,this._threadMap,this._processIndexMap,t,r),context:this._getContext()}}async threadInfo(t){return{...await EA(this._store,this._timestampManager,this._threadMap,t),context:this._getContext()}}async threadSamples(t,r=!1,n,o){let a=!r,i=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),s=()=>NA(this._store,this._threadMap,t),l=a?()=>this._withDroppedIdle(i,s):s,c=n?()=>this._withCallTreeSearch(n,l):l,u=o&&o.length>0?this._withEphemeralFilters(i,o,c):c(),d=this._filterStack.list(ut(i));return{...u,activeOnly:a,search:n||void 0,activeFilters:d.length>0?d:void 0,ephemeralFilters:o&&o.length>0?o:void 0,context:this._getContext()}}async threadSamplesTopDown(t,r,n=!1,o,a){let i=!n,s=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),l=()=>PA(this._store,this._threadMap,t,r),c=i?()=>this._withDroppedIdle(s,l):l,u=o?()=>this._withCallTreeSearch(o,c):c,d=a&&a.length>0?this._withEphemeralFilters(s,a,u):u(),f=this._filterStack.list(ut(s));return{...d,activeOnly:i,search:o||void 0,activeFilters:f.length>0?f:void 0,ephemeralFilters:a&&a.length>0?a:void 0,context:this._getContext()}}async threadSamplesBottomUp(t,r,n=!1,o,a){let i=!n,s=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),l=()=>AA(this._store,this._threadMap,t,r),c=i?()=>this._withDroppedIdle(s,l):l,u=o?()=>this._withCallTreeSearch(o,c):c,d=a&&a.length>0?this._withEphemeralFilters(s,a,u):u(),f=this._filterStack.list(ut(s));return{...d,activeOnly:i,search:o||void 0,activeFilters:f.length>0?f:void 0,ephemeralFilters:a&&a.length>0?a:void 0,context:this._getContext()}}async pushViewRange(t){let r=this._store.getState(),n=fr(r),o=n.start,a,i,s;if(t.startsWith("m-")&&!t.includes(",")){let{threadIndexes:m,markerIndex:T}=this._markerMap.markerForHandle(t),S=ht(m),v=S.getFullMarkerList(r)[T];if(!v)throw new Error(`Marker ${t} not found`);if(v.end===null)throw new Error(`Marker ${t} is an instant marker (no duration). Only interval markers can be used for zoom ranges.`);a=v.start,i=v.end;let w=this._threadMap.handleForThreadIndexes(m),k=S.getFriendlyThreadName(r);s={markerHandle:t,markerName:v.name,threadHandle:w,threadName:k}}else{let m=t.split(",").map(I=>I.trim());if(m.length!==2)throw new Error(`Invalid range format: "${t}". Expected a marker handle (e.g., "m-1") or two comma-separated values (e.g., "2.7,3.1" or "ts-6,ts-7")`);let T=by(m[0],n),S=by(m[1],n);a=T??(()=>{let I=this._timestampManager.timestampForName(m[0]);if(I===null)throw new Error(`Unknown timestamp name: "${m[0]}"`);return I})(),i=S??(()=>{let I=this._timestampManager.timestampForName(m[1]);if(I===null)throw new Error(`Unknown timestamp name: "${m[1]}"`);return I})()}let l;(a<n.start||i>n.end)&&(l=`Range extends outside the profile duration (${((n.end-n.start)/1e3).toFixed(3)}s). Did you mean to use milliseconds? Use the "ms" suffix for milliseconds (e.g. 0ms,400ms).`);let c=this._timestampManager.nameForTimestamp(a),u=this._timestampManager.nameForTimestamp(i),d=a-o,f=i-o;this._store.dispatch(v_(d,f));let p=this._store.getState(),y=dr(p).length,b=i-a,g=`Pushed view range: ${c} (${this._timestampManager.timestampString(a)}) to ${u} (${this._timestampManager.timestampString(i)})`;return{type:"view-range",action:"push",range:{start:a,startName:c,end:i,endName:u},message:g,duration:b,zoomDepth:y,markerInfo:s,warning:l}}async popViewRange(){let t=this._store.getState(),r=dr(t);if(r.length===0)throw new Error("No view ranges to pop");let n=r.length-1;this._store.dispatch(Xh(n));let o=r[n],i=fr(t).start,s=o.start+i,l=o.end+i,c=this._timestampManager.nameForTimestamp(s),u=this._timestampManager.nameForTimestamp(l),d=`Popped view range: ${c} (${this._timestampManager.timestampString(s)}) to ${u} (${this._timestampManager.timestampString(l)})`;return{type:"view-range",action:"pop",range:{start:s,startName:c,end:l,endName:u},message:d}}async clearViewRange(){let t=this._store.getState();if(dr(t).length===0)throw new Error("No view ranges to clear");this._store.dispatch(Xh(0));let n=fr(t),o=this._timestampManager.nameForTimestamp(n.start),a=this._timestampManager.nameForTimestamp(n.end),i=`Cleared all view ranges, returned to full profile: ${o} (${this._timestampManager.timestampString(n.start)}) to ${a} (${this._timestampManager.timestampString(n.end)})`;return{type:"view-range",action:"pop",range:{start:n.start,startName:o,end:n.end,endName:a},message:i}}async threadSelect(t){let r=this._threadMap.threadIndexesForHandle(t);this._store.dispatch(I_(r));let n=this._store.getState(),o=ge(n);if(r.size===1){let i=Array.from(r)[0],s=o.threads[i];return`Selected thread: ${t} (${s.name})`}let a=Array.from(r).map(i=>o.threads[i].name).join(", ");return`Selected ${r.size} threads: ${t} (${a})`}filterPush(t,r){let n=r!==void 0?this._threadMap.threadIndexesForHandle(r):Je(this._store.getState()),o=ut(n),a=r??this._threadMap.handleForThreadIndexes(n),i=this._filterStack.push(this._store,o,t),s=this._filterStack.list(o);return{type:"filter-stack",threadHandle:a,filters:s,action:"push",message:`Pushed filter ${i.index}: ${i.description}`}}filterPop(t=1,r){let n=r!==void 0?this._threadMap.threadIndexesForHandle(r):Je(this._store.getState()),o=ut(n),a=r??this._threadMap.handleForThreadIndexes(n),i=this._filterStack.pop(this._store,o,t),s=this._filterStack.list(o),l;return i.length===0?l="No filters to pop":i.length===1?l=`Popped filter: ${i[0].description}`:l=`Popped ${i.length} filters`,{type:"filter-stack",threadHandle:a,filters:s,action:"pop",message:l}}filterClear(t){let r=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),n=ut(r),o=t??this._threadMap.handleForThreadIndexes(r),a=this._filterStack.clear(this._store,n),i=a.length===0?"No filters to clear":`Cleared ${a.length} filter(s)`;return{type:"filter-stack",threadHandle:o,filters:[],action:"clear",message:i}}filterList(t){let r=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),n=ut(r),o=t??this._threadMap.handleForThreadIndexes(r),a=this._filterStack.list(n);return{type:"filter-stack",threadHandle:o,filters:a}}_withEphemeralFilters(t,r,n){if(r.length===0)return n();let o=ut(t),a=$o(this._store.getState(),o).length;for(let i of r)Ty(this._store,o,i);try{return n()}finally{this._store.dispatch({type:"POP_TRANSFORMS_FROM_STACK",threadsKey:o,firstPoppedFilterIndex:a})}}_withDroppedIdle(t,r){var l;let n=this._store.getState(),a=((l=ge(n).meta.categories)==null?void 0:l.findIndex(c=>c.name==="Idle"))??-1;if(a===-1)return r();let i=ut(t),s=$o(n,i).length;this._store.dispatch(qr(i,{type:"drop-category",category:a}));try{return r()}finally{this._store.dispatch({type:"POP_TRANSFORMS_FROM_STACK",threadsKey:i,firstPoppedFilterIndex:s})}}_withCallTreeSearch(t,r){let n=Gp(this._store.getState());this._store.dispatch(Jh(t));try{return r()}finally{this._store.dispatch(Jh(n))}}_getContext(){let t=this._store.getState(),r=ge(t),n=fr(t),o=dr(t),a=Je(t),i=a.size>0?this._threadMap.handleForThreadIndexes(a):null,s=Array.from(a).map(u=>({threadIndex:u,name:r.threads[u].name})),l=n.start,c=null;if(o.length>0){let u=o[o.length-1],d=u.start+l,f=u.end+l,p=this._timestampManager.nameForTimestamp(d),h=this._timestampManager.nameForTimestamp(f);c={start:d,startName:p,end:f,endName:h}}return{selectedThreadHandle:i,selectedThreads:s,currentViewRange:c,rootRange:{start:n.start,end:n.end}}}async getStatus(){let t=this._store.getState(),r=ge(t),n=fr(t),o=dr(t),a=Je(t),i=a.size>0?this._threadMap.handleForThreadIndexes(a):null,s=Array.from(a).map(d=>({threadIndex:d,name:r.threads[d].name})),l=n.start,c=o.map(d=>{let f=d.start+l,p=d.end+l,h=this._timestampManager.nameForTimestamp(f),y=this._timestampManager.nameForTimestamp(p);return{start:f,startName:h,end:p,endName:y}}),u=this._filterStack.activeThreadsKeys().map(d=>({threadsKey:d,threadHandle:this._threadMap.handleForKey(d),filters:this._filterStack.list(d)}));return{type:"status",selectedThreadHandle:i,selectedThreads:s,viewRanges:c,rootRange:{start:n.start,end:n.end},filterStacks:u}}async functionExpand(t){let r=this._store.getState(),n=ge(r),{funcTable:o,resourceTable:a,stringArray:i}=n.shared,s=Ku(t,o.length),l=i[o.name[s]],c=o.resource[s],u;if(c!==-1){let f=a.lib[c];f!=null&&n.libs&&(u=n.libs[f].name)}let d=u?`${u}!${l}`:l;return{type:"function-expand",functionHandle:t,funcIndex:s,name:l,fullName:d,library:u,context:this._getContext()}}async functionInfo(t){let r=this._store.getState(),n=ge(r),{funcTable:o,resourceTable:a,stringArray:i}=n.shared,s=Ku(t,o.length),l=i[o.name[s]],c=o.resource[s],u=o.isJS[s],d=o.relevantForJS[s],f,p,h;if(c!==-1){f={name:i[a.name[c]],index:c};let g=a.lib[c];if(g!=null&&g>=0&&n.libs){let m=n.libs[g];h=m.name,p={name:m.name,path:m.path,debugName:m.debugName,debugPath:m.debugPath,breakpadId:m.breakpadId}}}let y=h?`${h}!${l}`:l;return{type:"function-info",functionHandle:t,funcIndex:s,name:l,fullName:y,isJS:u,relevantForJS:d,resource:f,library:p,context:this._getContext()}}async threadMarkers(t,r){return{...await DA(this._store,this._threadMap,this._markerMap,t,r),context:this._getContext()}}async threadNetwork(t,r){return{...GA(this._store,this._threadMap,t,r),context:this._getContext()}}async threadPageLoad(t,r){return{...HA(this._store,this._threadMap,this._timestampManager,this._markerMap,t,r),context:this._getContext()}}async profileLogs(t={}){return{...WA(this._store,this._threadMap,t),context:this._getContext()}}async threadFunctions(t,r,n=!1,o){let a=!n,i=t!==void 0?this._threadMap.threadIndexesForHandle(t):Je(this._store.getState()),s=()=>RA(this._store,this._threadMap,t,r),l=a?()=>this._withDroppedIdle(i,s):s,c=o&&o.length>0?this._withEphemeralFilters(i,o,l):l(),u=this._filterStack.list(ut(i));return{...c,activeOnly:a,activeFilters:u.length>0?u:void 0,ephemeralFilters:o&&o.length>0?o:void 0,context:this._getContext()}}async markerInfo(t){return{...await $A(this._store,this._markerMap,this._threadMap,t),context:this._getContext()}}async markerStack(t){return{...await UA(this._store,this._markerMap,this._threadMap,t),context:this._getContext()}}async functionAnnotate(t,r,n,o="2"){let a=this._store.getState(),i=ge(a),{funcTable:s,stringArray:l,resourceTable:c}=i.shared,u=Ku(t,s.length),d=l[s.name[u]],f=[],p=s.resource[u],h;if(p!==-1){let D=c.lib[p];D!=null&&D>=0&&i.libs&&(h=i.libs[D].name)}let y=h?`${h}!${d}`:d,b=Je(a),g=ht(b),m=g.getFilteredThread(a),{stackTable:T,frameTable:S,funcTable:I,nativeSymbols:v}=m,w=m.samples,k=g.getFriendlyThreadName(a),E=this._threadMap.handleForThreadIndexes(b),R=new Uint8Array(S.func.length);for(let D=0;D<S.func.length;D++)S.func[D]===u&&(R[D]=1);let F=new Int8Array(T.length);for(let D=0;D<T.length;D++){let re=T.frame[D];if(R[re])F[D]=1;else{let N=T.prefix[D];F[D]=N!==null?F[N]:-1}}let G=0,B=0;for(let D=0;D<w.length;D++){let re=w.stack[D];if(re===null)continue;let N=w.weight?w.weight[D]:1;F[re]===1&&(B+=N),R[T.frame[re]]&&(G+=N)}let Z=null;if(r==="src"||r==="all"){let D=s.source[u];if(D!==null){let re=m.sources.filename[D],N=m.stringTable.getString(re),A=m.sources.id[D],M=vu(T,S,I,D),{totalLineHits:P,selfLineHits:$}=wu(M,w),J=0,H=0;for(let q=0;q<w.length;q++){let Q=w.stack[q];if(Q===null)continue;let Te=M.stackIndexToLineSetIndex[Q];if(Te===-1)continue;let Ne=w.weight?w.weight[q]:1;J+=Ne,M.lineSetTable.self[Te]!==-1&&(H+=Ne)}let z=null;for(let q=0;q<S.func.length;q++)if(S.func[q]===u){let Q=S.nativeSymbol[q];if(Q!==null){let Te=v.libIndex[Q],Ne=i.libs[Te];Ne.debugName&&Ne.breakpadId&&(z={debugName:Ne.debugName,breakpadId:Ne.breakpadId,address:v.address[Q]});break}}let se=null,de=null,ue=await jA(N,A,n,z,this._archiveCache,qA);if(ue.type==="SUCCESS")se=ue.source.split(`
685
+ `),de=se.length;else{let q=ue.errors.map(Q=>JSON.stringify(Q)).join("; ");f.push(`Could not fetch source for ${N}: ${q}`)}let fe=new Set([...P.keys(),...$.keys()]),be,V;if(o==="file"){be=new Set;let q=de??Math.max(...fe);for(let Q=1;Q<=q;Q++)be.add(Q);V="full file"}else{let q=parseInt(o,10),Q=Math.max(0,isNaN(q)?2:q);be=new Set;for(let Te of fe)for(let Ne=Math.max(1,Te-Q);Ne<=Te+Q;Ne++)be.add(Ne);V=Q===0?"annotated lines only":`\xB1${Q} lines context`}let te=Array.from(be).sort((q,Q)=>q-Q);Z={filename:N,totalFileLines:de,samplesWithFunction:J,samplesWithLineInfo:H,contextMode:V,lines:te.map(q=>({lineNumber:q,selfSamples:$.get(q)??0,totalSamples:P.get(q)??0,sourceText:se!==null?se[q-1]??null:null}))}}else r==="src"&&f.push(`Function ${t} has no source index. Use --mode asm for assembly view.`)}let X=[];if(r==="asm"||r==="all"){let D=new Set;for(let A=0;A<S.func.length;A++)if(S.func[A]===u){let M=S.nativeSymbol[A];M!==null&&D.add(M)}D.size===0&&f.push(`Function ${t} has no native symbols \u2014 may be JS-only or not symbolicated.`);let re=D.size,N=1;for(let A of D){let M=m.stringTable.getString(v.name[A]),P=v.address[A],$=v.functionSize[A]??null,J=v.libIndex[A],H=i.libs[J],z=ku(T,S,I,A),{totalAddressHits:se,selfAddressHits:de}=_u(z,w),ue={name:M,address:P,functionSize:$??0,functionSizeIsKnown:$!==null,libIndex:J},fe=null,be=[];try{let V=await VA(ue,H,n,qA);V.type==="SUCCESS"?be=V.instructions.map(te=>({address:te.address,selfSamples:de.get(te.address)??0,totalSamples:se.get(te.address)??0,decodedString:te.decodedString})):(fe=V.errors.map(te=>JSON.stringify(te)).join("; "),f.push(`Assembly fetch failed for ${M}: ${fe}`))}catch(V){fe=V instanceof Error?V.message:String(V),f.push(`Assembly fetch threw for ${M}: ${fe}`)}X.push({compilationIndex:N,symbolName:M,symbolAddress:P,functionSize:$,nativeSymbolCount:re,fetchError:fe,instructions:be}),N++}}return{...{type:"function-annotate",functionHandle:t,funcIndex:u,name:d,fullName:y,threadHandle:E,friendlyThreadName:k,totalSelfSamples:G,totalTotalSamples:B,mode:r,srcAnnotation:Z,asmAnnotations:X,warnings:f},context:this._getContext()}}};var kt=ce(require("fs")),en=ce(require("path")),zA=ce(require("crypto"));function Nl(e){kt.existsSync(e)||kt.mkdirSync(e,{recursive:!0})}function ef(){return Math.random().toString(36).substring(2,15)}function s6(e){let t=en.resolve(e).toLowerCase();return zA.createHash("sha256").update(t).digest("hex").slice(0,12)}function Oi(e,t){return process.platform==="win32"?`\\\\.\\pipe\\profiler-cli-${s6(e)}-${t}`:en.join(e,`${t}.sock`)}function KA(e,t){return en.join(e,`${t}.log`)}function Iy(e,t){return en.join(e,`${t}.json`)}function ZA(e,t){Nl(e);let r=Iy(e,t.id);kt.writeFileSync(r,JSON.stringify(t,null,2))}function tf(e,t){let r=Iy(e,t);if(!kt.existsSync(r))return null;try{let n=kt.readFileSync(r,"utf-8");return JSON.parse(n)}catch{return null}}function rf(e,t){Nl(e);let r=en.join(e,"current.txt");kt.writeFileSync(r,t,"utf-8")}function pa(e){let t=en.join(e,"current.txt");if(!kt.existsSync(t))return null;try{return kt.readFileSync(t,"utf-8").trim()}catch{return null}}function JA(e){let t=pa(e);return t?Oi(e,t):null}function fa(e){try{return process.kill(e,0),!0}catch{return!1}}async function YA(e,t=5e3,r=50){let n=Date.now()+t;for(;Date.now()<n;){if(!fa(e))return!0;await new Promise(o=>setTimeout(o,r))}return!fa(e)}function yn(e,t){let r=Oi(e,t),n=Iy(e,t),o=en.join(e,"current.txt");process.platform!=="win32"&&kt.rmSync(r,{force:!0}),kt.rmSync(n,{force:!0}),pa(e)===t&&kt.rmSync(o,{force:!0})}function _o(e,t){let r=tf(e,t);return!r||!fa(r.pid)||process.platform!=="win32"&&!kt.existsSync(r.socketPath)?null:r}function nf(e){return Nl(e),kt.readdirSync(e).filter(r=>r.endsWith(".json")).map(r=>en.basename(r,".json"))}xe();var Al="mo8liije",XA="0.1.0-alpha.4";var vy=class{querier=null;server=null;sessionDir;sessionId;socketPath;logPath;logStream;profilePath;symbolServerUrl;loadingProfile=!1;symbolicating=!1;profileLoadError=null;constructor(t,r,n,o){this.sessionDir=t,this.profilePath=r,this.sessionId=n||ef(),this.symbolServerUrl=o,this.socketPath=Oi(t,this.sessionId),this.logPath=KA(t,this.sessionId),this.logStream=Li.createWriteStream(this.logPath,{flags:"a"}),this.redirectConsole(),process.on("SIGINT",()=>this.shutdown("SIGINT")),process.on("SIGTERM",()=>this.shutdown("SIGTERM"))}redirectConsole(){let t=console.log,r=console.error,n=console.warn;console.log=(...o)=>{let a=o.map(i=>String(i)).join(" ");this.logStream.write(`[LOG] ${new Date().toISOString()} ${a}
686
686
  `),t(...o)},console.error=(...o)=>{let a=o.map(i=>String(i)).join(" ");this.logStream.write(`[ERROR] ${new Date().toISOString()} ${a}
687
687
  `),r(...o)},console.warn=(...o)=>{let a=o.map(i=>String(i)).join(" ");this.logStream.write(`[WARN] ${new Date().toISOString()} ${a}
688
- `),n(...o)}}async start(){try{console.log(`Starting daemon for session ${this.sessionId}`),console.log(`Profile path: ${this.profilePath}`),console.log(`Socket path: ${this.socketPath}`),console.log(`Log path: ${this.logPath}`),El(this.sessionDir),this.server=KA.createServer(t=>this.handleConnection(t)),process.platform!=="win32"&&Fi.existsSync(this.socketPath)&&Fi.unlinkSync(this.socketPath),this.server.listen(this.socketPath,()=>{console.log(`Daemon listening on ${this.socketPath}`);let t={id:this.sessionId,socketPath:this.socketPath,logPath:this.logPath,pid:process.pid,profilePath:this.profilePath,createdAt:new Date().toISOString(),buildHash:Nl};VA(this.sessionDir,t),Qd(this.sessionDir,this.sessionId),console.log("Daemon ready (socket listening)"),this.loadProfileAsync()}),this.server.on("error",t=>{console.error(`Server error: ${t}`),this.shutdown("error")})}catch(t){console.error(`Failed to start daemon: ${t}`),process.exit(1)}}async loadProfileAsync(){this.loadingProfile=!0;try{console.log("Loading profile..."),this.querier=await Jd.load(this.profilePath),console.log("Profile loaded successfully"),this.loadingProfile=!1}catch(t){console.error(`Failed to load profile: ${t}`),this.profileLoadError=t instanceof Error?t:new Error(String(t)),this.loadingProfile=!1}}handleConnection(t){console.log("Client connected");let r="";t.on("data",n=>{r+=n.toString();let o;for(;(o=r.indexOf(`
688
+ `),n(...o)}}async start(){try{console.log(`Starting daemon for session ${this.sessionId}`),console.log(`Profile path: ${this.profilePath}`),console.log(`Socket path: ${this.socketPath}`),console.log(`Log path: ${this.logPath}`),Nl(this.sessionDir),this.server=QA.createServer(t=>this.handleConnection(t)),process.platform!=="win32"&&Li.existsSync(this.socketPath)&&Li.unlinkSync(this.socketPath),this.server.listen(this.socketPath,()=>{console.log(`Daemon listening on ${this.socketPath}`);let t={id:this.sessionId,socketPath:this.socketPath,logPath:this.logPath,pid:process.pid,profilePath:this.profilePath,createdAt:new Date().toISOString(),buildHash:Al};ZA(this.sessionDir,t),rf(this.sessionDir,this.sessionId),console.log("Daemon ready (socket listening)"),this.loadProfileAsync()}),this.server.on("error",t=>{console.error(`Server error: ${t}`),this.shutdown("error")})}catch(t){console.error(`Failed to start daemon: ${t}`),process.exit(1)}}async loadProfileAsync(){this.loadingProfile=!0;try{console.log("Loading profile..."),this.querier=await Qd.load(this.profilePath,this.symbolServerUrl,()=>{this.loadingProfile=!1,this.symbolicating=!0,console.log("Symbolicating profile...")}),this.symbolicating=!1,this.loadingProfile=!1,console.log("Profile loaded successfully")}catch(t){console.error(`Failed to load profile: ${t}`),this.profileLoadError=t instanceof Error?t:new Error(String(t)),this.loadingProfile=!1,this.symbolicating=!1}}handleConnection(t){console.log("Client connected");let r="";t.on("data",n=>{r+=n.toString();let o;for(;(o=r.indexOf(`
689
689
  `))!==-1;){let a=r.substring(0,o);r=r.substring(o+1),a.trim()&&this.handleMessage(a,t)}}),t.on("error",n=>{console.error(`Socket error: ${n}`)}),t.on("end",()=>{console.log("Client disconnected")})}handleMessage(t,r){try{let n=JSON.parse(t);console.log(`Received message: ${n.type}`),this.processMessage(n).then(o=>{r.write(JSON.stringify(o)+`
690
690
  `)}).catch(o=>{let a={type:"error",error:o instanceof Error?o.message:String(o)};r.write(JSON.stringify(a)+`
691
691
  `)})}catch(n){console.error(`Failed to parse message: ${n}`);let o={type:"error",error:`Failed to parse message: ${n instanceof Error?n.message:String(n)}`};r.write(JSON.stringify(o)+`
692
- `)}}async processMessage(t){switch(t.type){case"status":return this.profileLoadError?{type:"error",error:`Profile load failed: ${this.profileLoadError.message}`}:this.loadingProfile?{type:"loading"}:this.querier?{type:"ready"}:{type:"error",error:"Profile not loaded"};case"shutdown":{console.log("Shutdown command received");let r={type:"success",result:"Shutting down"};return setImmediate(()=>this.shutdown("command")),r}case"command":return this.profileLoadError?{type:"error",error:`Profile load failed: ${this.profileLoadError.message}`}:this.loadingProfile?{type:"error",error:"Profile still loading, try again shortly"}:this.querier?{type:"success",result:await this.processCommand(t.command)}:{type:"error",error:"Profile not loaded"};default:return{type:"error",error:`Unknown message type: ${t.type}`}}}async processCommand(t){switch(t.command){case"profile":switch(t.subcommand){case"info":return this.querier.profileInfo(t.all,t.search);case"threads":throw new Error("unimplemented");case"logs":return this.querier.profileLogs(t.logFilters);default:throw ae(t)}case"thread":switch(t.subcommand){case"info":return this.querier.threadInfo(t.thread);case"select":if(!t.thread)throw new Error("thread handle required for thread select");return this.querier.threadSelect(t.thread);case"samples":return this.querier.threadSamples(t.thread,t.includeIdle,t.search,t.sampleFilters);case"samples-top-down":return this.querier.threadSamplesTopDown(t.thread,t.callTreeOptions,t.includeIdle,t.search,t.sampleFilters);case"samples-bottom-up":return this.querier.threadSamplesBottomUp(t.thread,t.callTreeOptions,t.includeIdle,t.search,t.sampleFilters);case"markers":return this.querier.threadMarkers(t.thread,t.markerFilters);case"functions":return this.querier.threadFunctions(t.thread,t.functionFilters,t.includeIdle,t.sampleFilters);case"network":return this.querier.threadNetwork(t.thread,t.networkFilters);case"page-load":return this.querier.threadPageLoad(t.thread,t.pageLoadOptions);default:throw ae(t)}case"marker":switch(t.subcommand){case"info":if(!t.marker)throw new Error("marker handle required for marker info");return this.querier.markerInfo(t.marker);case"stack":if(!t.marker)throw new Error("marker handle required for marker stack");return this.querier.markerStack(t.marker);case"select":throw new Error("unimplemented");default:throw ae(t)}case"sample":switch(t.subcommand){case"info":throw new Error("unimplemented");case"select":throw new Error("unimplemented");default:throw ae(t)}case"function":switch(t.subcommand){case"info":if(!t.function)throw new Error("function handle required for function info");return this.querier.functionInfo(t.function);case"expand":if(!t.function)throw new Error("function handle required for function expand");return this.querier.functionExpand(t.function);case"select":throw new Error("unimplemented");case"annotate":if(!t.function)throw new Error("function handle required for function annotate");return this.querier.functionAnnotate(t.function,t.annotateMode??"src",t.symbolServerUrl??"http://localhost:3000",t.annotateContext??"2");default:throw ae(t)}case"zoom":switch(t.subcommand){case"push":if(!t.range)throw new Error("range parameter is required for zoom push");return this.querier.pushViewRange(t.range);case"pop":return this.querier.popViewRange();case"clear":return this.querier.clearViewRange();default:throw ae(t)}case"filter":switch(t.subcommand){case"push":if(!t.spec)throw new Error("spec is required for filter push");return this.querier.filterPush(t.spec,t.thread);case"pop":return this.querier.filterPop(t.count??1,t.thread);case"list":return this.querier.filterList(t.thread);case"clear":return this.querier.filterClear(t.thread);default:throw ae(t)}case"status":return this.querier.getStatus();default:throw ae(t)}}shutdown(t){console.log(`Shutting down daemon (reason: ${t})`),this.server&&this.server.close(),yn(this.sessionDir,this.sessionId),this.logStream&&this.logStream.end(),console.log("Daemon stopped"),process.exit(0)}};async function ZA(e,t,r){await new Sy(e,t,r).start()}var JA=ce(require("net")),tf=ce(require("fs")),YA=ce(require("path")),XA=ce(require("child_process"));async function QA(e,t,r=3e4){return new Promise((n,o)=>{let a=JA.connect(e),i="";a.on("connect",()=>{a.write(JSON.stringify(t)+`
692
+ `)}}async processMessage(t){switch(t.type){case"status":return this.profileLoadError?{type:"error",error:`Profile load failed: ${this.profileLoadError.message}`}:this.loadingProfile?{type:"loading"}:this.symbolicating?{type:"symbolicating"}:this.querier?{type:"ready"}:{type:"error",error:"Profile not loaded"};case"shutdown":{console.log("Shutdown command received");let r={type:"success",result:"Shutting down"};return setImmediate(()=>this.shutdown("command")),r}case"command":return this.profileLoadError?{type:"error",error:`Profile load failed: ${this.profileLoadError.message}`}:this.loadingProfile?{type:"error",error:"Profile still loading, try again shortly"}:this.querier?{type:"success",result:await this.processCommand(t.command)}:{type:"error",error:"Profile not loaded"};default:return{type:"error",error:`Unknown message type: ${t.type}`}}}async processCommand(t){switch(t.command){case"profile":switch(t.subcommand){case"info":return this.querier.profileInfo(t.all,t.search);case"threads":throw new Error("unimplemented");case"logs":return this.querier.profileLogs(t.logFilters);default:throw ae(t)}case"thread":switch(t.subcommand){case"info":return this.querier.threadInfo(t.thread);case"select":if(!t.thread)throw new Error("thread handle required for thread select");return this.querier.threadSelect(t.thread);case"samples":return this.querier.threadSamples(t.thread,t.includeIdle,t.search,t.sampleFilters);case"samples-top-down":return this.querier.threadSamplesTopDown(t.thread,t.callTreeOptions,t.includeIdle,t.search,t.sampleFilters);case"samples-bottom-up":return this.querier.threadSamplesBottomUp(t.thread,t.callTreeOptions,t.includeIdle,t.search,t.sampleFilters);case"markers":return this.querier.threadMarkers(t.thread,t.markerFilters);case"functions":return this.querier.threadFunctions(t.thread,t.functionFilters,t.includeIdle,t.sampleFilters);case"network":return this.querier.threadNetwork(t.thread,t.networkFilters);case"page-load":return this.querier.threadPageLoad(t.thread,t.pageLoadOptions);default:throw ae(t)}case"marker":switch(t.subcommand){case"info":if(!t.marker)throw new Error("marker handle required for marker info");return this.querier.markerInfo(t.marker);case"stack":if(!t.marker)throw new Error("marker handle required for marker stack");return this.querier.markerStack(t.marker);case"select":throw new Error("unimplemented");default:throw ae(t)}case"sample":switch(t.subcommand){case"info":throw new Error("unimplemented");case"select":throw new Error("unimplemented");default:throw ae(t)}case"function":switch(t.subcommand){case"info":if(!t.function)throw new Error("function handle required for function info");return this.querier.functionInfo(t.function);case"expand":if(!t.function)throw new Error("function handle required for function expand");return this.querier.functionExpand(t.function);case"select":throw new Error("unimplemented");case"annotate":if(!t.function)throw new Error("function handle required for function annotate");return this.querier.functionAnnotate(t.function,t.annotateMode??"src",t.symbolServerUrl??"http://localhost:3000",t.annotateContext??"2");default:throw ae(t)}case"zoom":switch(t.subcommand){case"push":if(!t.range)throw new Error("range parameter is required for zoom push");return this.querier.pushViewRange(t.range);case"pop":return this.querier.popViewRange();case"clear":return this.querier.clearViewRange();default:throw ae(t)}case"filter":switch(t.subcommand){case"push":if(!t.spec)throw new Error("spec is required for filter push");return this.querier.filterPush(t.spec,t.thread);case"pop":return this.querier.filterPop(t.count??1,t.thread);case"list":return this.querier.filterList(t.thread);case"clear":return this.querier.filterClear(t.thread);default:throw ae(t)}case"status":return this.querier.getStatus();default:throw ae(t)}}shutdown(t){console.log(`Shutting down daemon (reason: ${t})`),this.server&&this.server.close(),yn(this.sessionDir,this.sessionId),this.logStream&&this.logStream.end(),console.log("Daemon stopped"),process.exit(0)}};async function eP(e,t,r,n){await new vy(e,t,r,n).start()}var tP=ce(require("net")),of=ce(require("fs")),rP=ce(require("path")),nP=ce(require("child_process"));async function oP(e,t,r=3e4){return new Promise((n,o)=>{let a=tP.connect(e),i="";a.on("connect",()=>{a.write(JSON.stringify(t)+`
693
693
  `)}),a.on("data",s=>{i+=s.toString();let l=i.indexOf(`
694
- `);if(l!==-1){let c=i.substring(0,l);try{let u=JSON.parse(c);a.end(),n(u)}catch(u){o(new Error(`Failed to parse response: ${u}`))}}}),a.on("error",s=>{o(new Error(`Socket error: ${s.message}`))}),a.on("timeout",()=>{a.destroy(),o(new Error("Connection timeout"))}),a.setTimeout(r)})}async function n6(e,t,r,n){if(process.platform!=="win32"&&!tf.existsSync(r))return da(n)?"still-running":(yn(e,t),"already-dead");try{let o=await QA(r,{type:"shutdown"},2e3);return o.type!=="success"?(console.error(`Failed to stop mismatched daemon for session ${t}: unexpected response ${o.type}`),da(n)?"still-running":"already-dead"):await qA(n)?(yn(e,t),"stopped"):(console.error(`Mismatched daemon for session ${t} acknowledged shutdown but did not exit within timeout`),"still-running")}catch(o){return da(n)?(console.error(`Failed to stop mismatched daemon for session ${t}: ${o}`),"still-running"):(yn(e,t),"already-dead")}}async function eP(e,t,r){let n=r||fa(e);if(!n)throw new Error('No active session. Run "profiler-cli load <PATH>" first.');if(!_o(e,n))throw yn(e,n),new Error(`Session ${n} is not running or is invalid.`);let o=Xd(e,n);if(o&&o.buildHash!==Nl){let i=await n6(e,n,o.socketPath,o.pid),s=i==="stopped"||i==="already-dead"?"The daemon is no longer running.":"The daemon may still be running; stop it before reusing this session id.";throw new Error(`Session ${n} was built with a different version (daemon: ${o.buildHash}, client: ${Nl}). ${s} Please run "profiler-cli load <PATH>" again.`)}let a=r?Mi(e,r):jA(e);if(!a||process.platform!=="win32"&&!tf.existsSync(a))throw new Error(`Socket not found for session ${n}`);return QA(a,t)}async function tP(e,t,r){let n=await eP(e,t,r);if(n.type==="success")return n.result;throw n.type==="error"?new Error(n.error):new Error(`Unexpected response type: ${n.type}`)}async function o6(e,t){return eP(e,{type:"status"},t)}async function He(e,t,r){return tP(e,{type:"command",command:t},r)}async function rP(e,t,r){let n=t.startsWith("http://")||t.startsWith("https://"),o=n?t:YA.resolve(t);if(!n&&!tf.existsSync(o))throw new Error(`Profile file not found: ${o}`);let a=r||Yd();if(r){if(_o(e,a))throw new Error(`Session ${a} is already running. Stop it first or choose a different session id.`);Xd(e,a)&&yn(e,a)}let i=process.argv[1];XA.spawn(process.execPath,[i,"--daemon",o,"--session",a],{detached:!0,stdio:"ignore",env:{...process.env,PROFILER_CLI_SESSION_DIR:e}}).unref();let l=10,c=0;for(;c<l&&(await new Promise(d=>setTimeout(d,50)),c++,!_o(e,a)););if(!_o(e,a))throw new Error(`Failed to start daemon: session not validated after ${l*50}ms`);let u=600;for(c=0;c<u;){await new Promise(d=>setTimeout(d,100)),c++;try{let d=await o6(e,a);switch(d.type){case"ready":return a;case"loading":continue;case"error":throw new Error(d.error);default:throw new Error(`Unexpected response type: ${d.type}`)}}catch(d){if(d instanceof Error&&d.message.startsWith("Profile load failed"))throw d;continue}}throw new Error(`Profile load timeout after ${u*100}ms`)}async function xy(e,t){let r=t||fa(e);if(!r)throw new Error("No active session to stop.");try{await tP(e,{type:"shutdown"},r)}catch(n){console.error(`Note: ${n}`)}await new Promise(n=>setTimeout(n,500)),console.log(`Session ${r} stopped`)}xe();function Xt(e,t,r){let n="No thread selected";if(e.selectedThreadHandle&&e.selectedThreads.length>0)if(e.selectedThreads.length===1){let u=e.selectedThreads[0];n=`${e.selectedThreadHandle} (${u.name})`}else{let u=e.selectedThreads.map(d=>d.name).join(", ");n=`${e.selectedThreadHandle} (${u})`}let o=e.rootRange.end-e.rootRange.start,a=u=>u<1e3?`${u.toFixed(1)}ms`:`${(u/1e3).toFixed(2)}s`,i="Full profile";if(e.currentViewRange){let u=e.currentViewRange,d=u.end-u.start;i=`${u.startName}\u2192${u.endName} (${a(d)})`}let s=a(o),l=((t==null?void 0:t.length)??0)+((r==null?void 0:r.length)??0),c=l>0?` | Filters: ${l}`:"";return`[Thread: ${n} | View: ${i} | Full: ${s}${c}]`}function nP(e){let t="No thread selected";if(e.selectedThreadHandle&&e.selectedThreads.length>0)if(e.selectedThreads.length===1){let a=e.selectedThreads[0];t=`${e.selectedThreadHandle} (${a.name})`}else{let a=e.selectedThreads.map(i=>i.name).join(", ");t=`${e.selectedThreadHandle} (${a})`}let r="Full profile";e.viewRanges.length>0&&(r=e.viewRanges.map(i=>`${i.startName} to ${i.endName}`).join(" > "));let n=[];for(let a of e.filterStacks)if(a.filters.length!==0){n.push(` Filters for ${a.threadHandle}:`);for(let i of a.filters)n.push(` ${i.index}. [${i.spec.type}] ${i.description}`)}let o=n.length>0?`
694
+ `);if(l!==-1){let c=i.substring(0,l);try{let u=JSON.parse(c);a.end(),n(u)}catch(u){o(new Error(`Failed to parse response: ${u}`))}}}),a.on("error",s=>{o(new Error(`Socket error: ${s.message}`))}),a.on("timeout",()=>{a.destroy(),o(new Error("Connection timeout"))}),a.setTimeout(r)})}async function l6(e,t,r,n){if(process.platform!=="win32"&&!of.existsSync(r))return fa(n)?"still-running":(yn(e,t),"already-dead");try{let o=await oP(r,{type:"shutdown"},2e3);return o.type!=="success"?(console.error(`Failed to stop mismatched daemon for session ${t}: unexpected response ${o.type}`),fa(n)?"still-running":"already-dead"):await YA(n)?(yn(e,t),"stopped"):(console.error(`Mismatched daemon for session ${t} acknowledged shutdown but did not exit within timeout`),"still-running")}catch(o){return fa(n)?(console.error(`Failed to stop mismatched daemon for session ${t}: ${o}`),"still-running"):(yn(e,t),"already-dead")}}async function aP(e,t,r){let n=r||pa(e);if(!n)throw new Error('No active session. Run "profiler-cli load <PATH>" first.');if(!_o(e,n))throw yn(e,n),new Error(`Session ${n} is not running or is invalid.`);let o=tf(e,n);if(o&&o.buildHash!==Al){let i=await l6(e,n,o.socketPath,o.pid),s=i==="stopped"||i==="already-dead"?"The daemon is no longer running.":"The daemon may still be running; stop it before reusing this session id.";throw new Error(`Session ${n} was built with a different version (daemon: ${o.buildHash}, client: ${Al}). ${s} Please run "profiler-cli load <PATH>" again.`)}let a=r?Oi(e,r):JA(e);if(!a||process.platform!=="win32"&&!of.existsSync(a))throw new Error(`Socket not found for session ${n}`);return oP(a,t)}async function iP(e,t,r){let n=await aP(e,t,r);if(n.type==="success")return n.result;throw n.type==="error"?new Error(n.error):new Error(`Unexpected response type: ${n.type}`)}async function c6(e,t){return aP(e,{type:"status"},t)}async function He(e,t,r){return iP(e,{type:"command",command:t},r)}async function sP(e,t,r,n){let o=t.startsWith("http://")||t.startsWith("https://"),a=o?t:rP.resolve(t);if(!o&&!of.existsSync(a))throw new Error(`Profile file not found: ${a}`);let i=r||ef();if(r){if(_o(e,i))throw new Error(`Session ${i} is already running. Stop it first or choose a different session id.`);tf(e,i)&&yn(e,i)}let l=[process.argv[1],"--daemon",a,"--session",i];n&&l.push("--symbol-server",n),nP.spawn(process.execPath,l,{detached:!0,stdio:"ignore",env:{...process.env,PROFILER_CLI_SESSION_DIR:e}}).unref();let u=10,d=0;for(;d<u&&(await new Promise(h=>setTimeout(h,50)),d++,!_o(e,i)););if(!_o(e,i))throw new Error(`Failed to start daemon: session not validated after ${u*50}ms`);let f=600;d=0;let p=!1;for(;d<f;){await new Promise(h=>setTimeout(h,100)),d++;try{let h=await c6(e,i);switch(h.type){case"ready":return i;case"loading":continue;case"symbolicating":p||(console.log("Symbolicating..."),p=!0);continue;case"error":throw new Error(h.error);default:throw new Error(`Unexpected response type: ${h.type}`)}}catch(h){if(h instanceof Error&&h.message.startsWith("Profile load failed"))throw h;continue}}throw new Error(`Profile load timeout after ${f*100}ms`)}async function wy(e,t){let r=t||pa(e);if(!r)throw new Error("No active session to stop.");try{await iP(e,{type:"shutdown"},r)}catch(n){console.error(`Note: ${n}`)}await new Promise(n=>setTimeout(n,500)),console.log(`Session ${r} stopped`)}xe();function Xt(e,t,r){let n="No thread selected";if(e.selectedThreadHandle&&e.selectedThreads.length>0)if(e.selectedThreads.length===1){let u=e.selectedThreads[0];n=`${e.selectedThreadHandle} (${u.name})`}else{let u=e.selectedThreads.map(d=>d.name).join(", ");n=`${e.selectedThreadHandle} (${u})`}let o=e.rootRange.end-e.rootRange.start,a=u=>u<1e3?`${u.toFixed(1)}ms`:`${(u/1e3).toFixed(2)}s`,i="Full profile";if(e.currentViewRange){let u=e.currentViewRange,d=u.end-u.start;i=`${u.startName}\u2192${u.endName} (${a(d)})`}let s=a(o),l=((t==null?void 0:t.length)??0)+((r==null?void 0:r.length)??0),c=l>0?` | Filters: ${l}`:"";return`[Thread: ${n} | View: ${i} | Full: ${s}${c}]`}function lP(e){let t="No thread selected";if(e.selectedThreadHandle&&e.selectedThreads.length>0)if(e.selectedThreads.length===1){let a=e.selectedThreads[0];t=`${e.selectedThreadHandle} (${a.name})`}else{let a=e.selectedThreads.map(i=>i.name).join(", ");t=`${e.selectedThreadHandle} (${a})`}let r="Full profile";e.viewRanges.length>0&&(r=e.viewRanges.map(i=>`${i.startName} to ${i.endName}`).join(" > "));let n=[];for(let a of e.filterStacks)if(a.filters.length!==0){n.push(` Filters for ${a.threadHandle}:`);for(let i of a.filters)n.push(` ${i.index}. [${i.spec.type}] ${i.description}`)}let o=n.length>0?`
695
695
  `+n.join(`
696
696
  `):`
697
697
  Filters: none`;return`Session Status:
698
698
  Selected thread: ${t}
699
- View range: ${r}${o}`}function oP(e){let t=[];if(e.message&&t.push(e.message),e.filters.length===0)t.push(`No active filters for ${e.threadHandle}`);else{t.push(`Filters for ${e.threadHandle} (applied in order):`);for(let r of e.filters)t.push(` ${r.index}. [${r.spec.type}] ${r.description}`)}return t.join(`
700
- `)}function aP(e){return`${Xt(e.context)}
699
+ View range: ${r}${o}`}function cP(e){let t=[];if(e.message&&t.push(e.message),e.filters.length===0)t.push(`No active filters for ${e.threadHandle}`);else{t.push(`Filters for ${e.threadHandle} (applied in order):`);for(let r of e.filters)t.push(` ${r.index}. [${r.spec.type}] ${r.description}`)}return t.join(`
700
+ `)}function uP(e){return`${Xt(e.context)}
701
701
 
702
702
  Function ${e.functionHandle}:
703
- ${e.fullName}`}function iP(e){let r=`${Xt(e.context)}
703
+ ${e.fullName}`}function dP(e){let r=`${Xt(e.context)}
704
704
 
705
705
  Function ${e.functionHandle}:
706
706
  Full name: ${e.fullName}
@@ -712,11 +712,11 @@ Function ${e.functionHandle}:
712
712
  Library path: ${e.library.path}`,e.library.debugName&&(r+=`
713
713
  Debug name: ${e.library.debugName}`),e.library.debugPath&&(r+=`
714
714
  Debug path: ${e.library.debugPath}`),e.library.breakpadId&&(r+=`
715
- Breakpad ID: ${e.library.breakpadId}`)),r}function sP(e){let t=e.message;return e.action==="push"&&e.duration!==void 0&&(t+=` (duration: ${Me(e.duration)})`,e.markerInfo&&(t+=`
715
+ Breakpad ID: ${e.library.breakpadId}`)),r}function fP(e){let t=e.message;return e.action==="push"&&e.duration!==void 0&&(t+=` (duration: ${Fe(e.duration)})`,e.markerInfo&&(t+=`
716
716
  Zoomed to: Marker ${e.markerInfo.markerHandle} - ${e.markerInfo.markerName}`,t+=`
717
717
  Thread: ${e.markerInfo.threadHandle} (${e.markerInfo.threadName})`),e.zoomDepth!==void 0&&(t+=`
718
718
  Zoom depth: ${e.zoomDepth}${e.zoomDepth>1?' (use "profiler-cli zoom pop" to go back)':""}`)),e.warning&&(t+=`
719
- Warning: ${e.warning}`),t}function lP(e){let t=Xt(e.context),r=e.endedAtName||"still alive at end of recording",n=`${t}
719
+ Warning: ${e.warning}`),t}function pP(e){let t=Xt(e.context),r=e.endedAtName||"still alive at end of recording",n=`${t}
720
720
 
721
721
  Name: ${e.friendlyName}
722
722
  TID: ${e.tid}
@@ -727,22 +727,22 @@ This thread contains ${e.sampleCount} samples and ${e.markerCount} markers.
727
727
 
728
728
  CPU activity over time:`;if(e.cpuActivity&&e.cpuActivity.length>0)for(let o of e.cpuActivity){let a=" ".repeat(o.depthLevel),i=Math.round(o.cpuMs/(o.endTime-o.startTime)*100);n+=`
729
729
  ${a}- ${i}% for ${o.cpuMs.toFixed(1)}ms: [${o.startTimeName} \u2192 ${o.endTimeName}] (${o.startTimeStr} - ${o.endTimeStr})`}else n+=`
730
- No significant activity.`;return n}function cP(e){let r=`${Xt(e.context)}
730
+ No significant activity.`;return n}function hP(e){let r=`${Xt(e.context)}
731
731
 
732
732
  Stack trace for marker ${e.markerHandle}: ${e.markerName}
733
733
  `;if(r+=`Thread: ${e.threadHandle} (${e.friendlyThreadName})`,!e.stack||e.stack.frames.length===0)return r+`
734
734
 
735
735
  (This marker has no stack trace)`;if(e.stack.capturedAt!==void 0){let n=e.context.rootRange.start;r+=`
736
- Captured at: ${Me(e.stack.capturedAt-n)}
736
+ Captured at: ${Fe(e.stack.capturedAt-n)}
737
737
  `}for(let n=0;n<e.stack.frames.length;n++){let o=e.stack.frames[n];r+=`
738
738
  [${n+1}] ${o.nameWithLibrary}`}return e.stack.truncated&&(r+=`
739
- ... (truncated)`),r}function uP(e){var a;let r=`${Xt(e.context)}
739
+ ... (truncated)`),r}function mP(e){var a;let r=`${Xt(e.context)}
740
740
 
741
741
  Marker ${e.markerHandle}: ${e.name}`;e.tooltipLabel&&(r+=` - ${e.tooltipLabel}`),r+=`
742
742
 
743
743
  `,r+=`Type: ${e.markerType??"None"}
744
744
  `,r+=`Category: ${e.category.name}
745
- `;let n=e.context.rootRange.start,o=Me(e.start-n);if(e.end!==null){let i=Me(e.end-n),s=Me(e.duration);r+=`Time: ${o} - ${i} (${s})
745
+ `;let n=e.context.rootRange.start,o=Fe(e.start-n);if(e.end!==null){let i=Fe(e.end-n),s=Fe(e.duration);r+=`Time: ${o} - ${i} (${s})
746
746
  `}else r+=`Time: ${o} (instant)
747
747
  `;if(r+=`Thread: ${e.threadHandle} (${e.friendlyThreadName})
748
748
  `,e.fields&&e.fields.length>0){r+=`
@@ -753,11 +753,11 @@ Description:
753
753
  `,r+=` ${e.schema.description}
754
754
  `),e.stack&&e.stack.frames.length>0){r+=`
755
755
  Stack trace:
756
- `,e.stack.capturedAt!==void 0&&(r+=` Captured at: ${Me(e.stack.capturedAt-n)}
756
+ `,e.stack.capturedAt!==void 0&&(r+=` Captured at: ${Fe(e.stack.capturedAt-n)}
757
757
  `);for(let i=0;i<e.stack.frames.length;i++){let s=e.stack.frames[i];r+=` [${i+1}] ${s.nameWithLibrary}
758
758
  `}e.stack.truncated&&(r+=`
759
759
  Use 'profiler-cli marker stack ${e.markerHandle}' for the full stack trace.
760
- `)}return r}function dP(e){let r=`${Xt(e.context)}
760
+ `)}return r}function gP(e){let r=`${Xt(e.context)}
761
761
 
762
762
  Name: ${e.name}
763
763
  `;if(r+=`Platform: ${e.platform}
@@ -774,12 +774,12 @@ ${n}
774
774
  CPU activity over time:
775
775
  `,e.cpuActivity&&e.cpuActivity.length>0)for(let o of e.cpuActivity){let a=" ".repeat(o.depthLevel),i=Math.round(o.cpuMs/(o.endTime-o.startTime)*100);r+=`${a}- ${i}% for ${o.cpuMs.toFixed(1)}ms: [${o.startTimeName} \u2192 ${o.endTimeName}] (${o.startTimeStr} - ${o.endTimeStr})
776
776
  `}else r+=`No significant activity.
777
- `;return r}function fP(e,t,r,n,o,a){let i=e.totalPercentage.toFixed(1),s=e.selfPercentage.toFixed(1),l=gn(e.nameWithLibrary,120),c;r?c=t+(n?"\u2514\u2500 ":"\u251C\u2500 "):c=t;let u=e.functionHandle?`${e.functionHandle}. `:"";a.push(`${c}${u}${l} [total: ${i}%, self: ${s}%]`);let d=e.children&&e.children.length>0,f=e.childrenTruncated;if(d||f){let p;if(r?p=t+(n?" ":"\u2502 "):p=t,d){let h=e.children.length>1||!!f;for(let y=0;y<e.children.length;y++){let b=e.children[y],m=y===e.children.length-1&&!f;fP(b,p,h||o===0,m,o+1,a)}}if(f){let h=p+"\u2514\u2500 ",y=e.childrenTruncated,b=y.combinedPercentage.toFixed(1),m=y.maxPercentage.toFixed(1);a.push(`${h}... (${y.count} more children: combined ${b}%, max ${m}%)`)}}}function pP(e,t,r){let n=[`${t} Call Tree:`];if(e.children&&e.children.length>0)for(let o=0;o<e.children.length;o++){let a=e.children[o],i=o===e.children.length-1;fP(a,"",!1,i,0,n)}else r&&n.push(r);return n.join(`
778
- `)}function hP(e){var l,c;let t=Xt(e.context,e.activeFilters,e.ephemeralFilters),r=e.activeOnly?`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
777
+ `;return r}function yP(e,t,r,n,o,a){let i=e.totalPercentage.toFixed(1),s=e.selfPercentage.toFixed(1),l=gn(e.nameWithLibrary,120),c;r?c=t+(n?"\u2514\u2500 ":"\u251C\u2500 "):c=t;let u=e.functionHandle?`${e.functionHandle}. `:"";a.push(`${c}${u}${l} [total: ${i}%, self: ${s}%]`);let d=e.children&&e.children.length>0,f=e.childrenTruncated;if(d||f){let p;if(r?p=t+(n?" ":"\u2502 "):p=t,d){let h=e.children.length>1||!!f;for(let y=0;y<e.children.length;y++){let b=e.children[y],g=y===e.children.length-1&&!f;yP(b,p,h||o===0,g,o+1,a)}}if(f){let h=p+"\u2514\u2500 ",y=e.childrenTruncated,b=y.combinedPercentage.toFixed(1),g=y.maxPercentage.toFixed(1);a.push(`${h}... (${y.count} more children: combined ${b}%, max ${g}%)`)}}}function bP(e,t,r){let n=[`${t} Call Tree:`];if(e.children&&e.children.length>0)for(let o=0;o<e.children.length;o++){let a=e.children[o],i=o===e.children.length-1;yP(a,"",!1,i,0,n)}else r&&n.push(r);return n.join(`
778
+ `)}function TP(e){var l,c;let t=Xt(e.context,e.activeFilters,e.ephemeralFilters),r=e.activeOnly?`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
779
779
 
780
780
  `:"",n=e.search?`Search: "${e.search}"
781
781
 
782
- `:"",o=[...((l=e.activeFilters)==null?void 0:l.map(u=>`[${u.index}] ${u.description}`))??[],...((c=e.ephemeralFilters)==null?void 0:c.map(u=>`[~] ${Pi(u)}`))??[]],a=o.length>0?`Filters: ${o.join(", ")}
782
+ `:"",o=[...((l=e.activeFilters)==null?void 0:l.map(u=>`[${u.index}] ${u.description}`))??[],...((c=e.ephemeralFilters)==null?void 0:c.map(u=>`[~] ${Mi(u)}`))??[]],a=o.length>0?`Filters: ${o.join(", ")}
783
783
 
784
784
  `:"",i=`${t}
785
785
 
@@ -802,14 +802,14 @@ Tip: --search keeps samples with a matching frame anywhere in the stack.
802
802
  `;let s=e.heaviestStack;if(i+=`Heaviest stack (${s.selfSamples.toFixed(1)} samples, ${s.frameCount} frames):
803
803
  `,s.frames.length===0)i+=` (empty)
804
804
  `;else if(s.frameCount<=200)for(let u=0;u<s.frames.length;u++){let d=s.frames[u],f=gn(d.nameWithLibrary,120),p=Math.round(d.totalSamples),h=d.totalPercentage.toFixed(1),y=Math.round(d.selfSamples),b=d.selfPercentage.toFixed(1);i+=` ${u+1}. ${f} - total: ${p} (${h}%), self: ${y} (${b}%)
805
- `}else{for(let d=0;d<100;d++){let f=s.frames[d],p=gn(f.nameWithLibrary,120),h=Math.round(f.totalSamples),y=f.totalPercentage.toFixed(1),b=Math.round(f.selfSamples),m=f.selfPercentage.toFixed(1);i+=` ${d+1}. ${p} - total: ${h} (${y}%), self: ${b} (${m}%)
805
+ `}else{for(let d=0;d<100;d++){let f=s.frames[d],p=gn(f.nameWithLibrary,120),h=Math.round(f.totalSamples),y=f.totalPercentage.toFixed(1),b=Math.round(f.selfSamples),g=f.selfPercentage.toFixed(1);i+=` ${d+1}. ${p} - total: ${h} (${y}%), self: ${b} (${g}%)
806
806
  `}let u=s.frameCount-200;i+=` ... (${u} frames skipped)
807
- `;for(let d=s.frameCount-100;d<s.frameCount;d++){let f=s.frames[d],p=gn(f.nameWithLibrary,120),h=Math.round(f.totalSamples),y=f.totalPercentage.toFixed(1),b=Math.round(f.selfSamples),m=f.selfPercentage.toFixed(1);i+=` ${d+1}. ${p} - total: ${h} (${y}%), self: ${b} (${m}%)
808
- `}}return i}function mP(e){var l,c;let t=Xt(e.context,e.activeFilters,e.ephemeralFilters),r=e.activeOnly?`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
807
+ `;for(let d=s.frameCount-100;d<s.frameCount;d++){let f=s.frames[d],p=gn(f.nameWithLibrary,120),h=Math.round(f.totalSamples),y=f.totalPercentage.toFixed(1),b=Math.round(f.selfSamples),g=f.selfPercentage.toFixed(1);i+=` ${d+1}. ${p} - total: ${h} (${y}%), self: ${b} (${g}%)
808
+ `}}return i}function SP(e){var l,c;let t=Xt(e.context,e.activeFilters,e.ephemeralFilters),r=e.activeOnly?`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
809
809
 
810
810
  `:"",n=e.search?`Search: "${e.search}"
811
811
 
812
- `:"",o=[...((l=e.activeFilters)==null?void 0:l.map(u=>`[${u.index}] ${u.description}`))??[],...((c=e.ephemeralFilters)==null?void 0:c.map(u=>`[~] ${Pi(u)}`))??[]],a=o.length>0?`Filters: ${o.join(", ")}
812
+ `:"",o=[...((l=e.activeFilters)==null?void 0:l.map(u=>`[${u.index}] ${u.description}`))??[],...((c=e.ephemeralFilters)==null?void 0:c.map(u=>`[~] ${Mi(u)}`))??[]],a=o.length>0?`Filters: ${o.join(", ")}
813
813
 
814
814
  `:"",i=`${t}
815
815
 
@@ -817,11 +817,11 @@ Thread: ${e.friendlyThreadName}
817
817
 
818
818
  ${r}${n}${a}`,s=e.search?`No samples matched --search "${e.search}".
819
819
  Tip: use comma to require multiple terms (all must appear), e.g. --search "foo,bar".
820
- "|" is treated as a literal character, not OR.`:void 0;return i+=pP(e.regularCallTree,"Top-Down",s),i}function gP(e){var s,l;let t=Xt(e.context,e.activeFilters,e.ephemeralFilters),r=e.activeOnly?`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
820
+ "|" is treated as a literal character, not OR.`:void 0;return i+=bP(e.regularCallTree,"Top-Down",s),i}function xP(e){var s,l;let t=Xt(e.context,e.activeFilters,e.ephemeralFilters),r=e.activeOnly?`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
821
821
 
822
822
  `:"",n=e.search?`Search: "${e.search}"
823
823
 
824
- `:"",o=[...((s=e.activeFilters)==null?void 0:s.map(c=>`[${c.index}] ${c.description}`))??[],...((l=e.ephemeralFilters)==null?void 0:l.map(c=>`[~] ${Pi(c)}`))??[]],a=o.length>0?`Filters: ${o.join(", ")}
824
+ `:"",o=[...((s=e.activeFilters)==null?void 0:s.map(c=>`[${c.index}] ${c.description}`))??[],...((l=e.ephemeralFilters)==null?void 0:l.map(c=>`[~] ${Mi(c)}`))??[]],a=o.length>0?`Filters: ${o.join(", ")}
825
825
 
826
826
  `:"",i=`${t}
827
827
 
@@ -829,27 +829,27 @@ Thread: ${e.friendlyThreadName}
829
829
 
830
830
  ${r}${n}${a}`;if(e.invertedCallTree){let c=e.search?`No samples matched --search "${e.search}".
831
831
  Tip: use comma to require multiple terms (all must appear), e.g. --search "foo,bar".
832
- "|" is treated as a literal character, not OR.`:void 0;i+=pP(e.invertedCallTree,"Bottom-Up",c)}else i+=`Bottom-Up Call Tree:
833
- (unable to create bottom-up tree)`;return i}function yP(e){let r=[Xt(e.context),""],n=e.filters!==void 0,o=n&&e.filteredMarkerCount!==e.totalMarkerCount?` (filtered from ${e.totalMarkerCount})`:"";if(r.push(`Markers in thread ${e.threadHandle} (${e.friendlyThreadName}) \u2014 ${e.filteredMarkerCount} markers${o}`),r.push(`Legend: \u2713 = has stack trace, \u2717 = no stack trace
832
+ "|" is treated as a literal character, not OR.`:void 0;i+=bP(e.invertedCallTree,"Bottom-Up",c)}else i+=`Bottom-Up Call Tree:
833
+ (unable to create bottom-up tree)`;return i}function IP(e){let r=[Xt(e.context),""],n=e.filters!==void 0,o=n&&e.filteredMarkerCount!==e.totalMarkerCount?` (filtered from ${e.totalMarkerCount})`:"";if(r.push(`Markers in thread ${e.threadHandle} (${e.friendlyThreadName}) \u2014 ${e.filteredMarkerCount} markers${o}`),r.push(`Legend: \u2713 = has stack trace, \u2717 = no stack trace
834
834
  `),e.filteredMarkerCount===0)return n?r.push("No markers match the specified filters."):r.push("No markers in this thread."),r.join(`
835
- `);if(e.flatMarkers){let a=e.context.rootRange.start;for(let i of e.flatMarkers){let s=i.hasStack?"\u2713":"\u2717",l=`t=${Me(i.start-a)}`,c=i.duration!==void 0?Me(i.duration):"instant",u=i.label!==i.name?` ${i.label}`:"";r.push(` ${i.handle.padEnd(8)} ${i.name.padEnd(30)} ${l.padEnd(14)} ${c.padEnd(10)} ${s}${u}`)}return r.join(`
836
- `)}if(e.customGroups&&e.customGroups.length>0)Iy(r,e.customGroups,0);else{r.push("By Name (top 15):");let a=e.byType.slice(0,15);for(let s of a){let l=` ${s.markerName.padEnd(25)} ${s.count.toString().padStart(5)} markers`;if(s.durationStats){let{min:c,avg:u,max:d}=s.durationStats;l+=` (interval: min=${Me(c)}, avg=${Me(u)}, max=${Me(d)})`}else l+=" (instant)";if(r.push(l),!s.subGroups&&s.topMarkers.length>0){let c=s.topMarkers.slice(0,3).map(u=>{let d=u.hasStack?"\u2713":"\u2717",f=`${u.handle} ${d}`;return u.duration!==void 0?`${f} (${Me(u.duration)})`:f}).join(", ");r.push(` Examples: ${c}`)}s.subGroups&&s.subGroups.length>0&&(s.subGroupKey&&r.push(` Grouped by ${s.subGroupKey}:`),Iy(r,s.subGroups,2))}e.byType.length>15&&r.push(` ... (${e.byType.length-15} more marker names)`),r.push(""),r.push("By Category:");for(let s of e.byCategory)r.push(` ${s.categoryName.padEnd(25)} ${s.count.toString().padStart(5)} markers (${s.percentage.toFixed(1)}%)`);r.push(""),r.push("Frequency Analysis:");let i=e.byType.filter(s=>s.rateStats&&s.rateStats.markersPerSecond>0).slice(0,5);for(let s of i){if(!s.rateStats)continue;let{markersPerSecond:l,minGap:c,avgGap:u,maxGap:d}=s.rateStats;r.push(` ${s.markerName}: ${l.toFixed(1)} markers/sec (interval: min=${Me(c)}, avg=${Me(u)}, max=${Me(d)})`)}r.push("")}return r.push("Use --search <term>, --category <name>, --min-duration <ms>, --max-duration <ms>, --has-stack, --limit <N>, --group-by <keys>, --auto-group, or --top-n <N> to filter/group markers, or m-<N> handles to inspect individual markers or zoom into their time range (profiler-cli zoom push m-<N>)."),r.join(`
837
- `)}function Iy(e,t,r){for(let n of t){let o=" ".repeat(r),a=`${o}${n.groupName}: ${n.count} markers`;if(n.durationStats){let{avg:i,max:s}=n.durationStats;a+=` (avg=${Me(i)}, max=${Me(s)})`}if(e.push(a),!n.subGroups&&n.topMarkers.length>0){let i=n.topMarkers.slice(0,3).map(s=>{let l=s.hasStack?"\u2713":"\u2717",c=`${s.handle} ${l}`;return s.duration!==void 0?`${c} (${Me(s.duration)})`:c}).join(", ");e.push(`${o} Examples: ${i}`)}n.subGroups&&n.subGroups.length>0&&Iy(e,n.subGroups,r+1)}}function Me(e){return e<1?`${(e*1e3).toFixed(0)}\xB5s`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}function bP(e){var i;let r=[Xt(e.context,e.activeFilters,e.ephemeralFilters),""],n=e.filters!==void 0,o=n&&e.filteredFunctionCount!==e.totalFunctionCount?` (filtered from ${e.totalFunctionCount})`:"";if(r.push(`Functions in thread ${e.threadHandle} (${e.friendlyThreadName}) \u2014 ${e.filteredFunctionCount} functions${o}
835
+ `);if(e.flatMarkers){let a=e.context.rootRange.start;for(let i of e.flatMarkers){let s=i.hasStack?"\u2713":"\u2717",l=`t=${Fe(i.start-a)}`,c=i.duration!==void 0?Fe(i.duration):"instant",u=i.label!==i.name?` ${i.label}`:"";r.push(` ${i.handle.padEnd(8)} ${i.name.padEnd(30)} ${l.padEnd(14)} ${c.padEnd(10)} ${s}${u}`)}return r.join(`
836
+ `)}if(e.customGroups&&e.customGroups.length>0)ky(r,e.customGroups,0);else{r.push("By Name (top 15):");let a=e.byType.slice(0,15);for(let s of a){let l=` ${s.markerName.padEnd(25)} ${s.count.toString().padStart(5)} markers`;if(s.durationStats){let{min:c,avg:u,max:d}=s.durationStats;l+=` (interval: min=${Fe(c)}, avg=${Fe(u)}, max=${Fe(d)})`}else l+=" (instant)";if(r.push(l),!s.subGroups&&s.topMarkers.length>0){let c=s.topMarkers.slice(0,3).map(u=>{let d=u.hasStack?"\u2713":"\u2717",f=`${u.handle} ${d}`;return u.duration!==void 0?`${f} (${Fe(u.duration)})`:f}).join(", ");r.push(` Examples: ${c}`)}s.subGroups&&s.subGroups.length>0&&(s.subGroupKey&&r.push(` Grouped by ${s.subGroupKey}:`),ky(r,s.subGroups,2))}e.byType.length>15&&r.push(` ... (${e.byType.length-15} more marker names)`),r.push(""),r.push("By Category:");for(let s of e.byCategory)r.push(` ${s.categoryName.padEnd(25)} ${s.count.toString().padStart(5)} markers (${s.percentage.toFixed(1)}%)`);r.push(""),r.push("Frequency Analysis:");let i=e.byType.filter(s=>s.rateStats&&s.rateStats.markersPerSecond>0).slice(0,5);for(let s of i){if(!s.rateStats)continue;let{markersPerSecond:l,minGap:c,avgGap:u,maxGap:d}=s.rateStats;r.push(` ${s.markerName}: ${l.toFixed(1)} markers/sec (interval: min=${Fe(c)}, avg=${Fe(u)}, max=${Fe(d)})`)}r.push("")}return r.push("Use --search <term>, --category <name>, --min-duration <ms>, --max-duration <ms>, --has-stack, --limit <N>, --group-by <keys>, --auto-group, or --top-n <N> to filter/group markers, or m-<N> handles to inspect individual markers or zoom into their time range (profiler-cli zoom push m-<N>)."),r.join(`
837
+ `)}function ky(e,t,r){for(let n of t){let o=" ".repeat(r),a=`${o}${n.groupName}: ${n.count} markers`;if(n.durationStats){let{avg:i,max:s}=n.durationStats;a+=` (avg=${Fe(i)}, max=${Fe(s)})`}if(e.push(a),!n.subGroups&&n.topMarkers.length>0){let i=n.topMarkers.slice(0,3).map(s=>{let l=s.hasStack?"\u2713":"\u2717",c=`${s.handle} ${l}`;return s.duration!==void 0?`${c} (${Fe(s.duration)})`:c}).join(", ");e.push(`${o} Examples: ${i}`)}n.subGroups&&n.subGroups.length>0&&ky(e,n.subGroups,r+1)}}function Fe(e){return e<1?`${(e*1e3).toFixed(0)}\xB5s`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}function vP(e){var i;let r=[Xt(e.context,e.activeFilters,e.ephemeralFilters),""],n=e.filters!==void 0,o=n&&e.filteredFunctionCount!==e.totalFunctionCount?` (filtered from ${e.totalFunctionCount})`:"";if(r.push(`Functions in thread ${e.threadHandle} (${e.friendlyThreadName}) \u2014 ${e.filteredFunctionCount} functions${o}
838
838
  `),e.activeOnly&&r.push(`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
839
839
  `),e.filteredFunctionCount===0)return n?(r.push("No functions match the specified filters."),(i=e.filters)!=null&&i.searchString&&r.push("Tip: --search matches as a substring of the full function name (including library prefix).")):r.push("No functions in this thread."),r.join(`
840
- `);let a=[];if(n&&e.filters&&(e.filters.searchString&&a.push(`search: "${e.filters.searchString}"`),e.filters.minSelf!==void 0&&a.push(`min-self: ${e.filters.minSelf}%`),e.filters.limit!==void 0&&a.push(`limit: ${e.filters.limit}`)),e.activeFilters)for(let s of e.activeFilters)a.push(`[${s.index}] ${s.description}`);if(e.ephemeralFilters)for(let s of e.ephemeralFilters)a.push(`[~] ${Pi(s)}`);a.length>0&&r.push(`Filters: ${a.join(", ")}
840
+ `);let a=[];if(n&&e.filters&&(e.filters.searchString&&a.push(`search: "${e.filters.searchString}"`),e.filters.minSelf!==void 0&&a.push(`min-self: ${e.filters.minSelf}%`),e.filters.limit!==void 0&&a.push(`limit: ${e.filters.limit}`)),e.activeFilters)for(let s of e.activeFilters)a.push(`[${s.index}] ${s.description}`);if(e.ephemeralFilters)for(let s of e.ephemeralFilters)a.push(`[~] ${Mi(s)}`);a.length>0&&r.push(`Filters: ${a.join(", ")}
841
841
  `),r.push("Functions (by self time):");for(let s of e.functions){let l=Math.round(s.selfSamples),c=Math.round(s.totalSamples),u=gn(s.nameWithLibrary,120),d,f;s.fullSelfPercentage!==void 0&&s.fullTotalPercentage!==void 0?(d=`${s.selfPercentage.toFixed(1)}% of view, ${s.fullSelfPercentage.toFixed(1)}% of full`,f=`${s.totalPercentage.toFixed(1)}% of view, ${s.fullTotalPercentage.toFixed(1)}% of full`):(d=`${s.selfPercentage.toFixed(1)}%`,f=`${s.totalPercentage.toFixed(1)}%`),r.push(` ${s.functionHandle}. ${u} - self: ${l} (${d}), total: ${c} (${f})`)}if(e.filteredFunctionCount>e.functions.length){let s=e.filteredFunctionCount-e.functions.length;r.push(`
842
842
  ... (${s} more functions omitted)`)}return r.push(""),r.push("Use --search <term>, --min-self <percent>, or --limit <N> to filter functions, or f-<N> handles to inspect individual functions."),r.join(`
843
- `)}function a6(e){let t=[];return e.dns!==void 0&&t.push(`DNS=${Me(e.dns)}`),e.tcp!==void 0&&t.push(`TCP=${Me(e.tcp)}`),e.tls!==void 0&&t.push(`TLS=${Me(e.tls)}`),e.ttfb!==void 0&&t.push(`TTFB=${Me(e.ttfb)}`),e.download!==void 0&&t.push(`DL=${Me(e.download)}`),e.mainThread!==void 0&&t.push(`wait=${Me(e.mainThread)}`),t.join(" ")}function TP(e){let t=[Xt(e.context),""],r=e.filters!==void 0&&e.filteredRequestCount!==e.totalRequestCount?` (filtered from ${e.totalRequestCount})`:"",n=e.requests.length<e.filteredRequestCount,o=n?`${e.requests.length} of ${e.filteredRequestCount} requests`:`${e.filteredRequestCount} requests`;t.push(`Network requests in thread ${e.threadHandle} (${e.friendlyThreadName}) \u2014 ${o}${r}`),t.push("");let a=e.summary;t.push("Summary:"),t.push(` Cache: ${a.cacheHit} hit, ${a.cacheMiss} miss, ${a.cacheUnknown} unknown`);let i=a.phaseTotals;if((i.dns!==void 0||i.tcp!==void 0||i.tls!==void 0||i.ttfb!==void 0||i.download!==void 0||i.mainThread!==void 0)&&(t.push(" Phase totals:"),i.dns!==void 0&&t.push(` DNS: ${Me(i.dns)}`),i.tcp!==void 0&&t.push(` TCP connect: ${Me(i.tcp)}`),i.tls!==void 0&&t.push(` TLS: ${Me(i.tls)}`),i.ttfb!==void 0&&t.push(` TTFB: ${Me(i.ttfb)}`),i.download!==void 0&&t.push(` Download: ${Me(i.download)}`),i.mainThread!==void 0&&t.push(` Main thread wait: ${Me(i.mainThread)}`)),t.push(""),e.requests.length===0)return t.push("No network requests match the specified filters."),t.join(`
844
- `);for(let l of e.requests){let c=l.url.length>100?l.url.slice(0,97)+"...":l.url,u=l.httpStatus!==void 0?String(l.httpStatus):"???",d=l.httpVersion!==void 0?` ${l.httpVersion}`:"",f=l.cacheStatus!==void 0?` cache=${l.cacheStatus}`:"",p=l.transferSizeKB!==void 0?` size=${l.transferSizeKB.toFixed(1)}KB`:"";t.push(` ${c}`),t.push(` ${u}${d}${f}${p} duration=${Me(l.duration)}`);let h=a6(l.phases);h&&t.push(` Phases: ${h}`),t.push("")}return n?t.push("Use --limit 0 to show all requests, or --limit <N> to set a different limit."):t.push("Use --search <term>, --min-duration <ms>, --max-duration <ms>, or --limit <N> to filter."),t.join(`
845
- `)}function SP(e){let t=Xt(e.context),r=[],n="\u2500".repeat(80);r.push(t,""),r.push(`Function ${e.functionHandle}: ${e.name}`),r.push(`Thread: ${e.friendlyThreadName} (${e.threadHandle})`,""),r.push(`Self time: ${Math.round(e.totalSelfSamples)} samples, Total time: ${Math.round(e.totalTotalSamples)} samples`),r.push(`Mode: ${e.mode}`);for(let a of e.warnings)r.push("",`Warning: ${a}`);let o=e.srcAnnotation;if(o){let a=o.totalFileLines!==null?` (${o.totalFileLines} lines)`:"";r.push("",`Source file: ${o.filename}${a}`),r.push(` ${Math.round(o.samplesWithLineInfo)} of ${Math.round(o.samplesWithFunction)} samples have line number information`),r.push(` Showing: ${o.contextMode}`,"");let i=5,s=6,l=7;r.push(`${"Line".padStart(i)} ${"Self".padStart(s)} ${"Total".padStart(l)} Source`),r.push(n);let c=o.contextMode!=="full file",u=null;for(let d of o.lines){c&&u!==null&&d.lineNumber>u+1&&r.push(" ".repeat(i+2)+"..."),u=d.lineNumber;let f=d.selfSamples>0?String(Math.round(d.selfSamples)).padStart(s):" ".repeat(s),p=d.totalSamples>0?String(Math.round(d.totalSamples)).padStart(l):" ".repeat(l),h=d.sourceText!==null?` ${d.sourceText}`:"";r.push(`${String(d.lineNumber).padStart(i)} ${f} ${p}${h}`)}}for(let a of e.asmAnnotations){if(r.push("",`Compilation ${a.compilationIndex}:`),r.push(` Name: ${a.symbolName}`),r.push(` Address: 0x${a.symbolAddress.toString(16)}`),a.functionSize!==null&&r.push(` Function size: ${a.functionSize} bytes`),r.push(` Native symbols: ${a.nativeSymbolCount}`),a.fetchError!==null){r.push(` (Assembly unavailable: ${a.fetchError})`);continue}r.push(""),r.push(` ${"Address".padEnd(18)}${"Self".padStart(6)} ${"Total".padStart(7)} Instruction`),r.push(" "+"\u2500".repeat(70));for(let i of a.instructions){let s=`0x${i.address.toString(16)}`.padEnd(18),l=i.selfSamples>0?String(Math.round(i.selfSamples)).padStart(6):" ".repeat(6),c=i.totalSamples>0?String(Math.round(i.totalSamples)).padStart(7):" ".repeat(7);r.push(` ${s}${l} ${c} ${i.decodedString}`)}}return e.srcAnnotation&&e.srcAnnotation.contextMode!=="full file"&&r.push("","Tip: use --context file to show the full source file, or --context <N> for more context lines."),r.join(`
846
- `)}function xP(e){let t=[Xt(e.context),""],{filters:r}=e,n=r!==void 0&&(r.thread!==void 0||r.module!==void 0||r.level!==void 0||r.search!==void 0||r.limit!==void 0),o=e.entries.length,a=e.totalCount;if(a===0)return t.push(n?"No log entries match the specified filters.":"No Log markers found in this profile."),t.join(`
843
+ `)}function u6(e){let t=[];return e.dns!==void 0&&t.push(`DNS=${Fe(e.dns)}`),e.tcp!==void 0&&t.push(`TCP=${Fe(e.tcp)}`),e.tls!==void 0&&t.push(`TLS=${Fe(e.tls)}`),e.ttfb!==void 0&&t.push(`TTFB=${Fe(e.ttfb)}`),e.download!==void 0&&t.push(`DL=${Fe(e.download)}`),e.mainThread!==void 0&&t.push(`wait=${Fe(e.mainThread)}`),t.join(" ")}function wP(e){let t=[Xt(e.context),""],r=e.filters!==void 0&&e.filteredRequestCount!==e.totalRequestCount?` (filtered from ${e.totalRequestCount})`:"",n=e.requests.length<e.filteredRequestCount,o=n?`${e.requests.length} of ${e.filteredRequestCount} requests`:`${e.filteredRequestCount} requests`;t.push(`Network requests in thread ${e.threadHandle} (${e.friendlyThreadName}) \u2014 ${o}${r}`),t.push("");let a=e.summary;t.push("Summary:"),t.push(` Cache: ${a.cacheHit} hit, ${a.cacheMiss} miss, ${a.cacheUnknown} unknown`);let i=a.phaseTotals;if((i.dns!==void 0||i.tcp!==void 0||i.tls!==void 0||i.ttfb!==void 0||i.download!==void 0||i.mainThread!==void 0)&&(t.push(" Phase totals:"),i.dns!==void 0&&t.push(` DNS: ${Fe(i.dns)}`),i.tcp!==void 0&&t.push(` TCP connect: ${Fe(i.tcp)}`),i.tls!==void 0&&t.push(` TLS: ${Fe(i.tls)}`),i.ttfb!==void 0&&t.push(` TTFB: ${Fe(i.ttfb)}`),i.download!==void 0&&t.push(` Download: ${Fe(i.download)}`),i.mainThread!==void 0&&t.push(` Main thread wait: ${Fe(i.mainThread)}`)),t.push(""),e.requests.length===0)return t.push("No network requests match the specified filters."),t.join(`
844
+ `);for(let l of e.requests){let c=l.url.length>100?l.url.slice(0,97)+"...":l.url,u=l.httpStatus!==void 0?String(l.httpStatus):"???",d=l.httpVersion!==void 0?` ${l.httpVersion}`:"",f=l.cacheStatus!==void 0?` cache=${l.cacheStatus}`:"",p=l.transferSizeKB!==void 0?` size=${l.transferSizeKB.toFixed(1)}KB`:"";t.push(` ${c}`),t.push(` ${u}${d}${f}${p} duration=${Fe(l.duration)}`);let h=u6(l.phases);h&&t.push(` Phases: ${h}`),t.push("")}return n?t.push("Use --limit 0 to show all requests, or --limit <N> to set a different limit."):t.push("Use --search <term>, --min-duration <ms>, --max-duration <ms>, or --limit <N> to filter."),t.join(`
845
+ `)}function kP(e){let t=Xt(e.context),r=[],n="\u2500".repeat(80);r.push(t,""),r.push(`Function ${e.functionHandle}: ${e.name}`),r.push(`Thread: ${e.friendlyThreadName} (${e.threadHandle})`,""),r.push(`Self time: ${Math.round(e.totalSelfSamples)} samples, Total time: ${Math.round(e.totalTotalSamples)} samples`),r.push(`Mode: ${e.mode}`);for(let a of e.warnings)r.push("",`Warning: ${a}`);let o=e.srcAnnotation;if(o){let a=o.totalFileLines!==null?` (${o.totalFileLines} lines)`:"";r.push("",`Source file: ${o.filename}${a}`),r.push(` ${Math.round(o.samplesWithLineInfo)} of ${Math.round(o.samplesWithFunction)} samples have line number information`),r.push(` Showing: ${o.contextMode}`,"");let i=5,s=6,l=7;r.push(`${"Line".padStart(i)} ${"Self".padStart(s)} ${"Total".padStart(l)} Source`),r.push(n);let c=o.contextMode!=="full file",u=null;for(let d of o.lines){c&&u!==null&&d.lineNumber>u+1&&r.push(" ".repeat(i+2)+"..."),u=d.lineNumber;let f=d.selfSamples>0?String(Math.round(d.selfSamples)).padStart(s):" ".repeat(s),p=d.totalSamples>0?String(Math.round(d.totalSamples)).padStart(l):" ".repeat(l),h=d.sourceText!==null?` ${d.sourceText}`:"";r.push(`${String(d.lineNumber).padStart(i)} ${f} ${p}${h}`)}}for(let a of e.asmAnnotations){if(r.push("",`Compilation ${a.compilationIndex}:`),r.push(` Name: ${a.symbolName}`),r.push(` Address: 0x${a.symbolAddress.toString(16)}`),a.functionSize!==null&&r.push(` Function size: ${a.functionSize} bytes`),r.push(` Native symbols: ${a.nativeSymbolCount}`),a.fetchError!==null){r.push(` (Assembly unavailable: ${a.fetchError})`);continue}r.push(""),r.push(` ${"Address".padEnd(18)}${"Self".padStart(6)} ${"Total".padStart(7)} Instruction`),r.push(" "+"\u2500".repeat(70));for(let i of a.instructions){let s=`0x${i.address.toString(16)}`.padEnd(18),l=i.selfSamples>0?String(Math.round(i.selfSamples)).padStart(6):" ".repeat(6),c=i.totalSamples>0?String(Math.round(i.totalSamples)).padStart(7):" ".repeat(7);r.push(` ${s}${l} ${c} ${i.decodedString}`)}}return e.srcAnnotation&&e.srcAnnotation.contextMode!=="full file"&&r.push("","Tip: use --context file to show the full source file, or --context <N> for more context lines."),r.join(`
846
+ `)}function _P(e){let t=[Xt(e.context),""],{filters:r}=e,n=r!==void 0&&(r.thread!==void 0||r.module!==void 0||r.level!==void 0||r.search!==void 0||r.limit!==void 0),o=e.entries.length,a=e.totalCount;if(a===0)return t.push(n?"No log entries match the specified filters.":"No Log markers found in this profile."),t.join(`
847
847
  `);n&&o<a?t.push(`Showing ${o} of ${a} log entries (filtered/limited)`):n?t.push(`${a} log entries (filtered)`):t.push(`${a} log entries`),t.push("");for(let i of e.entries)t.push(i);return t.join(`
848
- `)}function IP(e){let t=[Xt(e.context),""];if(e.navigationTotal===0)return t.push("No page load markers found in this thread.","Try a different thread or check that the profile includes a web page load."),t.join(`
849
- `);let r=e.navigationTotal>1?` [Navigation ${e.navigationIndex} of ${e.navigationTotal}]`:"";t.push(`Page Load Summary \u2014 ${e.friendlyThreadName} (${e.threadHandle})${r}`),t.push(""),e.url&&(t.push(` URL: ${e.url}`),t.push("")),t.push("\u2500\u2500\u2500\u2500 Navigation Timing \u2500\u2500\u2500\u2500"),t.push("");let n=e.milestones;if(n.length===0)t.push(" No navigation timing data available.");else{let a=n.filter(h=>h.name!=="TTFI"),i=a.length>0?Math.max(...a.map(h=>h.timeMs)):n[n.length-1].timeMs,s=Math.max(...n.map(h=>h.name.length)),l=Math.max(s,3),c=Math.max(...n.map(h=>h.markerHandle.length)),u=l+1+c+2,d="0ms",f=`${Math.round(i)}ms`,p=60-d.length-f.length;t.push(` ${" ".repeat(u)}${d}${" ".repeat(Math.max(0,p))}${f}`),t.push(` ${" ".repeat(u)}${"\u2500".repeat(60)}`);for(let h of n){let y=h.name.padStart(l),b=h.markerHandle.padEnd(c),m;if(h.timeMs>i)m="\u2500".repeat(60)+"\u25B6";else{let g=i>0?Math.round(h.timeMs/i*60):60,T=Math.min(g,59);m="\u2500".repeat(Math.max(0,T))+"\u2502"}t.push(` ${y} ${b} ${m} ${Math.round(h.timeMs)}ms`)}}if(t.push(""),t.push(`\u2500\u2500\u2500\u2500 Resources (${e.resourceCount} requests) \u2500\u2500\u2500\u2500`),t.push(""),e.resourceCount===0)t.push(" No network requests recorded during page load.");else{if(e.resourceAvgMs!==null&&t.push(` Avg duration: ${Me(e.resourceAvgMs)}`),e.resourceMaxMs!==null&&t.push(` Max duration: ${Me(e.resourceMaxMs)}`),t.push(""),e.resourcesByType.length>0){t.push(" By type:");for(let o of e.resourcesByType){let a=String(o.count).padStart(4),i=o.percentage.toFixed(1).padStart(5);t.push(` ${o.type.padEnd(8)} ${a} (${i}%)`)}t.push("")}e.topResources.length>0&&(t.push(" Top 10 longest:"),e.topResources.forEach((o,a)=>{let i=String(a+1).padStart(3),s=Me(o.durationMs).padStart(7),l=o.filename.padEnd(50);t.push(` ${i}. ${s} ${l} ${o.resourceType} ${o.markerHandle}`)}))}if(t.push(""),t.push(`\u2500\u2500\u2500\u2500 CPU Categories (${e.totalSamples} samples) \u2500\u2500\u2500\u2500`),t.push(""),e.categories.length===0)t.push(" No sample data available during page load.");else{let a=e.categories[0].count,i=Math.max(...e.categories.map(s=>s.name.length));for(let s of e.categories){let l=a>0?Math.round(s.count/a*28):0,c="\u2588".repeat(l).padEnd(28),u=s.name.padEnd(i),d=String(s.count).padStart(6),f=s.percentage.toFixed(1).padStart(5);t.push(` ${u} ${c} ${d} ${f}%`)}}if(t.push(""),t.push(`\u2500\u2500\u2500\u2500 Jank (${e.jankTotal} periods) \u2500\u2500\u2500\u2500`),t.push(""),e.jankTotal===0)t.push(" No jank detected during page load.");else{let o=e.jankPeriods.length;e.jankPeriods.forEach((a,i)=>{if(t.push(` Jank ${i+1} (${a.markerHandle}) at ${Math.round(a.startMs)}ms ${Math.round(a.durationMs)}ms duration [${a.startHandle} \u2192 ${a.endHandle}]`),a.topFunctions.length>0){t.push(" Top functions:");for(let s of a.topFunctions){let l=gn(s.name,60);t.push(` ${l.padEnd(60)} ${s.sampleCount} samples`)}}if(a.categories.length>0){let s=a.categories.map(l=>`${l.name}: ${l.count}`).join(" ");t.push(` Categories: ${s}`)}t.push("")}),o<e.jankTotal&&t.push(` Showing ${o} of ${e.jankTotal} jank periods. Use --jank-limit <N> or --jank-limit 0 to show more.`)}return t.join(`
850
- `)}function Ve(e,t){if(t)return JSON.stringify(typeof e=="string"?{type:"text",result:e}:e,null,2);if(typeof e=="string")return e;switch(e.type){case"status":return nP(e);case"filter-stack":return oP(e);case"function-expand":return aP(e);case"function-info":return iP(e);case"function-annotate":return SP(e);case"view-range":return sP(e);case"thread-info":return lP(e);case"marker-stack":return cP(e);case"marker-info":return uP(e);case"profile-info":return dP(e);case"thread-samples":return hP(e);case"thread-samples-top-down":return mP(e);case"thread-samples-bottom-up":return gP(e);case"thread-markers":return yP(e);case"thread-functions":return bP(e);case"thread-network":return TP(e);case"profile-logs":return xP(e);case"thread-page-load":return IP(e);default:throw ae(e)}}xe();function zn(e,t){return[...t,e]}function lr(e){return e.split(",").map(t=>{let r=/^f-(\d+)$/.exec(t.trim());return r||(console.error(`Error: invalid function handle "${t.trim()}" (expected f-<N>)`),process.exit(1)),parseInt(r[1],10)})}function Al(e){let t=[];for(let r of e.excludesFunction??[])t.push({type:"excludes-function",funcIndexes:lr(r)});for(let r of e.excludesAnyFunction??[])t.push({type:"excludes-function",funcIndexes:lr(r)});for(let r of e.merge??[])t.push({type:"merge",funcIndexes:lr(r)});for(let r of e.rootAt??[]){let n=lr(r);n.length!==1&&(console.error("Error: --root-at takes exactly one function handle"),process.exit(1)),t.push({type:"root-at",funcIndex:n[0]})}for(let r of e.includesFunction??[])t.push({type:"includes-function",funcIndexes:lr(r)});for(let r of e.includesAnyFunction??[])t.push({type:"includes-function",funcIndexes:lr(r)});for(let r of e.includesPrefix??[])t.push({type:"includes-prefix",funcIndexes:lr(r)});for(let r of e.includesSuffix??[]){let n=lr(r);n.length!==1&&(console.error("Error: --includes-suffix takes exactly one function handle"),process.exit(1)),t.push({type:"includes-suffix",funcIndex:n[0]})}return e.duringMarker===!0&&(e.search||(console.error("Error: --during-marker requires --search <text>"),process.exit(1)),t.push({type:"during-marker",searchString:e.search})),e.outsideMarker===!0&&(e.search||(console.error("Error: --outside-marker requires --search <text>"),process.exit(1)),t.push({type:"outside-marker",searchString:e.search})),t}function vP(e){let t=["excludesFunction","excludesAnyFunction","merge","rootAt","includesFunction","includesAnyFunction","includesPrefix","includesSuffix"],r=["duringMarker","outsideMarker"],n=t.filter(i=>e[i]!==void 0&&e[i].length>0),o=r.filter(i=>e[i]===!0),a=n.length+o.length;if(a===0&&(console.error("Error: filter push requires one of: "+["--excludes-function","--excludes-any-function","--merge","--root-at","--includes-function","--includes-any-function","--includes-prefix","--includes-suffix","--during-marker","--outside-marker"].join(", ")),process.exit(1)),a>1&&(console.error("Error: filter push accepts only one filter flag per push"),process.exit(1)),n.length>0){let i=n[0],l=e[i][0];switch(i){case"excludesFunction":case"excludesAnyFunction":return{type:"excludes-function",funcIndexes:lr(l)};case"merge":return{type:"merge",funcIndexes:lr(l)};case"rootAt":{let c=lr(l);return c.length!==1&&(console.error("Error: --root-at takes exactly one function handle"),process.exit(1)),{type:"root-at",funcIndex:c[0]}}case"includesFunction":case"includesAnyFunction":return{type:"includes-function",funcIndexes:lr(l)};case"includesPrefix":return{type:"includes-prefix",funcIndexes:lr(l)};case"includesSuffix":{let c=lr(l);return c.length!==1&&(console.error("Error: --includes-suffix takes exactly one function handle"),process.exit(1)),{type:"includes-suffix",funcIndex:c[0]}}default:throw ae(i)}}if(e.duringMarker===!0)return e.search||(console.error("Error: --during-marker requires --search <text>"),process.exit(1)),{type:"during-marker",searchString:e.search};if(e.outsideMarker===!0)return e.search||(console.error("Error: --outside-marker requires --search <text>"),process.exit(1)),{type:"outside-marker",searchString:e.search};throw console.error("Error: no valid filter flag found"),process.exit(1),new Error("unreachable")}function rf(e,t){let r=process.argv,n=r.lastIndexOf(e);return n!==-1&&r[n+1]===t}function je(e){return e.option("--session <id>","Use a specific session (default: current session)").option("--json","Output results as JSON")}function Pl(e){return e.addOption(new Sn("--excludes-function <f-N>","Drop samples containing this function").argParser(zn).default([])).addOption(new Sn("--excludes-any-function <f-N>","Drop samples containing any of these functions (OR)").argParser(zn).default([])).addOption(new Sn("--merge <f-N,...>","Merge (remove) functions from stacks").argParser(zn).default([])).addOption(new Sn("--root-at <f-N>","Re-root stacks at this function").argParser(zn).default([])).addOption(new Sn("--includes-function <f-N,...>","Keep only samples whose stack contains any of these functions").argParser(zn).default([])).addOption(new Sn("--includes-any-function <f-N,...>","Alias for --includes-function (explicit OR form)").argParser(zn).default([])).addOption(new Sn("--includes-prefix <f-N,...>","Keep only samples whose stack starts with this root-first sequence").argParser(zn).default([])).addOption(new Sn("--includes-suffix <f-N>","Keep only samples whose leaf frame is this function").argParser(zn).default([])).option("--during-marker","Keep only samples during matching markers (requires --search)").option("--outside-marker","Keep only samples outside matching markers (requires --search)")}function wP(e,t){let r=e.command("profile").description("Profile-level commands");je(r.command("info").description("Print profile summary (processes, threads, CPU activity)").option("--all","Show all processes and threads (overrides default top-5 limit)").option("--search <term>","Filter by substring")).action(async o=>{let a=await He(t,{command:"profile",subcommand:"info",all:o.all,search:o.search},o.session);console.log(Ve(a,o.json??!1))});let n=["error","warn","info","debug","verbose"];je(r.command("logs").description("Print Log markers in MOZ_LOG format").option("--thread <handle>","Filter to a specific thread (e.g. t-0)").option("--module <name>","Filter by module name (substring match)").option("--level <level>",`Minimum log level: ${n.join(", ")}`).option("--search <term>","Filter by substring in message").option("--limit <N>","Limit to first N entries")).action(async o=>{o.level!==void 0&&!n.includes(o.level)&&(console.error(`Error: --level must be one of: ${n.join(", ")}`),process.exit(1));let a;o.limit!==void 0&&(a=parseInt(o.limit,10),(isNaN(a)||a<=0)&&(console.error("Error: --limit must be a positive integer"),process.exit(1)));let i=o.thread!==void 0||o.module!==void 0||o.level!==void 0||o.search!==void 0||a!==void 0,s=await He(t,{command:"profile",subcommand:"logs",logFilters:i?{thread:o.thread,module:o.module,level:o.level,search:o.search,limit:a}:void 0},o.session);console.log(Ve(s,o.json??!1))})}var Rl=["exponential-0.95","exponential-0.9","exponential-0.8","harmonic-0.1","harmonic-0.5","harmonic-1.0","percentage-only"];function _P(e){return Pl(je(e).option("--thread <handle>","Thread handle (e.g. t-0)").option("--include-idle","Include idle samples in percentages").option("--search <term>","Keep samples containing this substring in any frame. Comma-separates multiple terms, all must match (AND).").option("--limit <N>","Limit the number of results shown"))}function kP(e){return _P(e).option("--max-lines <N>","Maximum nodes in call tree (default: 100)").option("--scoring <strategy>",`Call tree scoring strategy: ${Rl.join(", ")}`)}function CP(e,t){let r=e.command("thread").description("Thread-level commands");je(r.command("info").description("Print detailed thread information").option("--thread <handle>","Thread handle (e.g. t-0)")).action(async n=>{let o=await He(t,{command:"thread",subcommand:"info",thread:n.thread},n.session);console.log(Ve(o,n.json??!1))}),je(r.command("select [handle]").description("Select a thread (e.g. t-0, t-1)").option("--thread <handle>","Thread handle")).action(async(n,o)=>{let a=n??o.thread,i=await He(t,{command:"thread",subcommand:"select",thread:a},o.session);console.log(Ve(i,o.json??!1))}),_P(r.command("samples").description("Show hot functions list for a thread")).action(async n=>{let o=Al(n),a=await He(t,{command:"thread",subcommand:"samples",thread:n.thread,includeIdle:n.includeIdle||void 0,search:n.search,sampleFilters:o.length?o:void 0},n.session);console.log(Ve(a,n.json??!1))}),kP(r.command("samples-top-down").description("Show top-down call tree (where CPU time is spent)")).action(async n=>{let o=Al(n),a;if(n.maxLines!==void 0||n.scoring!==void 0){if(a={},n.maxLines!==void 0){let s=parseInt(String(n.maxLines),10);(isNaN(s)||s<=0)&&(console.error("Error: --max-lines must be a positive integer"),process.exit(1)),a.maxNodes=s}n.scoring!==void 0&&(Rl.includes(n.scoring)||(console.error(`Error: --scoring must be one of: ${Rl.join(", ")}`),process.exit(1)),a.scoringStrategy=n.scoring)}let i=await He(t,{command:"thread",subcommand:"samples-top-down",thread:n.thread,includeIdle:n.includeIdle||void 0,search:n.search,callTreeOptions:a,sampleFilters:o.length?o:void 0},n.session);console.log(Ve(i,n.json??!1))}),kP(r.command("samples-bottom-up").description("Show bottom-up call tree (what calls hot functions)")).action(async n=>{let o=Al(n),a;if(n.maxLines!==void 0||n.scoring!==void 0){if(a={},n.maxLines!==void 0){let s=parseInt(String(n.maxLines),10);(isNaN(s)||s<=0)&&(console.error("Error: --max-lines must be a positive integer"),process.exit(1)),a.maxNodes=s}n.scoring!==void 0&&(Rl.includes(n.scoring)||(console.error(`Error: --scoring must be one of: ${Rl.join(", ")}`),process.exit(1)),a.scoringStrategy=n.scoring)}let i=await He(t,{command:"thread",subcommand:"samples-bottom-up",thread:n.thread,includeIdle:n.includeIdle||void 0,search:n.search,callTreeOptions:a,sampleFilters:o.length?o:void 0},n.session);console.log(Ve(i,n.json??!1))}),je(r.command("markers").description("List markers with aggregated statistics").option("--thread <handle>","Thread handle (e.g. t-0)").option("--search <term>","Filter by substring").option("--category <name>","Filter by category name (case-insensitive substring match)").option("--min-duration <ms>","Filter by minimum duration in milliseconds").option("--max-duration <ms>","Filter by maximum duration in milliseconds").option("--has-stack","Show only markers with stack traces").option("--limit <N>","Limit the number of results shown").option("--group-by <keys>",'Group by custom keys (e.g. "type,name" or "type,field:eventType")').option("--auto-group","Automatically determine grouping based on field variance").option("--top-n <N>","Number of top markers to include per group in JSON output (default: 5)").option("--list","Show a flat chronological list of individual markers")).action(async n=>{let o;if(n.search!==void 0||n.minDuration!==void 0||n.maxDuration!==void 0||n.category!==void 0||n.hasStack||n.limit!==void 0||n.groupBy!==void 0||n.autoGroup||n.topN!==void 0||n.list){if(o={},n.search!==void 0&&(o.searchString=n.search),n.category!==void 0&&(o.category=n.category),n.hasStack&&(o.hasStack=!0),n.autoGroup&&(o.autoGroup=!0),n.groupBy!==void 0&&(o.groupBy=n.groupBy),n.list&&(o.list=!0),n.minDuration!==void 0){let i=parseFloat(n.minDuration);(isNaN(i)||i<0)&&(console.error("Error: --min-duration must be a positive number (in milliseconds)"),process.exit(1)),o.minDuration=i}if(n.maxDuration!==void 0){let i=parseFloat(n.maxDuration);(isNaN(i)||i<0)&&(console.error("Error: --max-duration must be a positive number (in milliseconds)"),process.exit(1)),o.maxDuration=i}if(n.limit!==void 0){let i=parseInt(n.limit,10);(isNaN(i)||i<=0)&&(console.error("Error: --limit must be a positive integer"),process.exit(1)),o.limit=i}if(n.topN!==void 0){let i=parseInt(n.topN,10);(isNaN(i)||i<=0)&&(console.error("Error: --top-n must be a positive integer"),process.exit(1)),o.topN=i}}let a=await He(t,{command:"thread",subcommand:"markers",thread:n.thread,markerFilters:o},n.session);console.log(Ve(a,n.json??!1))}),je(r.command("network").description("Show network requests with timing phases").option("--thread <handle>","Thread handle (e.g. t-0)").option("--search <term>","Filter by URL substring").option("--min-duration <ms>","Filter by minimum total request duration in milliseconds").option("--max-duration <ms>","Filter by maximum total request duration in milliseconds").option("--limit <N>","Max requests to show (default: 20, 0 = show all)")).action(async n=>{let o={};if(n.search!==void 0&&(o.searchString=n.search),n.minDuration!==void 0){let i=parseFloat(n.minDuration);(isNaN(i)||i<0)&&(console.error("Error: --min-duration must be a positive number (in milliseconds)"),process.exit(1)),o.minDuration=i}if(n.maxDuration!==void 0){let i=parseFloat(n.maxDuration);(isNaN(i)||i<0)&&(console.error("Error: --max-duration must be a positive number (in milliseconds)"),process.exit(1)),o.maxDuration=i}if(n.limit!==void 0){let i=parseInt(n.limit,10);(isNaN(i)||i<0)&&(console.error("Error: --limit must be a non-negative integer (0 = show all)"),process.exit(1)),o.limit=i}else o.limit=20;let a=await He(t,{command:"thread",subcommand:"network",thread:n.thread,networkFilters:o},n.session);console.log(Ve(a,n.json??!1))}),je(r.command("page-load").description("Show page load summary: navigation timing, resources, CPU categories, and jank").option("--thread <handle>","Thread handle (e.g. t-0)").option("--navigation <N>","Select which navigation to show (1-based, default: last completed)").option("--jank-limit <N>","Max jank periods to show (default: 10, 0 = show all)")).action(async n=>{let o={};if(n.navigation!==void 0){let i=parseInt(n.navigation,10);(isNaN(i)||i<1)&&(console.error("Error: --navigation must be a positive integer (1-based index)"),process.exit(1)),o.navigationIndex=i}if(n.jankLimit!==void 0){let i=parseInt(n.jankLimit,10);(isNaN(i)||i<0)&&(console.error("Error: --jank-limit must be a non-negative integer (0 = show all)"),process.exit(1)),o.jankLimit=i===0?void 0:i}let a=await He(t,{command:"thread",subcommand:"page-load",thread:n.thread,pageLoadOptions:o},n.session);console.log(Ve(a,n.json??!1))}),Pl(je(r.command("functions").description("List all functions with CPU percentages").option("--thread <handle>","Thread handle (e.g. t-0)").option("--search <term>","Filter by substring").option("--min-self <percent>","Filter by minimum self time percentage").option("--limit <N>","Limit the number of results shown").option("--include-idle","Include idle samples in percentages"))).action(async n=>{let o;if(n.search!==void 0||n.minSelf!==void 0||n.limit!==void 0){if(o={},n.search!==void 0&&(o.searchString=n.search),n.minSelf!==void 0){let s=parseFloat(n.minSelf);(isNaN(s)||s<0||s>100)&&(console.error("Error: --min-self must be a number between 0 and 100 (percentage)"),process.exit(1)),o.minSelf=s}if(n.limit!==void 0){let s=parseInt(n.limit,10);(isNaN(s)||s<=0)&&(console.error("Error: --limit must be a positive integer"),process.exit(1)),o.limit=s}}let a=Al(n),i=await He(t,{command:"thread",subcommand:"functions",thread:n.thread,includeIdle:n.includeIdle||void 0,functionFilters:o,sampleFilters:a.length?a:void 0},n.session);console.log(Ve(i,n.json??!1))})}function EP(e,t){let r=e.command("marker").description("Marker-level commands");je(r.command("info [handle]").description("Show detailed marker information (e.g. m-1234)").option("--marker <handle>","Marker handle")).action(async(n,o)=>{let a=n??o.marker,i=await He(t,{command:"marker",subcommand:"info",marker:a},o.session);console.log(Ve(i,o.json??!1))}),je(r.command("stack [handle]").description("Show full stack trace for a marker (e.g. m-1234)").option("--marker <handle>","Marker handle")).action(async(n,o)=>{let a=n??o.marker,i=await He(t,{command:"marker",subcommand:"stack",marker:a},o.session);console.log(Ve(i,o.json??!1))})}function NP(e,t){let r=e.command("function").description("Function-level commands");je(r.command("expand [handle]").description("Show full untruncated function name (e.g. f-123)").option("--function <handle>","Function handle")).action(async(n,o)=>{let a=n??o.function,i=await He(t,{command:"function",subcommand:"expand",function:a},o.session);console.log(Ve(i,o.json??!1))}),je(r.command("info [handle]").description("Show detailed function information (e.g. f-123)").option("--function <handle>","Function handle")).action(async(n,o)=>{let a=n??o.function,i=await He(t,{command:"function",subcommand:"info",function:a},o.session);console.log(Ve(i,o.json??!1))}),je(r.command("annotate [handle]").description("Show annotated source/assembly with timing data (e.g. f-123)").option("--function <handle>","Function handle").option("--mode <mode>","Annotation mode: src, asm, or all (default: src)","src").option("--symbol-server <url>","Symbol server URL for asm mode (default: http://localhost:3000)","http://localhost:3000").option("--context <context>",'Source context: number of lines around annotated lines, or "file" for the whole file (default: 2)',"2")).action(async(n,o)=>{let a=n??o.function,i=await He(t,{command:"function",subcommand:"annotate",function:a,annotateMode:o.mode,symbolServerUrl:o.symbolServer,annotateContext:o.context},o.session);console.log(Ve(i,o.json??!1))})}function AP(e,t){let r=e.command("zoom").description("Manage zoom ranges");je(r.command("push <range>").description("Push a zoom range (e.g. 2.7,3.1 in seconds, 2700ms,3100ms in milliseconds, 10%,20% as percentage, or m-158 for a marker)")).action(async(n,o)=>{let a=await He(t,{command:"zoom",subcommand:"push",range:n},o.session);console.log(Ve(a,o.json??!1))}),je(r.command("pop").description("Pop the most recent zoom range")).action(async n=>{let o=await He(t,{command:"zoom",subcommand:"pop"},n.session);console.log(Ve(o,n.json??!1))}),je(r.command("clear").description("Clear all zoom ranges (return to full profile)")).action(async n=>{let o=await He(t,{command:"zoom",subcommand:"clear"},n.session);console.log(Ve(o,n.json??!1))})}function PP(e,t){let r=e.command("filter").description("Manage sticky sample filters");Pl(je(r.command("push").description("Push a sticky sample filter").option("--thread <handle>","Thread handle"))).action(async n=>{let o=vP({excludesFunction:n.excludesFunction,excludesAnyFunction:n.excludesAnyFunction,merge:n.merge,rootAt:n.rootAt,includesFunction:n.includesFunction,includesAnyFunction:n.includesAnyFunction,includesPrefix:n.includesPrefix,includesSuffix:n.includesSuffix,duringMarker:n.duringMarker,outsideMarker:n.outsideMarker,search:n.search}),a=await He(t,{command:"filter",subcommand:"push",thread:n.thread,spec:o},n.session);console.log(Ve(a,n.json??!1))}),je(r.command("pop [count]").description("Pop the last N filters (default: 1)").option("--count <n>","Number of filters to pop").option("--thread <handle>","Thread handle")).action(async(n,o)=>{let a=n??o.count??"1",i=parseInt(String(a),10);(isNaN(i)||i<=0)&&(console.error("Error: count must be a positive integer"),process.exit(1));let s=await He(t,{command:"filter",subcommand:"pop",thread:o.thread,count:i},o.session);console.log(Ve(s,o.json??!1))}),je(r.command("list",{isDefault:!0}).description("List active filters for current thread").option("--thread <handle>","Thread handle")).action(async n=>{let o=await He(t,{command:"filter",subcommand:"list",thread:n.thread},n.session);console.log(Ve(o,n.json??!1)),rf("filter","list")||console.log(`
851
- Other subcommands: profiler-cli filter <push|pop|clear> [options]`)}),je(r.command("clear").description("Remove all filters for current thread").option("--thread <handle>","Thread handle")).action(async n=>{let o=await He(t,{command:"filter",subcommand:"clear",thread:n.thread},n.session);console.log(Ve(o,n.json??!1))})}function RP(e,t){let r=e.command("session").description("Manage daemon sessions");r.command("list",{isDefault:!0}).description("List all running daemon sessions").action(()=>{let n=ef(t),o=0,a=[];for(let s of n){let l=_o(t,s);if(l===null){yn(t,s),o++;continue}a.push(l)}o!==0&&(console.log(`Cleaned up ${o} stale sessions.`),console.log()),a.sort((s,l)=>new Date(s.createdAt).getTime()-new Date(l.createdAt).getTime());let i=fa(t);console.log(`Found ${a.length} running sessions:`);for(let s of a){let c=s.id===i?"* ":" ";console.log(`${c}${s.id}, created at ${s.createdAt} [daemon pid: ${s.pid}]`)}rf("session","list")||console.log(`
852
- Other subcommands: profiler-cli session use <id>`)}),r.command("use <id>").description("Switch the current session").action(n=>{_o(t,n)===null&&(console.error(`Error: session "${n}" not found or not running`),process.exit(1)),Qd(t,n),console.log(`Switched to session ${n}`)})}var yr=process.env.PROFILER_CLI_SESSION_DIR||MP.join(FP.homedir(),".profiler-cli");async function i6(){let e=process.argv.slice(2);if(e.includes("--daemon")){let r=e.indexOf("--daemon"),n=e.find((i,s)=>s>r&&!i.startsWith("-")),o=e.indexOf("--session"),a=o!==-1?e[o+1]:void 0;n||(console.error("Error: Profile path required for daemon mode"),process.exit(1)),await ZA(yr,n,a);return}let t=new ib;t.name("profiler-cli").description("Profiler CLI \u2014 query Firefox profiles from the terminal").version(zA,"-V, --version","Print the version number").helpOption("-h, --help","Show help").addHelpCommand("help [command]","Show help for a command").addHelpText("after",`
848
+ `)}function CP(e){let t=[Xt(e.context),""];if(e.navigationTotal===0)return t.push("No page load markers found in this thread.","Try a different thread or check that the profile includes a web page load."),t.join(`
849
+ `);let r=e.navigationTotal>1?` [Navigation ${e.navigationIndex} of ${e.navigationTotal}]`:"";t.push(`Page Load Summary \u2014 ${e.friendlyThreadName} (${e.threadHandle})${r}`),t.push(""),e.url&&(t.push(` URL: ${e.url}`),t.push("")),t.push("\u2500\u2500\u2500\u2500 Navigation Timing \u2500\u2500\u2500\u2500"),t.push("");let n=e.milestones;if(n.length===0)t.push(" No navigation timing data available.");else{let a=n.filter(h=>h.name!=="TTFI"),i=a.length>0?Math.max(...a.map(h=>h.timeMs)):n[n.length-1].timeMs,s=Math.max(...n.map(h=>h.name.length)),l=Math.max(s,3),c=Math.max(...n.map(h=>h.markerHandle.length)),u=l+1+c+2,d="0ms",f=`${Math.round(i)}ms`,p=60-d.length-f.length;t.push(` ${" ".repeat(u)}${d}${" ".repeat(Math.max(0,p))}${f}`),t.push(` ${" ".repeat(u)}${"\u2500".repeat(60)}`);for(let h of n){let y=h.name.padStart(l),b=h.markerHandle.padEnd(c),g;if(h.timeMs>i)g="\u2500".repeat(60)+"\u25B6";else{let m=i>0?Math.round(h.timeMs/i*60):60,T=Math.min(m,59);g="\u2500".repeat(Math.max(0,T))+"\u2502"}t.push(` ${y} ${b} ${g} ${Math.round(h.timeMs)}ms`)}}if(t.push(""),t.push(`\u2500\u2500\u2500\u2500 Resources (${e.resourceCount} requests) \u2500\u2500\u2500\u2500`),t.push(""),e.resourceCount===0)t.push(" No network requests recorded during page load.");else{if(e.resourceAvgMs!==null&&t.push(` Avg duration: ${Fe(e.resourceAvgMs)}`),e.resourceMaxMs!==null&&t.push(` Max duration: ${Fe(e.resourceMaxMs)}`),t.push(""),e.resourcesByType.length>0){t.push(" By type:");for(let o of e.resourcesByType){let a=String(o.count).padStart(4),i=o.percentage.toFixed(1).padStart(5);t.push(` ${o.type.padEnd(8)} ${a} (${i}%)`)}t.push("")}e.topResources.length>0&&(t.push(" Top 10 longest:"),e.topResources.forEach((o,a)=>{let i=String(a+1).padStart(3),s=Fe(o.durationMs).padStart(7),l=o.filename.padEnd(50);t.push(` ${i}. ${s} ${l} ${o.resourceType} ${o.markerHandle}`)}))}if(t.push(""),t.push(`\u2500\u2500\u2500\u2500 CPU Categories (${e.totalSamples} samples) \u2500\u2500\u2500\u2500`),t.push(""),e.categories.length===0)t.push(" No sample data available during page load.");else{let a=e.categories[0].count,i=Math.max(...e.categories.map(s=>s.name.length));for(let s of e.categories){let l=a>0?Math.round(s.count/a*28):0,c="\u2588".repeat(l).padEnd(28),u=s.name.padEnd(i),d=String(s.count).padStart(6),f=s.percentage.toFixed(1).padStart(5);t.push(` ${u} ${c} ${d} ${f}%`)}}if(t.push(""),t.push(`\u2500\u2500\u2500\u2500 Jank (${e.jankTotal} periods) \u2500\u2500\u2500\u2500`),t.push(""),e.jankTotal===0)t.push(" No jank detected during page load.");else{let o=e.jankPeriods.length;e.jankPeriods.forEach((a,i)=>{if(t.push(` Jank ${i+1} (${a.markerHandle}) at ${Math.round(a.startMs)}ms ${Math.round(a.durationMs)}ms duration [${a.startHandle} \u2192 ${a.endHandle}]`),a.topFunctions.length>0){t.push(" Top functions:");for(let s of a.topFunctions){let l=gn(s.name,60);t.push(` ${l.padEnd(60)} ${s.sampleCount} samples`)}}if(a.categories.length>0){let s=a.categories.map(l=>`${l.name}: ${l.count}`).join(" ");t.push(` Categories: ${s}`)}t.push("")}),o<e.jankTotal&&t.push(` Showing ${o} of ${e.jankTotal} jank periods. Use --jank-limit <N> or --jank-limit 0 to show more.`)}return t.join(`
850
+ `)}function Ve(e,t){if(t)return JSON.stringify(typeof e=="string"?{type:"text",result:e}:e,null,2);if(typeof e=="string")return e;switch(e.type){case"status":return lP(e);case"filter-stack":return cP(e);case"function-expand":return uP(e);case"function-info":return dP(e);case"function-annotate":return kP(e);case"view-range":return fP(e);case"thread-info":return pP(e);case"marker-stack":return hP(e);case"marker-info":return mP(e);case"profile-info":return gP(e);case"thread-samples":return TP(e);case"thread-samples-top-down":return SP(e);case"thread-samples-bottom-up":return xP(e);case"thread-markers":return IP(e);case"thread-functions":return vP(e);case"thread-network":return wP(e);case"profile-logs":return _P(e);case"thread-page-load":return CP(e);default:throw ae(e)}}xe();function zn(e,t){return[...t,e]}function cr(e){return e.split(",").map(t=>{let r=/^f-(\d+)$/.exec(t.trim());return r||(console.error(`Error: invalid function handle "${t.trim()}" (expected f-<N>)`),process.exit(1)),parseInt(r[1],10)})}function Pl(e){let t=[];for(let r of e.excludesFunction??[])t.push({type:"excludes-function",funcIndexes:cr(r)});for(let r of e.excludesAnyFunction??[])t.push({type:"excludes-function",funcIndexes:cr(r)});for(let r of e.merge??[])t.push({type:"merge",funcIndexes:cr(r)});for(let r of e.rootAt??[]){let n=cr(r);n.length!==1&&(console.error("Error: --root-at takes exactly one function handle"),process.exit(1)),t.push({type:"root-at",funcIndex:n[0]})}for(let r of e.includesFunction??[])t.push({type:"includes-function",funcIndexes:cr(r)});for(let r of e.includesAnyFunction??[])t.push({type:"includes-function",funcIndexes:cr(r)});for(let r of e.includesPrefix??[])t.push({type:"includes-prefix",funcIndexes:cr(r)});for(let r of e.includesSuffix??[]){let n=cr(r);n.length!==1&&(console.error("Error: --includes-suffix takes exactly one function handle"),process.exit(1)),t.push({type:"includes-suffix",funcIndex:n[0]})}return e.duringMarker===!0&&(e.search||(console.error("Error: --during-marker requires --search <text>"),process.exit(1)),t.push({type:"during-marker",searchString:e.search})),e.outsideMarker===!0&&(e.search||(console.error("Error: --outside-marker requires --search <text>"),process.exit(1)),t.push({type:"outside-marker",searchString:e.search})),t}function EP(e){let t=["excludesFunction","excludesAnyFunction","merge","rootAt","includesFunction","includesAnyFunction","includesPrefix","includesSuffix"],r=["duringMarker","outsideMarker"],n=t.filter(i=>e[i]!==void 0&&e[i].length>0),o=r.filter(i=>e[i]===!0),a=n.length+o.length;if(a===0&&(console.error("Error: filter push requires one of: "+["--excludes-function","--excludes-any-function","--merge","--root-at","--includes-function","--includes-any-function","--includes-prefix","--includes-suffix","--during-marker","--outside-marker"].join(", ")),process.exit(1)),a>1&&(console.error("Error: filter push accepts only one filter flag per push"),process.exit(1)),n.length>0){let i=n[0],l=e[i][0];switch(i){case"excludesFunction":case"excludesAnyFunction":return{type:"excludes-function",funcIndexes:cr(l)};case"merge":return{type:"merge",funcIndexes:cr(l)};case"rootAt":{let c=cr(l);return c.length!==1&&(console.error("Error: --root-at takes exactly one function handle"),process.exit(1)),{type:"root-at",funcIndex:c[0]}}case"includesFunction":case"includesAnyFunction":return{type:"includes-function",funcIndexes:cr(l)};case"includesPrefix":return{type:"includes-prefix",funcIndexes:cr(l)};case"includesSuffix":{let c=cr(l);return c.length!==1&&(console.error("Error: --includes-suffix takes exactly one function handle"),process.exit(1)),{type:"includes-suffix",funcIndex:c[0]}}default:throw ae(i)}}if(e.duringMarker===!0)return e.search||(console.error("Error: --during-marker requires --search <text>"),process.exit(1)),{type:"during-marker",searchString:e.search};if(e.outsideMarker===!0)return e.search||(console.error("Error: --outside-marker requires --search <text>"),process.exit(1)),{type:"outside-marker",searchString:e.search};throw console.error("Error: no valid filter flag found"),process.exit(1),new Error("unreachable")}function af(e,t){let r=process.argv,n=r.lastIndexOf(e);return n!==-1&&r[n+1]===t}function je(e){return e.option("--session <id>","Use a specific session (default: current session)").option("--json","Output results as JSON")}function Rl(e){return e.addOption(new Sn("--excludes-function <f-N>","Drop samples containing this function").argParser(zn).default([])).addOption(new Sn("--excludes-any-function <f-N>","Drop samples containing any of these functions (OR)").argParser(zn).default([])).addOption(new Sn("--merge <f-N,...>","Merge (remove) functions from stacks").argParser(zn).default([])).addOption(new Sn("--root-at <f-N>","Re-root stacks at this function").argParser(zn).default([])).addOption(new Sn("--includes-function <f-N,...>","Keep only samples whose stack contains any of these functions").argParser(zn).default([])).addOption(new Sn("--includes-any-function <f-N,...>","Alias for --includes-function (explicit OR form)").argParser(zn).default([])).addOption(new Sn("--includes-prefix <f-N,...>","Keep only samples whose stack starts with this root-first sequence").argParser(zn).default([])).addOption(new Sn("--includes-suffix <f-N>","Keep only samples whose leaf frame is this function").argParser(zn).default([])).option("--during-marker","Keep only samples during matching markers (requires --search)").option("--outside-marker","Keep only samples outside matching markers (requires --search)")}function NP(e,t){let r=e.command("profile").description("Profile-level commands");je(r.command("info").description("Print profile summary (processes, threads, CPU activity)").option("--all","Show all processes and threads (overrides default top-5 limit)").option("--search <term>","Filter by substring")).action(async o=>{let a=await He(t,{command:"profile",subcommand:"info",all:o.all,search:o.search},o.session);console.log(Ve(a,o.json??!1))});let n=["error","warn","info","debug","verbose"];je(r.command("logs").description("Print Log markers in MOZ_LOG format").option("--thread <handle>","Filter to a specific thread (e.g. t-0)").option("--module <name>","Filter by module name (substring match)").option("--level <level>",`Minimum log level: ${n.join(", ")}`).option("--search <term>","Filter by substring in message").option("--limit <N>","Limit to first N entries")).action(async o=>{o.level!==void 0&&!n.includes(o.level)&&(console.error(`Error: --level must be one of: ${n.join(", ")}`),process.exit(1));let a;o.limit!==void 0&&(a=parseInt(o.limit,10),(isNaN(a)||a<=0)&&(console.error("Error: --limit must be a positive integer"),process.exit(1)));let i=o.thread!==void 0||o.module!==void 0||o.level!==void 0||o.search!==void 0||a!==void 0,s=await He(t,{command:"profile",subcommand:"logs",logFilters:i?{thread:o.thread,module:o.module,level:o.level,search:o.search,limit:a}:void 0},o.session);console.log(Ve(s,o.json??!1))})}var Ml=["exponential-0.95","exponential-0.9","exponential-0.8","harmonic-0.1","harmonic-0.5","harmonic-1.0","percentage-only"];function PP(e){return Rl(je(e).option("--thread <handle>","Thread handle (e.g. t-0)").option("--include-idle","Include idle samples in percentages").option("--search <term>","Keep samples containing this substring in any frame. Comma-separates multiple terms, all must match (AND).").option("--limit <N>","Limit the number of results shown"))}function AP(e){return PP(e).option("--max-lines <N>","Maximum nodes in call tree (default: 100)").option("--scoring <strategy>",`Call tree scoring strategy: ${Ml.join(", ")}`)}function RP(e,t){let r=e.command("thread").description("Thread-level commands");je(r.command("info").description("Print detailed thread information").option("--thread <handle>","Thread handle (e.g. t-0)")).action(async n=>{let o=await He(t,{command:"thread",subcommand:"info",thread:n.thread},n.session);console.log(Ve(o,n.json??!1))}),je(r.command("select [handle]").description("Select a thread (e.g. t-0, t-1)").option("--thread <handle>","Thread handle")).action(async(n,o)=>{let a=n??o.thread,i=await He(t,{command:"thread",subcommand:"select",thread:a},o.session);console.log(Ve(i,o.json??!1))}),PP(r.command("samples").description("Show hot functions list for a thread")).action(async n=>{let o=Pl(n),a=await He(t,{command:"thread",subcommand:"samples",thread:n.thread,includeIdle:n.includeIdle||void 0,search:n.search,sampleFilters:o.length?o:void 0},n.session);console.log(Ve(a,n.json??!1))}),AP(r.command("samples-top-down").description("Show top-down call tree (where CPU time is spent)")).action(async n=>{let o=Pl(n),a;if(n.maxLines!==void 0||n.scoring!==void 0){if(a={},n.maxLines!==void 0){let s=parseInt(String(n.maxLines),10);(isNaN(s)||s<=0)&&(console.error("Error: --max-lines must be a positive integer"),process.exit(1)),a.maxNodes=s}n.scoring!==void 0&&(Ml.includes(n.scoring)||(console.error(`Error: --scoring must be one of: ${Ml.join(", ")}`),process.exit(1)),a.scoringStrategy=n.scoring)}let i=await He(t,{command:"thread",subcommand:"samples-top-down",thread:n.thread,includeIdle:n.includeIdle||void 0,search:n.search,callTreeOptions:a,sampleFilters:o.length?o:void 0},n.session);console.log(Ve(i,n.json??!1))}),AP(r.command("samples-bottom-up").description("Show bottom-up call tree (what calls hot functions)")).action(async n=>{let o=Pl(n),a;if(n.maxLines!==void 0||n.scoring!==void 0){if(a={},n.maxLines!==void 0){let s=parseInt(String(n.maxLines),10);(isNaN(s)||s<=0)&&(console.error("Error: --max-lines must be a positive integer"),process.exit(1)),a.maxNodes=s}n.scoring!==void 0&&(Ml.includes(n.scoring)||(console.error(`Error: --scoring must be one of: ${Ml.join(", ")}`),process.exit(1)),a.scoringStrategy=n.scoring)}let i=await He(t,{command:"thread",subcommand:"samples-bottom-up",thread:n.thread,includeIdle:n.includeIdle||void 0,search:n.search,callTreeOptions:a,sampleFilters:o.length?o:void 0},n.session);console.log(Ve(i,n.json??!1))}),je(r.command("markers").description("List markers with aggregated statistics").option("--thread <handle>","Thread handle (e.g. t-0)").option("--search <term>","Filter by substring").option("--category <name>","Filter by category name (case-insensitive substring match)").option("--min-duration <ms>","Filter by minimum duration in milliseconds").option("--max-duration <ms>","Filter by maximum duration in milliseconds").option("--has-stack","Show only markers with stack traces").option("--limit <N>","Limit the number of results shown").option("--group-by <keys>",'Group by custom keys (e.g. "type,name" or "type,field:eventType")').option("--auto-group","Automatically determine grouping based on field variance").option("--top-n <N>","Number of top markers to include per group in JSON output (default: 5)").option("--list","Show a flat chronological list of individual markers")).action(async n=>{let o;if(n.search!==void 0||n.minDuration!==void 0||n.maxDuration!==void 0||n.category!==void 0||n.hasStack||n.limit!==void 0||n.groupBy!==void 0||n.autoGroup||n.topN!==void 0||n.list){if(o={},n.search!==void 0&&(o.searchString=n.search),n.category!==void 0&&(o.category=n.category),n.hasStack&&(o.hasStack=!0),n.autoGroup&&(o.autoGroup=!0),n.groupBy!==void 0&&(o.groupBy=n.groupBy),n.list&&(o.list=!0),n.minDuration!==void 0){let i=parseFloat(n.minDuration);(isNaN(i)||i<0)&&(console.error("Error: --min-duration must be a positive number (in milliseconds)"),process.exit(1)),o.minDuration=i}if(n.maxDuration!==void 0){let i=parseFloat(n.maxDuration);(isNaN(i)||i<0)&&(console.error("Error: --max-duration must be a positive number (in milliseconds)"),process.exit(1)),o.maxDuration=i}if(n.limit!==void 0){let i=parseInt(n.limit,10);(isNaN(i)||i<=0)&&(console.error("Error: --limit must be a positive integer"),process.exit(1)),o.limit=i}if(n.topN!==void 0){let i=parseInt(n.topN,10);(isNaN(i)||i<=0)&&(console.error("Error: --top-n must be a positive integer"),process.exit(1)),o.topN=i}}let a=await He(t,{command:"thread",subcommand:"markers",thread:n.thread,markerFilters:o},n.session);console.log(Ve(a,n.json??!1))}),je(r.command("network").description("Show network requests with timing phases").option("--thread <handle>","Thread handle (e.g. t-0)").option("--search <term>","Filter by URL substring").option("--min-duration <ms>","Filter by minimum total request duration in milliseconds").option("--max-duration <ms>","Filter by maximum total request duration in milliseconds").option("--limit <N>","Max requests to show (default: 20, 0 = show all)")).action(async n=>{let o={};if(n.search!==void 0&&(o.searchString=n.search),n.minDuration!==void 0){let i=parseFloat(n.minDuration);(isNaN(i)||i<0)&&(console.error("Error: --min-duration must be a positive number (in milliseconds)"),process.exit(1)),o.minDuration=i}if(n.maxDuration!==void 0){let i=parseFloat(n.maxDuration);(isNaN(i)||i<0)&&(console.error("Error: --max-duration must be a positive number (in milliseconds)"),process.exit(1)),o.maxDuration=i}if(n.limit!==void 0){let i=parseInt(n.limit,10);(isNaN(i)||i<0)&&(console.error("Error: --limit must be a non-negative integer (0 = show all)"),process.exit(1)),o.limit=i}else o.limit=20;let a=await He(t,{command:"thread",subcommand:"network",thread:n.thread,networkFilters:o},n.session);console.log(Ve(a,n.json??!1))}),je(r.command("page-load").description("Show page load summary: navigation timing, resources, CPU categories, and jank").option("--thread <handle>","Thread handle (e.g. t-0)").option("--navigation <N>","Select which navigation to show (1-based, default: last completed)").option("--jank-limit <N>","Max jank periods to show (default: 10, 0 = show all)")).action(async n=>{let o={};if(n.navigation!==void 0){let i=parseInt(n.navigation,10);(isNaN(i)||i<1)&&(console.error("Error: --navigation must be a positive integer (1-based index)"),process.exit(1)),o.navigationIndex=i}if(n.jankLimit!==void 0){let i=parseInt(n.jankLimit,10);(isNaN(i)||i<0)&&(console.error("Error: --jank-limit must be a non-negative integer (0 = show all)"),process.exit(1)),o.jankLimit=i===0?void 0:i}let a=await He(t,{command:"thread",subcommand:"page-load",thread:n.thread,pageLoadOptions:o},n.session);console.log(Ve(a,n.json??!1))}),Rl(je(r.command("functions").description("List all functions with CPU percentages").option("--thread <handle>","Thread handle (e.g. t-0)").option("--search <term>","Filter by substring").option("--min-self <percent>","Filter by minimum self time percentage").option("--limit <N>","Limit the number of results shown").option("--include-idle","Include idle samples in percentages"))).action(async n=>{let o;if(n.search!==void 0||n.minSelf!==void 0||n.limit!==void 0){if(o={},n.search!==void 0&&(o.searchString=n.search),n.minSelf!==void 0){let s=parseFloat(n.minSelf);(isNaN(s)||s<0||s>100)&&(console.error("Error: --min-self must be a number between 0 and 100 (percentage)"),process.exit(1)),o.minSelf=s}if(n.limit!==void 0){let s=parseInt(n.limit,10);(isNaN(s)||s<=0)&&(console.error("Error: --limit must be a positive integer"),process.exit(1)),o.limit=s}}let a=Pl(n),i=await He(t,{command:"thread",subcommand:"functions",thread:n.thread,includeIdle:n.includeIdle||void 0,functionFilters:o,sampleFilters:a.length?a:void 0},n.session);console.log(Ve(i,n.json??!1))})}function MP(e,t){let r=e.command("marker").description("Marker-level commands");je(r.command("info [handle]").description("Show detailed marker information (e.g. m-1234)").option("--marker <handle>","Marker handle")).action(async(n,o)=>{let a=n??o.marker,i=await He(t,{command:"marker",subcommand:"info",marker:a},o.session);console.log(Ve(i,o.json??!1))}),je(r.command("stack [handle]").description("Show full stack trace for a marker (e.g. m-1234)").option("--marker <handle>","Marker handle")).action(async(n,o)=>{let a=n??o.marker,i=await He(t,{command:"marker",subcommand:"stack",marker:a},o.session);console.log(Ve(i,o.json??!1))})}function FP(e,t){let r=e.command("function").description("Function-level commands");je(r.command("expand [handle]").description("Show full untruncated function name (e.g. f-123)").option("--function <handle>","Function handle")).action(async(n,o)=>{let a=n??o.function,i=await He(t,{command:"function",subcommand:"expand",function:a},o.session);console.log(Ve(i,o.json??!1))}),je(r.command("info [handle]").description("Show detailed function information (e.g. f-123)").option("--function <handle>","Function handle")).action(async(n,o)=>{let a=n??o.function,i=await He(t,{command:"function",subcommand:"info",function:a},o.session);console.log(Ve(i,o.json??!1))}),je(r.command("annotate [handle]").description("Show annotated source/assembly with timing data (e.g. f-123)").option("--function <handle>","Function handle").option("--mode <mode>","Annotation mode: src, asm, or all (default: src)","src").option("--symbol-server <url>","Symbol server URL for asm mode (default: http://localhost:3000)","http://localhost:3000").option("--context <context>",'Source context: number of lines around annotated lines, or "file" for the whole file (default: 2)',"2")).action(async(n,o)=>{let a=n??o.function,i=await He(t,{command:"function",subcommand:"annotate",function:a,annotateMode:o.mode,symbolServerUrl:o.symbolServer,annotateContext:o.context},o.session);console.log(Ve(i,o.json??!1))})}function OP(e,t){let r=e.command("zoom").description("Manage zoom ranges");je(r.command("push <range>").description("Push a zoom range (e.g. 2.7,3.1 in seconds, 2700ms,3100ms in milliseconds, 10%,20% as percentage, or m-158 for a marker)")).action(async(n,o)=>{let a=await He(t,{command:"zoom",subcommand:"push",range:n},o.session);console.log(Ve(a,o.json??!1))}),je(r.command("pop").description("Pop the most recent zoom range")).action(async n=>{let o=await He(t,{command:"zoom",subcommand:"pop"},n.session);console.log(Ve(o,n.json??!1))}),je(r.command("clear").description("Clear all zoom ranges (return to full profile)")).action(async n=>{let o=await He(t,{command:"zoom",subcommand:"clear"},n.session);console.log(Ve(o,n.json??!1))})}function LP(e,t){let r=e.command("filter").description("Manage sticky sample filters");Rl(je(r.command("push").description("Push a sticky sample filter").option("--thread <handle>","Thread handle"))).action(async n=>{let o=EP({excludesFunction:n.excludesFunction,excludesAnyFunction:n.excludesAnyFunction,merge:n.merge,rootAt:n.rootAt,includesFunction:n.includesFunction,includesAnyFunction:n.includesAnyFunction,includesPrefix:n.includesPrefix,includesSuffix:n.includesSuffix,duringMarker:n.duringMarker,outsideMarker:n.outsideMarker,search:n.search}),a=await He(t,{command:"filter",subcommand:"push",thread:n.thread,spec:o},n.session);console.log(Ve(a,n.json??!1))}),je(r.command("pop [count]").description("Pop the last N filters (default: 1)").option("--count <n>","Number of filters to pop").option("--thread <handle>","Thread handle")).action(async(n,o)=>{let a=n??o.count??"1",i=parseInt(String(a),10);(isNaN(i)||i<=0)&&(console.error("Error: count must be a positive integer"),process.exit(1));let s=await He(t,{command:"filter",subcommand:"pop",thread:o.thread,count:i},o.session);console.log(Ve(s,o.json??!1))}),je(r.command("list",{isDefault:!0}).description("List active filters for current thread").option("--thread <handle>","Thread handle")).action(async n=>{let o=await He(t,{command:"filter",subcommand:"list",thread:n.thread},n.session);console.log(Ve(o,n.json??!1)),af("filter","list")||console.log(`
851
+ Other subcommands: profiler-cli filter <push|pop|clear> [options]`)}),je(r.command("clear").description("Remove all filters for current thread").option("--thread <handle>","Thread handle")).action(async n=>{let o=await He(t,{command:"filter",subcommand:"clear",thread:n.thread},n.session);console.log(Ve(o,n.json??!1))})}function DP(e,t){let r=e.command("session").description("Manage daemon sessions");r.command("list",{isDefault:!0}).description("List all running daemon sessions").action(()=>{let n=nf(t),o=0,a=[];for(let s of n){let l=_o(t,s);if(l===null){yn(t,s),o++;continue}a.push(l)}o!==0&&(console.log(`Cleaned up ${o} stale sessions.`),console.log()),a.sort((s,l)=>new Date(s.createdAt).getTime()-new Date(l.createdAt).getTime());let i=pa(t);console.log(`Found ${a.length} running sessions:`);for(let s of a){let c=s.id===i?"* ":" ";console.log(`${c}${s.id}, created at ${s.createdAt} [daemon pid: ${s.pid}]`)}af("session","list")||console.log(`
852
+ Other subcommands: profiler-cli session use <id>`)}),r.command("use <id>").description("Switch the current session").action(n=>{_o(t,n)===null&&(console.error(`Error: session "${n}" not found or not running`),process.exit(1)),rf(t,n),console.log(`Switched to session ${n}`)})}var yr=process.env.PROFILER_CLI_SESSION_DIR||BP.join(UP.homedir(),".profiler-cli");async function d6(){let e=process.argv.slice(2);if(e.includes("--daemon")){let r=e.indexOf("--daemon"),n=e.find((l,c)=>c>r&&!l.startsWith("-")),o=e.indexOf("--session"),a=o!==-1?e[o+1]:void 0,i=e.indexOf("--symbol-server"),s=i!==-1?e[i+1]:void 0;n||(console.error("Error: Profile path required for daemon mode"),process.exit(1)),await eP(yr,n,a,s);return}let t=new cb;t.name("profiler-cli").description("Profiler CLI \u2014 query Firefox profiles from the terminal").version(XA,"-V, --version","Print the version number").helpOption("-h, --help","Show help").addHelpCommand("help [command]","Show help for a command").addHelpText("after",`
853
853
  Examples:
854
854
  profiler-cli load profile.json.gz
855
855
  profiler-cli profile info
@@ -861,7 +861,7 @@ Examples:
861
861
  profiler-cli filter push --excludes-function f-184
862
862
  profiler-cli status
863
863
  profiler-cli stop --all`),t.on("command:*",r=>{console.error(`Error: Unknown command '${r[0]}'
864
- `),t.outputHelp(),process.exit(1)}),je(t.command("load <path>").description("Load a profile and start a daemon session")).action(async(r,n)=>{console.log(`Loading profile from ${r}...`);let o=await rP(yr,r,n.session);console.log(`Session started: ${o}`)}),je(t.command("status").description("Show session status (selected thread, zoom ranges, filters)")).action(async r=>{let n=await He(yr,{command:"status"},r.session);console.log(Ve(n,r.json??!1))}),je(t.command("stop [id]").description("Stop the current session, a specific session, or all with --all").option("--all","Stop all running sessions")).action(async(r,n)=>{if(n.all){let o=ef(yr);await Promise.all(o.map(a=>xy(yr,a)))}else{let o=r??n.session;await xy(yr,o)}}),t.command("guide").description("Show detailed usage guide (commands, patterns, tips)").action(()=>{console.log(sb)}),t.command("schemas").description("Show JSON output schemas for all commands").action(()=>{console.log(lb)}),wP(t,yr),CP(t,yr),EP(t,yr),NP(t,yr),AP(t,yr),PP(t,yr),RP(t,yr);try{await t.parseAsync(process.argv)}catch(r){console.error(`Error: ${r instanceof Error?r.message:r}`),process.exit(1)}}i6().catch(e=>{console.error(`Fatal error: ${e}`),process.exit(1)});
864
+ `),t.outputHelp(),process.exit(1)}),je(t.command("load <path>").description("Load a profile and start a daemon session").option("--symbol-server <url>","Symbol server URL for symbolication (overrides URL param and default Mozilla server)")).action(async(r,n)=>{console.log(`Loading profile from ${r}...`);let o=await sP(yr,r,n.session,n.symbolServer);console.log(`Session started: ${o}`)}),je(t.command("status").description("Show session status (selected thread, zoom ranges, filters)")).action(async r=>{let n=await He(yr,{command:"status"},r.session);console.log(Ve(n,r.json??!1))}),je(t.command("stop [id]").description("Stop the current session, a specific session, or all with --all").option("--all","Stop all running sessions")).action(async(r,n)=>{if(n.all){let o=nf(yr);await Promise.all(o.map(a=>wy(yr,a)))}else{let o=r??n.session;await wy(yr,o)}}),t.command("guide").description("Show detailed usage guide (commands, patterns, tips)").action(()=>{console.log(ub)}),t.command("schemas").description("Show JSON output schemas for all commands").action(()=>{console.log(db)}),NP(t,yr),RP(t,yr),MP(t,yr),FP(t,yr),OP(t,yr),LP(t,yr),DP(t,yr);try{await t.parseAsync(process.argv)}catch(r){console.error(`Error: ${r instanceof Error?r.message:r}`),process.exit(1)}}d6().catch(e=>{console.error(`Fatal error: ${e}`),process.exit(1)});
865
865
  /*! Bundled license information:
866
866
 
867
867
  react/cjs/react.production.min.js: