@firefox-devtools/profiler-cli 0.1.0-alpha.0 → 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,71 +2,71 @@
2
2
 
3
3
  // Polyfill browser globals for Node.js
4
4
  globalThis.self = globalThis;
5
- "use strict";var ZP=Object.create;var Sf=Object.defineProperty;var JP=Object.getOwnPropertyDescriptor;var YP=Object.getOwnPropertyNames;var XP=Object.getPrototypeOf,QP=Object.prototype.hasOwnProperty;var Eo=(e,t)=>()=>(e&&(t=e(e=0)),t);var O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Hy=(e,t)=>{for(var r in t)Sf(e,r,{get:t[r],enumerable:!0})},eR=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of YP(t))!QP.call(e,o)&&o!==r&&Sf(e,o,{get:()=>t[o],enumerable:!(n=JP(t,o))||n.enumerable});return e};var le=(e,t,r)=>(r=e!=null?ZP(XP(e)):{},eR(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:tR}=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 tR(`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 rR(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}wf.Argument=vf;wf.humanReadableArgName=rR});var Cf=O(_f=>{var{humanReadableArgName:nR}=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=>nR(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 Vy(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 tR=Object.create;var Sf=Object.defineProperty;var rR=Object.getOwnPropertyDescriptor;var nR=Object.getOwnPropertyNames;var oR=Object.getPrototypeOf,aR=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})},iR=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of nR(t))!aR.call(e,o)&&o!==r&&Sf(e,o,{get:()=>t[o],enumerable:!(n=rR(t,o))||n.enumerable});return e};var ce=(e,t,r)=>(r=e!=null?tR(oR(e)):{},iR(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:sR}=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 sR(`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 lR(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}wf.Argument=vf;wf.humanReadableArgName=lR});var Cf=O(_f=>{var{humanReadableArgName:cR}=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=>cR(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,`
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 Vy(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}_f.Help=kf;_f.stripColor=Vy});var Pf=O(Nf=>{var{InvalidArgumentError:oR}=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=aR(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 oR(`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?qy(this.name().replace(/^no-/,"")):qy(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}},Af=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 qy(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function aR(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 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:uR}=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=dR(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 uR(`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 dR(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}}Nf.Option=Ef;Nf.DualOptions=Af});var zy=O(jy=>{function iR(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 sR(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=iR(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}}Af.Option=Ef;Af.DualOptions=Nf});var Jy=O(Zy=>{function fR(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 pR(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=fR(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]}?)`:""}jy.suggestSimilar=sR});var Yy=O(Lf=>{var lR=require("node:events").EventEmitter,Rf=require("node:child_process"),bn=require("node:path"),Yl=require("node:fs"),Be=require("node:process"),{Argument:cR,humanReadableArgName:uR}=Jl(),{CommanderError:Mf}=Bi(),{Help:dR,stripColor:fR}=Cf(),{Option:Ky,DualOptions:pR}=Pf(),{suggestSimilar:Zy}=zy(),Ff=class e extends lR{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=>Be.stdout.write(r),writeErr:r=>Be.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>Be.stdout.isTTY?Be.stdout.columns:void 0,getErrHelpWidth:()=>Be.stderr.isTTY?Be.stderr.columns:void 0,getOutHasColors:()=>{var r,n;return Of()??(Be.stdout.isTTY&&((n=(r=Be.stdout).hasColors)==null?void 0:n.call(r)))},getErrHasColors:()=>{var r,n;return Of()??(Be.stderr.isTTY&&((n=(r=Be.stderr).hasColors)==null?void 0:n.call(r)))},stripColor:r=>fR(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 dR,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 cR(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)),Be.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 Ky(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 Ky)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=Be.versions)!=null&&o.electron&&(r.from="electron");let a=Be.execArgv??[];(a.includes("-e")||a.includes("--eval")||a.includes("-p")||a.includes("--print"))&&(r.from="eval")}t===void 0&&(t=Be.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":Be.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.
17
+ (Did you mean ${n[0]}?)`:""}Zy.suggestSimilar=pR});var eb=O(Lf=>{var hR=require("node:events").EventEmitter,Rf=require("node:child_process"),Tn=require("node:path"),Yl=require("node:fs"),Ue=require("node:process"),{Argument:mR,humanReadableArgName:gR}=Jl(),{CommanderError:Mf}=Bi(),{Help:yR,stripColor:bR}=Cf(),{Option:Yy,DualOptions:TR}=Pf(),{suggestSimilar:Xy}=Jy(),Ff=class e extends hR{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=>bR(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 yR,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 mR(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
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
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=bn.resolve(u,d);if(Yl.existsSync(f))return f;if(o.includes(bn.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=bn.resolve(bn.dirname(u),s)}if(s){let u=a(s,i);if(!u&&!t._executableFile&&this._scriptPath){let d=bn.basename(this._scriptPath,bn.extname(this._scriptPath));d!==this._name&&(u=a(s,`${d}-${t._name}`))}i=u||i}n=o.includes(bn.extname(i));let l;Be.platform!=="win32"?n?(r.unshift(i),r=Jy(Be.execArgv).concat(r),l=Rf.spawn(Be.argv[0],r,{stdio:"inherit"})):l=Rf.spawn(i,r,{stdio:"inherit"}):(this._checkForMissingExecutable(i,s,t._name),r.unshift(i),r=Jy(Be.execArgv).concat(r),l=Rf.spawn(Be.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{Be.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)")):Be.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)Be.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(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}
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 Be.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()}`,Be.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new pR(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=Zy(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=Zy(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=>uR(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=bn.basename(t,bn.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(Be.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 TR(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=>gR(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 Jy(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(Be.env.NO_COLOR||Be.env.FORCE_COLOR==="0"||Be.env.FORCE_COLOR==="false")return!1;if(Be.env.FORCE_COLOR||Be.env.CLICOLOR_FORCE!==void 0)return!0}Lf.Command=Ff;Lf.useColor=Of});var tb=O(Sr=>{var{Argument:Xy}=Jl(),{Command:Df}=Yy(),{CommanderError:hR,InvalidArgumentError:Qy}=Bi(),{Help:mR}=Cf(),{Option:eb}=Pf();Sr.program=new Df;Sr.createCommand=e=>new Df(e);Sr.createOption=(e,t)=>new eb(e,t);Sr.createArgument=(e,t)=>new Xy(e,t);Sr.Command=Df;Sr.Option=eb;Sr.Argument=Xy;Sr.Help=mR;Sr.CommanderError=hR;Sr.InvalidArgumentError=Qy;Sr.InvalidOptionArgumentError=Qy});var lb=O(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.createCacheKeyComparator=sb;Ta.defaultEqualityCheck=void 0;Ta.defaultMemoize=SR;var Xl="NOT_FOUND";function bR(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 TR(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 ib=function(t,r){return t===r};Ta.defaultEqualityCheck=ib;function sb(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 SR(e,t){var r=typeof t=="object"?t:{equalityCheck:t},n=r.equalityCheck,o=n===void 0?ib:n,a=r.maxSize,i=a===void 0?1:a,s=r.resultEqualityCheck,l=sb(o),c=i===1?bR(l):TR(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(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.createSelector=void 0;Sn.createSelectorCreator=cb;Sn.createStructuredSelector=void 0;Object.defineProperty(Sn,"defaultEqualityCheck",{enumerable:!0,get:function(){return Bf.defaultEqualityCheck}});Object.defineProperty(Sn,"defaultMemoize",{enumerable:!0,get:function(){return Bf.defaultMemoize}});var Bf=lb();function xR(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 cb(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=xR(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 ub=cb(Bf.defaultMemoize);Sn.createSelector=ub;var IR=function(t,r){if(r===void 0&&(r=ub),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};Sn.createStructuredSelector=IR});var pb=O((Ql,fb)=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var vR=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 db(e){e&&"limit"in e&&(this._limit=e.limit),this.clear()}db.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":vR(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=db;fb.exports=Ql.default});var Sa=O((ec,hb)=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var wR=pb(),kR=_R(wR);function _R(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 CR(e,t){var r=t&&t.cache||new kR.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=CR;hb.exports=ec.default});var Uf=O((tc,gb)=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var ER=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 mb(){this.clear()}mb.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":ER(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=mb;gb.exports=tc.default});var bb=O((rc,yb)=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var AR=(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}})(),NR=PR(["",""],["",""]);function PR(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function RR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var MR=(function(){function e(){for(var t=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return RR(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 AR(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(NR,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=MR;yb.exports=rc.default});var Bt=O((Ui,Tb)=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.default=void 0;var FR=bb(),OR=LR(FR);function LR(e){return e&&e.__esModule?e:{default:e}}Ui.default=OR.default;Tb.exports=Ui.default});var xb=O((nc,Sb)=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var DR=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=DR;Sb.exports=nc.default});var Ut=O(($i,Ib)=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.default=void 0;var BR=xb(),UR=$R(BR);function $R(e){return e&&e.__esModule?e:{default:e}}$i.default=UR.default;Ib.exports=$i.default});var wb=O((oc,vb)=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});function GR(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 WR=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,GR(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=WR;vb.exports=oc.default});var rn=O((Gi,kb)=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.default=void 0;var HR=wb(),VR=qR(HR);function qR(e){return e&&e.__esModule?e:{default:e}}Gi.default=VR.default;kb.exports=Gi.default});var Cb=O((ac,_b)=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var jR=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=jR;_b.exports=ac.default});var Jn=O((Wi,Eb)=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.default=void 0;var zR=Cb(),KR=ZR(zR);function ZR(e){return e&&e.__esModule?e:{default:e}}Wi.default=KR.default;Eb.exports=Wi.default});var Nb=O((ic,Ab)=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var JR=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=JR;Ab.exports=ic.default});var $f=O((Hi,Pb)=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.default=void 0;var YR=Nb(),XR=QR(YR);function QR(e){return e&&e.__esModule?e:{default:e}}Hi.default=XR.default;Pb.exports=Hi.default});var Mb=O((sc,Rb)=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var eM=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=eM;Rb.exports=sc.default});var Ob=O((Vi,Fb)=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.default=void 0;var tM=Mb(),rM=nM(tM);function nM(e){return e&&e.__esModule?e:{default:e}}Vi.default=rM.default;Fb.exports=Vi.default});var Db=O((lc,Lb)=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var oM={separator:"",conjunction:"",serial:!1},aM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:oM;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=aM;Lb.exports=lc.default});var xr=O((qi,Bb)=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.default=void 0;var iM=Db(),sM=lM(iM);function lM(e){return e&&e.__esModule?e:{default:e}}qi.default=sM.default;Bb.exports=qi.default});var $b=O((cc,Ub)=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var cM=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=cM;Ub.exports=cc.default});var uc=O((ji,Gb)=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.default=void 0;var uM=$b(),dM=fM(uM);function fM(e){return e&&e.__esModule?e:{default:e}}ji.default=dM.default;Gb.exports=ji.default});var Vb=O((dc,Hb)=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var Wb=function(t){return t!=null&&!Number.isNaN(t)&&typeof t!="boolean"},pM=function(){return{onSubstitution:function(r){return Array.isArray(r)?r.filter(Wb):Wb(r)?r:""}}};dc.default=pM;Hb.exports=dc.default});var Gf=O((zi,qb)=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.default=void 0;var hM=Vb(),mM=gM(hM);function gM(e){return e&&e.__esModule?e:{default:e}}zi.default=mM.default;qb.exports=zi.default});var zb=O((pc,jb)=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var yM=Bt(),bM=fc(yM),TM=rn(),SM=fc(TM),xM=xr(),IM=fc(xM),vM=Ut(),wM=fc(vM);function fc(e){return e&&e.__esModule?e:{default:e}}var kM=new bM.default((0,IM.default)({separator:","}),SM.default,wM.default);pc.default=kM;jb.exports=pc.default});var Zb=O((Ki,Kb)=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.default=void 0;var _M=zb(),CM=EM(_M);function EM(e){return e&&e.__esModule?e:{default:e}}Ki.default=CM.default;Kb.exports=Ki.default});var Yb=O((mc,Jb)=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var AM=Bt(),NM=hc(AM),PM=rn(),RM=hc(PM),MM=xr(),FM=hc(MM),OM=Ut(),LM=hc(OM);function hc(e){return e&&e.__esModule?e:{default:e}}var DM=new NM.default((0,FM.default)({separator:",",conjunction:"and"}),RM.default,LM.default);mc.default=DM;Jb.exports=mc.default});var Qb=O((Zi,Xb)=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.default=void 0;var BM=Yb(),UM=$M(BM);function $M(e){return e&&e.__esModule?e:{default:e}}Zi.default=UM.default;Xb.exports=Zi.default});var tT=O((yc,eT)=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var GM=Bt(),WM=gc(GM),HM=rn(),VM=gc(HM),qM=xr(),jM=gc(qM),zM=Ut(),KM=gc(zM);function gc(e){return e&&e.__esModule?e:{default:e}}var ZM=new WM.default((0,jM.default)({separator:",",conjunction:"or"}),VM.default,KM.default);yc.default=ZM;eT.exports=yc.default});var nT=O((Ji,rT)=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=void 0;var JM=tT(),YM=XM(JM);function XM(e){return e&&e.__esModule?e:{default:e}}Ji.default=YM.default;rT.exports=Ji.default});var aT=O((bc,oT)=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var QM=Bt(),eF=xa(QM),tF=rn(),rF=xa(tF),nF=xr(),oF=xa(nF),aF=Ut(),iF=xa(aF),sF=uc(),lF=xa(sF),cF=Gf(),uF=xa(cF);function xa(e){return e&&e.__esModule?e:{default:e}}var dF=new eF.default((0,lF.default)(`
31
- `),uF.default,oF.default,rF.default,iF.default);bc.default=dF;oT.exports=bc.default});var Tc=O((Yi,iT)=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=void 0;var fF=aT(),pF=hF(fF);function hF(e){return e&&e.__esModule?e:{default:e}}Yi.default=pF.default;iT.exports=Yi.default});var lT=O((Xi,sT)=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.default=void 0;var mF=Tc(),gF=yF(mF);function yF(e){return e&&e.__esModule?e:{default:e}}Xi.default=gF.default;sT.exports=Xi.default});var uT=O((Qi,cT)=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.default=void 0;var bF=Tc(),TF=SF(bF);function SF(e){return e&&e.__esModule?e:{default:e}}Qi.default=TF.default;cT.exports=Qi.default});var fT=O((Sc,dT)=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var xF=Bt(),IF=va(xF),vF=rn(),wF=va(vF),kF=xr(),_F=va(kF),CF=Ut(),EF=va(CF),AF=uc(),NF=va(AF),PF=$f(),Ia=va(PF);function va(e){return e&&e.__esModule?e:{default:e}}var RF=new IF.default((0,NF.default)(`
32
- `),_F.default,wF.default,EF.default,(0,Ia.default)(/&/g,"&amp;"),(0,Ia.default)(/</g,"&lt;"),(0,Ia.default)(/>/g,"&gt;"),(0,Ia.default)(/"/g,"&quot;"),(0,Ia.default)(/'/g,"&#x27;"),(0,Ia.default)(/`/g,"&#x60;"));Sc.default=RF;dT.exports=Sc.default});var hT=O((es,pT)=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.default=void 0;var MF=fT(),FF=OF(MF);function OF(e){return e&&e.__esModule?e:{default:e}}es.default=FF.default;pT.exports=es.default});var gT=O((xc,mT)=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var LF=Bt(),DF=Wf(LF),BF=Ut(),UF=Wf(BF),$F=Jn(),GF=Wf($F);function Wf(e){return e&&e.__esModule?e:{default:e}}var WF=new DF.default((0,GF.default)(/(?:\n(?:\s*))+/g," "),UF.default);xc.default=WF;mT.exports=xc.default});var bT=O((ts,yT)=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.default=void 0;var HF=gT(),VF=qF(HF);function qF(e){return e&&e.__esModule?e:{default:e}}ts.default=VF.default;yT.exports=ts.default});var ST=O((Ic,TT)=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var jF=Bt(),zF=Hf(jF),KF=Ut(),ZF=Hf(KF),JF=Jn(),YF=Hf(JF);function Hf(e){return e&&e.__esModule?e:{default:e}}var XF=new zF.default((0,YF.default)(/(?:\n\s*)/g,""),ZF.default);Ic.default=XF;TT.exports=Ic.default});var IT=O((rs,xT)=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.default=void 0;var QF=ST(),eO=tO(QF);function tO(e){return e&&e.__esModule?e:{default:e}}rs.default=eO.default;xT.exports=rs.default});var wT=O((wc,vT)=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var rO=Bt(),nO=vc(rO),oO=xr(),aO=vc(oO),iO=Ut(),sO=vc(iO),lO=Jn(),cO=vc(lO);function vc(e){return e&&e.__esModule?e:{default:e}}var uO=new nO.default((0,aO.default)({separator:","}),(0,cO.default)(/(?:\s+)/g," "),sO.default);wc.default=uO;vT.exports=wc.default});var _T=O((ns,kT)=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.default=void 0;var dO=wT(),fO=pO(dO);function pO(e){return e&&e.__esModule?e:{default:e}}ns.default=fO.default;kT.exports=ns.default});var ET=O((_c,CT)=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var hO=Bt(),mO=kc(hO),gO=xr(),yO=kc(gO),bO=Ut(),TO=kc(bO),SO=Jn(),xO=kc(SO);function kc(e){return e&&e.__esModule?e:{default:e}}var IO=new mO.default((0,yO.default)({separator:",",conjunction:"or"}),(0,xO.default)(/(?:\s+)/g," "),TO.default);_c.default=IO;CT.exports=_c.default});var NT=O((os,AT)=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.default=void 0;var vO=ET(),wO=kO(vO);function kO(e){return e&&e.__esModule?e:{default:e}}os.default=wO.default;AT.exports=os.default});var RT=O((Ec,PT)=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var _O=Bt(),CO=Cc(_O),EO=xr(),AO=Cc(EO),NO=Ut(),PO=Cc(NO),RO=Jn(),MO=Cc(RO);function Cc(e){return e&&e.__esModule?e:{default:e}}var FO=new CO.default((0,AO.default)({separator:",",conjunction:"and"}),(0,MO.default)(/(?:\s+)/g," "),PO.default);Ec.default=FO;PT.exports=Ec.default});var FT=O((as,MT)=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.default=void 0;var OO=RT(),LO=DO(OO);function DO(e){return e&&e.__esModule?e:{default:e}}as.default=LO.default;MT.exports=as.default});var LT=O((Nc,OT)=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var BO=Bt(),UO=Ac(BO),$O=rn(),GO=Ac($O),WO=xr(),HO=Ac(WO),VO=Ut(),qO=Ac(VO);function Ac(e){return e&&e.__esModule?e:{default:e}}var jO=new UO.default(HO.default,GO.default,qO.default);Nc.default=jO;OT.exports=Nc.default});var BT=O((is,DT)=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.default=void 0;var zO=LT(),KO=ZO(zO);function ZO(e){return e&&e.__esModule?e:{default:e}}is.default=KO.default;DT.exports=is.default});var $T=O((Rc,UT)=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var JO=Bt(),YO=Pc(JO),XO=xr(),QO=Pc(XO),e1=Ut(),t1=Pc(e1),r1=Jn(),n1=Pc(r1);function Pc(e){return e&&e.__esModule?e:{default:e}}var o1=new YO.default(QO.default,(0,n1.default)(/(?:\s+)/g," "),t1.default);Rc.default=o1;UT.exports=Rc.default});var WT=O((ss,GT)=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.default=void 0;var a1=$T(),i1=s1(a1);function s1(e){return e&&e.__esModule?e:{default:e}}ss.default=i1.default;GT.exports=ss.default});var VT=O((Mc,HT)=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var l1=Bt(),c1=Vf(l1),u1=rn(),d1=Vf(u1),f1=Ut(),p1=Vf(f1);function Vf(e){return e&&e.__esModule?e:{default:e}}var h1=new c1.default(d1.default,p1.default);Mc.default=h1;HT.exports=Mc.default});var jT=O((ls,qT)=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.default=void 0;var m1=VT(),g1=y1(m1);function y1(e){return e&&e.__esModule?e:{default:e}}ls.default=g1.default;qT.exports=ls.default});var KT=O((Fc,zT)=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var b1=Bt(),T1=qf(b1),S1=rn(),x1=qf(S1),I1=Ut(),v1=qf(I1);function qf(e){return e&&e.__esModule?e:{default:e}}var w1=new T1.default((0,x1.default)("all"),v1.default);Fc.default=w1;zT.exports=Fc.default});var JT=O((cs,ZT)=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.default=void 0;var k1=KT(),_1=C1(k1);function C1(e){return e&&e.__esModule?e:{default:e}}cs.default=_1.default;ZT.exports=cs.default});var Ir=O(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.stripIndents=ce.stripIndent=ce.oneLineInlineLists=ce.inlineLists=ce.oneLineCommaListsAnd=ce.oneLineCommaListsOr=ce.oneLineCommaLists=ce.oneLineTrim=ce.oneLine=ce.safeHtml=ce.source=ce.codeBlock=ce.html=ce.commaListsOr=ce.commaListsAnd=ce.commaLists=ce.removeNonPrintingValuesTransformer=ce.splitStringTransformer=ce.inlineArrayTransformer=ce.replaceStringTransformer=ce.replaceSubstitutionTransformer=ce.replaceResultTransformer=ce.stripIndentTransformer=ce.trimResultTransformer=ce.TemplateTag=void 0;var E1=Bt(),A1=Ye(E1),N1=Ut(),P1=Ye(N1),R1=rn(),M1=Ye(R1),F1=Jn(),O1=Ye(F1),L1=$f(),D1=Ye(L1),B1=Ob(),U1=Ye(B1),$1=xr(),G1=Ye($1),W1=uc(),H1=Ye(W1),V1=Gf(),q1=Ye(V1),j1=Zb(),z1=Ye(j1),K1=Qb(),Z1=Ye(K1),J1=nT(),Y1=Ye(J1),X1=Tc(),Q1=Ye(X1),eL=lT(),tL=Ye(eL),rL=uT(),nL=Ye(rL),oL=hT(),aL=Ye(oL),iL=bT(),sL=Ye(iL),lL=IT(),cL=Ye(lL),uL=_T(),dL=Ye(uL),fL=NT(),pL=Ye(fL),hL=FT(),mL=Ye(hL),gL=BT(),yL=Ye(gL),bL=WT(),TL=Ye(bL),SL=jT(),xL=Ye(SL),IL=JT(),vL=Ye(IL);function Ye(e){return e&&e.__esModule?e:{default:e}}ce.TemplateTag=A1.default;ce.trimResultTransformer=P1.default;ce.stripIndentTransformer=M1.default;ce.replaceResultTransformer=O1.default;ce.replaceSubstitutionTransformer=D1.default;ce.replaceStringTransformer=U1.default;ce.inlineArrayTransformer=G1.default;ce.splitStringTransformer=H1.default;ce.removeNonPrintingValuesTransformer=q1.default;ce.commaLists=z1.default;ce.commaListsAnd=Z1.default;ce.commaListsOr=Y1.default;ce.html=Q1.default;ce.codeBlock=tL.default;ce.source=nL.default;ce.safeHtml=aL.default;ce.oneLine=sL.default;ce.oneLineTrim=cL.default;ce.oneLineCommaLists=dL.default;ce.oneLineCommaListsOr=pL.default;ce.oneLineCommaListsAnd=mL.default;ce.inlineLists=yL.default;ce.oneLineInlineLists=TL.default;ce.stripIndent=xL.default;ce.stripIndents=vL.default});var YT,us,cr=Eo(()=>{"use strict";YT="profile-store",us="https://symbolication.services.mozilla.com"});function XT(){return{weightType:"samples",weight:null,stack:[],time:[],length:0}}function nn(){return{frame:[],prefix:[],length:0}}function wa(){return{weightType:"samples",weight:null,eventDelay:[],stack:[],time:[],length:0}}function ka(){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 _a(){return{isJS:[],relevantForJS:[],name:[],resource:[],source:[],lineNumber:[],columnNumber:[],length:0}}function Ca(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 QT(e){return{libIndex:e.libIndex.slice(),address:e.address.slice(),name:e.name.slice(),functionSize:e.functionSize.slice(),length:e.length}}function Ea(){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 eS(){return{time:[],className:[],typeName:[],coarseType:[],weight:[],weightType:"bytes",inNursery:[],stack:[],length:0}}function Lc(){return{time:[],weight:[],weightType:"bytes",stack:[],length:0}}function jf(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 Na(){return{id:[],filename:[],startLine:[],startColumn:[],sourceMapURL:[],length:0}}function Pa(e){return{...{processType:"default",processStartupTime:0,processShutdownTime:null,registerTime:0,unregisterTime:null,pausedRanges:[],name:"Empty",isMainThread:!1,pid:"0",tid:0,samples:wa(),markers:Ur()},...e}}function wL(){return{stackTable:nn(),frameTable:ka(),funcTable:_a(),resourceTable:Ea(),nativeSymbols:Aa(),sources:Na(),stringArray:[]}}function No(){return{meta:{interval:1,startTime:0,abi:"",misc:"",oscpu:"",platform:"",processType:0,extensions:ds(),categories:zf(),product:"Firefox",stackwalk:0,toolkit:"",version:34,preprocessedProfileVersion:61,appBuildID:"",sourceURL:"",physicalCPUs:0,logicalCPUs:0,CPUName:"",symbolicated:!0,markerSchema:[]},libs:[],pages:[],shared:wL(),threads:[]}}function tS(){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 tr=Eo(()=>{"use strict";cr()});function oe(e,t=`There was an unhandled case for the value: "${e}"`){throw new Error(t)}function aS(e,...t){return Object.assign({},e,...t)}function iS(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 sS(e){let t=iS(e);if(!t)throw new Error(`Attempted to assert that "${e}" is a valid TransformType, and it was not.`);return t}function lS(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 G(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 In(e){return e.values().next().value}var me=Eo(()=>{"use strict"});var YS,Ue,ur=Eo(()=>{"use strict";YS=new WeakMap,Ue=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=YS.get(t);return r===void 0&&(r=new e(t),YS.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 QS=O((dz,XS)=>{"use strict";XS.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}});var Fx=O((Jc,Mx)=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var CD=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 Rx(e){e&&"limit"in e&&(this._limit=e.limit),this.clear()}Rx.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":CD(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=Rx;Mx.exports=Jc.default});var iv=O((du,av)=>{(function(e,t){typeof du=="object"&&typeof av<"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 bv=O(xe=>{"use strict";var Rs=Symbol.for("react.element"),GU=Symbol.for("react.portal"),WU=Symbol.for("react.fragment"),HU=Symbol.for("react.strict_mode"),VU=Symbol.for("react.profiler"),qU=Symbol.for("react.provider"),jU=Symbol.for("react.context"),zU=Symbol.for("react.forward_ref"),KU=Symbol.for("react.suspense"),ZU=Symbol.for("react.memo"),JU=Symbol.for("react.lazy"),sv=Symbol.iterator;function YU(e){return e===null||typeof e!="object"?null:(e=sv&&e[sv]||e["@@iterator"],typeof e=="function"?e:null)}var uv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},dv=Object.assign,fv={};function qa(e,t,r){this.props=e,this.context=t,this.refs=fv,this.updater=r||uv}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 pv(){}pv.prototype=qa.prototype;function Yp(e,t,r){this.props=e,this.context=t,this.refs=fv,this.updater=r||uv}var Xp=Yp.prototype=new pv;Xp.constructor=Yp;dv(Xp,qa.prototype);Xp.isPureReactComponent=!0;var lv=Array.isArray,hv=Object.prototype.hasOwnProperty,Qp={current:null},mv={key:!0,ref:!0,__self:!0,__source:!0};function gv(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)hv.call(t,n)&&!mv.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 XU(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 QU(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var cv=/\/+/g;function Jp(e,t){return typeof e=="object"&&e!==null&&e.key!=null?QU(""+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 GU:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+Jp(i,0):n,lv(o)?(r="",e!=null&&(r=e.replace(cv,"$&/")+"/"),pu(o,t,r,"",function(c){return c})):o!=null&&(eh(o)&&(o=XU(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(cv,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",lv(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=YU(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 e$(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},t$={ReactCurrentDispatcher:Zt,ReactCurrentBatchConfig:hu,ReactCurrentOwner:Qp};function yv(){throw Error("act(...) is not supported in production builds of React.")}xe.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}};xe.Component=qa;xe.Fragment=WU;xe.Profiler=VU;xe.PureComponent=Yp;xe.StrictMode=HU;xe.Suspense=KU;xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t$;xe.act=yv;xe.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=dv({},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)hv.call(t,l)&&!mv.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}};xe.createContext=function(e){return e={$$typeof:jU,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:qU,_context:e},e.Consumer=e};xe.createElement=gv;xe.createFactory=function(e){var t=gv.bind(null,e);return t.type=e,t};xe.createRef=function(){return{current:null}};xe.forwardRef=function(e){return{$$typeof:zU,render:e}};xe.isValidElement=eh;xe.lazy=function(e){return{$$typeof:JU,_payload:{_status:-1,_result:e},_init:e$}};xe.memo=function(e,t){return{$$typeof:ZU,type:e,compare:t===void 0?null:t}};xe.startTransition=function(e){var t=hu.transition;hu.transition={};try{e()}finally{hu.transition=t}};xe.unstable_act=yv;xe.useCallback=function(e,t){return Zt.current.useCallback(e,t)};xe.useContext=function(e){return Zt.current.useContext(e)};xe.useDebugValue=function(){};xe.useDeferredValue=function(e){return Zt.current.useDeferredValue(e)};xe.useEffect=function(e,t){return Zt.current.useEffect(e,t)};xe.useId=function(){return Zt.current.useId()};xe.useImperativeHandle=function(e,t,r){return Zt.current.useImperativeHandle(e,t,r)};xe.useInsertionEffect=function(e,t){return Zt.current.useInsertionEffect(e,t)};xe.useLayoutEffect=function(e,t){return Zt.current.useLayoutEffect(e,t)};xe.useMemo=function(e,t){return Zt.current.useMemo(e,t)};xe.useReducer=function(e,t,r){return Zt.current.useReducer(e,t,r)};xe.useRef=function(e){return Zt.current.useRef(e)};xe.useState=function(e){return Zt.current.useState(e)};xe.useSyncExternalStore=function(e,t,r){return Zt.current.useSyncExternalStore(e,t,r)};xe.useTransition=function(){return Zt.current.useTransition()};xe.version="18.3.1"});var Tv=O((Ie,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 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,A=!1,F=!1,W=!1,U={ReactCurrentDispatcher:g,ReactCurrentBatchConfig:m,ReactCurrentOwner:S};U.ReactDebugCurrentFrame=I,U.ReactCurrentActQueue=T;function K(x){{for(var C=arguments.length,D=new Array(C>1?C-1:0),B=1;B<C;B++)D[B-1]=arguments[B];Oe("warn",x,D)}}function J(x){{for(var C=arguments.length,D=new Array(C>1?C-1:0),B=1;B<C;B++)D[B-1]=arguments[B];Oe("error",x,D)}}function Oe(x,C,D){{var B=U.ReactDebugCurrentFrame,Y=B.getStackAddendum();Y!==""&&(C+="%s",D=D.concat([Y]));var ue=D.map(function(ie){return String(ie)});ue.unshift("Warning: "+C),Function.prototype.apply.call(console[x],console,ue)}}var L={};function Q(x,C){{var D=x.constructor,B=D&&(D.displayName||D.name)||"ReactClass",Y=B+"."+C;if(L[Y])return;J("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,B),L[Y]=!0}}var N={isMounted:function(x){return!1},enqueueForceUpdate:function(x,C,D){Q(x,"forceUpdate")},enqueueReplaceState:function(x,C,D,B){Q(x,"replaceState")},enqueueSetState:function(x,C,D,B){Q(x,"setState")}},M=Object.assign,R={};Object.freeze(R);function P(x,C,D){this.props=x,this.context=C,this.refs=R,this.updater=D||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)."]},z=function(x,C){Object.defineProperty(P.prototype,x,{get:function(){K("%s(...) is deprecated in plain JavaScript React classes. %s",C[0],C[1])}})};for(var re in $)$.hasOwnProperty(re)&&z(re,$[re])}function ae(){}ae.prototype=P.prototype;function Ee(x,C,D){this.props=x,this.context=C,this.refs=R,this.updater=D||N}var ve=Ee.prototype=new ae;ve.constructor=Ee,M(ve,P.prototype),ve.isPureReactComponent=!0;function ge(){var x={current:null};return Object.seal(x),x}var be=Array.isArray;function Ae(x){return be(x)}function H(x){{var C=typeof Symbol=="function"&&Symbol.toStringTag,D=C&&x[Symbol.toStringTag]||x.constructor.name||"Object";return D}}function X(x){try{return Z(x),!1}catch{return!0}}function Z(x){return""+x}function ee(x){if(X(x))return J("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",H(x)),Z(x)}function Te(x,C,D){var B=x.displayName;if(B)return B;var Y=C.displayName||C.name||"";return Y!==""?D+"("+Y+")":D}function Le(x){return x.displayName||"Context"}function Ze(x){if(x==null)return null;if(typeof x.tag=="number"&&J("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 Le(C)+".Consumer";case i:var D=x;return Le(D._context)+".Provider";case l:return Te(x,x.render,"ForwardRef");case d:var B=x.displayName||null;return B!==null?B:Ze(x.type)||"Memo";case f:{var Y=x,ue=Y._payload,ie=Y._init;try{return Ze(ie(ue))}catch{return null}}}return null}var st=Object.prototype.hasOwnProperty,Qe={key:!0,ref:!0,__self:!0,__source:!0},br,Xt,jt;jt={};function Ot(x){if(st.call(x,"ref")){var C=Object.getOwnPropertyDescriptor(x,"ref").get;if(C&&C.isReactWarning)return!1}return x.ref!==void 0}function mt(x){if(st.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 D=function(){br||(br=!0,J("%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))};D.isReactWarning=!0,Object.defineProperty(x,"key",{get:D,configurable:!0})}function Lt(x,C){var D=function(){Xt||(Xt=!0,J("%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))};D.isReactWarning=!0,Object.defineProperty(x,"ref",{get:D,configurable:!0})}function Qt(x){if(typeof x.ref=="string"&&S.current&&x.__self&&S.current.stateNode!==x.__self){var C=Ze(S.current.type);jt[C]||(J('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),jt[C]=!0)}}var Tr=function(x,C,D,B,Y,ue,ie){var pe={$$typeof:t,type:x,key:C,ref:D,props:ie,_owner:ue};return pe._store={},Object.defineProperty(pe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(pe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.defineProperty(pe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.freeze&&(Object.freeze(pe.props),Object.freeze(pe)),pe};function fa(x,C,D){var B,Y={},ue=null,ie=null,pe=null,Ne=null;if(C!=null){Ot(C)&&(ie=C.ref,Qt(C)),mt(C)&&(ee(C.key),ue=""+C.key),pe=C.__self===void 0?null:C.__self,Ne=C.__source===void 0?null:C.__source;for(B in C)st.call(C,B)&&!Qe.hasOwnProperty(B)&&(Y[B]=C[B])}var Ke=arguments.length-2;if(Ke===1)Y.children=D;else if(Ke>1){for(var et=Array(Ke),tt=0;tt<Ke;tt++)et[tt]=arguments[tt+2];Object.freeze&&Object.freeze(et),Y.children=et}if(x&&x.defaultProps){var at=x.defaultProps;for(B in at)Y[B]===void 0&&(Y[B]=at[B])}if(ue||ie){var gt=typeof x=="function"?x.displayName||x.name||"Unknown":x;ue&&zt(Y,gt),ie&&Lt(Y,gt)}return Tr(x,ue,ie,pe,Ne,S.current,Y)}function _o(x,C){var D=Tr(x.type,C,x.ref,x._self,x._source,x._owner,x.props);return D}function Oi(x,C,D){if(x==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+x+".");var B,Y=M({},x.props),ue=x.key,ie=x.ref,pe=x._self,Ne=x._source,Ke=x._owner;if(C!=null){Ot(C)&&(ie=C.ref,Ke=S.current),mt(C)&&(ee(C.key),ue=""+C.key);var et;x.type&&x.type.defaultProps&&(et=x.type.defaultProps);for(B in C)st.call(C,B)&&!Qe.hasOwnProperty(B)&&(C[B]===void 0&&et!==void 0?Y[B]=et[B]:Y[B]=C[B])}var tt=arguments.length-2;if(tt===1)Y.children=D;else if(tt>1){for(var at=Array(tt),gt=0;gt<tt;gt++)at[gt]=arguments[gt+2];Y.children=at}return Tr(x.type,ue,ie,pe,Ne,Ke,Y)}function tn(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}var pa=".",nf=":";function of(x){var C=/[=:]/g,D={"=":"=0",":":"=2"},B=x.replace(C,function(Y){return D[Y]});return"$"+B}var Ml=!1,af=/\/+/g;function ha(x){return x.replace(af,"$&/")}function ma(x,C){return typeof x=="object"&&x!==null&&x.key!=null?(ee(x.key),of(""+x.key)):C.toString(36)}function Dr(x,C,D,B,Y){var ue=typeof x;(ue==="undefined"||ue==="boolean")&&(x=null);var ie=!1;if(x===null)ie=!0;else switch(ue){case"string":case"number":ie=!0;break;case"object":switch(x.$$typeof){case t:case r:ie=!0}}if(ie){var pe=x,Ne=Y(pe),Ke=B===""?pa+ma(pe,0):B;if(Ae(Ne)){var et="";Ke!=null&&(et=ha(Ke)+"/"),Dr(Ne,C,et,"",function(KP){return KP})}else Ne!=null&&(tn(Ne)&&(Ne.key&&(!pe||pe.key!==Ne.key)&&ee(Ne.key),Ne=_o(Ne,D+(Ne.key&&(!pe||pe.key!==Ne.key)?ha(""+Ne.key)+"/":"")+Ke)),C.push(Ne));return 1}var tt,at,gt=0,Nt=B===""?pa:B+nf;if(Ae(x))for(var Kl=0;Kl<x.length;Kl++)tt=x[Kl],at=Nt+ma(tt,Kl),gt+=Dr(tt,C,D,at,Y);else{var Tf=b(x);if(typeof Tf=="function"){var $y=x;Tf===$y.entries&&(Ml||K("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ml=!0);for(var jP=Tf.call($y),Gy,zP=0;!(Gy=jP.next()).done;)tt=Gy.value,at=Nt+ma(tt,zP++),gt+=Dr(tt,C,D,at,Y)}else if(ue==="object"){var Wy=String(x);throw new Error("Objects are not valid as a React child (found: "+(Wy==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":Wy)+"). If you meant to render a collection of children, use an array instead.")}}return gt}function zn(x,C,D){if(x==null)return x;var B=[],Y=0;return Dr(x,B,"","",function(ue){return C.call(D,ue,Y++)}),B}function Li(x){var C=0;return zn(x,function(){C++}),C}function Fl(x,C,D){zn(x,function(){C.apply(this,arguments)},D)}function sf(x){return zn(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 D=!1,B=!1,Y=!1;{var ue={$$typeof:s,_context:C};Object.defineProperties(ue,{Provider:{get:function(){return B||(B=!0,J("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 D||(D=!0,J("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){Y||(K("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",ie),Y=!0)}}}),C.Consumer=ue}return C._currentRenderer=null,C._currentRenderer2=null,C}var Kn=-1,ga=0,Ll=1,cf=2;function Dl(x){if(x._status===Kn){var C=x._result,D=C();if(D.then(function(ue){if(x._status===ga||x._status===Kn){var ie=x;ie._status=Ll,ie._result=ue}},function(ue){if(x._status===ga||x._status===Kn){var ie=x;ie._status=cf,ie._result=ue}}),x._status===Kn){var B=x;B._status=ga,B._result=D}}if(x._status===Ll){var Y=x._result;return Y===void 0&&J(`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 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:SR,InvalidArgumentError:rb}=Bi(),{Help:xR}=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=xR;Sr.CommanderError=SR;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=_R;var Xl="NOT_FOUND";function wR(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 kR(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 _R(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?wR(l):kR(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 CR(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=CR(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 ER=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=ER});var gb=O((Ql,mb)=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var NR=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":NR(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 AR=gb(),PR=RR(AR);function RR(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 MR(e,t){var r=t&&t.cache||new PR.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=MR;yb.exports=ec.default});var Uf=O((tc,Tb)=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var FR=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":FR(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 OR=(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}})(),LR=DR(["",""],["",""]);function DR(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function BR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var UR=(function(){function e(){for(var t=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return BR(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 OR(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(LR,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=UR;Sb.exports=rc.default});var Bt=O((Ui,Ib)=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.default=void 0;var $R=xb(),GR=WR($R);function WR(e){return e&&e.__esModule?e:{default:e}}Ui.default=GR.default;Ib.exports=Ui.default});var wb=O((nc,vb)=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var HR=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=HR;vb.exports=nc.default});var Ut=O(($i,kb)=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.default=void 0;var VR=wb(),jR=qR(VR);function qR(e){return e&&e.__esModule?e:{default:e}}$i.default=jR.default;kb.exports=$i.default});var Cb=O((oc,_b)=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});function zR(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 KR=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,zR(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=KR;_b.exports=oc.default});var rn=O((Gi,Eb)=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.default=void 0;var ZR=Cb(),JR=YR(ZR);function YR(e){return e&&e.__esModule?e:{default:e}}Gi.default=JR.default;Eb.exports=Gi.default});var Ab=O((ac,Nb)=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var XR=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=XR;Nb.exports=ac.default});var Yn=O((Wi,Pb)=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.default=void 0;var QR=Ab(),eM=tM(QR);function tM(e){return e&&e.__esModule?e:{default:e}}Wi.default=eM.default;Pb.exports=Wi.default});var Mb=O((ic,Rb)=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var rM=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=rM;Rb.exports=ic.default});var $f=O((Hi,Fb)=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.default=void 0;var nM=Mb(),oM=aM(nM);function aM(e){return e&&e.__esModule?e:{default:e}}Hi.default=oM.default;Fb.exports=Hi.default});var Lb=O((sc,Ob)=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var iM=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=iM;Ob.exports=sc.default});var Bb=O((Vi,Db)=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.default=void 0;var sM=Lb(),lM=cM(sM);function cM(e){return e&&e.__esModule?e:{default:e}}Vi.default=lM.default;Db.exports=Vi.default});var $b=O((lc,Ub)=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var uM={separator:"",conjunction:"",serial:!1},dM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:uM;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=dM;Ub.exports=lc.default});var xr=O((ji,Gb)=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.default=void 0;var fM=$b(),pM=hM(fM);function hM(e){return e&&e.__esModule?e:{default:e}}ji.default=pM.default;Gb.exports=ji.default});var Hb=O((cc,Wb)=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var mM=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=mM;Wb.exports=cc.default});var uc=O((qi,Vb)=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.default=void 0;var gM=Hb(),yM=bM(gM);function bM(e){return e&&e.__esModule?e:{default:e}}qi.default=yM.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"},TM=function(){return{onSubstitution:function(r){return Array.isArray(r)?r.filter(jb):jb(r)?r:""}}};dc.default=TM;qb.exports=dc.default});var Gf=O((zi,Kb)=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.default=void 0;var SM=zb(),xM=IM(SM);function IM(e){return e&&e.__esModule?e:{default:e}}zi.default=xM.default;Kb.exports=zi.default});var Jb=O((pc,Zb)=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var vM=Bt(),wM=fc(vM),kM=rn(),_M=fc(kM),CM=xr(),EM=fc(CM),NM=Ut(),AM=fc(NM);function fc(e){return e&&e.__esModule?e:{default:e}}var PM=new wM.default((0,EM.default)({separator:","}),_M.default,AM.default);pc.default=PM;Zb.exports=pc.default});var Xb=O((Ki,Yb)=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.default=void 0;var RM=Jb(),MM=FM(RM);function FM(e){return e&&e.__esModule?e:{default:e}}Ki.default=MM.default;Yb.exports=Ki.default});var eT=O((mc,Qb)=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var OM=Bt(),LM=hc(OM),DM=rn(),BM=hc(DM),UM=xr(),$M=hc(UM),GM=Ut(),WM=hc(GM);function hc(e){return e&&e.__esModule?e:{default:e}}var HM=new LM.default((0,$M.default)({separator:",",conjunction:"and"}),BM.default,WM.default);mc.default=HM;Qb.exports=mc.default});var rT=O((Zi,tT)=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.default=void 0;var VM=eT(),jM=qM(VM);function qM(e){return e&&e.__esModule?e:{default:e}}Zi.default=jM.default;tT.exports=Zi.default});var oT=O((yc,nT)=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var zM=Bt(),KM=gc(zM),ZM=rn(),JM=gc(ZM),YM=xr(),XM=gc(YM),QM=Ut(),eF=gc(QM);function gc(e){return e&&e.__esModule?e:{default:e}}var tF=new KM.default((0,XM.default)({separator:",",conjunction:"or"}),JM.default,eF.default);yc.default=tF;nT.exports=yc.default});var iT=O((Ji,aT)=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=void 0;var rF=oT(),nF=oF(rF);function oF(e){return e&&e.__esModule?e:{default:e}}Ji.default=nF.default;aT.exports=Ji.default});var lT=O((bc,sT)=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var aF=Bt(),iF=Ia(aF),sF=rn(),lF=Ia(sF),cF=xr(),uF=Ia(cF),dF=Ut(),fF=Ia(dF),pF=uc(),hF=Ia(pF),mF=Gf(),gF=Ia(mF);function Ia(e){return e&&e.__esModule?e:{default:e}}var yF=new iF.default((0,hF.default)(`
31
+ `),gF.default,uF.default,lF.default,fF.default);bc.default=yF;sT.exports=bc.default});var Tc=O((Yi,cT)=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=void 0;var bF=lT(),TF=SF(bF);function SF(e){return e&&e.__esModule?e:{default:e}}Yi.default=TF.default;cT.exports=Yi.default});var dT=O((Xi,uT)=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.default=void 0;var xF=Tc(),IF=vF(xF);function vF(e){return e&&e.__esModule?e:{default:e}}Xi.default=IF.default;uT.exports=Xi.default});var pT=O((Qi,fT)=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.default=void 0;var wF=Tc(),kF=_F(wF);function _F(e){return e&&e.__esModule?e:{default:e}}Qi.default=kF.default;fT.exports=Qi.default});var mT=O((Sc,hT)=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var CF=Bt(),EF=wa(CF),NF=rn(),AF=wa(NF),PF=xr(),RF=wa(PF),MF=Ut(),FF=wa(MF),OF=uc(),LF=wa(OF),DF=$f(),va=wa(DF);function wa(e){return e&&e.__esModule?e:{default:e}}var BF=new EF.default((0,LF.default)(`
32
+ `),RF.default,AF.default,FF.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=BF;hT.exports=Sc.default});var yT=O((es,gT)=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.default=void 0;var UF=mT(),$F=GF(UF);function GF(e){return e&&e.__esModule?e:{default:e}}es.default=$F.default;gT.exports=es.default});var TT=O((xc,bT)=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var WF=Bt(),HF=Wf(WF),VF=Ut(),jF=Wf(VF),qF=Yn(),zF=Wf(qF);function Wf(e){return e&&e.__esModule?e:{default:e}}var KF=new HF.default((0,zF.default)(/(?:\n(?:\s*))+/g," "),jF.default);xc.default=KF;bT.exports=xc.default});var xT=O((ts,ST)=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.default=void 0;var ZF=TT(),JF=YF(ZF);function YF(e){return e&&e.__esModule?e:{default:e}}ts.default=JF.default;ST.exports=ts.default});var vT=O((Ic,IT)=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var XF=Bt(),QF=Hf(XF),eO=Ut(),tO=Hf(eO),rO=Yn(),nO=Hf(rO);function Hf(e){return e&&e.__esModule?e:{default:e}}var oO=new QF.default((0,nO.default)(/(?:\n\s*)/g,""),tO.default);Ic.default=oO;IT.exports=Ic.default});var kT=O((rs,wT)=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.default=void 0;var aO=vT(),iO=sO(aO);function sO(e){return e&&e.__esModule?e:{default:e}}rs.default=iO.default;wT.exports=rs.default});var CT=O((wc,_T)=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var lO=Bt(),cO=vc(lO),uO=xr(),dO=vc(uO),fO=Ut(),pO=vc(fO),hO=Yn(),mO=vc(hO);function vc(e){return e&&e.__esModule?e:{default:e}}var gO=new cO.default((0,dO.default)({separator:","}),(0,mO.default)(/(?:\s+)/g," "),pO.default);wc.default=gO;_T.exports=wc.default});var NT=O((ns,ET)=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.default=void 0;var yO=CT(),bO=TO(yO);function TO(e){return e&&e.__esModule?e:{default:e}}ns.default=bO.default;ET.exports=ns.default});var PT=O((_c,AT)=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var SO=Bt(),xO=kc(SO),IO=xr(),vO=kc(IO),wO=Ut(),kO=kc(wO),_O=Yn(),CO=kc(_O);function kc(e){return e&&e.__esModule?e:{default:e}}var EO=new xO.default((0,vO.default)({separator:",",conjunction:"or"}),(0,CO.default)(/(?:\s+)/g," "),kO.default);_c.default=EO;AT.exports=_c.default});var MT=O((os,RT)=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.default=void 0;var NO=PT(),AO=PO(NO);function PO(e){return e&&e.__esModule?e:{default:e}}os.default=AO.default;RT.exports=os.default});var OT=O((Ec,FT)=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var RO=Bt(),MO=Cc(RO),FO=xr(),OO=Cc(FO),LO=Ut(),DO=Cc(LO),BO=Yn(),UO=Cc(BO);function Cc(e){return e&&e.__esModule?e:{default:e}}var $O=new MO.default((0,OO.default)({separator:",",conjunction:"and"}),(0,UO.default)(/(?:\s+)/g," "),DO.default);Ec.default=$O;FT.exports=Ec.default});var DT=O((as,LT)=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.default=void 0;var GO=OT(),WO=HO(GO);function HO(e){return e&&e.__esModule?e:{default:e}}as.default=WO.default;LT.exports=as.default});var UT=O((Ac,BT)=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var VO=Bt(),jO=Nc(VO),qO=rn(),zO=Nc(qO),KO=xr(),ZO=Nc(KO),JO=Ut(),YO=Nc(JO);function Nc(e){return e&&e.__esModule?e:{default:e}}var XO=new jO.default(ZO.default,zO.default,YO.default);Ac.default=XO;BT.exports=Ac.default});var GT=O((is,$T)=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.default=void 0;var QO=UT(),e1=t1(QO);function t1(e){return e&&e.__esModule?e:{default:e}}is.default=e1.default;$T.exports=is.default});var HT=O((Rc,WT)=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var r1=Bt(),n1=Pc(r1),o1=xr(),a1=Pc(o1),i1=Ut(),s1=Pc(i1),l1=Yn(),c1=Pc(l1);function Pc(e){return e&&e.__esModule?e:{default:e}}var u1=new n1.default(a1.default,(0,c1.default)(/(?:\s+)/g," "),s1.default);Rc.default=u1;WT.exports=Rc.default});var jT=O((ss,VT)=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.default=void 0;var d1=HT(),f1=p1(d1);function p1(e){return e&&e.__esModule?e:{default:e}}ss.default=f1.default;VT.exports=ss.default});var zT=O((Mc,qT)=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var h1=Bt(),m1=Vf(h1),g1=rn(),y1=Vf(g1),b1=Ut(),T1=Vf(b1);function Vf(e){return e&&e.__esModule?e:{default:e}}var S1=new m1.default(y1.default,T1.default);Mc.default=S1;qT.exports=Mc.default});var ZT=O((ls,KT)=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.default=void 0;var x1=zT(),I1=v1(x1);function v1(e){return e&&e.__esModule?e:{default:e}}ls.default=I1.default;KT.exports=ls.default});var YT=O((Fc,JT)=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var w1=Bt(),k1=jf(w1),_1=rn(),C1=jf(_1),E1=Ut(),N1=jf(E1);function jf(e){return e&&e.__esModule?e:{default:e}}var A1=new k1.default((0,C1.default)("all"),N1.default);Fc.default=A1;JT.exports=Fc.default});var QT=O((cs,XT)=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.default=void 0;var P1=YT(),R1=M1(P1);function M1(e){return e&&e.__esModule?e:{default:e}}cs.default=R1.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 F1=Bt(),O1=Xe(F1),L1=Ut(),D1=Xe(L1),B1=rn(),U1=Xe(B1),$1=Yn(),G1=Xe($1),W1=$f(),H1=Xe(W1),V1=Bb(),j1=Xe(V1),q1=xr(),z1=Xe(q1),K1=uc(),Z1=Xe(K1),J1=Gf(),Y1=Xe(J1),X1=Xb(),Q1=Xe(X1),eL=rT(),tL=Xe(eL),rL=iT(),nL=Xe(rL),oL=Tc(),aL=Xe(oL),iL=dT(),sL=Xe(iL),lL=pT(),cL=Xe(lL),uL=yT(),dL=Xe(uL),fL=xT(),pL=Xe(fL),hL=kT(),mL=Xe(hL),gL=NT(),yL=Xe(gL),bL=MT(),TL=Xe(bL),SL=DT(),xL=Xe(SL),IL=GT(),vL=Xe(IL),wL=jT(),kL=Xe(wL),_L=ZT(),CL=Xe(_L),EL=QT(),NL=Xe(EL);function Xe(e){return e&&e.__esModule?e:{default:e}}pe.TemplateTag=O1.default;pe.trimResultTransformer=D1.default;pe.stripIndentTransformer=U1.default;pe.replaceResultTransformer=G1.default;pe.replaceSubstitutionTransformer=H1.default;pe.replaceStringTransformer=j1.default;pe.inlineArrayTransformer=z1.default;pe.splitStringTransformer=Z1.default;pe.removeNonPrintingValuesTransformer=Y1.default;pe.commaLists=Q1.default;pe.commaListsAnd=tL.default;pe.commaListsOr=nL.default;pe.html=aL.default;pe.codeBlock=sL.default;pe.source=cL.default;pe.safeHtml=dL.default;pe.oneLine=pL.default;pe.oneLineTrim=mL.default;pe.oneLineCommaLists=yL.default;pe.oneLineCommaListsOr=TL.default;pe.oneLineCommaListsAnd=xL.default;pe.inlineLists=vL.default;pe.oneLineInlineLists=kL.default;pe.stripIndent=CL.default;pe.stripIndents=NL.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 AL(){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:AL(),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((vz,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 MD=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":MD(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"),zU=Symbol.for("react.portal"),KU=Symbol.for("react.fragment"),ZU=Symbol.for("react.strict_mode"),JU=Symbol.for("react.profiler"),YU=Symbol.for("react.provider"),XU=Symbol.for("react.context"),QU=Symbol.for("react.forward_ref"),e$=Symbol.for("react.suspense"),t$=Symbol.for("react.memo"),r$=Symbol.for("react.lazy"),dv=Symbol.iterator;function n$(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 o$(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 a$(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?a$(""+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 zU: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=o$(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=n$(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 i$(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},s$={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=KU;we.Profiler=JU;we.PureComponent=Yp;we.StrictMode=ZU;we.Suspense=e$;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=s$;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:XU,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:YU,_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:QU,render:e}};we.isValidElement=eh;we.lazy=function(e){return{$$typeof:r$,_payload:{_status:-1,_result:e},_init:i$}};we.memo=function(e,t){return{$$typeof:t$,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,E=!1,A=!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,D=new Array(C>1?C-1:0),U=1;U<C;U++)D[U-1]=arguments[U];Ee("warn",x,D)}}function X(x){{for(var C=arguments.length,D=new Array(C>1?C-1:0),U=1;U<C;U++)D[U-1]=arguments[U];Ee("error",x,D)}}function Ee(x,C,D){{var U=B.ReactDebugCurrentFrame,te=U.getStackAddendum();te!==""&&(C+="%s",D=D.concat([te]));var he=D.map(function(ie){return String(ie)});he.unshift("Warning: "+C),Function.prototype.apply.call(console[x],console,he)}}var L={};function Q(x,C){{var D=x.constructor,U=D&&(D.displayName||D.name)||"ReactClass",te=U+"."+C;if(L[te])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),L[te]=!0}}var N={isMounted:function(x){return!1},enqueueForceUpdate:function(x,C,D){Q(x,"forceUpdate")},enqueueReplaceState:function(x,C,D,U){Q(x,"replaceState")},enqueueSetState:function(x,C,D,U){Q(x,"setState")}},R=Object.assign,M={};Object.freeze(M);function P(x,C,D){this.props=x,this.context=C,this.refs=M,this.updater=D||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)."]},Y=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)&&Y(H,$[H])}function z(){}z.prototype=P.prototype;function se(x,C,D){this.props=x,this.context=C,this.refs=M,this.updater=D||N}var de=se.prototype=new z;de.constructor=se,R(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,D=C&&x[Symbol.toStringTag]||x.constructor.name||"Object";return D}}function re(x){try{return q(x),!1}catch{return!0}}function q(x){return""+x}function ee(x){if(re(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,D){var U=x.displayName;if(U)return U;var te=C.displayName||C.name||"";return te!==""?D+"("+te+")":D}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 D=x;return Ne(D._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 te=x,he=te._payload,ie=te._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 D=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))};D.isReactWarning=!0,Object.defineProperty(x,"key",{get:D,configurable:!0})}function Lt(x,C){var D=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))};D.isReactWarning=!0,Object.defineProperty(x,"ref",{get:D,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,D,U,te,he,ie){var ye={$$typeof:t,type:x,key:C,ref:D,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:te}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function pa(x,C,D){var U,te={},he=null,ie=null,ye=null,Re=null;if(C!=null){Ot(C)&&(ie=C.ref,er(C)),gt(C)&&(ee(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)&&(te[U]=C[U])}var Ze=arguments.length-2;if(Ze===1)te.children=D;else if(Ze>1){for(var tt=Array(Ze),rt=0;rt<Ze;rt++)tt[rt]=arguments[rt+2];Object.freeze&&Object.freeze(tt),te.children=tt}if(x&&x.defaultProps){var it=x.defaultProps;for(U in it)te[U]===void 0&&(te[U]=it[U])}if(he||ie){var yt=typeof x=="function"?x.displayName||x.name||"Unknown":x;he&&zt(te,yt),ie&&Lt(te,yt)}return Tr(x,he,ie,ye,Re,S.current,te)}function Co(x,C){var D=Tr(x.type,C,x.ref,x._self,x._source,x._owner,x.props);return D}function Oi(x,C,D){if(x==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+x+".");var U,te=R({},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)&&(ee(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?te[U]=tt[U]:te[U]=C[U])}var rt=arguments.length-2;if(rt===1)te.children=D;else if(rt>1){for(var it=Array(rt),yt=0;yt<rt;yt++)it[yt]=arguments[yt+2];te.children=it}return Tr(x.type,he,ie,ye,Re,Ze,te)}function tn(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}var ha=".",nf=":";function of(x){var C=/[=:]/g,D={"=":"=0",":":"=2"},U=x.replace(C,function(te){return D[te]});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?(ee(x.key),of(""+x.key)):C.toString(36)}function Dr(x,C,D,U,te){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=te(ye),Ze=U===""?ha+ga(ye,0):U;if(be(Re)){var tt="";Ze!=null&&(tt=ma(Ze)+"/"),Dr(Re,C,tt,"",function(eR){return eR})}else Re!=null&&(tn(Re)&&(Re.key&&(!ye||ye.key!==Re.key)&&ee(Re.key),Re=Co(Re,D+(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,D,it,te);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 XP=Tf.call(Hy),Vy,QP=0;!(Vy=XP.next()).done;)rt=Vy.value,it=At+ga(rt,QP++),yt+=Dr(rt,C,D,it,te)}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,D){if(x==null)return x;var U=[],te=0;return Dr(x,U,"","",function(he){return C.call(D,he,te++)}),U}function Li(x){var C=0;return Kn(x,function(){C++}),C}function Fl(x,C,D){Kn(x,function(){C.apply(this,arguments)},D)}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 D=!1,U=!1,te=!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 D||(D=!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){te||(Z("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",ie),te=!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,D=C();if(D.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=D}}if(x._status===Ll){var te=x._result;return te===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'))
36
36
 
37
- Did you accidentally put curly braces around the import?`,Y),"default"in Y||J(`lazy: Expected the result of a dynamic import() call. Instead received: %s
37
+ Did you accidentally put curly braces around the import?`,te),"default"in te||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'))`,Y),Y.default}else throw x._result}function Bl(x){var C={_status:Kn,_result:x},D={$$typeof:f,_payload:C,_init:Dl};{var B,Y;Object.defineProperties(D,{defaultProps:{configurable:!0,get:function(){return B},set:function(ue){J("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."),B=ue,Object.defineProperty(D,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Y},set:function(ue){J("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."),Y=ue,Object.defineProperty(D,"propTypes",{enumerable:!0})}}})}return D}function uf(x){x!=null&&x.$$typeof===d?J("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof x!="function"?J("forwardRef requires a render function but was given %s.",x===null?"null":typeof x):x.length!==0&&x.length!==2&&J("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)&&J("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var C={$$typeof:l,render:x};{var D;Object.defineProperty(C,"displayName",{enumerable:!1,configurable:!0,get:function(){return D},set:function(B){D=B,!x.name&&!x.displayName&&(x.displayName=B)}})}return C}var Ul;Ul=Symbol.for("react.module.reference");function $l(x){return!!(typeof x=="string"||typeof x=="function"||x===n||x===a||W||x===o||x===c||x===u||F||x===p||k||E||A||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)||J("memo: The first argument must be a component. Instead received: %s",x===null?"null":typeof x);var D={$$typeof:d,type:x,compare:C===void 0?null:C};{var B;Object.defineProperty(D,"displayName",{enumerable:!1,configurable:!0,get:function(){return B},set:function(Y){B=Y,!x.name&&!x.displayName&&(x.displayName=Y)}})}return D}function _(){var x=g.current;return x===null&&J(`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'))`,te),te.default}else throw x._result}function Bl(x){var C={_status:Zn,_result:x},D={$$typeof:f,_payload:C,_init:Dl};{var U,te;Object.defineProperties(D,{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(D,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return te},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."),te=he,Object.defineProperty(D,"propTypes",{enumerable:!0})}}})}return D}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 D;Object.defineProperty(C,"displayName",{enumerable:!1,configurable:!0,get:function(){return D},set:function(U){D=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||E||A||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 D={$$typeof:d,type:x,compare:C===void 0?null:C};{var U;Object.defineProperty(D,"displayName",{enumerable:!1,configurable:!0,get:function(){return U},set:function(te){U=te,!x.name&&!x.displayName&&(x.displayName=te)}})}return D}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:
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 q(x){var C=_();if(x._context!==void 0){var D=x._context;D.Consumer===x?J("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?"):D.Provider===x&&J("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return C.useContext(x)}function te(x){var C=_();return C.useState(x)}function de(x,C,D){var B=_();return B.useReducer(x,C,D)}function Pe(x){var C=_();return C.useRef(x)}function qe(x,C){var D=_();return D.useEffect(x,C)}function we(x,C){var D=_();return D.useInsertionEffect(x,C)}function Se(x,C){var D=_();return D.useLayoutEffect(x,C)}function At(x,C){var D=_();return D.useCallback(x,C)}function ot(x,C){var D=_();return D.useMemo(x,C)}function lt(x,C,D){var B=_();return B.useImperativeHandle(x,C,D)}function er(x,C){{var D=_();return D.useDebugValue(x,C)}}function Zn(){var x=_();return x.useTransition()}function yn(x){var C=_();return C.useDeferredValue(x)}function Dt(){var x=_();return x.useId()}function Di(x,C,D){var B=_();return B.useSyncExternalStore(x,C,D)}var Co=0,Gl,Sy,xy,Iy,vy,wy,ky;function _y(){}_y.__reactDisabledLog=!0;function EP(){{if(Co===0){Gl=console.log,Sy=console.info,xy=console.warn,Iy=console.error,vy=console.group,wy=console.groupCollapsed,ky=console.groupEnd;var x={configurable:!0,enumerable:!0,value:_y,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}Co++}}function AP(){{if(Co--,Co===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},x,{value:Gl}),info:M({},x,{value:Sy}),warn:M({},x,{value:xy}),error:M({},x,{value:Iy}),group:M({},x,{value:vy}),groupCollapsed:M({},x,{value:wy}),groupEnd:M({},x,{value:ky})})}Co<0&&J("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ff=U.ReactCurrentDispatcher,pf;function Wl(x,C,D){{if(pf===void 0)try{throw Error()}catch(Y){var B=Y.stack.trim().match(/\n( *(at )?)/);pf=B&&B[1]||""}return`
45
- `+pf+x}}var hf=!1,Hl;{var NP=typeof WeakMap=="function"?WeakMap:Map;Hl=new NP}function Cy(x,C){if(!x||hf)return"";{var D=Hl.get(x);if(D!==void 0)return D}var B;hf=!0;var Y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ue;ue=ff.current,ff.current=null,EP();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(Nt){B=Nt}Reflect.construct(x,[],ie)}else{try{ie.call()}catch(Nt){B=Nt}x.call(ie.prototype)}}else{try{throw Error()}catch(Nt){B=Nt}x()}}catch(Nt){if(Nt&&B&&typeof Nt.stack=="string"){for(var pe=Nt.stack.split(`
46
- `),Ne=B.stack.split(`
47
- `),Ke=pe.length-1,et=Ne.length-1;Ke>=1&&et>=0&&pe[Ke]!==Ne[et];)et--;for(;Ke>=1&&et>=0;Ke--,et--)if(pe[Ke]!==Ne[et]){if(Ke!==1||et!==1)do if(Ke--,et--,et<0||pe[Ke]!==Ne[et]){var tt=`
48
- `+pe[Ke].replace(" at new "," at ");return x.displayName&&tt.includes("<anonymous>")&&(tt=tt.replace("<anonymous>",x.displayName)),typeof x=="function"&&Hl.set(x,tt),tt}while(Ke>=1&&et>=0);break}}}finally{hf=!1,ff.current=ue,AP(),Error.prepareStackTrace=Y}var at=x?x.displayName||x.name:"",gt=at?Wl(at):"";return typeof x=="function"&&Hl.set(x,gt),gt}function PP(x,C,D){return Cy(x,!1)}function RP(x){var C=x.prototype;return!!(C&&C.isReactComponent)}function Vl(x,C,D){if(x==null)return"";if(typeof x=="function")return Cy(x,RP(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 PP(x.render);case d:return Vl(x.type,C,D);case f:{var B=x,Y=B._payload,ue=B._init;try{return Vl(ue(Y),C,D)}catch{}}}return""}var Ey={},Ay=U.ReactDebugCurrentFrame;function ql(x){if(x){var C=x._owner,D=Vl(x.type,x._source,C?C.type:null);Ay.setExtraStackFrame(D)}else Ay.setExtraStackFrame(null)}function MP(x,C,D,B,Y){{var ue=Function.call.bind(st);for(var ie in x)if(ue(x,ie)){var pe=void 0;try{if(typeof x[ie]!="function"){var Ne=Error((B||"React class")+": "+D+" 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 Ne.name="Invariant Violation",Ne}pe=x[ie](C,ie,B,D,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ke){pe=Ke}pe&&!(pe instanceof Error)&&(ql(Y),J("%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).",B||"React class",D,ie,typeof pe),ql(null)),pe instanceof Error&&!(pe.message in Ey)&&(Ey[pe.message]=!0,ql(Y),J("Failed %s type: %s",D,pe.message),ql(null))}}}function ya(x){if(x){var C=x._owner,D=Vl(x.type,x._source,C?C.type:null);w(D)}else w(null)}var mf;mf=!1;function Ny(){if(S.current){var x=Ze(S.current.type);if(x)return`
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 D=x._context;D.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?"):D.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,D){var U=_();return U.useReducer(x,C,D)}function Me(x){var C=_();return C.useRef(x)}function ze(x,C){var D=_();return D.useEffect(x,C)}function _e(x,C){var D=_();return D.useInsertionEffect(x,C)}function ve(x,C){var D=_();return D.useLayoutEffect(x,C)}function Nt(x,C){var D=_();return D.useCallback(x,C)}function at(x,C){var D=_();return D.useMemo(x,C)}function ct(x,C,D){var U=_();return U.useImperativeHandle(x,C,D)}function tr(x,C){{var D=_();return D.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,D){var U=_();return U.useSyncExternalStore(x,C,D)}var Eo=0,Gl,vy,wy,ky,_y,Cy,Ey;function Ny(){}Ny.__reactDisabledLog=!0;function FP(){{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 OP(){{if(Eo--,Eo===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:R({},x,{value:Gl}),info:R({},x,{value:vy}),warn:R({},x,{value:wy}),error:R({},x,{value:ky}),group:R({},x,{value:_y}),groupCollapsed:R({},x,{value:Cy}),groupEnd:R({},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,D){{if(pf===void 0)try{throw Error()}catch(te){var U=te.stack.trim().match(/\n( *(at )?)/);pf=U&&U[1]||""}return`
45
+ `+pf+x}}var hf=!1,Hl;{var LP=typeof WeakMap=="function"?WeakMap:Map;Hl=new LP}function Ay(x,C){if(!x||hf)return"";{var D=Hl.get(x);if(D!==void 0)return D}var U;hf=!0;var te=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var he;he=ff.current,ff.current=null,FP();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
+ `),Re=U.stack.split(`
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,OP(),Error.prepareStackTrace=te}var it=x?x.displayName||x.name:"",yt=it?Wl(it):"";return typeof x=="function"&&Hl.set(x,yt),yt}function DP(x,C,D){return Ay(x,!1)}function BP(x){var C=x.prototype;return!!(C&&C.isReactComponent)}function Vl(x,C,D){if(x==null)return"";if(typeof x=="function")return Ay(x,BP(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 DP(x.render);case d:return Vl(x.type,C,D);case f:{var U=x,te=U._payload,he=U._init;try{return Vl(he(te),C,D)}catch{}}}return""}var Py={},Ry=B.ReactDebugCurrentFrame;function jl(x){if(x){var C=x._owner,D=Vl(x.type,x._source,C?C.type:null);Ry.setExtraStackFrame(D)}else Ry.setExtraStackFrame(null)}function UP(x,C,D,U,te){{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")+": "+D+" 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,D,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ze){ye=Ze}ye&&!(ye instanceof Error)&&(jl(te),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",D,ie,typeof ye),jl(null)),ye instanceof Error&&!(ye.message in Py)&&(Py[ye.message]=!0,jl(te),X("Failed %s type: %s",D,ye.message),jl(null))}}}function ba(x){if(x){var C=x._owner,D=Vl(x.type,x._source,C?C.type:null);w(D)}else w(null)}var mf;mf=!1;function My(){if(S.current){var x=qe(S.current.type);if(x)return`
49
49
 
50
- Check the render method of \``+x+"`."}return""}function FP(x){if(x!==void 0){var C=x.fileName.replace(/^.*[\\\/]/,""),D=x.lineNumber;return`
50
+ Check the render method of \``+x+"`."}return""}function $P(x){if(x!==void 0){var C=x.fileName.replace(/^.*[\\\/]/,""),D=x.lineNumber;return`
51
51
 
52
- Check your code at `+C+":"+D+"."}return""}function OP(x){return x!=null?FP(x.__source):""}var Py={};function LP(x){var C=Ny();if(!C){var D=typeof x=="string"?x:x.displayName||x.name;D&&(C=`
52
+ Check your code at `+C+":"+D+"."}return""}function GP(x){return x!=null?$P(x.__source):""}var Fy={};function WP(x){var C=My();if(!C){var D=typeof x=="string"?x:x.displayName||x.name;D&&(C=`
53
53
 
54
- Check the top-level render call using <`+D+">.")}return C}function Ry(x,C){if(!(!x._store||x._store.validated||x.key!=null)){x._store.validated=!0;var D=LP(C);if(!Py[D]){Py[D]=!0;var B="";x&&x._owner&&x._owner!==S.current&&(B=" It was passed a child from "+Ze(x._owner.type)+"."),ya(x),J('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',D,B),ya(null)}}}function My(x,C){if(typeof x=="object"){if(Ae(x))for(var D=0;D<x.length;D++){var B=x[D];tn(B)&&Ry(B,C)}else if(tn(x))x._store&&(x._store.validated=!0);else if(x){var Y=b(x);if(typeof Y=="function"&&Y!==x.entries)for(var ue=Y.call(x),ie;!(ie=ue.next()).done;)tn(ie.value)&&Ry(ie.value,C)}}}function Fy(x){{var C=x.type;if(C==null||typeof C=="string")return;var D;if(typeof C=="function")D=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===d))D=C.propTypes;else return;if(D){var B=Ze(C);MP(D,x.props,"prop",B,x)}else if(C.PropTypes!==void 0&&!mf){mf=!0;var Y=Ze(C);J("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Y||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&J("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function DP(x){{for(var C=Object.keys(x.props),D=0;D<C.length;D++){var B=C[D];if(B!=="children"&&B!=="key"){ya(x),J("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",B),ya(null);break}}x.ref!==null&&(ya(x),J("Invalid attribute `ref` supplied to `React.Fragment`."),ya(null))}}function Oy(x,C,D){var B=$l(x);if(!B){var Y="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(Y+=" 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 ue=OP(C);ue?Y+=ue:Y+=Ny();var ie;x===null?ie="null":Ae(x)?ie="array":x!==void 0&&x.$$typeof===t?(ie="<"+(Ze(x.type)||"Unknown")+" />",Y=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof x,J("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,Y)}var pe=fa.apply(this,arguments);if(pe==null)return pe;if(B)for(var Ne=2;Ne<arguments.length;Ne++)My(arguments[Ne],x);return x===n?DP(pe):Fy(pe),pe}var Ly=!1;function BP(x){var C=Oy.bind(null,x);return C.type=x,Ly||(Ly=!0,K("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 K("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:x}),x}}),C}function UP(x,C,D){for(var B=Oi.apply(this,arguments),Y=2;Y<arguments.length;Y++)My(arguments[Y],B.type);return Fy(B),B}function $P(x,C){var D=m.transition;m.transition={};var B=m.transition;m.transition._updatedFibers=new Set;try{x()}finally{if(m.transition=D,D===null&&B._updatedFibers){var Y=B._updatedFibers.size;Y>10&&K("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."),B._updatedFibers.clear()}}}var Dy=!1,jl=null;function GP(x){if(jl===null)try{var C=("require"+Math.random()).slice(0,7),D=mu&&mu[C];jl=D.call(mu,"timers").setImmediate}catch{jl=function(Y){Dy===!1&&(Dy=!0,typeof MessageChannel>"u"&&J("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 ue=new MessageChannel;ue.port1.onmessage=Y,ue.port2.postMessage(void 0)}}return jl(x)}var ba=0,By=!1;function Uy(x){{var C=ba;ba++,T.current===null&&(T.current=[]);var D=T.isBatchingLegacy,B;try{if(T.isBatchingLegacy=!0,B=x(),!D&&T.didScheduleLegacyUpdate){var Y=T.current;Y!==null&&(T.didScheduleLegacyUpdate=!1,bf(Y))}}catch(at){throw zl(C),at}finally{T.isBatchingLegacy=D}if(B!==null&&typeof B=="object"&&typeof B.then=="function"){var ue=B,ie=!1,pe={then:function(at,gt){ie=!0,ue.then(function(Nt){zl(C),ba===0?gf(Nt,at,gt):at(Nt)},function(Nt){zl(C),gt(Nt)})}};return!By&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){ie||(By=!0,J("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 () => ...);"))}),pe}else{var Ne=B;if(zl(C),ba===0){var Ke=T.current;Ke!==null&&(bf(Ke),T.current=null);var et={then:function(at,gt){T.current===null?(T.current=[],gf(Ne,at,gt)):at(Ne)}};return et}else{var tt={then:function(at,gt){at(Ne)}};return tt}}}}function zl(x){x!==ba-1&&J("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ba=x}function gf(x,C,D){{var B=T.current;if(B!==null)try{bf(B),GP(function(){B.length===0?(T.current=null,C(x)):gf(x,C,D)})}catch(Y){D(Y)}else C(x)}}var yf=!1;function bf(x){if(!yf){yf=!0;var C=0;try{for(;C<x.length;C++){var D=x[C];do D=D(!0);while(D!==null)}x.length=0}catch(B){throw x=x.slice(C+1),B}finally{yf=!1}}}var WP=Oy,HP=UP,VP=BP,qP={map:zn,forEach:Fl,count:Li,toArray:sf,only:Ol};Ie.Children=qP,Ie.Component=P,Ie.Fragment=n,Ie.Profiler=a,Ie.PureComponent=Ee,Ie.StrictMode=o,Ie.Suspense=c,Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,Ie.act=Uy,Ie.cloneElement=HP,Ie.createContext=lf,Ie.createElement=WP,Ie.createFactory=VP,Ie.createRef=ge,Ie.forwardRef=uf,Ie.isValidElement=tn,Ie.lazy=Bl,Ie.memo=df,Ie.startTransition=$P,Ie.unstable_act=Uy,Ie.useCallback=At,Ie.useContext=q,Ie.useDebugValue=er,Ie.useDeferredValue=yn,Ie.useEffect=qe,Ie.useId=Dt,Ie.useImperativeHandle=lt,Ie.useInsertionEffect=we,Ie.useLayoutEffect=Se,Ie.useMemo=ot,Ie.useReducer=de,Ie.useRef=Pe,Ie.useState=te,Ie.useSyncExternalStore=Di,Ie.useTransition=Zn,Ie.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((D5,th)=>{"use strict";process.env.NODE_ENV==="production"?th.exports=bv():th.exports=Tv()});var xv=O((yu,Sv)=>{(function(e,t){typeof yu=="object"&&typeof Sv<"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 vv=O((bu,Iv)=>{(function(e,t){typeof bu=="object"&&typeof Iv<"u"?t(bu,iv(),gu(),xv()):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 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[U,K]of Object.entries(S.attrs))K&&U in v.attributes&&(k[U]=I.formatPattern(v.attributes[U],S.vars,w));for(let U of w)this.reportError(U)}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 U of w)this.reportError(U);if(!l.test(E)||this.parseMarkup===null)return r.cloneElement(m,k,E);let A;if(S.elems){A=new Map;for(let[U,K]of Object.entries(S.elems))r.isValidElement(K)&&A.set(U.toLowerCase(),K)}let W=this.parseMarkup(E).map(({nodeName:U,textContent:K})=>{if(U==="#text")return K;let J=U.toLowerCase(),Oe=A==null?void 0:A.get(J);return Oe?typeof Oe.type=="string"&&Oe.type in s?Oe:r.cloneElement(Oe,void 0,K):K});return r.cloneElement(m,k,...W)}}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,A=w.getString(m,S,E);return r.createElement(r.Fragment,null,A)}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 Cu(e,t){return new TextDecoder("utf8").decode(t.slice(0,e.length))===e}var Ds,lh=Eo(()=>{"use strict";Ds="SIMPLEPERF"});var fw=O((HK,dw)=>{"use strict";dw.exports=G$;function G$(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 gw=O(mw=>{"use strict";var Au=mw;Au.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),hw=new Array(123);for(Wr=0;Wr<64;)hw[Za[Wr]=Wr<26?Wr+65:Wr<52?Wr+71:Wr<62?Wr-4:Wr-59|43]=Wr++;var Wr;Au.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 pw="invalid encoding";Au.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=hw[l])===void 0)throw Error(pw);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(pw);return n-o};Au.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var bw=O((qK,yw)=>{"use strict";yw.exports=Nu;function Nu(){this._listeners={}}Nu.prototype.on=function(t,r,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:n||this}),this};Nu.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};Nu.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 kw=O((jK,ww)=>{"use strict";ww.exports=Tw(Tw);function Tw(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,Sw),e.writeFloatBE=t.bind(null,xw);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,Iw),e.readFloatBE=r.bind(null,vw)})(),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,Sw,0,4),e.writeDoubleBE=t.bind(null,xw,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,Iw,0,4),e.readDoubleBE=r.bind(null,vw,4,0)})(),e}function Sw(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 xw(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 Iw(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function vw(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}});var _w=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 Ew=O(Cw=>{"use strict";var fh=Cw;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 Nw=O((KK,Aw)=>{"use strict";Aw.exports=W$;function W$(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 Rw=O((ZK,Pw)=>{"use strict";Pw.exports=Et;var Bs=co();function Et(e,t){this.lo=e>>>0,this.hi=t>>>0}var Ho=Et.zero=new Et(0,0);Ho.toNumber=function(){return 0};Ho.zzEncode=Ho.zzDecode=function(){return this};Ho.length=function(){return 1};var H$=Et.zeroHash="\0\0\0\0\0\0\0\0";Et.fromNumber=function(t){if(t===0)return Ho;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):Ho};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 lo=String.prototype.charCodeAt;Et.fromHash=function(t){return t===H$?Ho:new Et((lo.call(t,0)|lo.call(t,1)<<8|lo.call(t,2)<<16|lo.call(t,3)<<24)>>>0,(lo.call(t,4)|lo.call(t,5)<<8|lo.call(t,6)<<16|lo.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 co=O(ph=>{"use strict";var se=ph;se.asPromise=fw();se.base64=gw();se.EventEmitter=bw();se.float=kw();se.inquire=_w();se.utf8=Ew();se.pool=Nw();se.LongBits=Rw();se.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);se.global=se.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||ph;se.emptyArray=Object.freeze?Object.freeze([]):[];se.emptyObject=Object.freeze?Object.freeze({}):{};se.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};se.isString=function(t){return typeof t=="string"||t instanceof String};se.isObject=function(t){return t&&typeof t=="object"};se.isset=se.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};se.Buffer=(function(){try{var e=se.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}})();se._Buffer_from=null;se._Buffer_allocUnsafe=null;se.newBuffer=function(t){return typeof t=="number"?se.Buffer?se._Buffer_allocUnsafe(t):new se.Array(t):se.Buffer?se._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};se.Array=typeof Uint8Array<"u"?Uint8Array:Array;se.Long=se.global.dcodeIO&&se.global.dcodeIO.Long||se.global.Long||se.inquire("long");se.key2Re=/^true|false|0|1$/;se.key32Re=/^-?(?:0|[1-9][0-9]*)$/;se.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;se.longToHash=function(t){return t?se.LongBits.from(t).toHash():se.LongBits.zeroHash};se.longFromHash=function(t,r){var n=se.LongBits.fromHash(t);return se.Long?se.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)};function Mw(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}se.merge=Mw;se.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function Fw(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&&Mw(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}se.newError=Fw;se.ProtocolError=Fw("ProtocolError");se.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]}};se.oneOfSetter=function(t){return function(r){for(var n=0;n<t.length;++n)t[n]!==r&&delete this[t[n]]}};se.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};se._configure=function(){var e=se.Buffer;if(!e){se._Buffer_from=se._Buffer_allocUnsafe=null;return}se._Buffer_from=e.from!==Uint8Array.from&&e.from||function(r,n){return new e(r,n)},se._Buffer_allocUnsafe=e.allocUnsafe||function(r){return new e(r)}}});var Sh=O((YK,Bw)=>{"use strict";Bw.exports=Re;var Er=co(),hh,Pu=Er.LongBits,Ow=Er.base64,Lw=Er.utf8;function Us(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function gh(){}function V$(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function Re(){this.len=0,this.head=new Us(gh,0,0),this.tail=this.head,this.states=null}var Dw=function(){return Er.Buffer?function(){return(Re.create=function(){return new hh})()}:function(){return new Re}};Re.create=Dw();Re.alloc=function(t){return new Er.Array(t)};Er.Array!==Array&&(Re.alloc=Er.pool(Re.alloc,Er.Array.prototype.subarray));Re.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 q$(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=q$;Re.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};Re.prototype.int32=function(t){return t<0?this._push(Th,10,Pu.fromNumber(t)):this.uint32(t)};Re.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}Re.prototype.uint64=function(t){var r=Pu.from(t);return this._push(Th,r.length(),r)};Re.prototype.int64=Re.prototype.uint64;Re.prototype.sint64=function(t){var r=Pu.from(t).zzEncode();return this._push(Th,r.length(),r)};Re.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}Re.prototype.fixed32=function(t){return this._push(mh,4,t>>>0)};Re.prototype.sfixed32=Re.prototype.fixed32;Re.prototype.fixed64=function(t){var r=Pu.from(t);return this._push(mh,4,r.lo)._push(mh,4,r.hi)};Re.prototype.sfixed64=Re.prototype.fixed64;Re.prototype.float=function(t){return this._push(Er.float.writeFloatLE,4,t)};Re.prototype.double=function(t){return this._push(Er.float.writeDoubleLE,8,t)};var j$=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]};Re.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(yh,1,0);if(Er.isString(t)){var n=Re.alloc(r=Ow.length(t));Ow.decode(t,n,0),t=n}return this.uint32(r)._push(j$,r,t)};Re.prototype.string=function(t){var r=Lw.length(t);return r?this.uint32(r)._push(Lw.write,r,t):this._push(yh,1,0)};Re.prototype.fork=function(){return this.states=new V$(this),this.head=this.tail=new Us(gh,0,0),this.len=0,this};Re.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};Re.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};Re.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};Re._configure=function(e){hh=e,Re.create=Dw(),hh._configure()}});var Gw=O((XK,$w)=>{"use strict";$w.exports=sn;var Uw=Sh();(sn.prototype=Object.create(Uw.prototype)).constructor=sn;var uo=co();function sn(){Uw.call(this)}sn._configure=function(){sn.alloc=uo._Buffer_allocUnsafe,sn.writeBytesBuffer=uo.Buffer&&uo.Buffer.prototype instanceof Uint8Array&&uo.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){uo.isString(t)&&(t=uo._Buffer_from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&this._push(sn.writeBytesBuffer,r,t),this};function z$(e,t,r){e.length<40?uo.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}sn.prototype.string=function(t){var r=uo.Buffer.byteLength(t);return this.uint32(r),r&&this._push(z$,r,t),this};sn._configure()});var vh=O((QK,jw)=>{"use strict";jw.exports=pt;var Hr=co(),Ih,Vw=Hr.LongBits,K$=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 Ww=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")},qw=function(){return Hr.Buffer?function(r){return(pt.create=function(o){return Hr.Buffer.isBuffer(o)?new Ih(o):Ww(o)})(r)}:Ww};pt.create=qw();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 Vw(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 Hw(){if(this.pos+8>this.len)throw Vr(this,8);return new Vw(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 K$.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=qw(),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 Hw.call(this)[t](!0)},sfixed64:function(){return Hw.call(this)[t](!1)}})}});var Jw=O((eZ,Zw)=>{"use strict";Zw.exports=Vo;var Kw=vh();(Vo.prototype=Object.create(Kw.prototype)).constructor=Vo;var zw=co();function Vo(e){Kw.call(this,e)}Vo._configure=function(){zw.Buffer&&(Vo.prototype._slice=zw.Buffer.prototype.slice)};Vo.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))};Vo._configure()});var Xw=O((tZ,Yw)=>{"use strict";Yw.exports=$s;var wh=co();($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 ek=O(Qw=>{"use strict";var Z$=Qw;Z$.Service=Xw()});var rk=O((nZ,tk)=>{"use strict";tk.exports={}});var ak=O(ok=>{"use strict";var nr=ok;nr.build="minimal";nr.Writer=Sh();nr.BufferWriter=Gw();nr.Reader=vh();nr.BufferReader=Jw();nr.util=co();nr.rpc=ek();nr.roots=rk();nr.configure=nk;function nk(){nr.util._configure(),nr.Writer._configure(nr.BufferWriter),nr.Reader._configure(nr.BufferReader)}nk()});var sk=O((aZ,ik)=>{"use strict";ik.exports=ak()});var ck=O((iZ,lk)=>{"use strict";var or=sk(),ke=or.Reader,Pn=or.Writer,V=or.util,ne=or.roots.default||(or.roots.default={});ne.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=V.Long?V.Long.fromBits(0,0,!0):0,t.prototype.threadId=0,t.prototype.callchain=V.emptyArray,t.prototype.eventCount=V.Long?V.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=Pn.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)ne.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")&&ne.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 ke||(n=ke.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new ne.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(ne.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=ne.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 ke||(n=new ke(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")&&!V.isInteger(n.time)&&!(n.time&&V.isInteger(n.time.low)&&V.isInteger(n.time.high)))return"time: integer|Long expected";if(n.threadId!=null&&n.hasOwnProperty("threadId")&&!V.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=ne.simpleperf_report_proto.Sample.CallChainEntry.verify(n.callchain[o]);if(a)return"callchain."+a}}if(n.eventCount!=null&&n.hasOwnProperty("eventCount")&&!V.isInteger(n.eventCount)&&!(n.eventCount&&V.isInteger(n.eventCount.low)&&V.isInteger(n.eventCount.high)))return"eventCount: integer|Long expected";if(n.eventTypeId!=null&&n.hasOwnProperty("eventTypeId")&&!V.isInteger(n.eventTypeId))return"eventTypeId: integer expected";if(n.unwindingResult!=null&&n.hasOwnProperty("unwindingResult")){var a=ne.simpleperf_report_proto.Sample.UnwindingResult.verify(n.unwindingResult);if(a)return"unwindingResult."+a}return null},t.fromObject=function(n){if(n instanceof ne.simpleperf_report_proto.Sample)return n;var o=new ne.simpleperf_report_proto.Sample;if(n.time!=null&&(V.Long?(o.time=V.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 V.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]=ne.simpleperf_report_proto.Sample.CallChainEntry.fromObject(n.callchain[a])}}if(n.eventCount!=null&&(V.Long?(o.eventCount=V.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 V.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=ne.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(V.Long){var i=new V.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,V.Long){var i=new V.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?V.Long.prototype.toString.call(n.time):o.longs===Number?new V.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]=ne.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?V.Long.prototype.toString.call(n.eventCount):o.longs===Number?new V.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=ne.simpleperf_report_proto.Sample.UnwindingResult.toObject(n.unwindingResult,o)),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,or.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=V.Long?V.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=Pn.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 ke||(o=ke.create(o));for(var s=a===void 0?o.len:o.pos+a,l=new ne.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 ke||(o=new ke(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")&&!V.isInteger(o.vaddrInFile)&&!(o.vaddrInFile&&V.isInteger(o.vaddrInFile.low)&&V.isInteger(o.vaddrInFile.high)))return"vaddrInFile: integer|Long expected";if(o.fileId!=null&&o.hasOwnProperty("fileId")&&!V.isInteger(o.fileId))return"fileId: integer expected";if(o.symbolId!=null&&o.hasOwnProperty("symbolId")&&!V.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 ne.simpleperf_report_proto.Sample.CallChainEntry)return o;var a=new ne.simpleperf_report_proto.Sample.CallChainEntry;switch(o.vaddrInFile!=null&&(V.Long?(a.vaddrInFile=V.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 V.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(V.Long){var s=new V.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?V.Long.prototype.toString.call(o.vaddrInFile):a.longs===Number?new V.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?ne.simpleperf_report_proto.Sample.CallChainEntry.ExecutionType[o.executionType]===void 0?o.executionType:ne.simpleperf_report_proto.Sample.CallChainEntry.ExecutionType[o.executionType]:o.executionType),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,or.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=V.Long?V.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=Pn.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 ke||(o=ke.create(o));for(var s=a===void 0?o.len:o.pos+a,l=new ne.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 ke||(o=new ke(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")&&!V.isInteger(o.rawErrorCode))return"rawErrorCode: integer expected";if(o.errorAddr!=null&&o.hasOwnProperty("errorAddr")&&!V.isInteger(o.errorAddr)&&!(o.errorAddr&&V.isInteger(o.errorAddr.low)&&V.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 ne.simpleperf_report_proto.Sample.UnwindingResult)return o;var a=new ne.simpleperf_report_proto.Sample.UnwindingResult;switch(o.rawErrorCode!=null&&(a.rawErrorCode=o.rawErrorCode>>>0),o.errorAddr!=null&&(V.Long?(a.errorAddr=V.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 V.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,V.Long){var s=new V.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?V.Long.prototype.toString.call(o.errorAddr):a.longs===Number?new V.LongBits(o.errorAddr.low>>>0,o.errorAddr.high>>>0).toNumber(!0):o.errorAddr),o.errorCode!=null&&o.hasOwnProperty("errorCode")&&(i.errorCode=a.enums===String?ne.simpleperf_report_proto.Sample.UnwindingResult.ErrorCode[o.errorCode]===void 0?o.errorCode:ne.simpleperf_report_proto.Sample.UnwindingResult.ErrorCode[o.errorCode]:o.errorCode),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,or.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=V.Long?V.Long.fromBits(0,0,!0):0,t.prototype.lostCount=V.Long?V.Long.fromBits(0,0,!0):0,t.create=function(n){return new t(n)},t.encode=function(n,o){return o||(o=Pn.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 ke||(n=ke.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new ne.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 ke||(n=new ke(n)),this.decode(n,n.uint32())},t.verify=function(n){return typeof n!="object"||n===null?"object expected":n.sampleCount!=null&&n.hasOwnProperty("sampleCount")&&!V.isInteger(n.sampleCount)&&!(n.sampleCount&&V.isInteger(n.sampleCount.low)&&V.isInteger(n.sampleCount.high))?"sampleCount: integer|Long expected":n.lostCount!=null&&n.hasOwnProperty("lostCount")&&!V.isInteger(n.lostCount)&&!(n.lostCount&&V.isInteger(n.lostCount.low)&&V.isInteger(n.lostCount.high))?"lostCount: integer|Long expected":null},t.fromObject=function(n){if(n instanceof ne.simpleperf_report_proto.LostSituation)return n;var o=new ne.simpleperf_report_proto.LostSituation;return n.sampleCount!=null&&(V.Long?(o.sampleCount=V.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 V.LongBits(n.sampleCount.low>>>0,n.sampleCount.high>>>0).toNumber(!0))),n.lostCount!=null&&(V.Long?(o.lostCount=V.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 V.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(V.Long){var i=new V.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(V.Long){var i=new V.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?V.Long.prototype.toString.call(n.sampleCount):o.longs===Number?new V.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?V.Long.prototype.toString.call(n.lostCount):o.longs===Number?new V.LongBits(n.lostCount.low>>>0,n.lostCount.high>>>0).toNumber(!0):n.lostCount),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,or.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=V.emptyArray,t.prototype.mangledSymbol=V.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,o){if(o||(o=Pn.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 ke||(n=ke.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new ne.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 ke||(n=new ke(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")&&!V.isInteger(n.id))return"id: integer expected";if(n.path!=null&&n.hasOwnProperty("path")&&!V.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(!V.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(!V.isString(n.mangledSymbol[o]))return"mangledSymbol: string[] expected"}return null},t.fromObject=function(n){if(n instanceof ne.simpleperf_report_proto.File)return n;var o=new ne.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,or.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=Pn.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 ke||(n=ke.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new ne.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 ke||(n=new ke(n)),this.decode(n,n.uint32())},t.verify=function(n){return typeof n!="object"||n===null?"object expected":n.threadId!=null&&n.hasOwnProperty("threadId")&&!V.isInteger(n.threadId)?"threadId: integer expected":n.processId!=null&&n.hasOwnProperty("processId")&&!V.isInteger(n.processId)?"processId: integer expected":n.threadName!=null&&n.hasOwnProperty("threadName")&&!V.isString(n.threadName)?"threadName: string expected":null},t.fromObject=function(n){if(n instanceof ne.simpleperf_report_proto.Thread)return n;var o=new ne.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,or.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=V.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=Pn.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 ke||(n=ke.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new ne.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 ke||(n=new ke(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(!V.isString(n.eventType[o]))return"eventType: string[] expected"}return n.appPackageName!=null&&n.hasOwnProperty("appPackageName")&&!V.isString(n.appPackageName)?"appPackageName: string expected":n.appType!=null&&n.hasOwnProperty("appType")&&!V.isString(n.appType)?"appType: string expected":n.androidSdkVersion!=null&&n.hasOwnProperty("androidSdkVersion")&&!V.isString(n.androidSdkVersion)?"androidSdkVersion: string expected":n.androidBuildType!=null&&n.hasOwnProperty("androidBuildType")&&!V.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 ne.simpleperf_report_proto.MetaInfo)return n;var o=new ne.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,or.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=V.Long?V.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=Pn.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 ke||(n=ke.create(n));for(var i=o===void 0?n.len:n.pos+o,s=new ne.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 ke||(n=new ke(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")&&!V.isInteger(n.time)&&!(n.time&&V.isInteger(n.time.low)&&V.isInteger(n.time.high))?"time: integer|Long expected":n.threadId!=null&&n.hasOwnProperty("threadId")&&!V.isInteger(n.threadId)?"threadId: integer expected":null},t.fromObject=function(n){if(n instanceof ne.simpleperf_report_proto.ContextSwitch)return n;var o=new ne.simpleperf_report_proto.ContextSwitch;return n.switchOn!=null&&(o.switchOn=!!n.switchOn),n.time!=null&&(V.Long?(o.time=V.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 V.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,V.Long){var i=new V.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?V.Long.prototype.toString.call(n.time):o.longs===Number?new V.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,or.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:V.oneOfGetter(r=["sample","lost","file","thread","metaInfo","contextSwitch"]),set:V.oneOfSetter(r)}),t.create=function(o){return new t(o)},t.encode=function(o,a){return a||(a=Pn.create()),o.sample!=null&&Object.hasOwnProperty.call(o,"sample")&&ne.simpleperf_report_proto.Sample.encode(o.sample,a.uint32(10).fork()).ldelim(),o.lost!=null&&Object.hasOwnProperty.call(o,"lost")&&ne.simpleperf_report_proto.LostSituation.encode(o.lost,a.uint32(18).fork()).ldelim(),o.file!=null&&Object.hasOwnProperty.call(o,"file")&&ne.simpleperf_report_proto.File.encode(o.file,a.uint32(26).fork()).ldelim(),o.thread!=null&&Object.hasOwnProperty.call(o,"thread")&&ne.simpleperf_report_proto.Thread.encode(o.thread,a.uint32(34).fork()).ldelim(),o.metaInfo!=null&&Object.hasOwnProperty.call(o,"metaInfo")&&ne.simpleperf_report_proto.MetaInfo.encode(o.metaInfo,a.uint32(42).fork()).ldelim(),o.contextSwitch!=null&&Object.hasOwnProperty.call(o,"contextSwitch")&&ne.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 ke||(o=ke.create(o));for(var s=a===void 0?o.len:o.pos+a,l=new ne.simpleperf_report_proto.Record;o.pos<s;){var c=o.uint32();if(c===i)break;switch(c>>>3){case 1:{l.sample=ne.simpleperf_report_proto.Sample.decode(o,o.uint32());break}case 2:{l.lost=ne.simpleperf_report_proto.LostSituation.decode(o,o.uint32());break}case 3:{l.file=ne.simpleperf_report_proto.File.decode(o,o.uint32());break}case 4:{l.thread=ne.simpleperf_report_proto.Thread.decode(o,o.uint32());break}case 5:{l.metaInfo=ne.simpleperf_report_proto.MetaInfo.decode(o,o.uint32());break}case 6:{l.contextSwitch=ne.simpleperf_report_proto.ContextSwitch.decode(o,o.uint32());break}default:o.skipType(c&7);break}}return l},t.decodeDelimited=function(o){return o instanceof ke||(o=new ke(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=ne.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=ne.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=ne.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=ne.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=ne.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=ne.simpleperf_report_proto.ContextSwitch.verify(o.contextSwitch);if(i)return"contextSwitch."+i}}return null},t.fromObject=function(o){if(o instanceof ne.simpleperf_report_proto.Record)return o;var a=new ne.simpleperf_report_proto.Record;if(o.sample!=null){if(typeof o.sample!="object")throw TypeError(".simpleperf_report_proto.Record.sample: object expected");a.sample=ne.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=ne.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=ne.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=ne.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=ne.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=ne.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=ne.simpleperf_report_proto.Sample.toObject(o.sample,a),a.oneofs&&(i.recordData="sample")),o.lost!=null&&o.hasOwnProperty("lost")&&(i.lost=ne.simpleperf_report_proto.LostSituation.toObject(o.lost,a),a.oneofs&&(i.recordData="lost")),o.file!=null&&o.hasOwnProperty("file")&&(i.file=ne.simpleperf_report_proto.File.toObject(o.file,a),a.oneofs&&(i.recordData="file")),o.thread!=null&&o.hasOwnProperty("thread")&&(i.thread=ne.simpleperf_report_proto.Thread.toObject(o.thread,a),a.oneofs&&(i.recordData="thread")),o.metaInfo!=null&&o.hasOwnProperty("metaInfo")&&(i.metaInfo=ne.simpleperf_report_proto.MetaInfo.toObject(o.metaInfo,a),a.oneofs&&(i.recordData="metaInfo")),o.contextSwitch!=null&&o.hasOwnProperty("contextSwitch")&&(i.contextSwitch=ne.simpleperf_report_proto.ContextSwitch.toObject(o.contextSwitch,a),a.oneofs&&(i.recordData="contextSwitch")),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,or.util.toJSONOptions)},t.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/simpleperf_report_proto.Record"},t})(),e})();lk.exports=ne});function je(e,t,r){this.low=e|0,this.high=t|0,this.unsigned=!!r}function Ht(e){return(e&&e.__isLong__)===!0}function uk(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=fk[e],n)?n:(r=Me(e,0,!0),o&&(fk[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(n=dk[e],n)?n:(r=Me(e,e<0?-1:0,!1),o&&(dk[e]=r),r))}function Nr(e,t){if(isNaN(e))return t?Rn:qr;if(t){if(e<0)return Rn;if(e>=gk)return Tk}else{if(e<=-hk)return ar;if(e+1>=hk)return bk}return e<0?Nr(-e,t).neg():Me(e%Ya|0,e/Ya|0,t)}function Me(e,t,r){return new je(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?Rn:qr;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=Nr(Mu(r,8)),a=qr,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=Nr(Mu(r,s));a=a.mul(c).add(Nr(l))}else a=a.mul(o),a=a.add(Nr(l))}return a.unsigned=t,a}function Pr(e,t){return typeof e=="number"?Nr(e,t):typeof e=="string"?_h(e,t):Me(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}var Ar,dk,fk,Mu,pk,J$,Ya,gk,hk,mk,qr,Rn,Ja,yk,kh,bk,Tk,ar,j,Sk,xk=Eo(()=>{Ar=null;try{Ar=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{}je.prototype.__isLong__;Object.defineProperty(je.prototype,"__isLong__",{value:!0});je.isLong=Ht;dk={},fk={};je.fromInt=qo;je.fromNumber=Nr;je.fromBits=Me;Mu=Math.pow;je.fromString=_h;je.fromValue=Pr;pk=65536,J$=1<<24,Ya=pk*pk,gk=Ya*Ya,hk=gk/2,mk=qo(J$),qr=qo(0);je.ZERO=qr;Rn=qo(0,!0);je.UZERO=Rn;Ja=qo(1);je.ONE=Ja;yk=qo(1,!0);je.UONE=yk;kh=qo(-1);je.NEG_ONE=kh;bk=Me(-1,2147483647,!1);je.MAX_VALUE=bk;Tk=Me(-1,-1,!0);je.MAX_UNSIGNED_VALUE=Tk;ar=Me(0,-2147483648,!1);je.MIN_VALUE=ar;j=je.prototype;j.toInt=function(){return this.unsigned?this.low>>>0:this.low};j.toNumber=function(){return this.unsigned?(this.high>>>0)*Ya+(this.low>>>0):this.high*Ya+(this.low>>>0)};j.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(ar)){var r=Nr(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=Nr(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}};j.getHighBits=function(){return this.high};j.getHighBitsUnsigned=function(){return this.high>>>0};j.getLowBits=function(){return this.low};j.getLowBitsUnsigned=function(){return this.low>>>0};j.getNumBitsAbs=function(){if(this.isNegative())return this.eq(ar)?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};j.isSafeInteger=function(){var t=this.high>>21;return t?this.unsigned?!1:t===-1&&!(this.low===0&&this.high===-2097152):!0};j.isZero=function(){return this.high===0&&this.low===0};j.eqz=j.isZero;j.isNegative=function(){return!this.unsigned&&this.high<0};j.isPositive=function(){return this.unsigned||this.high>=0};j.isOdd=function(){return(this.low&1)===1};j.isEven=function(){return(this.low&1)===0};j.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};j.eq=j.equals;j.notEquals=function(t){return!this.eq(t)};j.neq=j.notEquals;j.ne=j.notEquals;j.lessThan=function(t){return this.comp(t)<0};j.lt=j.lessThan;j.lessThanOrEqual=function(t){return this.comp(t)<=0};j.lte=j.lessThanOrEqual;j.le=j.lessThanOrEqual;j.greaterThan=function(t){return this.comp(t)>0};j.gt=j.greaterThan;j.greaterThanOrEqual=function(t){return this.comp(t)>=0};j.gte=j.greaterThanOrEqual;j.ge=j.greaterThanOrEqual;j.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};j.comp=j.compare;j.negate=function(){return!this.unsigned&&this.eq(ar)?ar:this.not().add(Ja)};j.neg=j.negate;j.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,Me(f<<16|p,u<<16|d,this.unsigned)};j.subtract=function(t){return Ht(t)||(t=Pr(t)),this.add(t.neg())};j.sub=j.subtract;j.multiply=function(t){if(this.isZero())return this;if(Ht(t)||(t=Pr(t)),Ar){var r=Ar.mul(this.low,this.high,t.low,t.high);return Me(r,Ar.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Rn:qr;if(this.eq(ar))return t.isOdd()?ar:qr;if(t.eq(ar))return this.isOdd()?ar:qr;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(mk)&&t.lt(mk))return Nr(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,Me(p<<16|h,d<<16|f,this.unsigned)};j.mul=j.multiply;j.divide=function(t){if(Ht(t)||(t=Pr(t)),t.isZero())throw Error("division by zero");if(Ar){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Ar.div_u:Ar.div_s)(this.low,this.high,t.low,t.high);return Me(r,Ar.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Rn:qr;var n,o,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Rn;if(t.gt(this.shru(1)))return yk;a=Rn}else{if(this.eq(ar)){if(t.eq(Ja)||t.eq(kh))return ar;if(t.eq(ar))return Ja;var i=this.shr(1);return n=i.div(t).shl(1),n.eq(qr)?t.isNegative()?Ja:kh:(o=this.sub(t.mul(n)),a=n.add(o.div(t)),a)}else if(t.eq(ar))return this.unsigned?Rn:qr;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=qr}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=Nr(n),u=c.mul(t);u.isNegative()||u.gt(o);)n-=l,c=Nr(n,this.unsigned),u=c.mul(t);c.isZero()&&(c=Ja),a=a.add(c),o=o.sub(u)}return a};j.div=j.divide;j.modulo=function(t){if(Ht(t)||(t=Pr(t)),Ar){var r=(this.unsigned?Ar.rem_u:Ar.rem_s)(this.low,this.high,t.low,t.high);return Me(r,Ar.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};j.mod=j.modulo;j.rem=j.modulo;j.not=function(){return Me(~this.low,~this.high,this.unsigned)};j.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};j.clz=j.countLeadingZeros;j.countTrailingZeros=function(){return this.low?uk(this.low):uk(this.high)+32};j.ctz=j.countTrailingZeros;j.and=function(t){return Ht(t)||(t=Pr(t)),Me(this.low&t.low,this.high&t.high,this.unsigned)};j.or=function(t){return Ht(t)||(t=Pr(t)),Me(this.low|t.low,this.high|t.high,this.unsigned)};j.xor=function(t){return Ht(t)||(t=Pr(t)),Me(this.low^t.low,this.high^t.high,this.unsigned)};j.shiftLeft=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Me(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Me(0,this.low<<t-32,this.unsigned)};j.shl=j.shiftLeft;j.shiftRight=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Me(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Me(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};j.shr=j.shiftRight;j.shiftRightUnsigned=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Me(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?Me(this.high,0,this.unsigned):Me(this.high>>>t-32,0,this.unsigned)};j.shru=j.shiftRightUnsigned;j.shr_u=j.shiftRightUnsigned;j.rotateLeft=function(t){var r;return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Me(this.high,this.low,this.unsigned):t<32?(r=32-t,Me(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,Me(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))};j.rotl=j.rotateLeft;j.rotateRight=function(t){var r;return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Me(this.high,this.low,this.unsigned):t<32?(r=32-t,Me(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,Me(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};j.rotr=j.rotateRight;j.toSigned=function(){return this.unsigned?Me(this.low,this.high,!1):this};j.toUnsigned=function(){return this.unsigned?this:Me(this.low,this.high,!0)};j.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};j.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]};j.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]};je.fromBytes=function(t,r,n){return n?je.fromBytesLE(t,r):je.fromBytesBE(t,r)};je.fromBytesLE=function(t,r){return new je(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)};je.fromBytesBE=function(t,r){return new je(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"&&(je.fromBigInt=function(t,r){var n=Number(BigInt.asIntN(32,t)),o=Number(BigInt.asIntN(32,t>>BigInt(32)));return Me(n,o,r)},je.fromValue=function(t,r){return typeof t=="bigint"?je.fromBigInt(t,r):Pr(t,r)},j.toBigInt=function(){var t=BigInt(this.low>>>0),r=BigInt(this.unsigned?this.high>>>0:this.high);return r<<BigInt(32)|t});Sk=je});var wk={};Hy(wk,{SimpleperfReportConverter:()=>Ou,convertSimpleperfTraceProfile:()=>Y$});function Fu(e){return Sk.isLong(e)?e.toNumber():e}function Ik(e){return Fu(e)/1e6}function Y$(e){return new Ou(e).process()}var vk,Mn,Ch,Eh,Ah,Nh,Ph,Rh,Mh,Ou,kk=Eo(()=>{"use strict";vk=le(ck());cr();tr();ur();me();lh();xk();Mn=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=Ea();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=_a();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}},Ah=class{strings;frameTable=ka();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}},Nh=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=Ue.withBackingArray(this.stringArray);stackTable=new Nh(this.stringTable);frameTable=new Ah(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:Na(),stringArray:this.stringArray}}},Rh=class{name;isMainThread;tid;pid;strings;sampleTable=XT();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=Mn.Other;if(c==="[kernel.kallsyms]"||c.endsWith(".ko"))d=Mn.Kernel;else if(c.endsWith(".so"))d=u?Mn.System:Mn.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?Mn.System:Mn.Java}let f=this.frameTable.findOrAddFrame(l,d);n=this.stackTable.findOrAddStack(f,n)}if(this.sampleTable.stack.push(n),G(this.sampleTable.time).push(Ik(t.time??0)),this.sampleTable.weight){let o=this.cpuClockEventId>=0&&t.eventTypeId===this.cpuClockEventId?Ik(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:Mn.toJson(),product:this.appPackageName??"Android Profile",stackwalk:0,version:30,preprocessedProfileVersion:61,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,vk.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 Uk=O(Du=>{"use strict";var I3=gu(),v3=Symbol.for("react.element"),w3=Symbol.for("react.fragment"),k3=Object.prototype.hasOwnProperty,_3=I3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C3={key:!0,ref:!0,__self:!0,__source:!0};function Bk(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)k3.call(t,n)&&!C3.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:v3,type:e,key:a,ref:i,props:o,_owner:_3.current}}Du.Fragment=w3;Du.jsx=Bk;Du.jsxs=Bk});var $k=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 q=h&&_[h]||_[y];return typeof q=="function"?q:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(_){{for(var q=arguments.length,te=new Array(q>1?q-1:0),de=1;de<q;de++)te[de-1]=arguments[de];T("error",_,te)}}function T(_,q,te){{var de=g.ReactDebugCurrentFrame,Pe=de.getStackAddendum();Pe!==""&&(q+="%s",te=te.concat([Pe]));var qe=te.map(function(we){return String(we)});qe.unshift("Warning: "+q),Function.prototype.apply.call(console[_],console,qe)}}var S=!1,I=!1,v=!1,w=!1,k=!1,E;E=Symbol.for("react.module.reference");function A(_){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(_,q,te){var de=_.displayName;if(de)return de;var Pe=q.displayName||q.name||"";return Pe!==""?te+"("+Pe+")":te}function W(_){return _.displayName||"Context"}function U(_){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 q=_;return W(q)+".Consumer";case i:var te=_;return W(te._context)+".Provider";case l:return F(_,_.render,"ForwardRef");case d:var de=_.displayName||null;return de!==null?de:U(_.type)||"Memo";case f:{var Pe=_,qe=Pe._payload,we=Pe._init;try{return U(we(qe))}catch{return null}}}return null}var K=Object.assign,J=0,Oe,L,Q,N,M,R,P;function $(){}$.__reactDisabledLog=!0;function z(){{if(J===0){Oe=console.log,L=console.info,Q=console.warn,N=console.error,M=console.group,R=console.groupCollapsed,P=console.groupEnd;var _={configurable:!0,enumerable:!0,value:$,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}J++}}function re(){{if(J--,J===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},_,{value:Oe}),info:K({},_,{value:L}),warn:K({},_,{value:Q}),error:K({},_,{value:N}),group:K({},_,{value:M}),groupCollapsed:K({},_,{value:R}),groupEnd:K({},_,{value:P})})}J<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=g.ReactCurrentDispatcher,Ee;function ve(_,q,te){{if(Ee===void 0)try{throw Error()}catch(Pe){var de=Pe.stack.trim().match(/\n( *(at )?)/);Ee=de&&de[1]||""}return`
55
- `+Ee+_}}var ge=!1,be;{var Ae=typeof WeakMap=="function"?WeakMap:Map;be=new Ae}function H(_,q){if(!_||ge)return"";{var te=be.get(_);if(te!==void 0)return te}var de;ge=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var qe;qe=ae.current,ae.current=null,z();try{if(q){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(Dt){de=Dt}Reflect.construct(_,[],we)}else{try{we.call()}catch(Dt){de=Dt}_.call(we.prototype)}}else{try{throw Error()}catch(Dt){de=Dt}_()}}catch(Dt){if(Dt&&de&&typeof Dt.stack=="string"){for(var Se=Dt.stack.split(`
56
- `),At=de.stack.split(`
57
- `),ot=Se.length-1,lt=At.length-1;ot>=1&&lt>=0&&Se[ot]!==At[lt];)lt--;for(;ot>=1&&lt>=0;ot--,lt--)if(Se[ot]!==At[lt]){if(ot!==1||lt!==1)do if(ot--,lt--,lt<0||Se[ot]!==At[lt]){var er=`
58
- `+Se[ot].replace(" at new "," at ");return _.displayName&&er.includes("<anonymous>")&&(er=er.replace("<anonymous>",_.displayName)),typeof _=="function"&&be.set(_,er),er}while(ot>=1&&lt>=0);break}}}finally{ge=!1,ae.current=qe,re(),Error.prepareStackTrace=Pe}var Zn=_?_.displayName||_.name:"",yn=Zn?ve(Zn):"";return typeof _=="function"&&be.set(_,yn),yn}function X(_,q,te){return H(_,!1)}function Z(_){var q=_.prototype;return!!(q&&q.isReactComponent)}function ee(_,q,te){if(_==null)return"";if(typeof _=="function")return H(_,Z(_));if(typeof _=="string")return ve(_);switch(_){case c:return ve("Suspense");case u:return ve("SuspenseList")}if(typeof _=="object")switch(_.$$typeof){case l:return X(_.render);case d:return ee(_.type,q,te);case f:{var de=_,Pe=de._payload,qe=de._init;try{return ee(qe(Pe),q,te)}catch{}}}return""}var Te=Object.prototype.hasOwnProperty,Le={},Ze=g.ReactDebugCurrentFrame;function st(_){if(_){var q=_._owner,te=ee(_.type,_._source,q?q.type:null);Ze.setExtraStackFrame(te)}else Ze.setExtraStackFrame(null)}function Qe(_,q,te,de,Pe){{var qe=Function.call.bind(Te);for(var we in _)if(qe(_,we)){var Se=void 0;try{if(typeof _[we]!="function"){var At=Error((de||"React class")+": "+te+" type `"+we+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[we]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw At.name="Invariant Violation",At}Se=_[we](q,we,de,te,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ot){Se=ot}Se&&!(Se instanceof Error)&&(st(Pe),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).",de||"React class",te,we,typeof Se),st(null)),Se instanceof Error&&!(Se.message in Le)&&(Le[Se.message]=!0,st(Pe),m("Failed %s type: %s",te,Se.message),st(null))}}}var br=Array.isArray;function Xt(_){return br(_)}function jt(_){{var q=typeof Symbol=="function"&&Symbol.toStringTag,te=q&&_[Symbol.toStringTag]||_.constructor.name||"Object";return te}}function Ot(_){try{return mt(_),!1}catch{return!0}}function mt(_){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.",jt(_)),mt(_)}var Lt=g.ReactCurrentOwner,Qt={key:!0,ref:!0,__self:!0,__source:!0},Tr,fa,_o;_o={};function Oi(_){if(Te.call(_,"ref")){var q=Object.getOwnPropertyDescriptor(_,"ref").get;if(q&&q.isReactWarning)return!1}return _.ref!==void 0}function tn(_){if(Te.call(_,"key")){var q=Object.getOwnPropertyDescriptor(_,"key").get;if(q&&q.isReactWarning)return!1}return _.key!==void 0}function pa(_,q){if(typeof _.ref=="string"&&Lt.current&&q&&Lt.current.stateNode!==q){var te=U(Lt.current.type);_o[te]||(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',U(Lt.current.type),_.ref),_o[te]=!0)}}function nf(_,q){{var te=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)",q))};te.isReactWarning=!0,Object.defineProperty(_,"key",{get:te,configurable:!0})}}function of(_,q){{var te=function(){fa||(fa=!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)",q))};te.isReactWarning=!0,Object.defineProperty(_,"ref",{get:te,configurable:!0})}}var Ml=function(_,q,te,de,Pe,qe,we){var Se={$$typeof:t,type:_,key:q,ref:te,props:we,_owner:qe};return Se._store={},Object.defineProperty(Se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Se,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(Se,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(Se.props),Object.freeze(Se)),Se};function af(_,q,te,de,Pe){{var qe,we={},Se=null,At=null;te!==void 0&&(zt(te),Se=""+te),tn(q)&&(zt(q.key),Se=""+q.key),Oi(q)&&(At=q.ref,pa(q,Pe));for(qe in q)Te.call(q,qe)&&!Qt.hasOwnProperty(qe)&&(we[qe]=q[qe]);if(_&&_.defaultProps){var ot=_.defaultProps;for(qe in ot)we[qe]===void 0&&(we[qe]=ot[qe])}if(Se||At){var lt=typeof _=="function"?_.displayName||_.name||"Unknown":_;Se&&nf(we,lt),At&&of(we,lt)}return Ml(_,Se,At,Pe,de,Lt.current,we)}}var ha=g.ReactCurrentOwner,ma=g.ReactDebugCurrentFrame;function Dr(_){if(_){var q=_._owner,te=ee(_.type,_._source,q?q.type:null);ma.setExtraStackFrame(te)}else ma.setExtraStackFrame(null)}var zn;zn=!1;function Li(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Fl(){{if(ha.current){var _=U(ha.current.type);if(_)return`
54
+ Check the top-level render call using <`+D+">.")}return C}function Oy(x,C){if(!(!x._store||x._store.validated||x.key!=null)){x._store.validated=!0;var D=WP(C);if(!Fy[D]){Fy[D]=!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.',D,U),ba(null)}}}function Ly(x,C){if(typeof x=="object"){if(be(x))for(var D=0;D<x.length;D++){var U=x[D];tn(U)&&Oy(U,C)}else if(tn(x))x._store&&(x._store.validated=!0);else if(x){var te=b(x);if(typeof te=="function"&&te!==x.entries)for(var he=te.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 D;if(typeof C=="function")D=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===d))D=C.propTypes;else return;if(D){var U=qe(C);UP(D,x.props,"prop",U,x)}else if(C.PropTypes!==void 0&&!mf){mf=!0;var te=qe(C);X("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",te||"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 HP(x){{for(var C=Object.keys(x.props),D=0;D<C.length;D++){var U=C[D];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,D){var U=$l(x);if(!U){var te="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(te+=" 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=GP(C);he?te+=he:te+=My();var ie;x===null?ie="null":be(x)?ie="array":x!==void 0&&x.$$typeof===t?(ie="<"+(qe(x.type)||"Unknown")+" />",te=" 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,te)}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?HP(ye):Dy(ye),ye}var Uy=!1;function VP(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 jP(x,C,D){for(var U=Oi.apply(this,arguments),te=2;te<arguments.length;te++)Ly(arguments[te],U.type);return Dy(U),U}function qP(x,C){var D=g.transition;g.transition={};var U=g.transition;g.transition._updatedFibers=new Set;try{x()}finally{if(g.transition=D,D===null&&U._updatedFibers){var te=U._updatedFibers.size;te>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 zP(x){if(ql===null)try{var C=("require"+Math.random()).slice(0,7),D=mu&&mu[C];ql=D.call(mu,"timers").setImmediate}catch{ql=function(te){$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=te,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 D=T.isBatchingLegacy,U;try{if(T.isBatchingLegacy=!0,U=x(),!D&&T.didScheduleLegacyUpdate){var te=T.current;te!==null&&(T.didScheduleLegacyUpdate=!1,bf(te))}}catch(it){throw zl(C),it}finally{T.isBatchingLegacy=D}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,D){{var U=T.current;if(U!==null)try{bf(U),zP(function(){U.length===0?(T.current=null,C(x)):gf(x,C,D)})}catch(te){D(te)}else C(x)}}var yf=!1;function bf(x){if(!yf){yf=!0;var C=0;try{for(;C<x.length;C++){var D=x[C];do D=D(!0);while(D!==null)}x.length=0}catch(U){throw x=x.slice(C+1),U}finally{yf=!1}}}var KP=By,ZP=jP,JP=VP,YP={map:Kn,forEach:Fl,count:Li,toArray:sf,only:Ol};ke.Children=YP,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=ZP,ke.createContext=lf,ke.createElement=KP,ke.createFactory=JP,ke.createRef=ue,ke.forwardRef=uf,ke.isValidElement=tn,ke.lazy=Bl,ke.memo=df,ke.startTransition=qP,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=_e,ke.useLayoutEffect=ve,ke.useMemo=at,ke.useReducer=me,ke.useRef=Me,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((Z5,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 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 "${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 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(g,k,E);let A;if(S.elems){A=new Map;for(let[B,Z]of Object.entries(S.elems))r.isValidElement(Z)&&A.set(B.toLowerCase(),Z)}let G=this.parseMarkup(E).map(({nodeName:B,textContent:Z})=>{if(B==="#text")return Z;let X=B.toLowerCase(),Ee=A==null?void 0:A.get(X);return Ee?typeof Ee.type=="string"&&Ee.type in s?Ee:r.cloneElement(Ee,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 E=typeof k=="string"?k:void 0,A=w.getString(g,S,E);return r.createElement(r.Fragment,null,A)}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((tZ,mw)=>{"use strict";mw.exports=z$;function z$(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((nZ,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((oZ,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((iZ,Mw)=>{"use strict";Mw.exports=K$;function K$(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((sZ,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 Z$=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===Z$?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((cZ,Ww)=>{"use strict";Ww.exports=Fe;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 J$(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function Fe(){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(Fe.create=function(){return new hh})()}:function(){return new Fe}};Fe.create=Gw();Fe.alloc=function(t){return new Er.Array(t)};Er.Array!==Array&&(Fe.alloc=Er.pool(Fe.alloc,Er.Array.prototype.subarray));Fe.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 Y$(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=Y$;Fe.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};Fe.prototype.int32=function(t){return t<0?this._push(Th,10,Pu.fromNumber(t)):this.uint32(t)};Fe.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}Fe.prototype.uint64=function(t){var r=Pu.from(t);return this._push(Th,r.length(),r)};Fe.prototype.int64=Fe.prototype.uint64;Fe.prototype.sint64=function(t){var r=Pu.from(t).zzEncode();return this._push(Th,r.length(),r)};Fe.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}Fe.prototype.fixed32=function(t){return this._push(mh,4,t>>>0)};Fe.prototype.sfixed32=Fe.prototype.fixed32;Fe.prototype.fixed64=function(t){var r=Pu.from(t);return this._push(mh,4,r.lo)._push(mh,4,r.hi)};Fe.prototype.sfixed64=Fe.prototype.fixed64;Fe.prototype.float=function(t){return this._push(Er.float.writeFloatLE,4,t)};Fe.prototype.double=function(t){return this._push(Er.float.writeDoubleLE,8,t)};var X$=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]};Fe.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(yh,1,0);if(Er.isString(t)){var n=Fe.alloc(r=Uw.length(t));Uw.decode(t,n,0),t=n}return this.uint32(r)._push(X$,r,t)};Fe.prototype.string=function(t){var r=$w.length(t);return r?this.uint32(r)._push($w.write,r,t):this._push(yh,1,0)};Fe.prototype.fork=function(){return this.states=new J$(this),this.head=this.tail=new Us(gh,0,0),this.len=0,this};Fe.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};Fe.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};Fe.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};Fe._configure=function(e){hh=e,Fe.create=Gw(),hh._configure()}});var jw=O((uZ,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 Q$(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(Q$,r,t),this};sn._configure()});var vh=O((dZ,Jw)=>{"use strict";Jw.exports=pt;var Hr=uo(),Ih,Kw=Hr.LongBits,e3=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 e3.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((fZ,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((pZ,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 t3=nk;t3.Service=rk()});var ik=O((mZ,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((yZ,uk)=>{"use strict";uk.exports=ck()});var pk=O((bZ,fk)=>{"use strict";var ar=dk(),Ce=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 Ce||(n=Ce.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 Ce||(n=new Ce(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 Ce||(o=Ce.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 Ce||(o=new Ce(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 Ce||(o=Ce.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 Ce||(o=new Ce(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 Ce||(n=Ce.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 Ce||(n=new Ce(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 Ce||(n=Ce.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 Ce||(n=new Ce(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 Ce||(n=Ce.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 Ce||(n=new Ce(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 Ce||(n=Ce.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 Ce||(n=new Ce(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 Ce||(n=Ce.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 Ce||(n=new Ce(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 Ce||(o=Ce.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 Ce||(o=new Ce(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=Oe(e,0,!0),o&&(gk[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(n=mk[e],n)?n:(r=Oe(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():Oe(e%Ya|0,e/Ya|0,t)}function Oe(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):Oe(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}var Nr,mk,gk,Mu,yk,r3,Ya,Sk,bk,Tk,jr,Fn,Ja,xk,kh,Ik,vk,ir,J,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=Oe;Mu=Math.pow;Ke.fromString=_h;Ke.fromValue=Pr;yk=65536,r3=1<<24,Ya=yk*yk,Sk=Ya*Ya,bk=Sk/2,Tk=qo(r3),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=Oe(-1,2147483647,!1);Ke.MAX_VALUE=Ik;vk=Oe(-1,-1,!0);Ke.MAX_UNSIGNED_VALUE=vk;ir=Oe(0,-2147483648,!1);Ke.MIN_VALUE=ir;J=Ke.prototype;J.toInt=function(){return this.unsigned?this.low>>>0:this.low};J.toNumber=function(){return this.unsigned?(this.high>>>0)*Ya+(this.low>>>0):this.high*Ya+(this.low>>>0)};J.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}};J.getHighBits=function(){return this.high};J.getHighBitsUnsigned=function(){return this.high>>>0};J.getLowBits=function(){return this.low};J.getLowBitsUnsigned=function(){return this.low>>>0};J.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};J.isSafeInteger=function(){var t=this.high>>21;return t?this.unsigned?!1:t===-1&&!(this.low===0&&this.high===-2097152):!0};J.isZero=function(){return this.high===0&&this.low===0};J.eqz=J.isZero;J.isNegative=function(){return!this.unsigned&&this.high<0};J.isPositive=function(){return this.unsigned||this.high>=0};J.isOdd=function(){return(this.low&1)===1};J.isEven=function(){return(this.low&1)===0};J.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};J.eq=J.equals;J.notEquals=function(t){return!this.eq(t)};J.neq=J.notEquals;J.ne=J.notEquals;J.lessThan=function(t){return this.comp(t)<0};J.lt=J.lessThan;J.lessThanOrEqual=function(t){return this.comp(t)<=0};J.lte=J.lessThanOrEqual;J.le=J.lessThanOrEqual;J.greaterThan=function(t){return this.comp(t)>0};J.gt=J.greaterThan;J.greaterThanOrEqual=function(t){return this.comp(t)>=0};J.gte=J.greaterThanOrEqual;J.ge=J.greaterThanOrEqual;J.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};J.comp=J.compare;J.negate=function(){return!this.unsigned&&this.eq(ir)?ir:this.not().add(Ja)};J.neg=J.negate;J.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,Oe(f<<16|p,u<<16|d,this.unsigned)};J.subtract=function(t){return Ht(t)||(t=Pr(t)),this.add(t.neg())};J.sub=J.subtract;J.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 Oe(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,Oe(p<<16|h,d<<16|f,this.unsigned)};J.mul=J.multiply;J.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 Oe(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};J.div=J.divide;J.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 Oe(r,Nr.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};J.mod=J.modulo;J.rem=J.modulo;J.not=function(){return Oe(~this.low,~this.high,this.unsigned)};J.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};J.clz=J.countLeadingZeros;J.countTrailingZeros=function(){return this.low?hk(this.low):hk(this.high)+32};J.ctz=J.countTrailingZeros;J.and=function(t){return Ht(t)||(t=Pr(t)),Oe(this.low&t.low,this.high&t.high,this.unsigned)};J.or=function(t){return Ht(t)||(t=Pr(t)),Oe(this.low|t.low,this.high|t.high,this.unsigned)};J.xor=function(t){return Ht(t)||(t=Pr(t)),Oe(this.low^t.low,this.high^t.high,this.unsigned)};J.shiftLeft=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Oe(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Oe(0,this.low<<t-32,this.unsigned)};J.shl=J.shiftLeft;J.shiftRight=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Oe(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Oe(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};J.shr=J.shiftRight;J.shiftRightUnsigned=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Oe(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?Oe(this.high,0,this.unsigned):Oe(this.high>>>t-32,0,this.unsigned)};J.shru=J.shiftRightUnsigned;J.shr_u=J.shiftRightUnsigned;J.rotateLeft=function(t){var r;return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Oe(this.high,this.low,this.unsigned):t<32?(r=32-t,Oe(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,Oe(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))};J.rotl=J.rotateLeft;J.rotateRight=function(t){var r;return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Oe(this.high,this.low,this.unsigned):t<32?(r=32-t,Oe(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,Oe(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};J.rotr=J.rotateRight;J.toSigned=function(){return this.unsigned?Oe(this.low,this.high,!1):this};J.toUnsigned=function(){return this.unsigned?this:Oe(this.low,this.high,!0)};J.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};J.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]};J.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 Oe(n,o,r)},Ke.fromValue=function(t,r){return typeof t=="bigint"?Ke.fromBigInt(t,r):Pr(t,r)},J.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:()=>n3});function Fu(e){return wk.isLong(e)?e.toNumber():e}function _k(e){return Fu(e)/1e6}function n3(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 N3=gu(),A3=Symbol.for("react.element"),P3=Symbol.for("react.fragment"),R3=Object.prototype.hasOwnProperty,M3=N3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,F3={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)R3.call(t,n)&&!F3.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:A3,type:e,key:a,ref:i,props:o,_owner:M3.current}}Du.Fragment=P3;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,Me=me.getStackAddendum();Me!==""&&(K+="%s",ne=ne.concat([Me]));var ze=ne.map(function(_e){return String(_e)});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 A(_){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 Me=K.displayName||K.name||"";return Me!==""?ne+"("+Me+")":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 Me=_,ze=Me._payload,_e=Me._init;try{return B(_e(ze))}catch{return null}}}return null}var Z=Object.assign,X=0,Ee,L,Q,N,R,M,P;function $(){}$.__reactDisabledLog=!0;function Y(){{if(X===0){Ee=console.log,L=console.info,Q=console.warn,N=console.error,R=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:Ee}),info:Z({},_,{value:L}),warn:Z({},_,{value:Q}),error:Z({},_,{value:N}),group:Z({},_,{value:R}),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(Me){var me=Me.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 Me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ze;ze=z.current,z.current=null,Y();try{if(K){var _e=function(){throw Error()};if(Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(Dt){me=Dt}Reflect.construct(_,[],_e)}else{try{_e.call()}catch(Dt){me=Dt}_.call(_e.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
+ `),Nt=me.stack.split(`
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=Me}var Jn=_?_.displayName||_.name:"",bn=Jn?de(Jn):"";return typeof _=="function"&&fe.set(_,bn),bn}function re(_,K,ne){return V(_,!1)}function q(_){var K=_.prototype;return!!(K&&K.isReactComponent)}function ee(_,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 re(_.render);case d:return ee(_.type,K,ne);case f:{var me=_,Me=me._payload,ze=me._init;try{return ee(ze(Me),K,ne)}catch{}}}return""}var Te=Object.prototype.hasOwnProperty,Ne={},qe=m.ReactDebugCurrentFrame;function lt(_){if(_){var K=_._owner,ne=ee(_.type,_._source,K?K.type:null);qe.setExtraStackFrame(ne)}else qe.setExtraStackFrame(null)}function et(_,K,ne,me,Me){{var ze=Function.call.bind(Te);for(var _e in _)if(ze(_,_e)){var ve=void 0;try{if(typeof _[_e]!="function"){var Nt=Error((me||"React class")+": "+ne+" type `"+_e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[_e]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Nt.name="Invariant Violation",Nt}ve=_[_e](K,_e,me,ne,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(at){ve=at}ve&&!(ve instanceof Error)&&(lt(Me),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,_e,typeof ve),lt(null)),ve instanceof Error&&!(ve.message in Ne)&&(Ne[ve.message]=!0,lt(Me),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,Me,ze,_e){var ve={$$typeof:t,type:_,key:K,ref:ne,props:_e,_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:Me}),Object.freeze&&(Object.freeze(ve.props),Object.freeze(ve)),ve};function af(_,K,ne,me,Me){{var ze,_e={},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,Me));for(ze in K)Te.call(K,ze)&&!er.hasOwnProperty(ze)&&(_e[ze]=K[ze]);if(_&&_.defaultProps){var at=_.defaultProps;for(ze in at)_e[ze]===void 0&&(_e[ze]=at[ze])}if(ve||Nt){var ct=typeof _=="function"?_.displayName||_.name||"Unknown":_;ve&&nf(_e,ct),Nt&&of(_e,ct)}return Ml(_,ve,Nt,Me,me,Lt.current,_e)}}var ma=m.ReactCurrentOwner,ga=m.ReactDebugCurrentFrame;function Dr(_){if(_){var K=_._owner,ne=ee(_.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`
59
59
 
60
- Check the render method of \``+_+"`."}return""}}function sf(_){{if(_!==void 0){var q=_.fileName.replace(/^.*[\\\/]/,""),te=_.lineNumber;return`
60
+ Check the render method of \``+_+"`."}return""}}function sf(_){{if(_!==void 0){var K=_.fileName.replace(/^.*[\\\/]/,""),ne=_.lineNumber;return`
61
61
 
62
- Check your code at `+q+":"+te+"."}return""}}var Ol={};function lf(_){{var q=Fl();if(!q){var te=typeof _=="string"?_:_.displayName||_.name;te&&(q=`
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=`
63
63
 
64
- Check the top-level render call using <`+te+">.")}return q}}function Kn(_,q){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var te=lf(q);if(Ol[te])return;Ol[te]=!0;var de="";_&&_._owner&&_._owner!==ha.current&&(de=" It was passed a child from "+U(_._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.',te,de),Dr(null)}}function ga(_,q){{if(typeof _!="object")return;if(Xt(_))for(var te=0;te<_.length;te++){var de=_[te];Li(de)&&Kn(de,q)}else if(Li(_))_._store&&(_._store.validated=!0);else if(_){var Pe=b(_);if(typeof Pe=="function"&&Pe!==_.entries)for(var qe=Pe.call(_),we;!(we=qe.next()).done;)Li(we.value)&&Kn(we.value,q)}}}function Ll(_){{var q=_.type;if(q==null||typeof q=="string")return;var te;if(typeof q=="function")te=q.propTypes;else if(typeof q=="object"&&(q.$$typeof===l||q.$$typeof===d))te=q.propTypes;else return;if(te){var de=U(q);Qe(te,_.props,"prop",de,_)}else if(q.PropTypes!==void 0&&!zn){zn=!0;var Pe=U(q);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof q.getDefaultProps=="function"&&!q.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cf(_){{for(var q=Object.keys(_.props),te=0;te<q.length;te++){var de=q[te];if(de!=="children"&&de!=="key"){Dr(_),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),Dr(null);break}}_.ref!==null&&(Dr(_),m("Invalid attribute `ref` supplied to `React.Fragment`."),Dr(null))}}var Dl={};function Bl(_,q,te,de,Pe,qe){{var we=A(_);if(!we){var Se="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(Se+=" 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 At=sf(Pe);At?Se+=At:Se+=Fl();var ot;_===null?ot="null":Xt(_)?ot="array":_!==void 0&&_.$$typeof===t?(ot="<"+(U(_.type)||"Unknown")+" />",Se=" Did you accidentally export a JSX literal instead of a component?"):ot=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",ot,Se)}var lt=af(_,q,te,Pe,qe);if(lt==null)return lt;if(we){var er=q.children;if(er!==void 0)if(de)if(Xt(er)){for(var Zn=0;Zn<er.length;Zn++)ga(er[Zn],_);Object.freeze&&Object.freeze(er)}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 ga(er,_)}if(Te.call(q,"key")){var yn=U(_),Dt=Object.keys(q).filter(function(Gl){return Gl!=="key"}),Di=Dt.length>0?"{key: someKey, "+Dt.join(": ..., ")+": ...}":"{key: someKey}";if(!Dl[yn+Di]){var Co=Dt.length>0?"{"+Dt.join(": ..., ")+": ...}":"{}";m(`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=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 Me=b(_);if(typeof Me=="function"&&Me!==_.entries)for(var ze=Me.call(_),_e;!(_e=ze.next()).done;)Li(_e.value)&&Zn(_e.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 Me=B(K);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Me||"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,Me,ze){{var _e=A(_);if(!_e){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(Me);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,Me,ze);if(ct==null)return ct;if(_e){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:
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,yn,Co,yn),Dl[yn+Di]=!0}}return _===n?cf(lt):Ll(lt),lt}}function uf(_,q,te){return Bl(_,q,te,!0)}function Ul(_,q,te){return Bl(_,q,te,!1)}var $l=Ul,df=uf;Bu.Fragment=n,Bu.jsx=$l,Bu.jsxs=df})()});var Oh=O((VZ,Fh)=>{"use strict";process.env.NODE_ENV==="production"?Fh.exports=Uk():Fh.exports=$k()});var S_=O((zu,T_)=>{(function(e,t){typeof zu=="object"&&typeof T_<"u"?t(zu):typeof define=="function"&&define.amd?define(["exports"],t):t(e.reduxLogger=e.reduxLogger||{})})(zu,function(e){"use strict";function t(N,M){N.super_=M,N.prototype=Object.create(M.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}})}function r(N,M){Object.defineProperty(this,"kind",{value:N,enumerable:!0}),M&&M.length&&Object.defineProperty(this,"path",{value:M,enumerable:!0})}function n(N,M,R){n.super_.call(this,"E",N),Object.defineProperty(this,"lhs",{value:M,enumerable:!0}),Object.defineProperty(this,"rhs",{value:R,enumerable:!0})}function o(N,M){o.super_.call(this,"N",N),Object.defineProperty(this,"rhs",{value:M,enumerable:!0})}function a(N,M){a.super_.call(this,"D",N),Object.defineProperty(this,"lhs",{value:M,enumerable:!0})}function i(N,M,R){i.super_.call(this,"A",N),Object.defineProperty(this,"index",{value:M,enumerable:!0}),Object.defineProperty(this,"item",{value:R,enumerable:!0})}function s(N,M,R){var P=N.slice((R||M)+1||N.length);return N.length=M<0?N.length+M:M,N.push.apply(N,P),N}function l(N){var M=typeof N>"u"?"undefined":U(N);return M!=="object"?M: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,M,R,P,$,z,re){$=$||[],re=re||[];var ae=$.slice(0);if(typeof z<"u"){if(P){if(typeof P=="function"&&P(ae,z))return;if((typeof P>"u"?"undefined":U(P))==="object"){if(P.prefilter&&P.prefilter(ae,z))return;if(P.normalize){var Ee=P.normalize(ae,z,N,M);Ee&&(N=Ee[0],M=Ee[1])}}}ae.push(z)}l(N)==="regexp"&&l(M)==="regexp"&&(N=N.toString(),M=M.toString());var ve=typeof N>"u"?"undefined":U(N),ge=typeof M>"u"?"undefined":U(M),be=ve!=="undefined"||re&&re[re.length-1].lhs&&re[re.length-1].lhs.hasOwnProperty(z),Ae=ge!=="undefined"||re&&re[re.length-1].rhs&&re[re.length-1].rhs.hasOwnProperty(z);if(!be&&Ae)R(new o(ae,M));else if(!Ae&&be)R(new a(ae,N));else if(l(N)!==l(M))R(new n(ae,N,M));else if(l(N)==="date"&&N-M!==0)R(new n(ae,N,M));else if(ve==="object"&&N!==null&&M!==null)if(re.filter(function(ee){return ee.lhs===N}).length)N!==M&&R(new n(ae,N,M));else{if(re.push({lhs:N,rhs:M}),Array.isArray(N)){var H;for(N.length,H=0;H<N.length;H++)H>=M.length?R(new i(ae,H,new a(void 0,N[H]))):c(N[H],M[H],R,P,ae,H,re);for(;H<M.length;)R(new i(ae,H,new o(void 0,M[H++])))}else{var X=Object.keys(N),Z=Object.keys(M);X.forEach(function(ee,Te){var Le=Z.indexOf(ee);Le>=0?(c(N[ee],M[ee],R,P,ae,ee,re),Z=s(Z,Le)):c(N[ee],void 0,R,P,ae,ee,re)}),Z.forEach(function(ee){c(void 0,M[ee],R,P,ae,ee,re)})}re.length=re.length-1}else N!==M&&(ve==="number"&&isNaN(N)&&isNaN(M)||R(new n(ae,N,M)))}function u(N,M,R,P){return P=P||[],c(N,M,function($){$&&P.push($)},R),P.length?P:void 0}function d(N,M,R){if(R.path&&R.path.length){var P,$=N[M],z=R.path.length-1;for(P=0;P<z;P++)$=$[R.path[P]];switch(R.kind){case"A":d($[R.path[P]],R.index,R.item);break;case"D":delete $[R.path[P]];break;case"E":case"N":$[R.path[P]]=R.rhs}}else switch(R.kind){case"A":d(N[M],R.index,R.item);break;case"D":N=s(N,M);break;case"E":case"N":N[M]=R.rhs}return N}function f(N,M,R){if(N&&M&&R&&R.kind){for(var P=N,$=-1,z=R.path?R.path.length-1:0;++$<z;)typeof P[R.path[$]]>"u"&&(P[R.path[$]]=typeof R.path[$]=="number"?[]:{}),P=P[R.path[$]];switch(R.kind){case"A":d(R.path?P[R.path[$]]:P,R.index,R.item);break;case"D":delete P[R.path[$]];break;case"E":case"N":P[R.path[$]]=R.rhs}}}function p(N,M,R){if(R.path&&R.path.length){var P,$=N[M],z=R.path.length-1;for(P=0;P<z;P++)$=$[R.path[P]];switch(R.kind){case"A":p($[R.path[P]],R.index,R.item);break;case"D":$[R.path[P]]=R.lhs;break;case"E":$[R.path[P]]=R.lhs;break;case"N":delete $[R.path[P]]}}else switch(R.kind){case"A":p(N[M],R.index,R.item);break;case"D":N[M]=R.lhs;break;case"E":N[M]=R.lhs;break;case"N":N=s(N,M)}return N}function h(N,M,R){if(N&&M&&R&&R.kind){var P,$,z=N;for($=R.path.length-1,P=0;P<$;P++)typeof z[R.path[P]]>"u"&&(z[R.path[P]]={}),z=z[R.path[P]];switch(R.kind){case"A":p(z[R.path[P]],R.index,R.item);break;case"D":z[R.path[P]]=R.lhs;break;case"E":z[R.path[P]]=R.lhs;break;case"N":delete z[R.path[P]]}}}function y(N,M,R){if(N&&M){var P=function($){R&&!R(N,M,$)||f(N,M,$)};c(N,M,P)}}function b(N){return"color: "+Oe[N].color+"; font-weight: bold"}function g(N){var M=N.kind,R=N.path,P=N.lhs,$=N.rhs,z=N.index,re=N.item;switch(M){case"E":return[R.join("."),P,"\u2192",$];case"N":return[R.join("."),$];case"D":return[R.join(".")];case"A":return[R.join(".")+"["+z+"]",re];default:return[]}}function m(N,M,R,P){var $=u(N,M);try{P?R.groupCollapsed("diff"):R.group("diff")}catch{R.log("diff")}$?$.forEach(function(z){var re=z.kind,ae=g(z);R.log.apply(R,["%c "+Oe[re].text,b(re)].concat(K(ae)))}):R.log("\u2014\u2014 no diff \u2014\u2014");try{R.groupEnd()}catch{R.log("\u2014\u2014 diff end \u2014\u2014 ")}}function T(N,M,R,P){switch(typeof N>"u"?"undefined":U(N)){case"object":return typeof N[P]=="function"?N[P].apply(N,K(R)):N[P];case"function":return N(M);default:return N}}function S(N){var M=N.timestamp,R=N.duration;return function(P,$,z){var re=["action"];return re.push("%c"+String(P.type)),M&&re.push("%c@ "+$),R&&re.push("%c(in "+z.toFixed(2)+" ms)"),re.join(" ")}}function I(N,M){var R=M.logger,P=M.actionTransformer,$=M.titleFormatter,z=$===void 0?S(M):$,re=M.collapsed,ae=M.colors,Ee=M.level,ve=M.diff,ge=typeof M.titleFormatter>"u";N.forEach(function(be,Ae){var H=be.started,X=be.startedTime,Z=be.action,ee=be.prevState,Te=be.error,Le=be.took,Ze=be.nextState,st=N[Ae+1];st&&(Ze=st.prevState,Le=st.started-H);var Qe=P(Z),br=typeof re=="function"?re(function(){return Ze},Z,be):re,Xt=F(X),jt=ae.title?"color: "+ae.title(Qe)+";":"",Ot=["color: gray; font-weight: lighter;"];Ot.push(jt),M.timestamp&&Ot.push("color: gray; font-weight: lighter;"),M.duration&&Ot.push("color: gray; font-weight: lighter;");var mt=z(Qe,Xt,Le);try{br?ae.title&&ge?R.groupCollapsed.apply(R,["%c "+mt].concat(Ot)):R.groupCollapsed(mt):ae.title&&ge?R.group.apply(R,["%c "+mt].concat(Ot)):R.group(mt)}catch{R.log(mt)}var zt=T(Ee,Qe,[ee],"prevState"),Lt=T(Ee,Qe,[Qe],"action"),Qt=T(Ee,Qe,[Te,ee],"error"),Tr=T(Ee,Qe,[Ze],"nextState");if(zt)if(ae.prevState){var fa="color: "+ae.prevState(ee)+"; font-weight: bold";R[zt]("%c prev state",fa,ee)}else R[zt]("prev state",ee);if(Lt)if(ae.action){var _o="color: "+ae.action(Qe)+"; font-weight: bold";R[Lt]("%c action ",_o,Qe)}else R[Lt]("action ",Qe);if(Te&&Qt)if(ae.error){var Oi="color: "+ae.error(Te,ee)+"; font-weight: bold;";R[Qt]("%c error ",Oi,Te)}else R[Qt]("error ",Te);if(Tr)if(ae.nextState){var tn="color: "+ae.nextState(Ze)+"; font-weight: bold";R[Tr]("%c next state",tn,Ze)}else R[Tr]("next state",Ze);ve&&m(ee,Ze,R,br);try{R.groupEnd()}catch{R.log("\u2014\u2014 log end \u2014\u2014")}})}function v(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=Object.assign({},L,N),R=M.logger,P=M.stateTransformer,$=M.errorTransformer,z=M.predicate,re=M.logErrors,ae=M.diffPredicate;if(typeof R>"u")return function(){return function(ve){return function(ge){return ve(ge)}}};if(N.getState&&N.dispatch)return console.error(`[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:
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((rJ,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(N,R){N.super_=R,N.prototype=Object.create(R.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}})}function r(N,R){Object.defineProperty(this,"kind",{value:N,enumerable:!0}),R&&R.length&&Object.defineProperty(this,"path",{value:R,enumerable:!0})}function n(N,R,M){n.super_.call(this,"E",N),Object.defineProperty(this,"lhs",{value:R,enumerable:!0}),Object.defineProperty(this,"rhs",{value:M,enumerable:!0})}function o(N,R){o.super_.call(this,"N",N),Object.defineProperty(this,"rhs",{value:R,enumerable:!0})}function a(N,R){a.super_.call(this,"D",N),Object.defineProperty(this,"lhs",{value:R,enumerable:!0})}function i(N,R,M){i.super_.call(this,"A",N),Object.defineProperty(this,"index",{value:R,enumerable:!0}),Object.defineProperty(this,"item",{value:M,enumerable:!0})}function s(N,R,M){var P=N.slice((M||R)+1||N.length);return N.length=R<0?N.length+R:R,N.push.apply(N,P),N}function l(N){var R=typeof N>"u"?"undefined":B(N);return R!=="object"?R: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,R,M,P,$,Y,H){$=$||[],H=H||[];var z=$.slice(0);if(typeof Y<"u"){if(P){if(typeof P=="function"&&P(z,Y))return;if((typeof P>"u"?"undefined":B(P))==="object"){if(P.prefilter&&P.prefilter(z,Y))return;if(P.normalize){var se=P.normalize(z,Y,N,R);se&&(N=se[0],R=se[1])}}}z.push(Y)}l(N)==="regexp"&&l(R)==="regexp"&&(N=N.toString(),R=R.toString());var de=typeof N>"u"?"undefined":B(N),ue=typeof R>"u"?"undefined":B(R),fe=de!=="undefined"||H&&H[H.length-1].lhs&&H[H.length-1].lhs.hasOwnProperty(Y),be=ue!=="undefined"||H&&H[H.length-1].rhs&&H[H.length-1].rhs.hasOwnProperty(Y);if(!fe&&be)M(new o(z,R));else if(!be&&fe)M(new a(z,N));else if(l(N)!==l(R))M(new n(z,N,R));else if(l(N)==="date"&&N-R!==0)M(new n(z,N,R));else if(de==="object"&&N!==null&&R!==null)if(H.filter(function(ee){return ee.lhs===N}).length)N!==R&&M(new n(z,N,R));else{if(H.push({lhs:N,rhs:R}),Array.isArray(N)){var V;for(N.length,V=0;V<N.length;V++)V>=R.length?M(new i(z,V,new a(void 0,N[V]))):c(N[V],R[V],M,P,z,V,H);for(;V<R.length;)M(new i(z,V,new o(void 0,R[V++])))}else{var re=Object.keys(N),q=Object.keys(R);re.forEach(function(ee,Te){var Ne=q.indexOf(ee);Ne>=0?(c(N[ee],R[ee],M,P,z,ee,H),q=s(q,Ne)):c(N[ee],void 0,M,P,z,ee,H)}),q.forEach(function(ee){c(void 0,R[ee],M,P,z,ee,H)})}H.length=H.length-1}else N!==R&&(de==="number"&&isNaN(N)&&isNaN(R)||M(new n(z,N,R)))}function u(N,R,M,P){return P=P||[],c(N,R,function($){$&&P.push($)},M),P.length?P:void 0}function d(N,R,M){if(M.path&&M.path.length){var P,$=N[R],Y=M.path.length-1;for(P=0;P<Y;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[R],M.index,M.item);break;case"D":N=s(N,R);break;case"E":case"N":N[R]=M.rhs}return N}function f(N,R,M){if(N&&R&&M&&M.kind){for(var P=N,$=-1,Y=M.path?M.path.length-1:0;++$<Y;)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,R,M){if(M.path&&M.path.length){var P,$=N[R],Y=M.path.length-1;for(P=0;P<Y;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[R],M.index,M.item);break;case"D":N[R]=M.lhs;break;case"E":N[R]=M.lhs;break;case"N":N=s(N,R)}return N}function h(N,R,M){if(N&&R&&M&&M.kind){var P,$,Y=N;for($=M.path.length-1,P=0;P<$;P++)typeof Y[M.path[P]]>"u"&&(Y[M.path[P]]={}),Y=Y[M.path[P]];switch(M.kind){case"A":p(Y[M.path[P]],M.index,M.item);break;case"D":Y[M.path[P]]=M.lhs;break;case"E":Y[M.path[P]]=M.lhs;break;case"N":delete Y[M.path[P]]}}}function y(N,R,M){if(N&&R){var P=function($){M&&!M(N,R,$)||f(N,R,$)};c(N,R,P)}}function b(N){return"color: "+Ee[N].color+"; font-weight: bold"}function m(N){var R=N.kind,M=N.path,P=N.lhs,$=N.rhs,Y=N.index,H=N.item;switch(R){case"E":return[M.join("."),P,"\u2192",$];case"N":return[M.join("."),$];case"D":return[M.join(".")];case"A":return[M.join(".")+"["+Y+"]",H];default:return[]}}function g(N,R,M,P){var $=u(N,R);try{P?M.groupCollapsed("diff"):M.group("diff")}catch{M.log("diff")}$?$.forEach(function(Y){var H=Y.kind,z=m(Y);M.log.apply(M,["%c "+Ee[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,R,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(R);default:return N}}function S(N){var R=N.timestamp,M=N.duration;return function(P,$,Y){var H=["action"];return H.push("%c"+String(P.type)),R&&H.push("%c@ "+$),M&&H.push("%c(in "+Y.toFixed(2)+" ms)"),H.join(" ")}}function I(N,R){var M=R.logger,P=R.actionTransformer,$=R.titleFormatter,Y=$===void 0?S(R):$,H=R.collapsed,z=R.colors,se=R.level,de=R.diff,ue=typeof R.titleFormatter>"u";N.forEach(function(fe,be){var V=fe.started,re=fe.startedTime,q=fe.action,ee=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(re),qt=z.title?"color: "+z.title(et)+";":"",Ot=["color: gray; font-weight: lighter;"];Ot.push(qt),R.timestamp&&Ot.push("color: gray; font-weight: lighter;"),R.duration&&Ot.push("color: gray; font-weight: lighter;");var gt=Y(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,[ee],"prevState"),Lt=T(se,et,[et],"action"),er=T(se,et,[Te,ee],"error"),Tr=T(se,et,[qe],"nextState");if(zt)if(z.prevState){var pa="color: "+z.prevState(ee)+"; font-weight: bold";M[zt]("%c prev state",pa,ee)}else M[zt]("prev state",ee);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,ee)+"; 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(ee,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]:{},R=Object.assign({},L,N),M=R.logger,P=R.stateTransformer,$=R.errorTransformer,Y=R.predicate,H=R.logErrors,z=R.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(ve){return function(ge){return ve(ge)}}};var Ee=[];return function(ve){var ge=ve.getState;return function(be){return function(Ae){if(typeof z=="function"&&!z(ge,Ae))return be(Ae);var H={};Ee.push(H),H.started=W.now(),H.startedTime=new Date,H.prevState=P(ge()),H.action=Ae;var X=void 0;if(re)try{X=be(Ae)}catch(ee){H.error=$(ee)}else X=be(Ae);H.took=W.now()-H.started,H.nextState=P(ge());var Z=M.diff&&typeof ae=="function"?ae(ge,Ae):M.diff;if(I(Ee,Object.assign({},M,{diff:Z})),Ee.length=0,H.error)throw H.error;return X}}}}var w,k,E=function(N,M){return new Array(M+1).join(N)},A=function(N,M){return E("0",M-N.toString().length)+N},F=function(N){return A(N.getHours(),2)+":"+A(N.getMinutes(),2)+":"+A(N.getSeconds(),2)+"."+A(N.getMilliseconds(),3)},W=typeof performance<"u"&&performance!==null&&typeof performance.now=="function"?performance:Date,U=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},K=function(N){if(Array.isArray(N)){for(var M=0,R=Array(N.length);M<N.length;M++)R[M]=N[M];return R}return Array.from(N)},J=[];w=(typeof global>"u"?"undefined":U(global))==="object"&&global?global:typeof window<"u"?window:{},k=w.DeepDiff,k&&J.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 J&&(J.forEach(function(N){N()}),J=null),u},enumerable:!0}});var Oe={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},L={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},Q=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=N.dispatch,R=N.getState;return typeof M=="function"||typeof R=="function"?v()({dispatch:M,getState:R}):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 Y=="function"&&!Y(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 re=void 0;if(H)try{re=fe(be)}catch(ee){V.error=$(ee)}else re=fe(be);V.took=G.now()-V.started,V.nextState=P(ue());var q=R.diff&&typeof z=="function"?z(ue,be):R.diff;if(I(se,Object.assign({},R,{diff:q})),se.length=0,V.error)throw V.error;return re}}}}var w,k,E=function(N,R){return new Array(R+1).join(N)},A=function(N,R){return E("0",R-N.toString().length)+N},F=function(N){return A(N.getHours(),2)+":"+A(N.getMinutes(),2)+":"+A(N.getSeconds(),2)+"."+A(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 R=0,M=Array(N.length);R<N.length;R++)M[R]=N[R];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 Ee={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},L={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},Q=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=N.dispatch,M=N.getState;return typeof R=="function"||typeof M=="function"?v()({dispatch:R,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=L,e.createLogger=v,e.logger=Q,e.default=Q,Object.defineProperty(e,"__esModule",{value:!0})})});var Vs=O((K7,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:rW}:rm.exports=process;function rW(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 L_=O((Z7,O_)=>{var nW={}.toString;O_.exports=Array.isArray||function(e){return nW.call(e)=="[object Array]"}});var nm=O((J7,D_)=>{D_.exports=require("stream")});var qs=O((om,U_)=>{var Zu=require("buffer"),Fn=Zu.Buffer;function B_(e,t){for(var r in e)t[r]=e[r]}Fn.from&&Fn.alloc&&Fn.allocUnsafe&&Fn.allocUnsafeSlow?U_.exports=Zu:(B_(Zu,om),om.Buffer=ti);function ti(e,t,r){return Fn(e,t,r)}B_(Fn,ti);ti.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Fn(e,t,r)};ti.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Fn(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 Fn(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 oW(e){return Array.isArray?Array.isArray(e):Ju(e)==="[object Array]"}Vt.isArray=oW;function aW(e){return typeof e=="boolean"}Vt.isBoolean=aW;function iW(e){return e===null}Vt.isNull=iW;function sW(e){return e==null}Vt.isNullOrUndefined=sW;function lW(e){return typeof e=="number"}Vt.isNumber=lW;function cW(e){return typeof e=="string"}Vt.isString=cW;function uW(e){return typeof e=="symbol"}Vt.isSymbol=uW;function dW(e){return e===void 0}Vt.isUndefined=dW;function fW(e){return Ju(e)==="[object RegExp]"}Vt.isRegExp=fW;function pW(e){return typeof e=="object"&&e!==null}Vt.isObject=pW;function hW(e){return Ju(e)==="[object Date]"}Vt.isDate=hW;function mW(e){return Ju(e)==="[object Error]"||e instanceof Error}Vt.isError=mW;function gW(e){return typeof e=="function"}Vt.isFunction=gW;function yW(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}Vt.isPrimitive=yW;Vt.isBuffer=require("buffer").Buffer.isBuffer;function Ju(e){return Object.prototype.toString.call(e)}});var $_=O((X7,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((Q7,sm)=>{try{if(im=require("util"),typeof im.inherits!="function")throw"";sm.exports=im.inherits}catch{sm.exports=$_()}var im});var W_=O((e9,lm)=>{"use strict";function bW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var G_=qs().Buffer,js=require("util");function TW(e,t,r){e.copy(t,r)}lm.exports=(function(){function e(){bW(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 G_.alloc(0);if(this.length===1)return this.head.data;for(var n=G_.allocUnsafe(r>>>0),o=this.head,a=0;o;)TW(o.data,n,a),a+=o.data.length,o=o.next;return n},e})();js&&js.inspect&&js.inspect.custom&&(lm.exports.prototype[js.inspect.custom]=function(){var e=js.inspect({length:this.length});return this.constructor.name+" "+e})});var cm=O((t9,q_)=>{"use strict";var H_=Vs();function SW(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)&&H_.nextTick(V_,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?(H_.nextTick(V_,r,a),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(a)}),this)}function xW(){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 V_(e,t){e.emit("error",t)}q_.exports={destroy:SW,undestroy:xW}});var z_=O((r9,j_)=>{j_.exports=require("util").deprecate});var dm=O((n9,tC)=>{"use strict";var Ko=Vs();tC.exports=Tt;function Z_(e){var t=this;this.next=null,this.entry=null,this.finish=function(){UW(t,e)}}var IW=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Ko.nextTick,oi;Tt.WritableState=Ks;var J_=Object.create(ri());J_.inherits=ni();var vW={deprecate:z_()},Y_=nm(),Xu=qs().Buffer,wW=global.Uint8Array||function(){};function kW(e){return Xu.from(e)}function _W(e){return Xu.isBuffer(e)||e instanceof wW}var X_=cm();J_.inherits(Tt,Y_);function CW(){}function Ks(e,t){oi=oi||Zo(),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){FW(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 Z_(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:vW.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(Tt,Symbol.hasInstance,{value:function(e){return Yu.call(this,e)?!0:this!==Tt?!1:e&&e._writableState instanceof Ks}})):Yu=function(e){return e instanceof this};function Tt(e){if(oi=oi||Zo(),!Yu.call(Tt,this)&&!(this instanceof oi))return new Tt(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)),Y_.call(this)}Tt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function EW(e,t){var r=new Error("write after end");e.emit("error",r),Ko.nextTick(t,r)}function AW(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),Ko.nextTick(n,a),o=!1),o}Tt.prototype.write=function(e,t,r){var n=this._writableState,o=!1,a=!n.objectMode&&_W(e);return a&&!Xu.isBuffer(e)&&(e=kW(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=CW),n.ended?EW(this,r):(a||AW(this,n,e,r))&&(n.pendingcb++,o=PW(this,n,a,e,t,r)),o};Tt.prototype.cork=function(){var e=this._writableState;e.corked++};Tt.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest&&Q_(this,e))};Tt.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 NW(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Xu.from(t,r)),t}Object.defineProperty(Tt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function PW(e,t,r,n,o,a){if(!r){var i=NW(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 RW(e,t,r,n,o){--t.pendingcb,r?(Ko.nextTick(o,n),Ko.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 MW(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function FW(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(MW(r),t)RW(e,r,n,t,o);else{var a=eC(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Q_(e,r),n?IW(K_,e,r,a,o):K_(e,r,a,o)}}function K_(e,t,r,n){r||OW(e,t),t.pendingcb--,n(),zs(e,t)}function OW(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Q_(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 Z_(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}Tt.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};Tt.prototype._writev=null;Tt.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&&BW(this,n,r)};function eC(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function LW(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),zs(e,t)})}function DW(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,Ko.nextTick(LW,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function zs(e,t){var r=eC(t);return r&&(DW(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function BW(e,t,r){t.ending=!0,zs(e,t),r&&(t.finished?Ko.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function UW(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(Tt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Tt.prototype.destroy=X_.destroy;Tt.prototype._undestroy=X_.undestroy;Tt.prototype._destroy=function(e,t){this.end(),t(e)}});var Zo=O((o9,aC)=>{"use strict";var rC=Vs(),$W=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};aC.exports=On;var nC=Object.create(ri());nC.inherits=ni();var oC=hm(),pm=dm();nC.inherits(On,oC);for(fm=$W(pm.prototype),Qu=0;Qu<fm.length;Qu++)ed=fm[Qu],On.prototype[ed]||(On.prototype[ed]=pm.prototype[ed]);var fm,ed,Qu;function On(e){if(!(this instanceof On))return new On(e);oC.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",GW)}Object.defineProperty(On.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function GW(){this.allowHalfOpen||this._writableState.ended||rC.nextTick(WW,this)}function WW(e){e.end()}Object.defineProperty(On.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)}});On.prototype._destroy=function(e,t){this.push(null),this.end(),rC.nextTick(t,e)}});var ym=O(sC=>{"use strict";var gm=qs().Buffer,iC=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 HW(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 VW(e){var t=HW(e);if(typeof t!="string"&&(gm.isEncoding===iC||!iC(e)))throw new Error("Unknown encoding: "+e);return t||e}sC.StringDecoder=Zs;function Zs(e){this.encoding=VW(e);var t;switch(this.encoding){case"utf16le":this.text=JW,this.end=YW,t=4;break;case"utf8":this.fillLast=zW,t=4;break;case"base64":this.text=XW,this.end=QW,t=3;break;default:this.write=eH,this.end=tH;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=ZW;Zs.prototype.text=KW;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 jW(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 zW(e){var t=this.lastTotal-this.lastNeed,r=jW(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 KW(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 ZW(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function JW(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 YW(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 XW(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 QW(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function eH(e){return e.toString(this.encoding)}function tH(e){return e&&e.length?this.write(e):""}});var hm=O((s9,TC)=>{"use strict";var ii=Vs();TC.exports=Xe;var rH=L_(),Js;Xe.ReadableState=hC;var i9=require("events").EventEmitter,dC=function(e,t){return e.listeners(t).length},Im=nm(),Ys=qs().Buffer,nH=global.Uint8Array||function(){};function oH(e){return Ys.from(e)}function aH(e){return Ys.isBuffer(e)||e instanceof nH}var fC=Object.create(ri());fC.inherits=ni();var bm=require("util"),Ge=void 0;bm&&bm.debuglog?Ge=bm.debuglog("stream"):Ge=function(){};var iH=W_(),pC=cm(),ai;fC.inherits(Xe,Im);var Tm=["error","close","destroy","pause","resume"];function sH(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):rH(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function hC(e,t){Js=Js||Zo(),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 iH,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 Xe(e){if(Js=Js||Zo(),!(this instanceof Xe))return new Xe(e);this._readableState=new hC(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(Xe.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Xe.prototype.destroy=pC.destroy;Xe.prototype._undestroy=pC.undestroy;Xe.prototype._destroy=function(e,t){this.push(null),t(e)};Xe.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),mC(this,e,t,!1,n)};Xe.prototype.unshift=function(e){return mC(this,e,null,!0,!1)};function mC(e,t,r,n,o){var a=e._readableState;if(t===null)a.reading=!1,dH(e,a);else{var i;o||(i=lH(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Ys.prototype&&(t=oH(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):gC(e,a)):Sm(e,a,t,!1))):n||(a.reading=!1)}return cH(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)),gC(e,t)}function lH(e,t){var r;return!aH(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function cH(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Xe.prototype.isPaused=function(){return this._readableState.flowing===!1};Xe.prototype.setEncoding=function(e){return ai||(ai=ym().StringDecoder),this._readableState.decoder=new ai(e),this._readableState.encoding=e,this};var lC=8388608;function uH(e){return e>=lC?e=lC:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function cC(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=uH(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Xe.prototype.read=function(e){Ge("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 Ge("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?xm(this):td(this),null;if(e=cC(e,t),e===0&&t.ended)return t.length===0&&xm(this),null;var n=t.needReadable;Ge("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,Ge("length less than watermark",n)),t.ended||t.reading?(n=!1,Ge("reading or ended",n)):n&&(Ge("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=cC(r,t)));var o;return e>0?o=yC(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 dH(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||(Ge("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?ii.nextTick(uC,e):uC(e))}function uC(e){Ge("emit readable"),e.emit("readable"),vm(e)}function gC(e,t){t.readingMore||(t.readingMore=!0,ii.nextTick(fH,e,t))}function fH(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Ge("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}Xe.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Xe.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,Ge("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(g,m){Ge("onunpipe"),g===r&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,u())}function s(){Ge("onend"),e.end()}var l=pH(r);e.on("drain",l);var c=!1;function u(){Ge("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){Ge("ondata"),d=!1;var m=e.write(g);m===!1&&!d&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&bC(n.pipes,e)!==-1)&&!c&&(Ge("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function p(g){Ge("onerror",g),b(),e.removeListener("error",p),dC(e,"error")===0&&e.emit("error",g)}sH(e,"error",p);function h(){e.removeListener("finish",y),b()}e.once("close",h);function y(){Ge("onfinish"),e.removeListener("close",h),b()}e.once("finish",y);function b(){Ge("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Ge("pipe resume"),r.resume()),e};function pH(e){return function(){var t=e._readableState;Ge("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&dC(e,"data")&&(t.flowing=!0,vm(e))}}Xe.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=bC(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)};Xe.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(hH,this))}return r};Xe.prototype.addListener=Xe.prototype.on;function hH(e){Ge("readable nexttick read 0"),e.read(0)}Xe.prototype.resume=function(){var e=this._readableState;return e.flowing||(Ge("resume"),e.flowing=!0,mH(this,e)),this};function mH(e,t){t.resumeScheduled||(t.resumeScheduled=!0,ii.nextTick(gH,e,t))}function gH(e,t){t.reading||(Ge("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),vm(e),t.flowing&&!t.reading&&e.read(0)}Xe.prototype.pause=function(){return Ge("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ge("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function vm(e){var t=e._readableState;for(Ge("flow",t.flowing);t.flowing&&e.read()!==null;);}Xe.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(Ge("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(Ge("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){Ge("wrapped _read",i),n&&(n=!1,e.resume())},this};Object.defineProperty(Xe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Xe._fromList=yC;function yC(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=yH(e,t.buffer,t.decoder),r}function yH(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?bH(e,t):TH(e,t),n}function bH(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 TH(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(SH,t,e))}function SH(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function bC(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var wm=O((l9,IC)=>{"use strict";IC.exports=Ln;var rd=Zo(),xC=Object.create(ri());xC.inherits=ni();xC.inherits(Ln,rd);function xH(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 Ln(e){if(!(this instanceof Ln))return new Ln(e);rd.call(this,e),this._transformState={afterTransform:xH.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",IH)}function IH(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){SC(e,t,r)}):SC(this,null,null)}Ln.prototype.push=function(e,t){return this._transformState.needTransform=!1,rd.prototype.push.call(this,e,t)};Ln.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};Ln.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)}};Ln.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};Ln.prototype._destroy=function(e,t){var r=this;rd.prototype._destroy.call(this,e,function(n){t(n),r.emit("close")})};function SC(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 _C=O((c9,kC)=>{"use strict";kC.exports=Xs;var vC=wm(),wC=Object.create(ri());wC.inherits=ni();wC.inherits(Xs,vC);function Xs(e){if(!(this instanceof Xs))return new Xs(e);vC.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=Zo(),Mt.Transform=wm(),Mt.PassThrough=_C())});var Dn=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{CC=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Cm=new CC,Cm.append(_m),hr.blob=Cm.getBlob("application/zip").size===0}catch{hr.blob=!1}}}var _m,CC,Cm;try{hr.nodestream=!!km().Readable}catch{hr.nodestream=!1}});var Am=O(Em=>{"use strict";var vH=it(),wH=Dn(),un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Em.encode=function(e){for(var t=[],r,n,o,a,i,s,l,c=0,u=e.length,d=u,f=vH.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(wH.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((f9,EC)=>{"use strict";EC.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 RC=O((p9,PC)=>{"use strict";var AC=global.MutationObserver||global.WebKitMutationObserver,si;process.browser?AC?(Nm=0,NC=new AC(el),Pm=global.document.createTextNode(""),NC.observe(Pm,{characterData:!0}),si=function(){Pm.data=Nm=++Nm%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 Nm,NC,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}PC.exports=kH;function kH(e){tl.push(e)===1&&!Mm&&si()}});var UC=O((h9,BC)=>{"use strict";var MC=RC();function li(){}var qt={},FC=["REJECTED"],Fm=["FULFILLED"],OC=["PENDING"];process.browser||(rl=["UNHANDLED"]);var rl;BC.exports=po;function po(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=OC,this.queue=[],this.outcome=void 0,process.browser||(this.handled=rl),e!==li&&LC(this,e)}po.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)}};po.prototype.catch=function(e){return this.then(null,e)};po.prototype.then=function(e,t){if(typeof e!="function"&&this.state===Fm||typeof t!="function"&&this.state===FC)return this;var r=new this.constructor(li);if(process.browser||this.handled===rl&&(this.handled=null),this.state!==OC){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){qt.resolve(this.promise,e)};nl.prototype.otherCallFulfilled=function(e){Om(this.promise,this.onFulfilled,e)};nl.prototype.callRejected=function(e){qt.reject(this.promise,e)};nl.prototype.otherCallRejected=function(e){Om(this.promise,this.onRejected,e)};function Om(e,t,r){MC(function(){var n;try{n=t(r)}catch(o){return qt.reject(e,o)}n===e?qt.reject(e,new TypeError("Cannot resolve promise with itself")):qt.resolve(e,n)})}qt.resolve=function(e,t){var r=DC(_H,t);if(r.status==="error")return qt.reject(e,r.value);var n=r.value;if(n)LC(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};qt.reject=function(e,t){e.state=FC,e.outcome=t,process.browser||e.handled===rl&&MC(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 _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 LC(e,t){var r=!1;function n(s){r||(r=!0,qt.reject(e,s))}function o(s){r||(r=!0,qt.resolve(e,s))}function a(){t(o,n)}var i=DC(a);i.status==="error"&&n(i.value)}function DC(e,t){var r={};try{r.value=e(t),r.status="success"}catch(n){r.status="error",r.value=n}return r}po.resolve=CH;function CH(e){return e instanceof this?e:qt.resolve(new this(li),e)}po.reject=EH;function EH(e){var t=new this(li);return qt.reject(t,e)}po.all=AH;function AH(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,qt.reject(s,f))});function d(f){o[u]=f,++a===r&&!n&&(n=!0,qt.resolve(s,o))}}}po.race=NH;function NH(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,qt.resolve(a,l))},function(l){n||(n=!0,qt.reject(a,l))})}}});var ci=O((m9,$C)=>{"use strict";var Lm=null;typeof Promise<"u"?Lm=Promise:Lm=UC();$C.exports={Promise:Lm}});var WC=O(GC=>{(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"?GC:global:self)});var it=O(St=>{"use strict";var ho=Dn(),PH=Am(),ui=Qs(),Dm=ci();WC();function RH(e){var t=null;return ho.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),ad(e,t)}St.newBlob=function(e,t){St.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 ho.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return ho.nodebuffer&&String.fromCharCode.apply(null,ui.allocBuffer(1)).length===1}catch{return!1}})()}};function al(e){var t=65536,r=St.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)}St.applyFromCharCode=al;function id(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var mo={};mo.string={string:ol,array:function(e){return ad(e,new Array(e.length))},arraybuffer:function(e){return mo.string.uint8array(e).buffer},uint8array:function(e){return ad(e,new Uint8Array(e.length))},nodebuffer:function(e){return ad(e,ui.allocBuffer(e.length))}};mo.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)}};mo.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))}};mo.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)}};mo.nodebuffer={string:al,array:function(e){return id(e,new Array(e.length))},arraybuffer:function(e){return mo.nodebuffer.uint8array(e).buffer},uint8array:function(e){return id(e,new Uint8Array(e.length))},nodebuffer:ol};St.transformTo=function(e,t){if(t||(t=""),!e)return t;St.checkSupport(e);var r=St.getTypeOf(t),n=mo[r][e](t);return n};St.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("/")};St.getTypeOf=function(e){if(typeof e=="string")return"string";if(Object.prototype.toString.call(e)==="[object Array]")return"array";if(ho.nodebuffer&&ui.isBuffer(e))return"nodebuffer";if(ho.uint8array&&e instanceof Uint8Array)return"uint8array";if(ho.arraybuffer&&e instanceof ArrayBuffer)return"arraybuffer"};St.checkSupport=function(e){var t=ho[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};St.MAX_VALUE_16BITS=65535;St.MAX_VALUE_32BITS=-1;St.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};St.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})};St.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r};St.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};St.prepareContent=function(e,t,r,n,o){var a=Dm.Promise.resolve(t).then(function(i){var s=ho.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=St.getTypeOf(i);return s?(s==="arraybuffer"?i=St.transformTo("uint8array",i):s==="string"&&(o?i=PH.decode(i):r&&n!==!0&&(i=RH(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((b9,VC)=>{"use strict";function HC(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}HC.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}};VC.exports=HC});var fi=O(go=>{"use strict";var di=it(),Jo=Dn(),MH=Qs(),sd=mr(),il=new Array(256);for(Bn=0;Bn<256;Bn++)il[Bn]=Bn>=252?6:Bn>=248?5:Bn>=240?4:Bn>=224?3:Bn>=192?2:1;var Bn;il[254]=il[254]=1;var FH=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(Jo.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},OH=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},LH=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)};go.utf8encode=function(t){return Jo.nodebuffer?MH.newBufferFrom(t,"utf-8"):FH(t)};go.utf8decode=function(t){return Jo.nodebuffer?di.transformTo("nodebuffer",t).toString("utf-8"):(t=di.transformTo(Jo.uint8array?"uint8array":"array",t),LH(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(Jo.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Jo.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=OH(t),o=t;n!==t.length&&(Jo.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:go.utf8decode(o),meta:e.meta})};ld.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:go.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};go.Utf8DecodeWorker=ld;function Bm(){sd.call(this,"utf-8 encode")}di.inherits(Bm,sd);Bm.prototype.processChunk=function(e){this.push({data:go.utf8encode(e.data),meta:e.meta})};go.Utf8EncodeWorker=Bm});var KC=O((S9,zC)=>{"use strict";var qC=mr(),jC=it();function Um(e){qC.call(this,"ConvertWorker to "+e),this.destType=e}jC.inherits(Um,qC);Um.prototype.processChunk=function(e){this.push({data:jC.transformTo(this.destType,e.data),meta:e.meta})};zC.exports=Um});var YC=O((x9,JC)=>{"use strict";var ZC=km().Readable,DH=it();DH.inherits($m,ZC);function $m(e,t,r){ZC.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()};JC.exports=$m});var Gm=O((I9,e0)=>{"use strict";var Yo=it(),BH=KC(),UH=mr(),$H=Am(),GH=Dn(),WH=ci(),XC=null;if(GH.nodestream)try{XC=YC()}catch{}function HH(e,t,r){switch(e){case"blob":return Yo.newBlob(Yo.transformTo("arraybuffer",t),r);case"base64":return $H.encode(t);default:return Yo.transformTo(e,t)}}function VH(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 WH.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=HH(i,VH(a,o),s);r(l)}catch(c){n(c)}o=[]}).resume()})}function QC(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,Yo.checkSupport(n),this._worker=e.pipe(new BH(n)),e.lock()}catch(o){this._worker=new UH("error"),this._worker.error(o)}}QC.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(){Yo.delay(t,arguments,r)}),this},resume:function(){return Yo.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Yo.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new XC(this,{objectMode:this._outputType!=="nodebuffer"},e)}};e0.exports=QC});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((w9,t0)=>{"use strict";var cd=it(),ud=mr(),jH=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=jH,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}})};t0.exports=pi});var dd=O((k9,n0)=>{"use strict";var zH=it();function KH(){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 r0=KH();function ZH(e,t,r,n){var o=r0,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 JH(e,t,r,n){var o=r0,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}n0.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var n=zH.getTypeOf(t)!=="string";return n?ZH(r|0,t,t.length,0):JH(r|0,t,t.length,0)}});var qm=O((_9,a0)=>{"use strict";var o0=mr(),YH=dd(),XH=it();function Vm(){o0.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}XH.inherits(Vm,o0);Vm.prototype.processChunk=function(e){this.streamInfo.crc32=YH(e.data,this.streamInfo.crc32||0),this.push(e)};a0.exports=Vm});var s0=O((C9,i0)=>{"use strict";var QH=it(),jm=mr();function zm(e){jm.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}QH.inherits(zm,jm);zm.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}jm.prototype.processChunk.call(this,e)};i0.exports=zm});var fd=O((E9,u0)=>{"use strict";var l0=ci(),c0=Hm(),eV=qm(),Km=s0();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 c0(l0.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 c0(l0.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 eV).pipe(new Km("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new Km("compressedSize")).withStreamInfo("compression",t)};u0.exports=Zm});var h0=O((A9,p0)=>{"use strict";var tV=Gm(),rV=Hm(),Jm=fi(),Ym=fd(),d0=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 d0("error"),t.error(a)}return new tV(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 d0?this._data:new rV(this._data)}};var f0=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],nV=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(pd=0;pd<f0.length;pd++)Xm.prototype[f0[pd]]=nV;var pd;p0.exports=Xm});var Un=O(Jt=>{"use strict";var oV=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function aV(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)aV(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 iV={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}},sV={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,iV)):(Jt.Buf8=Array,Jt.Buf16=Array,Jt.Buf32=Array,Jt.assign(Jt,sV))};Jt.setTyped(oV)});var D0=O(gi=>{"use strict";var lV=Un(),cV=4,m0=0,g0=1,uV=2;function mi(e){for(var t=e.length;--t>=0;)e[t]=0}var dV=0,I0=1,fV=2,pV=3,hV=258,ag=29,fl=256,ll=fl+1+ag,hi=30,ig=19,v0=2*ll+1,Xo=15,Qm=16,mV=7,sg=256,w0=16,k0=17,_0=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],gV=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],C0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],yV=512,$n=new Array((ll+2)*2);mi($n);var sl=new Array(hi*2);mi(sl);var cl=new Array(yV);mi(cl);var ul=new Array(hV-pV+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 E0,A0,N0;function tg(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function P0(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 ir(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){ir(e,r[t*2],r[t*2+1])}function R0(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function bV(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 TV(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<=Xo;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<v0;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 M0(e,t,r){var n=new Array(Xo+1),o=0,a,i;for(a=1;a<=Xo;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]=R0(n[s]++,s))}}function SV(){var e,t,r,n,o,a=new Array(Xo+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<=Xo;t++)a[t]=0;for(e=0;e<=143;)$n[e*2+1]=8,e++,a[8]++;for(;e<=255;)$n[e*2+1]=9,e++,a[9]++;for(;e<=279;)$n[e*2+1]=7,e++,a[7]++;for(;e<=287;)$n[e*2+1]=8,e++,a[8]++;for(M0($n,ll+1,a),e=0;e<hi;e++)sl[e*2+1]=5,sl[e*2]=R0(e,5);E0=new eg($n,ng,fl+1,ll,Xo),A0=new eg(sl,hd,0,hi,Xo),N0=new eg(new Array(0),gV,0,ig,mV)}function F0(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 O0(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 xV(e,t,r,n){O0(e),n&&(dl(e,r),dl(e,~r)),lV.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function y0(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&&y0(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!y0(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function b0(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],ir(e,o,s)),n--,i=P0(n),dn(e,i,r),s=hd[i],s!==0&&(n-=md[i],ir(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=v0,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],TV(e,t),M0(r,l,e.bl_count)}function T0(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[w0*2]++):s<=10?e.bl_tree[k0*2]++:e.bl_tree[_0*2]++,s=0,o=a,i===0?(l=138,c=3):a===i?(l=6,c=3):(l=7,c=4))}function S0(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,w0,e.bl_tree),ir(e,s-3,2)):s<=10?(dn(e,k0,e.bl_tree),ir(e,s-3,3)):(dn(e,_0,e.bl_tree),ir(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 IV(e){var t;for(T0(e,e.dyn_ltree,e.l_desc.max_code),T0(e,e.dyn_dtree,e.d_desc.max_code),og(e,e.bl_desc),t=ig-1;t>=3&&e.bl_tree[C0[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function vV(e,t,r,n){var o;for(ir(e,t-257,5),ir(e,r-1,5),ir(e,n-4,4),o=0;o<n;o++)ir(e,e.bl_tree[C0[o]*2+1],3);S0(e,e.dyn_ltree,t-1),S0(e,e.dyn_dtree,r-1)}function wV(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return m0;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return g0;for(r=32;r<fl;r++)if(e.dyn_ltree[r*2]!==0)return g0;return m0}var x0=!1;function kV(e){x0||(SV(),x0=!0),e.l_desc=new tg(e.dyn_ltree,E0),e.d_desc=new tg(e.dyn_dtree,A0),e.bl_desc=new tg(e.bl_tree,N0),e.bi_buf=0,e.bi_valid=0,F0(e)}function L0(e,t,r,n){ir(e,(dV<<1)+(n?1:0),3),xV(e,t,r,!0)}function _V(e){ir(e,I0<<1,3),dn(e,sg,$n),bV(e)}function CV(e,t,r,n){var o,a,i=0;e.level>0?(e.strm.data_type===uV&&(e.strm.data_type=wV(e)),og(e,e.l_desc),og(e,e.d_desc),i=IV(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?L0(e,t,r,n):e.strategy===cV||a===o?(ir(e,(I0<<1)+(n?1:0),3),b0(e,$n,sl)):(ir(e,(fV<<1)+(n?1:0),3),vV(e,e.l_desc.max_code+1,e.d_desc.max_code+1,i+1),b0(e,e.dyn_ltree,e.dyn_dtree)),F0(e),n&&O0(e)}function EV(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[P0(t)*2]++),e.last_lit===e.lit_bufsize-1}gi._tr_init=kV;gi._tr_stored_block=L0;gi._tr_flush_block=CV;gi._tr_tally=EV;gi._tr_align=_V});var cg=O((R9,B0)=>{"use strict";function AV(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}B0.exports=AV});var ug=O((M9,U0)=>{"use strict";function NV(){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 PV=NV();function RV(e,t,r,n){var o=PV,a=n+r;e^=-1;for(var i=n;i<a;i++)e=e>>>8^o[(e^t[i])&255];return e^-1}U0.exports=RV});var gd=O((F9,$0)=>{"use strict";$0.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 Z0=O(hn=>{"use strict";var Yt=Un(),Mr=D0(),V0=cg(),yo=ug(),MV=gd(),ra=0,FV=1,OV=3,Io=4,G0=5,pn=0,W0=1,Fr=-2,LV=-3,dg=-5,DV=-1,BV=1,yd=2,UV=3,$V=4,GV=0,WV=2,xd=8,HV=9,VV=15,qV=8,jV=29,zV=256,pg=zV+1+jV,KV=30,ZV=19,JV=2*pg+1,YV=15,Ce=3,So=258,Kr=So+Ce+1,XV=32,Id=42,hg=69,bd=73,Td=91,Sd=103,Qo=113,hl=666,wt=1,ml=2,ea=3,Ti=4,QV=3;function xo(e,t){return e.msg=MV[t],t}function H0(e){return(e<<1)-(e>4?9:0)}function To(e){for(var t=e.length;--t>=0;)e[t]=0}function bo(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,bo(e.strm)}function De(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 e4(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=V0(e.adler,t,o,r):e.state.wrap===2&&(e.adler=yo(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function q0(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+So,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=So-(f-n),n=f-So,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 ta(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=e4(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=Ce)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+Ce-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<Ce)););}while(e.lookahead<Kr&&e.strm.avail_in!==0)}function t4(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ta(e),e.lookahead===0&&t===ra)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===Io?(Ft(e,!0),e.strm.avail_out===0?ea: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(ta(e),e.lookahead<Kr&&t===ra)return wt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Ce&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ce-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=q0(e,r)),e.match_length>=Ce)if(n=Mr._tr_tally(e,e.strstart-e.match_start,e.match_length-Ce),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ce){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ce-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<Ce-1?e.strstart:Ce-1,t===Io?(Ft(e,!0),e.strm.avail_out===0?ea: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(ta(e),e.lookahead<Kr&&t===ra)return wt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Ce&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ce-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=Ce-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Kr&&(e.match_length=q0(e,r),e.match_length<=5&&(e.strategy===BV||e.match_length===Ce&&e.strstart-e.match_start>4096)&&(e.match_length=Ce-1)),e.prev_length>=Ce&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-Ce,n=Mr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Ce),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+Ce-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=Ce-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<Ce-1?e.strstart:Ce-1,t===Io?(Ft(e,!0),e.strm.avail_out===0?ea:Ti):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:ml}function r4(e,t){for(var r,n,o,a,i=e.window;;){if(e.lookahead<=So){if(ta(e),e.lookahead<=So&&t===ra)return wt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Ce&&e.strstart>0&&(o=e.strstart-1,n=i[o],n===i[++o]&&n===i[++o]&&n===i[++o])){a=e.strstart+So;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=So-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Ce?(r=Mr._tr_tally(e,1,e.match_length-Ce),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===Io?(Ft(e,!0),e.strm.avail_out===0?ea:Ti):e.last_lit&&(Ft(e,!1),e.strm.avail_out===0)?wt:ml}function n4(e,t){for(var r;;){if(e.lookahead===0&&(ta(e),e.lookahead===0)){if(t===ra)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===Io?(Ft(e,!0),e.strm.avail_out===0?ea: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,t4),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 o4(e){e.window_size=2*e.w_size,To(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=Ce-1,e.match_available=0,e.ins_h=0}function a4(){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(JV*2),this.dyn_dtree=new Yt.Buf16((2*KV+1)*2),this.bl_tree=new Yt.Buf16((2*ZV+1)*2),To(this.dyn_ltree),To(this.dyn_dtree),To(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Yt.Buf16(YV+1),this.heap=new Yt.Buf16(2*pg+1),To(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Yt.Buf16(2*pg+1),To(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 j0(e){var t;return!e||!e.state?xo(e,Fr):(e.total_in=e.total_out=0,e.data_type=WV,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Id:Qo,e.adler=t.wrap===2?0:1,t.last_flush=ra,Mr._tr_init(t),pn)}function z0(e){var t=j0(e);return t===pn&&o4(e.state),t}function i4(e,t){return!e||!e.state||e.state.wrap!==2?Fr:(e.state.gzhead=t,pn)}function K0(e,t,r,n,o,a){if(!e)return Fr;var i=1;if(t===DV&&(t=6),n<0?(i=0,n=-n):n>15&&(i=2,n-=16),o<1||o>HV||r!==xd||n<8||n>15||t<0||t>9||a<0||a>$V)return xo(e,Fr);n===8&&(n=9);var s=new a4;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+Ce-1)/Ce),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,z0(e)}function s4(e,t){return K0(e,t,xd,VV,qV,GV)}function l4(e,t){var r,n,o,a;if(!e||!e.state||t>G0||t<0)return e?xo(e,Fr):Fr;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===hl&&t!==Io)return xo(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,De(n,31),De(n,139),De(n,8),n.gzhead?(De(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)),De(n,n.gzhead.time&255),De(n,n.gzhead.time>>8&255),De(n,n.gzhead.time>>16&255),De(n,n.gzhead.time>>24&255),De(n,n.level===9?2:n.strategy>=yd||n.level<2?4:0),De(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(De(n,n.gzhead.extra.length&255),De(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=yo(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=hg):(De(n,0),De(n,0),De(n,0),De(n,0),De(n,0),De(n,n.level===9?2:n.strategy>=yd||n.level<2?4:0),De(n,QV),n.status=Qo);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|=XV),i+=31-i%31,n.status=Qo,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=yo(e.adler,n.pending_buf,n.pending-o,o)),bo(e),o=n.pending,n.pending===n.pending_buf_size));)De(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=yo(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=yo(e.adler,n.pending_buf,n.pending-o,o)),bo(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,De(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=yo(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=yo(e.adler,n.pending_buf,n.pending-o,o)),bo(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,De(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=yo(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&&bo(e),n.pending+2<=n.pending_buf_size&&(De(n,e.adler&255),De(n,e.adler>>8&255),e.adler=0,n.status=Qo)):n.status=Qo),n.pending!==0){if(bo(e),e.avail_out===0)return n.last_flush=-1,pn}else if(e.avail_in===0&&H0(t)<=H0(r)&&t!==Io)return xo(e,dg);if(n.status===hl&&e.avail_in!==0)return xo(e,dg);if(e.avail_in!==0||n.lookahead!==0||t!==ra&&n.status!==hl){var l=n.strategy===yd?n4(n,t):n.strategy===UV?r4(n,t):bi[n.level].func(n,t);if((l===ea||l===Ti)&&(n.status=hl),l===wt||l===ea)return e.avail_out===0&&(n.last_flush=-1),pn;if(l===ml&&(t===FV?Mr._tr_align(n):t!==G0&&(Mr._tr_stored_block(n,0,0,!1),t===OV&&(To(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),bo(e),e.avail_out===0))return n.last_flush=-1,pn}return t!==Io?pn:n.wrap<=0?W0:(n.wrap===2?(De(n,e.adler&255),De(n,e.adler>>8&255),De(n,e.adler>>16&255),De(n,e.adler>>24&255),De(n,e.total_in&255),De(n,e.total_in>>8&255),De(n,e.total_in>>16&255),De(n,e.total_in>>24&255)):(pl(n,e.adler>>>16),pl(n,e.adler&65535)),bo(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?pn:W0)}function c4(e){var t;return!e||!e.state?Fr:(t=e.state.status,t!==Id&&t!==hg&&t!==bd&&t!==Td&&t!==Sd&&t!==Qo&&t!==hl?xo(e,Fr):(e.state=null,t===Qo?xo(e,LV):pn))}function u4(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=V0(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(i===0&&(To(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,ta(n);n.lookahead>=Ce;){o=n.strstart,a=n.lookahead-(Ce-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[o+Ce-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=Ce-1,ta(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=Ce-1,n.match_available=0,e.next_in=l,e.input=c,e.avail_in=s,n.wrap=i,pn}hn.deflateInit=s4;hn.deflateInit2=K0;hn.deflateReset=z0;hn.deflateResetKeep=j0;hn.deflateSetHeader=i4;hn.deflate=l4;hn.deflateEnd=c4;hn.deflateSetDictionary=u4;hn.deflateInfo="pako deflate (from Nodeca project)"});var mg=O(Si=>{"use strict";var vd=Un(),J0=!0,Y0=!0;try{String.fromCharCode.apply(null,[0])}catch{J0=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Y0=!1}var gl=new vd.Buf8(256);for(Gn=0;Gn<256;Gn++)gl[Gn]=Gn>=252?6:Gn>=248?5:Gn>=240?4:Gn>=224?3:Gn>=192?2:1;var Gn;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 X0(e,t){if(t<65534&&(e.subarray&&Y0||!e.subarray&&J0))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 X0(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 X0(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((D9,Q0)=>{"use strict";function d4(){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}Q0.exports=d4});var nE=O(Tl=>{"use strict";var yl=Z0(),bl=Un(),bg=mg(),Tg=gd(),f4=gg(),rE=Object.prototype.toString,p4=0,yg=4,xi=0,eE=1,tE=2,h4=-1,m4=0,g4=8;function na(e){if(!(this instanceof na))return new na(e);this.options=bl.assign({level:h4,method:g4,chunkSize:16384,windowBits:15,memLevel:8,strategy:m4,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 f4,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):rE.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}}na.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:p4,typeof e=="string"?r.input=bg.string2buf(e):rE.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!==eE&&o!==xi)return this.onEnd(o),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===yg||a===tE))&&(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!==eE);return a===yg?(o=yl.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===xi):(a===tE&&(this.onEnd(xi),r.avail_out=0),!0)};na.prototype.onData=function(e){this.chunks.push(e)};na.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 na(t);if(r.push(e,!0),r.err)throw r.msg||Tg[r.err];return r.result}function y4(e,t){return t=t||{},t.raw=!0,Sg(e,t)}function b4(e,t){return t=t||{},t.gzip=!0,Sg(e,t)}Tl.Deflate=na;Tl.deflate=Sg;Tl.deflateRaw=y4;Tl.gzip=b4});var aE=O((U9,oE)=>{"use strict";var wd=30,T4=12;oE.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,A,F;n=t.state,o=t.next_in,A=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+=A[o++]<<y,y+=8,h+=A[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+=A[o++]<<y,y+=8),v+=h&(1<<I)-1,h>>>=I,y-=I),y<15&&(h+=A[o++]<<y,y+=8,h+=A[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+=A[o++]<<y,y+=8,y<I&&(h+=A[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,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=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=T4;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 fE=O(($9,dE)=>{"use strict";var iE=Un(),Ii=15,sE=852,lE=592,cE=0,xg=1,uE=2,S4=[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],x4=[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],I4=[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],v4=[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];dE.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,A=0,F,W=new iE.Buf16(Ii+1),U=new iE.Buf16(Ii+1),K=null,J=0,Oe,L,Q;for(u=0;u<=Ii;u++)W[u]=0;for(d=0;d<o;d++)W[r[n+d]]++;for(h=c,p=Ii;p>=1&&W[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&&W[f]===0;f++);for(h<f&&(h=f),g=1,u=1;u<=Ii;u++)if(g<<=1,g-=W[u],g<0)return-1;if(g>0&&(t===cE||p!==1))return-1;for(U[1]=0,u=1;u<Ii;u++)U[u+1]=U[u]+W[u];for(d=0;d<o;d++)r[n+d]!==0&&(s[U[r[n+d]]++]=d);if(t===cE?(E=K=s,F=19):t===xg?(E=S4,A-=257,K=x4,J-=257,F=256):(E=I4,K=v4,F=-1),T=0,d=0,u=f,k=i,y=h,b=0,v=-1,m=1<<h,w=m-1,t===xg&&m>sE||t===uE&&m>lE)return 1;for(;;){Oe=u-b,s[d]<F?(L=0,Q=s[d]):s[d]>F?(L=K[J+s[d]],Q=E[A+s[d]]):(L=96,Q=0),S=1<<u-b,I=1<<y,f=I;do I-=S,a[k+(T>>b)+I]=Oe<<24|L<<16|Q|0;while(I!==0);for(S=1<<u-1;T&S;)S>>=1;if(S!==0?(T&=S-1,T+=S):T=0,d++,--W[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-=W[y+b],!(g<=0));)y++,g<<=1;if(m+=1<<y,t===xg&&m>sE||t===uE&&m>lE)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 zE=O(Zr=>{"use strict";var gr=Un(),Cg=cg(),mn=ug(),w4=aE(),Sl=fE(),k4=0,BE=1,UE=2,pE=4,_4=5,kd=6,oa=0,C4=1,E4=2,Or=-2,$E=-3,Eg=-4,A4=-5,hE=8,GE=1,mE=2,gE=3,yE=4,bE=5,TE=6,SE=7,xE=8,IE=9,vE=10,Ed=11,Wn=12,Ig=13,wE=14,vg=15,kE=16,_E=17,CE=18,EE=19,_d=20,Cd=21,AE=22,NE=23,PE=24,RE=25,ME=26,wg=27,FE=28,OE=29,nt=30,Ag=31,N4=32,P4=852,R4=592,M4=15,F4=M4;function LE(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function O4(){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 WE(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=GE,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(P4),t.distcode=t.distdyn=new gr.Buf32(R4),t.sane=1,t.back=-1,oa)}function HE(e){var t;return!e||!e.state?Or:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,WE(e))}function VE(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,HE(e))}function qE(e,t){var r,n;return e?(n=new O4,e.state=n,n.window=null,r=VE(e,t),r!==oa&&(e.state=null),r):Or}function L4(e){return qE(e,F4)}var DE=!0,kg,_g;function D4(e){if(DE){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(BE,e.lens,0,288,kg,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Sl(UE,e.lens,0,32,_g,0,e.work,{bits:5}),DE=!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 B4(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),A,F,W=[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===Wn&&(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=oa;e:for(;;)switch(r.mode){case GE: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,E[0]=c&255,E[1]=c>>>8&255,r.check=mn(r.check,E,2,0),c=0,u=0,r.mode=mE;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=nt;break}if((c&15)!==hE){e.msg="unknown compression method",r.mode=nt;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=nt;break}r.dmax=1<<w,e.adler=r.check=1,r.mode=c&512?vE:Wn,c=0,u=0;break;case mE:for(;u<16;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}if(r.flags=c,(r.flags&255)!==hE){e.msg="unknown compression method",r.mode=nt;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=nt;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=gE;case gE: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=yE;case yE: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=bE;case bE: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=TE;case TE: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=SE;case SE: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=xE;case xE: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=IE;case IE: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=nt;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=Wn;break;case vE:for(;u<32;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}e.adler=r.check=LE(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,E4;e.adler=r.check=1,r.mode=Wn;case Wn:if(t===_4||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=wE;break;case 1:if(D4(r),r.mode=_d,t===kd){c>>>=2,u-=2;break e}break;case 2:r.mode=_E;break;case 3:e.msg="invalid block type",r.mode=nt}c>>>=2,u-=2;break;case wE: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=nt;break}if(r.length=c&65535,c=0,u=0,r.mode=vg,t===kd)break e;case vg:r.mode=kE;case kE: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=Wn;break;case _E: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=nt;break}r.have=0,r.mode=CE;case CE:for(;r.have<r.ncode;){for(;u<3;){if(s===0)break e;s--,c+=n[a++]<<u,u+=8}r.lens[W[r.have++]]=c&7,c>>>=3,u-=3}for(;r.have<19;)r.lens[W[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},k=Sl(k4,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,k){e.msg="invalid code lengths set",r.mode=nt;break}r.have=0,r.mode=EE;case EE: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=nt;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=nt;break}for(;p--;)r.lens[r.have++]=w}}if(r.mode===nt)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=nt;break}if(r.lenbits=9,A={bits:r.lenbits},k=Sl(BE,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,k){e.msg="invalid literal/lengths set",r.mode=nt;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},k=Sl(UE,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,k){e.msg="invalid distances set",r.mode=nt;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,w4(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===Wn&&(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=ME;break}if(m&32){r.back=-1,r.mode=Wn;break}if(m&64){e.msg="invalid literal/length code",r.mode=nt;break}r.extra=m&15,r.mode=AE;case AE: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=NE;case NE: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=nt;break}r.offset=T,r.extra=m&15,r.mode=PE;case PE: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=nt;break}r.mode=RE;case RE: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=nt;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 ME: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:LE(c))!==r.check){e.msg="incorrect data check",r.mode=nt;break}c=0,u=0}r.mode=FE;case FE: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=nt;break}c=0,u=0}r.mode=OE;case OE:k=C4;break e;case nt:k=$E;break e;case Ag:return Eg;case N4: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<nt&&(r.mode<wg||t!==pE))&&jE(e,e.output,e.next_out,f-e.avail_out)?(r.mode=Ag,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===Wn?128:0)+(r.mode===_d||r.mode===vg?256:0),(d===0&&f===0||t===pE)&&k===oa&&(k=A4),k)}function U4(e){if(!e||!e.state)return Or;var t=e.state;return t.window&&(t.window=null),e.state=null,oa}function $4(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Or:(r.head=t,t.done=!1,oa)}function G4(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)?$E:(a=jE(e,t,r,r),a?(n.mode=Ag,Eg):(n.havedict=1,oa))}Zr.inflateReset=HE;Zr.inflateReset2=VE;Zr.inflateResetKeep=WE;Zr.inflateInit=L4;Zr.inflateInit2=qE;Zr.inflate=B4;Zr.inflateEnd=U4;Zr.inflateGetHeader=$4;Zr.inflateSetDictionary=G4;Zr.inflateInfo="pako inflate (from Nodeca project)"});var Ng=O((W9,KE)=>{"use strict";KE.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 JE=O((H9,ZE)=>{"use strict";function W4(){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}ZE.exports=W4});var XE=O(Il=>{"use strict";var vi=zE(),xl=Un(),Ad=mg(),ht=Ng(),Pg=gd(),H4=gg(),V4=JE(),YE=Object.prototype.toString;function aa(e){if(!(this instanceof aa))return new aa(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 H4,this.strm.avail_out=0;var r=vi.inflateInit2(this.strm,t.windowBits);if(r!==ht.Z_OK)throw new Error(Pg[r]);if(this.header=new V4,vi.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Ad.string2buf(t.dictionary):YE.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=vi.inflateSetDictionary(this.strm,t.dictionary),r!==ht.Z_OK)))throw new Error(Pg[r])}aa.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?ht.Z_FINISH:ht.Z_NO_FLUSH,typeof e=="string"?r.input=Ad.binstring2buf(e):YE.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,ht.Z_NO_FLUSH),a===ht.Z_NEED_DICT&&o&&(a=vi.inflateSetDictionary(this.strm,o)),a===ht.Z_BUF_ERROR&&u===!0&&(a=ht.Z_OK,u=!1),a!==ht.Z_STREAM_END&&a!==ht.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===ht.Z_STREAM_END||r.avail_in===0&&(i===ht.Z_FINISH||i===ht.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Ad.utf8border(r.output,r.next_out),l=r.next_out-s,c=Ad.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!==ht.Z_STREAM_END);return a===ht.Z_STREAM_END&&(i=ht.Z_FINISH),i===ht.Z_FINISH?(a=vi.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ht.Z_OK):(i===ht.Z_SYNC_FLUSH&&(this.onEnd(ht.Z_OK),r.avail_out=0),!0)};aa.prototype.onData=function(e){this.chunks.push(e)};aa.prototype.onEnd=function(e){e===ht.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 aa(t);if(r.push(e,!0),r.err)throw r.msg||Pg[r.err];return r.result}function q4(e,t){return t=t||{},t.raw=!0,Rg(e,t)}Il.Inflate=aa;Il.inflate=Rg;Il.inflateRaw=q4;Il.ungzip=Rg});var tA=O((q9,eA)=>{"use strict";var j4=Un().assign,z4=nE(),K4=XE(),Z4=Ng(),QE={};j4(QE,z4,K4,Z4);eA.exports=QE});var nA=O(Pd=>{"use strict";var J4=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",Y4=tA(),rA=it(),Nd=mr(),X4=J4?"uint8array":"array";Pd.magic="\b\0";function ia(e,t){Nd.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}rA.inherits(ia,Nd);ia.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(rA.transformTo(X4,e.data),!1)};ia.prototype.flush=function(){Nd.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};ia.prototype.cleanUp=function(){Nd.prototype.cleanUp.call(this),this._pako=null};ia.prototype._createPako=function(){this._pako=new Y4[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 ia("Deflate",e)};Pd.uncompressWorker=function(){return new ia("Inflate",{})}});var Fg=O(Mg=>{"use strict";var oA=mr();Mg.STORE={magic:"\0\0",compressWorker:function(){return new oA("STORE compression")},uncompressWorker:function(){return new oA("STORE decompression")}};Mg.DEFLATE=nA()});var Og=O(sa=>{"use strict";sa.LOCAL_FILE_HEADER="PK";sa.CENTRAL_FILE_HEADER="PK";sa.CENTRAL_DIRECTORY_END="PK";sa.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";sa.ZIP64_CENTRAL_DIRECTORY_END="PK";sa.DATA_DESCRIPTOR="PK\x07\b"});var lA=O((Z9,sA)=>{"use strict";var wi=it(),ki=mr(),Lg=fi(),aA=dd(),Rd=Og(),Je=function(e,t){var r="",n;for(n=0;n<t;n++)r+=String.fromCharCode(e&255),e=e>>>8;return r},Q4=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},eq=function(e){return(e||0)&63},iA=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,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,A=0;I&&(E|=16),o==="UNIX"?(A=798,E|=Q4(i.unixPermissions,I)):(A=20,E|=eq(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=Je(1,1)+Je(aA(c),4)+u,m+="up"+Je(T.length,2)+T),y&&(S=Je(1,1)+Je(aA(f),4)+p,m+="uc"+Je(S.length,2)+S);var F="";F+=`
93
- \0`,F+=Je(k,2),F+=s.magic,F+=Je(b,2),F+=Je(g,2),F+=Je(w.crc32,4),F+=Je(w.compressedSize,4),F+=Je(w.uncompressedSize,4),F+=Je(c.length,2),F+=Je(m.length,2);var W=Rd.LOCAL_FILE_HEADER+F+c+m,U=Rd.CENTRAL_FILE_HEADER+Je(A,2)+F+Je(f.length,2)+"\0\0\0\0"+Je(E,4)+Je(n,4)+c+m+f;return{fileRecord:W,dirRecord:U}},tq=function(e,t,r,n,o){var a="",i=wi.transformTo("string",o(n));return a=Rd.CENTRAL_DIRECTORY_END+"\0\0\0\0"+Je(e,2)+Je(e,2)+Je(t,4)+Je(r,4)+Je(i.length,2)+i,a},rq=function(e){var t="";return t=Rd.DATA_DESCRIPTOR+Je(e.crc32,4)+Je(e.compressedSize,4)+Je(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=iA(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=iA(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:rq(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=tq(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()};sA.exports=Jr});var uA=O(cA=>{"use strict";var nq=Fg(),oq=lA(),aq=function(e,t){var r=e||t,n=nq[r];if(!n)throw new Error(r+" is not a valid compression method !");return n};cA.generateWorker=function(e,t,r){var n=new oq(t.streamFiles,r,t.platform,t.encodeFileName),o=0;try{e.forEach(function(a,i){o++;var s=aq(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 fA=O((Y9,dA)=>{"use strict";var iq=it(),Md=mr();function vl(e,t){Md.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}iq.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};dA.exports=vl});var IA=O((X9,xA)=>{"use strict";var sq=fi(),wl=it(),gA=mr(),lq=Gm(),yA=Wm(),pA=fd(),cq=h0(),uq=uA(),hA=Qs(),dq=fA(),bA=function(e,t,r){var n=wl.getTypeOf(t),o,a=wl.extend(r||{},yA);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=TA(e)),a.createFolders&&(o=fq(e))&&SA.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 pA&&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 pA||t instanceof gA?l=t:hA.isNode&&hA.isStream(t)?l=new dq(e,t):l=wl.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var c=new cq(e,l,a);this.files[e]=c},fq=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},TA=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},SA=function(e,t){return t=typeof t<"u"?t:yA.createFolders,e=TA(e),this.files[e]||bA.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function mA(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var pq={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(mA(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,bA.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(mA(e))return this.filter(function(o,a){return a.dir&&e.test(o)});var t=this.root+e,r=SA.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:sq.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=uq.generateWorker(this,r,n)}catch(o){t=new gA("error"),t.error(o)}return new lq(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)}};xA.exports=pq});var Dg=O((Q9,wA)=>{"use strict";var hq=it();function vA(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}vA.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 hq.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))}};wA.exports=vA});var Bg=O((eY,_A)=>{"use strict";var kA=Dg(),mq=it();function _i(e){kA.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255}mq.inherits(_i,kA);_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};_A.exports=_i});var AA=O((tY,EA)=>{"use strict";var CA=Dg(),gq=it();function Ci(e){CA.call(this,e)}gq.inherits(Ci,CA);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};EA.exports=Ci});var $g=O((rY,PA)=>{"use strict";var NA=Bg(),yq=it();function Ug(e){NA.call(this,e)}yq.inherits(Ug,NA);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};PA.exports=Ug});var FA=O((nY,MA)=>{"use strict";var RA=$g(),bq=it();function Gg(e){RA.call(this,e)}bq.inherits(Gg,RA);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};MA.exports=Gg});var Wg=O((oY,LA)=>{"use strict";var Fd=it(),OA=Dn(),Tq=Bg(),Sq=AA(),xq=FA(),Iq=$g();LA.exports=function(e){var t=Fd.getTypeOf(e);return Fd.checkSupport(t),t==="string"&&!OA.uint8array?new Sq(e):t==="nodebuffer"?new xq(e):OA.uint8array?new Iq(Fd.transformTo("uint8array",e)):new Tq(Fd.transformTo("array",e))}});var $A=O((aY,UA)=>{"use strict";var Hg=Wg(),vo=it(),vq=fd(),DA=dd(),Od=fi(),Ld=Fg(),wq=Dn(),kq=0,_q=3,Cq=function(e){for(var t in Ld)if(Object.prototype.hasOwnProperty.call(Ld,t)&&Ld[t].magic===e)return Ld[t];return null};function BA(e,t){this.options=e,this.loadOptions=t}BA.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=Cq(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+vo.pretty(this.compressionMethod)+" unknown (inner file : "+vo.transformTo("string",this.fileName)+")");this.decompressed=new vq(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===kq&&(this.dosPermissions=this.externalFileAttributes&63),e===_q&&(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===vo.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===vo.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===vo.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===vo.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=wq.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=vo.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(n!==null)this.fileCommentStr=n;else{var o=vo.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||DA(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||DA(this.fileComment)!==t.readInt(4)?null:Od.utf8decode(t.readData(e.length-5))}return null}};UA.exports=BA});var HA=O((iY,WA)=>{"use strict";var Eq=Wg(),Hn=it(),Yr=Og(),Aq=$A(),Nq=Dn();function GA(e){this.files=[],this.loadOptions=e}GA.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 ("+Hn.pretty(t)+", expected "+Hn.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=Nq.uint8array?"uint8array":"array",r=Hn.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 Aq({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===Hn.MAX_VALUE_16BITS||this.diskWithCentralDirStart===Hn.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===Hn.MAX_VALUE_16BITS||this.centralDirRecords===Hn.MAX_VALUE_16BITS||this.centralDirSize===Hn.MAX_VALUE_32BITS||this.centralDirOffset===Hn.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=Eq(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};WA.exports=GA});var jA=O((sY,qA)=>{"use strict";var Vg=it(),Dd=ci(),Pq=fi(),Rq=HA(),Mq=qm(),VA=Qs();function Fq(e){return new Dd.Promise(function(t,r){var n=e.decompressed.getContentWorker().pipe(new Mq);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()})}qA.exports=function(e,t){var r=this;return t=Vg.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:Pq.utf8decode}),VA.isNode&&VA.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 Rq(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(Fq(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 KA=O((lY,zA)=>{"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=IA();Lr.prototype.loadAsync=jA();Lr.support=Dn();Lr.defaults=Wm();Lr.version="3.10.1";Lr.loadAsync=function(e,t){return new Lr().loadAsync(e,t)};Lr.external=ci();zA.exports=Lr});var oN=O((wY,nN)=>{nN.exports=ij;function ij(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}});var _P=le(require("path")),CP=le(require("os"));var rb=le(tb(),1),{program:r6,createCommand:n6,createArgument:o6,createOption:a6,CommanderError:i6,InvalidArgumentError:s6,InvalidOptionArgumentError:l6,Command:nb,Argument:c6,Option:Tn,Help:u6}=rb.default;var ob=`profiler-cli: Usage Guide
92
+ `)};e.defaults=L,e.createLogger=v,e.logger=Q,e.default=Q,Object.defineProperty(e,"__esModule",{value:!0})})});var Vs=O((i9,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:cW}:rm.exports=process;function cW(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((s9,U_)=>{var uW={}.toString;U_.exports=Array.isArray||function(e){return uW.call(e)=="[object Array]"}});var nm=O((l9,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 dW(e){return Array.isArray?Array.isArray(e):Ju(e)==="[object Array]"}Vt.isArray=dW;function fW(e){return typeof e=="boolean"}Vt.isBoolean=fW;function pW(e){return e===null}Vt.isNull=pW;function hW(e){return e==null}Vt.isNullOrUndefined=hW;function mW(e){return typeof e=="number"}Vt.isNumber=mW;function gW(e){return typeof e=="string"}Vt.isString=gW;function yW(e){return typeof e=="symbol"}Vt.isSymbol=yW;function bW(e){return e===void 0}Vt.isUndefined=bW;function TW(e){return Ju(e)==="[object RegExp]"}Vt.isRegExp=TW;function SW(e){return typeof e=="object"&&e!==null}Vt.isObject=SW;function xW(e){return Ju(e)==="[object Date]"}Vt.isDate=xW;function IW(e){return Ju(e)==="[object Error]"||e instanceof Error}Vt.isError=IW;function vW(e){return typeof e=="function"}Vt.isFunction=vW;function wW(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}Vt.isPrimitive=wW;Vt.isBuffer=require("buffer").Buffer.isBuffer;function Ju(e){return Object.prototype.toString.call(e)}});var V_=O((u9,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((d9,sm)=>{try{if(im=require("util"),typeof im.inherits!="function")throw"";sm.exports=im.inherits}catch{sm.exports=V_()}var im});var q_=O((f9,lm)=>{"use strict";function kW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var j_=js().Buffer,qs=require("util");function _W(e,t,r){e.copy(t,r)}lm.exports=(function(){function e(){kW(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;)_W(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((p9,Z_)=>{"use strict";var z_=Vs();function CW(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 EW(){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:CW,undestroy:EW}});var Y_=O((h9,J_)=>{J_.exports=require("util").deprecate});var dm=O((m9,aC)=>{"use strict";var Zo=Vs();aC.exports=St;function Q_(e){var t=this;this.next=null,this.entry=null,this.finish=function(){qW(t,e)}}var NW=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Zo.nextTick,oi;St.WritableState=Ks;var eC=Object.create(ri());eC.inherits=ni();var AW={deprecate:Y_()},tC=nm(),Xu=js().Buffer,PW=global.Uint8Array||function(){};function RW(e){return Xu.from(e)}function MW(e){return Xu.isBuffer(e)||e instanceof PW}var rC=cm();eC.inherits(St,tC);function FW(){}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){GW(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:AW.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)),tC.call(this)}St.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function OW(e,t){var r=new Error("write after end");e.emit("error",r),Zo.nextTick(t,r)}function LW(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&&MW(e);return a&&!Xu.isBuffer(e)&&(e=RW(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=FW),n.ended?OW(this,r):(a||LW(this,n,e,r))&&(n.pendingcb++,o=BW(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&&nC(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 DW(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 BW(e,t,r,n,o,a){if(!r){var i=DW(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 UW(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 $W(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function GW(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if($W(r),t)UW(e,r,n,t,o);else{var a=oC(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&nC(e,r),n?NW(X_,e,r,a,o):X_(e,r,a,o)}}function X_(e,t,r,n){r||WW(e,t),t.pendingcb--,n(),zs(e,t)}function WW(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function nC(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&&jW(this,n,r)};function oC(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function HW(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),zs(e,t)})}function VW(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,Zo.nextTick(HW,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function zs(e,t){var r=oC(t);return r&&(VW(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function jW(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 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=rC.destroy;St.prototype._undestroy=rC.undestroy;St.prototype._destroy=function(e,t){this.end(),t(e)}});var Jo=O((g9,cC)=>{"use strict";var iC=Vs(),zW=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};cC.exports=Dn;var sC=Object.create(ri());sC.inherits=ni();var lC=hm(),pm=dm();sC.inherits(Dn,lC);for(fm=zW(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);lC.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",KW)}Object.defineProperty(Dn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function KW(){this.allowHalfOpen||this._writableState.ended||iC.nextTick(ZW,this)}function ZW(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(),iC.nextTick(t,e)}});var ym=O(dC=>{"use strict";var gm=js().Buffer,uC=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 JW(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 YW(e){var t=JW(e);if(typeof t!="string"&&(gm.isEncoding===uC||!uC(e)))throw new Error("Unknown encoding: "+e);return t||e}dC.StringDecoder=Zs;function Zs(e){this.encoding=YW(e);var t;switch(this.encoding){case"utf16le":this.text=nH,this.end=oH,t=4;break;case"utf8":this.fillLast=eH,t=4;break;case"base64":this.text=aH,this.end=iH,t=3;break;default:this.write=sH,this.end=lH;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=rH;Zs.prototype.text=tH;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 XW(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 QW(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 eH(e){var t=this.lastTotal-this.lastNeed,r=QW(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 tH(e,t){var r=XW(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 rH(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function nH(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 oH(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 aH(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 iH(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function sH(e){return e.toString(this.encoding)}function lH(e){return e&&e.length?this.write(e):""}});var hm=O((T9,vC)=>{"use strict";var ii=Vs();vC.exports=Qe;var cH=$_(),Js;Qe.ReadableState=bC;var b9=require("events").EventEmitter,mC=function(e,t){return e.listeners(t).length},Im=nm(),Ys=js().Buffer,uH=global.Uint8Array||function(){};function dH(e){return Ys.from(e)}function fH(e){return Ys.isBuffer(e)||e instanceof uH}var gC=Object.create(ri());gC.inherits=ni();var bm=require("util"),We=void 0;bm&&bm.debuglog?We=bm.debuglog("stream"):We=function(){};var pH=q_(),yC=cm(),ai;gC.inherits(Qe,Im);var Tm=["error","close","destroy","pause","resume"];function hH(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):cH(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function bC(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 pH,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 bC(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=yC.destroy;Qe.prototype._undestroy=yC.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),TC(this,e,t,!1,n)};Qe.prototype.unshift=function(e){return TC(this,e,null,!0,!1)};function TC(e,t,r,n,o){var a=e._readableState;if(t===null)a.reading=!1,bH(e,a);else{var i;o||(i=mH(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Ys.prototype&&(t=dH(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):SC(e,a)):Sm(e,a,t,!1))):n||(a.reading=!1)}return gH(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)),SC(e,t)}function mH(e,t){var r;return!fH(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function gH(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 fC=8388608;function yH(e){return e>=fC?e=fC:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function pC(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=yH(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=pC(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=pC(r,t)));var o;return e>0?o=xC(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 bH(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(hC,e):hC(e))}function hC(e){We("emit readable"),e.emit("readable"),vm(e)}function SC(e,t){t.readingMore||(t.readingMore=!0,ii.nextTick(TH,e,t))}function TH(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=SH(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&&IC(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),mC(e,"error")===0&&e.emit("error",m)}hH(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 SH(e){return function(){var t=e._readableState;We("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&mC(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=IC(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(xH,this))}return r};Qe.prototype.addListener=Qe.prototype.on;function xH(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,IH(this,e)),this};function IH(e,t){t.resumeScheduled||(t.resumeScheduled=!0,ii.nextTick(vH,e,t))}function vH(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=xC;function xC(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=wH(e,t.buffer,t.decoder),r}function wH(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?kH(e,t):_H(e,t),n}function kH(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 _H(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(CH,t,e))}function CH(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function IC(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var wm=O((S9,_C)=>{"use strict";_C.exports=Bn;var rd=Jo(),kC=Object.create(ri());kC.inherits=ni();kC.inherits(Bn,rd);function EH(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:EH.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",NH)}function NH(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){wC(e,t,r)}):wC(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 wC(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 AC=O((x9,NC)=>{"use strict";NC.exports=Xs;var CC=wm(),EC=Object.create(ri());EC.inherits=ni();EC.inherits(Xs,CC);function Xs(e){if(!(this instanceof Xs))return new Xs(e);CC.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=AC())});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{PC=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Cm=new PC,Cm.append(_m),hr.blob=Cm.getBlob("application/zip").size===0}catch{hr.blob=!1}}}var _m,PC,Cm;try{hr.nodestream=!!km().Readable}catch{hr.nodestream=!1}});var Nm=O(Em=>{"use strict";var AH=st(),PH=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=AH.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(PH.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((w9,RC)=>{"use strict";RC.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 LC=O((k9,OC)=>{"use strict";var MC=global.MutationObserver||global.WebKitMutationObserver,si;process.browser?MC?(Am=0,FC=new MC(el),Pm=global.document.createTextNode(""),FC.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,FC,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}OC.exports=RH;function RH(e){tl.push(e)===1&&!Mm&&si()}});var HC=O((_9,WC)=>{"use strict";var DC=LC();function li(){}var jt={},BC=["REJECTED"],Fm=["FULFILLED"],UC=["PENDING"];process.browser||(rl=["UNHANDLED"]);var rl;WC.exports=ho;function ho(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=UC,this.queue=[],this.outcome=void 0,process.browser||(this.handled=rl),e!==li&&$C(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===BC)return this;var r=new this.constructor(li);if(process.browser||this.handled===rl&&(this.handled=null),this.state!==UC){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){DC(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=GC(MH,t);if(r.status==="error")return jt.reject(e,r.value);var n=r.value;if(n)$C(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=BC,e.outcome=t,process.browser||e.handled===rl&&DC(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 MH(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments)}}function $C(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=GC(a);i.status==="error"&&n(i.value)}function GC(e,t){var r={};try{r.value=e(t),r.status="success"}catch(n){r.status="error",r.value=n}return r}ho.resolve=FH;function FH(e){return e instanceof this?e:jt.resolve(new this(li),e)}ho.reject=OH;function OH(e){var t=new this(li);return jt.reject(t,e)}ho.all=LH;function LH(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=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=-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((C9,VC)=>{"use strict";var Lm=null;typeof Promise<"u"?Lm=Promise:Lm=HC();VC.exports={Promise:Lm}});var qC=O(jC=>{(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"?jC:global:self)});var st=O(xt=>{"use strict";var mo=Un(),BH=Nm(),ui=Qs(),Dm=ci();qC();function UH(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=BH.decode(i):r&&n!==!0&&(i=UH(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((A9,KC)=>{"use strict";function zC(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}zC.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}};KC.exports=zC});var fi=O(yo=>{"use strict";var di=st(),Yo=Un(),$H=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 GH=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},WH=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},HH=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?$H.newBufferFrom(t,"utf-8"):GH(t)};yo.utf8decode=function(t){return Yo.nodebuffer?di.transformTo("nodebuffer",t).toString("utf-8"):(t=di.transformTo(Yo.uint8array?"uint8array":"array",t),HH(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=WH(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 XC=O((R9,YC)=>{"use strict";var ZC=mr(),JC=st();function Um(e){ZC.call(this,"ConvertWorker to "+e),this.destType=e}JC.inherits(Um,ZC);Um.prototype.processChunk=function(e){this.push({data:JC.transformTo(this.destType,e.data),meta:e.meta})};YC.exports=Um});var t0=O((M9,e0)=>{"use strict";var QC=km().Readable,VH=st();VH.inherits($m,QC);function $m(e,t,r){QC.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()};e0.exports=$m});var Gm=O((F9,o0)=>{"use strict";var Xo=st(),jH=XC(),qH=mr(),zH=Nm(),KH=Un(),ZH=ci(),r0=null;if(KH.nodestream)try{r0=t0()}catch{}function JH(e,t,r){switch(e){case"blob":return Xo.newBlob(Xo.transformTo("arraybuffer",t),r);case"base64":return zH.encode(t);default:return Xo.transformTo(e,t)}}function YH(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 XH(e,t){return new ZH.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=JH(i,YH(a,o),s);r(l)}catch(c){n(c)}o=[]}).resume()})}function n0(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 jH(n)),e.lock()}catch(o){this._worker=new qH("error"),this._worker.error(o)}}n0.prototype={accumulate:function(e){return XH(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 r0(this,{objectMode:this._outputType!=="nodebuffer"},e)}};o0.exports=n0});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((L9,a0)=>{"use strict";var cd=st(),ud=mr(),QH=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=QH,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}})};a0.exports=pi});var dd=O((D9,s0)=>{"use strict";var eV=st();function tV(){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 i0=tV();function rV(e,t,r,n){var o=i0,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 nV(e,t,r,n){var o=i0,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}s0.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var n=eV.getTypeOf(t)!=="string";return n?rV(r|0,t,t.length,0):nV(r|0,t,t.length,0)}});var jm=O((B9,c0)=>{"use strict";var l0=mr(),oV=dd(),aV=st();function Vm(){l0.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}aV.inherits(Vm,l0);Vm.prototype.processChunk=function(e){this.streamInfo.crc32=oV(e.data,this.streamInfo.crc32||0),this.push(e)};c0.exports=Vm});var d0=O((U9,u0)=>{"use strict";var iV=st(),qm=mr();function zm(e){qm.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}iV.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)};u0.exports=zm});var fd=O(($9,h0)=>{"use strict";var f0=ci(),p0=Hm(),sV=jm(),Km=d0();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 p0(f0.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 p0(f0.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 sV).pipe(new Km("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new Km("compressedSize")).withStreamInfo("compression",t)};h0.exports=Zm});var b0=O((G9,y0)=>{"use strict";var lV=Gm(),cV=Hm(),Jm=fi(),Ym=fd(),m0=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 m0("error"),t.error(a)}return new lV(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 m0?this._data:new cV(this._data)}};var g0=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],uV=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(pd=0;pd<g0.length;pd++)Xm.prototype[g0[pd]]=uV;var pd;y0.exports=Xm});var Gn=O(Jt=>{"use strict";var dV=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function fV(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)fV(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 pV={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}},hV={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,pV)):(Jt.Buf8=Array,Jt.Buf16=Array,Jt.Buf32=Array,Jt.assign(Jt,hV))};Jt.setTyped(dV)});var G0=O(gi=>{"use strict";var mV=Gn(),gV=4,T0=0,S0=1,yV=2;function mi(e){for(var t=e.length;--t>=0;)e[t]=0}var bV=0,_0=1,TV=2,SV=3,xV=258,ag=29,fl=256,ll=fl+1+ag,hi=30,ig=19,C0=2*ll+1,Qo=15,Qm=16,IV=7,sg=256,E0=16,N0=17,A0=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],vV=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],P0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],wV=512,Wn=new Array((ll+2)*2);mi(Wn);var sl=new Array(hi*2);mi(sl);var cl=new Array(wV);mi(cl);var ul=new Array(xV-SV+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 R0,M0,F0;function tg(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function O0(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 L0(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function kV(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 _V(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<C0;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 D0(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]=L0(n[s]++,s))}}function CV(){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(D0(Wn,ll+1,a),e=0;e<hi;e++)sl[e*2+1]=5,sl[e*2]=L0(e,5);R0=new eg(Wn,ng,fl+1,ll,Qo),M0=new eg(sl,hd,0,hi,Qo),F0=new eg(new Array(0),vV,0,ig,IV)}function B0(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 U0(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 EV(e,t,r,n){U0(e),n&&(dl(e,r),dl(e,~r)),mV.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function x0(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&&x0(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!x0(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function I0(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=O0(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=C0,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],_V(e,t),D0(r,l,e.bl_count)}function v0(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[E0*2]++):s<=10?e.bl_tree[N0*2]++:e.bl_tree[A0*2]++,s=0,o=a,i===0?(l=138,c=3):a===i?(l=6,c=3):(l=7,c=4))}function w0(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,E0,e.bl_tree),sr(e,s-3,2)):s<=10?(dn(e,N0,e.bl_tree),sr(e,s-3,3)):(dn(e,A0,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 NV(e){var t;for(v0(e,e.dyn_ltree,e.l_desc.max_code),v0(e,e.dyn_dtree,e.d_desc.max_code),og(e,e.bl_desc),t=ig-1;t>=3&&e.bl_tree[P0[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function AV(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[P0[o]*2+1],3);w0(e,e.dyn_ltree,t-1),w0(e,e.dyn_dtree,r-1)}function PV(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return T0;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return S0;for(r=32;r<fl;r++)if(e.dyn_ltree[r*2]!==0)return S0;return T0}var k0=!1;function RV(e){k0||(CV(),k0=!0),e.l_desc=new tg(e.dyn_ltree,R0),e.d_desc=new tg(e.dyn_dtree,M0),e.bl_desc=new tg(e.bl_tree,F0),e.bi_buf=0,e.bi_valid=0,B0(e)}function $0(e,t,r,n){sr(e,(bV<<1)+(n?1:0),3),EV(e,t,r,!0)}function MV(e){sr(e,_0<<1,3),dn(e,sg,Wn),kV(e)}function FV(e,t,r,n){var o,a,i=0;e.level>0?(e.strm.data_type===yV&&(e.strm.data_type=PV(e)),og(e,e.l_desc),og(e,e.d_desc),i=NV(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?$0(e,t,r,n):e.strategy===gV||a===o?(sr(e,(_0<<1)+(n?1:0),3),I0(e,Wn,sl)):(sr(e,(TV<<1)+(n?1:0),3),AV(e,e.l_desc.max_code+1,e.d_desc.max_code+1,i+1),I0(e,e.dyn_ltree,e.dyn_dtree)),B0(e),n&&U0(e)}function OV(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[O0(t)*2]++),e.last_lit===e.lit_bufsize-1}gi._tr_init=RV;gi._tr_stored_block=$0;gi._tr_flush_block=FV;gi._tr_tally=OV;gi._tr_align=MV});var cg=O((V9,W0)=>{"use strict";function LV(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}W0.exports=LV});var ug=O((j9,H0)=>{"use strict";function DV(){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 BV=DV();function UV(e,t,r,n){var o=BV,a=n+r;e^=-1;for(var i=n;i<a;i++)e=e>>>8^o[(e^t[i])&255];return e^-1}H0.exports=UV});var gd=O((q9,V0)=>{"use strict";V0.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 Q0=O(hn=>{"use strict";var Yt=Gn(),Mr=G0(),K0=cg(),bo=ug(),$V=gd(),na=0,GV=1,WV=3,vo=4,j0=5,pn=0,q0=1,Fr=-2,HV=-3,dg=-5,VV=-1,jV=1,yd=2,qV=3,zV=4,KV=0,ZV=2,xd=8,JV=9,YV=15,XV=8,QV=29,ej=256,pg=ej+1+QV,tj=30,rj=19,nj=2*pg+1,oj=15,Pe=3,xo=258,Kr=xo+Pe+1,aj=32,Id=42,hg=69,bd=73,Td=91,Sd=103,ea=113,hl=666,wt=1,ml=2,ta=3,Ti=4,ij=3;function Io(e,t){return e.msg=$V[t],t}function z0(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 De(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 sj(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=K0(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 Z0(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=sj(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 lj(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=Z0(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=Z0(e,r),e.match_length<=5&&(e.strategy===jV||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 cj(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 uj(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,lj),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 dj(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 fj(){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(nj*2),this.dyn_dtree=new Yt.Buf16((2*tj+1)*2),this.bl_tree=new Yt.Buf16((2*rj+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(oj+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 J0(e){var t;return!e||!e.state?Io(e,Fr):(e.total_in=e.total_out=0,e.data_type=ZV,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 Y0(e){var t=J0(e);return t===pn&&dj(e.state),t}function pj(e,t){return!e||!e.state||e.state.wrap!==2?Fr:(e.state.gzhead=t,pn)}function X0(e,t,r,n,o,a){if(!e)return Fr;var i=1;if(t===VV&&(t=6),n<0?(i=0,n=-n):n>15&&(i=2,n-=16),o<1||o>JV||r!==xd||n<8||n>15||t<0||t>9||a<0||a>zV)return Io(e,Fr);n===8&&(n=9);var s=new fj;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,Y0(e)}function hj(e,t){return X0(e,t,xd,YV,XV,KV)}function mj(e,t){var r,n,o,a;if(!e||!e.state||t>j0||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,De(n,31),De(n,139),De(n,8),n.gzhead?(De(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)),De(n,n.gzhead.time&255),De(n,n.gzhead.time>>8&255),De(n,n.gzhead.time>>16&255),De(n,n.gzhead.time>>24&255),De(n,n.level===9?2:n.strategy>=yd||n.level<2?4:0),De(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(De(n,n.gzhead.extra.length&255),De(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):(De(n,0),De(n,0),De(n,0),De(n,0),De(n,0),De(n,n.level===9?2:n.strategy>=yd||n.level<2?4:0),De(n,ij),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|=aj),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));)De(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,De(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,De(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&&(De(n,e.adler&255),De(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&&z0(t)<=z0(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?uj(n,t):n.strategy===qV?cj(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===GV?Mr._tr_align(n):t!==j0&&(Mr._tr_stored_block(n,0,0,!1),t===WV&&(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?q0:(n.wrap===2?(De(n,e.adler&255),De(n,e.adler>>8&255),De(n,e.adler>>16&255),De(n,e.adler>>24&255),De(n,e.total_in&255),De(n,e.total_in>>8&255),De(n,e.total_in>>16&255),De(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:q0)}function gj(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,HV):pn))}function yj(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=K0(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=hj;hn.deflateInit2=X0;hn.deflateReset=Y0;hn.deflateResetKeep=J0;hn.deflateSetHeader=pj;hn.deflate=mj;hn.deflateEnd=gj;hn.deflateSetDictionary=yj;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((Z9,nE)=>{"use strict";function bj(){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=bj});var sE=O(Tl=>{"use strict";var yl=Q0(),bl=Gn(),bg=mg(),Tg=gd(),Tj=gg(),iE=Object.prototype.toString,Sj=0,yg=4,xi=0,oE=1,aE=2,xj=-1,Ij=0,vj=8;function oa(e){if(!(this instanceof oa))return new oa(e);this.options=bl.assign({level:xj,method:vj,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ij,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 Tj,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:Sj,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 wj(e,t){return t=t||{},t.raw=!0,Sg(e,t)}function kj(e,t){return t=t||{},t.gzip=!0,Sg(e,t)}Tl.Deflate=oa;Tl.deflate=Sg;Tl.deflateRaw=wj;Tl.gzip=kj});var cE=O((Y9,lE)=>{"use strict";var wd=30,_j=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,E,A,F;n=t.state,o=t.next_in,A=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+=A[o++]<<y,y+=8,h+=A[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+=A[o++]<<y,y+=8),v+=h&(1<<I)-1,h>>>=I,y-=I),y<15&&(h+=A[o++]<<y,y+=8,h+=A[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+=A[o++]<<y,y+=8,y<I&&(h+=A[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,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=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=_j;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((X9,mE)=>{"use strict";var uE=Gn(),Ii=15,dE=852,fE=592,pE=0,xg=1,hE=2,Cj=[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],Ej=[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],Nj=[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],Aj=[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,E=null,A=0,F,G=new uE.Buf16(Ii+1),B=new uE.Buf16(Ii+1),Z=null,X=0,Ee,L,Q;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?(E=Z=s,F=19):t===xg?(E=Cj,A-=257,Z=Ej,X-=257,F=256):(E=Nj,Z=Aj,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(;;){Ee=u-b,s[d]<F?(L=0,Q=s[d]):s[d]>F?(L=Z[X+s[d]],Q=E[A+s[d]]):(L=96,Q=0),S=1<<u-b,I=1<<y,f=I;do I-=S,a[k+(T>>b)+I]=Ee<<24|L<<16|Q|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(),Pj=cE(),Sl=gE(),Rj=0,WE=1,HE=2,yE=4,Mj=5,kd=6,aa=0,Fj=1,Oj=2,Or=-2,VE=-3,Eg=-4,Lj=-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,Dj=32,Bj=852,Uj=592,$j=15,Gj=$j;function $E(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Wj(){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(Bj),t.distcode=t.distdyn=new gr.Buf32(Uj),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 Wj,e.state=n,n.window=null,r=KE(e,t),r!==aa&&(e.state=null),r):Or}function Hj(e){return ZE(e,Gj)}var GE=!0,kg,_g;function Vj(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 jj(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,E=new gr.Buf8(4),A,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,E[0]=c&255,E[1]=c>>>8&255,r.check=mn(r.check,E,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&&(E[0]=c&255,E[1]=c>>>8&255,r.check=mn(r.check,E,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&&(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=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&&(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: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=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,Oj;e.adler=r.check=1,r.mode=Vn;case Vn:if(t===Mj||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(Vj(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,A={bits:r.lenbits},k=Sl(Rj,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.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,A={bits:r.lenbits},k=Sl(WE,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,k){e.msg="invalid literal/lengths set",r.mode=ot;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},k=Sl(HE,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.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,Pj(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=Fj;break e;case ot:k=VE;break e;case Ng:return Eg;case Dj: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=Lj),k)}function qj(e){if(!e||!e.state)return Or;var t=e.state;return t.window&&(t.window=null),e.state=null,aa}function zj(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Or:(r.head=t,t.done=!1,aa)}function Kj(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=Hj;Zr.inflateInit2=ZE;Zr.inflate=jj;Zr.inflateEnd=qj;Zr.inflateGetHeader=zj;Zr.inflateSetDictionary=Kj;Zr.inflateInfo="pako inflate (from Nodeca project)"});var Ag=O((eY,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((tY,QE)=>{"use strict";function Zj(){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=Zj});var rN=O(Il=>{"use strict";var vi=YE(),xl=Gn(),Nd=mg(),mt=Ag(),Pg=gd(),Jj=gg(),Yj=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 Jj,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 Yj,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 Xj(e,t){return t=t||{},t.raw=!0,Rg(e,t)}Il.Inflate=ia;Il.inflate=Rg;Il.inflateRaw=Xj;Il.ungzip=Rg});var aN=O((nY,oN)=>{"use strict";var Qj=Gn().assign,e4=sE(),t4=rN(),r4=Ag(),nN={};Qj(nN,e4,t4,r4);oN.exports=nN});var sN=O(Pd=>{"use strict";var n4=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o4=aN(),iN=st(),Ad=mr(),a4=n4?"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(a4,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 o4[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((sY,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},i4=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},s4=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 E=0,A=0;I&&(E|=16),o==="UNIX"?(A=798,E|=i4(i.unixPermissions,I)):(A=20,E|=s4(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(A,2)+F+Ye(f.length,2)+"\0\0\0\0"+Ye(E,4)+Ye(n,4)+c+g+f;return{fileRecord:G,dirRecord:B}},l4=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},c4=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:c4(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=l4(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 u4=Fg(),d4=fN(),f4=function(e,t){var r=e||t,n=u4[r];if(!n)throw new Error(r+" is not a valid compression method !");return n};pN.generateWorker=function(e,t,r){var n=new d4(t.streamFiles,r,t.platform,t.encodeFileName),o=0;try{e.forEach(function(a,i){o++;var s=f4(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((cY,mN)=>{"use strict";var p4=st(),Md=mr();function vl(e,t){Md.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}p4.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((uY,kN)=>{"use strict";var h4=fi(),wl=st(),SN=mr(),m4=Gm(),xN=Wm(),yN=fd(),g4=b0(),y4=hN(),bN=Qs(),b4=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=T4(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 b4(e,t):l=wl.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var c=new g4(e,l,a);this.files[e]=c},T4=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 S4={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:h4.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=y4.generateWorker(this,r,n)}catch(o){t=new SN("error"),t.error(o)}return new m4(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=S4});var Dg=O((dY,EN)=>{"use strict";var x4=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 x4.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((fY,AN)=>{"use strict";var NN=Dg(),I4=st();function _i(e){NN.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255}I4.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((pY,RN)=>{"use strict";var PN=Dg(),v4=st();function Ci(e){PN.call(this,e)}v4.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((hY,ON)=>{"use strict";var FN=Bg(),w4=st();function Ug(e){FN.call(this,e)}w4.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((mY,DN)=>{"use strict";var LN=$g(),k4=st();function Gg(e){LN.call(this,e)}k4.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((gY,$N)=>{"use strict";var Fd=st(),UN=Un(),_4=Bg(),C4=MN(),E4=BN(),N4=$g();$N.exports=function(e){var t=Fd.getTypeOf(e);return Fd.checkSupport(t),t==="string"&&!UN.uint8array?new C4(e):t==="nodebuffer"?new E4(e):UN.uint8array?new N4(Fd.transformTo("uint8array",e)):new _4(Fd.transformTo("array",e))}});var VN=O((yY,HN)=>{"use strict";var Hg=Wg(),wo=st(),A4=fd(),GN=dd(),Od=fi(),Ld=Fg(),P4=Un(),R4=0,M4=3,F4=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=F4(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 A4(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===R4&&(this.dosPermissions=this.externalFileAttributes&63),e===M4&&(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=P4.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((bY,qN)=>{"use strict";var O4=Wg(),jn=st(),Yr=Og(),L4=VN(),D4=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=D4.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 L4({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=O4(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};qN.exports=jN});var JN=O((TY,ZN)=>{"use strict";var Vg=st(),Dd=ci(),B4=fi(),U4=zN(),$4=jm(),KN=Qs();function G4(e){return new Dd.Promise(function(t,r){var n=e.decompressed.getContentWorker().pipe(new $4);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:B4.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 U4(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(G4(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((SY,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((LY,sA)=>{sA.exports=pq;function pq(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}});var RP=ce(require("path")),MP=ce(require("os"));var ab=ce(ob(),1),{program:h6,createCommand:m6,createArgument:g6,createOption:y6,CommanderError:b6,InvalidArgumentError:T6,InvalidOptionArgumentError:S6,Command:ib,Argument:x6,Option:Sn,Help:I6}=ab.default;var sb=`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.
@@ -360,6 +360,16 @@ COMMON ANALYSIS PATTERNS
360
360
  profiler-cli thread markers --auto-group
361
361
  profiler-cli thread markers --group-by type,name
362
362
 
363
+ Investigate a page load:
364
+ profiler-cli thread page-load Overview: milestones, top resources, CPU categories, jank
365
+ profiler-cli thread page-load --navigation 2 If multiple navigations, inspect each one separately (1-based)
366
+ profiler-cli thread page-load --jank-limit 0 Show all jank periods (default: first 10)
367
+ profiler-cli zoom push m-<jank-handle> Zoom into a specific jank period (handle from page-load output)
368
+ profiler-cli thread samples What was executing during the jank?
369
+ profiler-cli zoom pop
370
+ Requires page load markers in the selected thread (typically GeckoMain or a content process thread).
371
+ Marker handles shown in page-load output can be passed to "marker info" or "zoom push".
372
+
363
373
  Analyze network activity:
364
374
  profiler-cli thread network All requests with timing phases
365
375
  profiler-cli thread network --min-duration 200 Slow requests only (>= 200ms)
@@ -477,7 +487,7 @@ ERROR HANDLING
477
487
  "Profile load failed"
478
488
  Check that the path is correct and the file is a valid supported profile format.
479
489
  The daemon log at ~/.profiler-cli/<session-id>.log contains the full error detail.
480
- `;var ab=`profiler-cli: JSON Output Schemas
490
+ `;var lb=`profiler-cli: JSON Output Schemas
481
491
 
482
492
  Add --json to any command to get structured JSON output. The schemas below
483
493
  document the exact fields returned by each command.
@@ -598,87 +608,87 @@ SessionContext (present on all command results):
598
608
  currentViewRange: { start, startName, end, endName } | null,
599
609
  rootRange: { start, end }
600
610
  }
601
- `;var WN=le(require("net")),Fi=le(require("fs"));var he=le(Kt());var bS=le(Sa()),TS=le(Uf()),SS=le(Ir());tr();function rS(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 xn(e){return e.join("-")}function nS(e,t){return e+"-"+t}function oS(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(xn(r),r)}add(t){return this._table.set(xn(t),t),this}clear(){this._table.clear()}delete(t){return this._table.delete(xn(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(xn(t))}get size(){return this._table.size}*[Symbol.iterator](){yield*this._table.values()}};me();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 cS(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 Ra(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=xn(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=xn(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 kL(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 _L(){return{prefix:[],func:[],pathHash:[],category:[],subcategory:[],innerWindowID:[],sourceFramesInlinedIntoSymbol:[],suffixOrderIndexRangeStart:[],suffixOrderIndexRangeEnd:[],deepNodes:[],depth:[],length:0}}function CL(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}=CL(t,o);this._suffixOrderedCallNodes=a,this._suffixOrderIndexes=i,this._defaultCategory=n,this._rootCount=o;let l=kL(t,s,a,n);this._invertedRootCallNodeTable=l,this._invertedNonRootCallNodeTable=_L()}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 A=i[E],F=r[E],W=f.prefix[F];if(W!==-1){let U=f.func[W],K=d.get(U);K===void 0?d.set(U,1):d.set(U,K+1),s.push(A),l.push(W),c.push(U)}else u.push(A)}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 A=y[E];T.set(A,E);let F=G(d.get(A));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 A=c[E],F=G(T.get(A)),W=s[E],U=l[E],K=I[F]++;v[K]=U,w[K]=W}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=nS(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=G(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(xn(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(xn(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 oS(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]}};me();function uS(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 EL(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):G(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 dS(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 EL(e.threads);default:throw oe(r,"Unhandled threadCPUDelta unit in computeReferenceCPUDeltaPerMs.")}}function fS(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 NL=3,pS={},PL=0;function Gt(e,t){if(typeof performance<"u"){let r;process.env.NODE_ENV==="development"&&performance.mark&&(r=`time-code-${PL++}`,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=pS[e]||0;return i<NL&&(pS[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 yt(e,t){let r=t>>5,n=t&31;if(r>=e.length)throw new Wc(t);e[r]|=1<<n}function xt(e,t){let r=t>>5,n=t&31;if(r>=e.length)throw new Wc(t);return(e[r]&1<<n)!==0}function hS(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}};me();var RL=/^(?<vcs>hg|git):(?<repo>[^:]*):(?<path>[^:]*):(?<rev>.*)$/,ML=/^s3:(?<bucket>[^:]*):(?<digest>[0-9a-f]*)\/(?<path>[^:]*):$/,FL=/^cargo:(?<registry>[^:]*):(?<crate>[^/]+)-(?<version>[0-9]+\.[0-9]+\.[0-9]+):(?<path>[^:]*)$/;function Hc(e){let t=RL.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=ML.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=FL.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 mS(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 oe(e,"unhandled ParsedFile type")}}me();function xS(e,t,r){let{callNodeTable:n,stackIndexToCallNodeIndex:o}=LL(e,t,r);return new Uc(n,o)}function OL(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 LL(e,t,r){if(e.length===0)return{callNodeTable:tS(),stackIndexToCallNodeIndex:new Int32Array(0)};let n=DL(e,t),o=BL(n),{stackIndexToCallNodeIndex:a}=o,i=OL(t),s=UL(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 DL(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 BL(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 UL(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 Vc(e,t,r){return new $c(e.getCallNodeTable(),e.getStackIndexToNonInvertedCallNodeIndex(),t,r)}function $L(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 GL(e,t,r){let n=e;for(let o=0;o<t&&n!==null;o++)n=r[n];return n}function IS(e,t,r){let n=t.asInverted();return n!==null?HL(e,n,r):WL(e,t,r)}function WL(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 HL(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=GL(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 VL(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 qL(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 jL(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 vS(e,t,r){if(r===null||r===-1)return VL(t);let n=e.asInverted();return n!==null?jL(t,r,n):qL(t,r,e)}function jc(e){if(e.length===0)throw new Error("getLeafFuncIndex assumes that the path isn't empty.");return e[e.length-1]}function wS(e,t,r,n,o){return zL(t.getCallNodeIndexFromPath(e),t,r,n,o)}function zL(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 kS(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 KL({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=G(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=G(s);a.start=Math.min(a.start,u),a.end=Math.max(a.end,u+o);break}case 3:{let u=G(l);a.start=Math.min(a.start,u),a.end=Math.max(a.end,u+o);break}case 1:{let u=G(s),d=G(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 Ma=(0,bS.default)(KL,{cache:new TS.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=Ma(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 _S(e,t,r,n,o){switch(o){case"cpp":return gS(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 gS(e,t,a=>r.isJS[a]||r.relevantForJS[a]);default:return{newStackTable:e,effectOnThreadData:{}}}}function Fa(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(!xt(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 gS(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,yt(a,s)}else o[s]=d}return{newStackTable:Fa(e,n,a),effectOnThreadData:{oldStackToNewStack:o}}})}function Xn(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&&!xt(i,o))return null;if(a!==void 0){let s=a[o];return s!==-1?s:null}return o})}function CS(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=ZL(e,t,r,n,o,a,c);return l!==void 0?hS(u,l):u},void 0);return{newStackTable:e,effectOnThreadData:{dropIfOldStackIsNot:s}}})}function ZL(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)&&yt(c,d);let u=vr(e.length);for(let d=0;d<e.length;d++){let f=e.prefix[d];if(f!==null&&xt(u,f))yt(u,d);else{let p=t.func[e.frame[d]];xt(c,p)&&yt(u,d)}}return u}function ys(e){let{time:t,timeDeltas:r}=e;return t??uS(G(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 Qn(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 vn(e,t,r){return Yf(e.time,t,r)}function Yf(e,t,r){let n=Ra(e,t),o=Ra(e,r,n);return[n,o]}function Xf(e,t,r){return ES(e.time,t,r)}function ES(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]=vn(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]=vn(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]=vn(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]=vn(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]=vn(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 AS(e,t,r){let n={...e},{samples:o}=n,a=ys(o),[i,s]=ES(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 NS(e,t){if(!e.eventDelay)throw new Error("processEventDelays step should not be called for older profiles");let r=new Float32Array(e.length),n=G(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 PS(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):G(e.timeDeltas),y=r!==void 0&&c!==void 0?fS(c,h,n):null,b=y!==null,g=y??new Uint8Array(e.length+1).fill(100),m=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:m,threadCPUPercent:g,hasCPUDeltas:b,category:T,subcategory:S}}function RS(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:A,jsTracer:F,isPrivateBrowsing:W,userContextId:U,tracedObjectShapes:K}=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:A,jsTracer:F,isPrivateBrowsing:W,userContextId:U,tracedObjectShapes:K,samples:t,stackTable:r,frameTable:n,funcTable:o,resourceTable:i,nativeSymbols:a,stringTable:s,sources:l,tracedValuesBuffer:c}}function JL(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){JL(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 MS(e,t,t)}function MS(e,t,r){return e.map(n=>YL(n,t,r))}function YL(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 yS(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 rr(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 FS(e,t){let r=`${t}
611
+ `;var zA=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 PL(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 RL(){return{prefix:[],func:[],pathHash:[],category:[],subcategory:[],innerWindowID:[],sourceFramesInlinedIntoSymbol:[],suffixOrderIndexRangeStart:[],suffixOrderIndexRangeEnd:[],deepNodes:[],depth:[],length:0}}function ML(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}=ML(t,o);this._suffixOrderedCallNodes=a,this._suffixOrderIndexes=i,this._defaultCategory=n,this._rootCount=o;let l=PL(t,s,a,n);this._invertedRootCallNodeTable=l,this._invertedNonRootCallNodeTable=RL()}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 A=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(A),l.push(G),c.push(B)}else u.push(A)}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 E=0;E<b;E++){let A=y[E];T.set(A,E);let F=W(d.get(A));g[E]=F,m[E]=S,S+=F}let I=m,v=new Uint32Array(h),w=new Uint32Array(h);for(let E=0;E<h;E++){let A=c[E],F=W(T.get(A)),G=s[E],B=l[E],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 FL(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 FL(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 LL=3,gS={},DL=0;function Gt(e,t){if(typeof performance<"u"){let r;process.env.NODE_ENV==="development"&&performance.mark&&(r=`time-code-${DL++}`,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<LL&&(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 BL=/^(?<vcs>hg|git):(?<repo>[^:]*):(?<path>[^:]*):(?<rev>.*)$/,UL=/^s3:(?<bucket>[^:]*):(?<digest>[0-9a-f]*)\/(?<path>[^:]*):$/,$L=/^cargo:(?<registry>[^:]*):(?<crate>[^/]+)-(?<version>[0-9]+\.[0-9]+\.[0-9]+):(?<path>[^:]*)$/;function Hc(e){let t=BL.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=UL.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=$L.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}=WL(e,t,r);return new Uc(n,o)}function GL(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 WL(e,t,r){if(e.length===0)return{callNodeTable:oS(),stackIndexToCallNodeIndex:new Int32Array(0)};let n=HL(e,t),o=VL(n),{stackIndexToCallNodeIndex:a}=o,i=GL(t),s=jL(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 HL(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 VL(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 jL(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 qL(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 zL(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?ZL(e,n,r):KL(e,t,r)}function KL(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 ZL(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=zL(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 JL(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 YL(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 XL(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 JL(t);let n=e.asInverted();return n!==null?XL(t,r,n):YL(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 QL(t.getCallNodeIndexFromPath(e),t,r,n,o)}function QL(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 eD({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)(eD,{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=tD(e,t,r,n,o,a,c);return l!==void 0?yS(u,l):u},void 0);return{newStackTable:e,effectOnThreadData:{dropIfOldStackIsNot:s}}})}function tD(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:E,markers:A,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:E,markers:A,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 rD(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){rD(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=>nD(n,t,r))}function nD(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}
602
612
  `;return r+=`Thread: "${e.name}"`,e.tid!==void 0&&(r+=` (${e.tid})`),e.processType&&(r+=`
603
613
  Process: "${e.processType}"`,e.pid!==void 0&&(r+=` (${e.pid})`)),e.isPrivateBrowsing&&(r+=`
604
614
  Private Browsing: Yes`),e.userContextId&&(r+=`
605
- Container Id: ${e.userContextId}`),r}function XL(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&&XL(d,l,s)?`${l}: ${d}`:d:l||""}function OS(e,t){let r=Ca(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 LS(e,t){let r=t.asInverted();return r!==null?eD(e,r):QL(e)}function QL(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 eD(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:$L(i,s,r)}}function DS(e,t,r){let n=e[t];return r!==0?`${n.name}: ${n.subcategories[r]}`:`${n.name}`}function BS(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 US(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 $S(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(SS.oneLine`
615
+ Container Id: ${e.userContextId}`),r}function oD(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&&oD(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?iD(e,r):aD(e)}function aD(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 iD(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:qL(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`
606
616
  The address ${a} was already present when we wanted to add it.
607
617
  This probably means the deallocation wasn't collected, which may sometimes
608
618
  happen. We will overwrite the previous entry.
609
- `),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 GS(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 WS(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 ct(e){return e.size===1?G(In(e)):[...e].sort((t,r)=>r-t).join(",")}function HS(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:ct(n)}function tD(e){let t=new Set,r=new Set;for(let n of e)rD(n,t,r);return{samplingSelfStacks:t,syncBacktraceSelfStacks:r}}function rD(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 VS(e){let{samplingSelfStacks:t,syncBacktraceSelfStacks:r}=tD(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=Oc(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=MS(e.threads,yS(d),yS(f));return{...e,shared:h,threads:y}}function nD(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 qS(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 jS(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 zS(e,t,r,n){let o=t.functionSize[e],a=o??nD(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 KS(e){return e.meta.categories?"cpu-category":"stack"}function ZS(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 JS(e,t){return new Set(Array.from(e).filter(r=>!t.has(r)))}ur();var ex=le(QS()),oD=(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 Oa(e,t="<URL>",r="<sanitized>"){return e.replace(oD,(n,o,a,i)=>o?o+t:a?a+i+r:n)}function tx(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 Po=e=>{if(!e)return null;let t=e.split(",").map(r=>r.trim()).filter(r=>r);return t.length?t:null},Ro=e=>{if(!e||!e.length)return null;let t=e.map(ex.default).join("|");return new RegExp(t,"gi")};me();var rx={thread:0,network:1,memory:2,ipc:3,"event-delay":4,"process-cpu":5,power:6,marker:7,bandwidth:8},nx={network:0,bandwidth:1,memory:2,power:3,ipc:4,thread:5,"event-delay":6,"process-cpu":7,marker:8},ox={process:0,screenshots:1,"visual-progress":2,"perceptual-visual-progress":3,"contentful-visual-progress":4},ax={"visual-progress":0,"perceptual-visual-progress":1,"contentful-visual-progress":2,screenshots:3,process:4};function aD(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 nx[e[o].type]-nx[e[a].type]}),r}function iD(e,t){let r=e.map((n,o)=>o);return r.sort((n,o)=>{let a=e[n],i=e[o],s=ax[a.type],l=ax[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 sx(e,t,r,n){let o=new Map;if(r===null)for(let[a,i]of t){let s=aD(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}Tx(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 lx(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)=>rx[s.type]-rx[l.type]);return r}function cx(e,t=null,r){let n=new Map,o=[],{stringArray:a}=e.shared,i=Ue.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)=>ox[l.type]-ox[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 ux(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&&Tx(e.length,t)?t:iD(e,n)}function dx(e,t,r,n){if(e===null)return ix(t,r,n);let o=Ss(e,new Set(t));return o.size===0?ix(t,r,n):o}function ix(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=lD(e,n,r),a=o.find(i=>n[i].name==="GeckoMain"&&n[i].processType==="tab")??o[0];return new Set([a])}function lD(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 fx(e,t,r){let n=new Set(r.threads.map((i,s)=>s)),o=new Set(t),a=JS(n,o);return a.size===0?null:mx(r,a,e)}function px(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 hx(e,t,r,n){return mx(t,dD(t,e,r,n),e)}function mx(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!gD(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=G(t.get(l),"A local track was expected to exist for the given pid."),u=G(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 gx(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 rr(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 oe(e,"Unhandled GlobalTrack type.")}}function yx(e,t,r,n){switch(e.type){case"thread":return rr(t,t[e.threadIndex]);case"network":return"Network";case"memory":return"Memory";case"bandwidth":return"Bandwidth";case"ipc":return`IPC \u2014 ${rr(t,t[e.threadIndex])}`;case"event-delay":return rr(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 oe(e,"Unhandled LocalTrack type.")}}function cD(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 uD=.05;function dD(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=>G(e.threads[f])),new Set(e.meta.initialVisibleThreads);let a=cD(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))*uD,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 fD=40;function bx(e,t,r){let n=pD(t),o=t.processType==="default",a=hD(t),i=mD(e,t,r),s=a?i*fD:i;return{isEssentialFirefoxThread:n,isInParentProcess:o,isInterestingEvenWithMinimalActivity:a,sampleScore:i,boostedSampleScore:s}}function pD(e){return e.name==="GeckoMain"&&e.processType==="default"&&(!e.processName||e.processName==="Parent Process")||e.name==="GeckoMain"&&e.processType==="gpu"}function hD(e){return/^(?:Audio|Media|GraphRunner|WebrtcWorker)/.test(e.name)}function mD({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 Tx(e,t){return t.length===e&&t.slice().sort((r,n)=>r-n).every((r,n)=>r===n)}function gD(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 oe(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=Ra(l.time,t),p=Ra(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=le(Kt());me();var up={};Hy(up,{exclude:()=>_D,extract:()=>lp,parse:()=>cp,parseUrl:()=>Ax,pick:()=>Px,stringify:()=>Ex,stringifyUrl:()=>Nx});var Ix="%[a-f0-9]{2}",Sx=new RegExp("("+Ix+")|([^%]+?)","gi"),xx=new RegExp("("+Ix+")+","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 TD(e){try{return decodeURIComponent(e)}catch{let t=e.match(Sx)||[];for(let r=1;r<t.length;r++)e=ap(t,r).join(""),t=e.match(Sx)||[];return e}}function SD(e){let t={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=xx.exec(e);for(;r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{let o=TD(r[0]);o!==r[0]&&(t[r[0]]=o)}r=xx.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 SD(e)}}function vx(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 xD=e=>e==null,ID=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),sp=Symbol("encodeFragmentIdentifier");function vD(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,[bt(t,e),"[",o,"]"].join("")]:[...r,[bt(t,e),"[",bt(o,e),"]=",bt(n,e)].join("")]};case"bracket":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[bt(t,e),"[]"].join("")]:[...r,[bt(t,e),"[]=",bt(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,[bt(t,e),":list="].join("")]:[...r,[bt(t,e),":list=",bt(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?[[bt(r,e),t,bt(o,e)].join("")]:[[n,bt(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,bt(t,e)]:[...r,[bt(t,e),"=",bt(n,e)].join("")]}}function wD(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=>Mo(s,e)):n===null?n:Mo(n,e);o[r]=i};case"bracket-separator":return(r,n,o)=>{let a=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!a){o[r]=n&&Mo(n,e);return}let i=n===null?[]:Mo(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 kx(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function bt(e,t){return t.encode?t.strict?ID(e):encodeURIComponent(e):e}function Mo(e,t){return t.decode?ip(e):e}function _x(e){return Array.isArray(e)?e.sort():typeof e=="object"?_x(Object.keys(e)).sort((t,r)=>Number(t)-Number(r)).map(t=>e[t]):e}function Cx(e){let t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function kD(e){let t="",r=e.indexOf("#");return r!==-1&&(t=e.slice(r)),t}function wx(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=Cx(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},kx(t.arrayFormatSeparator);let r=wD(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:Mo(s,t),r(Mo(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]=wx(s,t,c)}else typeof a=="object"&&a!==null&&t.types[o]==="string"?n[o]=Object.values(a).join(t.arrayFormatSeparator):n[o]=wx(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)?_x(i):i,o},Object.create(null))}function Ex(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},kx(t.arrayFormatSeparator);let r=i=>t.skipNull&&xD(e[i])||t.skipEmptyString&&e[i]==="",n=vD(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 bt(i,t);if(Array.isArray(s)){if(s.length===0&&t.arrayFormat==="bracket-separator")return bt(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 bt(i,t)+"="+bt(s,t)}).filter(i=>i.length>0).join("&")}function Ax(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:Mo(n,t)}:{}}}function Nx(e,t){t={encode:!0,strict:!0,[sp]:!0,...t};let r=Cx(e.url).split("?")[0]||"",n=lp(e.url),o={...cp(n,{sort:!1,...t}),...e.query},a=Ex(o,t);a&&=`?${a}`;let i=kD(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 Px(e,t,r){r={parseFragmentIdentifier:!0,[sp]:!1,...r};let{url:n,query:o,fragmentIdentifier:a}=Ax(e,r);return Nx({url:n,query:vx(o,t),fragmentIdentifier:a},r)}function _D(e,t,r){let n=Array.isArray(t)?o=>!t.includes(o):(o,a)=>!t(o,a);return Px(e,n,r)}var dp=up;var Lx=le(Sa()),Dx=le(Fx());me();function ED({places:e,style:t}){return new Intl.NumberFormat(void 0,{minimumFractionDigits:e,maximumFractionDigits:e,style:t})}var Ox=(0,Lx.default)(ED,{cache:new Dx.default});function dt(e,t=2,r=3,n="decimal"){if(e===0)return Ox({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),Ox({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 oe(e,"Unhandled WeightType.")}return t&&(n=3),dt(r,3,n)}function Yc(e){return dt(e,2,1,"percent")}function AD(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?" "+Bx(a,t,0,n):"")}function Bx(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?" "+Ux(a,t,0,n):"")}function Ux(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?Ux(e,t,r,n):e<1e3**3?Bx(e,t,r,n):AD(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 $x(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 Gx(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?$x(i,t,0,n):"")}function ND(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?Gx(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)?ND(e,t,r,n):Gx(e,t,r,n):$x(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 Wx(e=[]){return e.map(gp).join("~")}function PD(e,t,r=1/0){return t==="bytes"?xs(e,2,2,r):on(e,2,2,r)}function Hx(e,t){return e.map(n=>PD(n.end-n.start,t))}var yp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._",MD=yp[32];function Fo(e){let t=Array.from(e);return t.sort((r,n)=>r-n),_n(t)}function _n(e){let t="";for(let r=0;r<e.length;r++){let n=FD(e,r);if(n===0){t+=Vx(e[r]);continue}r+=n,t+=MD,t+=Vx(e[r])}return t}function La(e){let t=[],r=0;for(;r<e.length;){let{value:n,hasLeadingZero:o,nextI:a}=OD(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 FD(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 Vx(e){let t=e,r=yp[t&31];for(t>>=5;t!==0;)r=yp[32+(t&31)]+r,t>>=5;return r}function qx(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 OD(e,t){let r=t,n=qx(e[r]),o=n&32,a=n&31,i=o!==0&&a===0,s=a;for(r++;o&&r<e.length;)n=qx(e[r]),o=n&32,a=n&31,s=s<<5|a,r++;return{value:s,hasLeadingZero:i,nextI:r}}me();function jx(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}tr();ur();me();cr();var bp=le(Ir());me();var Tp=[{name:"Jank",display:["marker-table","marker-chart"],tooltipLabel:"Jank \u2013 event processing delay",tableLabel:"Event processing delay",fields:[],description:bp.oneLine`
619
+ `),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 sD(e){let t=new Set,r=new Set;for(let n of e)lD(n,t,r);return{samplingSelfStacks:t,syncBacktraceSelfStacks:r}}function lD(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}=sD(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 cD(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??cD(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()),uD=(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(uD,(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 dD(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 fD(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=dD(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=pD(o,e,t,r),o.sort((l,c)=>sx[l.type]-sx[c.type]),o}function pD(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:fD(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=hD(e,n,r),a=o.find(i=>n[i].name==="GeckoMain"&&n[i].processType==="tab")??o[0];return new Set([a])}function hD(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,yD(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!ID(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 mD(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 gD=.05;function yD(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=mD(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))*gD,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 bD=40;function xx(e,t,r){let n=TD(t),o=t.processType==="default",a=SD(t),i=xD(e,t,r),s=a?i*bD:i;return{isEssentialFirefoxThread:n,isInParentProcess:o,isInterestingEvenWithMinimalActivity:a,sampleScore:i,boostedSampleScore:s}}function TD(e){return e.name==="GeckoMain"&&e.processType==="default"&&(!e.processName||e.processName==="Parent Process")||e.name==="GeckoMain"&&e.processType==="gpu"}function SD(e){return/^(?:Audio|Media|GraphRunner|WebrtcWorker)/.test(e.name)}function xD({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 ID(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:()=>RD,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 kD(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 _D(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=kD(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 _D(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 CD=e=>e==null,ED=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),sp=Symbol("encodeFragmentIdentifier");function ND(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 AD(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?ED(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 PD(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=AD(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&&CD(e[i])||t.skipEmptyString&&e[i]==="",n=ND(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=PD(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 RD(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 FD({places:e,style:t}){return new Intl.NumberFormat(void 0,{minimumFractionDigits:e,maximumFractionDigits:e,style:t})}var Bx=(0,Ux.default)(FD,{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 OD(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):OD(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 LD(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)?LD(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 DD(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=>DD(n.end-n.start,t))}var yp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._",UD=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=$D(e,r);if(n===0){t+=zx(e[r]);continue}r+=n,t+=UD,t+=zx(e[r])}return t}function Da(e){let t=[],r=0;for(;r<e.length;){let{value:n,hasLeadingZero:o,nextI:a}=GD(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 $D(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 GD(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`
610
620
  Jank markers show when the main event loop of a thread has been busy. It is
611
621
  a good indicator that there may be some kind of performance problem that
612
622
  is worth investigating.
613
- `},{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 LD=/^\s*([\w.]+)\s*\?\s*'([^']*)'\s*:\s*'([^']*)'\s*$/;function DD(e,t,r,n){let o=n.split(/{([^}]+)}/);if(o.length===1)return()=>n;function a(s,l){return console.error(bp.oneLine`
623
+ `},{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 WD=/^\s*([\w.]+)\s*\?\s*'([^']*)'\s*:\s*'([^']*)'\s*$/;function HD(e,t,r,n){let o=n.split(/{([^}]+)}/);if(o.length===1)return()=>n;function a(s,l){return console.error(bp.oneLine`
614
624
  Error processing the label "${s}" because of the ${l}.
615
625
  Currently the labels in the marker schema take the form of
616
626
  "marker.data.keyName", "marker.startTime", or a ternary like
617
627
  "marker.data.keyName ? 'yes' : 'no'". No other type of access
618
628
  is currently supported.
619
- `),()=>""}let i=o.map((s,l)=>{if(l%2===0)return()=>s;let c=s.match(LD);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?Da(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 BD={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 eo(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,DD(u,n,o,d))}let l=G(BD[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 zx(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=UD(i,l,r,l.tooltipLabel))}a||(a=i.name),n.set(o,a)}return a}}function UD(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:Da(d.type,u.format,f,r)}function Da(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 Da(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)?`${G(a.get(r))} (${r})`:`PID: ${r}`;case"tid":return o&&o.has(r)?`${G(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=>Da(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 Kx(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=$D(u,r,n,o,a)),d&&s&&(d=GD(u,r,n,o,a)),d&&l.push(c)}return l}function $D(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 GD(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 oe(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 oe(u,"Unhandled IPC phase type.")}}if(!Ue.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,rr(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=G(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 g=b;y.has(g.tid)||(l.set(g.tid,g.index,h),y.add(g.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],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=G(e.startTime[w],I),A=G(y,I),F=G(b,I);c([w,p],{start:E,end:F,name:t[h],category:T,threadId:S,data:{...v,startTime:E,fetchStart:A,cause:k.cause||v.cause}})}else{let k=Math.min(n.start,G(y,"Network markers are assumed to have a start time.")),E=G(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=G(e.startTime[v],"Expected to find a start time for a screenshot marker."),k=G(y,"The CompositorScreenshot is assumed to have a start time."),E=e.data[v],A=e.threadId?e.threadId[v]:null;c([v],{start:w,end:k,name:"CompositorScreenshot",category:T,threadId:A,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=G(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 A={...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:A,incomplete:E});continue}default:}switch(g){case 0:c([p],{start:G(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=G(y,"An Interval marker did not have a startTime."),v=G(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=G(b,"An IntervalEnd marker did not have an endTime");if(v!==void 0){let k=G(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=G(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=G(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=G(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 WD(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 Zx(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=WD(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 Ba(e){return!!(e.data&&e.data.type==="Network")}function Jx(e){return!!(e.data&&e.data.type==="UserTiming")}function Yx({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 Xx(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 Qx(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 eI(e){return{...e,URI:"",RedirectURI:""}}function tI(e){return{...e,prefValue:""}}function rI(e){return{...e,name:Oa(e.name)}}function nI(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 oI(e,t){for(let{key:r,format:n}of e.fields)r in t&&(n==="url"?t={...t,[r]:Oa(t[r])}:n==="file-path"?t={...t,[r]:tx(t[r])}:n==="sanitized-string"&&(t={...t,[r]:"<sanitized>"}));return t}function HD(e,t){let r=new Set;for(let{display:n,name:o}of e)n.includes(t)&&r.add(o);return r}function VD(e){}function Oo(e,t,r,n,o,a=VD){let i=HD(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:Ro(a.positive),negative:Ro(a.negative)});return{generic:Ro(r),fieldMap:n}},kp={1:"E",2:"W",3:"I",4:"D",5:"V"};function aI(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 iI(e,t,r,n,o,a){if("message"in o){if(!o.message)return null;let s=kp[o.level]??"D";return`${e} - [${t} ${r}: ${n}]: ${s}/${a} ${o.message.trim()}`}if(!o.name)return null;let i=o.module.includes("/")?"":"D/";return`${e} - [${t} ${r}: ${n}]: ${i}${o.module} ${o.name.trim()}`}function jD(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 zD(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 zD(jD(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 KD={"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},ZD=Object.keys(KD),sI={},lI={};ZD.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 oe(e)}sI[e]=t,lI[t]=e});function cI(e){if(!e)return[];let t=[];return e.split("~").forEach(r=>{let n=r.split("-"),o=n[0],a=lS(lI[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=La(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=JD(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 oe(a)}}),t}function JD(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 YD(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 oe(e)}}function Ep(e){return e.map(t=>{let r=sI[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,_n(t.callNodePath)].join("-");return"inverted"in t&&t.inverted&&(n+="-i"),n}case"filter-samples":return`${r}-${YD(t.filterType)}-${t.filter}`;default:throw oe(t)}}).join("~")}function uI(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 oe(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 oe(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 oe(c)}});return l.unshift({l10nId:"TransformNavigator--complete",item:r}),l}function Ap(e,t,r,n){switch(t.type){case"focus-subtree":return XD(t.callNodePath,e);case"focus-function":return QD(t.funcIndex,e);case"focus-self":return e2(t.funcIndex,e);case"focus-category":return o2(t.category,e,n);case"drop-category":return a2(t.category,e,n);case"merge-call-node":return t2(t.callNodePath,e);case"merge-function":return r2(t.funcIndex,e);case"drop-function":return n2(t.funcIndex,e);case"collapse-resource":return i2(t.resourceIndex,t.collapsedFuncIndex,r.funcTable,e);case"collapse-direct-recursion":return s2(t.funcIndex,e);case"collapse-recursion":return l2(t.funcIndex,e);case"collapse-function-subtree":return c2(t.funcIndex,e);case"filter-samples":return e;default:throw oe(t)}}function XD(e,t){return dI(e,t)?t.slice(e.length-1):[]}function QD(e,t){let r=t.indexOf(e);return r===-1?[]:t.slice(r)}function e2(e,t){return t.indexOf(e)!==-1?[e]:[]}function t2(e,t){return dI(e,t)?t.filter((r,n)=>n!==e.length-1):t}function r2(e,t){return t.filter(r=>r!==e)}function n2(e,t){return t.includes(e)?[]:t}function o2(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 a2(e,t,r){let n=r.getCallNodeIndexFromPath(t);return n!==null&&r.categoryForNode(n)===e?[]:t}function i2(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 l2(e,t){let r=t.indexOf(e),n=t.lastIndexOf(e);return r===-1?t:t.slice(0,r).concat(t.slice(n))}function c2(e,t){let r=t.indexOf(e);return r===-1?t:t.slice(0,r+1)}function dI(e,t){return e.length<=t.length&&e.every((r,n)=>r===t[n])}function u2(e,t,r){return Gt("mergeCallNode",()=>{let{stackTable:n,frameTable:o}=e,a=new Map,i=new Array(n.length),s=Lo[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 d2(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 f2(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 p2(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 fI(s,r,n)}function fI(e,t,r){let{stackTable:n,frameTable:o}=e,a=new Map,i=Lo[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 h2(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 Lo={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 m2(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 g2(e,t,r){return Gt("focusSubtree",()=>{let{stackTable:n,frameTable:o}=e,a=t.length,i=new Int32Array(n.length),s=Lo[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),yt(u,f)}}i[f]=y}let d=Fa(n,c,u);return Xn({newStackTable:d,effectOnThreadData:{oldStackToNewStack:l}},e)})}function y2(e,t,r){return Gt("focusInvertedSubtree",()=>{let n=t.length,{stackTable:o,frameTable:a}=e,i=Lo[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 b2(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),yt(i,l))}let s=Fa(r,a,i);return Xn({newStackTable:s,effectOnThreadData:{oldStackToNewStack:o}},e)})}function T2(e,t,r){return Gt("focusSelf",()=>{let{stackTable:n,frameTable:o}=e,a=Lo[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){yt(i,u);let p=s.length;s[p]=null,l[u]=p}else{let p=n.prefix[u];if(p!==null&&xt(i,p)&&!a(e,f)){yt(i,u);let h=l[p],y=s.length;s[y]=h,l[u]=y}}}let c=Fa(n,s,i);return Xn({newStackTable:c,effectOnThreadData:{dropIfOldStackIsNot:i,oldStackToNewStack:l}},e)})}function S2(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),yt(a,s)}let i=Fa(r,o,a);return Xn({newStackTable:i,effectOnThreadData:{oldStackToNewStack:n}},e)})}function x2(e,t){return Gt("dropCategory",()=>{let{stackTable:r}=e;return $r(e,r,n=>n!==null&&r.category[n]===t?null:n)})}function Np(e,t,r){let{stackTable:n,frameTable:o}=e,a=Lo[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 pI(e,t,r){let n=Lo[t];return r.filter(o=>n(e,o))}function I2(e,t,r,n,o,a){let i=[],s=ks(Po(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 v2(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=jx(I2(t,r,n,e.stringTable,o,i)),d=a==="marker-search";return tp(e,e.stackTable,f,f,p=>p)}default:throw oe(a)}})}function hI(e,t,r,n,o,a){switch(t.type){case"focus-subtree":return t.inverted?y2(e,t.callNodePath,t.implementation):g2(e,t.callNodePath,t.implementation);case"merge-call-node":return u2(e,t.callNodePath,t.implementation);case"merge-function":return d2(e,t.funcIndex);case"drop-function":return f2(e,t.funcIndex);case"focus-function":return b2(e,t.funcIndex);case"focus-self":return T2(e,t.funcIndex,t.implementation);case"focus-category":return S2(e,t.category);case"drop-category":return x2(e,t.category);case"collapse-resource":return p2(e,t.resourceIndex,t.collapsedFuncIndex,t.implementation);case"collapse-direct-recursion":return fI(e,t.funcIndex,t.implementation);case"collapse-recursion":return h2(e,t.funcIndex);case"collapse-function-subtree":return m2(e,t.funcIndex);case"filter-samples":return v2(e,r,n,o,a,t.filterType,t.filter);default:throw oe(t)}}function w2(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 oe(e.filterType)}default:throw oe(e)}}function Pp(e,t){return e.map(r=>w2(r,t)).filter(r=>r!==null)}me();var yI=le(Ir());var gI={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"},to=Object.getOwnPropertyNames(gI),Qz=to.map(e=>({name:e,title:gI[e]})),ro=["calltree","flame-graph","stack-chart"];ur();var ru=16,bI=!1,tu=0;function _2(){tu++,bI=!0}function C2(){if(tu--,tu<0)throw new Error("_maybeDisableHistoryReplaceState was called more than _enableHistoryReplaceState which should never happen.");tu===0&&(bI=!1)}function TI(e){_2();try{e()}finally{C2()}}function E2(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 oe(t)}}function A2(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 oe(t)}let{selectedThreads:r}=e.profileSpecific,n=r!==null?ct(r):null,o={globalTrackOrder:N2(e.profileSpecific.globalTrackOrder),hiddenGlobalTracks:P2(e.profileSpecific.hiddenGlobalTracks),hiddenLocalTracksByPid:R2(e.profileSpecific.hiddenLocalTracksByPid),localTrackOrderByPid:M2(e.profileSpecific.localTrackOrderByPid,e.profileSpecific.localTrackOrderChangedPids),tabID:e.profileSpecific.tabFilter??void 0,range:Wx(e.profileSpecific.committedRanges)||void 0,thread:r===null?void 0:Fo(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=L2(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 oe(i)}return dp.stringify(a,{arrayFormat:"bracket"})}function Rp(e){let t=E2(e),r=A2(e),{dataSource:n}=e;return n==="none"?"/":(t.length===0?"/":"/"+t.join("/")+"/")+(r?"?"+r:"")}function N2(e){return _n(e)||void 0}function P2(e){if(e.size>0)return Fo(e)}function R2(e){let t=[];for(let[r,n]of e)n.size>0&&t.push(`${r}-${Fo(n)}`);return t.join("~")||void 0}function M2(e,t){let r=[];for(let n of t){let o=e.get(n);o&&o.length>0&&r.push(`${n}-${_n(o)}`)}return r.join("~")||void 0}var SI={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=cI(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=F2(t.shared,i.callNodePath);s!==null&&(i.callNodePath=O2(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=_n(t)||void 0}if(e.hiddenGlobalTracks){let t=new Set(e.hiddenGlobalTracks.split("-").map(r=>+r));e.hiddenGlobalTracks=Fo(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}-${Fo(o)}`}).join("~")),e.localTrackOrderByPid&&(e.localTrackOrderByPid=e.localTrackOrderByPid.split("~").map(t=>{let[r,...n]=t.split("-"),o=n.map(a=>+a);return`${r}-${_n(o)}`}).join("~")),e.thread){let t=new Set(e.thread.split(",").map(r=>+r));e.thread=Fo(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||La(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=Ue.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=La(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=La(g).map(c),I=_n(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<=ru;e++)if(!SI[e])throw new Error(`There is no upgrader for version ${e}.`);for(let e of Object.keys(SI)){let t=+e;if(t>ru)throw new Error(yI.oneLine`
629
+ `),()=>""}let i=o.map((s,l)=>{if(l%2===0)return()=>s;let c=s.match(WD);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 VD={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,HD(u,n,o,d))}let l=W(VD[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=jD(i,l,r,l.tooltipLabel))}a||(a=i.name),n.set(o,a)}return a}}function jD(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=qD(u,r,n,o,a)),d&&s&&(d=zD(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=Is(t,e.data);if(u&&Sp(u,e,n,i))return!0}return!1}function zD(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],E=W(e.startTime[w],I),A=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:A,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}=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."),E=e.data[v],A=e.threadId?e.threadId[v]:null;c([v],{start:w,end:k,name:"CompositorScreenshot",category:T,threadId:A,data:E})}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,E=!0;I.startTime!==void 0&&I.endTime!==void 0&&(w=I.startTime,k=I.endTime,E=!1);let A={...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:A,incomplete:E});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 KD(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=KD(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 ZD(e,t){let r=new Set;for(let{display:n,name:o}of e)n.includes(t)&&r.add(o);return r}function JD(e){}function Lo(e,t,r,n,o,a=JD){let i=ZD(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 XD(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 QD(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 QD(XD(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 e2={"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},t2=Object.keys(e2),dI={},fI={};t2.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=r2(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 r2(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 n2(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}-${n2(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 o2(t.callNodePath,e);case"focus-function":return a2(t.funcIndex,e);case"focus-self":return i2(t.funcIndex,e);case"focus-category":return u2(t.category,e,n);case"drop-category":return d2(t.category,e,n);case"merge-call-node":return s2(t.callNodePath,e);case"merge-function":return l2(t.funcIndex,e);case"drop-function":return c2(t.funcIndex,e);case"collapse-resource":return f2(t.resourceIndex,t.collapsedFuncIndex,r.funcTable,e);case"collapse-direct-recursion":return p2(t.funcIndex,e);case"collapse-recursion":return h2(t.funcIndex,e);case"collapse-function-subtree":return m2(t.funcIndex,e);case"filter-samples":return e;default:throw ae(t)}}function o2(e,t){return mI(e,t)?t.slice(e.length-1):[]}function a2(e,t){let r=t.indexOf(e);return r===-1?[]:t.slice(r)}function i2(e,t){return t.indexOf(e)!==-1?[e]:[]}function s2(e,t){return mI(e,t)?t.filter((r,n)=>n!==e.length-1):t}function l2(e,t){return t.filter(r=>r!==e)}function c2(e,t){return t.includes(e)?[]:t}function u2(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 d2(e,t,r){let n=r.getCallNodeIndexFromPath(t);return n!==null&&r.categoryForNode(n)===e?[]:t}function f2(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 p2(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 h2(e,t){let r=t.indexOf(e),n=t.lastIndexOf(e);return r===-1?t:t.slice(0,r).concat(t.slice(n))}function m2(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 g2(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 y2(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 b2(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 T2(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 S2(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 x2(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 I2(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 v2(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 w2(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 k2(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 _2(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 C2(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 E2(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 N2(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(E2(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?v2(e,t.callNodePath,t.implementation):I2(e,t.callNodePath,t.implementation);case"merge-call-node":return g2(e,t.callNodePath,t.implementation);case"merge-function":return y2(e,t.funcIndex);case"drop-function":return b2(e,t.funcIndex);case"focus-function":return w2(e,t.funcIndex);case"focus-self":return k2(e,t.funcIndex,t.implementation);case"focus-category":return _2(e,t.category);case"drop-category":return C2(e,t.category);case"collapse-resource":return T2(e,t.resourceIndex,t.collapsedFuncIndex,t.implementation);case"collapse-direct-recursion":return gI(e,t.funcIndex,t.implementation);case"collapse-recursion":return S2(e,t.funcIndex);case"collapse-function-subtree":return x2(e,t.funcIndex);case"filter-samples":return N2(e,r,n,o,a,t.filterType,t.filter);default:throw ae(t)}}function A2(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=>A2(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),d8=ro.map(e=>({name:e,title:SI[e]})),no=["calltree","flame-graph","stack-chart"];ur();var ru=16,II=!1,tu=0;function R2(){tu++,II=!0}function M2(){if(tu--,tu<0)throw new Error("_maybeDisableHistoryReplaceState was called more than _enableHistoryReplaceState which should never happen.");tu===0&&(II=!1)}function vI(e){R2();try{e()}finally{M2()}}function F2(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 O2(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:L2(e.profileSpecific.globalTrackOrder),hiddenGlobalTracks:D2(e.profileSpecific.hiddenGlobalTracks),hiddenLocalTracksByPid:B2(e.profileSpecific.hiddenLocalTracksByPid),localTrackOrderByPid:U2(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=W2(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=F2(e),r=O2(e),{dataSource:n}=e;return n==="none"?"/":(t.length===0?"/":"/"+t.join("/")+"/")+(r?"?"+r:"")}function L2(e){return Cn(e)||void 0}function D2(e){if(e.size>0)return Oo(e)}function B2(e){let t=[];for(let[r,n]of e)n.size>0&&t.push(`${r}-${Oo(n)}`);return t.join("~")||void 0}function U2(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=$2(t.shared,i.callNodePath);s!==null&&(i.callNodePath=G2(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`
620
630
  There is an upgrader for version ${t}, which is larger than
621
631
  CURRENT_URL_VERSION (${ru}). If you added a new upgrader,
622
632
  make sure and bump the CURRENT_URL_VERSION variable.
623
- `)}function F2(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=G(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 O2(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 L2(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}`}me();function xI(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 II(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)+"/"+sS("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 vI(e){let r=/(?:[^/]+\/)?[^/]+$/.exec(e);return r!==null?r[0]:""}cr();var B2=["localhost","127.0.0.1","::1"];function no(e){try{let t=e instanceof URL?e:new URL(e);return B2.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 U2=typeof Symbol=="function"&&Symbol.observable||"@@observable",wI=U2,Mp=()=>Math.random().toString(36).substring(7).split("").join("."),$2={INIT:`@@redux/INIT${Mp()}`,REPLACE:`@@redux/REPLACE${Mp()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Mp()}`},Do=$2;function _I(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 G2(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(V2(e))return"date";if(H2(e))return"error";let r=W2(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 W2(e){return typeof e.constructor=="function"?e.constructor.name:null}function H2(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function V2(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function oo(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=G2(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: '${oo(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: '${oo(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,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: '${oo(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(!_I(b))throw new Error(process.env.NODE_ENV==="production"?Pt(7):`Actions must be plain objects. Instead, the actual type was: '${oo(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: '${oo(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: '${oo(b)}`);n=b,f({type:Do.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: '${oo(g)}'`);function m(){let S=g;S.next&&S.next(u())}return m(),{unsubscribe:b(m)}},[wI](){return this}}}return f({type:Do.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[wI]:h}}function kI(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function q2(e,t,r,n){let o=Object.keys(t),a=r&&r.type===Do.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(!_I(e))return`The ${a} has unexpected type of "${oo(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===Do.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 j2(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Do.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:Do.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 '${Do.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"&&kI(`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{j2(r)}catch(i){a=i}return function(s={},l){if(a)throw a;if(process.env.NODE_ENV!=="production"){let d=q2(s,r,l,o);d&&kI(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 z2(...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=z2(...s)(o.dispatch),{...o,dispatch:a}}}var CI=le(Ir());me();var K2=(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}},Z2=(e="",t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return t.hash;case"PROFILE_REMOTELY_DELETED":return"";default:return e}},J2=(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}},Y2=(e=null,t)=>t.type==="CHANGE_PROFILES_TO_COMPARE"?t.profiles:e,EI=(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 ro.includes(e)?e:"calltree";default:return e}},X2=(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}},Q2=(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(CI.oneLine`
633
+ `)}function $2(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 G2(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 W2(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 V2=["localhost","127.0.0.1","::1"];function oo(e){try{let t=e instanceof URL?e:new URL(e);return V2.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 j2=typeof Symbol=="function"&&Symbol.observable||"@@observable",EI=j2,Mp=()=>Math.random().toString(36).substring(7).split("").join("."),q2={INIT:`@@redux/INIT${Mp()}`,REPLACE:`@@redux/REPLACE${Mp()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Mp()}`},Bo=q2;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 z2(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(J2(e))return"date";if(Z2(e))return"error";let r=K2(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 K2(e){return typeof e.constructor=="function"?e.constructor.name:null}function Z2(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function J2(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=z2(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 Y2(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 X2(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{X2(r)}catch(i){a=i}return function(s={},l){if(a)throw a;if(process.env.NODE_ENV!=="production"){let d=Y2(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 Q2(...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=Q2(...s)(o.dispatch),{...o,dispatch:a}}}var PI=ce(Ir());xe();var eB=(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}},tB=(e="",t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return t.hash;case"PROFILE_REMOTELY_DELETED":return"";default:return e}},rB=(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}},nB=(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}},oB=(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}},aB=(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`
624
634
  Unable to map an old thread index to a new thread index for the selected
625
635
  thread when sanitizing a profile
626
- `),null;n.add(i)}return n}default:return e}},eB=(e="",t)=>t.type==="CHANGE_CALL_TREE_SEARCH_STRING"?t.searchString:e,tB=(e="",t)=>t.type==="CHANGE_MARKER_SEARCH_STRING"?t.searchString:e,rB=(e="",t)=>t.type==="CHANGE_NETWORK_SEARCH_STRING"?t.searchString:e,nB=(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?HS(o,r.oldThreadIndexToNew):o;i!==null&&(n[i]=Pp(a,r))}return n}default:return e}},oB=(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}},aB=(e="combined",t)=>{switch(t.type){case"PROFILE_LOADED":return t.implementationFilter||e;case"CHANGE_IMPLEMENTATION_FILTER":return t.implementation;default:return e}},iB=(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,lB=(e=!1,t)=>t.type==="CHANGE_SHOW_USER_TIMINGS"?t.showUserTimings:e,cB=(e=!1,t)=>t.type==="CHANGE_STACK_CHART_SAME_WIDTHS"?t.stackChartSameWidths:e,uB=(e=!1,t)=>t.type==="CHANGE_SHOW_JS_TRACER_SUMMARY"?t.showSummary:e,dB=(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}},fB=(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}},pB=(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}},hB=(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}},mB=(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}},gB=(e=null,t)=>t.type==="CHANGE_TAB_FILTER"?t.tabID:e,yB=(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}},bB=(e=null,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"CHANGE_PROFILE_NAME":return t.profileName;default:return e}},TB=(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}},SB=(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 xB(){let e={};return to.forEach(t=>e[t]=!1),e}var IB=(e=xB(),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}},vB=(e=null)=>e,wB=(e={},t)=>{if(t.type==="CHANGE_SELECTED_MARKER"){let{threadsKey:r,selectedMarker:n}=t;return{...e,[r]:n}}else return e},AI=_t({selectedThreads:Q2,implementation:aB,lastSelectedCallTreeSummaryStrategy:iB,invertCallstack:sB,showUserTimings:lB,stackChartSameWidths:cB,committedRanges:X2,callTreeSearchString:eB,markersSearchString:tB,networkSearchString:rB,transforms:nB,sourceView:TB,assemblyView:SB,isBottomBoxOpenPerPanel:IB,timelineType:oB,globalTrackOrder:dB,hiddenGlobalTracks:fB,hiddenLocalTracksByPid:pB,localTrackOrderByPid:hB,localTrackOrderChangedPids:mB,showJsTracerSummary:uB,tabFilter:gB,selectedMarkers:wB,legacyThreadOrder:(e=null)=>e,legacyHiddenThreads:(e=null)=>e}),kB=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:AI(void 0,r),selectedTab:EI(void 0,r)};default:return e(t,r)}},_B=kB(_t({dataSource:K2,hash:Z2,profileUrl:J2,profilesToCompare:Y2,selectedTab:EI,pathInZipFile:yB,profileSpecific:AI,profileName:bB,symbolServerUrl:vB})),ou=_B;function CB(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 EB(e){let t=e.product||"",r=Lp(CB(e.misc));return t+(r?" "+r:"")}function AB(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 NI(e){let t=EB(e),r=AB(e);return t+(r?` \u2013 ${r}`:"")}var ao=e=>e.urlState,It=e=>ao(e).profileSpecific,PI=e=>ao(e).dataSource;var RI=e=>ao(e).profileUrl;var MI=e=>ao(e).profileName,dr=e=>It(e).committedRanges,Dp=e=>It(e).implementation,FI=e=>It(e).lastSelectedCallTreeSummaryStrategy;var io=e=>It(e).sourceView.sourceIndex;var Ua=e=>{let{nativeSymbols:t,currentNativeSymbol:r}=It(e).assemblyView;return r!==null?t[r]:null};var Bp=e=>It(e).callTreeSearchString,NB=e=>It(e).markersSearchString,PB=e=>It(e).networkSearchString,$a=e=>ao(e).selectedTab,Cs=e=>$a(e)==="calltree"&&It(e).invertCallstack,Up=e=>It(e).selectedThreads,rt=e=>G(Up(e),"Attempted to get a thread index before a profile was loaded.");var OI=e=>It(e).legacyThreadOrder,LI=e=>It(e).legacyHiddenThreads,$p=e=>It(e).globalTrackOrder,Cn=e=>It(e).hiddenGlobalTracks,so=e=>It(e).hiddenLocalTracksByPid,DI=e=>It(e).localTrackOrderByPid,BI=e=>It(e).tabFilter;var Gp=(0,kr.createSelector)(Bp,Po),RB=(0,kr.createSelector)(NB,Po),MB=(0,kr.createSelector)(PB,Po),R8=(0,kr.createSelector)(Gp,Ro),UI=(0,kr.createSelector)(RB,ks),$I=(0,kr.createSelector)(MB,ks),FB=[],Bo=(e,t)=>It(e).transforms[t]||FB,GI=(e,t)=>It(e).selectedMarkers[t]??null;var M8=(0,kr.createSelector)(ao,e=>t=>{let n=(Array.isArray(t)?t:[t]).reduce(ou,e);return Rp(n)}),OB=e=>ao(e).pathInZipFile,LB=e=>{let{profile:t}=e.profileView;return t?NI(t.meta):null},WI=(0,kr.createSelector)(OB,e=>e?vI(e):null),HI=(0,kr.createSelector)(MI,WI,LB,(e,t,r)=>e||t||r||"Untitled profile"),F8=(0,kr.createSelector)(MI,WI,(e,t)=>e||t||"");function DB(e){try{let t=new URL(e);return no(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 VI=(0,kr.createSelector)(ao,({symbolServerUrl:e})=>!e||!DB(e)?us: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 Wa(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}}me();tr();tr();var Uo=class e extends Error{library;errors;constructor(t,r,...n){super([t,...n.map(o=>` - ${o.name}: ${o.message}`)].join(`
627
- `)),this.__proto__=e.prototype,this.name="SymbolsNotFoundError",this.library=r,this.errors=n}};ur();function BB(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 UB(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 $B(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 GB(e,t,r,n){let o=e.get(r);if(o===void 0)return;n({libSymbolicationInfo:o,resultsForLib:t})}function WB(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=HB(s,f,n,a,i);let l=WB(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 HB(e,t,r,n,o){let{frameTable:a,funcTable:i,nativeSymbols:s,stringArray:l,sources:c}=e,u=Ue.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 M of h)a.inlineDepth[M]>0?(w.push(M),n[M]=1):k.push(M);for(let M of k){let R=a.nativeSymbol[M],P=a.address[M],$=f.get(P);if($===void 0)if(R!==null){let re=u.getString(s.name[R]);$={symbolAddress:s.address[R],name:re}}else $={symbolAddress:P,name:`0x${P.toString(16)}`};let z=$.symbolAddress;if(S.set(M,z),I.set(z,$),R!==null&&!v.has(z)&&T.has(R)){let re=R;T.delete(re),v.set(z,re)}}let E=T.values(),A=QT(s);for(let[M,R]of I){let P=u.indexForString(R.name),$=v.get(M);$===void 0&&($=E.next().value,$===void 0&&($=A.length,A.libIndex[$]=g,A.length++),v.set(M,$)),A.address[$]=M,A.name[$]=P,A.functionSize[$]=R.functionSize??null}let F=a.nativeSymbol.slice();for(let[M,R]of S){let P=v.get(R);if(P===void 0)throw new Error("Impossible, all symbolAddresses have a canonical symbol at this point.");F[M]=P}let W=Oc({...a,nativeSymbol:F}),U=Ca(i),K=m.values(),J=new Map,Oe=w.values(),L=[];for(let M of k){let R=a.func[M],P=F[M];if(P===null)throw new Error("Impossible, all frames now have native symbols.");let $=a.address[M],z=f.get($);if(z===void 0){let ve=A.name[P],ge=null,be=U.source[R];be!==null&&(ge=c.filename[be]),z={symbolAddress:A.address[P],name:u.getString(ve),file:ge!==null?u.getString(ge):void 0,line:a.line[M]??void 0}}let re=z.inlines?z.inlines.slice():[];re.push({name:z.name,file:z.file,line:z.line}),re.reverse();let ae=[],Ee=[];for(let ve=0;ve<re.length;ve++){let ge=re[ve],be=u.indexForString(ge.name),Ae=ge.file!==void 0?u.indexForString(ge.file):null,H=`${be}:${Ae??""}`,X=J.get(H);if(X===void 0){if(X=K.next().value,X===void 0&&(X=U.length,U.isJS[X]=U.isJS[R],U.relevantForJS[X]=U.relevantForJS[R],U.resource[X]=p,U.source[X]=null,U.lineNumber[X]=null,U.columnNumber[X]=null,U.length++),U.name[X]=be,Ae!==null){let ee=null;for(let Te=0;Te<c.filename.length;Te++)if(c.filename[Te]===Ae&&c.id[Te]===null){ee=Te;break}ee===null&&(ee=c.filename.length,c.filename.push(Ae),c.id.push(null),c.startLine.push(1),c.startColumn.push(1),c.sourceMapURL.push(null),c.length++),U.source[X]=ee}else U.source[X]=null;J.set(H,X)}Ee.push(X);let Z;if(ve===0)Z=M;else{Z=Oe.next().value,Z===void 0&&(Z=W.length,W.length++);let ee=W.category[M],Te=W.subcategory[M],Le=W.innerWindowID[M];W.category[Z]=ee,W.subcategory[Z]=Te,W.innerWindowID[Z]=Le,W.address[Z]=$,W.nativeSymbol[Z]=P}W.inlineDepth[Z]=ve,W.func[Z]=X,W.line[Z]=ge.line??null,W.column[Z]=null,ae.push(Z)}ae.length>1&&o.set(M,ae),L.push([R,Ee.join("#")])}let Q=BB(L);for(let[M,R]of Q)r.set(M,R.split("#").map(P=>+P));return{...e,frameTable:W,funcTable:U,nativeSymbols:A}}async function zI(e,t,r,n){let o=UB(e.shared,e.libs),a=$B(o);await t.getSymbols(a,(i,s)=>{let{debugName:l,breakpadId:c}=i,u=`${l}/${c}`;GB(o,s,u,r)},(i,s)=>{if(!(s instanceof Uo))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)}me();var VB=(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}},qB=(e=[],t)=>{switch(t.type){case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return t.globalTracks;default:return e}},jB=(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}},zB=(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 KB=(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(rS(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===ct(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=>Ap(y,n,o,a)).filter(y=>y.length>0))},s=function(h){return Ap(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=Np(r,o,h):(o!=="combined"&&(h=Np(r,o,h)),h=pI(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}},KI={fixedColumnWidths:null};function ZB(e,t,r){let n={...e};return n[t]={...e[t]??KI,...r},n}var JB=(e={},t)=>t.type==="CHANGE_TABLE_VIEW_OPTIONS"?ZB(e,t.tab,t.tableViewOptions):e,YB=(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}},XB=(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}},QB=(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}},eU=(e=0,t)=>t.type==="FOCUS_CALL_TREE"?e+1:e,tU=(e={start:0,end:1},t)=>t.type==="PROFILE_LOADED"?Zf(t.profile):e,rU=(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}},nU=(e=null,t)=>t.type==="CHANGE_RIGHT_CLICKED_TRACK"?t.trackReference:e,oU=(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}},aU=(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}},iU=(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,lU=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)}},cU=lU(_t({viewOptions:_t({perThread:KB,symbolicationStatus:zB,waitingForLibs:YB,previewSelection:XB,scrollToSelectionGeneration:QB,focusCallTreeGeneration:eU,rootRange:tU,lastNonShiftClick:rU,rightClickedTrack:nU,rightClickedCallNode:oU,rightClickedMarker:aU,hoveredMarker:iU,mouseTimePosition:sU,perTab:JB}),profile:VB,globalTracks:qB,localTracksByPid:jB})),ZI=cU;ur();var iu=e=>e.profileView,Gr=e=>iu(e).viewOptions;var fr=e=>Gr(e).rootRange;var uU=e=>fr(e).start,dU=e=>{let{sampleUnits:t}=fe(e).meta;return t?t.time:"ms"},pr=(0,he.createSelector)(fr,uU,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}),i5=(0,he.createSelector)(dr,dU,Hx);var $o=e=>Gr(e).previewSelection;var s5=(0,he.createSelector)(pr,$o,(e,t)=>t?{start:t.selectionStart,end:t.selectionEnd}:e),Es=e=>iu(e).profile,fe=e=>G(Es(e),"Tried to access the profile before it was loaded."),Ct=e=>fe(e).shared,Go=e=>fe(e).meta.interval,Vp=e=>fe(e).pages||null,_r=e=>ut(e).findIndex(t=>t.color==="grey"),Wt=e=>fe(e).threads;var fU=e=>Gr(e).rightClickedTrack,qp=e=>fe(e).counters||null,Wo=e=>fe(e).meta;var pU=e=>Wo(e).markerSchema,As=e=>Wo(e).sampleUnits,hU=e=>Wo(e).extensions,ut=(0,he.createSelector)(fe,e=>{let{categories:t}=e.meta;return t||zf()}),Rt=(0,he.createSelector)(e=>Ct(e).stringArray,e=>Ue.withBackingArray(e)),su=(0,he.createSelector)(e=>Ct(e).stackTable,e=>Ct(e).frameTable,ut,_r,Kc),mU=(0,he.createSelector)(e=>Ct(e).funcTable,e=>Ct(e).resourceTable,OS),JI=e=>mU(e).funcTable;var En=e=>Ct(e).sources,Cr=(0,he.createSelector)(pU,e=>{let t=new Set([...Tp.map(r=>r.name)]);return[...e.filter(r=>!t.has(r.name)),...Tp]}),ft=(0,he.createSelector)(Cr,e=>{let t=Object.create(null);for(let r of e)t[r.name]=r;return t});var YI=(0,he.createSelector)([Wt,Ct],xp),gU=(0,he.createSelector)(Vp,e=>{if(!e)return null;let t=new Map;for(let r of e)t.set(r.innerWindowID,r);return t}),yU=(0,he.createSelector)(Vp,e=>{if(!e)return null;let t=new Map;for(let r of e)t.set(r.innerWindowID,r.tabID);return t}),jp=(0,he.createSelector)(Wt,yU,(e,t)=>ZS(e,t)),An=e=>iu(e).globalTracks,l5=(0,he.createSelector)(An,e=>e.map((t,r)=>({type:"global",trackIndex:r}))),XI=(0,he.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 Nn=e=>iu(e).localTracksByPid;var c5=(0,he.createSelector)(Nn,e=>{let t=new Set;for(let[r,n]of e.entries())n.some(o=>o.type==="memory")&&t.add(r);return t}),u5=(0,he.createSelector)(fU,An,Nn,(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=G(r.get(n),"No local tracks found at that pid.")[o];return i.type==="thread"?i.threadIndex:null}),d5=(0,he.createSelector)(An,Wt,(e,t)=>e.map(r=>gx(r,t)));var f5=(0,he.createSelector)(Nn,Wt,Ct,qp,(e,t,r,n)=>{let o=new Map;for(let[a,i]of e)o.set(a,i.map(s=>yx(s,t,r,n||[])));return o});var p5=(0,he.createSelector)(An,Nn,so,Cn,(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,he.createSelector)(fe,dS),zp=(0,he.createSelector)(fe,lu,(e,t)=>{let{threads:r}=e;return r.map(n=>bx(e,n,t))}),QI=(0,he.createSelector)(fe,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})}),ev=(0,he.createSelector)(fe,su,As,lu,_r,(e,t,r,n,o)=>e.threads.map(a=>zc(a.samples,t,r,n,o))),bU=(0,he.createSelector)(ev,e=>op(e)),TU=(0,he.createSelector)(ev,pr,(e,t)=>op(e,t.start,t.end)),h5=(0,he.createSelector)(bU,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)}),tv=(0,he.createSelector)(TU,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)}),rv=(0,he.createSelector)(Vp,gU,(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,he.createSelector)(rv,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}),SU=(0,he.createSelector)(hU,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}),xU=(0,he.createSelector)(rv,SU,WS),g5=(0,he.createSelector)(xU,jp,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}),y5=(0,he.createSelector)(Wt,e=>{let t=new Map;for(let r of e)t.set(r.tid,rr(e,r));return t}),b5=(0,he.createSelector)(Wt,e=>{let t=new Map;for(let r of e)!r.isMainThread||!r.pid||t.set(r.pid,rr(e,r));return t}),nv=(0,he.createSelector)(fe,e=>{let{threads:t,pages:r}=e;return r&&r.some(a=>a.isPrivateBrowsing)?!0:t.some(o=>o.isPrivateBrowsing)}),T5=(0,he.createSelector)(Wt,e=>{let t=new Set;for(let{tid:r}of e)t.add(r);return t});var S5=(0,he.createSelector)(fe,e=>e.meta.extra||[]),x5=(0,he.createSelector)(En,Rt,io,(e,t,r)=>{if(r===null)return null;let n=e.filename[r];return n!==null?t.getString(n):null}),I5=(0,he.createSelector)(En,io,(e,t)=>t!==null?e.id[t]:null),v5=(0,he.createSelector)(En,io,(e,t)=>t!==null?e.startLine[t]:1);var J3=le(Ir());var Ps=le(Kt());var cu=le(Kt());me();var IU=e=>e.zippedProfiles;var Kp=e=>IU(e).zipFile,vU=e=>Kp(e).zip;var wU=(0,cu.createSelector)(vU,e=>e===null?null:xI(e)),ov=e=>G(wU(e),"Attempted to view a profile from a zip, when there is no zip file loaded."),_5=(0,cu.createSelector)(ov,II),C5=(0,cu.createSelector)(ov,RI,(e,t)=>e===null?null:new nu(e,t));me();cr();var uu=e=>e.app,Zp=e=>uu(e).view;var DU=e=>uu(e).trackThreadHeights;var BU=e=>uu(e).browserConnectionStatus,UU=(0,Ps.createSelector)(BU,e=>e.status==="ESTABLISHED"?e.browserConnection:null);var M5=(0,Ps.createSelector)(An,Nn,Cn,so,DU,(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 oe(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(!G(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 oe(d)}}return a}),F5=(0,Ps.createSelector)(Zp,PI,Kp,(e,t,r)=>{let n=e.phase,o=r.phase;return!(n==="INITIALIZING"&&t!=="none"||o==="PROCESS_PROFILE_FROM_ZIP_FILE")}),O5=(0,Ps.createSelector)(uu,e=>e.sidebarOpenCategories);var Gs=le(Kt()),a_=le(Sa());var Fe=le(Kt()),Uu=le(Sa()),Gk=le(Uf()),Wk=le(vv());var wu=le(Ir());var wv=`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`;me();function Tu(e){let t=-1/0,r;for(let[n,o]of e)o>t&&(t=o,r=n);return r}var ja=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 ja,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 n$={totalLineHits:new Map,selfLineHits:new Map};function xu(e,t){if(e===null)return n$;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 kv(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 ja,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 o$={totalAddressHits:new Map,selfAddressHits:new Map};function vu(e,t){if(e===null)return o$;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 _v(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 Cv(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=IS(e,t,o),y=qS(h,a),b=null,g=jS(n,h,a),m=Tu(g);m!==void 0&&(y.add(m),b=m);let T=[...y];T.sort((A,F)=>A-F),T.length!==0&&b===null&&(b=T[0]);let S=T.map(A=>zS(A,c,a,s)),I=i.lineNumber[u],v=kv(n,h,a,I),w=Tu(v),k=_v(n,h,a,b),E=Tu(k);return{libIndex:p,sourceIndex:d,nativeSymbols:S,initialNativeSymbol:b!==null?T.indexOf(b):null,scrollToLineNumber:w,scrollToInstructionAddress:E,highlightedLineNumber:null,highlightedInstructionAddress:null}}function a$(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=Av(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,g=null;if(f===3)g=b=a$(h);else if(f===2){b=wv;let k=this._thread.resourceTable.name[d];g=this._thread.stringTable.getString(k)}let m=fp(y,this._isHighPrecision,o),T=fp(y,this._isHighPrecision,i),S=`${Yc(a)}`,I,v,w;switch(y){case"tracing-ms":{v=`${m}ms`,w=`${T}ms`,I=wu.oneLine`
636
+ `),null;n.add(i)}return n}default:return e}},iB=(e="",t)=>t.type==="CHANGE_CALL_TREE_SEARCH_STRING"?t.searchString:e,sB=(e="",t)=>t.type==="CHANGE_MARKER_SEARCH_STRING"?t.searchString:e,lB=(e="",t)=>t.type==="CHANGE_NETWORK_SEARCH_STRING"?t.searchString:e,cB=(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}},uB=(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}},dB=(e="combined",t)=>{switch(t.type){case"PROFILE_LOADED":return t.implementationFilter||e;case"CHANGE_IMPLEMENTATION_FILTER":return t.implementation;default:return e}},fB=(e="timing",t)=>t.type==="CHANGE_CALL_TREE_SUMMARY_STRATEGY"?t.callTreeSummaryStrategy:e,pB=(e=!1,t)=>t.type==="CHANGE_INVERT_CALLSTACK"?t.invertCallstack:e,hB=(e=!1,t)=>t.type==="CHANGE_SHOW_USER_TIMINGS"?t.showUserTimings:e,mB=(e=!1,t)=>t.type==="CHANGE_STACK_CHART_SAME_WIDTHS"?t.stackChartSameWidths:e,gB=(e=!1,t)=>t.type==="CHANGE_SHOW_JS_TRACER_SUMMARY"?t.showSummary:e,yB=(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}},bB=(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}},TB=(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}},SB=(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}},xB=(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}},IB=(e=null,t)=>t.type==="CHANGE_TAB_FILTER"?t.tabID:e,vB=(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}},wB=(e=null,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"CHANGE_PROFILE_NAME":return t.profileName;default:return e}},kB=(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}},_B=(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 CB(){let e={};return ro.forEach(t=>e[t]=!1),e}var EB=(e=CB(),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}},NB=(e=null)=>e,AB=(e={},t)=>{if(t.type==="CHANGE_SELECTED_MARKER"){let{threadsKey:r,selectedMarker:n}=t;return{...e,[r]:n}}else return e},MI=_t({selectedThreads:aB,implementation:dB,lastSelectedCallTreeSummaryStrategy:fB,invertCallstack:pB,showUserTimings:hB,stackChartSameWidths:mB,committedRanges:oB,callTreeSearchString:iB,markersSearchString:sB,networkSearchString:lB,transforms:cB,sourceView:kB,assemblyView:_B,isBottomBoxOpenPerPanel:EB,timelineType:uB,globalTrackOrder:yB,hiddenGlobalTracks:bB,hiddenLocalTracksByPid:TB,localTrackOrderByPid:SB,localTrackOrderChangedPids:xB,showJsTracerSummary:gB,tabFilter:IB,selectedMarkers:AB,legacyThreadOrder:(e=null)=>e,legacyHiddenThreads:(e=null)=>e}),PB=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)}},RB=PB(_t({dataSource:eB,hash:tB,profileUrl:rB,profilesToCompare:nB,selectedTab:RI,pathInZipFile:vB,profileSpecific:MI,profileName:wB,symbolServerUrl:NB})),ou=RB;function MB(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 FB(e){let t=e.product||"",r=Lp(MB(e.misc));return t+(r?" "+r:"")}function OB(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=FB(e),r=OB(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,LB=e=>vt(e).markersSearchString,DB=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),BB=(0,kr.createSelector)(LB,Ro),UB=(0,kr.createSelector)(DB,Ro),V8=(0,kr.createSelector)(Gp,Mo),HI=(0,kr.createSelector)(BB,ks),VI=(0,kr.createSelector)(UB,ks),$B=[],Uo=(e,t)=>vt(e).transforms[t]||$B,jI=(e,t)=>vt(e).selectedMarkers[t]??null;var j8=(0,kr.createSelector)(io,e=>t=>{let n=(Array.isArray(t)?t:[t]).reduce(ou,e);return Rp(n)}),GB=e=>io(e).pathInZipFile,WB=e=>{let{profile:t}=e.profileView;return t?FI(t.meta):null},qI=(0,kr.createSelector)(GB,e=>e?CI(e):null),zI=(0,kr.createSelector)(DI,qI,WB,(e,t,r)=>e||t||r||"Untitled profile"),q8=(0,kr.createSelector)(DI,qI,(e,t)=>e||t||"");function HB(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||!HB(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(`
637
+ `)),this.__proto__=e.prototype,this.name="SymbolsNotFoundError",this.library=r,this.errors=n}};ur();function VB(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 jB(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 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 zB(e,t,r,n){let o=e.get(r);if(o===void 0)return;n({libSymbolicationInfo:o,resultsForLib:t})}function KB(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=ZB(s,f,n,a,i);let l=KB(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 ZB(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 R of h)a.inlineDepth[R]>0?(w.push(R),n[R]=1):k.push(R);for(let R of k){let M=a.nativeSymbol[R],P=a.address[R],$=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 Y=$.symbolAddress;if(S.set(R,Y),I.set(Y,$),M!==null&&!v.has(Y)&&T.has(M)){let H=M;T.delete(H),v.set(Y,H)}}let E=T.values(),A=rS(s);for(let[R,M]of I){let P=u.indexForString(M.name),$=v.get(R);$===void 0&&($=E.next().value,$===void 0&&($=A.length,A.libIndex[$]=m,A.length++),v.set(R,$)),A.address[$]=R,A.name[$]=P,A.functionSize[$]=M.functionSize??null}let F=a.nativeSymbol.slice();for(let[R,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[R]=P}let G=Oc({...a,nativeSymbol:F}),B=Ea(i),Z=g.values(),X=new Map,Ee=w.values(),L=[];for(let R of k){let M=a.func[R],P=F[R];if(P===null)throw new Error("Impossible, all frames now have native symbols.");let $=a.address[R],Y=f.get($);if(Y===void 0){let de=A.name[P],ue=null,fe=B.source[M];fe!==null&&(ue=c.filename[fe]),Y={symbolAddress:A.address[P],name:u.getString(de),file:ue!==null?u.getString(ue):void 0,line:a.line[R]??void 0}}let H=Y.inlines?Y.inlines.slice():[];H.push({name:Y.name,file:Y.file,line:Y.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??""}`,re=X.get(V);if(re===void 0){if(re=Z.next().value,re===void 0&&(re=B.length,B.isJS[re]=B.isJS[M],B.relevantForJS[re]=B.relevantForJS[M],B.resource[re]=p,B.source[re]=null,B.lineNumber[re]=null,B.columnNumber[re]=null,B.length++),B.name[re]=fe,be!==null){let ee=null;for(let Te=0;Te<c.filename.length;Te++)if(c.filename[Te]===be&&c.id[Te]===null){ee=Te;break}ee===null&&(ee=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[re]=ee}else B.source[re]=null;X.set(V,re)}se.push(re);let q;if(de===0)q=R;else{q=Ee.next().value,q===void 0&&(q=G.length,G.length++);let ee=G.category[R],Te=G.subcategory[R],Ne=G.innerWindowID[R];G.category[q]=ee,G.subcategory[q]=Te,G.innerWindowID[q]=Ne,G.address[q]=$,G.nativeSymbol[q]=P}G.inlineDepth[q]=de,G.func[q]=re,G.line[q]=ue.line??null,G.column[q]=null,z.push(q)}z.length>1&&o.set(R,z),L.push([M,se.join("#")])}let Q=VB(L);for(let[R,M]of Q)r.set(R,M.split("#").map(P=>+P));return{...e,frameTable:G,funcTable:B,nativeSymbols:A}}async function YI(e,t,r,n){let o=jB(e.shared,e.libs),a=qB(o);await t.getSymbols(a,(i,s)=>{let{debugName:l,breakpadId:c}=i,u=`${l}/${c}`;zB(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 JB=(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}},YB=(e=[],t)=>{switch(t.type){case"VIEW_FULL_PROFILE":case"CHANGE_TAB_FILTER":return t.globalTracks;default:return e}},XB=(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}},QB=(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 eU=(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 tU(e,t,r){let n={...e};return n[t]={...e[t]??XI,...r},n}var rU=(e={},t)=>t.type==="CHANGE_TABLE_VIEW_OPTIONS"?tU(e,t.tab,t.tableViewOptions):e,nU=(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}},oU=(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}},aU=(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}},iU=(e=0,t)=>t.type==="FOCUS_CALL_TREE"?e+1:e,sU=(e={start:0,end:1},t)=>t.type==="PROFILE_LOADED"?Zf(t.profile):e,lU=(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}},cU=(e=null,t)=>t.type==="CHANGE_RIGHT_CLICKED_TRACK"?t.trackReference:e,uU=(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}},dU=(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}},fU=(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}},pU=(e=null,t)=>t.type==="CHANGE_MOUSE_TIME_POSITION"?t.mouseTimePosition:e,hU=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)}},mU=hU(_t({viewOptions:_t({perThread:eU,symbolicationStatus:QB,waitingForLibs:nU,previewSelection:oU,scrollToSelectionGeneration:aU,focusCallTreeGeneration:iU,rootRange:sU,lastNonShiftClick:lU,rightClickedTrack:cU,rightClickedCallNode:uU,rightClickedMarker:dU,hoveredMarker:fU,mouseTimePosition:pU,perTab:rU}),profile:JB,globalTracks:YB,localTracksByPid:XB})),QI=mU;ur();var iu=e=>e.profileView,Gr=e=>iu(e).viewOptions;var fr=e=>Gr(e).rootRange;var gU=e=>fr(e).start,yU=e=>{let{sampleUnits:t}=ge(e).meta;return t?t.time:"ms"},pr=(0,Se.createSelector)(fr,gU,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}),b5=(0,Se.createSelector)(dr,yU,qx);var Go=e=>Gr(e).previewSelection;var T5=(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 bU=e=>Gr(e).rightClickedTrack,jp=e=>ge(e).counters||null,Ho=e=>ge(e).meta;var TU=e=>Ho(e).markerSchema,Ns=e=>Ho(e).sampleUnits,SU=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),xU=(0,Se.createSelector)(e=>Ct(e).funcTable,e=>Ct(e).resourceTable,BS),ev=e=>xU(e).funcTable;var An=e=>Ct(e).sources,Cr=(0,Se.createSelector)(TU,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),IU=(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}),vU=(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,vU,(e,t)=>XS(e,t)),Pn=e=>iu(e).globalTracks,S5=(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 x5=(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}),I5=(0,Se.createSelector)(bU,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}),v5=(0,Se.createSelector)(Pn,Wt,(e,t)=>e.map(r=>Tx(r,t)));var w5=(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 k5=(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))),wU=(0,Se.createSelector)(ov,e=>op(e)),kU=(0,Se.createSelector)(ov,pr,(e,t)=>op(e,t.start,t.end)),_5=(0,Se.createSelector)(wU,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)(kU,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,IU,(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}),C5=(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}),_U=(0,Se.createSelector)(SU,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}),CU=(0,Se.createSelector)(iv,_U,jS),E5=(0,Se.createSelector)(CU,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}),N5=(0,Se.createSelector)(Wt,e=>{let t=new Map;for(let r of e)t.set(r.tid,nr(e,r));return t}),A5=(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)}),P5=(0,Se.createSelector)(Wt,e=>{let t=new Set;for(let{tid:r}of e)t.add(r);return t});var R5=(0,Se.createSelector)(ge,e=>e.meta.extra||[]),M5=(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}),F5=(0,Se.createSelector)(An,so,(e,t)=>t!==null?e.id[t]:null),O5=(0,Se.createSelector)(An,so,(e,t)=>t!==null?e.startLine[t]:1);var nG=ce(Ir());var Ps=ce(Kt());var cu=ce(Kt());xe();var EU=e=>e.zippedProfiles;var Kp=e=>EU(e).zipFile,NU=e=>Kp(e).zip;var AU=(0,cu.createSelector)(NU,e=>e===null?null:kI(e)),lv=e=>W(AU(e),"Attempted to view a profile from a zip, when there is no zip file loaded."),B5=(0,cu.createSelector)(lv,_I),U5=(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 HU=e=>uu(e).trackThreadHeights;var VU=e=>uu(e).browserConnectionStatus,jU=(0,Ps.createSelector)(VU,e=>e.status==="ESTABLISHED"?e.browserConnection:null);var j5=(0,Ps.createSelector)(Pn,Rn,Nn,lo,HU,(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}),q5=(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")}),z5=(0,Ps.createSelector)(uu,e=>e.sidebarOpenCategories);var Gs=ce(Kt()),c_=ce(xa());var Le=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 c$={totalLineHits:new Map,selfLineHits:new Map};function xu(e,t){if(e===null)return c$;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 u$={totalAddressHits:new Map,selfAddressHits:new Map};function vu(e,t){if(e===null)return u$;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((A,F)=>A-F),T.length!==0&&b===null&&(b=T[0]);let S=T.map(A=>JS(A,c,a,s)),I=i.lineNumber[u],v=Nv(n,h,a,I),w=Tu(v),k=Av(n,h,a,b),E=Tu(k);return{libIndex:p,sourceIndex:d,nativeSymbols:S,initialNativeSymbol:b!==null?T.indexOf(b):null,scrollToLineNumber:w,scrollToInstructionAddress:E,highlightedLineNumber:null,highlightedInstructionAddress:null}}function d$(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=d$(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`
628
638
  ${n},
629
639
  running time is ${v} (${S}),
630
640
  self time is ${w}
631
- `;break}case"samples":{v=o===1?`${m} sample`:`${m} samples`,w=i===1?`${T} sample`:`${T} samples`,I=wu.oneLine`
641
+ `;break}case"samples":{v=o===1?`${g} sample`:`${g} samples`,w=i===1?`${T} sample`:`${T} samples`,I=wu.oneLine`
632
642
  ${n},
633
643
  running count is ${v} (${S}),
634
644
  self count is ${w}
635
- `;break}case"bytes":{v=`${m} bytes`,w=`${T} bytes`,I=wu.oneLine`
645
+ `;break}case"bytes":{v=`${g} bytes`,w=`${T} bytes`,I=wu.oneLine`
636
646
  ${n},
637
647
  total size is ${v} (${S}),
638
648
  self size is ${w}
639
- `;break}default:throw oe(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:DS(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 bs(t,this._thread.funcTable,this._thread.resourceTable,this._thread.stringTable,this._thread.sources)}getBottomBoxInfoForCallNode(t){return Cv(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 Ev(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=G(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=G(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}=Av(e,n,a);return{self:0,total:s}}default:throw oe(r,"callTreeTimings.type")}}function Av(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 i$(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:i$(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 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),!xt(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 l$(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 Nv(e,t,{callNodeSelf:r,rootTotalSummary:n},o){let a=l$(e,r,o),{funcTotal:i,sortedFuncs:s}=s$(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(G(t.asInverted()),i),i.rootTotalSummary,!!e.isJsTracer,a)}default:throw oe(o,"Unhandled CallTreeTimings type.")}})}function ih(e,t){switch(t){case"timing":return e.samples;case"js-allocations":return G(e.jsAllocations,'Expected the NativeAllocationTable to exist when using a "js-allocation" strategy');case"native-retained-allocations":{let r=G(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 GS(r)}case"native-allocations":return BS(G(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-allocations" strategy'));case"native-deallocations-sites":return US(G(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-deallocations-sites" strategy'));case"native-deallocations-memory":{let r=G(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 $S(G(r,'Expected the NativeAllocationTable to exist when using a "js-allocation" strategy'))}default:throw oe(t)}}function Pv(e,t){switch(t){case"timing":return e.samples;case"js-allocations":return G(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 G(e.nativeAllocations,'Expected the NativeAllocationTable to exist when using a "native-allocation" strategy');default:throw oe(t)}}function Rv(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 Mv(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}}tr();ur();me();function Ov({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 Lv(e,t){let r=[],n=Ov(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 Dv(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 c$(e,t,r,n,o){let a={...wa(),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=Ov(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 U=`${I}:${k}:${w}`,K=m.get(U);K!=null&&(E=K,h.set(S,E))}if(E===null){let U=h.get(S);U===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=U}let A=f[d];for(;A!==null;){let U=p[d];if(v<=U)break;A=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 W=u.length++;u.frame.push(F),u.prefix.push(A),y.set(T,W),d++,d===0&&(d=1),f[d]=T,p[d]=v}return{thread:s,stackMap:y}}function u$(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 Bv(e,t,r,n){let o=u$(r),a=Ue.withBackingArray(t.stringArray),{thread:i,stackMap:s}=c$(e,t,a,o,n);return i.samples=d$(a,o,s),i}function d$(e,t,r){let o=(f,p)=>Math.abs(f-p)<1e-5,a=wa(),i=[];a.weight=i;function s(f,p,h){if(o(p,h))return;let y=G(r.get(f),"The JS tracer event did not exist in the stack map.");a.stack.push(y),G(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}me();async function Uv(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 p$(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 $v(e){return"fromBase64"in Uint8Array?Uint8Array.fromBase64(e).buffer:p$(e)}tr();me();cr();ur();tr();var an=class{_libs=[];_libKeyToLibIndex=new Map;_stringArray=[];_stringTable=Ue.withBackingArray(this._stringArray);_sources=Na();_frameTable=ka();_stackTable=nn();_funcTable=_a();_resourceTable=Ea();_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 h$(e){return{name:"CpuProfile",args:{data:{cpuProfile:e}},cat:"other",pid:0,tid:0,ts:0,ph:"I"}}function Gv(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(h$(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 b$(n,t)}function Ls(e,t,r){let n=e.get(t);return n?n.find(r):void 0}function m$(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=Pa();s.pid=`${o.pid}`,s.tid=a,s.processType="unknown",s.name="Chrome Thread";let l=Ls(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=Ls(r,"process_name",g=>g.pid===o.pid);c&&(s.processName=c.args.name);let u=Ls(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=Ls(r,"process_sort_index",g=>g.pid===o.pid),f=0;d&&(f=d.args.sort_index);let p=Ls(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 g$(e){switch(e.name){case"ProfileChunk":return e.args.data.timeDeltas;case"CpuProfile":return e.args.data.cpuProfile.timeDeltas;default:return}}function y$(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 b$(e,t){let r=No();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=y$(G(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:g,pid:m}=f;b=m$(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=g$(g);if(!I)continue;let{samples:v}=h;if(T){let w=new Map;for(let k of T){let{callFrame:E,id:A}=k,F;if(k.parent!==void 0?F=k.parent:F=w.get(A),k.children!==void 0){let re=k.children;for(let ae=0;ae<re.length;ae++)w.set(re[ae],A)}let{url:W,lineNumber:U,columnNumber:K}=E;U===-1&&(U=void 0),K===-1&&(K=void 0),U!==void 0&&U++,K!==void 0&&K++,W===""&&(W=void 0);let{functionName:J}=E,{category:Oe,isJS:L,relevantForJS:Q}=l(J,W!==void 0||U!==void 0),N=o.indexForString(J!==""?J:"(anonymous)"),M=L&&W?n.indexForSource(null,W):null,R=L?n.indexForURIResource(W||"<unknown>"):-1,P=n.indexForFunc(N,L,Q,R,M,U===void 0?null:U,K===void 0?null:K),$=A-1,z=y.get(F);if(z===void 0)throw new Error("Unable to find the prefix stack index from a node index.");a.address[$]=-1,a.category[$]=Oe,a.subcategory[$]=0,a.func[$]=P,a.nativeSymbol[$]=null,a.innerWindowID[$]=0,a.line[$]=U===void 0?null:U,a.column[$]=K===void 0?null:K,a.length=Math.max(a.length,$+1),i.frame.push($),i.prefix.push(z),y.set(A,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=G(y.get(k),"Could not find the stack information for a sample when decoding a Chrome profile.");G(v.eventDelay,"Could not find the eventDelay in samplesTable inside the newly created Chrome profile thread.").push(null),v.stack.push(E),G(v.time).push(p.lastSampledTime),v.length++}}}}if(x$(i),await T$(c,u,e,r,e.get("Screenshot")??[],o),I$(c,u,e,r,o),r.meta.profilingStartTime===void 0&&r.meta.profilingEndTime===void 0&&e.has("TracingStartedInBrowser")){let f=G(e.get("TracingStartedInBrowser"))[0];if(f.ts!==void 0&&Number.isFinite(f.ts)){let p=-1/0;r.threads.forEach(h=>{let y=Ma(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 T$(e,t,r,n,o,a){if(o.length===0)return;let{thread:i}=sh(e,t,r,n,o[0]),s=G(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 S$(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 S$(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 x$(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 I$(e,t,r,n,o){let a=G(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=G(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,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++}}}tr();me();function Wv(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=No();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,E=null,A=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,A=F[5]?Number(F[5]):null);let W=`${v} ${w}`,U=u.get(W);U===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(A),U=s.length++,u.set(W,U)),c.address.push(k),c.line.push(E),c.column.push(A),c.category.push(d),c.subcategory.push(f),c.innerWindowID.push(null),c.nativeSymbol.push(null),c.inlineDepth.push(0),c.func.push(U),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 A=v.fs[E]+1,F=G(c.func[A],"Expected to find a funcIndex from a frameIndex");w=l.length;let W=S.get(k);if(W)for(let U of W){let K=l.frame[U];if(c.func[K]===F){w=U;break}}w===l.length&&(l.frame.push(A),l.prefix.push(k),W?W.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=Pa();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 _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)}}};tr();me();lh();function Hv(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 v$=0;function zv(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:v$;if(n===61)return e;if(n>61)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 ${61}.
640
- You can try refreshing this page in case profiler.firefox.com has updated in the meantime.`);for(let a=n+1;a<=61;a++)a in jv&&jv[a](e,t);let o=e;return o.meta.preprocessedProfileVersion=61,o}function w$(e){return e==="x86_64-gcc3"?"x86_64":e}function k$(e){if(e){let t=e.split(" -> ");return t[t.length-1]}return e}function Vv(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 qv(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)Hv(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=w$(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=Ue.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=k$(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=>{Vv(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=Ue.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=Ue.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=>{Vv(e)},22:e=>{for(let t of e.threads){let{stringArray:r}=t,n=Ue.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=>{qv(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){qv(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=Ue.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=Ue.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:""}`,A=n.get(E);A===void 0&&(A=l.length++,n.set(E,A),l.type[A]=I,l.lib[A]=v,l.name[A]=w,l.host[A]=k),T[S]=A}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],A=E!==-1?T[E]:-1,F=m.source[I],W=m.lineNumber[I],U=m.columnNumber[I],K=`${v}-${w}-${k}-${A}-${F!==null?F:""}-${W!==null?W:""}-${U!==null?U:""}`,J=r.get(K);J===void 0&&(J=s.length++,r.set(K,J),s.name[J]=v,s.isJS[J]=w,s.relevantForJS[J]=k,s.resource[J]=A,s.source[J]=F,s.lineNumber[J]=W,s.columnNumber[J]=U),S[I]=J}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)}}};ur();cr();var _$=0;function Kv(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 Jv(e){let t=Kv(e).version||_$;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}.
641
- 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 Zv&&Zv[r](e);Kv(e).version=34}}function C$(e){return e==="x86_64-gcc3"?"x86_64":e}var Zv={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=C$(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=Ue.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=Ue.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 Yv(e){if(e.startsWith(`# ========
649
+ `;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 f$(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:f$(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 p$(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 h$(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=h$(e,r,o),{funcTotal:i,sortedFuncs:s}=p$(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 m$(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],E=null;if(w!==null&&k!==null){let B=`${I}:${k}:${w}`,Z=g.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 A=f[d];for(;A!==null;){let B=p[d];if(v<=B)break;A=f[d],d--}let F=c.length++;c.address.push(b),c.inlineDepth.push(0),c.category.push(m),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(A),y.set(T,G),d++,d===0&&(d=1),f[d]=T,p[d]=v}return{thread:s,stackMap:y}}function g$(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=g$(r),a=$e.withBackingArray(t.stringArray),{thread:i,stackMap:s}=m$(e,t,a,o,n);return i.samples=y$(a,o,s),i}function y$(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 T$(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:T$(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 S$(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(S$(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 w$(n,t)}function Ls(e,t,r){let n=e.get(t);return n?n.find(r):void 0}function x$(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 I$(e){switch(e.name){case"ProfileChunk":return e.args.data.timeDeltas;case"CpuProfile":return e.args.data.cpuProfile.timeDeltas;default:return}}function v$(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 w$(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=v$(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=x$(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=I$(m);if(!I)continue;let{samples:v}=h;if(T){let w=new Map;for(let k of T){let{callFrame:E,id:A}=k,F;if(k.parent!==void 0?F=k.parent:F=w.get(A),k.children!==void 0){let H=k.children;for(let z=0;z<H.length;z++)w.set(H[z],A)}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:Ee,isJS:L,relevantForJS:Q}=l(X,G!==void 0||B!==void 0),N=o.indexForString(X!==""?X:"(anonymous)"),R=L&&G?n.indexForSource(null,G):null,M=L?n.indexForURIResource(G||"<unknown>"):-1,P=n.indexForFunc(N,L,Q,M,R,B===void 0?null:B,Z===void 0?null:Z),$=A-1,Y=y.get(F);if(Y===void 0)throw new Error("Unable to find the prefix stack index from a node index.");a.address[$]=-1,a.category[$]=Ee,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(Y),y.set(A,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(C$(i),await k$(c,u,e,r,e.get("Screenshot")??[],o),E$(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 k$(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);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 _$(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 C$(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 E$(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,E=null,A=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,A=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(A),B=s.length++,u.set(G,B)),c.address.push(k),c.line.push(E),c.column.push(A),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 E=v.fs.length-1;E>=0;E--){let A=v.fs[E]+1,F=W(c.func[A],"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(A),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 E=Ra();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 _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 N$=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:N$;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}.
650
+ 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 A$(e){return e==="x86_64-gcc3"?"x86_64":e}function P$(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=A$(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=P$(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],E=h.length;h.frame.push(k),h.category.push(S),h.subcategory.push(I),h.prefix.push(w),h.length++,y.set(g,E)}}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],E=`${I}-${v!==null?v:""}-${w}-${k!==null?k:""}`,A=n.get(E);A===void 0&&(A=l.length++,n.set(E,A),l.type[A]=I,l.lib[A]=v,l.name[A]=w,l.host[A]=k),T[S]=A}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],E=g.resource[I],A=E!==-1?T[E]:-1,F=g.source[I],G=g.lineNumber[I],B=g.columnNumber[I],Z=`${v}-${w}-${k}-${A}-${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]=A,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],E=k!==null?S[k]:null;i.nativeSymbol[w]=E,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],E=k!==null?k+S:null;a.frame[v]=w,a.prefix[v]=E}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 R$=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||R$;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}.
651
+ 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 M$(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=M$(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(`# ========
642
652
  `))return!0;if(e.startsWith("{"))return!1;let t=e.substring(0,e.indexOf(`
643
- `));return/^\S.*?\s+(?:\d+\/)?\d+\s+(?:\[\d+\]\s+)?[\d.]+:/.test(t)}var E$=[{name:"User",color:"yellow",subcategories:["Other"]},{name:"Kernel",color:"orange",subcategories:["Other"]}],A$=0,N$=1;function Xv(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)")?N$:A$;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((A,F)=>{let W=T(F);return g(W,A)},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(`
644
- `),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:E$,markerSchema:[]},libs:[],threads:s,processes:[],pausedRanges:[]}}tr();me();function Qv(e){return e.startsWith("{")?!1:!!e.substring(0,e.indexOf(`
645
- `)).match(/[^;]*(?:;[^;]*)* [0-9]+/)}var P$=[{name:"Java",color:"yellow",subcategories:["Other"]},{name:"Native",color:"blue",subcategories:["Other"]}],R$=0,M$=1;function ew(e){let t=No();t.meta.product="Flamegraph",t.meta.categories=P$;let r=new an,n=r.getStringTable(),o=Pa({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=M$;b.endsWith("_[j]")&&(T=R$);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),G(s.time).push(b),s.length++}let p=e.split(`
646
- `),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 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 tw(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 rw(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 nw(e){if(e<1||e>3)throw new Error(`This code only knows how to parse versions 1 to 3, got version ${e}.`)}function ow(e,t){if(e!==t)throw new Error(`Error: version number mismatch; got ${t} in summary but ${e} in data section`)}function aw(e){let t=e.getLine();if(t!=="*version")throw new Error("Expected *version, got "+t);let r=+e.getLine();nw(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 F$(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 iw(e){let[t,r,n,o]=e.split(" ");return{methodId:+t,className:r,methodName:n,signature:o}}function O$(e){let t=[],r="";for(;r=e.getLine(),!(!r||r.startsWith("*"));)t.push(iw(r));return{methods:t,lineAfterMethods:r}}function sw(e,t){switch(t){case 1:return 9;case 2:return 10;default:return e.getU16()}}function lw(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 L$(e){let{summaryVersion:t,summaryDetails:r,lineAfterSummary:n}=aw(e);if(n!=="*threads")throw new Error("Expected *threads, got "+n);let{threads:o,lineAfterThreads:a}=F$(e);if(a!=="*methods")throw new Error("Expected *methods, got "+a);let{methods:i,lineAfterMethods:s}=O$(e);if(s!=="*end")throw new Error("Expected *end, got "+s);let l=e.curPos(),c=e.getU32();rw(c);let u=e.getU16();ow(u,t);let d=e.getU16(),f=e.getU64(),p=sw(e,u);e.setCurPos(l+d);let{clock:h}=r,y=[];for(;!e.eof();)y.push(lw(e,u,p,h));return{summaryDetails:r,threads:o,methods:i,methodActions:y,startTimeInUsecSinceBoot:f}}function D$(e){let t=e.curPos(),r=e.getU32();rw(r);let n=e.getU16()^240;nw(n);let o=e.getU16(),a=e.getU64(),i=sw(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(iw(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=aw(new Eu(g));ow(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(lw(e,n,i,d));return{summaryDetails:u,threads:l,methods:s,methodActions:f,startTimeInUsecSinceBoot:a}}function B$(e){try{let t=new Eu(e);switch(tw(e)){case"regular":return L$(t);case"streaming":return D$(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 U$(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 $$(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=$$(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 cw(e){return tw(e)!=="unrecognized"}function uw(e){let t=B$(e),r=U$(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: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 uh(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:[]}}cr();var dh=le(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 jo(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 X$(e){if(e){let t=e.split(" -> ");return t[t.length-1]}return e}function Q$(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 e3(e){let t="non-virtual thunk to ";return e.startsWith&&e.startsWith(t)?e.substr(t.length):e}function t3(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=G(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=r3(s,f,p);m!==null?(b=m.funcIndex,g=m.frameAddress):(b=n3(s,f),b===null&&(b=o3(s,f),b===null&&(b=a3(o,p,h)))),s.stringToNewFuncIndexAndFrameAddress.set(f,{funcIndex:b,frameAddress:g}),l.push(b),c.push(g)}return{frameFuncs:l,frameAddresses:c}}function r3(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 n3(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=e3(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 o3(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=X$(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],A=o.data[g][I],F=o.data[g][v];f=n.indexForSource(w,k,E,A,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 a3(e,t,r){return e.indexForFunc(t,!1,r,-1,null,null,null)}function i3(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 l3(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 _k(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 c3(e,t,r,n,o){let a=Ur(),i=eS(),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(G(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(_k(h,o)),i.length++;continue}case"Native allocation":{d===void 0&&(d="memoryAddress"in h),s.time.push(G(e.startTime[p],"Native Allocations are assumed to have a startTime")),s.weight.push(h.size),s.stack.push(_k(h,o)),s.length++,d&&(l.push(G(h.memoryAddress,"Could not find the memoryAddress property on a gecko marker payload.")),c.push(G(h.threadId,"Could not find a threadId property on a gecko marker payload.")));continue}default:}let y=u3(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 Ck(e){let t={};for(let r in e)t[r]=e[r]*1e3;return t}function u3(e,t,r,n,o){if(!e)return null;let a=l3(e,o);switch(a.type){case"GCSlice":{let{times:c,...u}=a.timings;return{type:"GCSlice",timings:{...u,phase_times:c?Ck(c):{}}}}case"GCMajor":{let c=a.timings;switch(c.status){case"completed":{let{totals:u,...d}=c;return{type:"GCMajor",timings:{...d,phase_times:Ck(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 Mk(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 d3(e,t){let r={stack:e.stack.map(n=>n!==null?n+t:null),timeDeltas:Mk(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 Ek(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=jo(d),p=f3(f);return s.push({name:l,category:c,description:u,pid:a,mainThreadIndex:i,samples:Fk(p,r)}),s},[])}function f3(e){return{timeDeltas:Mk(e.time),number:e.number,count:e.count,length:e.length}}function Ak(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:h3(jo(n.samples),r),pid:a,mainThreadIndex:i,statistics:n.statistics}}function Nk(e,t,r,n){let o=jo(e.frameTable),a=jo(e.stackTable),i=jo(e.samples),s=jo(Q$(e.markers)),{libs:l,pausedRanges:c,meta:u,sources:d}=t,{shutdownTime:f}=u,{frameFuncs:p,frameAddresses:h}=t3(o.location,o.relevantForJS,e.stringTable,l,n,d),y=i3(o,n.getFrameTable(),p,h),b=s3(a,n.getStackTable(),y),{markers:g,jsAllocations:m,nativeAllocations:T}=c3(s,e.stringTable,r,n,b),S=d3(i,b),I,v=new Set;for(let E=0;E<o.length;E++){let A=o.innerWindowID[E];A!==null&&A!==0&&v.add(A)}for(let E=0;E<g.length;E++){let A=g.data[E];if(!A||!("innerWindowID"in A))continue;let F=A.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:A}=t,F=n.getStringTable();if(E&&A){let W=new Array(A.length);for(let K=0;K<A.length;K++)W[K]=F.indexForString(A[K]);let U=E.events.slice();for(let K=0;K<U.length;K++){let J=U[K];U[K]=W[J]}w.jsTracer={...E,events:U}}}return k(),w}function Pk(e,t){return{...e,time:e.time.map(r=>r+t)}}function Fk(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 p3(e,t){let r=t*1e3;return{...e,timestamps:e.timestamps.map(n=>n+r)}}function h3(e,t){return{...e,time:e.time.map(r=>r/1e3+t)}}function Ok(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=aS(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 Rk(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 m3(e){let t=e.meta.markerSchema.map(Rk),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(Rk(o)));return t}function g3(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 Lk(t)}function Lk(e){Jv(e);let t=[],r=m3(e),n=vs(r),o=e.meta.extensions?jo(e.meta.extensions):ds(),a=new an;a.addExtensionOrigins(o);for(let g of e.threads)t.push(Nk(g,e,n,a));let i=Ek(e,t,0),s=[Ak(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=Nk(T,g,n,a);S.samples=Fk(S.samples,m),S.markers=Ok(S.markers,m),S.jsTracer&&(S.jsTracer=p3(S.jsTracer,m)),S.jsAllocations&&(S.jsAllocations=Pk(S.jsAllocations,m)),S.nativeAllocations&&(S.nativeAllocations=Pk(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(...Ek(g,t,m)),s.push(Ak(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:61,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=rr(t,g),S=Bv(g,y,m,e.meta.categories);S.isJsTracer=!0,S.name=`JS Tracer of ${T}`,t.push(S),delete g.jsTracer}}return c.visualMetrics&&b3(t,c,l,p),VS({meta:c,libs:h,pages:l,counters:i,profilerOverhead:u,shared:y,threads:t,profilingLog:d,profileGatheringLog:f})}function y3(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)),cw(l))e=uw(l);else if(Cu(Ds,l)){let{convertSimpleperfTraceProfile:c}=await Promise.resolve().then(()=>(kk(),wk));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"&&(Yv(e)?e=Xv(e):Qv(e)?e=ew(e):e=JSON.parse(e));let n=e,o=y3(n),a=zv(o,r);if(a)return a;let i=Gv(n,t);if(i)return i;let s=Wv(n);return s||g3(n)}catch(n){throw console.error("UnserializationError:",n),new Error(`Unserializing the profile failed: ${n}`)}}function b3(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=T3(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 T3(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}tr();me();ur();function Dk(e){let t=S3(e),r=x3(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 S3(e){let t=e.map(i=>i.samples),r=t.map(ys),n=Array(t.length).fill(0),o=[],a={...wa(),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]),G(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 x3(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 qk=le(Oh()),E3=(0,Uu.default)(_S,{limit:2}),A3=(0,Uu.default)(CS,{limit:2});function Hk(e,t){let r=e.size===1?G(In(e)):null,n=(0,Fe.createSelector)(fe,L=>Dk([...e].map(Q=>L.threads[Q]))),o=L=>r!==null?fe(L).threads[r]:n(L),a=(0,Fe.createSelector)(L=>o(L).tracedValuesBuffer,L=>L?$v(L):void 0),i=L=>o(L).samples,s=(0,Fe.createSelector)(i,su,As,lu,_r,zc),l=(0,Fe.createSelector)(s,L=>L.hasCPUDeltas?Wa([.05,.2,.4,.6,.8],Float64Array.from(L.threadCPUPercent.subarray(0,L.length),Q=>Q/100),L.time):null),c=L=>o(L).nativeAllocations,u=L=>o(L).jsAllocations,d=L=>Ma(o(L),Go(L)),f=L=>i(L).weightType||"samples",p=(0,Fe.createSelector)(o,s,su,L=>Ct(L).frameTable,JI,L=>Ct(L).nativeSymbols,L=>Ct(L).resourceTable,Rt,En,a,RS),h=(0,Fe.createSelector)(p,pr,(L,Q)=>{let{start:N,end:M}=Q;return Qf(L,N,M)}),y=(0,Fe.createSelector)(h,L=>{let Q=L.samples;return Q.hasCPUDeltas?Wa([.05,.2,.4,.6,.8],Float64Array.from(Q.threadCPUPercent.subarray(0,Q.length),N=>N/100),Q.time):null}),b=(0,Fe.createSelector)(p,FI,(L,Q)=>{switch(Q){case"timing":if(L.samples.length===0&&L.nativeAllocations&&L.nativeAllocations.length>0)return"native-allocations";break;case"js-allocations":if(!L.jsAllocations)return"timing";break;case"native-allocations":case"native-retained-allocations":case"native-deallocations-sites":case"native-deallocations-memory":if(!L.nativeAllocations)return"timing";break;default:oe(Q,"Unhandled call tree sumary strategy.")}return Q}),g=(0,Fe.createSelector)(p,b,Pv),m=(0,Fe.createSelector)(p,g,_r,Rv),T=(0,Fe.createSelector)(g,pr,(L,{start:Q,end:N})=>vn(L,Q,N)),S=(0,Fe.createSelector)(s,pr,(L,{start:Q,end:N})=>{let[M]=vn(L,Q,N);return M}),I=(0,Fe.createSelector)(Wt,o,rr),v=(0,Fe.createSelector)(o,I,FS),w=L=>Gr(L).perThread[t]||Hp,k=(0,Fe.createSelector)(s,Ct,(L,Q)=>Qn(L.stack,Q)),E=(0,Fe.createSelector)(u,Ct,(L,Q)=>Qn(L==null?void 0:L.stack,Q)),A=(0,Fe.createSelector)(c,Ct,(L,Q)=>Qn(L==null?void 0:L.stack,Q)),F=L=>{let Q=c(L);return Q?"memoryAddress"in Q:!1},W=L=>p(L).jsTracer||null,U=(0,Fe.createSelector)(W,Ct,(L,Q)=>L===null?null:Lv(L,Q)),K=(0,Fe.createSelector)(W,Rt,(L,Q)=>L===null?null:Dv(L,Q)),J=(0,Fe.createSelector)(s,Go,(L,Q)=>L===null||L.eventDelay===void 0?null:NS(L,Q));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:W,getExpensiveJsTracerTiming:U,getExpensiveJsTracerLeafTiming:K,getHasUsefulTimingSamples:k,getHasUsefulJsAllocations:E,getHasUsefulNativeAllocations:A,getCanShowRetainedMemory:F,getProcessedEventDelays:L=>G(J(L),"Could not get the processed event delays"),getCallTreeSummaryStrategy:b}}function Vk(e,t){let r=(0,Uu.default)(hI,{cache:new Gk.default}),n=b=>Bo(b,t),o=(0,Fe.createSelector)(e.getRangeFilteredThread,n,e.getMarkerGetter,e.getFullMarkerListIndexes,ft,ut,(b,g,m,T,S,I)=>g.reduce((v,w)=>r(v,w,m,T,S,I),b)),a=(0,Fe.createSelector)(o,Dp,(b,g)=>{let m=E3(b.stackTable,b.frameTable,b.funcTable,b.stringTable,g);return Xn(m,b)}),i=(0,Fe.createSelector)(a,Gp,(b,g)=>{let m=A3(b.stackTable,b.frameTable,b.funcTable,b.resourceTable,b.sources,b.stringTable,g);return Xn(m,b)}),s=(0,Fe.createSelector)(i,$o,(b,g)=>{if(!g)return b;let{selectionStart:m,selectionEnd:T}=g;return Qf(b,m,T)}),l=(0,Fe.createSelector)(i,e.getCallTreeSummaryStrategy,ih),c=(0,Fe.createSelector)(l,b=>b.length!==0&&b.stack.some(g=>g!==null)),u=(0,Fe.createSelector)(s,e.getCallTreeSummaryStrategy,ih),d=(0,Fe.createSelector)(u,b=>b.length!==0&&b.stack.some(g=>g!==null)),f=(0,Fe.createSelector)(l,$o,e.getFilteredCtssSampleIndexOffsets,(b,g,m)=>{if(!g)return m;let[T]=m,[S,I]=vn(b,g.selectionStart,g.selectionEnd);return[T+S,T+I]}),p=(0,Fe.createSelector)(e.getUnfilteredCtssSampleCategoriesAndSubcategories,f,({sampleCategories:b,sampleSubcategories:g},[m,T])=>({sampleCategories:b.subarray(m,T),sampleSubcategories:g.subarray(m,T)})),h=(0,Fe.createSelector)(Wo,o,e.getFriendlyThreadName,n,uI),y=(0,Fe.createSelector)(h,b=>b.map(g=>(0,qk.jsx)(Wk.Localized,{id:g.l10nId,vars:{item:g.item}},g.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 ye=le(Kt()),Zk=le(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 zk=le(Kt());var Kk=(0,zk.createSelector)(Gr,e=>e.rightClickedMarker);function Jk(e,t){let o=(0,ye.createSelector)(H=>e.getThread(H).markers,H=>fe(H).shared.stringArray,H=>e.getThread(H).tid,e.getThreadRange,YI,Ip),a=(0,ye.createSelector)(o,({markers:H})=>H),i=(0,ye.createSelector)(o,({markerIndexToRawMarkerIndexes:H})=>H),s=(0,ye.createSelector)(e.getSamplesTable,_r,(H,X)=>Kx(H,50,X)),l=(0,ye.createSelector)(a,s,(H,X)=>[...H,...X].sort((Z,ee)=>Z.start-ee.start)),c=H=>l(H).length,u=(0,ye.createSelector)(l,H=>X=>{let Z=H[X];if(!Z)throw new Error(Zk.stripIndent`
647
- Tried to get marker index ${X} but it's not in the full list.
653
+ `));return/^\S.*?\s+(?:\d+\/)?\d+\s+(?:\[\d+\]\s+)?[\d.]+:/.test(t)}var F$=[{name:"User",color:"yellow",subcategories:["Other"]},{name:"Kernel",color:"orange",subcategories:["Other"]}],O$=0,L$=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)")?L$:O$;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((A,F)=>{let G=T(F);return m(G,A)},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(`
654
+ `),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:F$,markerSchema:[]},libs:[],threads:s,processes:[],pausedRanges:[]}}rr();xe();function nw(e){return e.startsWith("{")?!1:!!e.substring(0,e.indexOf(`
655
+ `)).match(/[^;]*(?:;[^;]*)* [0-9]+/)}var D$=[{name:"Java",color:"yellow",subcategories:["Other"]},{name:"Native",color:"blue",subcategories:["Other"]}],B$=0,U$=1;function ow(e){let t=Po();t.meta.product="Flamegraph",t.meta.categories=D$;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=U$;b.endsWith("_[j]")&&(T=B$);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(`
656
+ `),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 $$(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 G$(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 W$(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}=$$(e);if(a!=="*methods")throw new Error("Expected *methods, got "+a);let{methods:i,lineAfterMethods:s}=G$(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 H$(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 V$(e){try{let t=new Eu(e);switch(aw(e)){case"regular":return W$(t);case"streaming":return H$(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 j$(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 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=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}},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=V$(e),r=j$(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 o3(e){if(e){let t=e.split(" -> ");return t[t.length-1]}return e}function a3(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 i3(e){let t="non-virtual thunk to ";return e.startsWith&&e.startsWith(t)?e.substr(t.length):e}function s3(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=l3(s,f,p);g!==null?(b=g.funcIndex,m=g.frameAddress):(b=c3(s,f),b===null&&(b=u3(s,f),b===null&&(b=d3(o,p,h)))),s.stringToNewFuncIndexAndFrameAddress.set(f,{funcIndex:b,frameAddress:m}),l.push(b),c.push(m)}return{frameFuncs:l,frameAddresses:c}}function l3(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 c3(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=i3(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 u3(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=o3(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],E=o.data[m][S],A=o.data[m][I],F=o.data[m][v];f=n.indexForSource(w,k,E,A,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 d3(e,t,r){return e.indexForFunc(t,!1,r,-1,null,null,null)}function f3(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 p3(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 h3(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 m3(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=g3(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 g3(e,t,r,n,o){if(!e)return null;let a=h3(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 y3(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 b3(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=T3(f);return s.push({name:l,category:c,description:u,pid:a,mainThreadIndex:i,samples:Bk(p,r),display:b3(c,l)}),s},[])}function T3(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:x3(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(a3(e.markers)),{libs:l,pausedRanges:c,meta:u,sources:d}=t,{shutdownTime:f}=u,{frameFuncs:p,frameAddresses:h}=s3(o.location,o.relevantForJS,e.stringTable,l,n,d),y=f3(o,n.getFrameTable(),p,h),b=p3(a,n.getStackTable(),y),{markers:m,jsAllocations:g,nativeAllocations:T}=m3(s,e.stringTable,r,n,b),S=y3(i,b),I,v=new Set;for(let E=0;E<o.length;E++){let A=o.innerWindowID[E];A!==null&&A!==0&&v.add(A)}for(let E=0;E<m.length;E++){let A=m.data[E];if(!A||!("innerWindowID"in A))continue;let F=A.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:E}=e,{jsTracerDictionary:A}=t,F=n.getStringTable();if(E&&A){let G=new Array(A.length);for(let Z=0;Z<A.length;Z++)G[Z]=F.indexForString(A[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 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 S3(e,t){let r=t*1e3;return{...e,timestamps:e.timestamps.map(n=>n+r)}}function x3(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 I3(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 v3(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=I3(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=S3(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&&k3(t,c,l,p),zS({meta:c,libs:h,pages:l,counters:i,profilerOverhead:u,shared:y,threads:t,profilingLog:d,profileGatheringLog:f})}function w3(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=w3(n),a=Yv(o,r);if(a)return a;let i=jv(n,t);if(i)return i;let s=qv(n);return s||v3(n)}catch(n){throw console.error("UnserializationError:",n),new Error(`Unserializing the profile failed: ${n}`)}}function k3(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=_3(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 _3(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=C3(e),r=E3(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 C3(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 E3(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()),O3=(0,Uu.default)(NS,{limit:2}),L3=(0,Uu.default)(AS,{limit:2});function zk(e,t){let r=e.size===1?W(vn(e)):null,n=(0,Le.createSelector)(ge,L=>Gk([...e].map(Q=>L.threads[Q]))),o=L=>r!==null?ge(L).threads[r]:n(L),a=(0,Le.createSelector)(L=>o(L).tracedValuesBuffer,L=>L?Vv(L):void 0),i=L=>o(L).samples,s=(0,Le.createSelector)(i,su,Ns,lu,_r,zc),l=(0,Le.createSelector)(s,L=>L.hasCPUDeltas?Wa([.05,.2,.4,.6,.8],Float64Array.from(L.threadCPUPercent.subarray(0,L.length),Q=>Q/100),L.time):null),c=L=>o(L).nativeAllocations,u=L=>o(L).jsAllocations,d=L=>Fa(o(L),Wo(L)),f=L=>i(L).weightType||"samples",p=(0,Le.createSelector)(o,s,su,L=>Ct(L).frameTable,ev,L=>Ct(L).nativeSymbols,L=>Ct(L).resourceTable,Rt,An,a,OS),h=(0,Le.createSelector)(p,pr,(L,Q)=>{let{start:N,end:R}=Q;return Qf(L,N,R)}),y=(0,Le.createSelector)(h,L=>{let Q=L.samples;return Q.hasCPUDeltas?Wa([.05,.2,.4,.6,.8],Float64Array.from(Q.threadCPUPercent.subarray(0,Q.length),N=>N/100),Q.time):null}),b=(0,Le.createSelector)(p,BI,(L,Q)=>{switch(Q){case"timing":if(L.samples.length===0&&L.nativeAllocations&&L.nativeAllocations.length>0)return"native-allocations";break;case"js-allocations":if(!L.jsAllocations)return"timing";break;case"native-allocations":case"native-retained-allocations":case"native-deallocations-sites":case"native-deallocations-memory":if(!L.nativeAllocations)return"timing";break;default:ae(Q,"Unhandled call tree sumary strategy.")}return Q}),m=(0,Le.createSelector)(p,b,Ov),g=(0,Le.createSelector)(p,m,_r,Lv),T=(0,Le.createSelector)(m,pr,(L,{start:Q,end:N})=>wn(L,Q,N)),S=(0,Le.createSelector)(s,pr,(L,{start:Q,end:N})=>{let[R]=wn(L,Q,N);return R}),I=(0,Le.createSelector)(Wt,o,nr),v=(0,Le.createSelector)(o,I,DS),w=L=>Gr(L).perThread[t]||Hp,k=(0,Le.createSelector)(s,Ct,(L,Q)=>eo(L.stack,Q)),E=(0,Le.createSelector)(u,Ct,(L,Q)=>eo(L==null?void 0:L.stack,Q)),A=(0,Le.createSelector)(c,Ct,(L,Q)=>eo(L==null?void 0:L.stack,Q)),F=L=>{let Q=c(L);return Q?"memoryAddress"in Q:!1},G=L=>p(L).jsTracer||null,B=(0,Le.createSelector)(G,Ct,(L,Q)=>L===null?null:$v(L,Q)),Z=(0,Le.createSelector)(G,Rt,(L,Q)=>L===null?null:Gv(L,Q)),X=(0,Le.createSelector)(s,Wo,(L,Q)=>L===null||L.eventDelay===void 0?null:MS(L,Q));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:E,getHasUsefulNativeAllocations:A,getCanShowRetainedMemory:F,getProcessedEventDelays:L=>W(X(L),"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,Le.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,Le.createSelector)(o,Dp,(b,m)=>{let g=O3(b.stackTable,b.frameTable,b.funcTable,b.stringTable,m);return Qn(g,b)}),i=(0,Le.createSelector)(a,Gp,(b,m)=>{let g=L3(b.stackTable,b.frameTable,b.funcTable,b.resourceTable,b.sources,b.stringTable,m);return Qn(g,b)}),s=(0,Le.createSelector)(i,Go,(b,m)=>{if(!m)return b;let{selectionStart:g,selectionEnd:T}=m;return Qf(b,g,T)}),l=(0,Le.createSelector)(i,e.getCallTreeSummaryStrategy,ih),c=(0,Le.createSelector)(l,b=>b.length!==0&&b.stack.some(m=>m!==null)),u=(0,Le.createSelector)(s,e.getCallTreeSummaryStrategy,ih),d=(0,Le.createSelector)(u,b=>b.length!==0&&b.stack.some(m=>m!==null)),f=(0,Le.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,Le.createSelector)(e.getUnfilteredCtssSampleCategoriesAndSubcategories,f,({sampleCategories:b,sampleSubcategories:m},[g,T])=>({sampleCategories:b.subarray(g,T),sampleSubcategories:m.subarray(g,T)})),h=(0,Le.createSelector)(Ho,o,e.getFriendlyThreadName,n,hI),y=(0,Le.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,re)=>Yx(V,50,re)),l=(0,Ie.createSelector)(a,s,(V,re)=>[...V,...re].sort((q,ee)=>q.start-ee.start)),c=V=>l(V).length,u=(0,Ie.createSelector)(l,V=>re=>{let q=V[re];if(!q)throw new Error(Qk.stripIndent`
657
+ Tried to get marker index ${re} but it's not in the full list.
648
658
  This is a programming error.
649
- `);return Z}),d=(0,ye.createSelector)(l,H=>H.map((X,Z)=>Z)),f=H=>(X,Z)=>eu(X,Z,H),p=(0,ye.createSelector)(u,d,pr,(H,X,Z)=>{let{start:ee,end:Te}=Z;return vp(H,X,ee,Te)}),h=(0,ye.createSelector)(u,p,Cr,ft,()=>"timeline-overview",Oo),y=(0,ye.createSelector)(u,p,f(Yx)),b=(0,ye.createSelector)(u,p,s,(H,X,Z)=>{let ee=Z.length>0?"Jank":"BHR-detected hang";return f(Te=>!!(Te.data&&Te.data.type===ee))(H,X)}),g=(0,ye.createSelector)(u,p,ft,UI,Rt,ut,ws),m=(0,ye.createSelector)(u,g,$o,(H,X,Z)=>{if(!Z)return X;let{selectionStart:ee,selectionEnd:Te}=Z;return vp(H,X,ee,Te)}),T=(0,ye.createSelector)(l,H=>H.every(X=>!Ba(X))),S=(0,ye.createSelector)(u,p,f(Ba)),I=(0,ye.createSelector)(u,p,f(Jx)),v=(0,ye.createSelector)(u,S,ft,$I,Rt,ut,ws),w=(0,ye.createSelector)(l,H=>H.every(X=>Ba(X))),k=(0,ye.createSelector)(u,g,Cr,ft,(H,X,Z,ee)=>Oo(H,X,Z,ee,"marker-chart",wp(ee))),E=(0,ye.createSelector)(u,m,Cr,ft,(H,X,Z,ee)=>Oo(H,X,Z,ee,"marker-table",wp(ee))),A=(0,ye.createSelector)(u,Cr,ft,ut,Rt,()=>"tooltipLabel",eo),F=(0,ye.createSelector)(u,Cr,ft,ut,Rt,()=>"tableLabel",eo),W=(0,ye.createSelector)(u,Cr,ft,ut,Rt,()=>"chartLabel",eo),U=(0,ye.createSelector)(u,Cr,ft,ut,Rt,()=>"copyLabel",eo),K=(0,ye.createSelector)(u,ft,Rt,zx),J=(0,ye.createSelector)(u,k,ut,jk),Oe=(0,ye.createSelector)(u,p,Cr,ft,()=>"timeline-fileio",()=>Xx,Oo),L=(0,ye.createSelector)(u,p,Cr,ft,()=>"timeline-memory",Oo),Q=(0,ye.createSelector)(u,p,Cr,ft,()=>"timeline-ipc",Oo),N=(0,ye.createSelector)(u,S,()=>null,$u),M=(0,ye.createSelector)(u,I,()=>null,$u),R=(0,ye.createSelector)(u,p,Qx),P=(0,ye.createSelector)(c,H=>GI(H,t),(H,X)=>X===null||X>=H?null:X),$=H=>{let X=u(H),Z=P(H);return Z===null?null:X(Z)},z=H=>e.getViewOptions(H).selectedNetworkMarker,re=H=>{let X=u(H),Z=z(H);return Z===null?null:X(Z)},ae=(0,ye.createSelector)(Kk,H=>H!==null&&H.threadsKey===t?H.markerIndex:null),Ee=(0,ye.createSelector)(u,ae,(H,X)=>typeof X=="number"?H(X):null),ve=(0,ye.createSelector)(Gr,({hoveredMarker:H})=>H!==null&&H.threadsKey===t?H.markerIndex:null),ge={},be=(H,X)=>{let Z=H.name;return ge[Z]||(ge[Z]={}),ge[Z][X]||(ge[Z][X]=Ae(H,X)),ge[Z][X]};function Ae(H,X){let Z=(0,ye.createSelector)(l,Rt,(Le,Ze)=>{if(H.graphs===void 0)throw new Error(`No graphs for marker ${X}. This shouldn't happen.`);let st=[],Qe=[],{graphs:br,name:Xt}=H,jt=br.map(mt=>(Qe.push([]),mt.key)),Ot=Ze.getString(X);return Le.forEach((mt,zt)=>{let Lt=mt.data;if(Lt&&mt.name===Ot&&Lt.type===Xt&&jt.every(Qt=>Qt in Lt)){st.push(zt);for(let Qt=0;Qt<jt.length;++Qt){let Tr=Lt[jt[Qt]];Qe[Qt].push(Tr)}}}),{numbersPerLine:Qe,markerIndexes:st}}),ee=(0,ye.createSelector)(Z,pr,u,(Le,Ze,st)=>Xf({time:Le.markerIndexes.map(Qe=>st(Qe).start),length:Le.markerIndexes.length},Ze.start,Ze.end)),Te=(0,ye.createSelector)(Z,ee,(Le,Ze)=>{let[st,Qe]=Ze,{numbersPerLine:br}=Le;if(st>=Qe)return{minNumber:0,maxNumber:0};let Xt=1/0,jt=-1/0;for(let Ot=st;Ot<Qe;Ot++)for(let mt=0;mt<br.length;mt++){let zt=br[mt][Ot];zt<Xt&&(Xt=zt),zt>jt&&(jt=zt)}return{minNumber:Xt,maxNumber:jt}});return{getCollectedCustomMarkerSamples:Z,getCommittedRangeMarkerSampleRange:ee,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:W,getMarkerTooltipLabelGetter:A,getMarkerTableLabelGetter:F,getMarkerLabelToCopyGetter:U,getMarkerSearchTermGetter:K,getMarkerChartTimingAndBuckets:J,getCommittedRangeFilteredMarkerIndexes:p,getTimelineOverviewMarkerIndexes:h,getTimelineVerticalMarkerIndexes:y,getTimelineFileIoMarkerIndexes:Oe,getTimelineMemoryMarkerIndexes:L,getTimelineIPCMarkerIndexes:Q,getNetworkTrackTiming:N,getRangeFilteredScreenshotsById:R,getSearchFilteredMarkerIndexes:g,getPreviewFilteredMarkerIndexes:m,getSelectedMarkerIndex:P,getSelectedMarker:$,getSelectedNetworkMarkerIndex:z,getSelectedNetworkMarker:re,getIsNetworkChartEmptyInFullRange:T,getUserTimingMarkerIndexes:I,getUserTimingMarkerTiming:M,getRightClickedMarkerIndex:ae,getRightClickedMarker:Ee,getHoveredMarkerIndex:ve,getMarkerTrackSelectors:be}}var _e=le(Kt());function Yk(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 Xk(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=cS(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 Qk(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 e_=le(Kt());var t_=(0,e_.createSelector)(Gr,e=>e.rightClickedCallNode);var Lh=le(Sa()),r_=(0,_e.createSelectorCreator)(_e.defaultMemoize,{maxSize:2}),M3=(0,Lh.default)(xS,{limit:2}),F3=(0,Lh.default)(Vc,{limit:2});function n_(e,t){let r=(0,_e.createSelector)(e.getThread,Go,(P,$)=>{let{time:z}=P.samples;return z.length===0?null:{start:z[0],end:z[z.length-1]+$}}),n=r_(P=>e.getFilteredThread(P).stackTable,P=>e.getFilteredThread(P).frameTable,_r,M3),o=r_(n,_r,P=>e.getFilteredThread(P).funcTable.length,F3),a=P=>Cs(P)?o(P):n(P),i=P=>n(P).getCallNodeTable(),s=(0,_e.createSelector)(i,kS),l=(0,_e.createSelector)(e.getFilteredThread,io,({stackTable:P,frameTable:$,funcTable:z},re)=>re===null?null:Su(P,$,z,re)),c=(0,_e.createSelector)(e.getFilteredThread,Ua,({nativeSymbols:P},$)=>$===null?null:P.address.findIndex((z,re)=>z===$.address&&P.libIndex[re]===$.libIndex)),u=(0,_e.createSelector)(e.getFilteredThread,c,({stackTable:P,frameTable:$,funcTable:z},re)=>re===null?null:Iu(P,$,z,re)),d=(0,_e.createSelector)(e.getViewOptions,Cs,(P,$)=>$?P.selectedInvertedCallNodePath:P.selectedNonInvertedCallNodePath),f=(0,_e.createSelector)(a,d,(P,$)=>P.getCallNodeIndexFromPath($)),p=(0,_e.createSelector)(e.getViewOptions,Cs,(P,$)=>$?P.expandedInvertedCallNodePaths:P.expandedNonInvertedCallNodePaths),h=(0,_e.createSelector)(a,p,(P,$)=>Array.from($).map(z=>P.getCallNodeIndexFromPath(z))),y=(0,_e.createSelector)(P=>e.getPreviewFilteredCtssSamples(P).stack,P=>a(P).getStackIndexToNonInvertedCallNodeIndex(),qc),b=(0,_e.createSelector)(P=>e.getFilteredCtssSamples(P).stack,P=>a(P).getStackIndexToNonInvertedCallNodeIndex(),qc),g=(0,_e.createSelector)(P=>e.getFilteredThread(P).samples.stack,P=>a(P).getStackIndexToNonInvertedCallNodeIndex(),qc),m=(0,_e.createSelector)(g,a,f,(P,$,z)=>vS($,P,z)),T=(0,_e.createSelector)(g,a,LS),S=(0,_e.createSelector)(e.getFilteredCtssSamples,a,PS),I=(0,_e.createSelector)(e.getUnfilteredCtssSamples,P=>P.weightType||"samples"),v=(0,_e.createSelector)(e.getPreviewFilteredCtssSamples,y,a,(P,$,z)=>ku(P,$,z.getCallNodeTable().length)),w=(0,_e.createSelector)(a,v,Fs),k=(0,_e.createSelector)(a,v,ah),E=(0,_e.createSelector)(i,s,v,P=>e.getFilteredThread(P).funcTable.length,Nv),A=(0,_e.createSelector)(e.getFilteredThread,a,ut,e.getPreviewFilteredCtssSamples,w,I,En,Os),F=(0,_e.createSelector)(e.getFilteredThread,o,ut,e.getPreviewFilteredCtssSamples,E,I,(P,$,z,re,ae,Ee)=>Os(P,$,z,re,{type:"FUNCTION_LIST",timings:ae},Ee)),W=(0,_e.createSelector)(l,e.getPreviewFilteredCtssSamples,xu),U=(0,_e.createSelector)(u,e.getPreviewFilteredCtssSamples,vu),K=(0,_e.createSelector)(e.getPreviewFilteredCtssSamples,y,a,Go,(P,$,z,re)=>{let ae=Mv(P,$,z.getCallNodeTable().length,re);return ae===null?null:Fs(z,ae)}),J=(0,_e.createSelector)(f,a,K,(P,$,z)=>P===null||z===null?null:Ev(P,$,z)),Oe=(0,_e.createSelector)(e.getFilteredCtssSamples,b,a,S,Go,Yk),L=P=>Oe(P).timings,Q=P=>Oe(P).sameWidthsIndexToTimestampMap,N=(0,_e.createSelector)(P=>a(P).getCallNodeTable(),P=>e.getFilteredThread(P).funcTable,P=>e.getFilteredThread(P).stringTable,Xk),M=(0,_e.createSelector)(N,P=>a(P).getCallNodeTable(),k,Qk),R=(0,_e.createSelector)(t_,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:A,getFunctionListTree:F,getSourceViewLineTimings:W,getAssemblyViewAddressTimings:U,getTracedTiming:K,getTracedSelfAndTotalForSelectedCallNode:J,getStackTimingByDepth:L,getSameWidthsIndexToTimestampMap:Q,getFilteredCallNodeMaxDepthPlusOne:S,getFlameGraphTiming:M,getRightClickedCallNodeIndex:R}}var Dh=le(Kt());function o_(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=to;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=>Qn(f==null?void 0:f.stack,n))||(s=s.filter(f=>!ro.includes(f))),s}),r=(0,Dh.createSelector)(e.getUserTimingMarkerTiming,e.getStackTimingByDepth,(n,o)=>[...n,...o]);return{getUsefulTabs:t,getCombinedTimingRows:r}}me();var Bh={},O3=(0,a_.default)(e=>{let t=new Set((""+e).split(",").map(r=>+r));return s_(t,e)},{limit:5}),i_=e=>{if(e in Bh)return Bh[e];let r=s_(new Set([e]));return Bh[e]=r,r},vt=e=>{let t=null,r=null;return typeof e=="number"?t=e:r=e,t!==null?i_(t):(r=G(r),Uh(ct(r),r))},Uh=(e,t=new Set((""+e).split(",").map(r=>+r)))=>t.size===1?i_(G(In(t))):O3(e);function s_(e,t=ct(e)){let r=Hk(e,t);return r={...r,...Jk(r,t)},r={...r,...Vk(r,t)},r={...r,...n_(r,t)},r={...r,...o_(r)},r}var Rr=(()=>{let e=vt(0),t={};for(let n in e)t[n]=o=>vt(rt(o))[n](o);return t})(),L3=(()=>{let e=(0,Gs.createSelector)(Rr.getSelectedCallNodePath,Rr.getFilteredThread,(o,{stringTable:a,funcTable:i})=>{if(!o.length)return"";let s=jc(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=jc(o);return a.isJS[i]}),r=(0,Gs.createSelector)(Rr.getSelectedCallNodePath,Rr.getFilteredThread,En,(o,{stringTable:a,funcTable:i,resourceTable:s},l)=>o.length?bs(jc(o),i,s,a,l):""),n=(0,Gs.createSelector)(Rr.getSelectedCallNodePath,Rr.getCallNodeInfo,ut,Rr.getPreviewFilteredCtssSamples,Rr.getPreviewFilteredCtssSampleCategoriesAndSubcategories,wS);return{getName:e,getIsJS:t,getLib:r,getTimingsForSidebar:n}})();me();var Wh=(e,t)=>t.some(r=>e instanceof r),l_,c_;function D3(){return l_||(l_=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function B3(){return c_||(c_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Hh=new WeakMap,$h=new WeakMap,Wu=new WeakMap;function U3(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 $3(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 p_(e){Vh=e(Vh)}function G3(e){return B3().includes(e)?function(...t){return e.apply(qh(this),t),Gu(this.request)}:function(...t){return Gu(e.apply(qh(this),t))}}function W3(e){return typeof e=="function"?G3(e):(e instanceof IDBTransaction&&$3(e),Wh(e,D3())?new Proxy(e,Vh):e)}function Gu(e){if(e instanceof IDBRequest)return U3(e);if($h.has(e))return $h.get(e);let t=W3(e);return t!==e&&($h.set(e,t),Wu.set(t,e)),t}var qh=e=>Wu.get(e);var H3=["get","getKey","getAll","getAllKeys","count"],V3=["put","add","delete","clear"],Gh=new Map;function u_(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=V3.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||H3.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}p_(e=>({...e,get:(t,r,n)=>u_(t,r)||e.get(t,r,n),has:(t,r)=>!!u_(t,r)||e.has(t,r)}));var q3=["continue","continuePrimaryKey","advance"],d_={},jh=new WeakMap,h_=new WeakMap,j3={get(e,t){if(!q3.includes(t))return e[t];let r=d_[t];return r||(r=d_[t]=function(...n){jh.set(this,h_.get(this)[t](...n))}),r}};async function*z3(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;let r=new Proxy(t,j3);for(h_.set(r,t),Wu.set(r,qh(t));t;)yield r,t=await(jh.get(r)||t.continue()),jh.delete(r)}function f_(e,t){return t===Symbol.asyncIterator&&Wh(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Wh(e,[IDBIndex,IDBObjectStore])}p_(e=>({...e,get(t,r,n){return f_(t,r)?z3:e.get(t,r,n)},has(t,r){return f_(t,r)||e.has(t,r)}}));var Z3=le(Ir());function g_(e){return{type:"CHANGE_SELECTED_THREAD",selectedThreadIndexes:e}}var m_=!1;function zh(e){return m_||(m_=!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 y_(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 jr(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 Y3(){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(X3-1,r)]);let a=Bc(this._children,t,g=>g.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=Y3(),X3=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 zo(e){return`f-${e}`}function qu(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 ju=class{_handleToMarker=new Map;_nextHandleId=1;handleForMarker(t,r){let n=ct(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 pN=le(require("fs"));function Q3(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var b_=Q3();var F_=le(S_());var eG=(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}},tG=(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}},rG=(e=!1,t)=>t.type==="HAS_ZOOMED_VIA_MOUSEWHEEL"?!0:e;function nG(){let e={};return to.forEach(t=>e[t]=!1),e.calltree=!0,e["marker-table"]=!0,e}var oG=(e=nG(),t)=>{if(t.type==="CHANGE_SIDEBAR_OPEN_STATE"){let{tab:r,isOpen:n}=t;return{...e,[r]:n}}else return e},aG=(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 ro.includes(e)?e:"calltree";default:return e}},iG=(e={},t)=>{if(t.type==="UPDATE_TRACK_THREAD_HEIGHT"){let r={...e};return r[t.threadsKey]=t.height,r}else return e},sG=(e=!1,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return!0;case"DISMISS_NEWLY_PUBLISHED":return!1;default:return e}},lG=(e=!1,t)=>{switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1;default:return e}},cG=(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}},uG=(e=!1,t)=>t.type==="ENABLE_EVENT_DELAY_TRACKS"?!0:e,dG=(e=!1,t)=>t.type==="ENABLE_EXPERIMENTAL_CPU_GRAPHS"?!0:e,fG=(e=!1,t)=>t.type==="ENABLE_EXPERIMENTAL_PROCESS_CPU_TRACKS"?!0:e,pG=(e=null,t)=>t.type==="SET_CURRENT_PROFILE_UPLOADED_INFORMATION"?t.uploadedProfileInformation:e,hG=_t({eventDelayTracks:uG,cpuGraphs:dG,processCPUTracks:fG}),mG=(e={status:"NO_ATTEMPT"},t)=>t.type==="UPDATE_BROWSER_CONNECTION_STATUS"?t.browserConnectionStatus:e,gG=(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},yG=_t({view:eG,urlSetupPhase:tG,hasZoomedViaMousewheel:rG,isSidebarOpenPerPanel:oG,lastVisibleThreadTabSlug:aG,trackThreadHeights:iG,isNewlyPublished:sG,isDragAndDropDragging:lG,isDragAndDropOverlayRegistered:cG,experimental:hG,currentProfileUploadedInformation:pG,browserConnectionStatus:mG,sidebarOpenCategories:gG}),x_=yG;var bG=(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}},I_=bG;var v_=le(Ir());me();var TG=(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"?fo(e,{phase:"LIST_FILES_IN_ZIP_FILE",zip:e.zip,pathInZipFile:null}):e;case"RECEIVE_ZIP_FILE":return fo(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 fo(e,{phase:"LIST_FILES_IN_ZIP_FILE",zip:G(e.zip),pathInZipFile:null});case"PROCESS_PROFILE_FROM_ZIP_FILE":return fo(e,{phase:"PROCESS_PROFILE_FROM_ZIP_FILE",zip:G(e.zip),pathInZipFile:t.pathInZipFile});case"FILE_NOT_FOUND_IN_ZIP_FILE":return fo(e,{phase:"FILE_NOT_FOUND_IN_ZIP_FILE",zip:G(e.zip),pathInZipFile:t.pathInZipFile});case"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE":return fo(e,{phase:"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE",zip:G(e.zip),pathInZipFile:G(e.pathInZipFile)});case"FATAL_ERROR":return e.phase==="NO_ZIP_FILE"||e.phase==="LIST_FILES_IN_ZIP_FILE"?e:fo(e,{phase:"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE",zip:G(e.zip),pathInZipFile:G(e.pathInZipFile)});case"VIEW_FULL_PROFILE":return e.phase==="NO_ZIP_FILE"?e:fo(e,{phase:"VIEW_PROFILE_IN_ZIP_FILE",zip:G(e.zip),pathInZipFile:G(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}},SG=(e=null,t)=>{switch(t.type){case"FAILED_TO_PROCESS_PROFILE_FROM_ZIP_FILE":case"FATAL_ERROR":return t.error;default:return e}};function fo(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(v_.oneLine`
659
+ `);return q}),d=(0,Ie.createSelector)(l,V=>V.map((re,q)=>q)),f=V=>(re,q)=>eu(re,q,V),p=(0,Ie.createSelector)(u,d,pr,(V,re,q)=>{let{start:ee,end:Te}=q;return vp(V,re,ee,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,re,q)=>{let ee=q.length>0?"Jank":"BHR-detected hang";return f(Te=>!!(Te.data&&Te.data.type===ee))(V,re)}),m=(0,Ie.createSelector)(u,p,ft,HI,Rt,nt,ws),g=(0,Ie.createSelector)(u,m,Go,(V,re,q)=>{if(!q)return re;let{selectionStart:ee,selectionEnd:Te}=q;return vp(V,re,ee,Te)}),T=(0,Ie.createSelector)(l,V=>V.every(re=>!En(re))),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(re=>En(re))),k=(0,Ie.createSelector)(u,m,Cr,ft,(V,re,q,ee)=>Lo(V,re,q,ee,"marker-chart",wp(ee))),E=(0,Ie.createSelector)(u,g,Cr,ft,(V,re,q,ee)=>Lo(V,re,q,ee,"marker-table",wp(ee))),A=(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),Ee=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-fileio",()=>tI,Lo),L=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-memory",Lo),Q=(0,Ie.createSelector)(u,p,Cr,ft,()=>"timeline-ipc",Lo),N=(0,Ie.createSelector)(u,S,()=>null,$u),R=(0,Ie.createSelector)(u,I,()=>null,$u),M=(0,Ie.createSelector)(u,p,rI),P=(0,Ie.createSelector)(c,V=>jI(V,t),(V,re)=>re===null||re>=V?null:re),$=V=>{let re=u(V),q=P(V);return q===null?null:re(q)},Y=V=>e.getViewOptions(V).selectedNetworkMarker,H=V=>{let re=u(V),q=Y(V);return q===null?null:re(q)},z=(0,Ie.createSelector)(Xk,V=>V!==null&&V.threadsKey===t?V.markerIndex:null),se=(0,Ie.createSelector)(u,z,(V,re)=>typeof re=="number"?V(re):null),de=(0,Ie.createSelector)(Gr,({hoveredMarker:V})=>V!==null&&V.threadsKey===t?V.markerIndex:null),ue={},fe=(V,re)=>{let q=V.name;return ue[q]||(ue[q]={}),ue[q][re]||(ue[q][re]=be(V,re)),ue[q][re]};function be(V,re){let q=(0,Ie.createSelector)(l,Rt,(Ne,qe)=>{if(V.graphs===void 0)throw new Error(`No graphs for marker ${re}. This shouldn't happen.`);let lt=[],et=[],{graphs:br,name:Qt}=V,qt=br.map(gt=>(et.push([]),gt.key)),Ot=qe.getString(re);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}}),ee=(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,ee,(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:ee,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:A,getMarkerTableLabelGetter:F,getMarkerLabelToCopyGetter:B,getMarkerSearchTermGetter:Z,getMarkerChartTimingAndBuckets:X,getCommittedRangeFilteredMarkerIndexes:p,getTimelineOverviewMarkerIndexes:h,getTimelineVerticalMarkerIndexes:y,getTimelineFileIoMarkerIndexes:Ee,getTimelineMemoryMarkerIndexes:L,getTimelineIPCMarkerIndexes:Q,getNetworkTrackTiming:N,getRangeFilteredScreenshotsById:M,getSearchFilteredMarkerIndexes:m,getPreviewFilteredMarkerIndexes:g,getSelectedMarkerIndex:P,getSelectedMarker:$,getSelectedNetworkMarkerIndex:Y,getSelectedNetworkMarker:H,getIsNetworkChartEmptyInFullRange:T,getUserTimingMarkerIndexes:I,getUserTimingMarkerTiming:R,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],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 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}),$3=(0,Lh.default)(wS,{limit:2}),G3=(0,Lh.default)(Vc,{limit:2});function s_(e,t){let r=(0,Ae.createSelector)(e.getThread,Wo,(P,$)=>{let{time:Y}=P.samples;return Y.length===0?null:{start:Y[0],end:Y[Y.length-1]+$}}),n=i_(P=>e.getFilteredThread(P).stackTable,P=>e.getFilteredThread(P).frameTable,_r,$3),o=i_(n,_r,P=>e.getFilteredThread(P).funcTable.length,G3),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:Y},H)=>H===null?null:Su(P,$,Y,H)),c=(0,Ae.createSelector)(e.getFilteredThread,Ua,({nativeSymbols:P},$)=>$===null?null:P.address.findIndex((Y,H)=>Y===$.address&&P.libIndex[H]===$.libIndex)),u=(0,Ae.createSelector)(e.getFilteredThread,c,({stackTable:P,frameTable:$,funcTable:Y},H)=>H===null?null:Iu(P,$,Y,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(Y=>P.getCallNodeIndexFromPath(Y))),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,$,Y)=>_S($,P,Y)),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,$,Y)=>ku(P,$,Y.getCallNodeTable().length)),w=(0,Ae.createSelector)(a,v,Fs),k=(0,Ae.createSelector)(a,v,ah),E=(0,Ae.createSelector)(i,s,v,P=>e.getFilteredThread(P).funcTable.length,Fv),A=(0,Ae.createSelector)(e.getFilteredThread,a,nt,e.getPreviewFilteredCtssSamples,w,I,An,Os),F=(0,Ae.createSelector)(e.getFilteredThread,o,nt,e.getPreviewFilteredCtssSamples,E,I,(P,$,Y,H,z,se)=>Os(P,$,Y,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,$,Y,H)=>{let z=Dv(P,$,Y.getCallNodeTable().length,H);return z===null?null:Fs(Y,z)}),X=(0,Ae.createSelector)(f,a,Z,(P,$,Y)=>P===null||Y===null?null:Rv(P,$,Y)),Ee=(0,Ae.createSelector)(e.getFilteredCtssSamples,b,a,S,Wo,t_),L=P=>Ee(P).timings,Q=P=>Ee(P).sameWidthsIndexToTimestampMap,N=(0,Ae.createSelector)(P=>a(P).getCallNodeTable(),P=>e.getFilteredThread(P).funcTable,P=>e.getFilteredThread(P).stringTable,r_),R=(0,Ae.createSelector)(N,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:A,getFunctionListTree:F,getSourceViewLineTimings:G,getAssemblyViewAddressTimings:B,getTracedTiming:Z,getTracedSelfAndTotalForSelectedCallNode:X,getStackTimingByDepth:L,getSameWidthsIndexToTimestampMap:Q,getFilteredCallNodeMaxDepthPlusOne:S,getFlameGraphTiming:R,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={},W3=(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))):W3(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})(),H3=(()=>{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 V3(){return f_||(f_=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function j3(){return p_||(p_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Hh=new WeakMap,$h=new WeakMap,Wu=new WeakMap;function q3(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 z3(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 K3(e){return j3().includes(e)?function(...t){return e.apply(jh(this),t),Gu(this.request)}:function(...t){return Gu(e.apply(jh(this),t))}}function Z3(e){return typeof e=="function"?K3(e):(e instanceof IDBTransaction&&z3(e),Wh(e,V3())?new Proxy(e,Vh):e)}function Gu(e){if(e instanceof IDBRequest)return q3(e);if($h.has(e))return $h.get(e);let t=Z3(e);return t!==e&&($h.set(e,t),Wu.set(t,e)),t}var jh=e=>Wu.get(e);var J3=["get","getKey","getAll","getAllKeys","count"],Y3=["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=Y3.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||J3.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 X3=["continue","continuePrimaryKey","advance"],m_={},qh=new WeakMap,b_=new WeakMap,Q3={get(e,t){if(!X3.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*eG(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;let r=new Proxy(t,Q3);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)?eG:e.get(t,r,n)},has(t,r){return g_(t,r)||e.has(t,r)}}));var rG=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 oG(){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(aG-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=oG(),aG=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 iG(e){return({dispatch:r,getState:n})=>o=>a=>typeof a=="function"?a(r,n,e):o(a)}var I_=iG();var B_=ce(w_());var sG=(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}},lG=(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}},cG=(e=!1,t)=>t.type==="HAS_ZOOMED_VIA_MOUSEWHEEL"?!0:e;function uG(){let e={};return ro.forEach(t=>e[t]=!1),e.calltree=!0,e["marker-table"]=!0,e}var dG=(e=uG(),t)=>{if(t.type==="CHANGE_SIDEBAR_OPEN_STATE"){let{tab:r,isOpen:n}=t;return{...e,[r]:n}}else return e},fG=(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}},pG=(e={},t)=>{if(t.type==="UPDATE_TRACK_THREAD_HEIGHT"){let r={...e};return r[t.threadsKey]=t.height,r}else return e},hG=(e=!1,t)=>{switch(t.type){case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":return!0;case"DISMISS_NEWLY_PUBLISHED":return!1;default:return e}},mG=(e=!1,t)=>{switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1;default:return e}},gG=(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}},yG=(e=!1,t)=>t.type==="ENABLE_EVENT_DELAY_TRACKS"?!0:e,bG=(e=!1,t)=>t.type==="ENABLE_EXPERIMENTAL_CPU_GRAPHS"?!0:e,TG=(e=!1,t)=>t.type==="ENABLE_EXPERIMENTAL_PROCESS_CPU_TRACKS"?!0:e,SG=(e=null,t)=>t.type==="SET_CURRENT_PROFILE_UPLOADED_INFORMATION"?t.uploadedProfileInformation:e,xG=_t({eventDelayTracks:yG,cpuGraphs:bG,processCPUTracks:TG}),IG=(e={status:"NO_ATTEMPT"},t)=>t.type==="UPDATE_BROWSER_CONNECTION_STATUS"?t.browserConnectionStatus:e,vG=(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},wG=_t({view:sG,urlSetupPhase:lG,hasZoomedViaMousewheel:cG,isSidebarOpenPerPanel:dG,lastVisibleThreadTabSlug:fG,trackThreadHeights:pG,isNewlyPublished:hG,isDragAndDropDragging:mG,isDragAndDropOverlayRegistered:gG,experimental:xG,currentProfileUploadedInformation:SG,browserConnectionStatus:IG,sidebarOpenCategories:vG}),k_=wG;var kG=(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}},__=kG;var C_=ce(Ir());xe();var _G=(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}},CG=(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`
650
660
  Attempted to transition the ZipFileState from the phase “${e.phase}”
651
661
  to “${t.phase}”, however “${e.phase}” can only transition to
652
662
  “${n.join("\u201D, \u201C")}”.
653
- `);return t}var xG=(e=null,t)=>t.type==="CHANGE_SELECTED_ZIP_FILE"?t.selectedZipFileIndex:e,IG=(e=[],t)=>t.type==="CHANGE_EXPANDED_ZIP_FILES"?t.expandedZipFileIndexes:e,vG=_t({zipFile:TG,error:SG,selectedZipFileIndex:xG,expandedZipFileIndexes:IG}),w_=vG;tr();me();var $e={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++)xt(this.markBuffer,r)&&(this.oldIndexToNewIndexPlusOne[r]=t+1,t++);this.newLength=t}};function __(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:$e.indexRef(n.frameTable),prefix:$e.selfIndexRefOrNull()},a={address:$e.noRef(),inlineDepth:$e.noRef(),category:$e.noRef(),subcategory:$e.noRef(),func:$e.indexRef(n.funcTable),nativeSymbol:$e.indexRefOrNull(n.nativeSymbols),innerWindowID:$e.noRef(),line:$e.noRef(),column:$e.noRef()},i={name:$e.indexRef(n.stringArray),isJS:$e.noRef(),relevantForJS:$e.noRef(),resource:$e.indexRefOrNegOne(n.resourceTable),source:$e.indexRefOrNull(n.sources),lineNumber:$e.noRef(),columnNumber:$e.noRef()},s={name:$e.indexRef(n.stringArray),host:$e.indexRefOrNull(n.stringArray),lib:$e.indexRefOrNull(n.libs),type:$e.noRef()},l={libIndex:$e.indexRef(n.libs),address:$e.noRef(),name:$e.indexRef(n.stringArray),functionSize:$e.noRef()},c={id:$e.noRef(),filename:$e.indexRef(n.stringArray),startLine:$e.noRef(),startColumn:$e.noRef(),sourceMapURL:$e.indexRefOrNull(n.stringArray)},u=vs(e.meta.markerSchema);for(let h of r)EG(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:FG(t.stringArray,n)},f={...e,libs:OG(e.libs,n),shared:d,threads:e.threads.map(h=>RG(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"&&_G(e[a],n);for(let a of o){let i=r[a],s=e[a];switch(i.type){case"INDEX_REF":wG(s,n,i.referencedTable.markBuffer);break;case"INDEX_REF_OR_NULL":kG(s,n,i.referencedTable.markBuffer);break;case"SELF_INDEX_REF_OR_NULL":break;case"INDEX_REF_OR_NEG_ONE":CG(s,n,i.referencedTable.markBuffer);break;case"NO_REF":break;default:throw oe(i)}}t.computeIndexTranslation()}function wG(e,t,r){for(let n=0;n<e.length;n++)if(xt(t,n)){let o=e[n];yt(r,o)}}function kG(e,t,r){for(let n=0;n<e.length;n++)if(xt(t,n)){let o=e[n];o!==null&&yt(r,o)}}function _G(e,t){for(let r=e.length-1;r>=0;r--)if(xt(t,r)){let n=e[r];n!==null&&yt(t,n)}}function CG(e,t,r){for(let n=0;n<e.length;n++)if(xt(t,n)){let o=e[n];o!==-1&&yt(r,o)}}function EG(e,t,r){Yh(e.samples.stack,t),e.jsAllocations&&Yh(e.jsAllocations.stack,t),e.nativeAllocations&&Yh(e.nativeAllocations.stack,t),AG(e.markers,t,r)}function Yh(e,t){for(let r=0;r<e.length;r++){let n=e[r];n!==null&&yt(t.stackTable.markBuffer,n)}}function AG(e,t,r){let n=t.stackTable.markBuffer,o=t.stringArray.markBuffer;for(let a=0;a<e.length;a++){yt(o,e.name[a]);let i=e.data[a];if(i&&("cause"in i&&i.cause&&i.cause.stack!==null&&yt(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"&&yt(o,c)}}}}function ei(e,t,r){let{markBuffer:n}=t,o=G(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]=NG(l,n,s.referencedTable.oldIndexToNewIndexPlusOne,o);break;case"INDEX_REF_OR_NULL":a[i]=k_(l,n,s.referencedTable.oldIndexToNewIndexPlusOne,o);break;case"SELF_INDEX_REF_OR_NULL":a[i]=k_(l,n,t.oldIndexToNewIndexPlusOne,o);break;case"INDEX_REF_OR_NEG_ONE":a[i]=PG(l,n,s.referencedTable.oldIndexToNewIndexPlusOne,o);break;case"NO_REF":a[i]=Qh(l,n,o);break;default:throw oe(s)}}return a}function Qh(e,t,r){let n=new Array(r),o=0;for(let a=0;a<e.length;a++)xt(t,a)&&(n[o++]=e[a]);return n}function NG(e,t,r,n){let o=new Array(n),a=0;for(let i=0;i<e.length;i++)xt(t,i)&&(o[a++]=r[e[i]]-1);return o}function k_(e,t,r,n){let o=new Array(n),a=0;for(let i=0;i<e.length;i++)if(xt(t,i)){let s=e[i];o[a++]=s!==null?r[s]-1:null}return o}function PG(e,t,r,n){let o=new Array(n),a=0;for(let i=0;i<e.length;i++)if(xt(t,i)){let s=e[i];o[a++]=s!==-1?r[s]-1:-1}return o}function RG(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:MG(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 MG(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 FG(e,t){return Qh(e,t.stringArray.markBuffer,G(t.stringArray.newLength))}function OG(e,t){return Qh(e,t.libs.markBuffer,G(t.libs.newLength))}ur();var em=1;function E_(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:Oa(y.url,`<Page #${b}>`),favicon:null})))}let l=e.shared.stringArray;o.shouldRemoveUrls&&(l=l.map(y=>Oa(y)));let c=Ue.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=Ca(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 A=v.length,F=c.indexForString(`<Func #${A}>`);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(W=>w.func[W]=A)}else{let A=c.indexForString(`<Func #${k}>`);v.name[k]=A,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(A=>{w.line[A]=null,w.column[A]=null,w.innerWindowID[A]=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 A of I)if(!E.has(A)){let F=c.indexForString(`<Resource #${A}>`);k.name[A]=F,k.lib[A]=null,k.host[A]=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=g.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,g)=>{let m=LG(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=DG(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=__(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 LG(e,t,r,n,o,a,i,s){if(o.shouldRemoveThreads.has(n)||o.shouldRemovePrivateBrowsingData&&e.isPrivateBrowsing)return null;let l=jf(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]=tI(p)),p&&o.shouldRemoveUrls){let h=Is(i,p);if(h&&(p=l.data[f]=oI(h,p)),p.type==="Network"){l.data[f]=eI(p);let b=t.getString(l.name[f]).replace(/:.*/,"");l.name[f]=t.indexForString(b)}p.type==="Text"&&(l.data[f]=rI(p),p=l.data[f])}if(o.shouldRemoveExtensions&&p&&p.type==="Text"){let h=t.getString(l.name[f]);l.data[f]=nI(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=Zx(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,C_(u)||!C_(e)?u:null}function C_(e){return e.markers.length>0?!0:e.samples.stack.some(n=>n!==null)}function DG(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=AS(o,a,i)}return{...o,mainThreadIndex:n}}function A_(){return{includeHiddenThreads:!1,includeAllTabs:!1,includeFullTimeRange:!1,includeScreenshots:!1,includeUrls:!1,includeExtension:!1,includePreferenceValues:!1,includePrivateBrowsingData:!1}}function BG(){return{includeHiddenThreads:!0,includeAllTabs:!0,includeFullTimeRange:!0,includeScreenshots:!0,includeUrls:!0,includeExtension:!0,includePreferenceValues:!0,includePrivateBrowsingData:!1}}var UG=(e=A_(),t)=>{switch(t.type){case"PROFILE_LOADED":return Ku(t.profile)?A_():BG();case"UPDATE_SHARING_OPTION":return{...e,[t.slug]:t.value};default:return e}},$G=(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}},GG=(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}},WG=(e=null,t)=>{switch(t.type){case"UPLOAD_FAILED":return t.error;case"UPLOAD_COMPRESSION_STARTED":return null;default:return e}},N_=()=>{},HG=(e=N_,t)=>{switch(t.type){case"UPLOAD_ABORTED":case"PROFILE_PUBLISHED":case"SANITIZED_PROFILE_PUBLISHED":case"UPLOAD_FAILED":return N_;case"UPLOAD_COMPRESSION_STARTED":return t.abortFunction;default:return e}},VG=(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:$G,uploadProgress:GG,abortFunction:HG,error:WG,generation:VG}),jG=(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}},zG=(e=!1,t)=>{switch(t.type){case"HIDE_STALE_PROFILE":return!0;case"VIEW_FULL_PROFILE":return!1;default:return e}},KG=(e=!1,t)=>t.type==="HIDE_STALE_PROFILE"?!0:e,ZG=(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}},JG=_t({checkedSharingOptions:UG,sanitizedProfileEncodingState:ZG,upload:qG,isHidingStaleProfile:zG,hasSanitizedProfile:KG,prePublishedState:jG}),P_=JG;var YG=(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}},XG=(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}},QG=_t({sourceCodeCache:YG,assemblyCodeCache:XG}),R_=QG;var eW=e=>(t,r)=>r.type==="REVERT_TO_PRE_PUBLISHED_STATE"?r.prePublishedState:e(t,r),tW=eW(_t({app:x_,profileView:ZI,urlState:ou,icons:I_,zippedProfiles:w_,publish:P_,code:R_})),M_=tW;function tm(){let e=null;process.env.NODE_ENV==="development"&&(e=(0,F_.createLogger)({collapsed:!0,titleFormatter:(n,o,a)=>`[action] ${n.type} (in ${a.toFixed(2)} ms)`,logErrors:!1,duration:!0}));let t=b_,r=e?Op(t,e):Op(t);return Fp(M_,r)}var bj=le(Ir());var Bd=le(Ir());me();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 ZA(e){return`https://storage.googleapis.com/${YT}/${e}`}function JA(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 ZA(n)}return null}catch(t){return console.error("Failed to parse profiler URL:",t),null}}function Oq(e){return new Promise(t=>setTimeout(t,e))}function Lq(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:"&&no(r)&&typeof location<"u"&&location.protocol==="https:"}catch{return!1}}var qg=class extends Error{name="SafariLocalhostHTTPLoadError"};function YA(e,t){return t==="application/zip"||t==="application/json"?t:e.match(/\.zip$/)?"application/zip":e.match(/\.json/)?"application/json":null}async function XA(e){let t=new Uint8Array(e);Ka(t)&&(t=await za(t));let r=new TextDecoder;return JSON.parse(r.decode(t))}async function Dq(e,t,r){let n=null;try{return n=await e.arrayBuffer(),await XA(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`
663
+ `);return t}var EG=(e=null,t)=>t.type==="CHANGE_SELECTED_ZIP_FILE"?t.selectedZipFileIndex:e,NG=(e=[],t)=>t.type==="CHANGE_EXPANDED_ZIP_FILES"?t.expandedZipFileIndexes:e,AG=_t({zipFile:_G,error:CG,selectedZipFileIndex:EG,expandedZipFileIndexes:NG}),E_=AG;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)OG(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:GG(t.stringArray,n)},f={...e,libs:WG(e.libs,n),shared:d,threads:e.threads.map(h=>UG(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"&&MG(e[a],n);for(let a of o){let i=r[a],s=e[a];switch(i.type){case"INDEX_REF":PG(s,n,i.referencedTable.markBuffer);break;case"INDEX_REF_OR_NULL":RG(s,n,i.referencedTable.markBuffer);break;case"SELF_INDEX_REF_OR_NULL":break;case"INDEX_REF_OR_NEG_ONE":FG(s,n,i.referencedTable.markBuffer);break;case"NO_REF":break;default:throw ae(i)}}t.computeIndexTranslation()}function PG(e,t,r){for(let n=0;n<e.length;n++)if(It(t,n)){let o=e[n];bt(r,o)}}function RG(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 MG(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 FG(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 OG(e,t,r){Yh(e.samples.stack,t),e.jsAllocations&&Yh(e.jsAllocations.stack,t),e.nativeAllocations&&Yh(e.nativeAllocations.stack,t),LG(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 LG(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]=DG(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]=BG(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 DG(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 BG(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 UG(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:$G(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 $G(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 GG(e,t){return Qh(e,t.stringArray.markBuffer,W(t.stringArray.newLength))}function WG(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 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=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,E]of y.entries()){if(b.has(k)){let A=v.length,F=c.indexForString(`<Func #${A}>`);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++,E.forEach(G=>w.func[G]=A)}else{let A=c.indexForString(`<Func #${k}>`);v.name[k]=A,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(A=>{w.line[A]=null,w.column[A]=null,w.innerWindowID[A]=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 A of I)if(!E.has(A)){let F=c.indexForString(`<Resource #${A}>`);k.name[A]=F,k.lib[A]=null,k.host[A]=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=HG(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=VG(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 HG(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 VG(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 jG(){return{includeHiddenThreads:!0,includeAllTabs:!0,includeFullTimeRange:!0,includeScreenshots:!0,includeUrls:!0,includeExtension:!0,includePreferenceValues:!0,includePrivateBrowsingData:!1}}var qG=(e=M_(),t)=>{switch(t.type){case"PROFILE_LOADED":return Ku(t.profile)?M_():jG();case"UPDATE_SHARING_OPTION":return{...e,[t.slug]:t.value};default:return e}},zG=(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}},KG=(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}},ZG=(e=null,t)=>{switch(t.type){case"UPLOAD_FAILED":return t.error;case"UPLOAD_COMPRESSION_STARTED":return null;default:return e}},F_=()=>{},JG=(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}},YG=(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}},XG=_t({phase:zG,uploadProgress:KG,abortFunction:JG,error:ZG,generation:YG}),QG=(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}},eW=(e=!1,t)=>{switch(t.type){case"HIDE_STALE_PROFILE":return!0;case"VIEW_FULL_PROFILE":return!1;default:return e}},tW=(e=!1,t)=>t.type==="HIDE_STALE_PROFILE"?!0:e,rW=(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}},nW=_t({checkedSharingOptions:qG,sanitizedProfileEncodingState:rW,upload:XG,isHidingStaleProfile:eW,hasSanitizedProfile:tW,prePublishedState:QG}),O_=nW;var oW=(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}},aW=(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}},iW=_t({sourceCodeCache:oW,assemblyCodeCache:aW}),L_=iW;var sW=e=>(t,r)=>r.type==="REVERT_TO_PRE_PUBLISHED_STATE"?r.prePublishedState:e(t,r),lW=sW(_t({app:k_,profileView:QI,urlState:ou,icons:__,zippedProfiles:E_,publish:O_,code:L_})),D_=lW;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 kq=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 W4(e){return new Promise(t=>setTimeout(t,e))}function H4(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 V4(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`
654
664
  The profile could not be downloaded and decoded. This does not look like a supported file
655
665
  type.
656
- `}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 Bq(e,t){let r=await e.arrayBuffer(),n=new Uint8Array(r);try{let{default:o}=await Promise.resolve().then(()=>le(KA()));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 Uq(e,t,r){let n=YA(e,t.headers.get("content-type"));switch(n){case"application/zip":return{responseType:"ZIP",zip:await Bq(t,r)};case"application/json":case null:return{responseType:"PROFILE",profile:await Dq(t,r,n)};default:throw oe(n)}}async function jg(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 Lq(n,s)?new qg:s}if(i.ok)return Uq(n,i,a);if(i.status!==403)throw new Error(Bd.oneLine`
666
+ `}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 j4(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 q4(e,t,r){let n=tA(e,t.headers.get("content-type"));switch(n){case"application/zip":return{responseType:"ZIP",zip:await j4(t,r)};case"application/json":case null:return{responseType:"PROFILE",profile:await V4(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 H4(n,s)?new jg:s}if(i.ok)return q4(n,i,a);if(i.status!==403)throw new Error(Bd.oneLine`
657
667
  Could not fetch the profile on remote server.
658
668
  Response was: ${i.status} ${i.statusText}.
659
- `);if(r++===10)break;o(new Hs("Profile not found on remote server.",{count:r,total:11})),await Oq(1e3)}throw new Error(Bd.oneLine`
669
+ `);if(r++===10)break;o(new Hs("Profile not found on remote server.",{count:r,total:11})),await W4(1e3)}throw new Error(Bd.oneLine`
660
670
  Could not fetch the profile on remote server:
661
671
  still not found after ${10} seconds.
662
- `)}me();var $q=10;function QA(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],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 Gq(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 Uo(`Failed to symbolicate library ${l}/${c}`,s.lib,new Error("Invalid debugName or breakpadId"))),!1):!0});let i=Gq(t,1e4,$q,({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 Uo(`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),G(n.get(c)).push(u)}}return i}catch(a){for(let i of t)G(n.get(i)).push(a);return t}}};var Vn;function eN(e){return{lang:(e==null?void 0:e.lang)??(Vn==null?void 0:Vn.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Vn==null?void 0:Vn.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Vn==null?void 0:Vn.abortPipeEarly)}}var zg;function Wq(e){return zg==null?void 0:zg.get(e)}var Kg;function Hq(e){return Kg==null?void 0:Kg.get(e)}var Zg;function Vq(e,t){var r;return(r=Zg==null?void 0:Zg.get(e))==null?void 0:r.get(t)}function qq(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 la(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)??qq(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??Vq(e.reference,l.lang)??(c?Hq(l.lang):null)??n.message??Wq(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 wo(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},eN())}}}function jq(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}var zq=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};var TY=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 Kq(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 wo(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 la(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 wo(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:la(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 wo(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 wo(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:la(this,"type",t,r),t}}}function Ai(e,t){return{kind:"schema",type:"object",reference:Ai,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return wo(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]=Kq(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(la(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 la(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 wo(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 wo(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(jq(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 la(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 wo(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:la(this,"type",t,r),t}}}function tN(e,t,r){let n=e["~run"]({value:t},eN(r));if(n.issues)throw new zq(n.issues);return n.value}var Jq=Qg(Qr(),Xg(Yg())),Yq=Ai({function:Xr(Qr()),file:Xr(Qr()),line:Xr(kl())}),Xq=Ai({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(Yq))}),Qq=Ei(Xq),ej=Ai({found_modules:Jq,stacks:Ei(Qq)}),tj=Ai({results:Ei(ej)});function rj(e){return tN(tj,e)}function nj(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 rN(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=rj(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=nj(e,i,s,c);return{type:"SUCCESS",lib:u,results:d}}catch(u){return{type:"ERROR",request:i,error:u}}})}cr();var ca=le(Kt()),iN=le(oN());me();var sN=e=>e.publish,sj=e=>sN(e).checkedSharingOptions,PY=(0,ca.createSelector)(fe,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`}),lj=(0,ca.createSelector)(sj,fe,pr,Cn,so,An,Nn,XI,nv,(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=G(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=G(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}}),aN=null,ey=null;function cj(e){let t=Wt(e);return(aN!==t||ey===null)&&(aN=t,ey=Wt(e).map((r,n)=>vt(n).getDerivedMarkerInfo(e))),ey}var RY=(0,ca.createSelector)(fe,cj,lj,ft,E_);var uj=e=>sN(e).upload;var dj=(0,ca.createSelector)(uj,({uploadProgress:e})=>(0,iN.default)(e,.1,.95));var MY=(0,ca.createSelector)(dj,e=>dt(e,0,0,"percent"));var FY=(0,ca.createSelector)(fe,Ku);var ty=le(Kt());var LY=(0,ty.createSelector)(As,Wo,Wt,(e,t,r)=>e!==void 0&&(t.configuration&&t.configuration.features.includes("cpu")||r.some(n=>n.samples.threadCPUDelta!==void 0))),DY=(0,ty.createSelector)(qp,e=>e!==null&&e.some(t=>t.category==="CPU"));var _l=le(Kt());var hj=e=>e.code.sourceCodeCache,$Y=(0,_l.createSelector)(hj,io,(e,t)=>t!==null?e.get(t):void 0),mj=e=>e.code.assemblyCodeCache,lN=(0,_l.createSelector)(Ua,Es,(e,t)=>t===null||e===null||t.libs.length===0?null:t.libs[e.libIndex]),GY=(0,_l.createSelector)(Ua,lN,(e,t)=>e!==null&&t!==null),WY=(0,_l.createSelector)(mj,Ua,lN,(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 cN(e){return{type:"FATAL_ERROR",error:e}}me();var uN=new Set,yj=0;function dN(e){return t=>{let r=[];for(let n of e){if(!n||uN.has(n))continue;uN.add(n);let o=`favicon-${++yj}`;r.push({icon:n,className:o})}t({type:"ICON_BATCH_ADD",icons:r})}}me();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(cN(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(Tj(o,a));let s=null;e&&i&&i.length>0&&(s=_j(r,i,e));let l=null;if(!t&&o.meta.symbolicated===!1){let c=wj(r,VI(n()),e);c&&(l=kj(r,o,c))}await Promise.all([s,l])}}function Tj(e,t){return(r,n)=>{let o=t!==null,a=jp(n()),i=o?BI(n()):null,s=cx(e,i,a),l=lx(e,s),c=zp(n()),u=OI(n()),d=ux(s,o?$p(n()):null,u,c),f=sx(o?DI(n()):null,l,u,e),p={globalTracks:s,globalTrackOrder:d,localTracksByPid:l,localTrackOrderByPid:f},h=null,y=LI(n());y!==null?h=fx(p,y,e):o&&(h=px(p,Cn(n()),so(n()))),h===null&&(h=hx(p,e,c,i===null));let b=dx(t,np(p,h),e,c),g=null;o||(g=KS(e));let m=$a(n());if(ro.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=>Qn(E==null?void 0:E.stack,e.shared)),T)break}T||(m="marker-chart")}TI(()=>{r({type:"VIEW_FULL_PROFILE",selectedThreadIndexes:b,selectedTab:m,globalTracks:s,globalTrackOrder:d,localTracksByPid:l,localTrackOrderByPid:f,timelineType:g,...h})})}}function fN(e){return{type:"REQUESTING_SYMBOL_TABLE",requestedLib:e}}function ry(e){return{type:"RECEIVED_SYMBOL_TABLE_REPLY",requestedLib:e}}function Sj(){return{type:"START_SYMBOLICATING"}}function xj(){return{type:"DONE_SYMBOLICATING"}}function Ij(e){return(t,r)=>{let{threads:n,shared:o}=fe(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(Ij(r));for(let o of n)o()}enqueueSingleSymbolicationStep(t,r,n){this._scheduleUpdate(t),this._updates.push(r),this._updateObservers.push(n)}},vj=new ny;function wj(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(fN(o));try{return await rN(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)),QA(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(fN(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 kj(e,t,r,n){e(Sj());let o=[];await zI(t,r,a=>{o.push(new Promise(i=>{vj.enqueueSingleSymbolicationStep(e,a,()=>i(void 0))}))},n),await Promise.all(o),e(xj())}async function _j(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?Uv(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(dN(i)),e({type:"UPDATE_PAGES",newPages:n})}function Cj(e){return e.startsWith("http://")||e.startsWith("https://")}async function Ej(e){return(await fetch(e,{method:"HEAD",redirect:"follow"})).url}async function hN(e){let t=tm();if(console.log(`Loading profile from ${e}`),Cj(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 Ej(e),console.log(`Redirected to: ${i}`));let d=JA(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 jg({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=pN.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 mN(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),A;if(E.length>0){let F=E.reduce((U,K)=>U+K.cpuMs,0),W=Math.max(...E.map(U=>U.cpuMs));A={count:E.length,combinedCpuMs:F,maxCpuMs:W}}return{processIndex:g,pid:b,name:m,cpuMs:T,threads:w,remainingThreads:A}}),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 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 gN(e,0,null,n,a,0,t,i,r),i}function gN(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&&gN(e,m,c,n,o,a+1,i,s,l)}}function Aj(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 yN(e,t,r,n,o=!1,a){let i=e.getState(),s=fe(i),l=HI(i),c=new Set(s.threads.map(g=>g.pid)).size,u=QI(i),d=s.threads.map((g,m)=>({threadIndex:m,name:g.name,tid:g.tid,cpuMs:u?u[m]:0,pid:g.pid})),f=mN(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?Aj(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=tv(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 Nj(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 Pj(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 qn(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=Nj(o),i=Pj(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,g;h<=y?(b=h,g=t-h):(g=Math.floor(t*.3),b=t-g);let m=Hd(u,g),T=Hd(d,b);return n+m+T}function Ni(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=Ni(o,t,r);return{...a,funcName:i,funcIndex:o}})}function bN(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=bN(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=bN(g,f,o),T={callNodeIndex:y,depth:f};l.push(T,m)}}return Rj(e,s,t)}function Rj(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=Ni(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 TN(e,t,r,n){let o=e.getState(),a=n!==void 0?r.threadIndexesForHandle(n):rt(o),i=vt(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 SN(e,t,r){let n=e.getState(),o=r!==void 0?t.threadIndexesForHandle(r):rt(n),a=t.handleForThreadIndexes(o),i=vt(o),s=i.getFriendlyThreadName(n),l=i.getFilteredThread(n),c=fe(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: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 A=Ni(E,l,c),F=g.get(E);return{funcIndex:E,name:A,nameWithLibrary:A,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 xN(e,t,r,n){let o=e.getState(),a=r!==void 0?t.threadIndexesForHandle(r):rt(o),i=t.handleForThreadIndexes(a),s=vt(a),l=s.getFriendlyThreadName(o),c=s.getFilteredThread(o),u=null;try{let d=s.getCallNodeInfo(o),f=ut(o),p=_r(o),h=s.getWeightTypeForCallTree(o),y=s.getPreviewFilteredCtssSamples(o),b=s.getSampleIndexToNonInvertedCallNodeIndexForFilteredThread(o),g=ku(y,b,d.getCallNodeTable().length),m=Vc(d,p,c.funcTable.length),T=Fs(m,g),S=Os(c,m,f,y,T,h),I=fe(o).libs;u=cy(S,I,n)}catch{}return{type:"thread-samples-bottom-up",threadHandle:i,friendlyThreadName:l,invertedCallTree:u}}function IN(e,t,r,n){let o=e.getState(),a=r!==void 0?t.threadIndexesForHandle(r):rt(o),i=t.handleForThreadIndexes(a),s=vt(a),l=s.getFriendlyThreadName(o),c=s.getCallTree(o),u=fe(o).libs,d=cy(c,u,n);return{type:"thread-samples-top-down",threadHandle:i,friendlyThreadName:l,regularCallTree:d}}function vN(e,t,r,n){let o=e.getState(),a=r!==void 0?t.threadIndexesForHandle(r):rt(o),i=t.handleForThreadIndexes(a),s=vt(a),l=s.getFriendlyThreadName(o),c=s.getFilteredThread(o),u=fe(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 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,A,F;return b!==null&&(A=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:A,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 kN(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 _N(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 Mj(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 CN(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 Fj(e){return e.split(",").map(t=>{let r=t.trim();return r.startsWith("field:")?{field:r.substring(6)}:r})}function Oj(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 Lj(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=Oj(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?kN(h):void 0,g=_N(h),m=CN(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:g,topMarkers:m,subGroups:T})}return d.sort((f,p)=>p.count-f.count),d}function Dj(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?kN(f):void 0,y=_N(f),b=CN(d,r,n,o,s),g,m;if(i&&f.length>5){let T=Lj(f);T&&(g=dy(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 Bj(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 EN(e,t,r,n,o={}){let a=o.searchString||"";a&&e.dispatch(Kh(a));try{let i=e.getState(),s=n!==void 0?t.threadIndexesForHandle(n):rt(i),l=vt(s),c=l.getFriendlyThreadName(i),u=l.getFullMarkerList(i),d=ut(i),f=ft(i),p=Rt(i),h=l.getFullMarkerListIndexes(i).length,y=a?l.getSearchFilteredMarkerIndexes(i):l.getFullMarkerListIndexes(i);y=Mj(y,u,d,o);let b=eo(L=>u[L],fe(i).meta.markerSchema,f,d,p,"tableLabel"),g=n??t.handleForThreadIndexes(s),{groupBy:m,autoGroup:T,topN:S}=o,I=S??5,v;if(m){let L=Fj(m),Q=[];for(let M of y)Q.push({marker:u[M],index:M});let N=dy(Q,L,d,s,r,b,0,I);v=uy(N)}let k=Dj(u,y,s,r,b,d,T||!1,I).map(L=>({markerName:L.markerName,count:L.count,isInterval:L.isInterval,durationStats:L.durationStats,rateStats:L.rateStats,topMarkers:L.topMarkers.map(Q=>({handle:Q.handle,label:Q.label,start:Q.start,duration:Q.duration,hasStack:Q.hasStack})),subGroups:L.subGroups?uy(L.subGroups):void 0,subGroupKey:L.subGroupKey})),A=Bj(u,y,d).map(L=>({categoryName:L.categoryName,categoryIndex:d.findIndex(Q=>(Q==null?void 0:Q.name)===L.categoryName),count:L.count,percentage:L.percentage})),{minDuration:F,maxDuration:W,category:U,hasStack:K,limit:J}=o,Oe=a||F!==void 0||W!==void 0||U!==void 0||K||J!==void 0?{searchString:a||void 0,minDuration:F,maxDuration:W,category:U,hasStack:K,limit:J}:void 0;return{type:"thread-markers",threadHandle:g,friendlyThreadName:c,totalMarkerCount:h,filteredMarkerCount:y.length,filters:Oe,byType:k,byCategory:A,customGroups:v}}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 AN(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 NN(e,t,r,n){let o=e.getState(),{threadIndexes:a,markerIndex:i}=t.markerForHandle(n),s=vt(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=fe(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=AN(b.stack,p,h,b.time)}return{type:"marker-stack",markerHandle:n,markerIndex:i,threadHandle:d,friendlyThreadName:l,markerName:u.name,stack:y}}function PN(e,t,r,n){var S,I;let o=e.getState(),{threadIndexes:a,markerIndex:i}=t.markerForHandle(n),s=vt(a),l=s.getFriendlyThreadName(o),c=s.getFullMarkerList(o),u=c[i];if(!u)throw new Error(`Marker ${n} not found`);let d=ut(o),f=ft(o),p=Rt(o),h=r.handleForThreadIndexes(a),b=eo(v=>c[v],fe(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=Da(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=fe(o),k=s.getFilteredThread(o),E=w.libs,A=AN(v.stack,k,E,v.time);if(A&&A.frames.length>0){let F=A.frames.length>20;T={frames:A.frames.slice(0,20),truncated:F,capturedAt:A.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 wN(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 RN(e,t,r,n={}){let{searchString:o,minDuration:a,maxDuration:i,limit:s}=n,l=e.getState(),c=r!==void 0?t.threadIndexesForHandle(r):rt(l),u=vt(c),d=u.getFriendlyThreadName(l),f=u.getFullMarkerList(l),h=u.getFullMarkerListIndexes(l).filter(E=>{let A=f[E];return Ba(A)?A.data.status==="STATUS_STOP":!1}),y=h.length,b=h;if(o){let E=o.toLowerCase();b=b.filter(A=>f[A].data.URI.toLowerCase().includes(E))}(a!==void 0||i!==void 0)&&(b=b.filter(E=>{let A=f[E].data,F=A.endTime-A.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 A=f[E].data,F=A.cache;F==="Hit"||F==="MemoryHit"||F==="Prefetched"?T++:F==="Miss"||F==="Unresolved"||F==="DiskStorage"||F==="Push"?S++:I++;let W=wN(A);W.dns!==void 0&&(m.dns=(m.dns??0)+W.dns),W.tcp!==void 0&&(m.tcp=(m.tcp??0)+W.tcp),W.tls!==void 0&&(m.tls=(m.tls??0)+W.tls),W.ttfb!==void 0&&(m.ttfb=(m.ttfb??0)+W.ttfb),W.download!==void 0&&(m.download=(m.download??0)+W.download),W.mainThread!==void 0&&(m.mainThread=(m.mainThread??0)+W.mainThread)}let w=(s!==void 0&&s>0?b.slice(0,s):b).map(E=>{let A=f[E].data,F=A.endTime-A.startTime;return{url:A.URI,httpStatus:A.responseStatus,httpVersion:A.httpVersion,cacheStatus:A.cache,transferSizeKB:A.count!==void 0?A.count/1024:void 0,startTime:A.startTime,duration:F,phases:wN(A)}});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 MN(e,t,r={}){let{module:n,level:o,search:a,limit:i}=r,s=e.getState(),l=fe(s),c=l.meta.startTime,u=l.shared.stringArray,d=r.thread!==void 0?new Set(t.threadIndexesForHandle(r.thread)):null,f={error:1,warn:2,info:3,debug:4,verbose:5},p=o!==void 0?f[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 A=I.startTime[E];if(A===null)continue;let F=I.data[E];if((F==null?void 0:F.type)!=="Log")continue;let W=F,U,K,J;if("message"in W){if(!W.message)continue;U=u[I.name[E]]??"",J=kp[W.level]??"D",K=W.message.trim()}else{if(!W.name)continue;U=W.module,J="D",K=W.name.trim()}if(h!==void 0&&!U.toLowerCase().includes(h)||f[J.toLowerCase()]>p||y!==void 0&&!K.toLowerCase().includes(y))continue;let Oe=aI(c+A),L=iI(Oe,v,w,k,W,U);L!==null&&b.push(L)}}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 fy(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 py(e,t,r){switch(r.type){case"excludes-function":{for(let n of r.funcIndexes)e.dispatch(jr(t,{type:"drop-function",funcIndex:n}));return r.funcIndexes.length}case"merge":{for(let n of r.funcIndexes)e.dispatch(jr(t,{type:"merge-function",funcIndex:n}));return r.funcIndexes.length}case"root-at":return e.dispatch(jr(t,{type:"focus-function",funcIndex:r.funcIndex})),1;case"during-marker":return e.dispatch(jr(t,{type:"filter-samples",filterType:"marker-search",filter:r.searchString})),1;case"includes-function":return e.dispatch(jr(t,{type:"filter-samples",filterType:"function-include",filter:r.funcIndexes.join(",")})),1;case"includes-prefix":return e.dispatch(jr(t,{type:"filter-samples",filterType:"stack-prefix",filter:r.funcIndexes.join(",")})),1;case"includes-suffix":return e.dispatch(jr(t,{type:"filter-samples",filterType:"stack-suffix",filter:String(r.funcIndex)})),1;case"outside-marker":return e.dispatch(jr(t,{type:"filter-samples",filterType:"outside-marker",filter:r.searchString})),1;default:throw new Error(`Unhandled filter spec type: ${r.type}`)}}var qd=class{_stacks=new Map;push(t,r,n){let o=this._getOrCreate(r),a=py(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=Bo(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}};me();async function jd(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 FN(e,t,r,n){let o=Uj(r)?r:null,{debugName:a,breakpadId:i,name:s,codeId:l}=t,{address:c}=e,u=await jd("/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,$j);switch(u.type){case"SUCCESS":return{type:"SUCCESS",instructions:u.convertedResponse};case"ERROR":return{type:"ERROR",errors:u.errors};default:throw oe(u,"queryResult.type")}}function Uj(e){return no(e)}function $j(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}})}me();var hy=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 hy(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,g=null,m=null;f.indexOf("ustar")>-1&&(p=t.readString(2),h=t.readString(32),y=t.readString(32),b=Ri(t.readString(8),10),g=Ri(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=Kd.parse(t.readBuffer(s)),t.seekTo(I),this._readNextFile();if(u==="x"){let E=Kd.parse(t.readBuffer(s));t.seekTo(I);let A=this._readNextFile();return E.applyHeader(A),A}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 ON(e,t,r,n,o,a){let i=[];if(n!==null){let c=Wj(r)?r:null,{debugName:u,breakpadId:d,address:f}=n,p=await jd("/source/v1",JSON.stringify({debugName:u,debugId:d,moduleOffset:`0x${f.toString(16)}`,file:e}),c,a,Gj);switch(p.type){case"SUCCESS":return{type:"SUCCESS",source:p.convertedResponse};case"ERROR":{i.push(...p.errors);break}default:throw oe(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=mS(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 oe(l)}return{type:"ERROR",errors:i}}function Gj(e){if(!("source"in e)||typeof e.source!="string")throw new Error('No string "source" property on API response');return e.source}function Wj(e){return no(e)}var my=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")}},LN=new my,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 qd,this._archiveCache=new Map;let n=this._store.getState(),o=fe(n);this._markerMap=new ju,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 hN(t);return new e(r,n)}async profileInfo(t=!1,r){return{...await yN(this._store,this._timestampManager,this._threadMap,this._processIndexMap,t,r),context:this._getContext()}}async threadInfo(t){return{...await TN(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):rt(this._store.getState()),s=()=>SN(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(ct(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):rt(this._store.getState()),l=()=>IN(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(ct(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):rt(this._store.getState()),l=()=>xN(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(ct(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=vt(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=fy(m[0],n),S=fy(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(y_(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(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(g_(r));let n=this._store.getState(),o=fe(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):rt(this._store.getState()),o=ct(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):rt(this._store.getState()),o=ct(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):rt(this._store.getState()),n=ct(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):rt(this._store.getState()),n=ct(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=ct(t),a=Bo(this._store.getState(),o).length;for(let i of r)py(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=fe(n).meta.categories)==null?void 0:l.findIndex(c=>c.name==="Idle"))??-1;if(a===-1)return r();let i=ct(t),s=Bo(n,i).length;this._store.dispatch(jr(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=fe(t),n=fr(t),o=dr(t),a=rt(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=fe(t),n=fr(t),o=dr(t),a=rt(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=fe(r),{funcTable:o,resourceTable:a,stringArray:i}=n.shared,s=qu(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=fe(r),{funcTable:o,resourceTable:a,stringArray:i}=n.shared,s=qu(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 EN(this._store,this._threadMap,this._markerMap,t,r),context:this._getContext()}}async threadNetwork(t,r){return{...RN(this._store,this._threadMap,t,r),context:this._getContext()}}async profileLogs(t={}){return{...MN(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):rt(this._store.getState()),s=()=>vN(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(ct(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 PN(this._store,this._markerMap,this._threadMap,t),context:this._getContext()}}async markerStack(t){return{...await NN(this._store,this._markerMap,this._threadMap,t),context:this._getContext()}}async functionAnnotate(t,r,n,o="2"){let a=this._store.getState(),i=fe(a),{funcTable:s,stringArray:l,resourceTable:c}=i.shared,u=qu(t,s.length),d=l[s.name[u]],f=[],p=s.resource[u],h;if(p!==-1){let L=c.lib[p];L!=null&&L>=0&&i.libs&&(h=i.libs[L].name)}let y=h?`${h}!${d}`:d,b=rt(a),g=vt(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),A=new Uint8Array(S.func.length);for(let L=0;L<S.func.length;L++)S.func[L]===u&&(A[L]=1);let F=new Int8Array(T.length);for(let L=0;L<T.length;L++){let Q=T.frame[L];if(A[Q])F[L]=1;else{let N=T.prefix[L];F[L]=N!==null?F[N]:-1}}let W=0,U=0;for(let L=0;L<w.length;L++){let Q=w.stack[L];if(Q===null)continue;let N=w.weight?w.weight[L]:1;F[Q]===1&&(U+=N),A[T.frame[Q]]&&(W+=N)}let K=null;if(r==="src"||r==="all"){let L=s.source[u];if(L!==null){let Q=m.sources.filename[L],N=m.stringTable.getString(Q),M=m.sources.id[L],R=Su(T,S,I,L),{totalLineHits:P,selfLineHits:$}=xu(R,w),z=0,re=0;for(let Z=0;Z<w.length;Z++){let ee=w.stack[Z];if(ee===null)continue;let Te=R.stackIndexToLineSetIndex[ee];if(Te===-1)continue;let Le=w.weight?w.weight[Z]:1;z+=Le,R.lineSetTable.self[Te]!==-1&&(re+=Le)}let ae=null;for(let Z=0;Z<S.func.length;Z++)if(S.func[Z]===u){let ee=S.nativeSymbol[Z];if(ee!==null){let Te=v.libIndex[ee],Le=i.libs[Te];Le.debugName&&Le.breakpadId&&(ae={debugName:Le.debugName,breakpadId:Le.breakpadId,address:v.address[ee]});break}}let Ee=null,ve=null,ge=await ON(N,M,n,ae,this._archiveCache,LN);if(ge.type==="SUCCESS")Ee=ge.source.split(`
663
- `),ve=Ee.length;else{let Z=ge.errors.map(ee=>JSON.stringify(ee)).join("; ");f.push(`Could not fetch source for ${N}: ${Z}`)}let be=new Set([...P.keys(),...$.keys()]),Ae,H;if(o==="file"){Ae=new Set;let Z=ve??Math.max(...be);for(let ee=1;ee<=Z;ee++)Ae.add(ee);H="full file"}else{let Z=parseInt(o,10),ee=Math.max(0,isNaN(Z)?2:Z);Ae=new Set;for(let Te of be)for(let Le=Math.max(1,Te-ee);Le<=Te+ee;Le++)Ae.add(Le);H=ee===0?"annotated lines only":`\xB1${ee} lines context`}let X=Array.from(Ae).sort((Z,ee)=>Z-ee);K={filename:N,totalFileLines:ve,samplesWithFunction:z,samplesWithLineInfo:re,contextMode:H,lines:X.map(Z=>({lineNumber:Z,selfSamples:$.get(Z)??0,totalSamples:P.get(Z)??0,sourceText:Ee!==null?Ee[Z-1]??null:null}))}}else r==="src"&&f.push(`Function ${t} has no source index. Use --mode asm for assembly view.`)}let J=[];if(r==="asm"||r==="all"){let L=new Set;for(let M=0;M<S.func.length;M++)if(S.func[M]===u){let R=S.nativeSymbol[M];R!==null&&L.add(R)}L.size===0&&f.push(`Function ${t} has no native symbols \u2014 may be JS-only or not symbolicated.`);let Q=L.size,N=1;for(let M of L){let R=m.stringTable.getString(v.name[M]),P=v.address[M],$=v.functionSize[M]??null,z=v.libIndex[M],re=i.libs[z],ae=Iu(T,S,I,M),{totalAddressHits:Ee,selfAddressHits:ve}=vu(ae,w),ge={name:R,address:P,functionSize:$??0,functionSizeIsKnown:$!==null,libIndex:z},be=null,Ae=[];try{let H=await FN(ge,re,n,LN);H.type==="SUCCESS"?Ae=H.instructions.map(X=>({address:X.address,selfSamples:ve.get(X.address)??0,totalSamples:Ee.get(X.address)??0,decodedString:X.decodedString})):(be=H.errors.map(X=>JSON.stringify(X)).join("; "),f.push(`Assembly fetch failed for ${R}: ${be}`))}catch(H){be=H instanceof Error?H.message:String(H),f.push(`Assembly fetch threw for ${R}: ${be}`)}J.push({compilationIndex:N,symbolName:R,symbolAddress:P,functionSize:$,nativeSymbolCount:Q,fetchError:be,instructions:Ae}),N++}}return{...{type:"function-annotate",functionHandle:t,funcIndex:u,name:d,fullName:y,threadHandle:E,friendlyThreadName:k,totalSelfSamples:W,totalTotalSamples:U,mode:r,srcAnnotation:K,asmAnnotations:J,warnings:f},context:this._getContext()}}};var kt=le(require("fs")),en=le(require("path")),DN=le(require("crypto"));function El(e){kt.existsSync(e)||kt.mkdirSync(e,{recursive:!0})}function Yd(){return Math.random().toString(36).substring(2,15)}function Hj(e){let t=en.resolve(e).toLowerCase();return DN.createHash("sha256").update(t).digest("hex").slice(0,12)}function Mi(e,t){return process.platform==="win32"?`\\\\.\\pipe\\profiler-cli-${Hj(e)}-${t}`:en.join(e,`${t}.sock`)}function BN(e,t){return en.join(e,`${t}.log`)}function gy(e,t){return en.join(e,`${t}.json`)}function UN(e,t){El(e);let r=gy(e,t.id);kt.writeFileSync(r,JSON.stringify(t,null,2))}function Xd(e,t){let r=gy(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 da(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 $N(e){let t=da(e);return t?Mi(e,t):null}function ua(e){try{return process.kill(e,0),!0}catch{return!1}}async function GN(e,t=5e3,r=50){let n=Date.now()+t;for(;Date.now()<n;){if(!ua(e))return!0;await new Promise(o=>setTimeout(o,r))}return!ua(e)}function gn(e,t){let r=Mi(e,t),n=gy(e,t),o=en.join(e,"current.txt");process.platform!=="win32"&&kt.rmSync(r,{force:!0}),kt.rmSync(n,{force:!0}),da(e)===t&&kt.rmSync(o,{force:!0})}function ko(e,t){let r=Xd(e,t);return!r||!ua(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"))}me();var Al="mo072zoj";var yy=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=BN(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}
672
+ `)}xe();var z4=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 K4(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=K4(t,1e4,z4,({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 Z4(e){return zg==null?void 0:zg.get(e)}var Kg;function J4(e){return Kg==null?void 0:Kg.get(e)}var Zg;function Y4(e,t){var r;return(r=Zg==null?void 0:Zg.get(e))==null?void 0:r.get(t)}function X4(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)??X4(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??Y4(e.reference,l.lang)??(c?J4(l.lang):null)??n.message??Z4(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 Q4(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}var eq=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};var PY=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 tq(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]=tq(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(Q4(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 eq(n.issues);return n.value}var nq=Qg(Qr(),Xg(Yg())),oq=Ni({function:Xr(Qr()),file:Xr(Qr()),line:Xr(kl())}),aq=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(oq))}),iq=Ei(aq),sq=Ni({found_modules:nq,stacks:Ei(iq)}),lq=Ni({results:Ei(sq)});function cq(e){return aA(lq,e)}function uq(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=cq(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=uq(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,hq=e=>dA(e).checkedSharingOptions,HY=(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`}),mq=(0,ua.createSelector)(hq,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 gq(e){let t=Wt(e);return(cA!==t||ey===null)&&(cA=t,ey=Wt(e).map((r,n)=>ht(n).getDerivedMarkerInfo(e))),ey}var VY=(0,ua.createSelector)(ge,gq,mq,ft,R_);var yq=e=>dA(e).upload;var bq=(0,ua.createSelector)(yq,({uploadProgress:e})=>(0,uA.default)(e,.1,.95));var jY=(0,ua.createSelector)(bq,e=>dt(e,0,0,"percent"));var qY=(0,ua.createSelector)(ge,Ku);var ty=ce(Kt());var KY=(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))),ZY=(0,ty.createSelector)(jp,e=>e!==null&&e.some(t=>t.category==="CPU"));var _l=ce(Kt());var xq=e=>e.code.sourceCodeCache,XY=(0,_l.createSelector)(xq,so,(e,t)=>t!==null?e.get(t):void 0),Iq=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]),QY=(0,_l.createSelector)(Ua,fA,(e,t)=>e!==null&&t!==null),eX=(0,_l.createSelector)(Iq,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,wq=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-${++wq}`;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(_q(o,a));let s=null;e&&i&&i.length>0&&(s=Mq(r,i,e));let l=null;if(!t&&o.meta.symbolicated===!1){let c=Pq(r,KI(n()),e);c&&(l=Rq(r,o,c))}await Promise.all([s,l])}}function _q(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(E=>eo(E==null?void 0:E.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 Cq(){return{type:"START_SYMBOLICATING"}}function Eq(){return{type:"DONE_SYMBOLICATING"}}function Nq(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(Nq(r));for(let o of n)o()}enqueueSingleSymbolicationStep(t,r,n){this._scheduleUpdate(t),this._updates.push(r),this._updateObservers.push(n)}},Aq=new ny;function Pq(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 Rq(e,t,r,n){e(Cq());let o=[];await YI(t,r,a=>{o.push(new Promise(i=>{Aq.enqueueSingleSymbolicationStep(e,a,()=>i(void 0))}))},n),await Promise.all(o),e(Eq())}async function Mq(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 Fq(e){return e.startsWith("http://")||e.startsWith("https://")}async function Oq(e){return(await fetch(e,{method:"HEAD",redirect:"follow"})).url}async function bA(e){let t=tm();if(console.log(`Loading profile from ${e}`),Fq(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 Oq(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 E=v.slice(k),A;if(E.length>0){let F=E.reduce((B,Z)=>B+Z.cpuMs,0),G=Math.max(...E.map(B=>B.cpuMs));A={count:E.length,combinedCpuMs:F,maxCpuMs:G}}return{processIndex:m,pid:b,name:g,cpuMs:T,threads:w,remainingThreads:A}}),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 Lq(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?Lq(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 Dq(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 Bq(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=Dq(o),i=Bq(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 Uq(e,s,t)}function Uq(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 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 A=Ai(E,l,c),F=m.get(E);return{funcIndex:E,name:A,nameWithLibrary:A,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,E=w!==-1?v.substring(w+1):v,A,F;return b!==null&&(A=I.self/b*100,F=I.total/b*100),{functionHandle:Ko(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:A,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 $q(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 Gq(e){return e.split(",").map(t=>{let r=t.trim();return r.startsWith("field:")?{field:r.substring(6)}:r})}function Wq(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 Hq(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=Wq(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 Vq(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=Hq(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 jq(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={}){let a=o.searchString||"";a&&e.dispatch(Kh(a));try{let i=e.getState(),s=n!==void 0?t.threadIndexesForHandle(n):Je(i),l=ht(s),c=l.getFriendlyThreadName(i),u=l.getFullMarkerList(i),d=nt(i),f=ft(i),p=Rt(i),h=l.getFullMarkerListIndexes(i).length,y=a?l.getSearchFilteredMarkerIndexes(i):l.getFullMarkerListIndexes(i);y=$q(y,u,d,o);let b=to(L=>u[L],ge(i).meta.markerSchema,f,d,p,"tableLabel"),m=n??t.handleForThreadIndexes(s),{groupBy:g,autoGroup:T,topN:S}=o,I=S??5,v;if(g){let L=Gq(g),Q=[];for(let R of y)Q.push({marker:u[R],index:R});let N=dy(Q,L,d,s,r,b,0,I);v=uy(N)}let k=Vq(u,y,s,r,b,d,T||!1,I).map(L=>({markerName:L.markerName,count:L.count,isInterval:L.isInterval,durationStats:L.durationStats,rateStats:L.rateStats,topMarkers:L.topMarkers.map(Q=>({handle:Q.handle,label:Q.label,start:Q.start,duration:Q.duration,hasStack:Q.hasStack})),subGroups:L.subGroups?uy(L.subGroups):void 0,subGroupKey:L.subGroupKey})),A=jq(u,y,d).map(L=>({categoryName:L.categoryName,categoryIndex:d.findIndex(Q=>(Q==null?void 0:Q.name)===L.categoryName),count:L.count,percentage:L.percentage})),{minDuration:F,maxDuration:G,category:B,hasStack:Z,limit:X}=o,Ee=a||F!==void 0||G!==void 0||B!==void 0||Z||X!==void 0?{searchString:a||void 0,minDuration:F,maxDuration:G,category:B,hasStack:Z,limit:X}:void 0;return{type:"thread-markers",threadHandle:m,friendlyThreadName:c,totalMarkerCount:h,filteredMarkerCount:y.length,filters:Ee,byType:k,byCategory:A,customGroups:v}}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 E=Ba(u.data.type,w.format,k,p);m.push({key:w.key,label:w.label||w.key,value:k,formattedValue:E})}}}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),E=w.libs,A=MA(v.stack,k,E,v.time);if(A&&A.frames.length>0){let F=A.frames.length>20;T={frames:A.frames.slice(0,20),truncated:F,capturedAt:A.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(E=>{let A=f[E];return En(A)?A.data.status==="STATUS_STOP":!1}),y=h.length,b=h;if(o){let E=o.toLowerCase();b=b.filter(A=>f[A].data.URI.toLowerCase().includes(E))}(a!==void 0||i!==void 0)&&(b=b.filter(E=>{let A=f[E].data,F=A.endTime-A.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 E of b){let A=f[E].data,F=A.cache;F==="Hit"||F==="MemoryHit"||F==="Prefetched"?T++:F==="Miss"||F==="Unresolved"||F==="DiskStorage"||F==="Push"?S++:I++;let G=EA(A);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(E=>{let A=f[E].data,F=A.endTime-A.startTime;return{url:A.URI,httpStatus:A.responseStatus,httpVersion:A.httpVersion,cacheStatus:A.cache,transferSizeKB:A.count!==void 0?A.count/1024:void 0,startTime:A.startTime,duration:F,phases:EA(A)}});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 E=0;E<I.length;E++){let A=I.startTime[E];if(A===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 Q=u[G.level]??"";X=kp[Q]??"D",Z=G.message.trim()}else{if(!G.name)continue;let Q=G.module,N=Q.indexOf("/");N!==-1?(X=Q.slice(0,N),B=Q.slice(N+1)):(X="D",B=Q),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 Ee=cI(c+A),L=uI(Ee,v,w,k,G,B,u);L!==null&&b.push(L)}}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 qq={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 zq(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 Kq(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 Zq(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 Jq(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=qq[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 E=v.milestones.filter(H=>H.name!=="TTFI").map(H=>H.timeMs),A=E.length>0?Math.max(...E):k-w,F=w+A,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:Kq(se.URI),url:se.URI,durationMs:se.endTime-se.startTime,resourceType:zq(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,Ee=null;Z>0&&(X=G.reduce((z,se)=>z+se.durationMs,0)/Z,Ee=G[0].durationMs);let L=new Map;for(let H of G)L.set(H.resourceType,(L.get(H.resourceType)??0)+1);let Q=Array.from(L.entries()).sort((H,z)=>z[1]-H[1]).map(([H,z])=>({type:H,count:z,percentage:z/Z*100})),N=G.slice(0,10),R=Jq(y,h,w,F),M=R.reduce((H,z)=>H+z.count,0),P=B.length,Y=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 ee=y.samples.time[q];if(ee<se||ee>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=Zq(q,y);qe!==null&&fe.set(qe,(fe.get(qe)??0)+1)}let V=be===0?[]:Array.from(ue.entries()).sort((q,ee)=>ee[1]-q[1]).map(([q,ee])=>({name:q,count:ee,percentage:ee/be*100})),re=Array.from(fe.entries()).sort((q,ee)=>ee[1]-q[1]).slice(0,5).map(([q,ee])=>({name:q,sampleCount:ee}));return{startMs:se-w,durationMs:de-se,markerHandle:n.handleForMarker(l,H),startHandle:r.nameForTimestamp(se),endHandle:r.nameForTimestamp(de),topFunctions:re,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:Ee,resourcesByType:Q,topResources:N,totalSamples:M,categories:R,jankTotal:P,jankPeriods:Y}}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=Yq(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,Xq);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 Yq(e){return oo(e)}function Xq(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 E=Kd.parse(t.readBuffer(s));t.seekTo(I);let A=this._readNextFile();return E.applyHeader(A),A}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=e6(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,Qq);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 Qq(e){if(!("source"in e)||typeof e.source!="string")throw new Error('No string "source" property on API response');return e.source}function e6(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 L=c.lib[p];L!=null&&L>=0&&i.libs&&(h=i.libs[L].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),E=this._threadMap.handleForThreadIndexes(b),A=new Uint8Array(S.func.length);for(let L=0;L<S.func.length;L++)S.func[L]===u&&(A[L]=1);let F=new Int8Array(T.length);for(let L=0;L<T.length;L++){let Q=T.frame[L];if(A[Q])F[L]=1;else{let N=T.prefix[L];F[L]=N!==null?F[N]:-1}}let G=0,B=0;for(let L=0;L<w.length;L++){let Q=w.stack[L];if(Q===null)continue;let N=w.weight?w.weight[L]:1;F[Q]===1&&(B+=N),A[T.frame[Q]]&&(G+=N)}let Z=null;if(r==="src"||r==="all"){let L=s.source[u];if(L!==null){let Q=g.sources.filename[L],N=g.stringTable.getString(Q),R=g.sources.id[L],M=Su(T,S,I,L),{totalLineHits:P,selfLineHits:$}=xu(M,w),Y=0,H=0;for(let q=0;q<w.length;q++){let ee=w.stack[q];if(ee===null)continue;let Te=M.stackIndexToLineSetIndex[ee];if(Te===-1)continue;let Ne=w.weight?w.weight[q]:1;Y+=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 ee=S.nativeSymbol[q];if(ee!==null){let Te=v.libIndex[ee],Ne=i.libs[Te];Ne.debugName&&Ne.breakpadId&&(z={debugName:Ne.debugName,breakpadId:Ne.breakpadId,address:v.address[ee]});break}}let se=null,de=null,ue=await $A(N,R,n,z,this._archiveCache,GA);if(ue.type==="SUCCESS")se=ue.source.split(`
673
+ `),de=se.length;else{let q=ue.errors.map(ee=>JSON.stringify(ee)).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 ee=1;ee<=q;ee++)be.add(ee);V="full file"}else{let q=parseInt(o,10),ee=Math.max(0,isNaN(q)?2:q);be=new Set;for(let Te of fe)for(let Ne=Math.max(1,Te-ee);Ne<=Te+ee;Ne++)be.add(Ne);V=ee===0?"annotated lines only":`\xB1${ee} lines context`}let re=Array.from(be).sort((q,ee)=>q-ee);Z={filename:N,totalFileLines:de,samplesWithFunction:Y,samplesWithLineInfo:H,contextMode:V,lines:re.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 L=new Set;for(let R=0;R<S.func.length;R++)if(S.func[R]===u){let M=S.nativeSymbol[R];M!==null&&L.add(M)}L.size===0&&f.push(`Function ${t} has no native symbols \u2014 may be JS-only or not symbolicated.`);let Q=L.size,N=1;for(let R of L){let M=g.stringTable.getString(v.name[R]),P=v.address[R],$=v.functionSize[R]??null,Y=v.libIndex[R],H=i.libs[Y],z=Iu(T,S,I,R),{totalAddressHits:se,selfAddressHits:de}=vu(z,w),ue={name:M,address:P,functionSize:$??0,functionSizeIsKnown:$!==null,libIndex:Y},fe=null,be=[];try{let V=await UA(ue,H,n,GA);V.type==="SUCCESS"?be=V.instructions.map(re=>({address:re.address,selfSamples:de.get(re.address)??0,totalSamples:se.get(re.address)??0,decodedString:re.decodedString})):(fe=V.errors.map(re=>JSON.stringify(re)).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:Q,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")),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 t6(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-${t6(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="mo1ff7uj";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}
664
674
  `),t(...o)},console.error=(...o)=>{let a=o.map(i=>String(i)).join(" ");this.logStream.write(`[ERROR] ${new Date().toISOString()} ${a}
665
675
  `),r(...o)},console.warn=(...o)=>{let a=o.map(i=>String(i)).join(" ");this.logStream.write(`[WARN] ${new Date().toISOString()} ${a}
666
- `),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=WN.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:Al};UN(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(`
676
+ `),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=zA.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(`
667
677
  `))!==-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)+`
668
678
  `)}).catch(o=>{let a={type:"error",error:o instanceof Error?o.message:String(o)};r.write(JSON.stringify(a)+`
669
679
  `)})}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)+`
670
- `)}}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 oe(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);default:throw oe(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 oe(t)}case"sample":switch(t.subcommand){case"info":throw new Error("unimplemented");case"select":throw new Error("unimplemented");default:throw oe(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 oe(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 oe(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 oe(t)}case"status":return this.querier.getStatus();default:throw oe(t)}}shutdown(t){console.log(`Shutting down daemon (reason: ${t})`),this.server&&this.server.close(),gn(this.sessionDir,this.sessionId),this.logStream&&this.logStream.end(),console.log("Daemon stopped"),process.exit(0)}};async function HN(e,t,r){await new yy(e,t,r).start()}var VN=le(require("net")),tf=le(require("fs")),qN=le(require("path")),jN=le(require("child_process"));async function zN(e,t,r=3e4){return new Promise((n,o)=>{let a=VN.connect(e),i="";a.on("connect",()=>{a.write(JSON.stringify(t)+`
680
+ `)}}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 KA(e,t,r){await new Sy(e,t,r).start()}var ZA=ce(require("net")),tf=ce(require("fs")),JA=ce(require("path")),YA=ce(require("child_process"));async function XA(e,t,r=3e4){return new Promise((n,o)=>{let a=ZA.connect(e),i="";a.on("connect",()=>{a.write(JSON.stringify(t)+`
671
681
  `)}),a.on("data",s=>{i+=s.toString();let l=i.indexOf(`
672
- `);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 Vj(e,t,r,n){if(process.platform!=="win32"&&!tf.existsSync(r))return ua(n)?"still-running":(gn(e,t),"already-dead");try{let o=await zN(r,{type:"shutdown"},2e3);return o.type!=="success"?(console.error(`Failed to stop mismatched daemon for session ${t}: unexpected response ${o.type}`),ua(n)?"still-running":"already-dead"):await GN(n)?(gn(e,t),"stopped"):(console.error(`Mismatched daemon for session ${t} acknowledged shutdown but did not exit within timeout`),"still-running")}catch(o){return ua(n)?(console.error(`Failed to stop mismatched daemon for session ${t}: ${o}`),"still-running"):(gn(e,t),"already-dead")}}async function KN(e,t,r){let n=r||da(e);if(!n)throw new Error('No active session. Run "profiler-cli load <PATH>" first.');if(!ko(e,n))throw gn(e,n),new Error(`Session ${n} is not running or is invalid.`);let o=Xd(e,n);if(o&&o.buildHash!==Al){let i=await Vj(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?Mi(e,r):$N(e);if(!a||process.platform!=="win32"&&!tf.existsSync(a))throw new Error(`Socket not found for session ${n}`);return zN(a,t)}async function ZN(e,t,r){let n=await KN(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 qj(e,t){return KN(e,{type:"status"},t)}async function We(e,t,r){return ZN(e,{type:"command",command:t},r)}async function JN(e,t,r){let n=t.startsWith("http://")||t.startsWith("https://"),o=n?t:qN.resolve(t);if(!n&&!tf.existsSync(o))throw new Error(`Profile file not found: ${o}`);let a=r||Yd();if(r){if(ko(e,a))throw new Error(`Session ${a} is already running. Stop it first or choose a different session id.`);Xd(e,a)&&gn(e,a)}let i=process.argv[1];jN.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++,!ko(e,a)););if(!ko(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 qj(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 by(e,t){let r=t||da(e);if(!r)throw new Error("No active session to stop.");try{await ZN(e,{type:"shutdown"},r)}catch(n){console.error(`Note: ${n}`)}await new Promise(n=>setTimeout(n,500)),console.log(`Session ${r} stopped`)}me();function sr(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 YN(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?`
682
+ `);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 r6(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 XA(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 QA(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 r6(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 XA(a,t)}async function eP(e,t,r){let n=await QA(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 n6(e,t){return QA(e,{type:"status"},t)}async function He(e,t,r){return eP(e,{type:"command",command:t},r)}async function tP(e,t,r){let n=t.startsWith("http://")||t.startsWith("https://"),o=n?t:JA.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];YA.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 n6(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 eP(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 rP(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?`
673
683
  `+n.join(`
674
684
  `):`
675
685
  Filters: none`;return`Session Status:
676
686
  Selected thread: ${t}
677
- View range: ${r}${o}`}function XN(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(`
678
- `)}function QN(e){return`${sr(e.context)}
687
+ View range: ${r}${o}`}function nP(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(`
688
+ `)}function oP(e){return`${Xt(e.context)}
679
689
 
680
690
  Function ${e.functionHandle}:
681
- ${e.fullName}`}function eP(e){let r=`${sr(e.context)}
691
+ ${e.fullName}`}function aP(e){let r=`${Xt(e.context)}
682
692
 
683
693
  Function ${e.functionHandle}:
684
694
  Full name: ${e.fullName}
@@ -690,11 +700,11 @@ Function ${e.functionHandle}:
690
700
  Library path: ${e.library.path}`,e.library.debugName&&(r+=`
691
701
  Debug name: ${e.library.debugName}`),e.library.debugPath&&(r+=`
692
702
  Debug path: ${e.library.debugPath}`),e.library.breakpadId&&(r+=`
693
- Breakpad ID: ${e.library.breakpadId}`)),r}function tP(e){let t=e.message;return e.action==="push"&&e.duration!==void 0&&(t+=` (duration: ${ze(e.duration)})`,e.markerInfo&&(t+=`
703
+ Breakpad ID: ${e.library.breakpadId}`)),r}function iP(e){let t=e.message;return e.action==="push"&&e.duration!==void 0&&(t+=` (duration: ${Be(e.duration)})`,e.markerInfo&&(t+=`
694
704
  Zoomed to: Marker ${e.markerInfo.markerHandle} - ${e.markerInfo.markerName}`,t+=`
695
705
  Thread: ${e.markerInfo.threadHandle} (${e.markerInfo.threadName})`),e.zoomDepth!==void 0&&(t+=`
696
706
  Zoom depth: ${e.zoomDepth}${e.zoomDepth>1?' (use "profiler-cli zoom pop" to go back)':""}`)),e.warning&&(t+=`
697
- Warning: ${e.warning}`),t}function rP(e){let t=sr(e.context),r=e.endedAtName||"still alive at end of recording",n=`${t}
707
+ Warning: ${e.warning}`),t}function sP(e){let t=Xt(e.context),r=e.endedAtName||"still alive at end of recording",n=`${t}
698
708
 
699
709
  Name: ${e.friendlyName}
700
710
  TID: ${e.tid}
@@ -705,22 +715,22 @@ This thread contains ${e.sampleCount} samples and ${e.markerCount} markers.
705
715
 
706
716
  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+=`
707
717
  ${a}- ${i}% for ${o.cpuMs.toFixed(1)}ms: [${o.startTimeName} \u2192 ${o.endTimeName}] (${o.startTimeStr} - ${o.endTimeStr})`}else n+=`
708
- No significant activity.`;return n}function nP(e){let r=`${sr(e.context)}
718
+ No significant activity.`;return n}function lP(e){let r=`${Xt(e.context)}
709
719
 
710
720
  Stack trace for marker ${e.markerHandle}: ${e.markerName}
711
721
  `;if(r+=`Thread: ${e.threadHandle} (${e.friendlyThreadName})`,!e.stack||e.stack.frames.length===0)return r+`
712
722
 
713
723
  (This marker has no stack trace)`;if(e.stack.capturedAt!==void 0){let n=e.context.rootRange.start;r+=`
714
- Captured at: ${ze(e.stack.capturedAt-n)}
724
+ Captured at: ${Be(e.stack.capturedAt-n)}
715
725
  `}for(let n=0;n<e.stack.frames.length;n++){let o=e.stack.frames[n];r+=`
716
726
  [${n+1}] ${o.nameWithLibrary}`}return e.stack.truncated&&(r+=`
717
- ... (truncated)`),r}function oP(e){var a;let r=`${sr(e.context)}
727
+ ... (truncated)`),r}function cP(e){var a;let r=`${Xt(e.context)}
718
728
 
719
729
  Marker ${e.markerHandle}: ${e.name}`;e.tooltipLabel&&(r+=` - ${e.tooltipLabel}`),r+=`
720
730
 
721
731
  `,r+=`Type: ${e.markerType??"None"}
722
732
  `,r+=`Category: ${e.category.name}
723
- `;let n=e.context.rootRange.start,o=ze(e.start-n);if(e.end!==null){let i=ze(e.end-n),s=ze(e.duration);r+=`Time: ${o} - ${i} (${s})
733
+ `;let n=e.context.rootRange.start,o=Be(e.start-n);if(e.end!==null){let i=Be(e.end-n),s=Be(e.duration);r+=`Time: ${o} - ${i} (${s})
724
734
  `}else r+=`Time: ${o} (instant)
725
735
  `;if(r+=`Thread: ${e.threadHandle} (${e.friendlyThreadName})
726
736
  `,e.fields&&e.fields.length>0){r+=`
@@ -731,11 +741,11 @@ Description:
731
741
  `,r+=` ${e.schema.description}
732
742
  `),e.stack&&e.stack.frames.length>0){r+=`
733
743
  Stack trace:
734
- `,e.stack.capturedAt!==void 0&&(r+=` Captured at: ${ze(e.stack.capturedAt-n)}
744
+ `,e.stack.capturedAt!==void 0&&(r+=` Captured at: ${Be(e.stack.capturedAt-n)}
735
745
  `);for(let i=0;i<e.stack.frames.length;i++){let s=e.stack.frames[i];r+=` [${i+1}] ${s.nameWithLibrary}
736
746
  `}e.stack.truncated&&(r+=`
737
747
  Use 'profiler-cli marker stack ${e.markerHandle}' for the full stack trace.
738
- `)}return r}function aP(e){let r=`${sr(e.context)}
748
+ `)}return r}function uP(e){let r=`${Xt(e.context)}
739
749
 
740
750
  Name: ${e.name}
741
751
  `;if(r+=`Platform: ${e.platform}
@@ -752,8 +762,8 @@ ${n}
752
762
  CPU activity over time:
753
763
  `,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})
754
764
  `}else r+=`No significant activity.
755
- `;return r}function iP(e,t,r,n,o,a){let i=e.totalPercentage.toFixed(1),s=e.selfPercentage.toFixed(1),l=qn(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;iP(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 sP(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;iP(a,"",!1,i,0,n)}else r&&n.push(r);return n.join(`
756
- `)}function lP(e){var l,c;let t=sr(e.context,e.activeFilters,e.ephemeralFilters),r=e.activeOnly?`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
765
+ `;return r}function dP(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;dP(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 fP(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;dP(a,"",!1,i,0,n)}else r&&n.push(r);return n.join(`
766
+ `)}function pP(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.
757
767
 
758
768
  `:"",n=e.search?`Search: "${e.search}"
759
769
 
@@ -770,20 +780,20 @@ Tip: --search keeps samples with a matching frame anywhere in the stack.
770
780
  `,i;i+=`Top Functions (by total time):
771
781
  `,i+=` (For a call tree starting from these functions, use: profiler-cli thread samples-top-down)
772
782
 
773
- `;for(let u of e.topFunctionsByTotal){let d=Math.round(u.totalSamples),f=u.totalPercentage.toFixed(1),p=qn(u.nameWithLibrary,120);i+=` ${u.functionHandle}. ${p} - total: ${d} (${f}%)
783
+ `;for(let u of e.topFunctionsByTotal){let d=Math.round(u.totalSamples),f=u.totalPercentage.toFixed(1),p=gn(u.nameWithLibrary,120);i+=` ${u.functionHandle}. ${p} - total: ${d} (${f}%)
774
784
  `}i+=`
775
785
  `,i+=`Top Functions (by self time):
776
786
  `,i+=` (For a call tree showing what calls these functions, use: profiler-cli thread samples-bottom-up)
777
787
 
778
- `;for(let u of e.topFunctionsBySelf){let d=Math.round(u.selfSamples),f=u.selfPercentage.toFixed(1),p=qn(u.nameWithLibrary,120);i+=` ${u.functionHandle}. ${p} - self: ${d} (${f}%)
788
+ `;for(let u of e.topFunctionsBySelf){let d=Math.round(u.selfSamples),f=u.selfPercentage.toFixed(1),p=gn(u.nameWithLibrary,120);i+=` ${u.functionHandle}. ${p} - self: ${d} (${f}%)
779
789
  `}i+=`
780
790
  `;let s=e.heaviestStack;if(i+=`Heaviest stack (${s.selfSamples.toFixed(1)} samples, ${s.frameCount} frames):
781
791
  `,s.frames.length===0)i+=` (empty)
782
- `;else if(s.frameCount<=200)for(let u=0;u<s.frames.length;u++){let d=s.frames[u],f=qn(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}%)
783
- `}else{for(let d=0;d<100;d++){let f=s.frames[d],p=qn(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}%)
792
+ `;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}%)
793
+ `}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}%)
784
794
  `}let u=s.frameCount-200;i+=` ... (${u} frames skipped)
785
- `;for(let d=s.frameCount-100;d<s.frameCount;d++){let f=s.frames[d],p=qn(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}%)
786
- `}}return i}function cP(e){var l,c;let t=sr(e.context,e.activeFilters,e.ephemeralFilters),r=e.activeOnly?`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
795
+ `;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}%)
796
+ `}}return i}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.
787
797
 
788
798
  `:"",n=e.search?`Search: "${e.search}"
789
799
 
@@ -795,7 +805,7 @@ Thread: ${e.friendlyThreadName}
795
805
 
796
806
  ${r}${n}${a}`,s=e.search?`No samples matched --search "${e.search}".
797
807
  Tip: use comma to require multiple terms (all must appear), e.g. --search "foo,bar".
798
- "|" is treated as a literal character, not OR.`:void 0;return i+=sP(e.regularCallTree,"Top-Down",s),i}function uP(e){var s,l;let t=sr(e.context,e.activeFilters,e.ephemeralFilters),r=e.activeOnly?`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
808
+ "|" is treated as a literal character, not OR.`:void 0;return i+=fP(e.regularCallTree,"Top-Down",s),i}function mP(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.
799
809
 
800
810
  `:"",n=e.search?`Search: "${e.search}"
801
811
 
@@ -807,24 +817,26 @@ Thread: ${e.friendlyThreadName}
807
817
 
808
818
  ${r}${n}${a}`;if(e.invertedCallTree){let c=e.search?`No samples matched --search "${e.search}".
809
819
  Tip: use comma to require multiple terms (all must appear), e.g. --search "foo,bar".
810
- "|" is treated as a literal character, not OR.`:void 0;i+=sP(e.invertedCallTree,"Bottom-Up",c)}else i+=`Bottom-Up Call Tree:
811
- (unable to create bottom-up tree)`;return i}function dP(e){let r=[sr(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
820
+ "|" is treated as a literal character, not OR.`:void 0;i+=fP(e.invertedCallTree,"Bottom-Up",c)}else i+=`Bottom-Up Call Tree:
821
+ (unable to create bottom-up tree)`;return i}function gP(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
812
822
  `),e.filteredMarkerCount===0)return n?r.push("No markers match the specified filters."):r.push("No markers in this thread."),r.join(`
813
- `);if(e.customGroups&&e.customGroups.length>0)Ty(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=${ze(c)}, avg=${ze(u)}, max=${ze(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} (${ze(u.duration)})`:f}).join(", ");r.push(` Examples: ${c}`)}s.subGroups&&s.subGroups.length>0&&(s.subGroupKey&&r.push(` Grouped by ${s.subGroupKey}:`),Ty(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=${ze(c)}, avg=${ze(u)}, max=${ze(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(`
814
- `)}function Ty(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=${ze(i)}, max=${ze(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} (${ze(s.duration)})`:c}).join(", ");e.push(`${o} Examples: ${i}`)}n.subGroups&&n.subGroups.length>0&&Ty(e,n.subGroups,r+1)}}function ze(e){return e<1?`${(e*1e3).toFixed(0)}\xB5s`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}function fP(e){var i;let r=[sr(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}
823
+ `);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=${Be(c)}, avg=${Be(u)}, max=${Be(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} (${Be(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=${Be(c)}, avg=${Be(u)}, max=${Be(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(`
824
+ `)}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=${Be(i)}, max=${Be(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} (${Be(s.duration)})`:c}).join(", ");e.push(`${o} Examples: ${i}`)}n.subGroups&&n.subGroups.length>0&&Iy(e,n.subGroups,r+1)}}function Be(e){return e<1?`${(e*1e3).toFixed(0)}\xB5s`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}function yP(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}
815
825
  `),e.activeOnly&&r.push(`Note: active samples only (idle excluded) \u2014 use --include-idle to include idle samples.
816
826
  `),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(`
817
827
  `);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(", ")}
818
- `),r.push("Functions (by self time):");for(let s of e.functions){let l=Math.round(s.selfSamples),c=Math.round(s.totalSamples),u=qn(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(`
828
+ `),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(`
819
829
  ... (${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(`
820
- `)}function jj(e){let t=[];return e.dns!==void 0&&t.push(`DNS=${ze(e.dns)}`),e.tcp!==void 0&&t.push(`TCP=${ze(e.tcp)}`),e.tls!==void 0&&t.push(`TLS=${ze(e.tls)}`),e.ttfb!==void 0&&t.push(`TTFB=${ze(e.ttfb)}`),e.download!==void 0&&t.push(`DL=${ze(e.download)}`),e.mainThread!==void 0&&t.push(`wait=${ze(e.mainThread)}`),t.join(" ")}function pP(e){let t=[sr(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: ${ze(i.dns)}`),i.tcp!==void 0&&t.push(` TCP connect: ${ze(i.tcp)}`),i.tls!==void 0&&t.push(` TLS: ${ze(i.tls)}`),i.ttfb!==void 0&&t.push(` TTFB: ${ze(i.ttfb)}`),i.download!==void 0&&t.push(` Download: ${ze(i.download)}`),i.mainThread!==void 0&&t.push(` Main thread wait: ${ze(i.mainThread)}`)),t.push(""),e.requests.length===0)return t.push("No network requests match the specified filters."),t.join(`
821
- `);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=${ze(l.duration)}`);let h=jj(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(`
822
- `)}function hP(e){let t=sr(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(`
823
- `)}function mP(e){let t=[sr(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(`
830
+ `)}function o6(e){let t=[];return e.dns!==void 0&&t.push(`DNS=${Be(e.dns)}`),e.tcp!==void 0&&t.push(`TCP=${Be(e.tcp)}`),e.tls!==void 0&&t.push(`TLS=${Be(e.tls)}`),e.ttfb!==void 0&&t.push(`TTFB=${Be(e.ttfb)}`),e.download!==void 0&&t.push(`DL=${Be(e.download)}`),e.mainThread!==void 0&&t.push(`wait=${Be(e.mainThread)}`),t.join(" ")}function bP(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: ${Be(i.dns)}`),i.tcp!==void 0&&t.push(` TCP connect: ${Be(i.tcp)}`),i.tls!==void 0&&t.push(` TLS: ${Be(i.tls)}`),i.ttfb!==void 0&&t.push(` TTFB: ${Be(i.ttfb)}`),i.download!==void 0&&t.push(` Download: ${Be(i.download)}`),i.mainThread!==void 0&&t.push(` Main thread wait: ${Be(i.mainThread)}`)),t.push(""),e.requests.length===0)return t.push("No network requests match the specified filters."),t.join(`
831
+ `);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=${Be(l.duration)}`);let h=o6(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(`
832
+ `)}function TP(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(`
833
+ `)}function SP(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(`
824
834
  `);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(`
825
- `)}function He(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 YN(e);case"filter-stack":return XN(e);case"function-expand":return QN(e);case"function-info":return eP(e);case"function-annotate":return hP(e);case"view-range":return tP(e);case"thread-info":return rP(e);case"marker-stack":return nP(e);case"marker-info":return oP(e);case"profile-info":return aP(e);case"thread-samples":return lP(e);case"thread-samples-top-down":return cP(e);case"thread-samples-bottom-up":return uP(e);case"thread-markers":return dP(e);case"thread-functions":return fP(e);case"thread-network":return pP(e);case"profile-logs":return mP(e);default:throw oe(e)}}me();function jn(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 Nl(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 gP(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 oe(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 Ve(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 Tn("--excludes-function <f-N>","Drop samples containing this function").argParser(jn).default([])).addOption(new Tn("--excludes-any-function <f-N>","Drop samples containing any of these functions (OR)").argParser(jn).default([])).addOption(new Tn("--merge <f-N,...>","Merge (remove) functions from stacks").argParser(jn).default([])).addOption(new Tn("--root-at <f-N>","Re-root stacks at this function").argParser(jn).default([])).addOption(new Tn("--includes-function <f-N,...>","Keep only samples whose stack contains any of these functions").argParser(jn).default([])).addOption(new Tn("--includes-any-function <f-N,...>","Alias for --includes-function (explicit OR form)").argParser(jn).default([])).addOption(new Tn("--includes-prefix <f-N,...>","Keep only samples whose stack starts with this root-first sequence").argParser(jn).default([])).addOption(new Tn("--includes-suffix <f-N>","Keep only samples whose leaf frame is this function").argParser(jn).default([])).option("--during-marker","Keep only samples during matching markers (requires --search)").option("--outside-marker","Keep only samples outside matching markers (requires --search)")}function yP(e,t){let r=e.command("profile").description("Profile-level commands");Ve(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 We(t,{command:"profile",subcommand:"info",all:o.all,search:o.search},o.session);console.log(He(a,o.json??!1))});let n=["error","warn","info","debug","verbose"];Ve(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 We(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(He(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 TP(e){return Pl(Ve(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 bP(e){return TP(e).option("--max-lines <N>","Maximum nodes in call tree (default: 100)").option("--scoring <strategy>",`Call tree scoring strategy: ${Rl.join(", ")}`)}function SP(e,t){let r=e.command("thread").description("Thread-level commands");Ve(r.command("info").description("Print detailed thread information").option("--thread <handle>","Thread handle (e.g. t-0)")).action(async n=>{let o=await We(t,{command:"thread",subcommand:"info",thread:n.thread},n.session);console.log(He(o,n.json??!1))}),Ve(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 We(t,{command:"thread",subcommand:"select",thread:a},o.session);console.log(He(i,o.json??!1))}),TP(r.command("samples").description("Show hot functions list for a thread")).action(async n=>{let o=Nl(n),a=await We(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(He(a,n.json??!1))}),bP(r.command("samples-top-down").description("Show top-down call tree (where CPU time is spent)")).action(async n=>{let o=Nl(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 We(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(He(i,n.json??!1))}),bP(r.command("samples-bottom-up").description("Show bottom-up call tree (what calls hot functions)")).action(async n=>{let o=Nl(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 We(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(He(i,n.json??!1))}),Ve(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)")).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){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.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 We(t,{command:"thread",subcommand:"markers",thread:n.thread,markerFilters:o},n.session);console.log(He(a,n.json??!1))}),Ve(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 We(t,{command:"thread",subcommand:"network",thread:n.thread,networkFilters:o},n.session);console.log(He(a,n.json??!1))}),Pl(Ve(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=Nl(n),i=await We(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(He(i,n.json??!1))})}function xP(e,t){let r=e.command("marker").description("Marker-level commands");Ve(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 We(t,{command:"marker",subcommand:"info",marker:a},o.session);console.log(He(i,o.json??!1))}),Ve(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 We(t,{command:"marker",subcommand:"stack",marker:a},o.session);console.log(He(i,o.json??!1))})}function IP(e,t){let r=e.command("function").description("Function-level commands");Ve(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 We(t,{command:"function",subcommand:"expand",function:a},o.session);console.log(He(i,o.json??!1))}),Ve(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 We(t,{command:"function",subcommand:"info",function:a},o.session);console.log(He(i,o.json??!1))}),Ve(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 We(t,{command:"function",subcommand:"annotate",function:a,annotateMode:o.mode,symbolServerUrl:o.symbolServer,annotateContext:o.context},o.session);console.log(He(i,o.json??!1))})}function vP(e,t){let r=e.command("zoom").description("Manage zoom ranges");Ve(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 We(t,{command:"zoom",subcommand:"push",range:n},o.session);console.log(He(a,o.json??!1))}),Ve(r.command("pop").description("Pop the most recent zoom range")).action(async n=>{let o=await We(t,{command:"zoom",subcommand:"pop"},n.session);console.log(He(o,n.json??!1))}),Ve(r.command("clear").description("Clear all zoom ranges (return to full profile)")).action(async n=>{let o=await We(t,{command:"zoom",subcommand:"clear"},n.session);console.log(He(o,n.json??!1))})}function wP(e,t){let r=e.command("filter").description("Manage sticky sample filters");Pl(Ve(r.command("push").description("Push a sticky sample filter").option("--thread <handle>","Thread handle"))).action(async n=>{let o=gP({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 We(t,{command:"filter",subcommand:"push",thread:n.thread,spec:o},n.session);console.log(He(a,n.json??!1))}),Ve(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 We(t,{command:"filter",subcommand:"pop",thread:o.thread,count:i},o.session);console.log(He(s,o.json??!1))}),Ve(r.command("list",{isDefault:!0}).description("List active filters for current thread").option("--thread <handle>","Thread handle")).action(async n=>{let o=await We(t,{command:"filter",subcommand:"list",thread:n.thread},n.session);console.log(He(o,n.json??!1)),rf("filter","list")||console.log(`
826
- Other subcommands: profiler-cli filter <push|pop|clear> [options]`)}),Ve(r.command("clear").description("Remove all filters for current thread").option("--thread <handle>","Thread handle")).action(async n=>{let o=await We(t,{command:"filter",subcommand:"clear",thread:n.thread},n.session);console.log(He(o,n.json??!1))})}function kP(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=ko(t,s);if(l===null){gn(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=da(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(`
827
- Other subcommands: profiler-cli session use <id>`)}),r.command("use <id>").description("Switch the current session").action(n=>{ko(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||_P.join(CP.homedir(),".profiler-cli");async function zj(){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 HN(yr,n,a);return}let t=new nb;t.name("profiler-cli").description("Profiler CLI \u2014 query Firefox profiles from the terminal").helpOption("-h, --help","Show help").addHelpCommand("help [command]","Show help for a command").addHelpText("after",`
835
+ `)}function xP(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(`
836
+ `);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: ${Be(e.resourceAvgMs)}`),e.resourceMaxMs!==null&&t.push(` Max duration: ${Be(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=Be(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(`
837
+ `)}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 rP(e);case"filter-stack":return nP(e);case"function-expand":return oP(e);case"function-info":return aP(e);case"function-annotate":return TP(e);case"view-range":return iP(e);case"thread-info":return sP(e);case"marker-stack":return lP(e);case"marker-info":return cP(e);case"profile-info":return uP(e);case"thread-samples":return pP(e);case"thread-samples-top-down":return hP(e);case"thread-samples-bottom-up":return mP(e);case"thread-markers":return gP(e);case"thread-functions":return yP(e);case"thread-network":return bP(e);case"profile-logs":return SP(e);case"thread-page-load":return xP(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 IP(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 vP(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 kP(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 wP(e){return kP(e).option("--max-lines <N>","Maximum nodes in call tree (default: 100)").option("--scoring <strategy>",`Call tree scoring strategy: ${Rl.join(", ")}`)}function _P(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))}),kP(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))}),wP(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))}),wP(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)")).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){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.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 CP(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 EP(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 NP(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 AP(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=IP({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(`
838
+ 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 PP(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(`
839
+ 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||RP.join(MP.homedir(),".profiler-cli");async function a6(){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 KA(yr,n,a);return}let t=new ib;t.name("profiler-cli").description("Profiler CLI \u2014 query Firefox profiles from the terminal").helpOption("-h, --help","Show help").addHelpCommand("help [command]","Show help for a command").addHelpText("after",`
828
840
  Examples:
829
841
  profiler-cli load profile.json.gz
830
842
  profiler-cli profile info
@@ -835,8 +847,8 @@ Examples:
835
847
  profiler-cli zoom push 2.7,3.1
836
848
  profiler-cli filter push --excludes-function f-184
837
849
  profiler-cli status
838
- profiler-cli stop --all`),t.action(()=>{console.error(`Error: No command specified
839
- `),t.outputHelp(),process.exit(1)}),Ve(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 JN(yr,r,n.session);console.log(`Session started: ${o}`)}),Ve(t.command("status").description("Show session status (selected thread, zoom ranges, filters)")).action(async r=>{let n=await We(yr,{command:"status"},r.session);console.log(He(n,r.json??!1))}),Ve(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=>by(yr,a)))}else{let o=r??n.session;await by(yr,o)}}),t.command("guide").description("Show detailed usage guide (commands, patterns, tips)").action(()=>{console.log(ob)}),t.command("schemas").description("Show JSON output schemas for all commands").action(()=>{console.log(ab)}),yP(t,yr),SP(t,yr),xP(t,yr),IP(t,yr),vP(t,yr),wP(t,yr),kP(t,yr);try{await t.parseAsync(process.argv)}catch(r){console.error(`Error: ${r instanceof Error?r.message:r}`),process.exit(1)}}zj().catch(e=>{console.error(`Fatal error: ${e}`),process.exit(1)});
850
+ profiler-cli stop --all`),t.on("command:*",r=>{console.error(`Error: Unknown command '${r[0]}'
851
+ `),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 tP(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)}),vP(t,yr),_P(t,yr),CP(t,yr),EP(t,yr),NP(t,yr),AP(t,yr),PP(t,yr);try{await t.parseAsync(process.argv)}catch(r){console.error(`Error: ${r instanceof Error?r.message:r}`),process.exit(1)}}a6().catch(e=>{console.error(`Fatal error: ${e}`),process.exit(1)});
840
852
  /*! Bundled license information:
841
853
 
842
854
  react/cjs/react.production.min.js: