@stigg/react-sdk 7.12.0 → 7.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stigg-sdk.cjs.js +174 -174
- package/dist/stigg-sdk.esm.js +174 -174
- package/package.json +1 -1
package/dist/stigg-sdk.cjs.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict';var Bv=require('react'),rC=require('@emotion/styled'),
|
|
2
|
-
`),v=r.split(/\r\n|[\n\r]/g),P=v[i];if(P.length>120){for(var x=Math.floor(p/80),T=p%80,I=[],R=0;R<P.length;R+=80)I.push(P.slice(R,R+80));return h+xx([["".concat(s),I[0]]].concat(I.slice(1,x+1).map(function(A){return ["",A]}),[[" ",Gm(T-1)+"^"],["",I[x+1]]]))}return h+xx([["".concat(s-1),v[i-1]],["".concat(s),P],["",Gm(p-1)+"^"],["".concat(s+1),v[i+1]]])}function xx(t){var e=t.filter(function(r){r[0];var o=r[1];return o!==void 0}),n=Math.max.apply(Math,e.map(function(r){var i=r[0];return i.length}));return e.map(function(r){var i=r[0],o=r[1];return
|
|
3
|
-
`)}function Gm(t){return Array(t+1).join(" ")}function
|
|
1
|
+
'use strict';var Bv=require('react'),rC=require('@emotion/styled'),R2=require('classnames'),da=require('@mui/material/Grid'),react=require('@emotion/react'),jsxRuntime=require('react/jsx-runtime'),lodash=require('lodash'),KD=require('react-spinners/ClipLoader'),sc=require('color'),HD=require('lodash/merge'),$1=require('moment'),lm=require('lodash/isNil'),a2=require('currency-symbol-map'),h2=require('@mui/material/InputAdornment'),s2=require('@mui/material/Button'),u2=require('@mui/material/TextField'),zP=require('@mui/material/Divider'),nl=require('react-loading-skeleton'),m2=require('@mui/material/OutlinedInput'),g2=require('@mui/material/Select'),y2=require('@mui/material/MenuItem'),material=require('@mui/material'),iA=require('react-switch'),px=require('lodash/sortBy'),styles=require('@mui/material/styles'),rO=require('lodash/flatMap'),bg=require('@mui/material/Box'),sP=require('@mui/material/Tab'),iO=require('lodash/isEmpty'),uO=require('@mui/material/Tabs'),reactFeather=require('react-feather'),WO=require('@mui/material/Link'),GO=require('@mui/material/Tooltip'),KO=require('@mui/material/LinearProgress'),ZP=require('lodash/isUndefined'),uv=require('lodash/lowerCase'),immer=require('immer'),SR=require('lodash/cloneDeep'),PR=require('lodash/remove'),lE=require('lodash/keyBy'),cE=require('lodash/compact'),reactStripeJs=require('@stripe/react-stripe-js'),h3=require('@mui/material/StepIcon'),wL=require('lodash/partition'),T3=require('@mui/material/CircularProgress'),AL=require('@mui/material/Paper'),K3=require('react-lottie'),xL=require('@mui/material/Collapse'),e5=require('@mui/material/Alert'),t5=require('@mui/material/Radio'),l5=require('@mui/material/Chip'),reactChartjs2=require('react-chartjs-2'),r9=require('lodash/debounce');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Bv__default=/*#__PURE__*/_interopDefault(Bv);var rC__default=/*#__PURE__*/_interopDefault(rC);var R2__default=/*#__PURE__*/_interopDefault(R2);var da__default=/*#__PURE__*/_interopDefault(da);var KD__default=/*#__PURE__*/_interopDefault(KD);var sc__default=/*#__PURE__*/_interopDefault(sc);var HD__default=/*#__PURE__*/_interopDefault(HD);var $1__default=/*#__PURE__*/_interopDefault($1);var lm__default=/*#__PURE__*/_interopDefault(lm);var a2__default=/*#__PURE__*/_interopDefault(a2);var h2__default=/*#__PURE__*/_interopDefault(h2);var s2__default=/*#__PURE__*/_interopDefault(s2);var u2__default=/*#__PURE__*/_interopDefault(u2);var zP__default=/*#__PURE__*/_interopDefault(zP);var nl__default=/*#__PURE__*/_interopDefault(nl);var m2__default=/*#__PURE__*/_interopDefault(m2);var g2__default=/*#__PURE__*/_interopDefault(g2);var y2__default=/*#__PURE__*/_interopDefault(y2);var iA__default=/*#__PURE__*/_interopDefault(iA);var px__default=/*#__PURE__*/_interopDefault(px);var rO__default=/*#__PURE__*/_interopDefault(rO);var bg__default=/*#__PURE__*/_interopDefault(bg);var sP__default=/*#__PURE__*/_interopDefault(sP);var iO__default=/*#__PURE__*/_interopDefault(iO);var uO__default=/*#__PURE__*/_interopDefault(uO);var WO__default=/*#__PURE__*/_interopDefault(WO);var GO__default=/*#__PURE__*/_interopDefault(GO);var KO__default=/*#__PURE__*/_interopDefault(KO);var ZP__default=/*#__PURE__*/_interopDefault(ZP);var uv__default=/*#__PURE__*/_interopDefault(uv);var SR__default=/*#__PURE__*/_interopDefault(SR);var PR__default=/*#__PURE__*/_interopDefault(PR);var lE__default=/*#__PURE__*/_interopDefault(lE);var cE__default=/*#__PURE__*/_interopDefault(cE);var h3__default=/*#__PURE__*/_interopDefault(h3);var wL__default=/*#__PURE__*/_interopDefault(wL);var T3__default=/*#__PURE__*/_interopDefault(T3);var AL__default=/*#__PURE__*/_interopDefault(AL);var K3__default=/*#__PURE__*/_interopDefault(K3);var xL__default=/*#__PURE__*/_interopDefault(xL);var e5__default=/*#__PURE__*/_interopDefault(e5);var t5__default=/*#__PURE__*/_interopDefault(t5);var l5__default=/*#__PURE__*/_interopDefault(l5);var r9__default=/*#__PURE__*/_interopDefault(r9);var jk=Object.create;var Ip=Object.defineProperty,Vk=Object.defineProperties,zk=Object.getOwnPropertyDescriptor,Hk=Object.getOwnPropertyDescriptors,Wk=Object.getOwnPropertyNames,Zh=Object.getOwnPropertySymbols,qk=Object.getPrototypeOf,fb=Object.prototype.hasOwnProperty,Y1=Object.prototype.propertyIsEnumerable;var q1=(t,e,n)=>e in t?Ip(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n,W=(t,e)=>{for(var n in e||(e={}))fb.call(e,n)&&q1(t,n,e[n]);if(Zh)for(var n of Zh(e))Y1.call(e,n)&&q1(t,n,e[n]);return t},St=(t,e)=>Vk(t,Hk(e));var On=(t,e)=>{var n={};for(var r in t)fb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Zh)for(var r of Zh(t))e.indexOf(r)<0&&Y1.call(t,r)&&(n[r]=t[r]);return n};var Wn=(t,e)=>()=>(t&&(e=t(t=0)),e);var Yk=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Q1=(t,e)=>{for(var n in e)Ip(t,n,{get:e[n],enumerable:true});},K1=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Wk(e))!fb.call(t,i)&&i!==n&&Ip(t,i,{get:()=>e[i],enumerable:!(r=zk(e,i))||r.enumerable});return t};var X1=(t,e,n)=>(n=t!=null?jk(qk(t)):{},K1(!t||!t.__esModule?Ip(n,"default",{value:t,enumerable:true}):n,t)),Qk=t=>K1(Ip({},"__esModule",{value:true}),t);var ce=(t,e,n)=>new Promise((r,i)=>{var o=p=>{try{c(n.next(p));}catch(h){i(h);}},s=p=>{try{c(n.throw(p));}catch(h){i(h);}},c=p=>p.done?r(p.value):Promise.resolve(p.value).then(o,s);c((n=n.apply(t,e)).next());});var Wp,Sx=Wn(()=>{Wp=function(){return Wp=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);}return e},Wp.apply(this,arguments)};});function Um(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Um=function(n){return typeof n}:Um=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Um(t)}function fv(t){return Um(t)=="object"&&t!==null}var Px=Wn(()=>{});var $m,hv=Wn(()=>{$m=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";});function Wu(t,e){for(var n=/\r\n|[\n\r]/g,r=1,i=e+1,o;(o=n.exec(t.body))&&o.index<e;)r+=1,i=e+1-(o.index+o[0].length);return {line:r,column:i}}var mv=Wn(()=>{});function gv(t){return jm(t.source,Wu(t.source,t.start))}function jm(t,e){var n=t.locationOffset.column-1,r=Gm(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,c=e.line===1?n:0,p=e.column+c,h="".concat(t.name,":").concat(s,":").concat(p,`
|
|
2
|
+
`),v=r.split(/\r\n|[\n\r]/g),P=v[i];if(P.length>120){for(var x=Math.floor(p/80),T=p%80,I=[],R=0;R<P.length;R+=80)I.push(P.slice(R,R+80));return h+xx([["".concat(s),I[0]]].concat(I.slice(1,x+1).map(function(A){return ["",A]}),[[" ",Gm(T-1)+"^"],["",I[x+1]]]))}return h+xx([["".concat(s-1),v[i-1]],["".concat(s),P],["",Gm(p-1)+"^"],["".concat(s+1),v[i+1]]])}function xx(t){var e=t.filter(function(r){r[0];var o=r[1];return o!==void 0}),n=Math.max.apply(Math,e.map(function(r){var i=r[0];return i.length}));return e.map(function(r){var i=r[0],o=r[1];return AR(n,i)+(o?" | "+o:" |")}).join(`
|
|
3
|
+
`)}function Gm(t){return Array(t+1).join(" ")}function AR(t,e){return Gm(t-e.length)+e}var Ex=Wn(()=>{mv();});function Vm(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vm=function(n){return typeof n}:Vm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vm(t)}function _x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r);}return n}function OR(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_x(Object(n),true).forEach(function(r){RR(t,r,n[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_x(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r));});}return t}function RR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true}):t[e]=n,t}function FR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||false,r.configurable=true,"value"in r&&(r.writable=true),Object.defineProperty(t,r.key,r);}}function MR(t,e,n){return e&&Tx(t.prototype,e),t}function NR(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:true,configurable:true}}),e&&Yp(t,e);}function LR(t){var e=kx();return function(){var r=Qp(t),i;if(e){var o=Qp(this).constructor;i=Reflect.construct(r,arguments,o);}else i=r.apply(this,arguments);return Ix(this,i)}}function Ix(t,e){return e&&(Vm(e)==="object"||typeof e=="function")?e:qp(t)}function qp(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yv(t){var e=typeof Map=="function"?new Map:void 0;return yv=function(r){if(r===null||!BR(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(r))return e.get(r);e.set(r,i);}function i(){return zm(r,arguments,Qp(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:false,writable:true,configurable:true}}),Yp(i,r)},yv(t)}function zm(t,e,n){return kx()?zm=Reflect.construct:zm=function(i,o,s){var c=[null];c.push.apply(c,o);var p=Function.bind.apply(i,c),h=new p;return s&&Yp(h,s.prototype),h},zm.apply(null,arguments)}function kx(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return false;if(typeof Proxy=="function")return true;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return false}}function BR(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Yp(t,e){return Yp=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Yp(t,e)}function Qp(t){return Qp=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Qp(t)}function wx(t){return t===void 0||t.length===0?void 0:t}function UR(t){var e=t.message;if(t.nodes)for(var n=0,r=t.nodes;n<r.length;n++){var i=r[n];i.loc&&(e+=`
|
|
4
4
|
|
|
5
5
|
`+gv(i.loc));}else if(t.source&&t.locations)for(var o=0,s=t.locations;o<s.length;o++){var c=s[o];e+=`
|
|
6
6
|
|
|
7
|
-
`+jm(t.source,c);}return e}var Dx,Ax=Wn(()=>{Px();hv();mv();Ex();Dx=(function(t){
|
|
8
|
-
`)}function zx(t){for(var e=0;e<t.length;++e)if(t[e]!==" "&&t[e]!==" ")return false;return true}function
|
|
9
|
-
`;break;case 114:h+="\r";break;case 116:h+=" ";break;case 117:{var v=tF(o.charCodeAt(s+1),o.charCodeAt(s+2),o.charCodeAt(s+3),o.charCodeAt(s+4));if(v<0){var P=o.slice(s+1,s+5);throw oi(t,s,"Invalid character escape sequence: \\u".concat(P,"."))}h+=String.fromCharCode(v),s+=4;break}default:throw oi(t,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(p),"."))}++s,c=s;}}throw oi(t,s,"Unterminated string.")}function JR(t,e,n,r,i,o){for(var s=t.body,c=e+3,p=c,h=0,v="";c<s.length&&!isNaN(h=s.charCodeAt(c));){if(h===34&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34)return v+=s.slice(p,c),new Yn(Ot.BLOCK_STRING,e,c+3,n,r,i,Hx(v));if(h<32&&h!==9&&h!==10&&h!==13)throw oi(t,c,"Invalid character within String: ".concat(hc(h),"."));h===10?(++c,++o.line,o.lineStart=c):h===13?(s.charCodeAt(c+1)===10?c+=2:++c,++o.line,o.lineStart=c):h===92&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34&&s.charCodeAt(c+3)===34?(v+=s.slice(p,c)+'"""',c+=4,p=c):++c;}throw oi(t,c,"Unterminated string.")}function tF(t,e,n,r){return Km(t)<<12|Km(e)<<8|Km(n)<<4|Km(r)}function Km(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function eF(t,e,n,r,i){for(var o=t.body,s=o.length,c=e+1,p=0;c!==s&&!isNaN(p=o.charCodeAt(c))&&(p===95||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122);)++c;return new Yn(Ot.NAME,e,c,n,r,i,o.slice(e,c))}function nF(t){return t===95||t>=65&&t<=90||t>=97&&t<=122}var Tv,Yx=Wn(()=>{bv();Sv();Pv();Wx();Tv=(function(){function t(n){var r=new Yn(Ot.SOF,0,0,0,0,null);this.source=n,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0;}var e=t.prototype;return e.advance=function(){this.lastToken=this.token;var r=this.token=this.lookahead();return r},e.lookahead=function(){var r=this.token;if(r.kind!==Ot.EOF)do{var i;r=(i=r.next)!==null&&i!==void 0?i:r.next=YR(this,r);}while(r.kind===Ot.COMMENT);return r},t})();});function Xm(t,e){var n=new rF(t,e);return n.parseDocument()}function wv(t){var e=t.value;return Qx(t.kind)+(e!=null?' "'.concat(e,'"'):"")}function Qx(t){return qx(t)?'"'.concat(t,'"'):t}var rF,Kx=Wn(()=>{bv();Ox();Sv();Pv();jx();Vx();Yx();rF=(function(){function t(n,r){var i=Gx(n)?n:new Qm(n);this._lexer=new Tv(i),this._options=r;}var e=t.prototype;return e.parseName=function(){var r=this.expectToken(Ot.NAME);return {kind:Se.NAME,value:r.value,loc:this.loc(r)}},e.parseDocument=function(){var r=this._lexer.token;return {kind:Se.DOCUMENT,definitions:this.many(Ot.SOF,this.parseDefinition,Ot.EOF),loc:this.loc(r)}},e.parseDefinition=function(){if(this.peek(Ot.NAME))switch(this._lexer.token.value){case "query":case "mutation":case "subscription":return this.parseOperationDefinition();case "fragment":return this.parseFragmentDefinition();case "schema":case "scalar":case "type":case "interface":case "union":case "enum":case "input":case "directive":return this.parseTypeSystemDefinition();case "extend":return this.parseTypeSystemExtension()}else {if(this.peek(Ot.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},e.parseOperationDefinition=function(){var r=this._lexer.token;if(this.peek(Ot.BRACE_L))return {kind:Se.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(r)};var i=this.parseOperationType(),o;return this.peek(Ot.NAME)&&(o=this.parseName()),{kind:Se.OPERATION_DEFINITION,operation:i,name:o,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},e.parseOperationType=function(){var r=this.expectToken(Ot.NAME);switch(r.value){case "query":return "query";case "mutation":return "mutation";case "subscription":return "subscription"}throw this.unexpected(r)},e.parseVariableDefinitions=function(){return this.optionalMany(Ot.PAREN_L,this.parseVariableDefinition,Ot.PAREN_R)},e.parseVariableDefinition=function(){var r=this._lexer.token;return {kind:Se.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ot.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ot.EQUALS)?this.parseValueLiteral(true):void 0,directives:this.parseDirectives(true),loc:this.loc(r)}},e.parseVariable=function(){var r=this._lexer.token;return this.expectToken(Ot.DOLLAR),{kind:Se.VARIABLE,name:this.parseName(),loc:this.loc(r)}},e.parseSelectionSet=function(){var r=this._lexer.token;return {kind:Se.SELECTION_SET,selections:this.many(Ot.BRACE_L,this.parseSelection,Ot.BRACE_R),loc:this.loc(r)}},e.parseSelection=function(){return this.peek(Ot.SPREAD)?this.parseFragment():this.parseField()},e.parseField=function(){var r=this._lexer.token,i=this.parseName(),o,s;return this.expectOptionalToken(Ot.COLON)?(o=i,s=this.parseName()):s=i,{kind:Se.FIELD,alias:o,name:s,arguments:this.parseArguments(false),directives:this.parseDirectives(false),selectionSet:this.peek(Ot.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},e.parseArguments=function(r){var i=r?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ot.PAREN_L,i,Ot.PAREN_R)},e.parseArgument=function(){var r=this._lexer.token,i=this.parseName();return this.expectToken(Ot.COLON),{kind:Se.ARGUMENT,name:i,value:this.parseValueLiteral(false),loc:this.loc(r)}},e.parseConstArgument=function(){var r=this._lexer.token;return {kind:Se.ARGUMENT,name:this.parseName(),value:(this.expectToken(Ot.COLON),this.parseValueLiteral(true)),loc:this.loc(r)}},e.parseFragment=function(){var r=this._lexer.token;this.expectToken(Ot.SPREAD);var i=this.expectOptionalKeyword("on");return !i&&this.peek(Ot.NAME)?{kind:Se.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(false),loc:this.loc(r)}:{kind:Se.INLINE_FRAGMENT,typeCondition:i?this.parseNamedType():void 0,directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},e.parseFragmentDefinition=function(){var r,i=this._lexer.token;return this.expectKeyword("fragment"),((r=this._options)===null||r===void 0?void 0:r.experimentalFragmentVariables)===true?{kind:Se.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}:{kind:Se.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}},e.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},e.parseValueLiteral=function(r){var i=this._lexer.token;switch(i.kind){case Ot.BRACKET_L:return this.parseList(r);case Ot.BRACE_L:return this.parseObject(r);case Ot.INT:return this._lexer.advance(),{kind:Se.INT,value:i.value,loc:this.loc(i)};case Ot.FLOAT:return this._lexer.advance(),{kind:Se.FLOAT,value:i.value,loc:this.loc(i)};case Ot.STRING:case Ot.BLOCK_STRING:return this.parseStringLiteral();case Ot.NAME:switch(this._lexer.advance(),i.value){case "true":return {kind:Se.BOOLEAN,value:true,loc:this.loc(i)};case "false":return {kind:Se.BOOLEAN,value:false,loc:this.loc(i)};case "null":return {kind:Se.NULL,loc:this.loc(i)};default:return {kind:Se.ENUM,value:i.value,loc:this.loc(i)}}case Ot.DOLLAR:if(!r)return this.parseVariable();break}throw this.unexpected()},e.parseStringLiteral=function(){var r=this._lexer.token;return this._lexer.advance(),{kind:Se.STRING,value:r.value,block:r.kind===Ot.BLOCK_STRING,loc:this.loc(r)}},e.parseList=function(r){var i=this,o=this._lexer.token,s=function(){return i.parseValueLiteral(r)};return {kind:Se.LIST,values:this.any(Ot.BRACKET_L,s,Ot.BRACKET_R),loc:this.loc(o)}},e.parseObject=function(r){var i=this,o=this._lexer.token,s=function(){return i.parseObjectField(r)};return {kind:Se.OBJECT,fields:this.any(Ot.BRACE_L,s,Ot.BRACE_R),loc:this.loc(o)}},e.parseObjectField=function(r){var i=this._lexer.token,o=this.parseName();return this.expectToken(Ot.COLON),{kind:Se.OBJECT_FIELD,name:o,value:this.parseValueLiteral(r),loc:this.loc(i)}},e.parseDirectives=function(r){for(var i=[];this.peek(Ot.AT);)i.push(this.parseDirective(r));return i},e.parseDirective=function(r){var i=this._lexer.token;return this.expectToken(Ot.AT),{kind:Se.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(r),loc:this.loc(i)}},e.parseTypeReference=function(){var r=this._lexer.token,i;return this.expectOptionalToken(Ot.BRACKET_L)?(i=this.parseTypeReference(),this.expectToken(Ot.BRACKET_R),i={kind:Se.LIST_TYPE,type:i,loc:this.loc(r)}):i=this.parseNamedType(),this.expectOptionalToken(Ot.BANG)?{kind:Se.NON_NULL_TYPE,type:i,loc:this.loc(r)}:i},e.parseNamedType=function(){var r=this._lexer.token;return {kind:Se.NAMED_TYPE,name:this.parseName(),loc:this.loc(r)}},e.parseTypeSystemDefinition=function(){var r=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(r.kind===Ot.NAME)switch(r.value){case "schema":return this.parseSchemaDefinition();case "scalar":return this.parseScalarTypeDefinition();case "type":return this.parseObjectTypeDefinition();case "interface":return this.parseInterfaceTypeDefinition();case "union":return this.parseUnionTypeDefinition();case "enum":return this.parseEnumTypeDefinition();case "input":return this.parseInputObjectTypeDefinition();case "directive":return this.parseDirectiveDefinition()}throw this.unexpected(r)},e.peekDescription=function(){return this.peek(Ot.STRING)||this.peek(Ot.BLOCK_STRING)},e.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},e.parseSchemaDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("schema");var o=this.parseDirectives(true),s=this.many(Ot.BRACE_L,this.parseOperationTypeDefinition,Ot.BRACE_R);return {kind:Se.SCHEMA_DEFINITION,description:i,directives:o,operationTypes:s,loc:this.loc(r)}},e.parseOperationTypeDefinition=function(){var r=this._lexer.token,i=this.parseOperationType();this.expectToken(Ot.COLON);var o=this.parseNamedType();return {kind:Se.OPERATION_TYPE_DEFINITION,operation:i,type:o,loc:this.loc(r)}},e.parseScalarTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("scalar");var o=this.parseName(),s=this.parseDirectives(true);return {kind:Se.SCALAR_TYPE_DEFINITION,description:i,name:o,directives:s,loc:this.loc(r)}},e.parseObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("type");var o=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(true),p=this.parseFieldsDefinition();return {kind:Se.OBJECT_TYPE_DEFINITION,description:i,name:o,interfaces:s,directives:c,fields:p,loc:this.loc(r)}},e.parseImplementsInterfaces=function(){var r;if(!this.expectOptionalKeyword("implements"))return [];if(((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLImplementsInterfaces)===true){var i=[];this.expectOptionalToken(Ot.AMP);do i.push(this.parseNamedType());while(this.expectOptionalToken(Ot.AMP)||this.peek(Ot.NAME));return i}return this.delimitedMany(Ot.AMP,this.parseNamedType)},e.parseFieldsDefinition=function(){var r;return ((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLEmptyFields)===true&&this.peek(Ot.BRACE_L)&&this._lexer.lookahead().kind===Ot.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(Ot.BRACE_L,this.parseFieldDefinition,Ot.BRACE_R)},e.parseFieldDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),o=this.parseName(),s=this.parseArgumentDefs();this.expectToken(Ot.COLON);var c=this.parseTypeReference(),p=this.parseDirectives(true);return {kind:Se.FIELD_DEFINITION,description:i,name:o,arguments:s,type:c,directives:p,loc:this.loc(r)}},e.parseArgumentDefs=function(){return this.optionalMany(Ot.PAREN_L,this.parseInputValueDef,Ot.PAREN_R)},e.parseInputValueDef=function(){var r=this._lexer.token,i=this.parseDescription(),o=this.parseName();this.expectToken(Ot.COLON);var s=this.parseTypeReference(),c;this.expectOptionalToken(Ot.EQUALS)&&(c=this.parseValueLiteral(true));var p=this.parseDirectives(true);return {kind:Se.INPUT_VALUE_DEFINITION,description:i,name:o,type:s,defaultValue:c,directives:p,loc:this.loc(r)}},e.parseInterfaceTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("interface");var o=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(true),p=this.parseFieldsDefinition();return {kind:Se.INTERFACE_TYPE_DEFINITION,description:i,name:o,interfaces:s,directives:c,fields:p,loc:this.loc(r)}},e.parseUnionTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("union");var o=this.parseName(),s=this.parseDirectives(true),c=this.parseUnionMemberTypes();return {kind:Se.UNION_TYPE_DEFINITION,description:i,name:o,directives:s,types:c,loc:this.loc(r)}},e.parseUnionMemberTypes=function(){return this.expectOptionalToken(Ot.EQUALS)?this.delimitedMany(Ot.PIPE,this.parseNamedType):[]},e.parseEnumTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("enum");var o=this.parseName(),s=this.parseDirectives(true),c=this.parseEnumValuesDefinition();return {kind:Se.ENUM_TYPE_DEFINITION,description:i,name:o,directives:s,values:c,loc:this.loc(r)}},e.parseEnumValuesDefinition=function(){return this.optionalMany(Ot.BRACE_L,this.parseEnumValueDefinition,Ot.BRACE_R)},e.parseEnumValueDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),o=this.parseName(),s=this.parseDirectives(true);return {kind:Se.ENUM_VALUE_DEFINITION,description:i,name:o,directives:s,loc:this.loc(r)}},e.parseInputObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("input");var o=this.parseName(),s=this.parseDirectives(true),c=this.parseInputFieldsDefinition();return {kind:Se.INPUT_OBJECT_TYPE_DEFINITION,description:i,name:o,directives:s,fields:c,loc:this.loc(r)}},e.parseInputFieldsDefinition=function(){return this.optionalMany(Ot.BRACE_L,this.parseInputValueDef,Ot.BRACE_R)},e.parseTypeSystemExtension=function(){var r=this._lexer.lookahead();if(r.kind===Ot.NAME)switch(r.value){case "schema":return this.parseSchemaExtension();case "scalar":return this.parseScalarTypeExtension();case "type":return this.parseObjectTypeExtension();case "interface":return this.parseInterfaceTypeExtension();case "union":return this.parseUnionTypeExtension();case "enum":return this.parseEnumTypeExtension();case "input":return this.parseInputObjectTypeExtension()}throw this.unexpected(r)},e.parseSchemaExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var i=this.parseDirectives(true),o=this.optionalMany(Ot.BRACE_L,this.parseOperationTypeDefinition,Ot.BRACE_R);if(i.length===0&&o.length===0)throw this.unexpected();return {kind:Se.SCHEMA_EXTENSION,directives:i,operationTypes:o,loc:this.loc(r)}},e.parseScalarTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var i=this.parseName(),o=this.parseDirectives(true);if(o.length===0)throw this.unexpected();return {kind:Se.SCALAR_TYPE_EXTENSION,name:i,directives:o,loc:this.loc(r)}},e.parseObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(true),c=this.parseFieldsDefinition();if(o.length===0&&s.length===0&&c.length===0)throw this.unexpected();return {kind:Se.OBJECT_TYPE_EXTENSION,name:i,interfaces:o,directives:s,fields:c,loc:this.loc(r)}},e.parseInterfaceTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(true),c=this.parseFieldsDefinition();if(o.length===0&&s.length===0&&c.length===0)throw this.unexpected();return {kind:Se.INTERFACE_TYPE_EXTENSION,name:i,interfaces:o,directives:s,fields:c,loc:this.loc(r)}},e.parseUnionTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var i=this.parseName(),o=this.parseDirectives(true),s=this.parseUnionMemberTypes();if(o.length===0&&s.length===0)throw this.unexpected();return {kind:Se.UNION_TYPE_EXTENSION,name:i,directives:o,types:s,loc:this.loc(r)}},e.parseEnumTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var i=this.parseName(),o=this.parseDirectives(true),s=this.parseEnumValuesDefinition();if(o.length===0&&s.length===0)throw this.unexpected();return {kind:Se.ENUM_TYPE_EXTENSION,name:i,directives:o,values:s,loc:this.loc(r)}},e.parseInputObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var i=this.parseName(),o=this.parseDirectives(true),s=this.parseInputFieldsDefinition();if(o.length===0&&s.length===0)throw this.unexpected();return {kind:Se.INPUT_OBJECT_TYPE_EXTENSION,name:i,directives:o,fields:s,loc:this.loc(r)}},e.parseDirectiveDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ot.AT);var o=this.parseName(),s=this.parseArgumentDefs(),c=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var p=this.parseDirectiveLocations();return {kind:Se.DIRECTIVE_DEFINITION,description:i,name:o,arguments:s,repeatable:c,locations:p,loc:this.loc(r)}},e.parseDirectiveLocations=function(){return this.delimitedMany(Ot.PIPE,this.parseDirectiveLocation)},e.parseDirectiveLocation=function(){var r=this._lexer.token,i=this.parseName();if(Ev[i.value]!==void 0)return i;throw this.unexpected(r)},e.loc=function(r){var i;if(((i=this._options)===null||i===void 0?void 0:i.noLocation)!==true)return new Wm(r,this._lexer.lastToken,this._lexer.source)},e.peek=function(r){return this._lexer.token.kind===r},e.expectToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i;throw oi(this._lexer.source,i.start,"Expected ".concat(Qx(r),", found ").concat(wv(i),"."))},e.expectOptionalToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i},e.expectKeyword=function(r){var i=this._lexer.token;if(i.kind===Ot.NAME&&i.value===r)this._lexer.advance();else throw oi(this._lexer.source,i.start,'Expected "'.concat(r,'", found ').concat(wv(i),"."))},e.expectOptionalKeyword=function(r){var i=this._lexer.token;return i.kind===Ot.NAME&&i.value===r?(this._lexer.advance(),true):false},e.unexpected=function(r){var i=r!=null?r:this._lexer.token;return oi(this._lexer.source,i.start,"Unexpected ".concat(wv(i),"."))},e.any=function(r,i,o){this.expectToken(r);for(var s=[];!this.expectOptionalToken(o);)s.push(i.call(this));return s},e.optionalMany=function(r,i,o){if(this.expectOptionalToken(r)){var s=[];do s.push(i.call(this));while(!this.expectOptionalToken(o));return s}return []},e.many=function(r,i,o){this.expectToken(r);var s=[];do s.push(i.call(this));while(!this.expectOptionalToken(o));return s},e.delimitedMany=function(r,i){this.expectOptionalToken(r);var o=[];do o.push(i.call(this));while(this.expectOptionalToken(r));return o},t})();});var Xx=Wn(()=>{Kx();});var Zx=Wn(()=>{Xx();});var oE={};Q1(oE,{default:()=>uF,disableExperimentalFragmentVariables:()=>iE,disableFragmentWarnings:()=>nE,enableExperimentalFragmentVariables:()=>rE,gql:()=>mc,resetCaches:()=>eE});function tE(t){return t.replace(/[\s,]+/g," ").trim()}function aF(t){return tE(t.source.body.substring(t.start,t.end))}function sF(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=aF(r.loc),s=Iv.get(i);s&&!s.has(o)?Jx&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
7
|
+
`+jm(t.source,c);}return e}var Dx,Ax=Wn(()=>{Px();hv();mv();Ex();Dx=(function(t){NR(n,t);var e=LR(n);function n(r,i,o,s,c,p,h){var v,P,x,T;FR(this,n),T=e.call(this,r),T.name="GraphQLError",T.originalError=p!=null?p:void 0,T.nodes=wx(Array.isArray(i)?i:i?[i]:void 0);for(var I=[],R=0,A=(O=T.nodes)!==null&&O!==void 0?O:[];R<A.length;R++){var O,N=A[R],V=N.loc;V!=null&&I.push(V);}I=wx(I),T.source=o!=null?o:(v=I)===null||v===void 0?void 0:v[0].source,T.positions=s!=null?s:(P=I)===null||P===void 0?void 0:P.map(function(X){return X.start}),T.locations=s&&o?s.map(function(X){return Wu(o,X)}):(x=I)===null||x===void 0?void 0:x.map(function(X){return Wu(X.source,X.start)}),T.path=c!=null?c:void 0;var G=p==null?void 0:p.extensions;return h==null&&fv(G)?T.extensions=OR({},G):T.extensions=h!=null?h:{},Object.defineProperties(qp(T),{message:{enumerable:true},locations:{enumerable:T.locations!=null},path:{enumerable:T.path!=null},extensions:{enumerable:T.extensions!=null&&Object.keys(T.extensions).length>0},name:{enumerable:false},nodes:{enumerable:false},source:{enumerable:false},positions:{enumerable:false},originalError:{enumerable:false}}),p!=null&&p.stack?(Object.defineProperty(qp(T),"stack",{value:p.stack,writable:true,configurable:true}),Ix(T)):(Error.captureStackTrace?Error.captureStackTrace(qp(T),n):Object.defineProperty(qp(T),"stack",{value:Error().stack,writable:true,configurable:true}),T)}return MR(n,[{key:"toString",value:function(){return UR(this)}},{key:$m,get:function(){return "Object"}}]),n})(yv(Error));});function oi(t,e,n){return new Dx("Syntax Error: ".concat(n),void 0,t,[e])}var bv=Wn(()=>{Ax();});var Se,Ox=Wn(()=>{Se=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});});function vv(t,e){throw new Error("Unexpected invariant triggered.")}var Rx=Wn(()=>{});var $R,Kp,Cv=Wn(()=>{$R=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,Kp=$R;});function Hm(t){var e=t.prototype.toJSON;typeof e=="function"||vv(),t.prototype.inspect=e,Kp&&(t.prototype[Kp]=e);}var Fx=Wn(()=>{Rx();Cv();});var Wm,Yn,Sv=Wn(()=>{Fx();Wm=(function(){function t(n,r,i){this.start=n.start,this.end=r.end,this.startToken=n,this.endToken=r,this.source=i;}var e=t.prototype;return e.toJSON=function(){return {start:this.start,end:this.end}},t})();Hm(Wm);Yn=(function(){function t(n,r,i,o,s,c,p){this.kind=n,this.start=r,this.end=i,this.line=o,this.column=s,this.value=p,this.prev=c,this.next=null;}var e=t.prototype;return e.toJSON=function(){return {kind:this.kind,value:this.value,line:this.line,column:this.column}},t})();Hm(Yn);});var Ot,Pv=Wn(()=>{Ot=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});});function qm(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qm=function(n){return typeof n}:qm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qm(t)}function xv(t){return Ym(t,[])}function Ym(t,e){switch(qm(t)){case "string":return JSON.stringify(t);case "function":return t.name?"[function ".concat(t.name,"]"):"[function]";case "object":return t===null?"null":jR(t,e);default:return String(t)}}function jR(t,e){if(e.indexOf(t)!==-1)return "[Circular]";var n=[].concat(e,[t]),r=HR(t);if(r!==void 0){var i=r.call(t);if(i!==t)return typeof i=="string"?i:Ym(i,n)}else if(Array.isArray(t))return zR(t,n);return VR(t,n)}function VR(t,e){var n=Object.keys(t);if(n.length===0)return "{}";if(e.length>Mx)return "["+WR(t)+"]";var r=n.map(function(i){var o=Ym(t[i],e);return i+": "+o});return "{ "+r.join(", ")+" }"}function zR(t,e){if(t.length===0)return "[]";if(e.length>Mx)return "[Array]";for(var n=Math.min(GR,t.length),r=t.length-n,i=[],o=0;o<n;++o)i.push(Ym(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}function HR(t){var e=t[String(Kp)];if(typeof e=="function")return e;if(typeof t.inspect=="function")return t.inspect}function WR(t){var e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){var n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}var GR,Mx,Nx=Wn(()=>{Cv();GR=10,Mx=2;});function Xp(t,e){throw new Error(e)}var Lx=Wn(()=>{});var Bx,Ux=Wn(()=>{Bx=function(e,n){return e instanceof n};});function $x(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||false,r.configurable=true,"value"in r&&(r.writable=true),Object.defineProperty(t,r.key,r);}}function qR(t,e,n){return e&&$x(t.prototype,e),t}function Gx(t){return Bx(t,Qm)}var Qm,jx=Wn(()=>{hv();Nx();Lx();Ux();Qm=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof e=="string"||Xp(0,"Body must be a string. Received: ".concat(xv(e),".")),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Xp(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Xp(0,"column in locationOffset is 1-indexed and must be positive.");}return qR(t,[{key:$m,get:function(){return "Source"}}]),t})();});var Ev,Vx=Wn(()=>{Ev=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});});function Hx(t){var e=t.split(/\r\n|[\n\r]/g),n=YR(t);if(n!==0)for(var r=1;r<e.length;r++)e[r]=e[r].slice(n);for(var i=0;i<e.length&&zx(e[i]);)++i;for(var o=e.length;o>i&&zx(e[o-1]);)--o;return e.slice(i,o).join(`
|
|
8
|
+
`)}function zx(t){for(var e=0;e<t.length;++e)if(t[e]!==" "&&t[e]!==" ")return false;return true}function YR(t){for(var e,n=true,r=true,i=0,o=null,s=0;s<t.length;++s)switch(t.charCodeAt(s)){case 13:t.charCodeAt(s+1)===10&&++s;case 10:n=false,r=true,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(o===null||i<o)&&(o=i),r=false;}return (e=o)!==null&&e!==void 0?e:0}var Wx=Wn(()=>{});function qx(t){return t===Ot.BANG||t===Ot.DOLLAR||t===Ot.AMP||t===Ot.PAREN_L||t===Ot.PAREN_R||t===Ot.SPREAD||t===Ot.COLON||t===Ot.EQUALS||t===Ot.AT||t===Ot.BRACKET_L||t===Ot.BRACKET_R||t===Ot.BRACE_L||t===Ot.PIPE||t===Ot.BRACE_R}function hc(t){return isNaN(t)?Ot.EOF:t<127?JSON.stringify(String.fromCharCode(t)):'"\\u'.concat(("00"+t.toString(16).toUpperCase()).slice(-4),'"')}function QR(t,e){for(var n=t.source,r=n.body,i=r.length,o=e.end;o<i;){var s=r.charCodeAt(o),c=t.line,p=1+o-t.lineStart;switch(s){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++t.line,t.lineStart=o;continue;case 13:r.charCodeAt(o+1)===10?o+=2:++o,++t.line,t.lineStart=o;continue;case 33:return new Yn(Ot.BANG,o,o+1,c,p,e);case 35:return XR(n,o,c,p,e);case 36:return new Yn(Ot.DOLLAR,o,o+1,c,p,e);case 38:return new Yn(Ot.AMP,o,o+1,c,p,e);case 40:return new Yn(Ot.PAREN_L,o,o+1,c,p,e);case 41:return new Yn(Ot.PAREN_R,o,o+1,c,p,e);case 46:if(r.charCodeAt(o+1)===46&&r.charCodeAt(o+2)===46)return new Yn(Ot.SPREAD,o,o+3,c,p,e);break;case 58:return new Yn(Ot.COLON,o,o+1,c,p,e);case 61:return new Yn(Ot.EQUALS,o,o+1,c,p,e);case 64:return new Yn(Ot.AT,o,o+1,c,p,e);case 91:return new Yn(Ot.BRACKET_L,o,o+1,c,p,e);case 93:return new Yn(Ot.BRACKET_R,o,o+1,c,p,e);case 123:return new Yn(Ot.BRACE_L,o,o+1,c,p,e);case 124:return new Yn(Ot.PIPE,o,o+1,c,p,e);case 125:return new Yn(Ot.BRACE_R,o,o+1,c,p,e);case 34:return r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34?tF(n,o,c,p,e,t):JR(n,o,c,p,e);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return ZR(n,o,s,c,p,e);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return nF(n,o,c,p,e)}throw oi(n,o,KR(s))}var h=t.line,v=1+o-t.lineStart;return new Yn(Ot.EOF,i,i,h,v,e)}function KR(t){return t<32&&t!==9&&t!==10&&t!==13?"Cannot contain the invalid character ".concat(hc(t),"."):t===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:"Cannot parse the unexpected character ".concat(hc(t),".")}function XR(t,e,n,r,i){var o=t.body,s,c=e;do s=o.charCodeAt(++c);while(!isNaN(s)&&(s>31||s===9));return new Yn(Ot.COMMENT,e,c,n,r,i,o.slice(e+1,c))}function ZR(t,e,n,r,i,o){var s=t.body,c=n,p=e,h=false;if(c===45&&(c=s.charCodeAt(++p)),c===48){if(c=s.charCodeAt(++p),c>=48&&c<=57)throw oi(t,p,"Invalid number, unexpected digit after 0: ".concat(hc(c),"."))}else p=_v(t,p,c),c=s.charCodeAt(p);if(c===46&&(h=true,c=s.charCodeAt(++p),p=_v(t,p,c),c=s.charCodeAt(p)),(c===69||c===101)&&(h=true,c=s.charCodeAt(++p),(c===43||c===45)&&(c=s.charCodeAt(++p)),p=_v(t,p,c),c=s.charCodeAt(p)),c===46||rF(c))throw oi(t,p,"Invalid number, expected digit but got: ".concat(hc(c),"."));return new Yn(h?Ot.FLOAT:Ot.INT,e,p,r,i,o,s.slice(e,p))}function _v(t,e,n){var r=t.body,i=e,o=n;if(o>=48&&o<=57){do o=r.charCodeAt(++i);while(o>=48&&o<=57);return i}throw oi(t,i,"Invalid number, expected digit but got: ".concat(hc(o),"."))}function JR(t,e,n,r,i){for(var o=t.body,s=e+1,c=s,p=0,h="";s<o.length&&!isNaN(p=o.charCodeAt(s))&&p!==10&&p!==13;){if(p===34)return h+=o.slice(c,s),new Yn(Ot.STRING,e,s+1,n,r,i,h);if(p<32&&p!==9)throw oi(t,s,"Invalid character within String: ".concat(hc(p),"."));if(++s,p===92){switch(h+=o.slice(c,s-1),p=o.charCodeAt(s),p){case 34:h+='"';break;case 47:h+="/";break;case 92:h+="\\";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+=`
|
|
9
|
+
`;break;case 114:h+="\r";break;case 116:h+=" ";break;case 117:{var v=eF(o.charCodeAt(s+1),o.charCodeAt(s+2),o.charCodeAt(s+3),o.charCodeAt(s+4));if(v<0){var P=o.slice(s+1,s+5);throw oi(t,s,"Invalid character escape sequence: \\u".concat(P,"."))}h+=String.fromCharCode(v),s+=4;break}default:throw oi(t,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(p),"."))}++s,c=s;}}throw oi(t,s,"Unterminated string.")}function tF(t,e,n,r,i,o){for(var s=t.body,c=e+3,p=c,h=0,v="";c<s.length&&!isNaN(h=s.charCodeAt(c));){if(h===34&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34)return v+=s.slice(p,c),new Yn(Ot.BLOCK_STRING,e,c+3,n,r,i,Hx(v));if(h<32&&h!==9&&h!==10&&h!==13)throw oi(t,c,"Invalid character within String: ".concat(hc(h),"."));h===10?(++c,++o.line,o.lineStart=c):h===13?(s.charCodeAt(c+1)===10?c+=2:++c,++o.line,o.lineStart=c):h===92&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34&&s.charCodeAt(c+3)===34?(v+=s.slice(p,c)+'"""',c+=4,p=c):++c;}throw oi(t,c,"Unterminated string.")}function eF(t,e,n,r){return Km(t)<<12|Km(e)<<8|Km(n)<<4|Km(r)}function Km(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function nF(t,e,n,r,i){for(var o=t.body,s=o.length,c=e+1,p=0;c!==s&&!isNaN(p=o.charCodeAt(c))&&(p===95||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122);)++c;return new Yn(Ot.NAME,e,c,n,r,i,o.slice(e,c))}function rF(t){return t===95||t>=65&&t<=90||t>=97&&t<=122}var Tv,Yx=Wn(()=>{bv();Sv();Pv();Wx();Tv=(function(){function t(n){var r=new Yn(Ot.SOF,0,0,0,0,null);this.source=n,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0;}var e=t.prototype;return e.advance=function(){this.lastToken=this.token;var r=this.token=this.lookahead();return r},e.lookahead=function(){var r=this.token;if(r.kind!==Ot.EOF)do{var i;r=(i=r.next)!==null&&i!==void 0?i:r.next=QR(this,r);}while(r.kind===Ot.COMMENT);return r},t})();});function Xm(t,e){var n=new iF(t,e);return n.parseDocument()}function wv(t){var e=t.value;return Qx(t.kind)+(e!=null?' "'.concat(e,'"'):"")}function Qx(t){return qx(t)?'"'.concat(t,'"'):t}var iF,Kx=Wn(()=>{bv();Ox();Sv();Pv();jx();Vx();Yx();iF=(function(){function t(n,r){var i=Gx(n)?n:new Qm(n);this._lexer=new Tv(i),this._options=r;}var e=t.prototype;return e.parseName=function(){var r=this.expectToken(Ot.NAME);return {kind:Se.NAME,value:r.value,loc:this.loc(r)}},e.parseDocument=function(){var r=this._lexer.token;return {kind:Se.DOCUMENT,definitions:this.many(Ot.SOF,this.parseDefinition,Ot.EOF),loc:this.loc(r)}},e.parseDefinition=function(){if(this.peek(Ot.NAME))switch(this._lexer.token.value){case "query":case "mutation":case "subscription":return this.parseOperationDefinition();case "fragment":return this.parseFragmentDefinition();case "schema":case "scalar":case "type":case "interface":case "union":case "enum":case "input":case "directive":return this.parseTypeSystemDefinition();case "extend":return this.parseTypeSystemExtension()}else {if(this.peek(Ot.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},e.parseOperationDefinition=function(){var r=this._lexer.token;if(this.peek(Ot.BRACE_L))return {kind:Se.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(r)};var i=this.parseOperationType(),o;return this.peek(Ot.NAME)&&(o=this.parseName()),{kind:Se.OPERATION_DEFINITION,operation:i,name:o,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},e.parseOperationType=function(){var r=this.expectToken(Ot.NAME);switch(r.value){case "query":return "query";case "mutation":return "mutation";case "subscription":return "subscription"}throw this.unexpected(r)},e.parseVariableDefinitions=function(){return this.optionalMany(Ot.PAREN_L,this.parseVariableDefinition,Ot.PAREN_R)},e.parseVariableDefinition=function(){var r=this._lexer.token;return {kind:Se.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ot.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ot.EQUALS)?this.parseValueLiteral(true):void 0,directives:this.parseDirectives(true),loc:this.loc(r)}},e.parseVariable=function(){var r=this._lexer.token;return this.expectToken(Ot.DOLLAR),{kind:Se.VARIABLE,name:this.parseName(),loc:this.loc(r)}},e.parseSelectionSet=function(){var r=this._lexer.token;return {kind:Se.SELECTION_SET,selections:this.many(Ot.BRACE_L,this.parseSelection,Ot.BRACE_R),loc:this.loc(r)}},e.parseSelection=function(){return this.peek(Ot.SPREAD)?this.parseFragment():this.parseField()},e.parseField=function(){var r=this._lexer.token,i=this.parseName(),o,s;return this.expectOptionalToken(Ot.COLON)?(o=i,s=this.parseName()):s=i,{kind:Se.FIELD,alias:o,name:s,arguments:this.parseArguments(false),directives:this.parseDirectives(false),selectionSet:this.peek(Ot.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},e.parseArguments=function(r){var i=r?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ot.PAREN_L,i,Ot.PAREN_R)},e.parseArgument=function(){var r=this._lexer.token,i=this.parseName();return this.expectToken(Ot.COLON),{kind:Se.ARGUMENT,name:i,value:this.parseValueLiteral(false),loc:this.loc(r)}},e.parseConstArgument=function(){var r=this._lexer.token;return {kind:Se.ARGUMENT,name:this.parseName(),value:(this.expectToken(Ot.COLON),this.parseValueLiteral(true)),loc:this.loc(r)}},e.parseFragment=function(){var r=this._lexer.token;this.expectToken(Ot.SPREAD);var i=this.expectOptionalKeyword("on");return !i&&this.peek(Ot.NAME)?{kind:Se.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(false),loc:this.loc(r)}:{kind:Se.INLINE_FRAGMENT,typeCondition:i?this.parseNamedType():void 0,directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},e.parseFragmentDefinition=function(){var r,i=this._lexer.token;return this.expectKeyword("fragment"),((r=this._options)===null||r===void 0?void 0:r.experimentalFragmentVariables)===true?{kind:Se.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}:{kind:Se.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}},e.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},e.parseValueLiteral=function(r){var i=this._lexer.token;switch(i.kind){case Ot.BRACKET_L:return this.parseList(r);case Ot.BRACE_L:return this.parseObject(r);case Ot.INT:return this._lexer.advance(),{kind:Se.INT,value:i.value,loc:this.loc(i)};case Ot.FLOAT:return this._lexer.advance(),{kind:Se.FLOAT,value:i.value,loc:this.loc(i)};case Ot.STRING:case Ot.BLOCK_STRING:return this.parseStringLiteral();case Ot.NAME:switch(this._lexer.advance(),i.value){case "true":return {kind:Se.BOOLEAN,value:true,loc:this.loc(i)};case "false":return {kind:Se.BOOLEAN,value:false,loc:this.loc(i)};case "null":return {kind:Se.NULL,loc:this.loc(i)};default:return {kind:Se.ENUM,value:i.value,loc:this.loc(i)}}case Ot.DOLLAR:if(!r)return this.parseVariable();break}throw this.unexpected()},e.parseStringLiteral=function(){var r=this._lexer.token;return this._lexer.advance(),{kind:Se.STRING,value:r.value,block:r.kind===Ot.BLOCK_STRING,loc:this.loc(r)}},e.parseList=function(r){var i=this,o=this._lexer.token,s=function(){return i.parseValueLiteral(r)};return {kind:Se.LIST,values:this.any(Ot.BRACKET_L,s,Ot.BRACKET_R),loc:this.loc(o)}},e.parseObject=function(r){var i=this,o=this._lexer.token,s=function(){return i.parseObjectField(r)};return {kind:Se.OBJECT,fields:this.any(Ot.BRACE_L,s,Ot.BRACE_R),loc:this.loc(o)}},e.parseObjectField=function(r){var i=this._lexer.token,o=this.parseName();return this.expectToken(Ot.COLON),{kind:Se.OBJECT_FIELD,name:o,value:this.parseValueLiteral(r),loc:this.loc(i)}},e.parseDirectives=function(r){for(var i=[];this.peek(Ot.AT);)i.push(this.parseDirective(r));return i},e.parseDirective=function(r){var i=this._lexer.token;return this.expectToken(Ot.AT),{kind:Se.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(r),loc:this.loc(i)}},e.parseTypeReference=function(){var r=this._lexer.token,i;return this.expectOptionalToken(Ot.BRACKET_L)?(i=this.parseTypeReference(),this.expectToken(Ot.BRACKET_R),i={kind:Se.LIST_TYPE,type:i,loc:this.loc(r)}):i=this.parseNamedType(),this.expectOptionalToken(Ot.BANG)?{kind:Se.NON_NULL_TYPE,type:i,loc:this.loc(r)}:i},e.parseNamedType=function(){var r=this._lexer.token;return {kind:Se.NAMED_TYPE,name:this.parseName(),loc:this.loc(r)}},e.parseTypeSystemDefinition=function(){var r=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(r.kind===Ot.NAME)switch(r.value){case "schema":return this.parseSchemaDefinition();case "scalar":return this.parseScalarTypeDefinition();case "type":return this.parseObjectTypeDefinition();case "interface":return this.parseInterfaceTypeDefinition();case "union":return this.parseUnionTypeDefinition();case "enum":return this.parseEnumTypeDefinition();case "input":return this.parseInputObjectTypeDefinition();case "directive":return this.parseDirectiveDefinition()}throw this.unexpected(r)},e.peekDescription=function(){return this.peek(Ot.STRING)||this.peek(Ot.BLOCK_STRING)},e.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},e.parseSchemaDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("schema");var o=this.parseDirectives(true),s=this.many(Ot.BRACE_L,this.parseOperationTypeDefinition,Ot.BRACE_R);return {kind:Se.SCHEMA_DEFINITION,description:i,directives:o,operationTypes:s,loc:this.loc(r)}},e.parseOperationTypeDefinition=function(){var r=this._lexer.token,i=this.parseOperationType();this.expectToken(Ot.COLON);var o=this.parseNamedType();return {kind:Se.OPERATION_TYPE_DEFINITION,operation:i,type:o,loc:this.loc(r)}},e.parseScalarTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("scalar");var o=this.parseName(),s=this.parseDirectives(true);return {kind:Se.SCALAR_TYPE_DEFINITION,description:i,name:o,directives:s,loc:this.loc(r)}},e.parseObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("type");var o=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(true),p=this.parseFieldsDefinition();return {kind:Se.OBJECT_TYPE_DEFINITION,description:i,name:o,interfaces:s,directives:c,fields:p,loc:this.loc(r)}},e.parseImplementsInterfaces=function(){var r;if(!this.expectOptionalKeyword("implements"))return [];if(((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLImplementsInterfaces)===true){var i=[];this.expectOptionalToken(Ot.AMP);do i.push(this.parseNamedType());while(this.expectOptionalToken(Ot.AMP)||this.peek(Ot.NAME));return i}return this.delimitedMany(Ot.AMP,this.parseNamedType)},e.parseFieldsDefinition=function(){var r;return ((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLEmptyFields)===true&&this.peek(Ot.BRACE_L)&&this._lexer.lookahead().kind===Ot.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(Ot.BRACE_L,this.parseFieldDefinition,Ot.BRACE_R)},e.parseFieldDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),o=this.parseName(),s=this.parseArgumentDefs();this.expectToken(Ot.COLON);var c=this.parseTypeReference(),p=this.parseDirectives(true);return {kind:Se.FIELD_DEFINITION,description:i,name:o,arguments:s,type:c,directives:p,loc:this.loc(r)}},e.parseArgumentDefs=function(){return this.optionalMany(Ot.PAREN_L,this.parseInputValueDef,Ot.PAREN_R)},e.parseInputValueDef=function(){var r=this._lexer.token,i=this.parseDescription(),o=this.parseName();this.expectToken(Ot.COLON);var s=this.parseTypeReference(),c;this.expectOptionalToken(Ot.EQUALS)&&(c=this.parseValueLiteral(true));var p=this.parseDirectives(true);return {kind:Se.INPUT_VALUE_DEFINITION,description:i,name:o,type:s,defaultValue:c,directives:p,loc:this.loc(r)}},e.parseInterfaceTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("interface");var o=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(true),p=this.parseFieldsDefinition();return {kind:Se.INTERFACE_TYPE_DEFINITION,description:i,name:o,interfaces:s,directives:c,fields:p,loc:this.loc(r)}},e.parseUnionTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("union");var o=this.parseName(),s=this.parseDirectives(true),c=this.parseUnionMemberTypes();return {kind:Se.UNION_TYPE_DEFINITION,description:i,name:o,directives:s,types:c,loc:this.loc(r)}},e.parseUnionMemberTypes=function(){return this.expectOptionalToken(Ot.EQUALS)?this.delimitedMany(Ot.PIPE,this.parseNamedType):[]},e.parseEnumTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("enum");var o=this.parseName(),s=this.parseDirectives(true),c=this.parseEnumValuesDefinition();return {kind:Se.ENUM_TYPE_DEFINITION,description:i,name:o,directives:s,values:c,loc:this.loc(r)}},e.parseEnumValuesDefinition=function(){return this.optionalMany(Ot.BRACE_L,this.parseEnumValueDefinition,Ot.BRACE_R)},e.parseEnumValueDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),o=this.parseName(),s=this.parseDirectives(true);return {kind:Se.ENUM_VALUE_DEFINITION,description:i,name:o,directives:s,loc:this.loc(r)}},e.parseInputObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("input");var o=this.parseName(),s=this.parseDirectives(true),c=this.parseInputFieldsDefinition();return {kind:Se.INPUT_OBJECT_TYPE_DEFINITION,description:i,name:o,directives:s,fields:c,loc:this.loc(r)}},e.parseInputFieldsDefinition=function(){return this.optionalMany(Ot.BRACE_L,this.parseInputValueDef,Ot.BRACE_R)},e.parseTypeSystemExtension=function(){var r=this._lexer.lookahead();if(r.kind===Ot.NAME)switch(r.value){case "schema":return this.parseSchemaExtension();case "scalar":return this.parseScalarTypeExtension();case "type":return this.parseObjectTypeExtension();case "interface":return this.parseInterfaceTypeExtension();case "union":return this.parseUnionTypeExtension();case "enum":return this.parseEnumTypeExtension();case "input":return this.parseInputObjectTypeExtension()}throw this.unexpected(r)},e.parseSchemaExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var i=this.parseDirectives(true),o=this.optionalMany(Ot.BRACE_L,this.parseOperationTypeDefinition,Ot.BRACE_R);if(i.length===0&&o.length===0)throw this.unexpected();return {kind:Se.SCHEMA_EXTENSION,directives:i,operationTypes:o,loc:this.loc(r)}},e.parseScalarTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var i=this.parseName(),o=this.parseDirectives(true);if(o.length===0)throw this.unexpected();return {kind:Se.SCALAR_TYPE_EXTENSION,name:i,directives:o,loc:this.loc(r)}},e.parseObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(true),c=this.parseFieldsDefinition();if(o.length===0&&s.length===0&&c.length===0)throw this.unexpected();return {kind:Se.OBJECT_TYPE_EXTENSION,name:i,interfaces:o,directives:s,fields:c,loc:this.loc(r)}},e.parseInterfaceTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(true),c=this.parseFieldsDefinition();if(o.length===0&&s.length===0&&c.length===0)throw this.unexpected();return {kind:Se.INTERFACE_TYPE_EXTENSION,name:i,interfaces:o,directives:s,fields:c,loc:this.loc(r)}},e.parseUnionTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var i=this.parseName(),o=this.parseDirectives(true),s=this.parseUnionMemberTypes();if(o.length===0&&s.length===0)throw this.unexpected();return {kind:Se.UNION_TYPE_EXTENSION,name:i,directives:o,types:s,loc:this.loc(r)}},e.parseEnumTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var i=this.parseName(),o=this.parseDirectives(true),s=this.parseEnumValuesDefinition();if(o.length===0&&s.length===0)throw this.unexpected();return {kind:Se.ENUM_TYPE_EXTENSION,name:i,directives:o,values:s,loc:this.loc(r)}},e.parseInputObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var i=this.parseName(),o=this.parseDirectives(true),s=this.parseInputFieldsDefinition();if(o.length===0&&s.length===0)throw this.unexpected();return {kind:Se.INPUT_OBJECT_TYPE_EXTENSION,name:i,directives:o,fields:s,loc:this.loc(r)}},e.parseDirectiveDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ot.AT);var o=this.parseName(),s=this.parseArgumentDefs(),c=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var p=this.parseDirectiveLocations();return {kind:Se.DIRECTIVE_DEFINITION,description:i,name:o,arguments:s,repeatable:c,locations:p,loc:this.loc(r)}},e.parseDirectiveLocations=function(){return this.delimitedMany(Ot.PIPE,this.parseDirectiveLocation)},e.parseDirectiveLocation=function(){var r=this._lexer.token,i=this.parseName();if(Ev[i.value]!==void 0)return i;throw this.unexpected(r)},e.loc=function(r){var i;if(((i=this._options)===null||i===void 0?void 0:i.noLocation)!==true)return new Wm(r,this._lexer.lastToken,this._lexer.source)},e.peek=function(r){return this._lexer.token.kind===r},e.expectToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i;throw oi(this._lexer.source,i.start,"Expected ".concat(Qx(r),", found ").concat(wv(i),"."))},e.expectOptionalToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i},e.expectKeyword=function(r){var i=this._lexer.token;if(i.kind===Ot.NAME&&i.value===r)this._lexer.advance();else throw oi(this._lexer.source,i.start,'Expected "'.concat(r,'", found ').concat(wv(i),"."))},e.expectOptionalKeyword=function(r){var i=this._lexer.token;return i.kind===Ot.NAME&&i.value===r?(this._lexer.advance(),true):false},e.unexpected=function(r){var i=r!=null?r:this._lexer.token;return oi(this._lexer.source,i.start,"Unexpected ".concat(wv(i),"."))},e.any=function(r,i,o){this.expectToken(r);for(var s=[];!this.expectOptionalToken(o);)s.push(i.call(this));return s},e.optionalMany=function(r,i,o){if(this.expectOptionalToken(r)){var s=[];do s.push(i.call(this));while(!this.expectOptionalToken(o));return s}return []},e.many=function(r,i,o){this.expectToken(r);var s=[];do s.push(i.call(this));while(!this.expectOptionalToken(o));return s},e.delimitedMany=function(r,i){this.expectOptionalToken(r);var o=[];do o.push(i.call(this));while(this.expectOptionalToken(r));return o},t})();});var Xx=Wn(()=>{Kx();});var Zx=Wn(()=>{Xx();});var oE={};Q1(oE,{default:()=>dF,disableExperimentalFragmentVariables:()=>iE,disableFragmentWarnings:()=>nE,enableExperimentalFragmentVariables:()=>rE,gql:()=>mc,resetCaches:()=>eE});function tE(t){return t.replace(/[\s,]+/g," ").trim()}function sF(t){return tE(t.source.body.substring(t.start,t.end))}function lF(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=sF(r.loc),s=Iv.get(i);s&&!s.has(o)?Jx&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
10
10
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
11
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Iv.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r));}else n.push(r);}),Wp(Wp({},t),{definitions:n})}function lF(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o);});});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function cF(t){var e=tE(t);if(!Zm.has(e)){var n=Xm(t,{experimentalFragmentVariables:Jm,allowLegacyFragmentVariables:Jm});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Zm.set(e,lF(sF(n)));}return Zm.get(e)}function mc(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1];}),cF(r)}function eE(){Zm.clear(),Iv.clear();}function nE(){Jx=false;}function rE(){Jm=true;}function iE(){Jm=false;}var Zm,Iv,Jx,Jm,Zp,uF,aE=Wn(()=>{Sx();Zx();Zm=new Map,Iv=new Map,Jx=true,Jm=false;Zp={gql:mc,resetCaches:eE,disableFragmentWarnings:nE,enableExperimentalFragmentVariables:rE,disableExperimentalFragmentVariables:iE};(function(t){t.gql=Zp.gql,t.resetCaches=Zp.resetCaches,t.disableFragmentWarnings=Zp.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Zp.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Zp.disableExperimentalFragmentVariables;})(mc||(mc={}));mc.default=mc;uF=mc;});var kv=qk(C=>{Object.defineProperty(C,"__esModule",{value:true});C.FeatureStatus=C.FeatureSortFields=C.FeatureGroupStatus=C.FeatureGroupSortFields=C.ExperimentStatus=C.ExperimentSortFields=C.EventLogType=C.EventLogSortFields=C.EventEntityType=C.EventActor=C.ErrorCode=C.EnvironmentType=C.EnvironmentSortFields=C.EnvironmentProvisionStatus=C.EnvironmentAccessRole=C.EntitySelectionMode=C.EntitlementsStateAccessDeniedReason=C.EntitlementResetPeriod=C.EntitlementBehavior=C.DiscountType=C.DiscountDurationType=C.Department=C.CustomerSubscriptionSortFields=C.CustomerSortFields=C.CustomerResourceSortFields=C.Currency=C.CreditUsageTimeRange=C.CreditLedgerEventType=C.CreditGrantType=C.CouponType=C.CouponStatus=C.CouponSource=C.CouponSortFields=C.ConditionOperation=C.ChangeType=C.BillingVendorIdentifier=C.BillingPeriod=C.BillingModel=C.BillingCadence=C.BillingAnchor=C.Auth0ApplicationType=C.ApiKeyType=C.ApiKeySortFields=C.Alignment=C.AggregationFunction=C.AddonSortFields=C.AccountStatus=C.AccountAccessRole=C.AccountAccessMethod=C.AccessDeniedReason=void 0;C.SubscriptionPriceSortFields=C.SubscriptionMigrationTime=C.SubscriptionMigrationTaskSortFields=C.SubscriptionInvoiceStatus=C.SubscriptionInvoiceBillingReason=C.SubscriptionEntitlementSortFields=C.SubscriptionEndSetup=C.SubscriptionDecisionStrategy=C.SubscriptionCouponStatus=C.SubscriptionCancellationTime=C.SubscriptionCancellationAction=C.SubscriptionCancelReason=C.SubscriptionAddonSortFields=C.SourceType=C.SortNulls=C.SortDirection=C.ScheduleStrategy=C.PublishMigrationType=C.ProvisionSubscriptionStatus=C.ProrationBehavior=C.PromotionalEntitlementStatus=C.PromotionalEntitlementSortFields=C.PromotionalEntitlementPeriod=C.ProductSortFields=C.PricingType=C.PriceSortFields=C.PlanSortFields=C.PlanChangeType=C.PaymentMethodType=C.PaymentCollectionMethod=C.PaymentCollection=C.PackageStatus=C.PackageGroupStatus=C.PackageGroupSortFields=C.PackageEntitlementSortFields=C.PackageDtoSortFields=C.OverageBillingPeriod=C.OfferStatus=C.OfferSortFields=C.MonthlyAccordingTo=C.MeterType=C.MemberStatus=C.MemberSortFields=C.InvoiceLineItemType=C.IntegrationSortFields=C.ImportIntegrationTaskSortFields=C.HookStatus=C.HookSortFields=C.FontWeight=C.FeatureType=void 0;C.SubscriptionPreviewFragmentDoc=C.CustomerStatisticsFragmentDoc=C.CustomerWithSubscriptionsFragmentDoc=C.SubscriptionFragmentDoc=C.SubscriptionTrialConfigurationFragmentDoc=C.SubscriptionFutureUpdateDataFragmentDoc=C.SubscriptionScheduledUpdateDataFragmentDoc=C.ScheduleVariablesFragmentDoc=C.PlanFragmentDoc=C.PlanCompatiblePackageGroupsFragmentDoc=C.AddonFragmentDoc=C.AddonDependencyFragmentDoc=C.OveragePriceFragmentDoc=C.PackageEntitlementFragmentDoc=C.ProductFragmentDoc=C.TotalPriceFragmentDoc=C.PriceFragmentDoc=C.PriceTierFragmentDoc=C.CustomerResourceFragmentDoc=C.SubscriptionInvoiceFragmentDoc=C.CustomerFragmentDoc=C.PromotionalEntitlementFragmentDoc=C.CouponFragmentDoc=C.SlimCustomerFragmentDoc=C.SlimSubscriptionFragmentV2FragmentDoc=C.SubscriptionQueryFragmentDoc=C.PageInfoFragmentDoc=C.ExperimentGroupType=C.YearlyAccordingTo=C.WidgetType=C.WeeklyAccordingTo=C.VendorType=C.VendorIdentifier=C.UsageUpdateBehavior=C.UsageMeasurementSortFields=C.UsageMarkerType=C.UnitTransformationRound=C.TrialPeriodUnits=C.TrialEndBehavior=C.TiersMode=C.TaskType=C.TaskStatus=C.SyncStatus=C.SubscriptionUpdateUsageCutoffBehavior=C.SubscriptionStatus=C.SubscriptionStartSetup=C.SubscriptionScheduleType=C.SubscriptionScheduleStatus=C.SubscriptionQuerySortFields=C.SubscriptionProrationBehavior=void 0;C.PaymentSessionFragmentDoc=C.CreditsBalanceSummaryFragmentDoc=C.CreditBalanceFragmentDoc=C.CreditLedgerFragmentDoc=C.CreditGrantFragmentDoc=C.ReportUsageFragmentDoc=C.ProvisionSubscriptionFragmentDoc=C.ApplySubscriptionFragmentDoc=C.ProvisionCustomerFragmentDoc=C.SlimSubscriptionFragmentDoc=C.UsageHistoryV2FragmentDoc=C.UsageHistoryFragmentDoc=C.PaywallFragmentDoc=C.PaywallCalculatedPricePointsFragmentDoc=C.PaywallConfigurationFragmentDoc=C.LayoutConfigurationFragmentDoc=C.PaywallCurrencyFragmentDoc=C.MockPaywallPlanFragmentDoc=C.MockPaywallPlanCompatiblePackageGroupsFragmentDoc=C.MockPaywallAddonFragmentDoc=C.MockPaywallAddonDependencyFragmentDoc=C.MockPaywallPriceFragmentDoc=C.MockPaywallPackageEntitlementFragmentDoc=C.CheckoutStateFragmentDoc=C.ZuoraCheckoutCredentialsFragmentDoc=C.StripeCheckoutCredentialsFragmentDoc=C.CheckoutConfigurationFragmentDoc=C.CustomerPortalFragmentDoc=C.CustomerPortalConfigurationFragmentDoc=C.TypographyConfigurationFragmentDoc=C.FontVariantFragmentDoc=C.CustomerPortalBillingInformationFragmentDoc=C.CustomerPortalPromotionalEntitlementFragmentDoc=C.CustomerPortalEntitlementFragmentDoc=C.CustomerPortalSubscriptionFragmentDoc=C.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc=C.CustomerPortalSubscriptionAddonFragmentDoc=C.CustomerPortalSubscriptionPriceFragmentDoc=C.CreditBalanceUpdatedPayloadFragmentDoc=C.PackagePublishedPayloadFragmentDoc=C.EntitlementUsageUpdatedFragmentDoc=C.UsageUpdatedFragmentDoc=C.EntitlementsUpdatedPayloadFragmentDoc=C.EntitlementFragmentDoc=C.FeatureFragmentDoc=C.ResetPeriodConfigurationFragmentDoc=C.SubscriptionInvoicePreviewFragmentDoc=C.SubscriptionPreviewV2FragmentDoc=C.SubscriptionPreviewInvoiceFragmentDoc=C.ImmediateSubscriptionPreviewInvoiceFragmentDoc=void 0;C.GetCustomerPortalByRefIdDocument=C.GetSdkConfigurationDocument=C.GetProductsDocument=C.GetEntitlementDocument=C.GetEntitlementsStateDocument=C.GetEntitlementsDocument=C.GetPaywallDocument=C.GetCouponsDocument=C.GetSubscriptionDocument=C.GetSubscriptionsDocument=C.GetActiveSubscriptionsListDocument=C.GetActiveSubscriptionsDocument=C.GetCustomerStatisticsDocument=C.GetCustomerByIdDocument=C.VoidCreditGrantDocument=C.CreatePaymentSessionDocument=C.UnlinkPromotionalEntitlementsGroupDocument=C.RevokePromotionalEntitlementsGroupDocument=C.GrantPromotionalEntitlementsGroupDocument=C.GrantCreditsDocument=C.TransferSubscriptionToResourceDocument=C.DelegateSubscriptionToCustomerDocument=C.TransferSubscriptionDocument=C.UnarchiveCustomerDocument=C.ArchiveCustomerDocument=C.MigrateSubscriptionToLatestDocument=C.CreateSubscriptionDocument=C.ReportEntitlementCheckRequestedDocument=C.ReportEventDocument=C.ReportUsageBulkDocument=C.ReportUsageDocument=C.CancelSubscriptionUpdatesDocument=C.PreviewNextInvoiceDocument=C.PreviewSubscriptionDocument=C.EstimateSubscriptionUpdateDocument=C.EstimateSubscriptionDocument=C.CancelSubscriptionDocument=C.UpdateSubscriptionDocument=C.ImportSubscriptionsBulkDocument=C.ApplySubscriptionDocument=C.ProvisionSubscriptionDocument=C.RevokePromotionalEntitlementDocument=C.GrantPromotionalEntitlementsDocument=C.DetachCustomerPaymentMethodDocument=C.UpdateCustomerDocument=C.ImportCustomerDocument=C.ImportCustomerBulkDocument=C.ProvisionCustomerDocument=C.CreditUsageFragmentDoc=C.SlimCustomCurrencyFragmentDoc=void 0;C.getSdk=C.OnCreditBalanceUpdatedDocument=C.OnPackagePublishedDocument=C.OnUsageUpdatedDocument=C.OnEntitlementsUpdatedDocument=C.GetCreditUsageDocument=C.GetCreditLedgerDocument=C.GetCreditGrantsDocument=C.GetCreditBalanceDocument=C.GetUsageHistoryV2Document=C.GetUsageHistoryDocument=C.GetMockPaywallDocument=C.GetCheckoutStateDocument=void 0;var Pt=(aE(),Yk(oE));(function(t){t.BudgetExceeded="BudgetExceeded",t.CustomerIsArchived="CustomerIsArchived",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.FeatureNotFound="FeatureNotFound",t.FeatureTypeMismatch="FeatureTypeMismatch",t.InsufficientCredits="InsufficientCredits",t.NoActiveSubscription="NoActiveSubscription",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",t.RequestedValuesMismatch="RequestedValuesMismatch",t.Revoked="Revoked",t.Unknown="Unknown";})(C.AccessDeniedReason||(C.AccessDeniedReason={}));(function(t){t.AuthorizedDomain="AUTHORIZED_DOMAIN",t.InviteOnly="INVITE_ONLY",t.Sso="SSO";})(C.AccountAccessMethod||(C.AccountAccessMethod={}));(function(t){t.Member="MEMBER",t.Owner="OWNER";})(C.AccountAccessRole||(C.AccountAccessRole={}));(function(t){t.Active="ACTIVE",t.Blocked="BLOCKED";})(C.AccountStatus||(C.AccountStatus={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.AddonSortFields||(C.AddonSortFields={}));(function(t){t.Avg="AVG",t.Count="COUNT",t.Max="MAX",t.Min="MIN",t.Sum="SUM",t.Unique="UNIQUE";})(C.AggregationFunction||(C.AggregationFunction={}));(function(t){t.Center="CENTER",t.Left="LEFT",t.Right="RIGHT";})(C.Alignment||(C.Alignment={}));(function(t){t.Id="id";})(C.ApiKeySortFields||(C.ApiKeySortFields={}));(function(t){t.Client="CLIENT",t.Salesforce="SALESFORCE",t.Server="SERVER",t.Workflow="WORKFLOW";})(C.ApiKeyType||(C.ApiKeyType={}));(function(t){t.Both="BOTH",t.Individual="INDIVIDUAL",t.Organization="ORGANIZATION";})(C.Auth0ApplicationType||(C.Auth0ApplicationType={}));(function(t){t.StartOfTheMonth="START_OF_THE_MONTH",t.SubscriptionsConsolidateBilling="SUBSCRIPTIONS_CONSOLIDATE_BILLING",t.SubscriptionStart="SUBSCRIPTION_START";})(C.BillingAnchor||(C.BillingAnchor={}));(function(t){t.OneOff="ONE_OFF",t.Recurring="RECURRING";})(C.BillingCadence||(C.BillingCadence={}));(function(t){t.CreditBased="CREDIT_BASED",t.FlatFee="FLAT_FEE",t.MinimumSpend="MINIMUM_SPEND",t.PerUnit="PER_UNIT",t.UsageBased="USAGE_BASED";})(C.BillingModel||(C.BillingModel={}));(function(t){t.Annually="ANNUALLY",t.Monthly="MONTHLY";})(C.BillingPeriod||(C.BillingPeriod={}));(function(t){t.Stripe="STRIPE",t.Zuora="ZUORA";})(C.BillingVendorIdentifier||(C.BillingVendorIdentifier={}));(function(t){t.Added="ADDED",t.Deleted="DELETED",t.Modified="MODIFIED",t.Reordered="REORDERED";})(C.ChangeType||(C.ChangeType={}));(function(t){t.Equals="EQUALS",t.GreaterThan="GREATER_THAN",t.GreaterThanOrEqual="GREATER_THAN_OR_EQUAL",t.IsNotNull="IS_NOT_NULL",t.IsNull="IS_NULL",t.LessThan="LESS_THAN",t.LessThanOrEqual="LESS_THAN_OR_EQUAL",t.NotEquals="NOT_EQUALS";})(C.ConditionOperation||(C.ConditionOperation={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.Source="source",t.Status="status",t.Type="type",t.UpdatedAt="updatedAt";})(C.CouponSortFields||(C.CouponSortFields={}));(function(t){t.Stigg="STIGG",t.StiggAdhoc="STIGG_ADHOC",t.Stripe="STRIPE";})(C.CouponSource||(C.CouponSource={}));(function(t){t.Active="ACTIVE",t.Archived="ARCHIVED";})(C.CouponStatus||(C.CouponStatus={}));(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE";})(C.CouponType||(C.CouponType={}));(function(t){t.Paid="PAID",t.Promotional="PROMOTIONAL";})(C.CreditGrantType||(C.CreditGrantType={}));(function(t){t.CreditsConsumed="CREDITS_CONSUMED",t.CreditsExpired="CREDITS_EXPIRED",t.CreditsGranted="CREDITS_GRANTED",t.CreditsVoided="CREDITS_VOIDED";})(C.CreditLedgerEventType||(C.CreditLedgerEventType={}));(function(t){t.LastDay="LAST_DAY",t.LastMonth="LAST_MONTH",t.LastWeek="LAST_WEEK",t.LastYear="LAST_YEAR";})(C.CreditUsageTimeRange||(C.CreditUsageTimeRange={}));(function(t){t.Aed="AED",t.All="ALL",t.Amd="AMD",t.Ang="ANG",t.Aud="AUD",t.Awg="AWG",t.Azn="AZN",t.Bam="BAM",t.Bbd="BBD",t.Bdt="BDT",t.Bgn="BGN",t.Bif="BIF",t.Bmd="BMD",t.Bnd="BND",t.Brl="BRL",t.Bsd="BSD",t.Bwp="BWP",t.Byn="BYN",t.Bzd="BZD",t.Cad="CAD",t.Cdf="CDF",t.Chf="CHF",t.Clp="CLP",t.Cny="CNY",t.Czk="CZK",t.Djf="DJF",t.Dkk="DKK",t.Dop="DOP",t.Dzd="DZD",t.Egp="EGP",t.Etb="ETB",t.Eur="EUR",t.Fjd="FJD",t.Gbp="GBP",t.Gel="GEL",t.Gip="GIP",t.Gmd="GMD",t.Gnf="GNF",t.Gyd="GYD",t.Hkd="HKD",t.Hrk="HRK",t.Htg="HTG",t.Idr="IDR",t.Ils="ILS",t.Inr="INR",t.Isk="ISK",t.Jmd="JMD",t.Jpy="JPY",t.Kes="KES",t.Kgs="KGS",t.Khr="KHR",t.Kmf="KMF",t.Krw="KRW",t.Kyd="KYD",t.Kzt="KZT",t.Lbp="LBP",t.Lkr="LKR",t.Lrd="LRD",t.Lsl="LSL",t.Mad="MAD",t.Mdl="MDL",t.Mga="MGA",t.Mkd="MKD",t.Mmk="MMK",t.Mnt="MNT",t.Mop="MOP",t.Mro="MRO",t.Mvr="MVR",t.Mwk="MWK",t.Mxn="MXN",t.Myr="MYR",t.Mzn="MZN",t.Nad="NAD",t.Ngn="NGN",t.Nok="NOK",t.Npr="NPR",t.Nzd="NZD",t.Pgk="PGK",t.Php="PHP",t.Pkr="PKR",t.Pln="PLN",t.Pyg="PYG",t.Qar="QAR",t.Ron="RON",t.Rsd="RSD",t.Rub="RUB",t.Rwf="RWF",t.Sar="SAR",t.Sbd="SBD",t.Scr="SCR",t.Sek="SEK",t.Sgd="SGD",t.Sle="SLE",t.Sll="SLL",t.Sos="SOS",t.Szl="SZL",t.Thb="THB",t.Tjs="TJS",t.Top="TOP",t.Try="TRY",t.Ttd="TTD",t.Tzs="TZS",t.Uah="UAH",t.Ugx="UGX",t.Usd="USD",t.Uzs="UZS",t.Vnd="VND",t.Vuv="VUV",t.Wst="WST",t.Xaf="XAF",t.Xcd="XCD",t.Xof="XOF",t.Xpf="XPF",t.Yer="YER",t.Zar="ZAR",t.Zmw="ZMW";})(C.Currency||(C.Currency={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.ResourceId="resourceId";})(C.CustomerResourceSortFields||(C.CustomerResourceSortFields={}));(function(t){t.AwsMarketplaceCustomerId="awsMarketplaceCustomerId",t.BillingId="billingId",t.CreatedAt="createdAt",t.CrmHubspotCompanyId="crmHubspotCompanyId",t.CrmHubspotCompanyUrl="crmHubspotCompanyUrl",t.CrmId="crmId",t.CustomerId="customerId",t.DeletedAt="deletedAt",t.Email="email",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.SalesforceId="salesforceId",t.SearchQuery="searchQuery",t.UpdatedAt="updatedAt";})(C.CustomerSortFields||(C.CustomerSortFields={}));(function(t){t.BillingCycleAnchor="billingCycleAnchor",t.BillingId="billingId",t.CancelReason="cancelReason",t.CancellationDate="cancellationDate",t.CreatedAt="createdAt",t.CrmId="crmId",t.CrmLinkUrl="crmLinkUrl",t.CurrentBillingPeriodEnd="currentBillingPeriodEnd",t.CurrentBillingPeriodStart="currentBillingPeriodStart",t.CustomerId="customerId",t.EffectiveEndDate="effectiveEndDate",t.EndDate="endDate",t.EnvironmentId="environmentId",t.Id="id",t.OldBillingId="oldBillingId",t.PayingCustomerId="payingCustomerId",t.PaymentCollection="paymentCollection",t.PricingType="pricingType",t.RefId="refId",t.ResourceId="resourceId",t.SalesforceId="salesforceId",t.StartDate="startDate",t.Status="status",t.SubscriptionId="subscriptionId",t.TrialEndDate="trialEndDate";})(C.CustomerSubscriptionSortFields||(C.CustomerSubscriptionSortFields={}));(function(t){t.CeoOrFounder="CEO_OR_FOUNDER",t.Engineering="ENGINEERING",t.Growth="GROWTH",t.Marketing="MARKETING",t.Monetization="MONETIZATION",t.Other="OTHER",t.Product="PRODUCT";})(C.Department||(C.Department={}));(function(t){t.Forever="FOREVER",t.Once="ONCE",t.Repeating="REPEATING";})(C.DiscountDurationType||(C.DiscountDurationType={}));(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE";})(C.DiscountType||(C.DiscountType={}));(function(t){t.Increment="Increment",t.Override="Override";})(C.EntitlementBehavior||(C.EntitlementBehavior={}));(function(t){t.Day="DAY",t.Hour="HOUR",t.Month="MONTH",t.Week="WEEK",t.Year="YEAR";})(C.EntitlementResetPeriod||(C.EntitlementResetPeriod={}));(function(t){t.CustomerNotFound="CustomerNotFound",t.NoActiveSubscription="NoActiveSubscription";})(C.EntitlementsStateAccessDeniedReason||(C.EntitlementsStateAccessDeniedReason={}));(function(t){t.BlackList="BLACK_LIST",t.WhiteList="WHITE_LIST";})(C.EntitySelectionMode||(C.EntitySelectionMode={}));(function(t){t.Admin="ADMIN",t.None="NONE",t.Support="SUPPORT",t.Viewer="VIEWER";})(C.EnvironmentAccessRole||(C.EnvironmentAccessRole={}));(function(t){t.Done="DONE",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.NotProvisioned="NOT_PROVISIONED";})(C.EnvironmentProvisionStatus||(C.EnvironmentProvisionStatus={}));(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.Id="id",t.PermanentDeletionDate="permanentDeletionDate",t.Slug="slug";})(C.EnvironmentSortFields||(C.EnvironmentSortFields={}));(function(t){t.Development="DEVELOPMENT",t.Production="PRODUCTION",t.Sandbox="SANDBOX";})(C.EnvironmentType||(C.EnvironmentType={}));(function(t){t.AccessDeniedError="AccessDeniedError",t.AccountNotFoundError="AccountNotFoundError",t.AddonDependencyMissingError="AddonDependencyMissingError",t.AddonHasToHavePriceError="AddonHasToHavePriceError",t.AddonIsCompatibleWithGroup="AddonIsCompatibleWithGroup",t.AddonIsCompatibleWithPlan="AddonIsCompatibleWithPlan",t.AddonNotFound="AddonNotFound",t.AddonQuantityExceedsLimitError="AddonQuantityExceedsLimitError",t.AddonWithDraftCannotBeDeletedError="AddonWithDraftCannotBeDeletedError",t.AddonsNotFound="AddonsNotFound",t.AmountTooLarge="AmountTooLarge",t.ArchivedCouponCantBeApplied="ArchivedCouponCantBeApplied",t.AuthCustomerMismatch="AuthCustomerMismatch",t.AuthCustomerReadonly="AuthCustomerReadonly",t.AwsMarketplaceIntegrationError="AwsMarketplaceIntegrationError",t.AwsMarketplaceIntegrationValidationError="AwsMarketplaceIntegrationValidationError",t.BadUserInput="BadUserInput",t.BillingIntegrationAlreadyExistsError="BillingIntegrationAlreadyExistsError",t.BillingIntegrationMissing="BillingIntegrationMissing",t.BillingPeriodMissingError="BillingPeriodMissingError",t.CanNotUpdateEntitlementsFeatureGroup="CanNotUpdateEntitlementsFeatureGroup",t.CannotAddOverrideEntitlementToPlan="CannotAddOverrideEntitlementToPlan",t.CannotArchiveFeatureError="CannotArchiveFeatureError",t.CannotArchiveFeatureGroupError="CannotArchiveFeatureGroupError",t.CannotChangeBillingIntegration="CannotChangeBillingIntegration",t.CannotDeleteCustomerError="CannotDeleteCustomerError",t.CannotDeleteDefaultIntegration="CannotDeleteDefaultIntegration",t.CannotDeleteFeatureError="CannotDeleteFeatureError",t.CannotDeleteProductError="CannotDeleteProductError",t.CannotEditPackageInNonDraftMode="CannotEditPackageInNonDraftMode",t.CannotRemovePaymentMethodFromCustomerError="CannotRemovePaymentMethodFromCustomerError",t.CannotReportUsageForEntitlementWithMeterError="CannotReportUsageForEntitlementWithMeterError",t.CannotUpdateExpireAtForExpiredCreditGrantError="CannotUpdateExpireAtForExpiredCreditGrantError",t.CannotUpdateUnitTransformationError="CannotUpdateUnitTransformationError",t.CannotUpsertToPackageThatHasDraft="CannotUpsertToPackageThatHasDraft",t.ChangingPayingCustomerIsNotSupportedError="ChangingPayingCustomerIsNotSupportedError",t.CheckoutIsNotSupported="CheckoutIsNotSupported",t.CouponNotFound="CouponNotFound",t.CreditGrantAlreadyVoided="CreditGrantAlreadyVoided",t.CreditGrantNotFound="CreditGrantNotFound",t.CustomCurrencyNotFound="CustomCurrencyNotFound",t.CustomerAlreadyHaveCustomerCoupon="CustomerAlreadyHaveCustomerCoupon",t.CustomerAlreadyUsesCoupon="CustomerAlreadyUsesCoupon",t.CustomerHasNoEmailAddress="CustomerHasNoEmailAddress",t.CustomerNoBillingId="CustomerNoBillingId",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.DeprecatedEstimateSubscriptionError="DeprecatedEstimateSubscriptionError",t.DowngradeBillingPeriodNotSupportedError="DowngradeBillingPeriodNotSupportedError",t.DraftAddonCantBeArchived="DraftAddonCantBeArchived",t.DraftAlreadyExists="DraftAlreadyExists",t.DraftPlanCantBeArchived="DraftPlanCantBeArchived",t.DuplicateAddonProvisionedError="DuplicateAddonProvisionedError",t.DuplicateIntegrationNotAllowed="DuplicateIntegrationNotAllowed",t.DuplicateProductValidationError="DuplicateProductValidationError",t.DuplicatedEntityNotAllowed="DuplicatedEntityNotAllowed",t.EditAllowedOnDraftPackageOnlyError="EditAllowedOnDraftPackageOnlyError",t.EntitlementBelongsToFeatureGroupError="EntitlementBelongsToFeatureGroupError",t.EntitlementLimitExceededError="EntitlementLimitExceededError",t.EntitlementUsageOutOfRangeError="EntitlementUsageOutOfRangeError",t.EntitlementsMustBelongToSamePackage="EntitlementsMustBelongToSamePackage",t.EntityIdDifferentFromRefIdError="EntityIdDifferentFromRefIdError",t.EntityIsArchivedError="EntityIsArchivedError",t.EnvironmentMissing="EnvironmentMissing",t.ExperimentAlreadyRunning="ExperimentAlreadyRunning",t.ExperimentNotFoundError="ExperimentNotFoundError",t.ExperimentStatusError="ExperimentStatusError",t.ExpireAtMustBeLaterThanEffectiveAtError="ExpireAtMustBeLaterThanEffectiveAtError",t.FailedToCreateCheckoutSessionError="FailedToCreateCheckoutSessionError",t.FailedToImportCustomer="FailedToImportCustomer",t.FailedToImportSubscriptions="FailedToImportSubscriptions",t.FailedToResolveBillingIntegration="FailedToResolveBillingIntegration",t.FeatureConfigurationExceededLimitError="FeatureConfigurationExceededLimitError",t.FeatureGroupMissingFeaturesError="FeatureGroupMissingFeaturesError",t.FeatureGroupNotFoundError="FeatureGroupNotFoundError",t.FeatureNotBelongToFeatureGroupError="FeatureNotBelongToFeatureGroupError",t.FeatureNotFound="FeatureNotFound",t.FetchAllCountriesPricesNotAllowed="FetchAllCountriesPricesNotAllowed",t.FreePlanCantHaveCompatiblePackageGroupError="FreePlanCantHaveCompatiblePackageGroupError",t.GraphQlAliasesLimitExceeded="GraphQLAliasesLimitExceeded",t.GraphQlBatchedOperationsLimitExceeded="GraphQLBatchedOperationsLimitExceeded",t.GraphQlUnsupportedDirective="GraphQLUnsupportedDirective",t.HubspotIntegrationError="HubspotIntegrationError",t.IdentityForbidden="IdentityForbidden",t.ImportAlreadyInProgress="ImportAlreadyInProgress",t.ImportSubscriptionsBulkError="ImportSubscriptionsBulkError",t.IncompatibleSubscriptionAddon="IncompatibleSubscriptionAddon",t.InitStripePaymentMethodError="InitStripePaymentMethodError",t.IntegrationNotFound="IntegrationNotFound",t.IntegrationValidationError="IntegrationValidationError",t.IntegrityViolation="IntegrityViolation",t.InvalidAddressError="InvalidAddressError",t.InvalidArgumentError="InvalidArgumentError",t.InvalidCancellationDate="InvalidCancellationDate",t.InvalidDoggoSignatureError="InvalidDoggoSignatureError",t.InvalidEntitlementResetPeriod="InvalidEntitlementResetPeriod",t.InvalidMemberDelete="InvalidMemberDelete",t.InvalidMetadataError="InvalidMetadataError",t.InvalidQuantity="InvalidQuantity",t.InvalidSubscriptionStatus="InvalidSubscriptionStatus",t.InvalidUpdatePriceUnitAmountError="InvalidUpdatePriceUnitAmountError",t.MemberInvitationError="MemberInvitationError",t.MemberNotFound="MemberNotFound",t.MergeEnvironmentValidationError="MergeEnvironmentValidationError",t.MeterMustBeAssociatedToMeteredFeature="MeterMustBeAssociatedToMeteredFeature",t.MeteringNotAvailableForFeatureType="MeteringNotAvailableForFeatureType",t.MissingEntityIdError="MissingEntityIdError",t.MissingSubscriptionInvoiceError="MissingSubscriptionInvoiceError",t.MultiSubscriptionCantBeAutoCancellationSourceError="MultiSubscriptionCantBeAutoCancellationSourceError",t.NoActiveSubscriptionForCustomer="NoActiveSubscriptionForCustomer",t.NoDraftOfferFound="NoDraftOfferFound",t.NoFeatureEntitlementError="NoFeatureEntitlementError",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.NoProductsAvailable="NoProductsAvailable",t.OfferAlreadyExists="OfferAlreadyExists",t.OfferNotFound="OfferNotFound",t.OperationNotAllowedDuringInProgressExperiment="OperationNotAllowedDuringInProgressExperiment",t.PackageAlreadyPublished="PackageAlreadyPublished",t.PackageGroupMinItemsError="PackageGroupMinItemsError",t.PackageGroupNotFound="PackageGroupNotFound",t.PackagePricingTypeNotSet="PackagePricingTypeNotSet",t.PaymentMethodNotFoundError="PaymentMethodNotFoundError",t.PlanCannotBePublishWhenBasePlanIsDraft="PlanCannotBePublishWhenBasePlanIsDraft",t.PlanCannotBePublishWhenCompatibleAddonIsDraft="PlanCannotBePublishWhenCompatibleAddonIsDraft",t.PlanIsUsedAsDefaultStartPlan="PlanIsUsedAsDefaultStartPlan",t.PlanIsUsedAsDowngradePlan="PlanIsUsedAsDowngradePlan",t.PlanNotFound="PlanNotFound",t.PlanWithChildCantBeDeleted="PlanWithChildCantBeDeleted",t.PlansCircularDependencyError="PlansCircularDependencyError",t.PreparePaymentMethodFormError="PreparePaymentMethodFormError",t.PriceNotFound="PriceNotFound",t.ProductNotFoundError="ProductNotFoundError",t.PromotionCodeCustomerNotFirstPurchase="PromotionCodeCustomerNotFirstPurchase",t.PromotionCodeMaxRedemptionsReached="PromotionCodeMaxRedemptionsReached",t.PromotionCodeMinimumAmountNotReached="PromotionCodeMinimumAmountNotReached",t.PromotionCodeNotActive="PromotionCodeNotActive",t.PromotionCodeNotForCustomer="PromotionCodeNotForCustomer",t.PromotionCodeNotFound="PromotionCodeNotFound",t.PromotionalEntitlementNotFoundError="PromotionalEntitlementNotFoundError",t.RateLimitExceeded="RateLimitExceeded",t.RecalculateEntitlementsError="RecalculateEntitlementsError",t.RequiredSsoAuthenticationError="RequiredSsoAuthenticationError",t.ResyncAlreadyInProgress="ResyncAlreadyInProgress",t.ScheduledMigrationAlreadyExistsError="ScheduledMigrationAlreadyExistsError",t.SelectedBillingModelDoesntMatchImportedItemError="SelectedBillingModelDoesntMatchImportedItemError",t.SingleSubscriptionCantBeAutoCancellationTargetError="SingleSubscriptionCantBeAutoCancellationTargetError",t.StripeCustomerIsDeleted="StripeCustomerIsDeleted",t.StripeError="StripeError",t.SubscriptionAlreadyCanceledOrExpired="SubscriptionAlreadyCanceledOrExpired",t.SubscriptionAlreadyOnLatestPlanError="SubscriptionAlreadyOnLatestPlanError",t.SubscriptionDoesNotHaveBillingPeriod="SubscriptionDoesNotHaveBillingPeriod",t.SubscriptionInvoiceStatusError="SubscriptionInvoiceStatusError",t.SubscriptionMustHaveSinglePlanError="SubscriptionMustHaveSinglePlanError",t.SubscriptionNoBillingId="SubscriptionNoBillingId",t.SubscriptionNotFound="SubscriptionNotFound",t.TooManyCustomCurrencies="TooManyCustomCurrencies",t.TooManySubscriptionsPerCustomer="TooManySubscriptionsPerCustomer",t.TrialMustBeCancelledImmediately="TrialMustBeCancelledImmediately",t.UnPublishedPackage="UnPublishedPackage",t.Unauthenticated="Unauthenticated",t.UnexpectedError="UnexpectedError",t.UnsupportedFeatureType="UnsupportedFeatureType",t.UnsupportedParameter="UnsupportedParameter",t.UnsupportedSubscriptionScheduleType="UnsupportedSubscriptionScheduleType",t.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier",t.UsageMeasurementDiffOutOfRangeError="UsageMeasurementDiffOutOfRangeError",t.VersionExceedsMaxValueError="VersionExceedsMaxValueError",t.WorkflowTriggerNotFound="WorkflowTriggerNotFound";})(C.ErrorCode||(C.ErrorCode={}));(function(t){t.AppCustomer="APP_CUSTOMER",t.AppPublic="APP_PUBLIC",t.AppServer="APP_SERVER",t.Aws="AWS",t.Import="IMPORT",t.Migration="MIGRATION",t.Salesforce="SALESFORCE",t.Scheduler="SCHEDULER",t.Service="SERVICE",t.Stripe="STRIPE",t.Support="SUPPORT",t.System="SYSTEM",t.User="USER",t.Workflow="WORKFLOW";})(C.EventActor||(C.EventActor={}));(function(t){t.Addon="ADDON",t.Coupon="COUPON",t.Credit="CREDIT",t.Customer="CUSTOMER",t.Entitlement="ENTITLEMENT",t.Feature="FEATURE",t.FeatureGroup="FEATURE_GROUP",t.Import="IMPORT",t.Measurement="MEASUREMENT",t.Package="PACKAGE",t.PackageGroup="PACKAGE_GROUP",t.Plan="PLAN",t.Product="PRODUCT",t.PromotionalEntitlement="PROMOTIONAL_ENTITLEMENT",t.Subscription="SUBSCRIPTION";})(C.EventEntityType||(C.EventEntityType={}));(function(t){t.CreatedAt="createdAt",t.EntityId="entityId",t.EnvironmentId="environmentId",t.EventLogType="eventLogType",t.Id="id",t.ParentEntityId="parentEntityId";})(C.EventLogSortFields||(C.EventLogSortFields={}));(function(t){t.AddonCreated="ADDON_CREATED",t.AddonDeleted="ADDON_DELETED",t.AddonUpdated="ADDON_UPDATED",t.CouponArchived="COUPON_ARCHIVED",t.CouponCreated="COUPON_CREATED",t.CouponUpdated="COUPON_UPDATED",t.CreateSubscriptionFailed="CREATE_SUBSCRIPTION_FAILED",t.CreditsBalanceDepletedOld="CREDITS_BALANCE_DEPLETED_OLD",t.CreditsBalanceLowOld="CREDITS_BALANCE_LOW_OLD",t.CreditsGrantBalanceLowOld="CREDITS_GRANT_BALANCE_LOW_OLD",t.CreditsGrantDepletedOld="CREDITS_GRANT_DEPLETED_OLD",t.CreditsGrantExpiredOld="CREDITS_GRANT_EXPIRED_OLD",t.CreditsGrantGrantedOld="CREDITS_GRANT_GRANTED_OLD",t.CreditsGrantUpdatedOld="CREDITS_GRANT_UPDATED_OLD",t.CreditBalanceDepleted="CREDIT_BALANCE_DEPLETED",t.CreditBalanceLow="CREDIT_BALANCE_LOW",t.CreditGrantBalanceLow="CREDIT_GRANT_BALANCE_LOW",t.CreditGrantCreated="CREDIT_GRANT_CREATED",t.CreditGrantDepleted="CREDIT_GRANT_DEPLETED",t.CreditGrantExpired="CREDIT_GRANT_EXPIRED",t.CreditGrantUpdated="CREDIT_GRANT_UPDATED",t.CreditGrantVoided="CREDIT_GRANT_VOIDED",t.CustomerCreated="CUSTOMER_CREATED",t.CustomerDeleted="CUSTOMER_DELETED",t.CustomerEntitlementCalculationTriggered="CUSTOMER_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerPaymentFailed="CUSTOMER_PAYMENT_FAILED",t.CustomerResourceEntitlementCalculationTriggered="CUSTOMER_RESOURCE_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerUpdated="CUSTOMER_UPDATED",t.EdgeApiClientConfigurationDataResync="EDGE_API_CLIENT_CONFIGURATION_DATA_RESYNC",t.EdgeApiCustomerDataResync="EDGE_API_CUSTOMER_DATA_RESYNC",t.EdgeApiDataResync="EDGE_API_DATA_RESYNC",t.EdgeApiDoggoResync="EDGE_API_DOGGO_RESYNC",t.EdgeApiPackageEntitlementsDataResync="EDGE_API_PACKAGE_ENTITLEMENTS_DATA_RESYNC",t.EdgeApiSubscriptionsDataResync="EDGE_API_SUBSCRIPTIONS_DATA_RESYNC",t.EntitlementsUpdated="ENTITLEMENTS_UPDATED",t.EntitlementDenied="ENTITLEMENT_DENIED",t.EntitlementGranted="ENTITLEMENT_GRANTED",t.EntitlementRequested="ENTITLEMENT_REQUESTED",t.EntitlementUsageExceeded="ENTITLEMENT_USAGE_EXCEEDED",t.EnvironmentDeleted="ENVIRONMENT_DELETED",t.FeatureArchived="FEATURE_ARCHIVED",t.FeatureCreated="FEATURE_CREATED",t.FeatureDeleted="FEATURE_DELETED",t.FeatureGroupArchived="FEATURE_GROUP_ARCHIVED",t.FeatureGroupCreated="FEATURE_GROUP_CREATED",t.FeatureGroupUnArchived="FEATURE_GROUP_UN_ARCHIVED",t.FeatureGroupUpdated="FEATURE_GROUP_UPDATED",t.FeatureUpdated="FEATURE_UPDATED",t.ImportIntegrationCatalogTriggered="IMPORT_INTEGRATION_CATALOG_TRIGGERED",t.ImportIntegrationCustomersTriggered="IMPORT_INTEGRATION_CUSTOMERS_TRIGGERED",t.ImportSubscriptionsBulkTriggered="IMPORT_SUBSCRIPTIONS_BULK_TRIGGERED",t.MeasurementReported="MEASUREMENT_REPORTED",t.PackageGroupCreated="PACKAGE_GROUP_CREATED",t.PackageGroupUpdated="PACKAGE_GROUP_UPDATED",t.PackagePublished="PACKAGE_PUBLISHED",t.PlanCreated="PLAN_CREATED",t.PlanDeleted="PLAN_DELETED",t.PlanUpdated="PLAN_UPDATED",t.ProductCreated="PRODUCT_CREATED",t.ProductDeleted="PRODUCT_DELETED",t.ProductUpdated="PRODUCT_UPDATED",t.PromotionalEntitlementEndsSoon="PROMOTIONAL_ENTITLEMENT_ENDS_SOON",t.PromotionalEntitlementExpired="PROMOTIONAL_ENTITLEMENT_EXPIRED",t.PromotionalEntitlementGranted="PROMOTIONAL_ENTITLEMENT_GRANTED",t.PromotionalEntitlementRevoked="PROMOTIONAL_ENTITLEMENT_REVOKED",t.PromotionalEntitlementUpdated="PROMOTIONAL_ENTITLEMENT_UPDATED",t.RecalculateEntitlementsTriggered="RECALCULATE_ENTITLEMENTS_TRIGGERED",t.ResyncIntegrationTriggered="RESYNC_INTEGRATION_TRIGGERED",t.SubscriptionsMigrated="SUBSCRIPTIONS_MIGRATED",t.SubscriptionsMigrationTriggered="SUBSCRIPTIONS_MIGRATION_TRIGGERED",t.SubscriptionBillingMonthEndsSoon="SUBSCRIPTION_BILLING_MONTH_ENDS_SOON",t.SubscriptionCanceled="SUBSCRIPTION_CANCELED",t.SubscriptionCreated="SUBSCRIPTION_CREATED",t.SubscriptionExpired="SUBSCRIPTION_EXPIRED",t.SubscriptionSpentLimitExceeded="SUBSCRIPTION_SPENT_LIMIT_EXCEEDED",t.SubscriptionTrialConverted="SUBSCRIPTION_TRIAL_CONVERTED",t.SubscriptionTrialEndsSoon="SUBSCRIPTION_TRIAL_ENDS_SOON",t.SubscriptionTrialExpired="SUBSCRIPTION_TRIAL_EXPIRED",t.SubscriptionTrialStarted="SUBSCRIPTION_TRIAL_STARTED",t.SubscriptionUpdated="SUBSCRIPTION_UPDATED",t.SubscriptionUsageChargeTriggered="SUBSCRIPTION_USAGE_CHARGE_TRIGGERED",t.SubscriptionUsageUpdated="SUBSCRIPTION_USAGE_UPDATED",t.SyncFailed="SYNC_FAILED",t.WidgetConfigurationUpdated="WIDGET_CONFIGURATION_UPDATED";})(C.EventLogType||(C.EventLogType={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.ProductId="productId",t.RefId="refId",t.Status="status";})(C.ExperimentSortFields||(C.ExperimentSortFields={}));(function(t){t.Completed="COMPLETED",t.Draft="DRAFT",t.InProgress="IN_PROGRESS";})(C.ExperimentStatus||(C.ExperimentStatus={}));(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureGroupId="featureGroupId",t.Id="id",t.IsLatest="isLatest",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.FeatureGroupSortFields||(C.FeatureGroupSortFields={}));(function(t){t.Archived="ARCHIVED",t.Published="PUBLISHED";})(C.FeatureGroupStatus||(C.FeatureGroupStatus={}));(function(t){t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureStatus="featureStatus",t.FeatureType="featureType",t.Id="id",t.MeterType="meterType",t.RefId="refId",t.UpdatedAt="updatedAt";})(C.FeatureSortFields||(C.FeatureSortFields={}));(function(t){t.Active="ACTIVE",t.New="NEW",t.Suspended="SUSPENDED";})(C.FeatureStatus||(C.FeatureStatus={}));(function(t){t.Boolean="BOOLEAN",t.Enum="ENUM",t.Number="NUMBER";})(C.FeatureType||(C.FeatureType={}));(function(t){t.Bold="BOLD",t.Normal="NORMAL";})(C.FontWeight||(C.FontWeight={}));(function(t){t.CreatedAt="createdAt",t.Endpoint="endpoint",t.EnvironmentId="environmentId",t.Id="id",t.Status="status";})(C.HookSortFields||(C.HookSortFields={}));(function(t){t.Active="ACTIVE",t.Inactive="INACTIVE";})(C.HookStatus||(C.HookStatus={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType";})(C.ImportIntegrationTaskSortFields||(C.ImportIntegrationTaskSortFields={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.VendorIdentifier="vendorIdentifier",t.VendorType="vendorType";})(C.IntegrationSortFields||(C.IntegrationSortFields={}));(function(t){t.AddonCharge="AddonCharge",t.BaseCharge="BaseCharge",t.InAdvanceCommitmentCharge="InAdvanceCommitmentCharge",t.MinimumSpendAdjustmentCharge="MinimumSpendAdjustmentCharge",t.MinimumSpendCharge="MinimumSpendCharge",t.Other="Other",t.OverageCharge="OverageCharge",t.PayAsYouGoCharge="PayAsYouGoCharge",t.TierCharge="TierCharge",t.ZeroAmountBaseCharge="ZeroAmountBaseCharge";})(C.InvoiceLineItemType||(C.InvoiceLineItemType={}));(function(t){t.CreatedAt="createdAt",t.Email="email",t.Id="id";})(C.MemberSortFields||(C.MemberSortFields={}));(function(t){t.Invited="INVITED",t.Registered="REGISTERED";})(C.MemberStatus||(C.MemberStatus={}));(function(t){t.Fluctuating="Fluctuating",t.Incremental="Incremental",t.None="None";})(C.MeterType||(C.MeterType={}));(function(t){t.StartOfTheMonth="StartOfTheMonth",t.SubscriptionStart="SubscriptionStart";})(C.MonthlyAccordingTo||(C.MonthlyAccordingTo={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.IsDefault="isDefault",t.IsLatest="isLatest",t.OfferId="offerId",t.Status="status",t.Version="version";})(C.OfferSortFields||(C.OfferSortFields={}));(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED";})(C.OfferStatus||(C.OfferStatus={}));(function(t){t.Monthly="MONTHLY",t.OnSubscriptionRenewal="ON_SUBSCRIPTION_RENEWAL";})(C.OverageBillingPeriod||(C.OverageBillingPeriod={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.PackageDtoSortFields||(C.PackageDtoSortFields={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.PackageId="packageId",t.UpdatedAt="updatedAt";})(C.PackageEntitlementSortFields||(C.PackageEntitlementSortFields={}));(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.IsLatest="isLatest",t.PackageGroupId="packageGroupId",t.ProductId="productId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.PackageGroupSortFields||(C.PackageGroupSortFields={}));(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED";})(C.PackageGroupStatus||(C.PackageGroupStatus={}));(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED";})(C.PackageStatus||(C.PackageStatus={}));(function(t){t.ActionRequired="ACTION_REQUIRED",t.Failed="FAILED",t.NotRequired="NOT_REQUIRED",t.Processing="PROCESSING";})(C.PaymentCollection||(C.PaymentCollection={}));(function(t){t.Charge="CHARGE",t.Invoice="INVOICE",t.None="NONE";})(C.PaymentCollectionMethod||(C.PaymentCollectionMethod={}));(function(t){t.Bank="BANK",t.Card="CARD",t.CashApp="CASH_APP";})(C.PaymentMethodType||(C.PaymentMethodType={}));(function(t){t.Downgrade="DOWNGRADE",t.None="NONE",t.Upgrade="UPGRADE";})(C.PlanChangeType||(C.PlanChangeType={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.PlanSortFields||(C.PlanSortFields={}));(function(t){t.BillingCadence="billingCadence",t.BillingId="billingId",t.BillingModel="billingModel",t.BillingPeriod="billingPeriod",t.CreatedAt="createdAt",t.Id="id",t.TiersMode="tiersMode";})(C.PriceSortFields||(C.PriceSortFields={}));(function(t){t.Custom="CUSTOM",t.Free="FREE",t.Paid="PAID";})(C.PricingType||(C.PricingType={}));(function(t){t.AwsMarketplaceProductCode="awsMarketplaceProductCode",t.AwsMarketplaceProductId="awsMarketplaceProductId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsDefaultProduct="isDefaultProduct",t.MultipleSubscriptions="multipleSubscriptions",t.RefId="refId",t.UpdatedAt="updatedAt";})(C.ProductSortFields||(C.ProductSortFields={}));(function(t){t.Custom="CUSTOM",t.Lifetime="LIFETIME",t.OneMonth="ONE_MONTH",t.OneWeek="ONE_WEEK",t.OneYear="ONE_YEAR",t.SixMonth="SIX_MONTH";})(C.PromotionalEntitlementPeriod||(C.PromotionalEntitlementPeriod={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.UpdatedAt="updatedAt";})(C.PromotionalEntitlementSortFields||(C.PromotionalEntitlementSortFields={}));(function(t){t.Active="Active",t.Expired="Expired",t.Paused="Paused";})(C.PromotionalEntitlementStatus||(C.PromotionalEntitlementStatus={}));(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY";})(C.ProrationBehavior||(C.ProrationBehavior={}));(function(t){t.PaymentRequired="PAYMENT_REQUIRED",t.Success="SUCCESS";})(C.ProvisionSubscriptionStatus||(C.ProvisionSubscriptionStatus={}));(function(t){t.AllCustomers="ALL_CUSTOMERS",t.NewCustomers="NEW_CUSTOMERS";})(C.PublishMigrationType||(C.PublishMigrationType={}));(function(t){t.EndOfBillingMonth="END_OF_BILLING_MONTH",t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE";})(C.ScheduleStrategy||(C.ScheduleStrategy={}));(function(t){t.Asc="ASC",t.Desc="DESC";})(C.SortDirection||(C.SortDirection={}));(function(t){t.NullsFirst="NULLS_FIRST",t.NullsLast="NULLS_LAST";})(C.SortNulls||(C.SortNulls={}));(function(t){t.JsClientSdk="JS_CLIENT_SDK",t.NodeServerSdk="NODE_SERVER_SDK",t.PersistentCacheService="PERSISTENT_CACHE_SERVICE";})(C.SourceType||(C.SourceType={}));(function(t){t.CreatedAt="createdAt",t.Id="id",t.Quantity="quantity",t.UpdatedAt="updatedAt";})(C.SubscriptionAddonSortFields||(C.SubscriptionAddonSortFields={}));(function(t){t.AutoCancellationRule="AutoCancellationRule",t.CancelledByBilling="CancelledByBilling",t.CustomerArchived="CustomerArchived",t.DetachBilling="DetachBilling",t.Expired="Expired",t.Immediate="Immediate",t.PendingPaymentExpired="PendingPaymentExpired",t.ScheduledCancellation="ScheduledCancellation",t.TrialConverted="TrialConverted",t.TrialEnded="TrialEnded",t.UpgradeOrDowngrade="UpgradeOrDowngrade";})(C.SubscriptionCancelReason||(C.SubscriptionCancelReason={}));(function(t){t.Default="DEFAULT",t.RevokeEntitlements="REVOKE_ENTITLEMENTS";})(C.SubscriptionCancellationAction||(C.SubscriptionCancellationAction={}));(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE",t.SpecificDate="SPECIFIC_DATE";})(C.SubscriptionCancellationTime||(C.SubscriptionCancellationTime={}));(function(t){t.Active="ACTIVE",t.Expired="EXPIRED",t.Removed="REMOVED";})(C.SubscriptionCouponStatus||(C.SubscriptionCouponStatus={}));(function(t){t.PredefinedFreePlan="PREDEFINED_FREE_PLAN",t.PredefinedTrialPlan="PREDEFINED_TRIAL_PLAN",t.RequestedPlan="REQUESTED_PLAN",t.SkippedSubscriptionCreation="SKIPPED_SUBSCRIPTION_CREATION";})(C.SubscriptionDecisionStrategy||(C.SubscriptionDecisionStrategy={}));(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.DowngradeToFree="DOWNGRADE_TO_FREE";})(C.SubscriptionEndSetup||(C.SubscriptionEndSetup={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.SubscriptionId="subscriptionId",t.UpdatedAt="updatedAt";})(C.SubscriptionEntitlementSortFields||(C.SubscriptionEntitlementSortFields={}));(function(t){t.BillingCycle="BILLING_CYCLE",t.Manual="MANUAL",t.MinimumInvoiceAmountExceeded="MINIMUM_INVOICE_AMOUNT_EXCEEDED",t.Other="OTHER",t.SubscriptionCreation="SUBSCRIPTION_CREATION",t.SubscriptionUpdate="SUBSCRIPTION_UPDATE";})(C.SubscriptionInvoiceBillingReason||(C.SubscriptionInvoiceBillingReason={}));(function(t){t.Canceled="CANCELED",t.Open="OPEN",t.Paid="PAID";})(C.SubscriptionInvoiceStatus||(C.SubscriptionInvoiceStatus={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType";})(C.SubscriptionMigrationTaskSortFields||(C.SubscriptionMigrationTaskSortFields={}));(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE";})(C.SubscriptionMigrationTime||(C.SubscriptionMigrationTime={}));(function(t){t.BillingModel="billingModel",t.CreatedAt="createdAt",t.FeatureId="featureId",t.HasSoftLimit="hasSoftLimit",t.Id="id",t.UpdatedAt="updatedAt",t.UsageLimit="usageLimit";})(C.SubscriptionPriceSortFields||(C.SubscriptionPriceSortFields={}));(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY",t.None="NONE";})(C.SubscriptionProrationBehavior||(C.SubscriptionProrationBehavior={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.CustomerId="customerId",t.EnvironmentId="environmentId",t.ProductId="productId",t.ResourceId="resourceId",t.SalesforceId="salesforceId",t.StartDate="startDate",t.Status="status",t.SubscriptionId="subscriptionId";})(C.SubscriptionQuerySortFields||(C.SubscriptionQuerySortFields={}));(function(t){t.Canceled="Canceled",t.Done="Done",t.Failed="Failed",t.PendingPayment="PendingPayment",t.Scheduled="Scheduled";})(C.SubscriptionScheduleStatus||(C.SubscriptionScheduleStatus={}));(function(t){t.AdditionalMetaData="AdditionalMetaData",t.Addon="Addon",t.BillingInfoMetadata="BillingInfoMetadata",t.BillingPeriod="BillingPeriod",t.Coupon="Coupon",t.Downgrade="Downgrade",t.MigrateToLatest="MigrateToLatest",t.Plan="Plan",t.PriceOverride="PriceOverride",t.UnitAmount="UnitAmount";})(C.SubscriptionScheduleType||(C.SubscriptionScheduleType={}));(function(t){t.FreePlan="FREE_PLAN",t.PlanSelection="PLAN_SELECTION",t.TrialPeriod="TRIAL_PERIOD";})(C.SubscriptionStartSetup||(C.SubscriptionStartSetup={}));(function(t){t.Active="ACTIVE",t.Canceled="CANCELED",t.Expired="EXPIRED",t.InTrial="IN_TRIAL",t.NotStarted="NOT_STARTED",t.PaymentPending="PAYMENT_PENDING";})(C.SubscriptionStatus||(C.SubscriptionStatus={}));(function(t){t.AlwaysReset="ALWAYS_RESET",t.BillingPeriodChange="BILLING_PERIOD_CHANGE",t.NeverReset="NEVER_RESET";})(C.SubscriptionUpdateUsageCutoffBehavior||(C.SubscriptionUpdateUsageCutoffBehavior={}));(function(t){t.Error="ERROR",t.NoSyncRequired="NO_SYNC_REQUIRED",t.Pending="PENDING",t.Success="SUCCESS";})(C.SyncStatus||(C.SyncStatus={}));(function(t){t.Canceled="CANCELED",t.Completed="COMPLETED",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.PartiallyFailed="PARTIALLY_FAILED",t.Pending="PENDING";})(C.TaskStatus||(C.TaskStatus={}));(function(t){t.ImportIntegrationCatalog="IMPORT_INTEGRATION_CATALOG",t.ImportIntegrationCustomers="IMPORT_INTEGRATION_CUSTOMERS",t.ImportSubscriptionsBulk="IMPORT_SUBSCRIPTIONS_BULK",t.RecalculateBatchEntitlements="RECALCULATE_BATCH_ENTITLEMENTS",t.RecalculateEntitlements="RECALCULATE_ENTITLEMENTS",t.ResyncIntegration="RESYNC_INTEGRATION",t.SubscriptionMigration="SUBSCRIPTION_MIGRATION",t.SubscriptionMigrationV2="SUBSCRIPTION_MIGRATION_V2";})(C.TaskType||(C.TaskType={}));(function(t){t.Graduated="GRADUATED",t.Volume="VOLUME";})(C.TiersMode||(C.TiersMode={}));(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.ConvertToPaid="CONVERT_TO_PAID";})(C.TrialEndBehavior||(C.TrialEndBehavior={}));(function(t){t.Day="DAY",t.Month="MONTH";})(C.TrialPeriodUnits||(C.TrialPeriodUnits={}));(function(t){t.Down="DOWN",t.Up="UP";})(C.UnitTransformationRound||(C.UnitTransformationRound={}));(function(t){t.PeriodicReset="PERIODIC_RESET",t.SubscriptionChangeReset="SUBSCRIPTION_CHANGE_RESET";})(C.UsageMarkerType||(C.UsageMarkerType={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id";})(C.UsageMeasurementSortFields||(C.UsageMeasurementSortFields={}));(function(t){t.Delta="DELTA",t.Set="SET";})(C.UsageUpdateBehavior||(C.UsageUpdateBehavior={}));(function(t){t.Auth0="AUTH0",t.AwsMarketplace="AWS_MARKETPLACE",t.BigQuery="BIG_QUERY",t.Hubspot="HUBSPOT",t.OpenFga="OPEN_FGA",t.Salesforce="SALESFORCE",t.Snowflake="SNOWFLAKE",t.Stripe="STRIPE",t.Zuora="ZUORA";})(C.VendorIdentifier||(C.VendorIdentifier={}));(function(t){t.Auth="AUTH",t.Billing="BILLING",t.Crm="CRM",t.DataExport="DATA_EXPORT",t.Marketplace="MARKETPLACE";})(C.VendorType||(C.VendorType={}));(function(t){t.EveryFriday="EveryFriday",t.EveryMonday="EveryMonday",t.EverySaturday="EverySaturday",t.EverySunday="EverySunday",t.EveryThursday="EveryThursday",t.EveryTuesday="EveryTuesday",t.EveryWednesday="EveryWednesday",t.SubscriptionStart="SubscriptionStart";})(C.WeeklyAccordingTo||(C.WeeklyAccordingTo={}));(function(t){t.Checkout="CHECKOUT",t.CustomerPortal="CUSTOMER_PORTAL",t.Paywall="PAYWALL";})(C.WidgetType||(C.WidgetType={}));(function(t){t.SubscriptionStart="SubscriptionStart";})(C.YearlyAccordingTo||(C.YearlyAccordingTo={}));(function(t){t.Control="CONTROL",t.Variant="VARIANT";})(C.ExperimentGroupType||(C.ExperimentGroupType={}));C.PageInfoFragmentDoc=(0, Pt.default)`
|
|
11
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Iv.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r));}else n.push(r);}),Wp(Wp({},t),{definitions:n})}function cF(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o);});});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function uF(t){var e=tE(t);if(!Zm.has(e)){var n=Xm(t,{experimentalFragmentVariables:Jm,allowLegacyFragmentVariables:Jm});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Zm.set(e,cF(lF(n)));}return Zm.get(e)}function mc(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1];}),uF(r)}function eE(){Zm.clear(),Iv.clear();}function nE(){Jx=false;}function rE(){Jm=true;}function iE(){Jm=false;}var Zm,Iv,Jx,Jm,Zp,dF,aE=Wn(()=>{Sx();Zx();Zm=new Map,Iv=new Map,Jx=true,Jm=false;Zp={gql:mc,resetCaches:eE,disableFragmentWarnings:nE,enableExperimentalFragmentVariables:rE,disableExperimentalFragmentVariables:iE};(function(t){t.gql=Zp.gql,t.resetCaches=Zp.resetCaches,t.disableFragmentWarnings=Zp.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Zp.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Zp.disableExperimentalFragmentVariables;})(mc||(mc={}));mc.default=mc;dF=mc;});var kv=Yk(C=>{Object.defineProperty(C,"__esModule",{value:true});C.FeatureStatus=C.FeatureSortFields=C.FeatureGroupStatus=C.FeatureGroupSortFields=C.ExperimentStatus=C.ExperimentSortFields=C.EventLogType=C.EventLogSortFields=C.EventEntityType=C.EventActor=C.ErrorCode=C.EnvironmentType=C.EnvironmentSortFields=C.EnvironmentProvisionStatus=C.EnvironmentAccessRole=C.EntitySelectionMode=C.EntitlementsStateAccessDeniedReason=C.EntitlementResetPeriod=C.EntitlementBehavior=C.DiscountType=C.DiscountDurationType=C.Department=C.CustomerSubscriptionSortFields=C.CustomerSortFields=C.CustomerResourceSortFields=C.Currency=C.CreditUsageTimeRange=C.CreditLedgerEventType=C.CreditGrantType=C.CouponType=C.CouponStatus=C.CouponSource=C.CouponSortFields=C.ConditionOperation=C.ChangeType=C.BillingVendorIdentifier=C.BillingPeriod=C.BillingModel=C.BillingCadence=C.BillingAnchor=C.Auth0ApplicationType=C.ApiKeyType=C.ApiKeySortFields=C.Alignment=C.AggregationFunction=C.AddonSortFields=C.AccountStatus=C.AccountAccessRole=C.AccountAccessMethod=C.AccessDeniedReason=void 0;C.SubscriptionPriceSortFields=C.SubscriptionMigrationTime=C.SubscriptionMigrationTaskSortFields=C.SubscriptionInvoiceStatus=C.SubscriptionInvoiceBillingReason=C.SubscriptionEntitlementSortFields=C.SubscriptionEndSetup=C.SubscriptionDecisionStrategy=C.SubscriptionCouponStatus=C.SubscriptionCancellationTime=C.SubscriptionCancellationAction=C.SubscriptionCancelReason=C.SubscriptionAddonSortFields=C.SourceType=C.SortNulls=C.SortDirection=C.ScheduleStrategy=C.PublishMigrationType=C.ProvisionSubscriptionStatus=C.ProrationBehavior=C.PromotionalEntitlementStatus=C.PromotionalEntitlementSortFields=C.PromotionalEntitlementPeriod=C.ProductSortFields=C.PricingType=C.PriceSortFields=C.PlanSortFields=C.PlanChangeType=C.PaymentMethodType=C.PaymentCollectionMethod=C.PaymentCollection=C.PackageStatus=C.PackageGroupStatus=C.PackageGroupSortFields=C.PackageEntitlementSortFields=C.PackageDtoSortFields=C.OverageBillingPeriod=C.OfferStatus=C.OfferSortFields=C.MonthlyAccordingTo=C.MeterType=C.MemberStatus=C.MemberSortFields=C.InvoiceLineItemType=C.IntegrationSortFields=C.ImportIntegrationTaskSortFields=C.HookStatus=C.HookSortFields=C.FontWeight=C.FeatureType=void 0;C.SubscriptionPreviewFragmentDoc=C.CustomerStatisticsFragmentDoc=C.CustomerWithSubscriptionsFragmentDoc=C.SubscriptionFragmentDoc=C.SubscriptionTrialConfigurationFragmentDoc=C.SubscriptionFutureUpdateDataFragmentDoc=C.SubscriptionScheduledUpdateDataFragmentDoc=C.ScheduleVariablesFragmentDoc=C.PlanFragmentDoc=C.PlanCompatiblePackageGroupsFragmentDoc=C.AddonFragmentDoc=C.AddonDependencyFragmentDoc=C.OveragePriceFragmentDoc=C.PackageEntitlementFragmentDoc=C.ProductFragmentDoc=C.TotalPriceFragmentDoc=C.PriceFragmentDoc=C.PriceTierFragmentDoc=C.CustomerResourceFragmentDoc=C.SubscriptionInvoiceFragmentDoc=C.CustomerFragmentDoc=C.PromotionalEntitlementFragmentDoc=C.CouponFragmentDoc=C.SlimCustomerFragmentDoc=C.SlimSubscriptionFragmentV2FragmentDoc=C.SubscriptionQueryFragmentDoc=C.PageInfoFragmentDoc=C.ExperimentGroupType=C.YearlyAccordingTo=C.WidgetType=C.WeeklyAccordingTo=C.VendorType=C.VendorIdentifier=C.UsageUpdateBehavior=C.UsageMeasurementSortFields=C.UsageMarkerType=C.UnitTransformationRound=C.TrialPeriodUnits=C.TrialEndBehavior=C.TiersMode=C.TaskType=C.TaskStatus=C.SyncStatus=C.SubscriptionUpdateUsageCutoffBehavior=C.SubscriptionStatus=C.SubscriptionStartSetup=C.SubscriptionScheduleType=C.SubscriptionScheduleStatus=C.SubscriptionQuerySortFields=C.SubscriptionProrationBehavior=void 0;C.PaymentSessionFragmentDoc=C.CreditsBalanceSummaryFragmentDoc=C.CreditBalanceFragmentDoc=C.CreditLedgerFragmentDoc=C.CreditGrantFragmentDoc=C.ReportUsageFragmentDoc=C.ProvisionSubscriptionFragmentDoc=C.ApplySubscriptionFragmentDoc=C.ProvisionCustomerFragmentDoc=C.SlimSubscriptionFragmentDoc=C.UsageHistoryV2FragmentDoc=C.UsageHistoryFragmentDoc=C.PaywallFragmentDoc=C.PaywallCalculatedPricePointsFragmentDoc=C.PaywallConfigurationFragmentDoc=C.LayoutConfigurationFragmentDoc=C.PaywallCurrencyFragmentDoc=C.MockPaywallPlanFragmentDoc=C.MockPaywallPlanCompatiblePackageGroupsFragmentDoc=C.MockPaywallAddonFragmentDoc=C.MockPaywallAddonDependencyFragmentDoc=C.MockPaywallPriceFragmentDoc=C.MockPaywallPackageEntitlementFragmentDoc=C.CheckoutStateFragmentDoc=C.ZuoraCheckoutCredentialsFragmentDoc=C.StripeCheckoutCredentialsFragmentDoc=C.CheckoutConfigurationFragmentDoc=C.CustomerPortalFragmentDoc=C.CustomerPortalConfigurationFragmentDoc=C.TypographyConfigurationFragmentDoc=C.FontVariantFragmentDoc=C.CustomerPortalBillingInformationFragmentDoc=C.CustomerPortalPromotionalEntitlementFragmentDoc=C.CustomerPortalEntitlementFragmentDoc=C.CustomerPortalSubscriptionFragmentDoc=C.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc=C.CustomerPortalSubscriptionAddonFragmentDoc=C.CustomerPortalSubscriptionPriceFragmentDoc=C.CreditBalanceUpdatedPayloadFragmentDoc=C.PackagePublishedPayloadFragmentDoc=C.EntitlementUsageUpdatedFragmentDoc=C.UsageUpdatedFragmentDoc=C.EntitlementsUpdatedPayloadFragmentDoc=C.EntitlementFragmentDoc=C.FeatureFragmentDoc=C.ResetPeriodConfigurationFragmentDoc=C.SubscriptionInvoicePreviewFragmentDoc=C.SubscriptionPreviewV2FragmentDoc=C.SubscriptionPreviewInvoiceFragmentDoc=C.ImmediateSubscriptionPreviewInvoiceFragmentDoc=void 0;C.GetCustomerPortalByRefIdDocument=C.GetSdkConfigurationDocument=C.GetProductsDocument=C.GetEntitlementDocument=C.GetEntitlementsStateDocument=C.GetEntitlementsDocument=C.GetPaywallDocument=C.GetCouponsDocument=C.GetSubscriptionDocument=C.GetSubscriptionsDocument=C.GetActiveSubscriptionsListDocument=C.GetActiveSubscriptionsDocument=C.GetCustomerStatisticsDocument=C.GetCustomerByIdDocument=C.VoidCreditGrantDocument=C.CreatePaymentSessionDocument=C.UnlinkPromotionalEntitlementsGroupDocument=C.RevokePromotionalEntitlementsGroupDocument=C.GrantPromotionalEntitlementsGroupDocument=C.GrantCreditsDocument=C.TransferSubscriptionToResourceDocument=C.DelegateSubscriptionToCustomerDocument=C.TransferSubscriptionDocument=C.UnarchiveCustomerDocument=C.ArchiveCustomerDocument=C.MigrateSubscriptionToLatestDocument=C.CreateSubscriptionDocument=C.ReportEntitlementCheckRequestedDocument=C.ReportEventDocument=C.ReportUsageBulkDocument=C.ReportUsageDocument=C.CancelSubscriptionUpdatesDocument=C.PreviewNextInvoiceDocument=C.PreviewSubscriptionDocument=C.EstimateSubscriptionUpdateDocument=C.EstimateSubscriptionDocument=C.CancelSubscriptionDocument=C.UpdateSubscriptionDocument=C.ImportSubscriptionsBulkDocument=C.ApplySubscriptionDocument=C.ProvisionSubscriptionDocument=C.RevokePromotionalEntitlementDocument=C.GrantPromotionalEntitlementsDocument=C.DetachCustomerPaymentMethodDocument=C.UpdateCustomerDocument=C.ImportCustomerDocument=C.ImportCustomerBulkDocument=C.ProvisionCustomerDocument=C.CreditUsageFragmentDoc=C.SlimCustomCurrencyFragmentDoc=void 0;C.getSdk=C.OnCreditBalanceUpdatedDocument=C.OnPackagePublishedDocument=C.OnUsageUpdatedDocument=C.OnEntitlementsUpdatedDocument=C.GetCreditUsageDocument=C.GetCreditLedgerDocument=C.GetCreditGrantsDocument=C.GetCreditBalanceDocument=C.GetUsageHistoryV2Document=C.GetUsageHistoryDocument=C.GetMockPaywallDocument=C.GetCheckoutStateDocument=void 0;var Pt=(aE(),Qk(oE));(function(t){t.BudgetExceeded="BudgetExceeded",t.CustomerIsArchived="CustomerIsArchived",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.FeatureNotFound="FeatureNotFound",t.FeatureTypeMismatch="FeatureTypeMismatch",t.InsufficientCredits="InsufficientCredits",t.NoActiveSubscription="NoActiveSubscription",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",t.RequestedValuesMismatch="RequestedValuesMismatch",t.Revoked="Revoked",t.Unknown="Unknown";})(C.AccessDeniedReason||(C.AccessDeniedReason={}));(function(t){t.AuthorizedDomain="AUTHORIZED_DOMAIN",t.InviteOnly="INVITE_ONLY",t.Sso="SSO";})(C.AccountAccessMethod||(C.AccountAccessMethod={}));(function(t){t.Member="MEMBER",t.Owner="OWNER";})(C.AccountAccessRole||(C.AccountAccessRole={}));(function(t){t.Active="ACTIVE",t.Blocked="BLOCKED";})(C.AccountStatus||(C.AccountStatus={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.AddonSortFields||(C.AddonSortFields={}));(function(t){t.Avg="AVG",t.Count="COUNT",t.Max="MAX",t.Min="MIN",t.Sum="SUM",t.Unique="UNIQUE";})(C.AggregationFunction||(C.AggregationFunction={}));(function(t){t.Center="CENTER",t.Left="LEFT",t.Right="RIGHT";})(C.Alignment||(C.Alignment={}));(function(t){t.Id="id";})(C.ApiKeySortFields||(C.ApiKeySortFields={}));(function(t){t.Client="CLIENT",t.Salesforce="SALESFORCE",t.Server="SERVER",t.Workflow="WORKFLOW";})(C.ApiKeyType||(C.ApiKeyType={}));(function(t){t.Both="BOTH",t.Individual="INDIVIDUAL",t.Organization="ORGANIZATION";})(C.Auth0ApplicationType||(C.Auth0ApplicationType={}));(function(t){t.StartOfTheMonth="START_OF_THE_MONTH",t.SubscriptionsConsolidateBilling="SUBSCRIPTIONS_CONSOLIDATE_BILLING",t.SubscriptionStart="SUBSCRIPTION_START";})(C.BillingAnchor||(C.BillingAnchor={}));(function(t){t.OneOff="ONE_OFF",t.Recurring="RECURRING";})(C.BillingCadence||(C.BillingCadence={}));(function(t){t.CreditBased="CREDIT_BASED",t.FlatFee="FLAT_FEE",t.MinimumSpend="MINIMUM_SPEND",t.PerUnit="PER_UNIT",t.UsageBased="USAGE_BASED";})(C.BillingModel||(C.BillingModel={}));(function(t){t.Annually="ANNUALLY",t.Monthly="MONTHLY";})(C.BillingPeriod||(C.BillingPeriod={}));(function(t){t.Stripe="STRIPE",t.Zuora="ZUORA";})(C.BillingVendorIdentifier||(C.BillingVendorIdentifier={}));(function(t){t.Added="ADDED",t.Deleted="DELETED",t.Modified="MODIFIED",t.Reordered="REORDERED";})(C.ChangeType||(C.ChangeType={}));(function(t){t.Equals="EQUALS",t.GreaterThan="GREATER_THAN",t.GreaterThanOrEqual="GREATER_THAN_OR_EQUAL",t.IsNotNull="IS_NOT_NULL",t.IsNull="IS_NULL",t.LessThan="LESS_THAN",t.LessThanOrEqual="LESS_THAN_OR_EQUAL",t.NotEquals="NOT_EQUALS";})(C.ConditionOperation||(C.ConditionOperation={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.Source="source",t.Status="status",t.Type="type",t.UpdatedAt="updatedAt";})(C.CouponSortFields||(C.CouponSortFields={}));(function(t){t.Stigg="STIGG",t.StiggAdhoc="STIGG_ADHOC",t.Stripe="STRIPE";})(C.CouponSource||(C.CouponSource={}));(function(t){t.Active="ACTIVE",t.Archived="ARCHIVED";})(C.CouponStatus||(C.CouponStatus={}));(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE";})(C.CouponType||(C.CouponType={}));(function(t){t.Paid="PAID",t.Promotional="PROMOTIONAL";})(C.CreditGrantType||(C.CreditGrantType={}));(function(t){t.CreditsConsumed="CREDITS_CONSUMED",t.CreditsExpired="CREDITS_EXPIRED",t.CreditsGranted="CREDITS_GRANTED",t.CreditsVoided="CREDITS_VOIDED";})(C.CreditLedgerEventType||(C.CreditLedgerEventType={}));(function(t){t.LastDay="LAST_DAY",t.LastMonth="LAST_MONTH",t.LastWeek="LAST_WEEK",t.LastYear="LAST_YEAR";})(C.CreditUsageTimeRange||(C.CreditUsageTimeRange={}));(function(t){t.Aed="AED",t.All="ALL",t.Amd="AMD",t.Ang="ANG",t.Aud="AUD",t.Awg="AWG",t.Azn="AZN",t.Bam="BAM",t.Bbd="BBD",t.Bdt="BDT",t.Bgn="BGN",t.Bif="BIF",t.Bmd="BMD",t.Bnd="BND",t.Brl="BRL",t.Bsd="BSD",t.Bwp="BWP",t.Byn="BYN",t.Bzd="BZD",t.Cad="CAD",t.Cdf="CDF",t.Chf="CHF",t.Clp="CLP",t.Cny="CNY",t.Czk="CZK",t.Djf="DJF",t.Dkk="DKK",t.Dop="DOP",t.Dzd="DZD",t.Egp="EGP",t.Etb="ETB",t.Eur="EUR",t.Fjd="FJD",t.Gbp="GBP",t.Gel="GEL",t.Gip="GIP",t.Gmd="GMD",t.Gnf="GNF",t.Gyd="GYD",t.Hkd="HKD",t.Hrk="HRK",t.Htg="HTG",t.Idr="IDR",t.Ils="ILS",t.Inr="INR",t.Isk="ISK",t.Jmd="JMD",t.Jpy="JPY",t.Kes="KES",t.Kgs="KGS",t.Khr="KHR",t.Kmf="KMF",t.Krw="KRW",t.Kyd="KYD",t.Kzt="KZT",t.Lbp="LBP",t.Lkr="LKR",t.Lrd="LRD",t.Lsl="LSL",t.Mad="MAD",t.Mdl="MDL",t.Mga="MGA",t.Mkd="MKD",t.Mmk="MMK",t.Mnt="MNT",t.Mop="MOP",t.Mro="MRO",t.Mvr="MVR",t.Mwk="MWK",t.Mxn="MXN",t.Myr="MYR",t.Mzn="MZN",t.Nad="NAD",t.Ngn="NGN",t.Nok="NOK",t.Npr="NPR",t.Nzd="NZD",t.Pgk="PGK",t.Php="PHP",t.Pkr="PKR",t.Pln="PLN",t.Pyg="PYG",t.Qar="QAR",t.Ron="RON",t.Rsd="RSD",t.Rub="RUB",t.Rwf="RWF",t.Sar="SAR",t.Sbd="SBD",t.Scr="SCR",t.Sek="SEK",t.Sgd="SGD",t.Sle="SLE",t.Sll="SLL",t.Sos="SOS",t.Szl="SZL",t.Thb="THB",t.Tjs="TJS",t.Top="TOP",t.Try="TRY",t.Ttd="TTD",t.Tzs="TZS",t.Uah="UAH",t.Ugx="UGX",t.Usd="USD",t.Uzs="UZS",t.Vnd="VND",t.Vuv="VUV",t.Wst="WST",t.Xaf="XAF",t.Xcd="XCD",t.Xof="XOF",t.Xpf="XPF",t.Yer="YER",t.Zar="ZAR",t.Zmw="ZMW";})(C.Currency||(C.Currency={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.ResourceId="resourceId";})(C.CustomerResourceSortFields||(C.CustomerResourceSortFields={}));(function(t){t.AwsMarketplaceCustomerId="awsMarketplaceCustomerId",t.BillingId="billingId",t.CreatedAt="createdAt",t.CrmHubspotCompanyId="crmHubspotCompanyId",t.CrmHubspotCompanyUrl="crmHubspotCompanyUrl",t.CrmId="crmId",t.CustomerId="customerId",t.DeletedAt="deletedAt",t.Email="email",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.SalesforceId="salesforceId",t.SearchQuery="searchQuery",t.UpdatedAt="updatedAt";})(C.CustomerSortFields||(C.CustomerSortFields={}));(function(t){t.BillingCycleAnchor="billingCycleAnchor",t.BillingId="billingId",t.CancelReason="cancelReason",t.CancellationDate="cancellationDate",t.CreatedAt="createdAt",t.CrmId="crmId",t.CrmLinkUrl="crmLinkUrl",t.CurrentBillingPeriodEnd="currentBillingPeriodEnd",t.CurrentBillingPeriodStart="currentBillingPeriodStart",t.CustomerId="customerId",t.EffectiveEndDate="effectiveEndDate",t.EndDate="endDate",t.EnvironmentId="environmentId",t.Id="id",t.OldBillingId="oldBillingId",t.PayingCustomerId="payingCustomerId",t.PaymentCollection="paymentCollection",t.PricingType="pricingType",t.RefId="refId",t.ResourceId="resourceId",t.SalesforceId="salesforceId",t.StartDate="startDate",t.Status="status",t.SubscriptionId="subscriptionId",t.TrialEndDate="trialEndDate";})(C.CustomerSubscriptionSortFields||(C.CustomerSubscriptionSortFields={}));(function(t){t.CeoOrFounder="CEO_OR_FOUNDER",t.Engineering="ENGINEERING",t.Growth="GROWTH",t.Marketing="MARKETING",t.Monetization="MONETIZATION",t.Other="OTHER",t.Product="PRODUCT";})(C.Department||(C.Department={}));(function(t){t.Forever="FOREVER",t.Once="ONCE",t.Repeating="REPEATING";})(C.DiscountDurationType||(C.DiscountDurationType={}));(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE";})(C.DiscountType||(C.DiscountType={}));(function(t){t.Increment="Increment",t.Override="Override";})(C.EntitlementBehavior||(C.EntitlementBehavior={}));(function(t){t.Day="DAY",t.Hour="HOUR",t.Month="MONTH",t.Week="WEEK",t.Year="YEAR";})(C.EntitlementResetPeriod||(C.EntitlementResetPeriod={}));(function(t){t.CustomerNotFound="CustomerNotFound",t.NoActiveSubscription="NoActiveSubscription";})(C.EntitlementsStateAccessDeniedReason||(C.EntitlementsStateAccessDeniedReason={}));(function(t){t.BlackList="BLACK_LIST",t.WhiteList="WHITE_LIST";})(C.EntitySelectionMode||(C.EntitySelectionMode={}));(function(t){t.Admin="ADMIN",t.None="NONE",t.Support="SUPPORT",t.Viewer="VIEWER";})(C.EnvironmentAccessRole||(C.EnvironmentAccessRole={}));(function(t){t.Done="DONE",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.NotProvisioned="NOT_PROVISIONED";})(C.EnvironmentProvisionStatus||(C.EnvironmentProvisionStatus={}));(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.Id="id",t.PermanentDeletionDate="permanentDeletionDate",t.Slug="slug";})(C.EnvironmentSortFields||(C.EnvironmentSortFields={}));(function(t){t.Development="DEVELOPMENT",t.Production="PRODUCTION",t.Sandbox="SANDBOX";})(C.EnvironmentType||(C.EnvironmentType={}));(function(t){t.AccessDeniedError="AccessDeniedError",t.AccountNotFoundError="AccountNotFoundError",t.AddonDependencyMissingError="AddonDependencyMissingError",t.AddonHasToHavePriceError="AddonHasToHavePriceError",t.AddonIsCompatibleWithGroup="AddonIsCompatibleWithGroup",t.AddonIsCompatibleWithPlan="AddonIsCompatibleWithPlan",t.AddonNotFound="AddonNotFound",t.AddonQuantityExceedsLimitError="AddonQuantityExceedsLimitError",t.AddonWithDraftCannotBeDeletedError="AddonWithDraftCannotBeDeletedError",t.AddonsNotFound="AddonsNotFound",t.AmountTooLarge="AmountTooLarge",t.ArchivedCouponCantBeApplied="ArchivedCouponCantBeApplied",t.AuthCustomerMismatch="AuthCustomerMismatch",t.AuthCustomerReadonly="AuthCustomerReadonly",t.AwsMarketplaceIntegrationError="AwsMarketplaceIntegrationError",t.AwsMarketplaceIntegrationValidationError="AwsMarketplaceIntegrationValidationError",t.BadUserInput="BadUserInput",t.BillingIntegrationAlreadyExistsError="BillingIntegrationAlreadyExistsError",t.BillingIntegrationMissing="BillingIntegrationMissing",t.BillingPeriodMissingError="BillingPeriodMissingError",t.CanNotUpdateEntitlementsFeatureGroup="CanNotUpdateEntitlementsFeatureGroup",t.CannotAddOverrideEntitlementToPlan="CannotAddOverrideEntitlementToPlan",t.CannotArchiveFeatureError="CannotArchiveFeatureError",t.CannotArchiveFeatureGroupError="CannotArchiveFeatureGroupError",t.CannotChangeBillingIntegration="CannotChangeBillingIntegration",t.CannotDeleteCustomerError="CannotDeleteCustomerError",t.CannotDeleteDefaultIntegration="CannotDeleteDefaultIntegration",t.CannotDeleteFeatureError="CannotDeleteFeatureError",t.CannotDeleteProductError="CannotDeleteProductError",t.CannotEditPackageInNonDraftMode="CannotEditPackageInNonDraftMode",t.CannotRemovePaymentMethodFromCustomerError="CannotRemovePaymentMethodFromCustomerError",t.CannotReportUsageForEntitlementWithMeterError="CannotReportUsageForEntitlementWithMeterError",t.CannotUpdateExpireAtForExpiredCreditGrantError="CannotUpdateExpireAtForExpiredCreditGrantError",t.CannotUpdateUnitTransformationError="CannotUpdateUnitTransformationError",t.CannotUpsertToPackageThatHasDraft="CannotUpsertToPackageThatHasDraft",t.ChangingPayingCustomerIsNotSupportedError="ChangingPayingCustomerIsNotSupportedError",t.CheckoutIsNotSupported="CheckoutIsNotSupported",t.CouponNotFound="CouponNotFound",t.CreditGrantAlreadyVoided="CreditGrantAlreadyVoided",t.CreditGrantNotFound="CreditGrantNotFound",t.CustomCurrencyNotFound="CustomCurrencyNotFound",t.CustomerAlreadyHaveCustomerCoupon="CustomerAlreadyHaveCustomerCoupon",t.CustomerAlreadyUsesCoupon="CustomerAlreadyUsesCoupon",t.CustomerHasNoEmailAddress="CustomerHasNoEmailAddress",t.CustomerNoBillingId="CustomerNoBillingId",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.DeprecatedEstimateSubscriptionError="DeprecatedEstimateSubscriptionError",t.DowngradeBillingPeriodNotSupportedError="DowngradeBillingPeriodNotSupportedError",t.DraftAddonCantBeArchived="DraftAddonCantBeArchived",t.DraftAlreadyExists="DraftAlreadyExists",t.DraftPlanCantBeArchived="DraftPlanCantBeArchived",t.DuplicateAddonProvisionedError="DuplicateAddonProvisionedError",t.DuplicateIntegrationNotAllowed="DuplicateIntegrationNotAllowed",t.DuplicateProductValidationError="DuplicateProductValidationError",t.DuplicatedEntityNotAllowed="DuplicatedEntityNotAllowed",t.EditAllowedOnDraftPackageOnlyError="EditAllowedOnDraftPackageOnlyError",t.EntitlementBelongsToFeatureGroupError="EntitlementBelongsToFeatureGroupError",t.EntitlementLimitExceededError="EntitlementLimitExceededError",t.EntitlementUsageOutOfRangeError="EntitlementUsageOutOfRangeError",t.EntitlementsMustBelongToSamePackage="EntitlementsMustBelongToSamePackage",t.EntityIdDifferentFromRefIdError="EntityIdDifferentFromRefIdError",t.EntityIsArchivedError="EntityIsArchivedError",t.EnvironmentMissing="EnvironmentMissing",t.ExperimentAlreadyRunning="ExperimentAlreadyRunning",t.ExperimentNotFoundError="ExperimentNotFoundError",t.ExperimentStatusError="ExperimentStatusError",t.ExpireAtMustBeLaterThanEffectiveAtError="ExpireAtMustBeLaterThanEffectiveAtError",t.FailedToCreateCheckoutSessionError="FailedToCreateCheckoutSessionError",t.FailedToImportCustomer="FailedToImportCustomer",t.FailedToImportSubscriptions="FailedToImportSubscriptions",t.FailedToResolveBillingIntegration="FailedToResolveBillingIntegration",t.FeatureConfigurationExceededLimitError="FeatureConfigurationExceededLimitError",t.FeatureGroupMissingFeaturesError="FeatureGroupMissingFeaturesError",t.FeatureGroupNotFoundError="FeatureGroupNotFoundError",t.FeatureNotBelongToFeatureGroupError="FeatureNotBelongToFeatureGroupError",t.FeatureNotFound="FeatureNotFound",t.FetchAllCountriesPricesNotAllowed="FetchAllCountriesPricesNotAllowed",t.FreePlanCantHaveCompatiblePackageGroupError="FreePlanCantHaveCompatiblePackageGroupError",t.GraphQlAliasesLimitExceeded="GraphQLAliasesLimitExceeded",t.GraphQlBatchedOperationsLimitExceeded="GraphQLBatchedOperationsLimitExceeded",t.GraphQlUnsupportedDirective="GraphQLUnsupportedDirective",t.HubspotIntegrationError="HubspotIntegrationError",t.IdentityForbidden="IdentityForbidden",t.ImportAlreadyInProgress="ImportAlreadyInProgress",t.ImportSubscriptionsBulkError="ImportSubscriptionsBulkError",t.IncompatibleSubscriptionAddon="IncompatibleSubscriptionAddon",t.InitStripePaymentMethodError="InitStripePaymentMethodError",t.IntegrationNotFound="IntegrationNotFound",t.IntegrationValidationError="IntegrationValidationError",t.IntegrityViolation="IntegrityViolation",t.InvalidAddressError="InvalidAddressError",t.InvalidArgumentError="InvalidArgumentError",t.InvalidCancellationDate="InvalidCancellationDate",t.InvalidDoggoSignatureError="InvalidDoggoSignatureError",t.InvalidEntitlementResetPeriod="InvalidEntitlementResetPeriod",t.InvalidMemberDelete="InvalidMemberDelete",t.InvalidMetadataError="InvalidMetadataError",t.InvalidQuantity="InvalidQuantity",t.InvalidSubscriptionStatus="InvalidSubscriptionStatus",t.InvalidUpdatePriceUnitAmountError="InvalidUpdatePriceUnitAmountError",t.MemberInvitationError="MemberInvitationError",t.MemberNotFound="MemberNotFound",t.MergeEnvironmentValidationError="MergeEnvironmentValidationError",t.MeterMustBeAssociatedToMeteredFeature="MeterMustBeAssociatedToMeteredFeature",t.MeteringNotAvailableForFeatureType="MeteringNotAvailableForFeatureType",t.MissingEntityIdError="MissingEntityIdError",t.MissingSubscriptionInvoiceError="MissingSubscriptionInvoiceError",t.MultiSubscriptionCantBeAutoCancellationSourceError="MultiSubscriptionCantBeAutoCancellationSourceError",t.NoActiveSubscriptionForCustomer="NoActiveSubscriptionForCustomer",t.NoDraftOfferFound="NoDraftOfferFound",t.NoFeatureEntitlementError="NoFeatureEntitlementError",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.NoProductsAvailable="NoProductsAvailable",t.OfferAlreadyExists="OfferAlreadyExists",t.OfferNotFound="OfferNotFound",t.OperationNotAllowedDuringInProgressExperiment="OperationNotAllowedDuringInProgressExperiment",t.PackageAlreadyPublished="PackageAlreadyPublished",t.PackageGroupMinItemsError="PackageGroupMinItemsError",t.PackageGroupNotFound="PackageGroupNotFound",t.PackagePricingTypeNotSet="PackagePricingTypeNotSet",t.PaymentMethodNotFoundError="PaymentMethodNotFoundError",t.PlanCannotBePublishWhenBasePlanIsDraft="PlanCannotBePublishWhenBasePlanIsDraft",t.PlanCannotBePublishWhenCompatibleAddonIsDraft="PlanCannotBePublishWhenCompatibleAddonIsDraft",t.PlanIsUsedAsDefaultStartPlan="PlanIsUsedAsDefaultStartPlan",t.PlanIsUsedAsDowngradePlan="PlanIsUsedAsDowngradePlan",t.PlanNotFound="PlanNotFound",t.PlanWithChildCantBeDeleted="PlanWithChildCantBeDeleted",t.PlansCircularDependencyError="PlansCircularDependencyError",t.PreparePaymentMethodFormError="PreparePaymentMethodFormError",t.PriceNotFound="PriceNotFound",t.ProductNotFoundError="ProductNotFoundError",t.PromotionCodeCustomerNotFirstPurchase="PromotionCodeCustomerNotFirstPurchase",t.PromotionCodeMaxRedemptionsReached="PromotionCodeMaxRedemptionsReached",t.PromotionCodeMinimumAmountNotReached="PromotionCodeMinimumAmountNotReached",t.PromotionCodeNotActive="PromotionCodeNotActive",t.PromotionCodeNotForCustomer="PromotionCodeNotForCustomer",t.PromotionCodeNotFound="PromotionCodeNotFound",t.PromotionalEntitlementNotFoundError="PromotionalEntitlementNotFoundError",t.RateLimitExceeded="RateLimitExceeded",t.RecalculateEntitlementsError="RecalculateEntitlementsError",t.RequiredSsoAuthenticationError="RequiredSsoAuthenticationError",t.ResyncAlreadyInProgress="ResyncAlreadyInProgress",t.ScheduledMigrationAlreadyExistsError="ScheduledMigrationAlreadyExistsError",t.SelectedBillingModelDoesntMatchImportedItemError="SelectedBillingModelDoesntMatchImportedItemError",t.SingleSubscriptionCantBeAutoCancellationTargetError="SingleSubscriptionCantBeAutoCancellationTargetError",t.StripeCustomerIsDeleted="StripeCustomerIsDeleted",t.StripeError="StripeError",t.SubscriptionAlreadyCanceledOrExpired="SubscriptionAlreadyCanceledOrExpired",t.SubscriptionAlreadyOnLatestPlanError="SubscriptionAlreadyOnLatestPlanError",t.SubscriptionDoesNotHaveBillingPeriod="SubscriptionDoesNotHaveBillingPeriod",t.SubscriptionInvoiceStatusError="SubscriptionInvoiceStatusError",t.SubscriptionMustHaveSinglePlanError="SubscriptionMustHaveSinglePlanError",t.SubscriptionNoBillingId="SubscriptionNoBillingId",t.SubscriptionNotFound="SubscriptionNotFound",t.TooManyCustomCurrencies="TooManyCustomCurrencies",t.TooManySubscriptionsPerCustomer="TooManySubscriptionsPerCustomer",t.TrialMustBeCancelledImmediately="TrialMustBeCancelledImmediately",t.UnPublishedPackage="UnPublishedPackage",t.Unauthenticated="Unauthenticated",t.UnexpectedError="UnexpectedError",t.UnsupportedFeatureType="UnsupportedFeatureType",t.UnsupportedParameter="UnsupportedParameter",t.UnsupportedSubscriptionScheduleType="UnsupportedSubscriptionScheduleType",t.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier",t.UsageMeasurementDiffOutOfRangeError="UsageMeasurementDiffOutOfRangeError",t.VersionExceedsMaxValueError="VersionExceedsMaxValueError",t.WorkflowTriggerNotFound="WorkflowTriggerNotFound";})(C.ErrorCode||(C.ErrorCode={}));(function(t){t.AppCustomer="APP_CUSTOMER",t.AppPublic="APP_PUBLIC",t.AppServer="APP_SERVER",t.Aws="AWS",t.Import="IMPORT",t.Migration="MIGRATION",t.Salesforce="SALESFORCE",t.Scheduler="SCHEDULER",t.Service="SERVICE",t.Stripe="STRIPE",t.Support="SUPPORT",t.System="SYSTEM",t.User="USER",t.Workflow="WORKFLOW";})(C.EventActor||(C.EventActor={}));(function(t){t.Addon="ADDON",t.Coupon="COUPON",t.Credit="CREDIT",t.Customer="CUSTOMER",t.Entitlement="ENTITLEMENT",t.Feature="FEATURE",t.FeatureGroup="FEATURE_GROUP",t.Import="IMPORT",t.Measurement="MEASUREMENT",t.Package="PACKAGE",t.PackageGroup="PACKAGE_GROUP",t.Plan="PLAN",t.Product="PRODUCT",t.PromotionalEntitlement="PROMOTIONAL_ENTITLEMENT",t.Subscription="SUBSCRIPTION";})(C.EventEntityType||(C.EventEntityType={}));(function(t){t.CreatedAt="createdAt",t.EntityId="entityId",t.EnvironmentId="environmentId",t.EventLogType="eventLogType",t.Id="id",t.ParentEntityId="parentEntityId";})(C.EventLogSortFields||(C.EventLogSortFields={}));(function(t){t.AddonCreated="ADDON_CREATED",t.AddonDeleted="ADDON_DELETED",t.AddonUpdated="ADDON_UPDATED",t.CouponArchived="COUPON_ARCHIVED",t.CouponCreated="COUPON_CREATED",t.CouponUpdated="COUPON_UPDATED",t.CreateSubscriptionFailed="CREATE_SUBSCRIPTION_FAILED",t.CreditsBalanceDepletedOld="CREDITS_BALANCE_DEPLETED_OLD",t.CreditsBalanceLowOld="CREDITS_BALANCE_LOW_OLD",t.CreditsGrantBalanceLowOld="CREDITS_GRANT_BALANCE_LOW_OLD",t.CreditsGrantDepletedOld="CREDITS_GRANT_DEPLETED_OLD",t.CreditsGrantExpiredOld="CREDITS_GRANT_EXPIRED_OLD",t.CreditsGrantGrantedOld="CREDITS_GRANT_GRANTED_OLD",t.CreditsGrantUpdatedOld="CREDITS_GRANT_UPDATED_OLD",t.CreditBalanceDepleted="CREDIT_BALANCE_DEPLETED",t.CreditBalanceLow="CREDIT_BALANCE_LOW",t.CreditGrantBalanceLow="CREDIT_GRANT_BALANCE_LOW",t.CreditGrantCreated="CREDIT_GRANT_CREATED",t.CreditGrantDepleted="CREDIT_GRANT_DEPLETED",t.CreditGrantExpired="CREDIT_GRANT_EXPIRED",t.CreditGrantUpdated="CREDIT_GRANT_UPDATED",t.CreditGrantVoided="CREDIT_GRANT_VOIDED",t.CustomerCreated="CUSTOMER_CREATED",t.CustomerDeleted="CUSTOMER_DELETED",t.CustomerEntitlementCalculationTriggered="CUSTOMER_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerPaymentFailed="CUSTOMER_PAYMENT_FAILED",t.CustomerResourceEntitlementCalculationTriggered="CUSTOMER_RESOURCE_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerUpdated="CUSTOMER_UPDATED",t.EdgeApiClientConfigurationDataResync="EDGE_API_CLIENT_CONFIGURATION_DATA_RESYNC",t.EdgeApiCustomerDataResync="EDGE_API_CUSTOMER_DATA_RESYNC",t.EdgeApiDataResync="EDGE_API_DATA_RESYNC",t.EdgeApiDoggoResync="EDGE_API_DOGGO_RESYNC",t.EdgeApiPackageEntitlementsDataResync="EDGE_API_PACKAGE_ENTITLEMENTS_DATA_RESYNC",t.EdgeApiSubscriptionsDataResync="EDGE_API_SUBSCRIPTIONS_DATA_RESYNC",t.EntitlementsUpdated="ENTITLEMENTS_UPDATED",t.EntitlementDenied="ENTITLEMENT_DENIED",t.EntitlementGranted="ENTITLEMENT_GRANTED",t.EntitlementRequested="ENTITLEMENT_REQUESTED",t.EntitlementUsageExceeded="ENTITLEMENT_USAGE_EXCEEDED",t.EnvironmentDeleted="ENVIRONMENT_DELETED",t.FeatureArchived="FEATURE_ARCHIVED",t.FeatureCreated="FEATURE_CREATED",t.FeatureDeleted="FEATURE_DELETED",t.FeatureGroupArchived="FEATURE_GROUP_ARCHIVED",t.FeatureGroupCreated="FEATURE_GROUP_CREATED",t.FeatureGroupUnArchived="FEATURE_GROUP_UN_ARCHIVED",t.FeatureGroupUpdated="FEATURE_GROUP_UPDATED",t.FeatureUpdated="FEATURE_UPDATED",t.ImportIntegrationCatalogTriggered="IMPORT_INTEGRATION_CATALOG_TRIGGERED",t.ImportIntegrationCustomersTriggered="IMPORT_INTEGRATION_CUSTOMERS_TRIGGERED",t.ImportSubscriptionsBulkTriggered="IMPORT_SUBSCRIPTIONS_BULK_TRIGGERED",t.MeasurementReported="MEASUREMENT_REPORTED",t.PackageGroupCreated="PACKAGE_GROUP_CREATED",t.PackageGroupUpdated="PACKAGE_GROUP_UPDATED",t.PackagePublished="PACKAGE_PUBLISHED",t.PlanCreated="PLAN_CREATED",t.PlanDeleted="PLAN_DELETED",t.PlanUpdated="PLAN_UPDATED",t.ProductCreated="PRODUCT_CREATED",t.ProductDeleted="PRODUCT_DELETED",t.ProductUpdated="PRODUCT_UPDATED",t.PromotionalEntitlementEndsSoon="PROMOTIONAL_ENTITLEMENT_ENDS_SOON",t.PromotionalEntitlementExpired="PROMOTIONAL_ENTITLEMENT_EXPIRED",t.PromotionalEntitlementGranted="PROMOTIONAL_ENTITLEMENT_GRANTED",t.PromotionalEntitlementRevoked="PROMOTIONAL_ENTITLEMENT_REVOKED",t.PromotionalEntitlementUpdated="PROMOTIONAL_ENTITLEMENT_UPDATED",t.RecalculateEntitlementsTriggered="RECALCULATE_ENTITLEMENTS_TRIGGERED",t.ResyncIntegrationTriggered="RESYNC_INTEGRATION_TRIGGERED",t.SubscriptionsMigrated="SUBSCRIPTIONS_MIGRATED",t.SubscriptionsMigrationTriggered="SUBSCRIPTIONS_MIGRATION_TRIGGERED",t.SubscriptionBillingMonthEndsSoon="SUBSCRIPTION_BILLING_MONTH_ENDS_SOON",t.SubscriptionCanceled="SUBSCRIPTION_CANCELED",t.SubscriptionCreated="SUBSCRIPTION_CREATED",t.SubscriptionExpired="SUBSCRIPTION_EXPIRED",t.SubscriptionSpentLimitExceeded="SUBSCRIPTION_SPENT_LIMIT_EXCEEDED",t.SubscriptionTrialConverted="SUBSCRIPTION_TRIAL_CONVERTED",t.SubscriptionTrialEndsSoon="SUBSCRIPTION_TRIAL_ENDS_SOON",t.SubscriptionTrialExpired="SUBSCRIPTION_TRIAL_EXPIRED",t.SubscriptionTrialStarted="SUBSCRIPTION_TRIAL_STARTED",t.SubscriptionUpdated="SUBSCRIPTION_UPDATED",t.SubscriptionUsageChargeTriggered="SUBSCRIPTION_USAGE_CHARGE_TRIGGERED",t.SubscriptionUsageUpdated="SUBSCRIPTION_USAGE_UPDATED",t.SyncFailed="SYNC_FAILED",t.WidgetConfigurationUpdated="WIDGET_CONFIGURATION_UPDATED";})(C.EventLogType||(C.EventLogType={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.ProductId="productId",t.RefId="refId",t.Status="status";})(C.ExperimentSortFields||(C.ExperimentSortFields={}));(function(t){t.Completed="COMPLETED",t.Draft="DRAFT",t.InProgress="IN_PROGRESS";})(C.ExperimentStatus||(C.ExperimentStatus={}));(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureGroupId="featureGroupId",t.Id="id",t.IsLatest="isLatest",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.FeatureGroupSortFields||(C.FeatureGroupSortFields={}));(function(t){t.Archived="ARCHIVED",t.Published="PUBLISHED";})(C.FeatureGroupStatus||(C.FeatureGroupStatus={}));(function(t){t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureStatus="featureStatus",t.FeatureType="featureType",t.Id="id",t.MeterType="meterType",t.RefId="refId",t.UpdatedAt="updatedAt";})(C.FeatureSortFields||(C.FeatureSortFields={}));(function(t){t.Active="ACTIVE",t.New="NEW",t.Suspended="SUSPENDED";})(C.FeatureStatus||(C.FeatureStatus={}));(function(t){t.Boolean="BOOLEAN",t.Enum="ENUM",t.Number="NUMBER";})(C.FeatureType||(C.FeatureType={}));(function(t){t.Bold="BOLD",t.Normal="NORMAL";})(C.FontWeight||(C.FontWeight={}));(function(t){t.CreatedAt="createdAt",t.Endpoint="endpoint",t.EnvironmentId="environmentId",t.Id="id",t.Status="status";})(C.HookSortFields||(C.HookSortFields={}));(function(t){t.Active="ACTIVE",t.Inactive="INACTIVE";})(C.HookStatus||(C.HookStatus={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType";})(C.ImportIntegrationTaskSortFields||(C.ImportIntegrationTaskSortFields={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.VendorIdentifier="vendorIdentifier",t.VendorType="vendorType";})(C.IntegrationSortFields||(C.IntegrationSortFields={}));(function(t){t.AddonCharge="AddonCharge",t.BaseCharge="BaseCharge",t.InAdvanceCommitmentCharge="InAdvanceCommitmentCharge",t.MinimumSpendAdjustmentCharge="MinimumSpendAdjustmentCharge",t.MinimumSpendCharge="MinimumSpendCharge",t.Other="Other",t.OverageCharge="OverageCharge",t.PayAsYouGoCharge="PayAsYouGoCharge",t.TierCharge="TierCharge",t.ZeroAmountBaseCharge="ZeroAmountBaseCharge";})(C.InvoiceLineItemType||(C.InvoiceLineItemType={}));(function(t){t.CreatedAt="createdAt",t.Email="email",t.Id="id";})(C.MemberSortFields||(C.MemberSortFields={}));(function(t){t.Invited="INVITED",t.Registered="REGISTERED";})(C.MemberStatus||(C.MemberStatus={}));(function(t){t.Fluctuating="Fluctuating",t.Incremental="Incremental",t.None="None";})(C.MeterType||(C.MeterType={}));(function(t){t.StartOfTheMonth="StartOfTheMonth",t.SubscriptionStart="SubscriptionStart";})(C.MonthlyAccordingTo||(C.MonthlyAccordingTo={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.IsDefault="isDefault",t.IsLatest="isLatest",t.OfferId="offerId",t.Status="status",t.Version="version";})(C.OfferSortFields||(C.OfferSortFields={}));(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED";})(C.OfferStatus||(C.OfferStatus={}));(function(t){t.Monthly="MONTHLY",t.OnSubscriptionRenewal="ON_SUBSCRIPTION_RENEWAL";})(C.OverageBillingPeriod||(C.OverageBillingPeriod={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.PackageDtoSortFields||(C.PackageDtoSortFields={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.PackageId="packageId",t.UpdatedAt="updatedAt";})(C.PackageEntitlementSortFields||(C.PackageEntitlementSortFields={}));(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.IsLatest="isLatest",t.PackageGroupId="packageGroupId",t.ProductId="productId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.PackageGroupSortFields||(C.PackageGroupSortFields={}));(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED";})(C.PackageGroupStatus||(C.PackageGroupStatus={}));(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED";})(C.PackageStatus||(C.PackageStatus={}));(function(t){t.ActionRequired="ACTION_REQUIRED",t.Failed="FAILED",t.NotRequired="NOT_REQUIRED",t.Processing="PROCESSING";})(C.PaymentCollection||(C.PaymentCollection={}));(function(t){t.Charge="CHARGE",t.Invoice="INVOICE",t.None="NONE";})(C.PaymentCollectionMethod||(C.PaymentCollectionMethod={}));(function(t){t.Bank="BANK",t.Card="CARD",t.CashApp="CASH_APP";})(C.PaymentMethodType||(C.PaymentMethodType={}));(function(t){t.Downgrade="DOWNGRADE",t.None="NONE",t.Upgrade="UPGRADE";})(C.PlanChangeType||(C.PlanChangeType={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber";})(C.PlanSortFields||(C.PlanSortFields={}));(function(t){t.BillingCadence="billingCadence",t.BillingId="billingId",t.BillingModel="billingModel",t.BillingPeriod="billingPeriod",t.CreatedAt="createdAt",t.Id="id",t.TiersMode="tiersMode";})(C.PriceSortFields||(C.PriceSortFields={}));(function(t){t.Custom="CUSTOM",t.Free="FREE",t.Paid="PAID";})(C.PricingType||(C.PricingType={}));(function(t){t.AwsMarketplaceProductCode="awsMarketplaceProductCode",t.AwsMarketplaceProductId="awsMarketplaceProductId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsDefaultProduct="isDefaultProduct",t.MultipleSubscriptions="multipleSubscriptions",t.RefId="refId",t.UpdatedAt="updatedAt";})(C.ProductSortFields||(C.ProductSortFields={}));(function(t){t.Custom="CUSTOM",t.Lifetime="LIFETIME",t.OneMonth="ONE_MONTH",t.OneWeek="ONE_WEEK",t.OneYear="ONE_YEAR",t.SixMonth="SIX_MONTH";})(C.PromotionalEntitlementPeriod||(C.PromotionalEntitlementPeriod={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.UpdatedAt="updatedAt";})(C.PromotionalEntitlementSortFields||(C.PromotionalEntitlementSortFields={}));(function(t){t.Active="Active",t.Expired="Expired",t.Paused="Paused";})(C.PromotionalEntitlementStatus||(C.PromotionalEntitlementStatus={}));(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY";})(C.ProrationBehavior||(C.ProrationBehavior={}));(function(t){t.PaymentRequired="PAYMENT_REQUIRED",t.Success="SUCCESS";})(C.ProvisionSubscriptionStatus||(C.ProvisionSubscriptionStatus={}));(function(t){t.AllCustomers="ALL_CUSTOMERS",t.NewCustomers="NEW_CUSTOMERS";})(C.PublishMigrationType||(C.PublishMigrationType={}));(function(t){t.EndOfBillingMonth="END_OF_BILLING_MONTH",t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE";})(C.ScheduleStrategy||(C.ScheduleStrategy={}));(function(t){t.Asc="ASC",t.Desc="DESC";})(C.SortDirection||(C.SortDirection={}));(function(t){t.NullsFirst="NULLS_FIRST",t.NullsLast="NULLS_LAST";})(C.SortNulls||(C.SortNulls={}));(function(t){t.JsClientSdk="JS_CLIENT_SDK",t.NodeServerSdk="NODE_SERVER_SDK",t.PersistentCacheService="PERSISTENT_CACHE_SERVICE";})(C.SourceType||(C.SourceType={}));(function(t){t.CreatedAt="createdAt",t.Id="id",t.Quantity="quantity",t.UpdatedAt="updatedAt";})(C.SubscriptionAddonSortFields||(C.SubscriptionAddonSortFields={}));(function(t){t.AutoCancellationRule="AutoCancellationRule",t.CancelledByBilling="CancelledByBilling",t.CustomerArchived="CustomerArchived",t.DetachBilling="DetachBilling",t.Expired="Expired",t.Immediate="Immediate",t.PendingPaymentExpired="PendingPaymentExpired",t.ScheduledCancellation="ScheduledCancellation",t.TrialConverted="TrialConverted",t.TrialEnded="TrialEnded",t.UpgradeOrDowngrade="UpgradeOrDowngrade";})(C.SubscriptionCancelReason||(C.SubscriptionCancelReason={}));(function(t){t.Default="DEFAULT",t.RevokeEntitlements="REVOKE_ENTITLEMENTS";})(C.SubscriptionCancellationAction||(C.SubscriptionCancellationAction={}));(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE",t.SpecificDate="SPECIFIC_DATE";})(C.SubscriptionCancellationTime||(C.SubscriptionCancellationTime={}));(function(t){t.Active="ACTIVE",t.Expired="EXPIRED",t.Removed="REMOVED";})(C.SubscriptionCouponStatus||(C.SubscriptionCouponStatus={}));(function(t){t.PredefinedFreePlan="PREDEFINED_FREE_PLAN",t.PredefinedTrialPlan="PREDEFINED_TRIAL_PLAN",t.RequestedPlan="REQUESTED_PLAN",t.SkippedSubscriptionCreation="SKIPPED_SUBSCRIPTION_CREATION";})(C.SubscriptionDecisionStrategy||(C.SubscriptionDecisionStrategy={}));(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.DowngradeToFree="DOWNGRADE_TO_FREE";})(C.SubscriptionEndSetup||(C.SubscriptionEndSetup={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.SubscriptionId="subscriptionId",t.UpdatedAt="updatedAt";})(C.SubscriptionEntitlementSortFields||(C.SubscriptionEntitlementSortFields={}));(function(t){t.BillingCycle="BILLING_CYCLE",t.Manual="MANUAL",t.MinimumInvoiceAmountExceeded="MINIMUM_INVOICE_AMOUNT_EXCEEDED",t.Other="OTHER",t.SubscriptionCreation="SUBSCRIPTION_CREATION",t.SubscriptionUpdate="SUBSCRIPTION_UPDATE";})(C.SubscriptionInvoiceBillingReason||(C.SubscriptionInvoiceBillingReason={}));(function(t){t.Canceled="CANCELED",t.Open="OPEN",t.Paid="PAID";})(C.SubscriptionInvoiceStatus||(C.SubscriptionInvoiceStatus={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType";})(C.SubscriptionMigrationTaskSortFields||(C.SubscriptionMigrationTaskSortFields={}));(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE";})(C.SubscriptionMigrationTime||(C.SubscriptionMigrationTime={}));(function(t){t.BillingModel="billingModel",t.CreatedAt="createdAt",t.FeatureId="featureId",t.HasSoftLimit="hasSoftLimit",t.Id="id",t.UpdatedAt="updatedAt",t.UsageLimit="usageLimit";})(C.SubscriptionPriceSortFields||(C.SubscriptionPriceSortFields={}));(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY",t.None="NONE";})(C.SubscriptionProrationBehavior||(C.SubscriptionProrationBehavior={}));(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.CustomerId="customerId",t.EnvironmentId="environmentId",t.ProductId="productId",t.ResourceId="resourceId",t.SalesforceId="salesforceId",t.StartDate="startDate",t.Status="status",t.SubscriptionId="subscriptionId";})(C.SubscriptionQuerySortFields||(C.SubscriptionQuerySortFields={}));(function(t){t.Canceled="Canceled",t.Done="Done",t.Failed="Failed",t.PendingPayment="PendingPayment",t.Scheduled="Scheduled";})(C.SubscriptionScheduleStatus||(C.SubscriptionScheduleStatus={}));(function(t){t.AdditionalMetaData="AdditionalMetaData",t.Addon="Addon",t.BillingInfoMetadata="BillingInfoMetadata",t.BillingPeriod="BillingPeriod",t.Coupon="Coupon",t.Downgrade="Downgrade",t.MigrateToLatest="MigrateToLatest",t.Plan="Plan",t.PriceOverride="PriceOverride",t.UnitAmount="UnitAmount";})(C.SubscriptionScheduleType||(C.SubscriptionScheduleType={}));(function(t){t.FreePlan="FREE_PLAN",t.PlanSelection="PLAN_SELECTION",t.TrialPeriod="TRIAL_PERIOD";})(C.SubscriptionStartSetup||(C.SubscriptionStartSetup={}));(function(t){t.Active="ACTIVE",t.Canceled="CANCELED",t.Expired="EXPIRED",t.InTrial="IN_TRIAL",t.NotStarted="NOT_STARTED",t.PaymentPending="PAYMENT_PENDING";})(C.SubscriptionStatus||(C.SubscriptionStatus={}));(function(t){t.AlwaysReset="ALWAYS_RESET",t.BillingPeriodChange="BILLING_PERIOD_CHANGE",t.NeverReset="NEVER_RESET";})(C.SubscriptionUpdateUsageCutoffBehavior||(C.SubscriptionUpdateUsageCutoffBehavior={}));(function(t){t.Error="ERROR",t.NoSyncRequired="NO_SYNC_REQUIRED",t.Pending="PENDING",t.Success="SUCCESS";})(C.SyncStatus||(C.SyncStatus={}));(function(t){t.Canceled="CANCELED",t.Completed="COMPLETED",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.PartiallyFailed="PARTIALLY_FAILED",t.Pending="PENDING";})(C.TaskStatus||(C.TaskStatus={}));(function(t){t.ImportIntegrationCatalog="IMPORT_INTEGRATION_CATALOG",t.ImportIntegrationCustomers="IMPORT_INTEGRATION_CUSTOMERS",t.ImportSubscriptionsBulk="IMPORT_SUBSCRIPTIONS_BULK",t.RecalculateBatchEntitlements="RECALCULATE_BATCH_ENTITLEMENTS",t.RecalculateEntitlements="RECALCULATE_ENTITLEMENTS",t.ResyncIntegration="RESYNC_INTEGRATION",t.SubscriptionMigration="SUBSCRIPTION_MIGRATION",t.SubscriptionMigrationV2="SUBSCRIPTION_MIGRATION_V2";})(C.TaskType||(C.TaskType={}));(function(t){t.Graduated="GRADUATED",t.Volume="VOLUME";})(C.TiersMode||(C.TiersMode={}));(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.ConvertToPaid="CONVERT_TO_PAID";})(C.TrialEndBehavior||(C.TrialEndBehavior={}));(function(t){t.Day="DAY",t.Month="MONTH";})(C.TrialPeriodUnits||(C.TrialPeriodUnits={}));(function(t){t.Down="DOWN",t.Up="UP";})(C.UnitTransformationRound||(C.UnitTransformationRound={}));(function(t){t.PeriodicReset="PERIODIC_RESET",t.SubscriptionChangeReset="SUBSCRIPTION_CHANGE_RESET";})(C.UsageMarkerType||(C.UsageMarkerType={}));(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id";})(C.UsageMeasurementSortFields||(C.UsageMeasurementSortFields={}));(function(t){t.Delta="DELTA",t.Set="SET";})(C.UsageUpdateBehavior||(C.UsageUpdateBehavior={}));(function(t){t.Auth0="AUTH0",t.AwsMarketplace="AWS_MARKETPLACE",t.BigQuery="BIG_QUERY",t.Hubspot="HUBSPOT",t.OpenFga="OPEN_FGA",t.Salesforce="SALESFORCE",t.Snowflake="SNOWFLAKE",t.Stripe="STRIPE",t.Zuora="ZUORA";})(C.VendorIdentifier||(C.VendorIdentifier={}));(function(t){t.Auth="AUTH",t.Billing="BILLING",t.Crm="CRM",t.DataExport="DATA_EXPORT",t.Marketplace="MARKETPLACE";})(C.VendorType||(C.VendorType={}));(function(t){t.EveryFriday="EveryFriday",t.EveryMonday="EveryMonday",t.EverySaturday="EverySaturday",t.EverySunday="EverySunday",t.EveryThursday="EveryThursday",t.EveryTuesday="EveryTuesday",t.EveryWednesday="EveryWednesday",t.SubscriptionStart="SubscriptionStart";})(C.WeeklyAccordingTo||(C.WeeklyAccordingTo={}));(function(t){t.Checkout="CHECKOUT",t.CustomerPortal="CUSTOMER_PORTAL",t.Paywall="PAYWALL";})(C.WidgetType||(C.WidgetType={}));(function(t){t.SubscriptionStart="SubscriptionStart";})(C.YearlyAccordingTo||(C.YearlyAccordingTo={}));(function(t){t.Control="CONTROL",t.Variant="VARIANT";})(C.ExperimentGroupType||(C.ExperimentGroupType={}));C.PageInfoFragmentDoc=(0, Pt.default)`
|
|
12
12
|
fragment PageInfoFragment on PageInfo {
|
|
13
13
|
startCursor
|
|
14
14
|
endCursor
|
|
@@ -2291,7 +2291,7 @@ ${C.FeatureFragmentDoc}`;C.OnPackagePublishedDocument=(0, Pt.default)`
|
|
|
2291
2291
|
...CreditBalanceUpdatedPayload
|
|
2292
2292
|
}
|
|
2293
2293
|
}
|
|
2294
|
-
${C.CreditBalanceUpdatedPayloadFragmentDoc}`;var TN=(t,e,n)=>t();function wN(t,e=TN){return {ProvisionCustomer(n,r){return e(i=>t.request(C.ProvisionCustomerDocument,n,Object.assign(Object.assign({},r),i)),"ProvisionCustomer","mutation")},ImportCustomerBulk(n,r){return e(i=>t.request(C.ImportCustomerBulkDocument,n,Object.assign(Object.assign({},r),i)),"ImportCustomerBulk","mutation")},ImportCustomer(n,r){return e(i=>t.request(C.ImportCustomerDocument,n,Object.assign(Object.assign({},r),i)),"ImportCustomer","mutation")},UpdateCustomer(n,r){return e(i=>t.request(C.UpdateCustomerDocument,n,Object.assign(Object.assign({},r),i)),"UpdateCustomer","mutation")},DetachCustomerPaymentMethod(n,r){return e(i=>t.request(C.DetachCustomerPaymentMethodDocument,n,Object.assign(Object.assign({},r),i)),"DetachCustomerPaymentMethod","mutation")},GrantPromotionalEntitlements(n,r){return e(i=>t.request(C.GrantPromotionalEntitlementsDocument,n,Object.assign(Object.assign({},r),i)),"GrantPromotionalEntitlements","mutation")},RevokePromotionalEntitlement(n,r){return e(i=>t.request(C.RevokePromotionalEntitlementDocument,n,Object.assign(Object.assign({},r),i)),"RevokePromotionalEntitlement","mutation")},ProvisionSubscription(n,r){return e(i=>t.request(C.ProvisionSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"ProvisionSubscription","mutation")},ApplySubscription(n,r){return e(i=>t.request(C.ApplySubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"ApplySubscription","mutation")},ImportSubscriptionsBulk(n,r){return e(i=>t.request(C.ImportSubscriptionsBulkDocument,n,Object.assign(Object.assign({},r),i)),"ImportSubscriptionsBulk","mutation")},UpdateSubscription(n,r){return e(i=>t.request(C.UpdateSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"UpdateSubscription","mutation")},CancelSubscription(n,r){return e(i=>t.request(C.CancelSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"CancelSubscription","mutation")},EstimateSubscription(n,r){return e(i=>t.request(C.EstimateSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"EstimateSubscription","mutation")},EstimateSubscriptionUpdate(n,r){return e(i=>t.request(C.EstimateSubscriptionUpdateDocument,n,Object.assign(Object.assign({},r),i)),"EstimateSubscriptionUpdate","mutation")},PreviewSubscription(n,r){return e(i=>t.request(C.PreviewSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"PreviewSubscription","mutation")},PreviewNextInvoice(n,r){return e(i=>t.request(C.PreviewNextInvoiceDocument,n,Object.assign(Object.assign({},r),i)),"PreviewNextInvoice","mutation")},CancelSubscriptionUpdates(n,r){return e(i=>t.request(C.CancelSubscriptionUpdatesDocument,n,Object.assign(Object.assign({},r),i)),"CancelSubscriptionUpdates","mutation")},ReportUsage(n,r){return e(i=>t.request(C.ReportUsageDocument,n,Object.assign(Object.assign({},r),i)),"ReportUsage","mutation")},ReportUsageBulk(n,r){return e(i=>t.request(C.ReportUsageBulkDocument,n,Object.assign(Object.assign({},r),i)),"ReportUsageBulk","mutation")},ReportEvent(n,r){return e(i=>t.request(C.ReportEventDocument,n,Object.assign(Object.assign({},r),i)),"ReportEvent","mutation")},ReportEntitlementCheckRequested(n,r){return e(i=>t.request(C.ReportEntitlementCheckRequestedDocument,n,Object.assign(Object.assign({},r),i)),"ReportEntitlementCheckRequested","mutation")},CreateSubscription(n,r){return e(i=>t.request(C.CreateSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"CreateSubscription","mutation")},MigrateSubscriptionToLatest(n,r){return e(i=>t.request(C.MigrateSubscriptionToLatestDocument,n,Object.assign(Object.assign({},r),i)),"MigrateSubscriptionToLatest","mutation")},ArchiveCustomer(n,r){return e(i=>t.request(C.ArchiveCustomerDocument,n,Object.assign(Object.assign({},r),i)),"ArchiveCustomer","mutation")},UnarchiveCustomer(n,r){return e(i=>t.request(C.UnarchiveCustomerDocument,n,Object.assign(Object.assign({},r),i)),"UnarchiveCustomer","mutation")},TransferSubscription(n,r){return e(i=>t.request(C.TransferSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"TransferSubscription","mutation")},DelegateSubscriptionToCustomer(n,r){return e(i=>t.request(C.DelegateSubscriptionToCustomerDocument,n,Object.assign(Object.assign({},r),i)),"DelegateSubscriptionToCustomer","mutation")},TransferSubscriptionToResource(n,r){return e(i=>t.request(C.TransferSubscriptionToResourceDocument,n,Object.assign(Object.assign({},r),i)),"TransferSubscriptionToResource","mutation")},GrantCredits(n,r){return e(i=>t.request(C.GrantCreditsDocument,n,Object.assign(Object.assign({},r),i)),"GrantCredits","mutation")},GrantPromotionalEntitlementsGroup(n,r){return e(i=>t.request(C.GrantPromotionalEntitlementsGroupDocument,n,Object.assign(Object.assign({},r),i)),"GrantPromotionalEntitlementsGroup","mutation")},RevokePromotionalEntitlementsGroup(n,r){return e(i=>t.request(C.RevokePromotionalEntitlementsGroupDocument,n,Object.assign(Object.assign({},r),i)),"RevokePromotionalEntitlementsGroup","mutation")},UnlinkPromotionalEntitlementsGroup(n,r){return e(i=>t.request(C.UnlinkPromotionalEntitlementsGroupDocument,n,Object.assign(Object.assign({},r),i)),"UnlinkPromotionalEntitlementsGroup","mutation")},CreatePaymentSession(n,r){return e(i=>t.request(C.CreatePaymentSessionDocument,n,Object.assign(Object.assign({},r),i)),"CreatePaymentSession","mutation")},VoidCreditGrant(n,r){return e(i=>t.request(C.VoidCreditGrantDocument,n,Object.assign(Object.assign({},r),i)),"VoidCreditGrant","mutation")},GetCustomerById(n,r){return e(i=>t.request(C.GetCustomerByIdDocument,n,Object.assign(Object.assign({},r),i)),"GetCustomerById","query")},GetCustomerStatistics(n,r){return e(i=>t.request(C.GetCustomerStatisticsDocument,n,Object.assign(Object.assign({},r),i)),"GetCustomerStatistics","query")},GetActiveSubscriptions(n,r){return e(i=>t.request(C.GetActiveSubscriptionsDocument,n,Object.assign(Object.assign({},r),i)),"GetActiveSubscriptions","query")},GetActiveSubscriptionsList(n,r){return e(i=>t.request(C.GetActiveSubscriptionsListDocument,n,Object.assign(Object.assign({},r),i)),"GetActiveSubscriptionsList","query")},GetSubscriptions(n,r){return e(i=>t.request(C.GetSubscriptionsDocument,n,Object.assign(Object.assign({},r),i)),"GetSubscriptions","query")},GetSubscription(n,r){return e(i=>t.request(C.GetSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"GetSubscription","query")},GetCoupons(n,r){return e(i=>t.request(C.GetCouponsDocument,n,Object.assign(Object.assign({},r),i)),"GetCoupons","query")},GetPaywall(n,r){return e(i=>t.request(C.GetPaywallDocument,n,Object.assign(Object.assign({},r),i)),"GetPaywall","query")},GetEntitlements(n,r){return e(i=>t.request(C.GetEntitlementsDocument,n,Object.assign(Object.assign({},r),i)),"GetEntitlements","query")},GetEntitlementsState(n,r){return e(i=>t.request(C.GetEntitlementsStateDocument,n,Object.assign(Object.assign({},r),i)),"GetEntitlementsState","query")},GetEntitlement(n,r){return e(i=>t.request(C.GetEntitlementDocument,n,Object.assign(Object.assign({},r),i)),"GetEntitlement","query")},GetProducts(n,r){return e(i=>t.request(C.GetProductsDocument,n,Object.assign(Object.assign({},r),i)),"GetProducts","query")},GetSdkConfiguration(n,r){return e(i=>t.request(C.GetSdkConfigurationDocument,n,Object.assign(Object.assign({},r),i)),"GetSdkConfiguration","query")},GetCustomerPortalByRefId(n,r){return e(i=>t.request(C.GetCustomerPortalByRefIdDocument,n,Object.assign(Object.assign({},r),i)),"GetCustomerPortalByRefId","query")},GetCheckoutState(n,r){return e(i=>t.request(C.GetCheckoutStateDocument,n,Object.assign(Object.assign({},r),i)),"GetCheckoutState","query")},GetMockPaywall(n,r){return e(i=>t.request(C.GetMockPaywallDocument,n,Object.assign(Object.assign({},r),i)),"GetMockPaywall","query")},GetUsageHistory(n,r){return e(i=>t.request(C.GetUsageHistoryDocument,n,Object.assign(Object.assign({},r),i)),"GetUsageHistory","query")},GetUsageHistoryV2(n,r){return e(i=>t.request(C.GetUsageHistoryV2Document,n,Object.assign(Object.assign({},r),i)),"GetUsageHistoryV2","query")},GetCreditBalance(n,r){return e(i=>t.request(C.GetCreditBalanceDocument,n,Object.assign(Object.assign({},r),i)),"GetCreditBalance","query")},GetCreditGrants(n,r){return e(i=>t.request(C.GetCreditGrantsDocument,n,Object.assign(Object.assign({},r),i)),"GetCreditGrants","query")},GetCreditLedger(n,r){return e(i=>t.request(C.GetCreditLedgerDocument,n,Object.assign(Object.assign({},r),i)),"GetCreditLedger","query")},GetCreditUsage(n,r){return e(i=>t.request(C.GetCreditUsageDocument,n,Object.assign(Object.assign({},r),i)),"GetCreditUsage","query")},OnEntitlementsUpdated(n,r){return e(i=>t.request(C.OnEntitlementsUpdatedDocument,n,Object.assign(Object.assign({},r),i)),"OnEntitlementsUpdated","subscription")},OnUsageUpdated(n,r){return e(i=>t.request(C.OnUsageUpdatedDocument,n,Object.assign(Object.assign({},r),i)),"OnUsageUpdated","subscription")},OnPackagePublished(n,r){return e(i=>t.request(C.OnPackagePublishedDocument,n,Object.assign(Object.assign({},r),i)),"OnPackagePublished","subscription")},OnCreditBalanceUpdated(n,r){return e(i=>t.request(C.OnCreditBalanceUpdatedDocument,n,Object.assign(Object.assign({},r),i)),"OnCreditBalanceUpdated","subscription")}}}C.getSdk=wN;});var Qk={2991:(t,e,n)=>{n.d(e,{R:()=>o,Y:()=>s});var r=n(2176),i={};function o(){return (0, r.KV)()?n.g:typeof window!="undefined"?window:typeof self!="undefined"?self:i}function s(c,p,h){var v=h||o(),P=v.__SENTRY__=v.__SENTRY__||{};return P[c]||(P[c]=p())}},2176:(t,e,n)=>{function r(){return !(typeof __SENTRY_BROWSER_BUNDLE__!="undefined"&&__SENTRY_BROWSER_BUNDLE__)&&Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]"}function i(o,s){return o.require(s)}n.d(e,{l$:()=>i,KV:()=>r}),t=n.hmd(t);},1170:(t,e,n)=>{n.d(e,{yW:()=>p,ph:()=>h});var r=n(2991),i=n(2176);t=n.hmd(t);var o={nowSeconds:()=>Date.now()/1e3},s=(0, i.KV)()?(function(){try{return (0,i.l$)(t,"perf_hooks").performance}catch(P){return}})():(function(){let{performance:P}=(0, r.R)();if(P&&P.now)return {now:()=>P.now(),timeOrigin:Date.now()-P.now()}})(),c=s===void 0?o:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},p=o.nowSeconds.bind(o),h=c.nowSeconds.bind(c);(()=>{let{performance:P}=(0, r.R)();if(P&&P.now){var x=36e5,T=P.now(),I=Date.now(),R=P.timeOrigin?Math.abs(P.timeOrigin+T-I):x,A=R<x,O=P.timing&&P.timing.navigationStart,N=typeof O=="number"?Math.abs(O+T-I):x;return A||N<x?R<=N?(P.timeOrigin):(O):(I)}})();},1905:function(){(function(t){(function(e){var n="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&(function(){try{return new Blob,!0}catch(U){return false}})(),o="FormData"in t,s="ArrayBuffer"in t;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],p=ArrayBuffer.isView||function(U){return U&&c.indexOf(Object.prototype.toString.call(U))>-1};function h(U){if(typeof U!="string"&&(U=String(U)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(U))throw new TypeError("Invalid character in header field name");return U.toLowerCase()}function v(U){return typeof U!="string"&&(U=String(U)),U}function P(U){var j={next:function(){var ut=U.shift();return {done:ut===void 0,value:ut}}};return r&&(j[Symbol.iterator]=function(){return j}),j}function x(U){this.map={},U instanceof x?U.forEach((function(j,ut){this.append(ut,j);}),this):Array.isArray(U)?U.forEach((function(j){this.append(j[0],j[1]);}),this):U&&Object.getOwnPropertyNames(U).forEach((function(j){this.append(j,U[j]);}),this);}function T(U){if(U.bodyUsed)return Promise.reject(new TypeError("Already read"));U.bodyUsed=true;}function I(U){return new Promise((function(j,ut){U.onload=function(){j(U.result);},U.onerror=function(){ut(U.error);};}))}function R(U){var j=new FileReader,ut=I(j);return j.readAsArrayBuffer(U),ut}function A(U){if(U.slice)return U.slice(0);var j=new Uint8Array(U.byteLength);return j.set(new Uint8Array(U)),j.buffer}function O(){return this.bodyUsed=false,this._initBody=function(U){var j;this._bodyInit=U,U?typeof U=="string"?this._bodyText=U:i&&Blob.prototype.isPrototypeOf(U)?this._bodyBlob=U:o&&FormData.prototype.isPrototypeOf(U)?this._bodyFormData=U:n&&URLSearchParams.prototype.isPrototypeOf(U)?this._bodyText=U.toString():s&&i&&(j=U)&&DataView.prototype.isPrototypeOf(j)?(this._bodyArrayBuffer=A(U.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(U)||p(U))?this._bodyArrayBuffer=A(U):this._bodyText=U=Object.prototype.toString.call(U):this._bodyText="",this.headers.get("content-type")||(typeof U=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(U)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"));},i&&(this.blob=function(){var U=T(this);if(U)return U;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?T(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(R)}),this.text=function(){var U,j,ut,Y=T(this);if(Y)return Y;if(this._bodyBlob)return U=this._bodyBlob,ut=I(j=new FileReader),j.readAsText(U),ut;if(this._bodyArrayBuffer)return Promise.resolve((function(at){for(var pt=new Uint8Array(at),dt=new Array(pt.length),mt=0;mt<pt.length;mt++)dt[mt]=String.fromCharCode(pt[mt]);return dt.join("")})(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(G)}),this.json=function(){return this.text().then(JSON.parse)},this}x.prototype.append=function(U,j){U=h(U),j=v(j);var ut=this.map[U];this.map[U]=ut?ut+", "+j:j;},x.prototype.delete=function(U){delete this.map[h(U)];},x.prototype.get=function(U){return U=h(U),this.has(U)?this.map[U]:null},x.prototype.has=function(U){return this.map.hasOwnProperty(h(U))},x.prototype.set=function(U,j){this.map[h(U)]=v(j);},x.prototype.forEach=function(U,j){for(var ut in this.map)this.map.hasOwnProperty(ut)&&U.call(j,this.map[ut],ut,this);},x.prototype.keys=function(){var U=[];return this.forEach((function(j,ut){U.push(ut);})),P(U)},x.prototype.values=function(){var U=[];return this.forEach((function(j){U.push(j);})),P(U)},x.prototype.entries=function(){var U=[];return this.forEach((function(j,ut){U.push([ut,j]);})),P(U)},r&&(x.prototype[Symbol.iterator]=x.prototype.entries);var N=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function V(U,j){var ut,Y,at=(j=j||{}).body;if(U instanceof V){if(U.bodyUsed)throw new TypeError("Already read");this.url=U.url,this.credentials=U.credentials,j.headers||(this.headers=new x(U.headers)),this.method=U.method,this.mode=U.mode,this.signal=U.signal,at||U._bodyInit==null||(at=U._bodyInit,U.bodyUsed=true);}else this.url=String(U);if(this.credentials=j.credentials||this.credentials||"same-origin",!j.headers&&this.headers||(this.headers=new x(j.headers)),this.method=(Y=(ut=j.method||this.method||"GET").toUpperCase(),N.indexOf(Y)>-1?Y:ut),this.mode=j.mode||this.mode||null,this.signal=j.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&at)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(at);}function G(U){var j=new FormData;return U.trim().split("&").forEach((function(ut){if(ut){var Y=ut.split("="),at=Y.shift().replace(/\+/g," "),pt=Y.join("=").replace(/\+/g," ");j.append(decodeURIComponent(at),decodeURIComponent(pt));}})),j}function X(U,j){j||(j={}),this.type="default",this.status=j.status===void 0?200:j.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in j?j.statusText:"OK",this.headers=new x(j.headers),this.url=j.url||"",this._initBody(U);}V.prototype.clone=function(){return new V(this,{body:this._bodyInit})},O.call(V.prototype),O.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new x(this.headers),url:this.url})},X.error=function(){var U=new X(null,{status:0,statusText:""});return U.type="error",U};var nt=[301,302,303,307,308];X.redirect=function(U,j){if(nt.indexOf(j)===-1)throw new RangeError("Invalid status code");return new X(null,{status:j,headers:{location:U}})},e.DOMException=t.DOMException;try{new e.DOMException;}catch(U){e.DOMException=function(j,ut){this.message=j,this.name=ut;var Y=Error(j);this.stack=Y.stack;},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException;}function st(U,j){return new Promise((function(ut,Y){var at=new V(U,j);if(at.signal&&at.signal.aborted)return Y(new e.DOMException("Aborted","AbortError"));var pt=new XMLHttpRequest;function dt(){pt.abort();}pt.onload=function(){var mt,Ct,jt={status:pt.status,statusText:pt.statusText,headers:(mt=pt.getAllResponseHeaders()||"",Ct=new x,mt.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(Jt){var ee=Jt.split(":"),re=ee.shift().trim();if(re){var Ee=ee.join(":").trim();Ct.append(re,Ee);}})),Ct)};jt.url="responseURL"in pt?pt.responseURL:jt.headers.get("X-Request-URL");var Gt="response"in pt?pt.response:pt.responseText;ut(new X(Gt,jt));},pt.onerror=function(){Y(new TypeError("Network request failed"));},pt.ontimeout=function(){Y(new TypeError("Network request failed"));},pt.onabort=function(){Y(new e.DOMException("Aborted","AbortError"));},pt.open(at.method,at.url,true),at.credentials==="include"?pt.withCredentials=true:at.credentials==="omit"&&(pt.withCredentials=false),"responseType"in pt&&i&&(pt.responseType="blob"),at.headers.forEach((function(mt,Ct){pt.setRequestHeader(Ct,mt);})),at.signal&&(at.signal.addEventListener("abort",dt),pt.onreadystatechange=function(){pt.readyState===4&&at.signal.removeEventListener("abort",dt);}),pt.send(at._bodyInit===void 0?null:at._bodyInit);}))}st.polyfill=true,t.fetch||(t.fetch=st,t.Headers=x,t.Request=V,t.Response=X),e.Headers=x,e.Request=V,e.Response=X,e.fetch=st,Object.defineProperty(e,"__esModule",{value:true});})({});})(typeof self!="undefined"?self:this);},7484:function(t){t.exports=(function(){var e=6e4,n=36e5,r="millisecond",i="second",o="minute",s="hour",c="day",p="week",h="month",v="quarter",P="year",x="date",T="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(at){var pt=["th","st","nd","rd"],dt=at%100;return "["+at+(pt[(dt-20)%10]||pt[dt]||pt[0])+"]"}},O=function(at,pt,dt){var mt=String(at);return !mt||mt.length>=pt?at:""+Array(pt+1-mt.length).join(dt)+at},N={s:O,z:function(at){var pt=-at.utcOffset(),dt=Math.abs(pt),mt=Math.floor(dt/60),Ct=dt%60;return (pt<=0?"+":"-")+O(mt,2,"0")+":"+O(Ct,2,"0")},m:function at(pt,dt){if(pt.date()<dt.date())return -at(dt,pt);var mt=12*(dt.year()-pt.year())+(dt.month()-pt.month()),Ct=pt.clone().add(mt,h),jt=dt-Ct<0,Gt=pt.clone().add(mt+(jt?-1:1),h);return +(-(mt+(dt-Ct)/(jt?Ct-Gt:Gt-Ct))||0)},a:function(at){return at<0?Math.ceil(at)||0:Math.floor(at)},p:function(at){return {M:h,y:P,w:p,d:c,D:x,h:s,m:o,s:i,ms:r,Q:v}[at]||String(at||"").toLowerCase().replace(/s$/,"")},u:function(at){return at===void 0}},V="en",G={};G[V]=A;var X="$isDayjsObject",nt=function(at){return at instanceof ut||!(!at||!at[X])},st=function at(pt,dt,mt){var Ct;if(!pt)return V;if(typeof pt=="string"){var jt=pt.toLowerCase();G[jt]&&(Ct=jt),dt&&(G[jt]=dt,Ct=jt);var Gt=pt.split("-");if(!Ct&&Gt.length>1)return at(Gt[0])}else {var Jt=pt.name;G[Jt]=pt,Ct=Jt;}return !mt&&Ct&&(V=Ct),Ct||!mt&&V},U=function(at,pt){if(nt(at))return at.clone();var dt=typeof pt=="object"?pt:{};return dt.date=at,dt.args=arguments,new ut(dt)},j=N;j.l=st,j.i=nt,j.w=function(at,pt){return U(at,{locale:pt.$L,utc:pt.$u,x:pt.$x,$offset:pt.$offset})};var ut=(function(){function at(dt){this.$L=st(dt.locale,null,true),this.parse(dt),this.$x=this.$x||dt.x||{},this[X]=true;}var pt=at.prototype;return pt.parse=function(dt){this.$d=(function(mt){var Ct=mt.date,jt=mt.utc;if(Ct===null)return new Date(NaN);if(j.u(Ct))return new Date;if(Ct instanceof Date)return new Date(Ct);if(typeof Ct=="string"&&!/Z$/i.test(Ct)){var Gt=Ct.match(I);if(Gt){var Jt=Gt[2]-1||0,ee=(Gt[7]||"0").substring(0,3);return jt?new Date(Date.UTC(Gt[1],Jt,Gt[3]||1,Gt[4]||0,Gt[5]||0,Gt[6]||0,ee)):new Date(Gt[1],Jt,Gt[3]||1,Gt[4]||0,Gt[5]||0,Gt[6]||0,ee)}}return new Date(Ct)})(dt),this.init();},pt.init=function(){var dt=this.$d;this.$y=dt.getFullYear(),this.$M=dt.getMonth(),this.$D=dt.getDate(),this.$W=dt.getDay(),this.$H=dt.getHours(),this.$m=dt.getMinutes(),this.$s=dt.getSeconds(),this.$ms=dt.getMilliseconds();},pt.$utils=function(){return j},pt.isValid=function(){return this.$d.toString()!==T},pt.isSame=function(dt,mt){var Ct=U(dt);return this.startOf(mt)<=Ct&&Ct<=this.endOf(mt)},pt.isAfter=function(dt,mt){return U(dt)<this.startOf(mt)},pt.isBefore=function(dt,mt){return this.endOf(mt)<U(dt)},pt.$g=function(dt,mt,Ct){return j.u(dt)?this[mt]:this.set(Ct,dt)},pt.unix=function(){return Math.floor(this.valueOf()/1e3)},pt.valueOf=function(){return this.$d.getTime()},pt.startOf=function(dt,mt){var Ct=this,jt=!!j.u(mt)||mt,Gt=j.p(dt),Jt=function(Gn,ln){var Ke=j.w(Ct.$u?Date.UTC(Ct.$y,ln,Gn):new Date(Ct.$y,ln,Gn),Ct);return jt?Ke:Ke.endOf(c)},ee=function(Gn,ln){return j.w(Ct.toDate()[Gn].apply(Ct.toDate("s"),(jt?[0,0,0,0]:[23,59,59,999]).slice(ln)),Ct)},re=this.$W,Ee=this.$M,je=this.$D,sn="set"+(this.$u?"UTC":"");switch(Gt){case P:return jt?Jt(1,0):Jt(31,11);case h:return jt?Jt(1,Ee):Jt(0,Ee+1);case p:var Ze=this.$locale().weekStart||0,Pn=(re<Ze?re+7:re)-Ze;return Jt(jt?je-Pn:je+(6-Pn),Ee);case c:case x:return ee(sn+"Hours",0);case s:return ee(sn+"Minutes",1);case o:return ee(sn+"Seconds",2);case i:return ee(sn+"Milliseconds",3);default:return this.clone()}},pt.endOf=function(dt){return this.startOf(dt,false)},pt.$set=function(dt,mt){var Ct,jt=j.p(dt),Gt="set"+(this.$u?"UTC":""),Jt=(Ct={},Ct[c]=Gt+"Date",Ct[x]=Gt+"Date",Ct[h]=Gt+"Month",Ct[P]=Gt+"FullYear",Ct[s]=Gt+"Hours",Ct[o]=Gt+"Minutes",Ct[i]=Gt+"Seconds",Ct[r]=Gt+"Milliseconds",Ct)[jt],ee=jt===c?this.$D+(mt-this.$W):mt;if(jt===h||jt===P){var re=this.clone().set(x,1);re.$d[Jt](ee),re.init(),this.$d=re.set(x,Math.min(this.$D,re.daysInMonth())).$d;}else Jt&&this.$d[Jt](ee);return this.init(),this},pt.set=function(dt,mt){return this.clone().$set(dt,mt)},pt.get=function(dt){return this[j.p(dt)]()},pt.add=function(dt,mt){var Ct,jt=this;dt=Number(dt);var Gt=j.p(mt),Jt=function(Ee){var je=U(jt);return j.w(je.date(je.date()+Math.round(Ee*dt)),jt)};if(Gt===h)return this.set(h,this.$M+dt);if(Gt===P)return this.set(P,this.$y+dt);if(Gt===c)return Jt(1);if(Gt===p)return Jt(7);var ee=(Ct={},Ct[o]=e,Ct[s]=n,Ct[i]=1e3,Ct)[Gt]||1,re=this.$d.getTime()+dt*ee;return j.w(re,this)},pt.subtract=function(dt,mt){return this.add(-1*dt,mt)},pt.format=function(dt){var mt=this,Ct=this.$locale();if(!this.isValid())return Ct.invalidDate||T;var jt=dt||"YYYY-MM-DDTHH:mm:ssZ",Gt=j.z(this),Jt=this.$H,ee=this.$m,re=this.$M,Ee=Ct.weekdays,je=Ct.months,sn=Ct.meridiem,Ze=function(ln,Ke,dn,or){return ln&&(ln[Ke]||ln(mt,jt))||dn[Ke].slice(0,or)},Pn=function(ln){return j.s(Jt%12||12,ln,"0")},Gn=sn||function(ln,Ke,dn){var or=ln<12?"AM":"PM";return dn?or.toLowerCase():or};return jt.replace(R,(function(ln,Ke){return Ke||(function(dn){switch(dn){case "YY":return String(mt.$y).slice(-2);case "YYYY":return j.s(mt.$y,4,"0");case "M":return re+1;case "MM":return j.s(re+1,2,"0");case "MMM":return Ze(Ct.monthsShort,re,je,3);case "MMMM":return Ze(je,re);case "D":return mt.$D;case "DD":return j.s(mt.$D,2,"0");case "d":return String(mt.$W);case "dd":return Ze(Ct.weekdaysMin,mt.$W,Ee,2);case "ddd":return Ze(Ct.weekdaysShort,mt.$W,Ee,3);case "dddd":return Ee[mt.$W];case "H":return String(Jt);case "HH":return j.s(Jt,2,"0");case "h":return Pn(1);case "hh":return Pn(2);case "a":return Gn(Jt,ee,true);case "A":return Gn(Jt,ee,false);case "m":return String(ee);case "mm":return j.s(ee,2,"0");case "s":return String(mt.$s);case "ss":return j.s(mt.$s,2,"0");case "SSS":return j.s(mt.$ms,3,"0");case "Z":return Gt}return null})(ln)||Gt.replace(":","")}))},pt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},pt.diff=function(dt,mt,Ct){var jt,Gt=this,Jt=j.p(mt),ee=U(dt),re=(ee.utcOffset()-this.utcOffset())*e,Ee=this-ee,je=function(){return j.m(Gt,ee)};switch(Jt){case P:jt=je()/12;break;case h:jt=je();break;case v:jt=je()/3;break;case p:jt=(Ee-re)/6048e5;break;case c:jt=(Ee-re)/864e5;break;case s:jt=Ee/n;break;case o:jt=Ee/e;break;case i:jt=Ee/1e3;break;default:jt=Ee;}return Ct?jt:j.a(jt)},pt.daysInMonth=function(){return this.endOf(h).$D},pt.$locale=function(){return G[this.$L]},pt.locale=function(dt,mt){if(!dt)return this.$L;var Ct=this.clone(),jt=st(dt,mt,true);return jt&&(Ct.$L=jt),Ct},pt.clone=function(){return j.w(this.$d,this)},pt.toDate=function(){return new Date(this.valueOf())},pt.toJSON=function(){return this.isValid()?this.toISOString():null},pt.toISOString=function(){return this.$d.toISOString()},pt.toString=function(){return this.$d.toUTCString()},at})(),Y=ut.prototype;return U.prototype=Y,[["$ms",r],["$s",i],["$m",o],["$H",s],["$W",c],["$M",h],["$y",P],["$D",x]].forEach((function(at){Y[at[1]]=function(pt){return this.$g(pt,at[0],at[1])};})),U.extend=function(at,pt){return at.$i||(at(pt,ut,U),at.$i=true),U},U.locale=st,U.isDayjs=nt,U.unix=function(at){return U(1e3*at)},U.en=G[V],U.Ls=G,U.p={},U})();},7187:t=>{var e,n=typeof Reflect=="object"?Reflect:null,r=n&&typeof n.apply=="function"?n.apply:function(A,O,N){return Function.prototype.apply.call(A,O,N)};e=n&&typeof n.ownKeys=="function"?n.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var i=Number.isNaN||function(A){return A!=A};function o(){o.init.call(this);}t.exports=o,t.exports.once=function(A,O){return new Promise((function(N,V){function G(nt){A.removeListener(O,X),V(nt);}function X(){typeof A.removeListener=="function"&&A.removeListener("error",G),N([].slice.call(arguments));}R(A,O,X,{once:true}),O!=="error"&&(function(nt,st,U){typeof nt.on=="function"&&R(nt,"error",st,{once:true});})(A,G);}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function c(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function p(A){return A._maxListeners===void 0?o.defaultMaxListeners:A._maxListeners}function h(A,O,N,V){var G,X,nt,st;if(c(N),(X=A._events)===void 0?(X=A._events=Object.create(null),A._eventsCount=0):(X.newListener!==void 0&&(A.emit("newListener",O,N.listener?N.listener:N),X=A._events),nt=X[O]),nt===void 0)nt=X[O]=N,++A._eventsCount;else if(typeof nt=="function"?nt=X[O]=V?[N,nt]:[nt,N]:V?nt.unshift(N):nt.push(N),(G=p(A))>0&&nt.length>G&&!nt.warned){nt.warned=true;var U=new Error("Possible EventEmitter memory leak detected. "+nt.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=A,U.type=O,U.count=nt.length,st=U,console&&console.warn&&console.warn(st);}return A}function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=true,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function P(A,O,N){var V={fired:false,wrapFn:void 0,target:A,type:O,listener:N},G=v.bind(V);return G.listener=N,V.wrapFn=G,G}function x(A,O,N){var V=A._events;if(V===void 0)return [];var G=V[O];return G===void 0?[]:typeof G=="function"?N?[G.listener||G]:[G]:N?(function(X){for(var nt=new Array(X.length),st=0;st<nt.length;++st)nt[st]=X[st].listener||X[st];return nt})(G):I(G,G.length)}function T(A){var O=this._events;if(O!==void 0){var N=O[A];if(typeof N=="function")return 1;if(N!==void 0)return N.length}return 0}function I(A,O){for(var N=new Array(O),V=0;V<O;++V)N[V]=A[V];return N}function R(A,O,N,V){if(typeof A.on=="function")V.once?A.once(O,N):A.on(O,N);else {if(typeof A.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A);A.addEventListener(O,(function G(X){V.once&&A.removeEventListener(O,G),N(X);}));}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:true,get:function(){return s},set:function(A){if(typeof A!="number"||A<0||i(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");s=A;}}),o.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},o.prototype.setMaxListeners=function(A){if(typeof A!="number"||A<0||i(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this},o.prototype.getMaxListeners=function(){return p(this)},o.prototype.emit=function(A){for(var O=[],N=1;N<arguments.length;N++)O.push(arguments[N]);var V=A==="error",G=this._events;if(G!==void 0)V=V&&G.error===void 0;else if(!V)return false;if(V){var X;if(O.length>0&&(X=O[0]),X instanceof Error)throw X;var nt=new Error("Unhandled error."+(X?" ("+X.message+")":""));throw nt.context=X,nt}var st=G[A];if(st===void 0)return false;if(typeof st=="function")r(st,this,O);else {var U=st.length,j=I(st,U);for(N=0;N<U;++N)r(j[N],this,O);}return true},o.prototype.addListener=function(A,O){return h(this,A,O,false)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(A,O){return h(this,A,O,true)},o.prototype.once=function(A,O){return c(O),this.on(A,P(this,A,O)),this},o.prototype.prependOnceListener=function(A,O){return c(O),this.prependListener(A,P(this,A,O)),this},o.prototype.removeListener=function(A,O){var N,V,G,X,nt;if(c(O),(V=this._events)===void 0)return this;if((N=V[A])===void 0)return this;if(N===O||N.listener===O)--this._eventsCount==0?this._events=Object.create(null):(delete V[A],V.removeListener&&this.emit("removeListener",A,N.listener||O));else if(typeof N!="function"){for(G=-1,X=N.length-1;X>=0;X--)if(N[X]===O||N[X].listener===O){nt=N[X].listener,G=X;break}if(G<0)return this;G===0?N.shift():(function(st,U){for(;U+1<st.length;U++)st[U]=st[U+1];st.pop();})(N,G),N.length===1&&(V[A]=N[0]),V.removeListener!==void 0&&this.emit("removeListener",A,nt||O);}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(A){var O,N,V;if((N=this._events)===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[A]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete N[A]),this;if(arguments.length===0){var G,X=Object.keys(N);for(V=0;V<X.length;++V)(G=X[V])!=="removeListener"&&this.removeAllListeners(G);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(O=N[A])=="function")this.removeListener(A,O);else if(O!==void 0)for(V=O.length-1;V>=0;V--)this.removeListener(A,O[V]);return this},o.prototype.listeners=function(A){return x(this,A,true)},o.prototype.rawListeners=function(A){return x(this,A,false)},o.listenerCount=function(A,O){return typeof A.listenerCount=="function"?A.listenerCount(O):T.call(A,O)},o.prototype.listenerCount=T,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};},4139:function(t){t.exports=(function(){function e(r){return Number.isInteger(r)&&r>=0}function n(r){this.name="ArgumentError",this.message=r;}return function(r,i){if(i=i||{},typeof r!="function")throw new n("fetch must be a function");if(typeof i!="object")throw new n("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new n("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new n("retryOn property expects an array or function");return i=Object.assign({retries:3,retryDelay:1e3,retryOn:[]},i),function(o,s){var c=i.retries,p=i.retryDelay,h=i.retryOn;if(s&&s.retries!==void 0){if(!e(s.retries))throw new n("retries must be a positive integer");c=s.retries;}if(s&&s.retryDelay!==void 0){if(!e(s.retryDelay)&&typeof s.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");p=s.retryDelay;}if(s&&s.retryOn){if(!Array.isArray(s.retryOn)&&typeof s.retryOn!="function")throw new n("retryOn property expects an array or function");h=s.retryOn;}return new Promise((function(v,P){var x=function(I){var R=typeof Request!="undefined"&&o instanceof Request?o.clone():o;r(R,s).then((function(A){if(Array.isArray(h)&&h.indexOf(A.status)===-1)v(A);else if(typeof h=="function")try{return Promise.resolve(h(I,null,A)).then((function(O){O?T(I,null,A):v(A);})).catch(P)}catch(O){P(O);}else I<c?T(I,null,A):v(A);})).catch((function(A){if(typeof h=="function")try{Promise.resolve(h(I,A,null)).then((function(O){O?T(I,A,null):P(A);})).catch((function(O){P(O);}));}catch(O){P(O);}else I<c?T(I,A,null):P(A);}));};function T(I,R,A){var O=typeof p=="function"?p(I,R,A):p;setTimeout((function(){x(++I);}),O);}x(0);}))}}})();},5185:(t,e,n)=>{n.r(e),n.d(e,{default:()=>Vt,disableExperimentalFragmentVariables:()=>Jn,disableFragmentWarnings:()=>ar,enableExperimentalFragmentVariables:()=>sr,gql:()=>Ve,resetCaches:()=>bt});var r=function(){return r=Object.assign||function(gt){for(var ot,Z=1,it=arguments.length;Z<it;Z++)for(var _t in ot=arguments[Z])Object.prototype.hasOwnProperty.call(ot,_t)&&(gt[_t]=ot[_t]);return gt},r.apply(this,arguments)};function i(gt){return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ot){return typeof ot}:function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},i(gt)}var o=n(9763);function s(gt,ot){for(var Z,it=/\r\n|[\n\r]/g,_t=1,ft=ot+1;(Z=it.exec(gt.body))&&Z.index<ot;)_t+=1,ft=ot+1-(Z.index+Z[0].length);return {line:_t,column:ft}}function c(gt){return p(gt.source,s(gt.source,gt.start))}function p(gt,ot){var Z=gt.locationOffset.column-1,it=v(Z)+gt.body,_t=ot.line-1,ft=gt.locationOffset.line-1,Lt=ot.line+ft,It=ot.line===1?Z:0,Nt=ot.column+It,se="".concat(gt.name,":").concat(Lt,":").concat(Nt,`
|
|
2294
|
+
${C.CreditBalanceUpdatedPayloadFragmentDoc}`;var wN=(t,e,n)=>t();function IN(t,e=wN){return {ProvisionCustomer(n,r){return e(i=>t.request(C.ProvisionCustomerDocument,n,Object.assign(Object.assign({},r),i)),"ProvisionCustomer","mutation")},ImportCustomerBulk(n,r){return e(i=>t.request(C.ImportCustomerBulkDocument,n,Object.assign(Object.assign({},r),i)),"ImportCustomerBulk","mutation")},ImportCustomer(n,r){return e(i=>t.request(C.ImportCustomerDocument,n,Object.assign(Object.assign({},r),i)),"ImportCustomer","mutation")},UpdateCustomer(n,r){return e(i=>t.request(C.UpdateCustomerDocument,n,Object.assign(Object.assign({},r),i)),"UpdateCustomer","mutation")},DetachCustomerPaymentMethod(n,r){return e(i=>t.request(C.DetachCustomerPaymentMethodDocument,n,Object.assign(Object.assign({},r),i)),"DetachCustomerPaymentMethod","mutation")},GrantPromotionalEntitlements(n,r){return e(i=>t.request(C.GrantPromotionalEntitlementsDocument,n,Object.assign(Object.assign({},r),i)),"GrantPromotionalEntitlements","mutation")},RevokePromotionalEntitlement(n,r){return e(i=>t.request(C.RevokePromotionalEntitlementDocument,n,Object.assign(Object.assign({},r),i)),"RevokePromotionalEntitlement","mutation")},ProvisionSubscription(n,r){return e(i=>t.request(C.ProvisionSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"ProvisionSubscription","mutation")},ApplySubscription(n,r){return e(i=>t.request(C.ApplySubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"ApplySubscription","mutation")},ImportSubscriptionsBulk(n,r){return e(i=>t.request(C.ImportSubscriptionsBulkDocument,n,Object.assign(Object.assign({},r),i)),"ImportSubscriptionsBulk","mutation")},UpdateSubscription(n,r){return e(i=>t.request(C.UpdateSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"UpdateSubscription","mutation")},CancelSubscription(n,r){return e(i=>t.request(C.CancelSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"CancelSubscription","mutation")},EstimateSubscription(n,r){return e(i=>t.request(C.EstimateSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"EstimateSubscription","mutation")},EstimateSubscriptionUpdate(n,r){return e(i=>t.request(C.EstimateSubscriptionUpdateDocument,n,Object.assign(Object.assign({},r),i)),"EstimateSubscriptionUpdate","mutation")},PreviewSubscription(n,r){return e(i=>t.request(C.PreviewSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"PreviewSubscription","mutation")},PreviewNextInvoice(n,r){return e(i=>t.request(C.PreviewNextInvoiceDocument,n,Object.assign(Object.assign({},r),i)),"PreviewNextInvoice","mutation")},CancelSubscriptionUpdates(n,r){return e(i=>t.request(C.CancelSubscriptionUpdatesDocument,n,Object.assign(Object.assign({},r),i)),"CancelSubscriptionUpdates","mutation")},ReportUsage(n,r){return e(i=>t.request(C.ReportUsageDocument,n,Object.assign(Object.assign({},r),i)),"ReportUsage","mutation")},ReportUsageBulk(n,r){return e(i=>t.request(C.ReportUsageBulkDocument,n,Object.assign(Object.assign({},r),i)),"ReportUsageBulk","mutation")},ReportEvent(n,r){return e(i=>t.request(C.ReportEventDocument,n,Object.assign(Object.assign({},r),i)),"ReportEvent","mutation")},ReportEntitlementCheckRequested(n,r){return e(i=>t.request(C.ReportEntitlementCheckRequestedDocument,n,Object.assign(Object.assign({},r),i)),"ReportEntitlementCheckRequested","mutation")},CreateSubscription(n,r){return e(i=>t.request(C.CreateSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"CreateSubscription","mutation")},MigrateSubscriptionToLatest(n,r){return e(i=>t.request(C.MigrateSubscriptionToLatestDocument,n,Object.assign(Object.assign({},r),i)),"MigrateSubscriptionToLatest","mutation")},ArchiveCustomer(n,r){return e(i=>t.request(C.ArchiveCustomerDocument,n,Object.assign(Object.assign({},r),i)),"ArchiveCustomer","mutation")},UnarchiveCustomer(n,r){return e(i=>t.request(C.UnarchiveCustomerDocument,n,Object.assign(Object.assign({},r),i)),"UnarchiveCustomer","mutation")},TransferSubscription(n,r){return e(i=>t.request(C.TransferSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"TransferSubscription","mutation")},DelegateSubscriptionToCustomer(n,r){return e(i=>t.request(C.DelegateSubscriptionToCustomerDocument,n,Object.assign(Object.assign({},r),i)),"DelegateSubscriptionToCustomer","mutation")},TransferSubscriptionToResource(n,r){return e(i=>t.request(C.TransferSubscriptionToResourceDocument,n,Object.assign(Object.assign({},r),i)),"TransferSubscriptionToResource","mutation")},GrantCredits(n,r){return e(i=>t.request(C.GrantCreditsDocument,n,Object.assign(Object.assign({},r),i)),"GrantCredits","mutation")},GrantPromotionalEntitlementsGroup(n,r){return e(i=>t.request(C.GrantPromotionalEntitlementsGroupDocument,n,Object.assign(Object.assign({},r),i)),"GrantPromotionalEntitlementsGroup","mutation")},RevokePromotionalEntitlementsGroup(n,r){return e(i=>t.request(C.RevokePromotionalEntitlementsGroupDocument,n,Object.assign(Object.assign({},r),i)),"RevokePromotionalEntitlementsGroup","mutation")},UnlinkPromotionalEntitlementsGroup(n,r){return e(i=>t.request(C.UnlinkPromotionalEntitlementsGroupDocument,n,Object.assign(Object.assign({},r),i)),"UnlinkPromotionalEntitlementsGroup","mutation")},CreatePaymentSession(n,r){return e(i=>t.request(C.CreatePaymentSessionDocument,n,Object.assign(Object.assign({},r),i)),"CreatePaymentSession","mutation")},VoidCreditGrant(n,r){return e(i=>t.request(C.VoidCreditGrantDocument,n,Object.assign(Object.assign({},r),i)),"VoidCreditGrant","mutation")},GetCustomerById(n,r){return e(i=>t.request(C.GetCustomerByIdDocument,n,Object.assign(Object.assign({},r),i)),"GetCustomerById","query")},GetCustomerStatistics(n,r){return e(i=>t.request(C.GetCustomerStatisticsDocument,n,Object.assign(Object.assign({},r),i)),"GetCustomerStatistics","query")},GetActiveSubscriptions(n,r){return e(i=>t.request(C.GetActiveSubscriptionsDocument,n,Object.assign(Object.assign({},r),i)),"GetActiveSubscriptions","query")},GetActiveSubscriptionsList(n,r){return e(i=>t.request(C.GetActiveSubscriptionsListDocument,n,Object.assign(Object.assign({},r),i)),"GetActiveSubscriptionsList","query")},GetSubscriptions(n,r){return e(i=>t.request(C.GetSubscriptionsDocument,n,Object.assign(Object.assign({},r),i)),"GetSubscriptions","query")},GetSubscription(n,r){return e(i=>t.request(C.GetSubscriptionDocument,n,Object.assign(Object.assign({},r),i)),"GetSubscription","query")},GetCoupons(n,r){return e(i=>t.request(C.GetCouponsDocument,n,Object.assign(Object.assign({},r),i)),"GetCoupons","query")},GetPaywall(n,r){return e(i=>t.request(C.GetPaywallDocument,n,Object.assign(Object.assign({},r),i)),"GetPaywall","query")},GetEntitlements(n,r){return e(i=>t.request(C.GetEntitlementsDocument,n,Object.assign(Object.assign({},r),i)),"GetEntitlements","query")},GetEntitlementsState(n,r){return e(i=>t.request(C.GetEntitlementsStateDocument,n,Object.assign(Object.assign({},r),i)),"GetEntitlementsState","query")},GetEntitlement(n,r){return e(i=>t.request(C.GetEntitlementDocument,n,Object.assign(Object.assign({},r),i)),"GetEntitlement","query")},GetProducts(n,r){return e(i=>t.request(C.GetProductsDocument,n,Object.assign(Object.assign({},r),i)),"GetProducts","query")},GetSdkConfiguration(n,r){return e(i=>t.request(C.GetSdkConfigurationDocument,n,Object.assign(Object.assign({},r),i)),"GetSdkConfiguration","query")},GetCustomerPortalByRefId(n,r){return e(i=>t.request(C.GetCustomerPortalByRefIdDocument,n,Object.assign(Object.assign({},r),i)),"GetCustomerPortalByRefId","query")},GetCheckoutState(n,r){return e(i=>t.request(C.GetCheckoutStateDocument,n,Object.assign(Object.assign({},r),i)),"GetCheckoutState","query")},GetMockPaywall(n,r){return e(i=>t.request(C.GetMockPaywallDocument,n,Object.assign(Object.assign({},r),i)),"GetMockPaywall","query")},GetUsageHistory(n,r){return e(i=>t.request(C.GetUsageHistoryDocument,n,Object.assign(Object.assign({},r),i)),"GetUsageHistory","query")},GetUsageHistoryV2(n,r){return e(i=>t.request(C.GetUsageHistoryV2Document,n,Object.assign(Object.assign({},r),i)),"GetUsageHistoryV2","query")},GetCreditBalance(n,r){return e(i=>t.request(C.GetCreditBalanceDocument,n,Object.assign(Object.assign({},r),i)),"GetCreditBalance","query")},GetCreditGrants(n,r){return e(i=>t.request(C.GetCreditGrantsDocument,n,Object.assign(Object.assign({},r),i)),"GetCreditGrants","query")},GetCreditLedger(n,r){return e(i=>t.request(C.GetCreditLedgerDocument,n,Object.assign(Object.assign({},r),i)),"GetCreditLedger","query")},GetCreditUsage(n,r){return e(i=>t.request(C.GetCreditUsageDocument,n,Object.assign(Object.assign({},r),i)),"GetCreditUsage","query")},OnEntitlementsUpdated(n,r){return e(i=>t.request(C.OnEntitlementsUpdatedDocument,n,Object.assign(Object.assign({},r),i)),"OnEntitlementsUpdated","subscription")},OnUsageUpdated(n,r){return e(i=>t.request(C.OnUsageUpdatedDocument,n,Object.assign(Object.assign({},r),i)),"OnUsageUpdated","subscription")},OnPackagePublished(n,r){return e(i=>t.request(C.OnPackagePublishedDocument,n,Object.assign(Object.assign({},r),i)),"OnPackagePublished","subscription")},OnCreditBalanceUpdated(n,r){return e(i=>t.request(C.OnCreditBalanceUpdatedDocument,n,Object.assign(Object.assign({},r),i)),"OnCreditBalanceUpdated","subscription")}}}C.getSdk=IN;});var Kk={2991:(t,e,n)=>{n.d(e,{R:()=>o,Y:()=>s});var r=n(2176),i={};function o(){return (0, r.KV)()?n.g:typeof window!="undefined"?window:typeof self!="undefined"?self:i}function s(c,p,h){var v=h||o(),P=v.__SENTRY__=v.__SENTRY__||{};return P[c]||(P[c]=p())}},2176:(t,e,n)=>{function r(){return !(typeof __SENTRY_BROWSER_BUNDLE__!="undefined"&&__SENTRY_BROWSER_BUNDLE__)&&Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]"}function i(o,s){return o.require(s)}n.d(e,{l$:()=>i,KV:()=>r}),t=n.hmd(t);},1170:(t,e,n)=>{n.d(e,{yW:()=>p,ph:()=>h});var r=n(2991),i=n(2176);t=n.hmd(t);var o={nowSeconds:()=>Date.now()/1e3},s=(0, i.KV)()?(function(){try{return (0,i.l$)(t,"perf_hooks").performance}catch(P){return}})():(function(){let{performance:P}=(0, r.R)();if(P&&P.now)return {now:()=>P.now(),timeOrigin:Date.now()-P.now()}})(),c=s===void 0?o:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},p=o.nowSeconds.bind(o),h=c.nowSeconds.bind(c);(()=>{let{performance:P}=(0, r.R)();if(P&&P.now){var x=36e5,T=P.now(),I=Date.now(),R=P.timeOrigin?Math.abs(P.timeOrigin+T-I):x,A=R<x,O=P.timing&&P.timing.navigationStart,N=typeof O=="number"?Math.abs(O+T-I):x;return A||N<x?R<=N?(P.timeOrigin):(O):(I)}})();},1905:function(){(function(t){(function(e){var n="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&(function(){try{return new Blob,!0}catch(U){return false}})(),o="FormData"in t,s="ArrayBuffer"in t;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],p=ArrayBuffer.isView||function(U){return U&&c.indexOf(Object.prototype.toString.call(U))>-1};function h(U){if(typeof U!="string"&&(U=String(U)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(U))throw new TypeError("Invalid character in header field name");return U.toLowerCase()}function v(U){return typeof U!="string"&&(U=String(U)),U}function P(U){var j={next:function(){var ut=U.shift();return {done:ut===void 0,value:ut}}};return r&&(j[Symbol.iterator]=function(){return j}),j}function x(U){this.map={},U instanceof x?U.forEach((function(j,ut){this.append(ut,j);}),this):Array.isArray(U)?U.forEach((function(j){this.append(j[0],j[1]);}),this):U&&Object.getOwnPropertyNames(U).forEach((function(j){this.append(j,U[j]);}),this);}function T(U){if(U.bodyUsed)return Promise.reject(new TypeError("Already read"));U.bodyUsed=true;}function I(U){return new Promise((function(j,ut){U.onload=function(){j(U.result);},U.onerror=function(){ut(U.error);};}))}function R(U){var j=new FileReader,ut=I(j);return j.readAsArrayBuffer(U),ut}function A(U){if(U.slice)return U.slice(0);var j=new Uint8Array(U.byteLength);return j.set(new Uint8Array(U)),j.buffer}function O(){return this.bodyUsed=false,this._initBody=function(U){var j;this._bodyInit=U,U?typeof U=="string"?this._bodyText=U:i&&Blob.prototype.isPrototypeOf(U)?this._bodyBlob=U:o&&FormData.prototype.isPrototypeOf(U)?this._bodyFormData=U:n&&URLSearchParams.prototype.isPrototypeOf(U)?this._bodyText=U.toString():s&&i&&(j=U)&&DataView.prototype.isPrototypeOf(j)?(this._bodyArrayBuffer=A(U.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(U)||p(U))?this._bodyArrayBuffer=A(U):this._bodyText=U=Object.prototype.toString.call(U):this._bodyText="",this.headers.get("content-type")||(typeof U=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(U)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"));},i&&(this.blob=function(){var U=T(this);if(U)return U;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?T(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(R)}),this.text=function(){var U,j,ut,Y=T(this);if(Y)return Y;if(this._bodyBlob)return U=this._bodyBlob,ut=I(j=new FileReader),j.readAsText(U),ut;if(this._bodyArrayBuffer)return Promise.resolve((function(at){for(var pt=new Uint8Array(at),dt=new Array(pt.length),mt=0;mt<pt.length;mt++)dt[mt]=String.fromCharCode(pt[mt]);return dt.join("")})(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(G)}),this.json=function(){return this.text().then(JSON.parse)},this}x.prototype.append=function(U,j){U=h(U),j=v(j);var ut=this.map[U];this.map[U]=ut?ut+", "+j:j;},x.prototype.delete=function(U){delete this.map[h(U)];},x.prototype.get=function(U){return U=h(U),this.has(U)?this.map[U]:null},x.prototype.has=function(U){return this.map.hasOwnProperty(h(U))},x.prototype.set=function(U,j){this.map[h(U)]=v(j);},x.prototype.forEach=function(U,j){for(var ut in this.map)this.map.hasOwnProperty(ut)&&U.call(j,this.map[ut],ut,this);},x.prototype.keys=function(){var U=[];return this.forEach((function(j,ut){U.push(ut);})),P(U)},x.prototype.values=function(){var U=[];return this.forEach((function(j){U.push(j);})),P(U)},x.prototype.entries=function(){var U=[];return this.forEach((function(j,ut){U.push([ut,j]);})),P(U)},r&&(x.prototype[Symbol.iterator]=x.prototype.entries);var N=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function V(U,j){var ut,Y,at=(j=j||{}).body;if(U instanceof V){if(U.bodyUsed)throw new TypeError("Already read");this.url=U.url,this.credentials=U.credentials,j.headers||(this.headers=new x(U.headers)),this.method=U.method,this.mode=U.mode,this.signal=U.signal,at||U._bodyInit==null||(at=U._bodyInit,U.bodyUsed=true);}else this.url=String(U);if(this.credentials=j.credentials||this.credentials||"same-origin",!j.headers&&this.headers||(this.headers=new x(j.headers)),this.method=(Y=(ut=j.method||this.method||"GET").toUpperCase(),N.indexOf(Y)>-1?Y:ut),this.mode=j.mode||this.mode||null,this.signal=j.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&at)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(at);}function G(U){var j=new FormData;return U.trim().split("&").forEach((function(ut){if(ut){var Y=ut.split("="),at=Y.shift().replace(/\+/g," "),pt=Y.join("=").replace(/\+/g," ");j.append(decodeURIComponent(at),decodeURIComponent(pt));}})),j}function X(U,j){j||(j={}),this.type="default",this.status=j.status===void 0?200:j.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in j?j.statusText:"OK",this.headers=new x(j.headers),this.url=j.url||"",this._initBody(U);}V.prototype.clone=function(){return new V(this,{body:this._bodyInit})},O.call(V.prototype),O.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new x(this.headers),url:this.url})},X.error=function(){var U=new X(null,{status:0,statusText:""});return U.type="error",U};var nt=[301,302,303,307,308];X.redirect=function(U,j){if(nt.indexOf(j)===-1)throw new RangeError("Invalid status code");return new X(null,{status:j,headers:{location:U}})},e.DOMException=t.DOMException;try{new e.DOMException;}catch(U){e.DOMException=function(j,ut){this.message=j,this.name=ut;var Y=Error(j);this.stack=Y.stack;},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException;}function st(U,j){return new Promise((function(ut,Y){var at=new V(U,j);if(at.signal&&at.signal.aborted)return Y(new e.DOMException("Aborted","AbortError"));var pt=new XMLHttpRequest;function dt(){pt.abort();}pt.onload=function(){var mt,Ct,jt={status:pt.status,statusText:pt.statusText,headers:(mt=pt.getAllResponseHeaders()||"",Ct=new x,mt.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(Jt){var ee=Jt.split(":"),re=ee.shift().trim();if(re){var Ee=ee.join(":").trim();Ct.append(re,Ee);}})),Ct)};jt.url="responseURL"in pt?pt.responseURL:jt.headers.get("X-Request-URL");var Gt="response"in pt?pt.response:pt.responseText;ut(new X(Gt,jt));},pt.onerror=function(){Y(new TypeError("Network request failed"));},pt.ontimeout=function(){Y(new TypeError("Network request failed"));},pt.onabort=function(){Y(new e.DOMException("Aborted","AbortError"));},pt.open(at.method,at.url,true),at.credentials==="include"?pt.withCredentials=true:at.credentials==="omit"&&(pt.withCredentials=false),"responseType"in pt&&i&&(pt.responseType="blob"),at.headers.forEach((function(mt,Ct){pt.setRequestHeader(Ct,mt);})),at.signal&&(at.signal.addEventListener("abort",dt),pt.onreadystatechange=function(){pt.readyState===4&&at.signal.removeEventListener("abort",dt);}),pt.send(at._bodyInit===void 0?null:at._bodyInit);}))}st.polyfill=true,t.fetch||(t.fetch=st,t.Headers=x,t.Request=V,t.Response=X),e.Headers=x,e.Request=V,e.Response=X,e.fetch=st,Object.defineProperty(e,"__esModule",{value:true});})({});})(typeof self!="undefined"?self:this);},7484:function(t){t.exports=(function(){var e=6e4,n=36e5,r="millisecond",i="second",o="minute",s="hour",c="day",p="week",h="month",v="quarter",P="year",x="date",T="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(at){var pt=["th","st","nd","rd"],dt=at%100;return "["+at+(pt[(dt-20)%10]||pt[dt]||pt[0])+"]"}},O=function(at,pt,dt){var mt=String(at);return !mt||mt.length>=pt?at:""+Array(pt+1-mt.length).join(dt)+at},N={s:O,z:function(at){var pt=-at.utcOffset(),dt=Math.abs(pt),mt=Math.floor(dt/60),Ct=dt%60;return (pt<=0?"+":"-")+O(mt,2,"0")+":"+O(Ct,2,"0")},m:function at(pt,dt){if(pt.date()<dt.date())return -at(dt,pt);var mt=12*(dt.year()-pt.year())+(dt.month()-pt.month()),Ct=pt.clone().add(mt,h),jt=dt-Ct<0,Gt=pt.clone().add(mt+(jt?-1:1),h);return +(-(mt+(dt-Ct)/(jt?Ct-Gt:Gt-Ct))||0)},a:function(at){return at<0?Math.ceil(at)||0:Math.floor(at)},p:function(at){return {M:h,y:P,w:p,d:c,D:x,h:s,m:o,s:i,ms:r,Q:v}[at]||String(at||"").toLowerCase().replace(/s$/,"")},u:function(at){return at===void 0}},V="en",G={};G[V]=A;var X="$isDayjsObject",nt=function(at){return at instanceof ut||!(!at||!at[X])},st=function at(pt,dt,mt){var Ct;if(!pt)return V;if(typeof pt=="string"){var jt=pt.toLowerCase();G[jt]&&(Ct=jt),dt&&(G[jt]=dt,Ct=jt);var Gt=pt.split("-");if(!Ct&&Gt.length>1)return at(Gt[0])}else {var Jt=pt.name;G[Jt]=pt,Ct=Jt;}return !mt&&Ct&&(V=Ct),Ct||!mt&&V},U=function(at,pt){if(nt(at))return at.clone();var dt=typeof pt=="object"?pt:{};return dt.date=at,dt.args=arguments,new ut(dt)},j=N;j.l=st,j.i=nt,j.w=function(at,pt){return U(at,{locale:pt.$L,utc:pt.$u,x:pt.$x,$offset:pt.$offset})};var ut=(function(){function at(dt){this.$L=st(dt.locale,null,true),this.parse(dt),this.$x=this.$x||dt.x||{},this[X]=true;}var pt=at.prototype;return pt.parse=function(dt){this.$d=(function(mt){var Ct=mt.date,jt=mt.utc;if(Ct===null)return new Date(NaN);if(j.u(Ct))return new Date;if(Ct instanceof Date)return new Date(Ct);if(typeof Ct=="string"&&!/Z$/i.test(Ct)){var Gt=Ct.match(I);if(Gt){var Jt=Gt[2]-1||0,ee=(Gt[7]||"0").substring(0,3);return jt?new Date(Date.UTC(Gt[1],Jt,Gt[3]||1,Gt[4]||0,Gt[5]||0,Gt[6]||0,ee)):new Date(Gt[1],Jt,Gt[3]||1,Gt[4]||0,Gt[5]||0,Gt[6]||0,ee)}}return new Date(Ct)})(dt),this.init();},pt.init=function(){var dt=this.$d;this.$y=dt.getFullYear(),this.$M=dt.getMonth(),this.$D=dt.getDate(),this.$W=dt.getDay(),this.$H=dt.getHours(),this.$m=dt.getMinutes(),this.$s=dt.getSeconds(),this.$ms=dt.getMilliseconds();},pt.$utils=function(){return j},pt.isValid=function(){return this.$d.toString()!==T},pt.isSame=function(dt,mt){var Ct=U(dt);return this.startOf(mt)<=Ct&&Ct<=this.endOf(mt)},pt.isAfter=function(dt,mt){return U(dt)<this.startOf(mt)},pt.isBefore=function(dt,mt){return this.endOf(mt)<U(dt)},pt.$g=function(dt,mt,Ct){return j.u(dt)?this[mt]:this.set(Ct,dt)},pt.unix=function(){return Math.floor(this.valueOf()/1e3)},pt.valueOf=function(){return this.$d.getTime()},pt.startOf=function(dt,mt){var Ct=this,jt=!!j.u(mt)||mt,Gt=j.p(dt),Jt=function(Gn,ln){var Ke=j.w(Ct.$u?Date.UTC(Ct.$y,ln,Gn):new Date(Ct.$y,ln,Gn),Ct);return jt?Ke:Ke.endOf(c)},ee=function(Gn,ln){return j.w(Ct.toDate()[Gn].apply(Ct.toDate("s"),(jt?[0,0,0,0]:[23,59,59,999]).slice(ln)),Ct)},re=this.$W,Ee=this.$M,je=this.$D,sn="set"+(this.$u?"UTC":"");switch(Gt){case P:return jt?Jt(1,0):Jt(31,11);case h:return jt?Jt(1,Ee):Jt(0,Ee+1);case p:var Ze=this.$locale().weekStart||0,Pn=(re<Ze?re+7:re)-Ze;return Jt(jt?je-Pn:je+(6-Pn),Ee);case c:case x:return ee(sn+"Hours",0);case s:return ee(sn+"Minutes",1);case o:return ee(sn+"Seconds",2);case i:return ee(sn+"Milliseconds",3);default:return this.clone()}},pt.endOf=function(dt){return this.startOf(dt,false)},pt.$set=function(dt,mt){var Ct,jt=j.p(dt),Gt="set"+(this.$u?"UTC":""),Jt=(Ct={},Ct[c]=Gt+"Date",Ct[x]=Gt+"Date",Ct[h]=Gt+"Month",Ct[P]=Gt+"FullYear",Ct[s]=Gt+"Hours",Ct[o]=Gt+"Minutes",Ct[i]=Gt+"Seconds",Ct[r]=Gt+"Milliseconds",Ct)[jt],ee=jt===c?this.$D+(mt-this.$W):mt;if(jt===h||jt===P){var re=this.clone().set(x,1);re.$d[Jt](ee),re.init(),this.$d=re.set(x,Math.min(this.$D,re.daysInMonth())).$d;}else Jt&&this.$d[Jt](ee);return this.init(),this},pt.set=function(dt,mt){return this.clone().$set(dt,mt)},pt.get=function(dt){return this[j.p(dt)]()},pt.add=function(dt,mt){var Ct,jt=this;dt=Number(dt);var Gt=j.p(mt),Jt=function(Ee){var je=U(jt);return j.w(je.date(je.date()+Math.round(Ee*dt)),jt)};if(Gt===h)return this.set(h,this.$M+dt);if(Gt===P)return this.set(P,this.$y+dt);if(Gt===c)return Jt(1);if(Gt===p)return Jt(7);var ee=(Ct={},Ct[o]=e,Ct[s]=n,Ct[i]=1e3,Ct)[Gt]||1,re=this.$d.getTime()+dt*ee;return j.w(re,this)},pt.subtract=function(dt,mt){return this.add(-1*dt,mt)},pt.format=function(dt){var mt=this,Ct=this.$locale();if(!this.isValid())return Ct.invalidDate||T;var jt=dt||"YYYY-MM-DDTHH:mm:ssZ",Gt=j.z(this),Jt=this.$H,ee=this.$m,re=this.$M,Ee=Ct.weekdays,je=Ct.months,sn=Ct.meridiem,Ze=function(ln,Ke,dn,or){return ln&&(ln[Ke]||ln(mt,jt))||dn[Ke].slice(0,or)},Pn=function(ln){return j.s(Jt%12||12,ln,"0")},Gn=sn||function(ln,Ke,dn){var or=ln<12?"AM":"PM";return dn?or.toLowerCase():or};return jt.replace(R,(function(ln,Ke){return Ke||(function(dn){switch(dn){case "YY":return String(mt.$y).slice(-2);case "YYYY":return j.s(mt.$y,4,"0");case "M":return re+1;case "MM":return j.s(re+1,2,"0");case "MMM":return Ze(Ct.monthsShort,re,je,3);case "MMMM":return Ze(je,re);case "D":return mt.$D;case "DD":return j.s(mt.$D,2,"0");case "d":return String(mt.$W);case "dd":return Ze(Ct.weekdaysMin,mt.$W,Ee,2);case "ddd":return Ze(Ct.weekdaysShort,mt.$W,Ee,3);case "dddd":return Ee[mt.$W];case "H":return String(Jt);case "HH":return j.s(Jt,2,"0");case "h":return Pn(1);case "hh":return Pn(2);case "a":return Gn(Jt,ee,true);case "A":return Gn(Jt,ee,false);case "m":return String(ee);case "mm":return j.s(ee,2,"0");case "s":return String(mt.$s);case "ss":return j.s(mt.$s,2,"0");case "SSS":return j.s(mt.$ms,3,"0");case "Z":return Gt}return null})(ln)||Gt.replace(":","")}))},pt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},pt.diff=function(dt,mt,Ct){var jt,Gt=this,Jt=j.p(mt),ee=U(dt),re=(ee.utcOffset()-this.utcOffset())*e,Ee=this-ee,je=function(){return j.m(Gt,ee)};switch(Jt){case P:jt=je()/12;break;case h:jt=je();break;case v:jt=je()/3;break;case p:jt=(Ee-re)/6048e5;break;case c:jt=(Ee-re)/864e5;break;case s:jt=Ee/n;break;case o:jt=Ee/e;break;case i:jt=Ee/1e3;break;default:jt=Ee;}return Ct?jt:j.a(jt)},pt.daysInMonth=function(){return this.endOf(h).$D},pt.$locale=function(){return G[this.$L]},pt.locale=function(dt,mt){if(!dt)return this.$L;var Ct=this.clone(),jt=st(dt,mt,true);return jt&&(Ct.$L=jt),Ct},pt.clone=function(){return j.w(this.$d,this)},pt.toDate=function(){return new Date(this.valueOf())},pt.toJSON=function(){return this.isValid()?this.toISOString():null},pt.toISOString=function(){return this.$d.toISOString()},pt.toString=function(){return this.$d.toUTCString()},at})(),Y=ut.prototype;return U.prototype=Y,[["$ms",r],["$s",i],["$m",o],["$H",s],["$W",c],["$M",h],["$y",P],["$D",x]].forEach((function(at){Y[at[1]]=function(pt){return this.$g(pt,at[0],at[1])};})),U.extend=function(at,pt){return at.$i||(at(pt,ut,U),at.$i=true),U},U.locale=st,U.isDayjs=nt,U.unix=function(at){return U(1e3*at)},U.en=G[V],U.Ls=G,U.p={},U})();},7187:t=>{var e,n=typeof Reflect=="object"?Reflect:null,r=n&&typeof n.apply=="function"?n.apply:function(A,O,N){return Function.prototype.apply.call(A,O,N)};e=n&&typeof n.ownKeys=="function"?n.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var i=Number.isNaN||function(A){return A!=A};function o(){o.init.call(this);}t.exports=o,t.exports.once=function(A,O){return new Promise((function(N,V){function G(nt){A.removeListener(O,X),V(nt);}function X(){typeof A.removeListener=="function"&&A.removeListener("error",G),N([].slice.call(arguments));}R(A,O,X,{once:true}),O!=="error"&&(function(nt,st,U){typeof nt.on=="function"&&R(nt,"error",st,{once:true});})(A,G);}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function c(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function p(A){return A._maxListeners===void 0?o.defaultMaxListeners:A._maxListeners}function h(A,O,N,V){var G,X,nt,st;if(c(N),(X=A._events)===void 0?(X=A._events=Object.create(null),A._eventsCount=0):(X.newListener!==void 0&&(A.emit("newListener",O,N.listener?N.listener:N),X=A._events),nt=X[O]),nt===void 0)nt=X[O]=N,++A._eventsCount;else if(typeof nt=="function"?nt=X[O]=V?[N,nt]:[nt,N]:V?nt.unshift(N):nt.push(N),(G=p(A))>0&&nt.length>G&&!nt.warned){nt.warned=true;var U=new Error("Possible EventEmitter memory leak detected. "+nt.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=A,U.type=O,U.count=nt.length,st=U,console&&console.warn&&console.warn(st);}return A}function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=true,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function P(A,O,N){var V={fired:false,wrapFn:void 0,target:A,type:O,listener:N},G=v.bind(V);return G.listener=N,V.wrapFn=G,G}function x(A,O,N){var V=A._events;if(V===void 0)return [];var G=V[O];return G===void 0?[]:typeof G=="function"?N?[G.listener||G]:[G]:N?(function(X){for(var nt=new Array(X.length),st=0;st<nt.length;++st)nt[st]=X[st].listener||X[st];return nt})(G):I(G,G.length)}function T(A){var O=this._events;if(O!==void 0){var N=O[A];if(typeof N=="function")return 1;if(N!==void 0)return N.length}return 0}function I(A,O){for(var N=new Array(O),V=0;V<O;++V)N[V]=A[V];return N}function R(A,O,N,V){if(typeof A.on=="function")V.once?A.once(O,N):A.on(O,N);else {if(typeof A.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A);A.addEventListener(O,(function G(X){V.once&&A.removeEventListener(O,G),N(X);}));}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:true,get:function(){return s},set:function(A){if(typeof A!="number"||A<0||i(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");s=A;}}),o.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},o.prototype.setMaxListeners=function(A){if(typeof A!="number"||A<0||i(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this},o.prototype.getMaxListeners=function(){return p(this)},o.prototype.emit=function(A){for(var O=[],N=1;N<arguments.length;N++)O.push(arguments[N]);var V=A==="error",G=this._events;if(G!==void 0)V=V&&G.error===void 0;else if(!V)return false;if(V){var X;if(O.length>0&&(X=O[0]),X instanceof Error)throw X;var nt=new Error("Unhandled error."+(X?" ("+X.message+")":""));throw nt.context=X,nt}var st=G[A];if(st===void 0)return false;if(typeof st=="function")r(st,this,O);else {var U=st.length,j=I(st,U);for(N=0;N<U;++N)r(j[N],this,O);}return true},o.prototype.addListener=function(A,O){return h(this,A,O,false)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(A,O){return h(this,A,O,true)},o.prototype.once=function(A,O){return c(O),this.on(A,P(this,A,O)),this},o.prototype.prependOnceListener=function(A,O){return c(O),this.prependListener(A,P(this,A,O)),this},o.prototype.removeListener=function(A,O){var N,V,G,X,nt;if(c(O),(V=this._events)===void 0)return this;if((N=V[A])===void 0)return this;if(N===O||N.listener===O)--this._eventsCount==0?this._events=Object.create(null):(delete V[A],V.removeListener&&this.emit("removeListener",A,N.listener||O));else if(typeof N!="function"){for(G=-1,X=N.length-1;X>=0;X--)if(N[X]===O||N[X].listener===O){nt=N[X].listener,G=X;break}if(G<0)return this;G===0?N.shift():(function(st,U){for(;U+1<st.length;U++)st[U]=st[U+1];st.pop();})(N,G),N.length===1&&(V[A]=N[0]),V.removeListener!==void 0&&this.emit("removeListener",A,nt||O);}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(A){var O,N,V;if((N=this._events)===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[A]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete N[A]),this;if(arguments.length===0){var G,X=Object.keys(N);for(V=0;V<X.length;++V)(G=X[V])!=="removeListener"&&this.removeAllListeners(G);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(O=N[A])=="function")this.removeListener(A,O);else if(O!==void 0)for(V=O.length-1;V>=0;V--)this.removeListener(A,O[V]);return this},o.prototype.listeners=function(A){return x(this,A,true)},o.prototype.rawListeners=function(A){return x(this,A,false)},o.listenerCount=function(A,O){return typeof A.listenerCount=="function"?A.listenerCount(O):T.call(A,O)},o.prototype.listenerCount=T,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};},4139:function(t){t.exports=(function(){function e(r){return Number.isInteger(r)&&r>=0}function n(r){this.name="ArgumentError",this.message=r;}return function(r,i){if(i=i||{},typeof r!="function")throw new n("fetch must be a function");if(typeof i!="object")throw new n("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new n("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new n("retryOn property expects an array or function");return i=Object.assign({retries:3,retryDelay:1e3,retryOn:[]},i),function(o,s){var c=i.retries,p=i.retryDelay,h=i.retryOn;if(s&&s.retries!==void 0){if(!e(s.retries))throw new n("retries must be a positive integer");c=s.retries;}if(s&&s.retryDelay!==void 0){if(!e(s.retryDelay)&&typeof s.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");p=s.retryDelay;}if(s&&s.retryOn){if(!Array.isArray(s.retryOn)&&typeof s.retryOn!="function")throw new n("retryOn property expects an array or function");h=s.retryOn;}return new Promise((function(v,P){var x=function(I){var R=typeof Request!="undefined"&&o instanceof Request?o.clone():o;r(R,s).then((function(A){if(Array.isArray(h)&&h.indexOf(A.status)===-1)v(A);else if(typeof h=="function")try{return Promise.resolve(h(I,null,A)).then((function(O){O?T(I,null,A):v(A);})).catch(P)}catch(O){P(O);}else I<c?T(I,null,A):v(A);})).catch((function(A){if(typeof h=="function")try{Promise.resolve(h(I,A,null)).then((function(O){O?T(I,A,null):P(A);})).catch((function(O){P(O);}));}catch(O){P(O);}else I<c?T(I,A,null):P(A);}));};function T(I,R,A){var O=typeof p=="function"?p(I,R,A):p;setTimeout((function(){x(++I);}),O);}x(0);}))}}})();},5185:(t,e,n)=>{n.r(e),n.d(e,{default:()=>Vt,disableExperimentalFragmentVariables:()=>Jn,disableFragmentWarnings:()=>ar,enableExperimentalFragmentVariables:()=>sr,gql:()=>Ve,resetCaches:()=>bt});var r=function(){return r=Object.assign||function(gt){for(var ot,Z=1,it=arguments.length;Z<it;Z++)for(var _t in ot=arguments[Z])Object.prototype.hasOwnProperty.call(ot,_t)&&(gt[_t]=ot[_t]);return gt},r.apply(this,arguments)};function i(gt){return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ot){return typeof ot}:function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},i(gt)}var o=n(9763);function s(gt,ot){for(var Z,it=/\r\n|[\n\r]/g,_t=1,ft=ot+1;(Z=it.exec(gt.body))&&Z.index<ot;)_t+=1,ft=ot+1-(Z.index+Z[0].length);return {line:_t,column:ft}}function c(gt){return p(gt.source,s(gt.source,gt.start))}function p(gt,ot){var Z=gt.locationOffset.column-1,it=v(Z)+gt.body,_t=ot.line-1,ft=gt.locationOffset.line-1,Lt=ot.line+ft,It=ot.line===1?Z:0,Nt=ot.column+It,se="".concat(gt.name,":").concat(Lt,":").concat(Nt,`
|
|
2295
2295
|
`),ne=it.split(/\r\n|[\n\r]/g),kn=ne[_t];if(kn.length>120){for(var Ae=Math.floor(Nt/80),cn=Nt%80,pn=[],Ir=0;Ir<kn.length;Ir+=80)pn.push(kn.slice(Ir,Ir+80));return se+h([["".concat(Lt),pn[0]]].concat(pn.slice(1,Ae+1).map((function(cr){return ["",cr]})),[[" ",v(cn-1)+"^"],["",pn[Ae+1]]]))}return se+h([["".concat(Lt-1),ne[_t-1]],["".concat(Lt),kn],["",v(Nt-1)+"^"],["".concat(Lt+1),ne[_t+1]]])}function h(gt){var ot=gt.filter((function(it){return it[0],it[1]!==void 0})),Z=Math.max.apply(Math,ot.map((function(it){return it[0].length})));return ot.map((function(it){var _t,ft=it[0],Lt=it[1];return v(Z-(_t=ft).length)+_t+(Lt?" | "+Lt:" |")})).join(`
|
|
2296
2296
|
`)}function v(gt){return Array(gt+1).join(" ")}function P(gt){return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ot){return typeof ot}:function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},P(gt)}function x(gt,ot){var Z=Object.keys(gt);if(Object.getOwnPropertySymbols){var it=Object.getOwnPropertySymbols(gt);ot&&(it=it.filter((function(_t){return Object.getOwnPropertyDescriptor(gt,_t).enumerable}))),Z.push.apply(Z,it);}return Z}function T(gt,ot,Z){return ot in gt?Object.defineProperty(gt,ot,{value:Z,enumerable:true,configurable:true,writable:true}):gt[ot]=Z,gt}function I(gt,ot){for(var Z=0;Z<ot.length;Z++){var it=ot[Z];it.enumerable=it.enumerable||false,it.configurable=true,"value"in it&&(it.writable=true),Object.defineProperty(gt,it.key,it);}}function R(gt,ot){return !ot||P(ot)!=="object"&&typeof ot!="function"?A(gt):ot}function A(gt){if(gt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return gt}function O(gt){var ot=typeof Map=="function"?new Map:void 0;return O=function(Z){if(Z===null||(it=Z,Function.toString.call(it).indexOf("[native code]")===-1))return Z;var it;if(typeof Z!="function")throw new TypeError("Super expression must either be null or a function");if(ot!==void 0){if(ot.has(Z))return ot.get(Z);ot.set(Z,_t);}function _t(){return N(Z,arguments,X(this).constructor)}return _t.prototype=Object.create(Z.prototype,{constructor:{value:_t,enumerable:false,writable:true,configurable:true}}),G(_t,Z)},O(gt)}function N(gt,ot,Z){return N=V()?Reflect.construct:function(it,_t,ft){var Lt=[null];Lt.push.apply(Lt,_t);var It=new(Function.bind.apply(it,Lt));return ft&&G(It,ft.prototype),It},N.apply(null,arguments)}function V(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return false;if(typeof Proxy=="function")return true;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(gt){return false}}function G(gt,ot){return G=Object.setPrototypeOf||function(Z,it){return Z.__proto__=it,Z},G(gt,ot)}function X(gt){return X=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},X(gt)}var nt=(function(gt){(function(It,Nt){if(typeof Nt!="function"&&Nt!==null)throw new TypeError("Super expression must either be null or a function");It.prototype=Object.create(Nt&&Nt.prototype,{constructor:{value:It,writable:true,configurable:true}}),Nt&&G(It,Nt);})(Lt,gt);var ot,Z,it,_t,ft=(ot=Lt,Z=V(),function(){var It,Nt=X(ot);if(Z){var se=X(this).constructor;It=Reflect.construct(Nt,arguments,se);}else It=Nt.apply(this,arguments);return R(this,It)});function Lt(It,Nt,se,ne,kn,Ae,cn){var pn,Ir,cr,en;((function(fn,dr){if(!(fn instanceof dr))throw new TypeError("Cannot call a class as a function")}))(this,Lt),(en=ft.call(this,It)).name="GraphQLError",en.originalError=Ae!=null?Ae:void 0,en.nodes=st(Array.isArray(Nt)?Nt:Nt?[Nt]:void 0);for(var ur=[],$t=0,Vr=(xn=en.nodes)!==null&&xn!==void 0?xn:[];$t<Vr.length;$t++){var xn,jn=Vr[$t].loc;jn!=null&&ur.push(jn);}ur=st(ur),en.source=se!=null?se:(pn=ur)===null||pn===void 0?void 0:pn[0].source,en.positions=ne!=null?ne:(Ir=ur)===null||Ir===void 0?void 0:Ir.map((function(fn){return fn.start})),en.locations=ne&&se?ne.map((function(fn){return s(se,fn)})):(cr=ur)===null||cr===void 0?void 0:cr.map((function(fn){return s(fn.source,fn.start)})),en.path=kn!=null?kn:void 0;var ct,si=Ae==null?void 0:Ae.extensions;return cn==null&&i(ct=si)=="object"&&ct!==null?en.extensions=(function(fn){for(var dr=1;dr<arguments.length;dr++){var kr=arguments[dr]!=null?arguments[dr]:{};dr%2?x(Object(kr),true).forEach((function(Ii){T(fn,Ii,kr[Ii]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(fn,Object.getOwnPropertyDescriptors(kr)):x(Object(kr)).forEach((function(Ii){Object.defineProperty(fn,Ii,Object.getOwnPropertyDescriptor(kr,Ii));}));}return fn})({},si):en.extensions=cn!=null?cn:{},Object.defineProperties(A(en),{message:{enumerable:true},locations:{enumerable:en.locations!=null},path:{enumerable:en.path!=null},extensions:{enumerable:en.extensions!=null&&Object.keys(en.extensions).length>0},name:{enumerable:false},nodes:{enumerable:false},source:{enumerable:false},positions:{enumerable:false},originalError:{enumerable:false}}),Ae!=null&&Ae.stack?(Object.defineProperty(A(en),"stack",{value:Ae.stack,writable:true,configurable:true}),R(en)):(Error.captureStackTrace?Error.captureStackTrace(A(en),Lt):Object.defineProperty(A(en),"stack",{value:Error().stack,writable:true,configurable:true}),en)}return it=Lt,(_t=[{key:"toString",value:function(){return (function(It){var Nt=It.message;if(It.nodes)for(var se=0,ne=It.nodes;se<ne.length;se++){var kn=ne[se];kn.loc&&(Nt+=`
|
|
2297
2297
|
|
|
@@ -4672,7 +4672,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4672
4672
|
`)===-1,v=s[0]===" "||s[0]===" ",P=s[s.length-1]==='"',x=s[s.length-1]==="\\",T=!h||P||x||p,I="";return !T||h&&v||(I+=`
|
|
4673
4673
|
`+c),I+=c?s.replace(/\n/g,`
|
|
4674
4674
|
`+c):s,T&&(I+=`
|
|
4675
|
-
`),'"""'+I.replace(/"""/g,'\\"""')+'"""'}n.d(e,{W7:()=>r,LZ:()=>o});},143:(t,e,n)=>{n.d(e,{H:()=>c,T:()=>p});var r=n(9763),i=n(5821);function o(h,v){throw new Error(v)}function s(h,v){for(var P=0;P<v.length;P++){var x=v[P];x.enumerable=x.enumerable||false,x.configurable=true,"value"in x&&(x.writable=true),Object.defineProperty(h,x.key,x);}}var c=(function(){function h(x){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof x=="string"||o(0,"Body must be a string. Received: ".concat((0, i.Z)(x),".")),this.body=x,this.name=T,this.locationOffset=I,this.locationOffset.line>0||o(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||o(0,"column in locationOffset is 1-indexed and must be positive.");}var v,P;return v=h,(P=[{key:r.YF,get:function(){return "Source"}}])&&s(v.prototype,P),h})();function p(h){return h instanceof c}},9763:(t,e,n)=>{n.d(e,{YF:()=>r});var r=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";},4147:t=>{t.exports=JSON.parse(`{"name":"@stigg/js-client-sdk","version":"3.68.0","description":"Stigg client-side SDK for Browser","main":"dist/index.js","module":"dist/index.esm.js","typings":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"}},"repository":"https://github.com/stiggio/js-client-sdk.git","license":"MIT","scripts":{"start":"webpack serve","build:types":"tsc --emitDeclarationOnly","build":"yarn build:types && webpack","build:watch":"webpack --watch","build:prod":"yarn build:types && webpack --env production","link-sdk":"yarn build && yarn link","fix":"run-s fix:*","fix:prettier":"prettier \\"src/**/*.ts\\" --write","fix:lint":"eslint src --ext .ts --fix","pretty-quick":"pretty-quick --staged --pattern '**/*.*(js|jsx|ts|tsx)'","test":"jest --silent","test:watch":"jest --watch","test:cov":"jest --coverage","prepare":"husky install","docs":"typedoc"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","@sentry/browser":"^7.11.1","@stigg/api-client-js":"3.123.0","cross-fetch":"^3.1.6","dayjs":"^1.11.13","fetch-retry":"^5.0.6","husky":"^7.0.4","lodash":"^4.17.21","tiny-typed-emitter":"^2.1.0"},"devDependencies":{"@commitlint/cli":"^14.1.0","@commitlint/config-conventional":"^14.1.0","@mswjs/interceptors":"^0.19.2","@types/jest":"^27.0.2","@types/lodash":"^4.14.177","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.3.1","jest-fetch-mock":"^3.0.3","lint-staged":"^12.0.2","msw":"^0.35.0","npm-run-all":"^4.1.5","prettier":"^2.4.1","pretty-quick":"^3.1.3","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typedoc":"^0.22.13","typedoc-plugin-rename-defaults":"^0.4.0","typescript":"^4.5.3","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"publishConfig":{"access":"public"},"lint-staged":{"*.{js,jsx,ts,tsx}":["prettier --check","eslint --cache"]}}`);}},Z1={};function ao(t){var e=Z1[t];if(e!==void 0)return e.exports;var n=Z1[t]={id:t,loaded:false,exports:{}};return
|
|
4675
|
+
`),'"""'+I.replace(/"""/g,'\\"""')+'"""'}n.d(e,{W7:()=>r,LZ:()=>o});},143:(t,e,n)=>{n.d(e,{H:()=>c,T:()=>p});var r=n(9763),i=n(5821);function o(h,v){throw new Error(v)}function s(h,v){for(var P=0;P<v.length;P++){var x=v[P];x.enumerable=x.enumerable||false,x.configurable=true,"value"in x&&(x.writable=true),Object.defineProperty(h,x.key,x);}}var c=(function(){function h(x){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof x=="string"||o(0,"Body must be a string. Received: ".concat((0, i.Z)(x),".")),this.body=x,this.name=T,this.locationOffset=I,this.locationOffset.line>0||o(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||o(0,"column in locationOffset is 1-indexed and must be positive.");}var v,P;return v=h,(P=[{key:r.YF,get:function(){return "Source"}}])&&s(v.prototype,P),h})();function p(h){return h instanceof c}},9763:(t,e,n)=>{n.d(e,{YF:()=>r});var r=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";},4147:t=>{t.exports=JSON.parse(`{"name":"@stigg/js-client-sdk","version":"3.68.0","description":"Stigg client-side SDK for Browser","main":"dist/index.js","module":"dist/index.esm.js","typings":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"}},"repository":"https://github.com/stiggio/js-client-sdk.git","license":"MIT","scripts":{"start":"webpack serve","build:types":"tsc --emitDeclarationOnly","build":"yarn build:types && webpack","build:watch":"webpack --watch","build:prod":"yarn build:types && webpack --env production","link-sdk":"yarn build && yarn link","fix":"run-s fix:*","fix:prettier":"prettier \\"src/**/*.ts\\" --write","fix:lint":"eslint src --ext .ts --fix","pretty-quick":"pretty-quick --staged --pattern '**/*.*(js|jsx|ts|tsx)'","test":"jest --silent","test:watch":"jest --watch","test:cov":"jest --coverage","prepare":"husky install","docs":"typedoc"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","@sentry/browser":"^7.11.1","@stigg/api-client-js":"3.123.0","cross-fetch":"^3.1.6","dayjs":"^1.11.13","fetch-retry":"^5.0.6","husky":"^7.0.4","lodash":"^4.17.21","tiny-typed-emitter":"^2.1.0"},"devDependencies":{"@commitlint/cli":"^14.1.0","@commitlint/config-conventional":"^14.1.0","@mswjs/interceptors":"^0.19.2","@types/jest":"^27.0.2","@types/lodash":"^4.14.177","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.3.1","jest-fetch-mock":"^3.0.3","lint-staged":"^12.0.2","msw":"^0.35.0","npm-run-all":"^4.1.5","prettier":"^2.4.1","pretty-quick":"^3.1.3","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typedoc":"^0.22.13","typedoc-plugin-rename-defaults":"^0.4.0","typescript":"^4.5.3","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"publishConfig":{"access":"public"},"lint-staged":{"*.{js,jsx,ts,tsx}":["prettier --check","eslint --cache"]}}`);}},Z1={};function ao(t){var e=Z1[t];if(e!==void 0)return e.exports;var n=Z1[t]={id:t,loaded:false,exports:{}};return Kk[t].call(n.exports,n,n.exports,ao),n.loaded=true,n.exports}ao.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return ao.d(e,{a:e}),e},ao.d=(t,e)=>{for(var n in e)ao.o(e,n)&&!ao.o(t,n)&&Object.defineProperty(t,n,{enumerable:true,get:e[n]});},ao.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(t){if(typeof window=="object")return window}})(),ao.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:true,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),ao.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),ao.r=t=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:true});},ao.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var z=ao(5078),I$=z.fEx,k$=z.zVd,D$=z.zu7,A$=z.dpb,O$=z.T0E,R$=z.d4U,F$=z.nwm,M$=z.Ijf,Jh=z.v2N,N$=z.Mbo,L$=z.E34,B$=z.Bkk,U$=z.Y92,$$=z.m06,G$=z.bM9,J1=z.sZY,j$=z.PLi,V$=z.yTz,nn=z.FzK,be=z.tvV,kp=z.ugv,z$=z.x3v,H$=z.jAf,W$=z.u4I,q$=z.bEP,Y$=z.weZ,Q$=z.uS8,K$=z.zdd,X$=z.i2A,Z$=z.fc5,J$=z.K79,tG=z.$i2,eG=z.$QI,nG=z.WJn,rG=z.Pzm,iG=z.Q_D,oG=z.lj3,hb=z.bSK,aG=z.Eq9,sG=z.mKD,lG=z._Yx,yi=z.uMJ,cG=z.oiL,Ru=z.Fa6,uG=z.hk_,dG=z.vjn,pG=z._d$,fG=z.NSU,hG=z.Eph,mG=z.g31,gG=z.u9g,yG=z.aqW,bG=z.LBz,vG=z.qYx,CG=z.X$1,SG=z.OoB,PG=z.pDu,xG=z.rpU,EG=z.fYe,_G=z.Pg9,TG=z.GBW,wG=z.vQb,IG=z.yEZ,kG=z.Wky,tm=z.C2e,mb=z.Lbh,tC=z.RCf,DG=z.AVk,AG=z.cUI,Ro=z.XHu,OG=z.cG4,RG=z.JrM,FG=z.bII,MG=z.FT8,NG=z.Pr8,LG=z.IZr,BG=z.$BG,UG=z.Qj0,$G=z.jKp,GG=z.m5b,jG=z.wO5,VG=z.Zr9,zG=z.g3t,HG=z.m72,WG=z.i3Z,qG=z.zOd,YG=z.o_I,QG=z.bWm,KG=z.o5f,XG=z.i4m,ZG=z.sEr,JG=z.GAT,tj=z.iKc,ej=z.Tex,nj=z.XsQ,gb=z.U9t,rj=z.OpC,ij=z.bgy,oj=z.jPD,aj=z.Q$1,sj=z.Cmg,lj=z.$Iz,cj=z.tIq,uj=z.zHr,dj=z.ZeH,pj=z.$Av,fj=z.TpL,hj=z.pWb,mj=z.roX,gj=z.RXg,yj=z._xu,bj=z.RVX,vj=z.Fd7,Cj=z.N9K,Sj=z.do1,Pj=z.hH,xj=z.K0T,Ej=z.p7R,_j=z.E7k,Tj=z.Mal,wj=z.KeG,Ij=z.uMn,kj=z.qBr,Dj=z.DFP,Aj=z.m76,Oj=z.$jJ,Rj=z.B8X,Fj=z.N5j,Mj=z.Us3,Nj=z.isD,Lj=z.nN6,Bj=z.ini,eC=z.VsH,Uj=z.Kyg,$j=z.XY6,yb=z.puT,Gj=z.bGN,jj=z.$Bh,Vj=z.hVT,zj=z.k8_,Hj=z.wn5,Wj=z.lgL,qj=z.VeJ,Yj=z.pSI,nC=z.ctk,Qj=z.gpE,Kj=z.PVi,Xj=z.opi,Zj=z.AQp,Jj=z.Bve,tV=z.zBW,eV=z.LpH,nV=z.q5V,rV=z.BoX,iV=z.zv6,oV=z.RzF,aV=z.iI3,sV=z.jCI,lV=z.OeJ,cV=z.ab2,uV=z.TVs,dV=z.JU,em=z.QdX,pV=z.Kf7,fV=z.LtK,hV=z.r6R,mV=z.fvX,gV=z.r4r,yV=z.FcI,bV=z.qw4,vV=z.Cc7,CV=z.kd9,SV=z.bOA,PV=z.qXR,xV=z.yGq,EV=z.ZD9,_V=z.wEB,TV=z.YGW,wV=z.Chb,Rn=z._HY,IV=z.cMT,kV=z.p_C,DV=z.Ehw,AV=z.JkE,OV=z.ku9,RV=z.$Vq,FV=z.QZw,MV=z.q6C,NV=z.YlF,LV=z.rDA,BV=z.CjA,UV=z.u0j,$V=z.Zam,GV=z.JDz,jV=z.ZSL,VV=z.dO5,zV=z.K5h,HV=z.UK7,WV=z.JyR,qV=z.GHz,YV=z._He,QV=z.nM6,KV=z.zWW,XV=z.xrg,ZV=z.bj8,JV=z.bGH,tz=z.cTO,ez=z.SrV,nz=z.Xm9,rz=z.PO0,iz=z.Yo2,oz=z.ueJ,az=z.w1y,sz=z.c06,lz=z.lS0,cz=z.abb,uz=z.ird,dz=z._oj,pz=z.e1Q,fz=z.Ugm,hz=z.hvo,mz=z.tV1,gz=z.FL0,yz=z.Dxn,bz=z.G6j,vz=z.eSW,Cz=z.DWP,Sz=z.zjf,Pz=z.Eam,xz=z.URA,Ez=z.yBL,_z=z.SQC,Tz=z._q5,wz=z.o88,Iz=z.cUf,Ui=z.YVG,kz=z.J5K,Dz=z.nOi,bi=z.yhH,Az=z.HsO,Oz=z.XqI,Rz=z.wRo,Fz=z.hYU,Mz=z.UAI,ic=z.PNd,Nz=z.N9N,Lz=z.$02,Bz=z.Dc_,Uz=z.bk4,$z=z.p13,Gz=z.mGS,jz=z._gQ,Vz=z.Dfv,zz=z.bd6,Hz=z.eKV,Wz=z.EQD,qz=z.QNm,Yz=z.yaX,Qz=z.X3h,Kz=z.Buv,Xz=z._yy,Zz=z.l3m,Jz=z.FoD,tH=z.O0T,eH=z.yyj,nH=z.rCU,Fu=z.l9N,rH=z.EOH,iH=z.LkV,oH=z.X$v,bb=z.ZPm,aH=z.mKo;var iC={shouldForwardProp:t=>!t.startsWith("$")},oC=t=>rC__default.default(t,iC),Xk=["div","span","button","input","form","p","h1","h2","h3","h4","h5","h6","a","img","ul","ol","li","table","thead","tbody","tr","td","th"];Xk.forEach(t=>{oC[t]=rC__default.default(t,iC);});var Q=oC;function nm(t,e,n){let r=n?` ${n}`:"";return (!t||t===1)&&e?`Up to ${e}${r}`:t&&t>1&&e?`${t}-${e}${r}`:t&&t>1?`Minimum ${t}${r}`:""}function Ya(t){return t==null?void 0:t.toLocaleString("en-US",{maximumFractionDigits:0})}function tD(t,e){let n=t.stigg.palette;switch(e){case "white":return "white";case "primary.main":return n.primary;case "primary.main.light":return n.primaryLight;case "warning":return n.warning;case "error":return n.error;default:return n.text[e]||n.text.primary}}function vb(t,e="body1"){let n=t.stigg.typography,r={h1:n.h1,h3:n.h2,h6:n.h3,body1:n.body,caption:n.caption};return r[e]||r.body1}var eD=Q.div`
|
|
4676
4676
|
margin: 0;
|
|
4677
4677
|
${({$isInline:t})=>t&&"display: inline"};
|
|
4678
4678
|
|
|
@@ -4682,7 +4682,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4682
4682
|
font-weight: ${({$bold:t,theme:e,$variant:n})=>t?"bold":vb(e,n).fontWeight};
|
|
4683
4683
|
font-size: ${({theme:t,$variant:e})=>vb(t,e).fontSize};
|
|
4684
4684
|
${({$lineHeight:t})=>t&&`line-height: ${t};`}
|
|
4685
|
-
`,rt=Bv.forwardRef((t,e)=>{let A=t,{children:n,style:r,variant:i="body1",color:o="primary",overrideColor:s,bold:c=false,as:p,className:h,lineHeight:v}=A,P=On(A,["children","style","variant","color","overrideColor","bold","as","className","lineHeight"]),x=react.useTheme(),T=vb(x,i),I=p||T.semanticElement,R=s||Jk(x,o);return jsxRuntime.jsx(tD,St(W({as:I,ref:e},P),{className:h,style:r,$variant:i,$bold:c,$color:R,$lineHeight:v,$isInline:I==="span",children:n}))});rt.displayName="Typography";var rm=(t,e)=>{switch(t){case "primary":return e.stigg.palette.text.primary;case "secondary":return e.stigg.palette.text.secondary;default:return t}};var Eb={};Q1(Eb,{Add:()=>GC,Addons:()=>sC,ArrowForward:()=>RC,BillingInfoCustomer:()=>cC,Check:()=>NC,Close:()=>MC,ContactSupport:()=>dC,Coupon:()=>UC,CreditCard:()=>fC,DollarCoin:()=>mC,EntitlementCheck:()=>HC,MiniSchedule:()=>im,OutlinedCheckedCircle:()=>DC,OutlinedCheckedCircleDisabled:()=>AC,OutlinedCircle:()=>kC,PayAsYouGoCharge:()=>BC,PaymentMethod:()=>wC,Promotions:()=>bC,Remove:()=>VC,RenewSubscription:()=>EC,Restore:()=>om,ScheduleBox:()=>CC,ScheduleClock:()=>PC,Trash:()=>_C});var nD=t=>jsxRuntime.jsxs("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_834_118930)",children:[jsxRuntime.jsx("path",{d:"M12 6.85712V17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M6.85712 12H17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M18 0.857117H5.99997C3.15966 0.857117 0.857117 3.15966 0.857117 5.99997V18C0.857117 20.8404 3.15966 23.1428 5.99997 23.1428H18C20.8404 23.1428 23.1428 20.8404 23.1428 18V5.99997C23.1428 3.15966 20.8404 0.857117 18 0.857117Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_834_118930",children:jsxRuntime.jsx("rect",{width:24,height:24,fill:"white"})})})]})),sC=nD;var rD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{d:"M26 27V25C26 22.7909 24.2091 21 22 21H14C11.7909 21 10 22.7909 10 25V27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 17C20.2091 17 22 15.2091 22 13C22 10.7909 20.2091 9 18 9C15.7909 9 14 10.7909 14 13C14 15.2091 15.7909 17 18 17Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"paint0_linear_67_8545",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{stopColor:"#56ACF6"}),jsxRuntime.jsx("stop",{offset:1,stopColor:"#1559E6"})]})})]})),cC=rD;var iD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{d:"M27 18.22C27 12.73 22.74 9 18 9C13.31 9 9 12.65 9 18.28C8.4 18.62 8 19.26 8 20V22C8 23.1 8.9 24 10 24H11V17.9C11 14.03 14.13 10.9 18 10.9C21.87 10.9 25 14.03 25 17.9V25H17V27H25C26.1 27 27 26.1 27 25V23.78C27.59 23.47 28 22.86 28 22.14V19.84C28 19.14 27.59 18.53 27 18.22Z",fill:"#7586B0"}),jsxRuntime.jsx("path",{d:"M15 20C15.5523 20 16 19.5523 16 19C16 18.4477 15.5523 18 15 18C14.4477 18 14 18.4477 14 19C14 19.5523 14.4477 20 15 20Z",fill:"#7586B0"}),jsxRuntime.jsx("path",{d:"M21 20C21.5523 20 22 19.5523 22 19C22 18.4477 21.5523 18 21 18C20.4477 18 20 18.4477 20 19C20 19.5523 20.4477 20 21 20Z",fill:"#7586B0"}),jsxRuntime.jsx("path",{d:"M24 17.03C23.52 14.18 21.04 12 18.05 12C15.02 12 11.76 14.51 12.02 18.45C14.49 17.44 16.35 15.24 16.88 12.56C18.19 15.19 20.88 17 24 17.03Z",fill:"#7586B0"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"paint0_linear_267_19310",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{stopColor:"#56ACF6"}),jsxRuntime.jsx("stop",{offset:1,stopColor:"#1559E6"})]})})]})),dC=iD;var oD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{d:"M26 10H10C8.89 10 8.01 10.89 8.01 12L8 24C8 25.11 8.89 26 10 26H26C27.11 26 28 25.11 28 24V12C28 10.89 27.11 10 26 10ZM26 24H10V18H26V24ZM26 14H10V12H26V14Z",fill:"#7586B0"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"paint0_linear_67_8556",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{stopColor:"#56ACF6"}),jsxRuntime.jsx("stop",{offset:1,stopColor:"#1559E6"})]})})]})),fC=oD;var aD=t=>jsxRuntime.jsxs("svg",St(W({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_834_120339)",children:[jsxRuntime.jsx("path",{d:"M10.3336 19.2858C15.462 19.2858 19.6193 15.1285 19.6193 10.0001C19.6193 4.87171 15.462 0.714355 10.3336 0.714355C5.20521 0.714355 1.04785 4.87171 1.04785 10.0001C1.04785 15.1285 5.20521 19.2858 10.3336 19.2858Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M12.7649 7.46052C12.6813 7.22393 12.5523 7.0088 12.3883 6.8256C12.0395 6.43592 11.5327 6.19067 10.9685 6.19067H9.4942C8.55517 6.19067 7.79395 6.9519 7.79395 7.89093C7.79395 8.68995 8.3503 9.38116 9.13086 9.5519L11.3756 10.0429C12.25 10.2342 12.8733 11.0091 12.8733 11.9043C12.8733 12.9562 12.0205 13.8097 10.9685 13.8097H9.6987C8.86936 13.8097 8.16382 13.2797 7.90233 12.5399",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M10.3335 6.19065V4.28589",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M10.3335 15.7144V13.8096",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_834_120339",children:jsxRuntime.jsx("rect",{width:20,height:20,fill:"white",transform:"translate(0.333496)"})})})]})),mC=aD;var sD=t=>jsxRuntime.jsx("svg",St(W({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.95392 1.03353C7.1196 1.56038 6.82682 2.12178 6.29997 2.28746C5.79034 2.44773 5.30237 2.68036 4.85175 2.98146C3.76168 3.70982 2.95789 4.79361 2.57732 6.04817C2.19675 7.30273 2.26296 8.65044 2.76466 9.86166C3.26637 11.0729 4.17252 12.0727 5.32873 12.6907C6.48494 13.3087 7.81967 13.5067 9.10549 13.2509C10.3913 12.9951 11.5487 12.3014 12.3804 11.288C13.2121 10.2746 13.6666 9.00413 13.6666 7.69312C13.6666 7.14083 14.1144 6.69312 14.6666 6.69312C15.2189 6.69312 15.6666 7.14083 15.6666 7.69312C15.6666 7.92228 15.6564 8.15052 15.6361 8.37721C15.6465 8.44937 15.6492 8.52379 15.6432 8.59952L15.6392 8.64883C15.6298 8.75932 15.6028 8.86407 15.5612 8.96057C15.3409 10.2743 14.7807 11.5158 13.9264 12.5568C12.8012 13.9279 11.2353 14.8664 9.49568 15.2125C7.75603 15.5585 5.95022 15.2906 4.38594 14.4545C2.82166 13.6184 1.59568 12.2657 0.916905 10.627C0.238131 8.98832 0.148554 7.16495 0.663439 5.4676C1.17832 3.77025 2.26581 2.30394 3.74061 1.31852C4.35023 0.911179 5.01049 0.596408 5.69999 0.379577C6.22684 0.213898 6.78824 0.506683 6.95392 1.03353ZM7.56761 1.27284C7.61434 0.722538 8.09832 0.314306 8.64863 0.361031L8.69791 0.365373C9.24791 0.415584 9.65307 0.902149 9.60286 1.45215C9.55265 2.00214 9.06608 2.4073 8.51608 2.35709L8.47942 2.35386C7.92912 2.30714 7.52089 1.82315 7.56761 1.27284ZM12.4186 2.90891C12.8384 2.55014 13.4697 2.59967 13.8284 3.01954C13.8498 3.04454 13.871 3.06967 13.892 3.09494C14.2454 3.51937 14.1878 4.14991 13.7634 4.50329C13.339 4.85667 12.7084 4.79906 12.355 4.37463C12.3395 4.35592 12.3238 4.33731 12.3079 4.31879C11.9492 3.89892 11.9987 3.26769 12.4186 2.90891ZM8.99998 5.33352C8.99998 4.78124 8.55226 4.33352 7.99998 4.33352C7.44769 4.33352 6.99998 4.78124 6.99998 5.33352V8.00019C6.99998 8.55247 7.44769 9.00019 7.99998 9.00019H10.6666C11.2189 9.00019 11.6666 8.55247 11.6666 8.00019C11.6666 7.4479 11.2189 7.00019 10.6666 7.00019H8.99998V5.33352Z",fill:"#7586B0"})})),im=sD;var lD=t=>jsxRuntime.jsxs("svg",St(W({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_834_116282)",children:[jsxRuntime.jsx("path",{d:"M21.4286 5.32483H2.57146C1.62469 5.32483 0.857178 6.09235 0.857178 7.03911V10.4677C0.857178 11.4145 1.62469 12.182 2.57146 12.182H21.4286C22.3754 12.182 23.1429 11.4145 23.1429 10.4677V7.03911C23.1429 6.09235 22.3754 5.32483 21.4286 5.32483Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M21.4287 12.182V21.6106C21.4287 22.0652 21.248 22.5013 20.9266 22.8227C20.6051 23.1442 20.169 23.3249 19.7144 23.3249H4.28582C3.83116 23.3249 3.39513 23.1442 3.07363 22.8227C2.75215 22.5013 2.57153 22.0652 2.57153 21.6106V12.182",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M12 5.32483V23.3248",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M17.1429 1.03912L12 5.32484L6.85718 1.03912",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_834_116282",children:jsxRuntime.jsx("rect",{width:24,height:24,fill:"white",transform:"translate(0 0.182007)"})})})]})),bC=lD;var cD=t=>jsxRuntime.jsx("svg",St(W({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M10.8333 2.5C6.69168 2.5 3.33334 5.85833 3.33334 10H0.833344L4.07501 13.2417L4.13334 13.3583L7.50001 10H5.00001C5.00001 6.775 7.60834 4.16667 10.8333 4.16667C14.0583 4.16667 16.6667 6.775 16.6667 10C16.6667 13.225 14.0583 15.8333 10.8333 15.8333C9.22501 15.8333 7.76668 15.175 6.71668 14.1167L5.53334 15.3C6.89168 16.6583 8.75834 17.5 10.8333 17.5C14.975 17.5 18.3333 14.1417 18.3333 10C18.3333 5.85833 14.975 2.5 10.8333 2.5ZM10 6.66667V10.8333L13.5667 12.95L14.1667 11.9417L11.25 10.2083V6.66667H10Z",fill:"#6678A7"})})),om=cD;var uD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"url(#paint0_linear_834_118583)"}),jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9539 7.70028C16.1196 8.22713 15.8268 8.78853 15.3 8.95421C14.4906 9.20875 13.7155 9.57824 12.9999 10.0564C11.2686 11.2132 9.99197 12.9346 9.38754 14.9271C8.78311 16.9196 8.88826 19.0601 9.68509 20.9838C10.4819 22.9075 11.9211 24.4954 13.7574 25.477C15.5938 26.4585 17.7136 26.7729 19.7558 26.3667C21.798 25.9605 23.6362 24.8588 24.9571 23.2492C26.278 21.6396 27 19.6219 27 17.5397C27 16.9874 27.4477 16.5397 28 16.5397C28.5523 16.5397 29 16.9874 29 17.5397C29 17.8969 28.9826 18.2526 28.9483 18.6056C28.9662 18.6949 28.9722 18.7883 28.9645 18.8837L28.9606 18.9309C28.9496 19.0607 28.9143 19.1825 28.8595 19.2924C28.5513 21.2017 27.7432 23.007 26.5031 24.518C24.8886 26.4852 22.642 27.8318 20.146 28.3283C17.65 28.8248 15.059 28.4405 12.8146 27.2408C10.5702 26.0411 8.81122 24.1004 7.83733 21.7492C6.86343 19.398 6.73491 16.7819 7.47366 14.3465C8.21241 11.9112 9.77272 9.80737 11.8887 8.3935C12.7634 7.80905 13.7107 7.35743 14.7 7.04633C15.2269 6.88065 15.7883 7.17343 15.9539 7.70028ZM17.8497 7.95155C17.8964 7.40125 18.3804 6.99302 18.9307 7.03974L18.9779 7.04385C19.528 7.0929 19.9342 7.57861 19.8851 8.12871C19.8361 8.67881 19.3503 9.085 18.8002 9.03595L18.7615 9.03257C18.2112 8.98585 17.8029 8.50186 17.8497 7.95155ZM22.8579 9.19953C23.172 8.74525 23.7949 8.63161 24.2492 8.9457C24.2751 8.96361 24.3009 8.98162 24.3266 8.99974C24.7782 9.31772 24.8865 9.94155 24.5685 10.3931C24.2505 10.8447 23.6267 10.953 23.1751 10.635C23.1541 10.6202 23.1329 10.6054 23.1118 10.5908C22.6575 10.2767 22.5438 9.6538 22.8579 9.19953ZM26.6058 12.8085C27.1045 12.5712 27.7011 12.7831 27.9384 13.2818C27.9519 13.3102 27.9653 13.3387 27.9786 13.3672C28.2116 13.868 27.9946 14.4628 27.4939 14.6958C26.9931 14.9288 26.3983 14.7117 26.1653 14.211L26.1506 14.1796L26.1324 14.1411C25.8951 13.6424 26.1071 13.0458 26.6058 12.8085ZM19 14.0003C19 13.448 18.5523 13.0003 18 13.0003C17.4477 13.0003 17 13.448 17 14.0003V18.0003C17 18.5526 17.4477 19.0003 18 19.0003H22C22.5523 19.0003 23 18.5526 23 18.0003C23 17.448 22.5523 17.0003 22 17.0003H19V14.0003Z",fill:"#7586B0"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("linearGradient",{id:"paint0_linear_834_118583",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"})})]})),CC=uD;var pD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.95394 1.70028C10.1196 2.22713 9.82684 2.78853 9.29999 2.95421C8.49057 3.20875 7.71555 3.57824 6.99987 4.05644C5.26859 5.21324 3.99197 6.93456 3.38754 8.9271C2.78311 10.9196 2.88826 13.0601 3.68509 14.9838C4.48191 16.9075 5.9211 18.4954 7.75743 19.477C9.59377 20.4585 11.7136 20.7729 13.7558 20.3667C15.798 19.9605 17.6362 18.8588 18.9571 17.2492C20.278 15.6396 21 13.6219 21 11.5397C21 10.9874 21.4477 10.5397 22 10.5397C22.5523 10.5397 23 10.9874 23 11.5397C23 11.8969 22.9826 12.2526 22.9483 12.6056C22.9662 12.6949 22.9722 12.7883 22.9645 12.8837L22.9606 12.9309C22.9496 13.0607 22.9143 13.1825 22.8595 13.2924C22.5513 15.2017 21.7432 17.007 20.5031 18.518C18.8886 20.4852 16.642 21.8318 14.146 22.3283C11.65 22.8248 9.05905 22.4405 6.81464 21.2408C4.57023 20.0411 2.81122 18.1004 1.83733 15.7492C0.863434 13.398 0.734911 10.7819 1.47366 8.34653C2.21241 5.91121 3.77272 3.80737 5.88873 2.3935C6.76341 1.80905 7.71072 1.35743 8.70001 1.04633C9.22686 0.880646 9.78826 1.17343 9.95394 1.70028ZM11.8497 1.95155C11.8964 1.40125 12.3804 0.993017 12.9307 1.03974L12.9779 1.04385C13.528 1.0929 13.9342 1.57861 13.8851 2.12871C13.8361 2.67881 13.3503 3.085 12.8002 3.03595L12.7615 3.03257C12.2112 2.98585 11.8029 2.50186 11.8497 1.95155ZM16.8579 3.19953C17.172 2.74525 17.7949 2.63161 18.2492 2.9457C18.2751 2.96361 18.3009 2.98162 18.3266 2.99974C18.7782 3.31772 18.8865 3.94155 18.5685 4.39311C18.2505 4.84467 17.6267 4.95296 17.1751 4.63498C17.1541 4.62016 17.1329 4.60542 17.1118 4.59078C16.6575 4.27669 16.5438 3.6538 16.8579 3.19953ZM20.6058 6.80846C21.1045 6.57117 21.7011 6.78308 21.9384 7.28179C21.9519 7.3102 21.9653 7.33869 21.9786 7.36723C22.2116 7.86796 21.9946 8.46276 21.4939 8.69577C20.9931 8.92877 20.3983 8.71174 20.1653 8.21101L20.1506 8.17957L20.1324 8.14112C19.8951 7.64241 20.1071 7.04576 20.6058 6.80846ZM13 8.00027C13 7.44798 12.5523 7.00027 12 7.00027C11.4477 7.00027 11 7.44798 11 8.00027V12.0003C11 12.5526 11.4477 13.0003 12 13.0003H16C16.5523 13.0003 17 12.5526 17 12.0003C17 11.448 16.5523 11.0003 16 11.0003H13V8.00027Z",fill:"#7586B0"})})),PC=pD;var fD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 10.8954 9.89543 10 11 10H25C26.1046 10 27 10.8954 27 12V26C27 27.1046 26.1046 28 25 28H11C9.89543 28 9 27.1046 9 26V12Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M22 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M14 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M9 16H27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"paint0_linear_45_8861",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{stopColor:"#56ACF6"}),jsxRuntime.jsx("stop",{offset:1,stopColor:"#1559E6"})]})})]})),EC=fD;var hD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"trash-2",children:[jsxRuntime.jsx("path",{id:"Shape",d:"M3 6H5H21",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{id:"Shape_2",d:"M20 6C20 5.44772 19.5523 5 19 5C18.4477 5 18 5.44772 18 6H20ZM6 6C6 5.44772 5.55228 5 5 5C4.44772 5 4 5.44772 4 6H6ZM7 6C7 6.55228 7.44772 7 8 7C8.55228 7 9 6.55228 9 6H7ZM15 6C15 6.55228 15.4477 7 16 7C16.5523 7 17 6.55228 17 6H15ZM18 6V20H20V6H18ZM18 20C18 20.5523 17.5523 21 17 21V23C18.6569 23 20 21.6569 20 20H18ZM17 21H7V23H17V21ZM7 21C6.44772 21 6 20.5523 6 20H4C4 21.6569 5.34315 23 7 23V21ZM6 20V6H4V20H6ZM9 6V4H7V6H9ZM9 4C9 3.44772 9.44772 3 10 3V1C8.34315 1 7 2.34315 7 4H9ZM10 3H14V1H10V3ZM14 3C14.5523 3 15 3.44772 15 4H17C17 2.34315 15.6569 1 14 1V3ZM15 4V6H17V4H15Z",fill:"#F88078"}),jsxRuntime.jsx("path",{id:"Shape_3",d:"M10 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{id:"Shape_4",d:"M14 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})})),_C=hD;var gD=t=>jsxRuntime.jsxs("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("path",{d:"M21.1667 4H2.83333C1.82081 4 1 4.89543 1 6V18C1 19.1046 1.82081 20 2.83333 20H21.1667C22.1792 20 23 19.1046 23 18V6C23 4.89543 22.1792 4 21.1667 4Z",fill:"#C6C6C7"}),jsxRuntime.jsx("path",{opacity:.3,d:"M19.75 16.4286H17.5C17.0125 16.4286 16.75 16.2 16.75 15.6667C16.75 15.1334 17.0125 14.9048 17.5 14.9048H19.75C20.2375 14.9048 20.5 15.1334 20.5 15.6667C20.5 16.2 20.2375 16.4286 19.75 16.4286ZM15.25 16.4286H13C12.5125 16.4286 12.25 16.2 12.25 15.6667C12.25 15.1334 12.5125 14.9048 13 14.9048H15.25C15.7375 14.9048 16 15.1334 16 15.6667C16 16.2 15.7375 16.4286 15.25 16.4286ZM10.75 16.4286H8.5C8.0125 16.4286 7.75 16.2 7.75 15.6667C7.75 15.1334 8.0125 14.9048 8.5 14.9048H10.75C11.2375 14.9048 11.5 15.1334 11.5 15.6667C11.5 16.2 11.2375 16.4286 10.75 16.4286ZM6.25 16.4286H4C3.5125 16.4286 3.25 16.2 3.25 15.6667C3.25 15.1334 3.5125 14.9048 4 14.9048H6.25C6.7375 14.9048 7 15.1334 7 15.6667C7 16.2 6.7375 16.4286 6.25 16.4286Z",fill:"black"})]})),wC=gD;var bD=t=>jsxRuntime.jsx("svg",St(W({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("circle",{cx:10.333,cy:10,r:9,fill:"white",stroke:"#327EEE",strokeWidth:2})})),kC=bD;var vD=t=>jsxRuntime.jsx("svg",St(W({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"Group 16159",children:[jsxRuntime.jsx("circle",{id:"Ellipse 5",cx:10,cy:10,r:9.25,fill:"#327EEE",stroke:"#327EEE",strokeWidth:1.5}),jsxRuntime.jsx("path",{id:"Shape",d:"M5 10.3636L8.63667 14L12.637 10L14.6372 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})})),DC=vD;var SD=t=>jsxRuntime.jsx("svg",St(W({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"Stepper indicators",children:[jsxRuntime.jsx("circle",{id:"Ellipse 5",cx:10.667,cy:10,r:9.25,fill:"#B3BCD3",stroke:"#B3BCD3",strokeWidth:1.5}),jsxRuntime.jsx("path",{id:"Shape",d:"M5.66699 10.3636L9.30366 14L13.304 10L15.3042 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})})),AC=SD;var xD=t=>jsxRuntime.jsx("svg",St(W({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M9 3L7.9425 4.0575L12.1275 8.25H3V9.75H12.1275L7.9425 13.9425L9 15L15 9L9 3Z",fill:"white"})})),RC=xD;var ED=t=>jsxRuntime.jsx("svg",St(W({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M15.8337 5.34199L14.6587 4.16699L10.0003 8.82533L5.34199 4.16699L4.16699 5.34199L8.82533 10.0003L4.16699 14.6587L5.34199 15.8337L10.0003 11.1753L14.6587 15.8337L15.8337 14.6587L11.1753 10.0003L15.8337 5.34199Z",fill:"#327EEE"})})),MC=ED;var _D=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("g",{id:"check",children:jsxRuntime.jsx("path",{id:"Shape",d:"M20 7L9 18L4 13",stroke:"#F5F6F9",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})})),NC=_D;var TD=t=>jsxRuntime.jsxs("svg",St(W({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_1889_12169)",children:[jsxRuntime.jsx("path",{d:"M11.4286 7.42578L8 13.1401",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M14.857 13.1412C15.3274 12.0123 15.5118 10.7848 15.3938 9.56751C15.2758 8.35027 14.8592 7.18097 14.1808 6.16341C13.5024 5.14585 12.5833 4.31152 11.5051 3.73446C10.4268 3.1574 9.22281 2.85547 7.99986 2.85547C6.77691 2.85547 5.57288 3.1574 4.49463 3.73446C3.41639 4.31152 2.49729 5.14585 1.81892 6.16341C1.14055 7.18097 0.723889 8.35027 0.605928 9.56751C0.487968 10.7848 0.672354 12.0123 1.14272 13.1412H14.857Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_1889_12169",children:jsxRuntime.jsx("rect",{width:16,height:16,fill:"white"})})})]})),BC=TD;var wD=t=>jsxRuntime.jsx("svg",St(W({width:16,height:16,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"tag--tags-bookmark-favorite",children:[jsxRuntime.jsx("path",{id:"Vector",d:"M1.26995 11.9426L6.05743 16.7301C6.2305 16.903 6.4651 17.0001 6.7097 17.0001C6.95431 17.0001 7.18891 16.903 7.36198 16.7301L16.8631 7.22895C16.9108 7.18332 16.9478 7.12758 16.9712 7.06583C16.9946 7.00408 17.0039 6.93787 16.9985 6.87205L16.2724 2.15839C16.2664 2.04607 16.2192 1.93992 16.1396 1.86038C16.0601 1.78085 15.9539 1.73357 15.8416 1.72764L11.128 1.00152C11.0622 0.996055 10.9959 1.00538 10.9342 1.0288C10.8724 1.05222 10.8167 1.08916 10.7711 1.1369L1.26995 10.638C1.09709 10.8111 1 11.0457 1 11.2903C1 11.5349 1.09709 11.7695 1.26995 11.9426Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{id:"Vector_2",d:"M12.5548 6.05884C12.3916 6.05884 12.2351 5.99401 12.1197 5.87861C12.0043 5.76321 11.9395 5.60669 11.9395 5.44348C11.9395 5.28028 12.0043 5.12376 12.1197 5.00836C12.2351 4.89296 12.3916 4.82812 12.5548 4.82812C12.718 4.82812 12.8745 4.89296 12.9899 5.00836C13.1053 5.12376 13.1702 5.28028 13.1702 5.44348C13.1702 5.60669 13.1053 5.76321 12.9899 5.87861C12.8745 5.99401 12.718 6.05884 12.5548 6.05884Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})})),UC=wD;var kD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M12 3V21.0001M3 11.9446H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})),GC=kD;var DD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M3 12H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})),VC=DD;var AD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M3 11.1429L9.71572 17.8586C9.79383 17.9367 9.92046 17.9367 9.99856 17.8586L21.8571 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})})),HC=AD;var RD=Q.div`
|
|
4685
|
+
`,rt=Bv.forwardRef((t,e)=>{let A=t,{children:n,style:r,variant:i="body1",color:o="primary",overrideColor:s,bold:c=false,as:p,className:h,lineHeight:v}=A,P=On(A,["children","style","variant","color","overrideColor","bold","as","className","lineHeight"]),x=react.useTheme(),T=vb(x,i),I=p||T.semanticElement,R=s||tD(x,o);return jsxRuntime.jsx(eD,St(W({as:I,ref:e},P),{className:h,style:r,$variant:i,$bold:c,$color:R,$lineHeight:v,$isInline:I==="span",children:n}))});rt.displayName="Typography";var rm=(t,e)=>{switch(t){case "primary":return e.stigg.palette.text.primary;case "secondary":return e.stigg.palette.text.secondary;default:return t}};var Eb={};Q1(Eb,{Add:()=>GC,Addons:()=>sC,ArrowForward:()=>RC,BillingInfoCustomer:()=>cC,Check:()=>NC,Close:()=>MC,ContactSupport:()=>dC,Coupon:()=>UC,CreditCard:()=>fC,DollarCoin:()=>mC,EntitlementCheck:()=>HC,MiniSchedule:()=>im,OutlinedCheckedCircle:()=>DC,OutlinedCheckedCircleDisabled:()=>AC,OutlinedCircle:()=>kC,PayAsYouGoCharge:()=>BC,PaymentMethod:()=>wC,Promotions:()=>bC,Remove:()=>VC,RenewSubscription:()=>EC,Restore:()=>om,ScheduleBox:()=>CC,ScheduleClock:()=>PC,Trash:()=>_C});var rD=t=>jsxRuntime.jsxs("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_834_118930)",children:[jsxRuntime.jsx("path",{d:"M12 6.85712V17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M6.85712 12H17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M18 0.857117H5.99997C3.15966 0.857117 0.857117 3.15966 0.857117 5.99997V18C0.857117 20.8404 3.15966 23.1428 5.99997 23.1428H18C20.8404 23.1428 23.1428 20.8404 23.1428 18V5.99997C23.1428 3.15966 20.8404 0.857117 18 0.857117Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_834_118930",children:jsxRuntime.jsx("rect",{width:24,height:24,fill:"white"})})})]})),sC=rD;var iD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{d:"M26 27V25C26 22.7909 24.2091 21 22 21H14C11.7909 21 10 22.7909 10 25V27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 17C20.2091 17 22 15.2091 22 13C22 10.7909 20.2091 9 18 9C15.7909 9 14 10.7909 14 13C14 15.2091 15.7909 17 18 17Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"paint0_linear_67_8545",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{stopColor:"#56ACF6"}),jsxRuntime.jsx("stop",{offset:1,stopColor:"#1559E6"})]})})]})),cC=iD;var oD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{d:"M27 18.22C27 12.73 22.74 9 18 9C13.31 9 9 12.65 9 18.28C8.4 18.62 8 19.26 8 20V22C8 23.1 8.9 24 10 24H11V17.9C11 14.03 14.13 10.9 18 10.9C21.87 10.9 25 14.03 25 17.9V25H17V27H25C26.1 27 27 26.1 27 25V23.78C27.59 23.47 28 22.86 28 22.14V19.84C28 19.14 27.59 18.53 27 18.22Z",fill:"#7586B0"}),jsxRuntime.jsx("path",{d:"M15 20C15.5523 20 16 19.5523 16 19C16 18.4477 15.5523 18 15 18C14.4477 18 14 18.4477 14 19C14 19.5523 14.4477 20 15 20Z",fill:"#7586B0"}),jsxRuntime.jsx("path",{d:"M21 20C21.5523 20 22 19.5523 22 19C22 18.4477 21.5523 18 21 18C20.4477 18 20 18.4477 20 19C20 19.5523 20.4477 20 21 20Z",fill:"#7586B0"}),jsxRuntime.jsx("path",{d:"M24 17.03C23.52 14.18 21.04 12 18.05 12C15.02 12 11.76 14.51 12.02 18.45C14.49 17.44 16.35 15.24 16.88 12.56C18.19 15.19 20.88 17 24 17.03Z",fill:"#7586B0"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"paint0_linear_267_19310",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{stopColor:"#56ACF6"}),jsxRuntime.jsx("stop",{offset:1,stopColor:"#1559E6"})]})})]})),dC=oD;var aD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{d:"M26 10H10C8.89 10 8.01 10.89 8.01 12L8 24C8 25.11 8.89 26 10 26H26C27.11 26 28 25.11 28 24V12C28 10.89 27.11 10 26 10ZM26 24H10V18H26V24ZM26 14H10V12H26V14Z",fill:"#7586B0"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"paint0_linear_67_8556",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{stopColor:"#56ACF6"}),jsxRuntime.jsx("stop",{offset:1,stopColor:"#1559E6"})]})})]})),fC=aD;var sD=t=>jsxRuntime.jsxs("svg",St(W({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_834_120339)",children:[jsxRuntime.jsx("path",{d:"M10.3336 19.2858C15.462 19.2858 19.6193 15.1285 19.6193 10.0001C19.6193 4.87171 15.462 0.714355 10.3336 0.714355C5.20521 0.714355 1.04785 4.87171 1.04785 10.0001C1.04785 15.1285 5.20521 19.2858 10.3336 19.2858Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M12.7649 7.46052C12.6813 7.22393 12.5523 7.0088 12.3883 6.8256C12.0395 6.43592 11.5327 6.19067 10.9685 6.19067H9.4942C8.55517 6.19067 7.79395 6.9519 7.79395 7.89093C7.79395 8.68995 8.3503 9.38116 9.13086 9.5519L11.3756 10.0429C12.25 10.2342 12.8733 11.0091 12.8733 11.9043C12.8733 12.9562 12.0205 13.8097 10.9685 13.8097H9.6987C8.86936 13.8097 8.16382 13.2797 7.90233 12.5399",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M10.3335 6.19065V4.28589",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M10.3335 15.7144V13.8096",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_834_120339",children:jsxRuntime.jsx("rect",{width:20,height:20,fill:"white",transform:"translate(0.333496)"})})})]})),mC=sD;var lD=t=>jsxRuntime.jsx("svg",St(W({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.95392 1.03353C7.1196 1.56038 6.82682 2.12178 6.29997 2.28746C5.79034 2.44773 5.30237 2.68036 4.85175 2.98146C3.76168 3.70982 2.95789 4.79361 2.57732 6.04817C2.19675 7.30273 2.26296 8.65044 2.76466 9.86166C3.26637 11.0729 4.17252 12.0727 5.32873 12.6907C6.48494 13.3087 7.81967 13.5067 9.10549 13.2509C10.3913 12.9951 11.5487 12.3014 12.3804 11.288C13.2121 10.2746 13.6666 9.00413 13.6666 7.69312C13.6666 7.14083 14.1144 6.69312 14.6666 6.69312C15.2189 6.69312 15.6666 7.14083 15.6666 7.69312C15.6666 7.92228 15.6564 8.15052 15.6361 8.37721C15.6465 8.44937 15.6492 8.52379 15.6432 8.59952L15.6392 8.64883C15.6298 8.75932 15.6028 8.86407 15.5612 8.96057C15.3409 10.2743 14.7807 11.5158 13.9264 12.5568C12.8012 13.9279 11.2353 14.8664 9.49568 15.2125C7.75603 15.5585 5.95022 15.2906 4.38594 14.4545C2.82166 13.6184 1.59568 12.2657 0.916905 10.627C0.238131 8.98832 0.148554 7.16495 0.663439 5.4676C1.17832 3.77025 2.26581 2.30394 3.74061 1.31852C4.35023 0.911179 5.01049 0.596408 5.69999 0.379577C6.22684 0.213898 6.78824 0.506683 6.95392 1.03353ZM7.56761 1.27284C7.61434 0.722538 8.09832 0.314306 8.64863 0.361031L8.69791 0.365373C9.24791 0.415584 9.65307 0.902149 9.60286 1.45215C9.55265 2.00214 9.06608 2.4073 8.51608 2.35709L8.47942 2.35386C7.92912 2.30714 7.52089 1.82315 7.56761 1.27284ZM12.4186 2.90891C12.8384 2.55014 13.4697 2.59967 13.8284 3.01954C13.8498 3.04454 13.871 3.06967 13.892 3.09494C14.2454 3.51937 14.1878 4.14991 13.7634 4.50329C13.339 4.85667 12.7084 4.79906 12.355 4.37463C12.3395 4.35592 12.3238 4.33731 12.3079 4.31879C11.9492 3.89892 11.9987 3.26769 12.4186 2.90891ZM8.99998 5.33352C8.99998 4.78124 8.55226 4.33352 7.99998 4.33352C7.44769 4.33352 6.99998 4.78124 6.99998 5.33352V8.00019C6.99998 8.55247 7.44769 9.00019 7.99998 9.00019H10.6666C11.2189 9.00019 11.6666 8.55247 11.6666 8.00019C11.6666 7.4479 11.2189 7.00019 10.6666 7.00019H8.99998V5.33352Z",fill:"#7586B0"})})),im=lD;var cD=t=>jsxRuntime.jsxs("svg",St(W({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_834_116282)",children:[jsxRuntime.jsx("path",{d:"M21.4286 5.32483H2.57146C1.62469 5.32483 0.857178 6.09235 0.857178 7.03911V10.4677C0.857178 11.4145 1.62469 12.182 2.57146 12.182H21.4286C22.3754 12.182 23.1429 11.4145 23.1429 10.4677V7.03911C23.1429 6.09235 22.3754 5.32483 21.4286 5.32483Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M21.4287 12.182V21.6106C21.4287 22.0652 21.248 22.5013 20.9266 22.8227C20.6051 23.1442 20.169 23.3249 19.7144 23.3249H4.28582C3.83116 23.3249 3.39513 23.1442 3.07363 22.8227C2.75215 22.5013 2.57153 22.0652 2.57153 21.6106V12.182",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M12 5.32483V23.3248",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M17.1429 1.03912L12 5.32484L6.85718 1.03912",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_834_116282",children:jsxRuntime.jsx("rect",{width:24,height:24,fill:"white",transform:"translate(0 0.182007)"})})})]})),bC=cD;var uD=t=>jsxRuntime.jsx("svg",St(W({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M10.8333 2.5C6.69168 2.5 3.33334 5.85833 3.33334 10H0.833344L4.07501 13.2417L4.13334 13.3583L7.50001 10H5.00001C5.00001 6.775 7.60834 4.16667 10.8333 4.16667C14.0583 4.16667 16.6667 6.775 16.6667 10C16.6667 13.225 14.0583 15.8333 10.8333 15.8333C9.22501 15.8333 7.76668 15.175 6.71668 14.1167L5.53334 15.3C6.89168 16.6583 8.75834 17.5 10.8333 17.5C14.975 17.5 18.3333 14.1417 18.3333 10C18.3333 5.85833 14.975 2.5 10.8333 2.5ZM10 6.66667V10.8333L13.5667 12.95L14.1667 11.9417L11.25 10.2083V6.66667H10Z",fill:"#6678A7"})})),om=uD;var dD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"url(#paint0_linear_834_118583)"}),jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9539 7.70028C16.1196 8.22713 15.8268 8.78853 15.3 8.95421C14.4906 9.20875 13.7155 9.57824 12.9999 10.0564C11.2686 11.2132 9.99197 12.9346 9.38754 14.9271C8.78311 16.9196 8.88826 19.0601 9.68509 20.9838C10.4819 22.9075 11.9211 24.4954 13.7574 25.477C15.5938 26.4585 17.7136 26.7729 19.7558 26.3667C21.798 25.9605 23.6362 24.8588 24.9571 23.2492C26.278 21.6396 27 19.6219 27 17.5397C27 16.9874 27.4477 16.5397 28 16.5397C28.5523 16.5397 29 16.9874 29 17.5397C29 17.8969 28.9826 18.2526 28.9483 18.6056C28.9662 18.6949 28.9722 18.7883 28.9645 18.8837L28.9606 18.9309C28.9496 19.0607 28.9143 19.1825 28.8595 19.2924C28.5513 21.2017 27.7432 23.007 26.5031 24.518C24.8886 26.4852 22.642 27.8318 20.146 28.3283C17.65 28.8248 15.059 28.4405 12.8146 27.2408C10.5702 26.0411 8.81122 24.1004 7.83733 21.7492C6.86343 19.398 6.73491 16.7819 7.47366 14.3465C8.21241 11.9112 9.77272 9.80737 11.8887 8.3935C12.7634 7.80905 13.7107 7.35743 14.7 7.04633C15.2269 6.88065 15.7883 7.17343 15.9539 7.70028ZM17.8497 7.95155C17.8964 7.40125 18.3804 6.99302 18.9307 7.03974L18.9779 7.04385C19.528 7.0929 19.9342 7.57861 19.8851 8.12871C19.8361 8.67881 19.3503 9.085 18.8002 9.03595L18.7615 9.03257C18.2112 8.98585 17.8029 8.50186 17.8497 7.95155ZM22.8579 9.19953C23.172 8.74525 23.7949 8.63161 24.2492 8.9457C24.2751 8.96361 24.3009 8.98162 24.3266 8.99974C24.7782 9.31772 24.8865 9.94155 24.5685 10.3931C24.2505 10.8447 23.6267 10.953 23.1751 10.635C23.1541 10.6202 23.1329 10.6054 23.1118 10.5908C22.6575 10.2767 22.5438 9.6538 22.8579 9.19953ZM26.6058 12.8085C27.1045 12.5712 27.7011 12.7831 27.9384 13.2818C27.9519 13.3102 27.9653 13.3387 27.9786 13.3672C28.2116 13.868 27.9946 14.4628 27.4939 14.6958C26.9931 14.9288 26.3983 14.7117 26.1653 14.211L26.1506 14.1796L26.1324 14.1411C25.8951 13.6424 26.1071 13.0458 26.6058 12.8085ZM19 14.0003C19 13.448 18.5523 13.0003 18 13.0003C17.4477 13.0003 17 13.448 17 14.0003V18.0003C17 18.5526 17.4477 19.0003 18 19.0003H22C22.5523 19.0003 23 18.5526 23 18.0003C23 17.448 22.5523 17.0003 22 17.0003H19V14.0003Z",fill:"#7586B0"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("linearGradient",{id:"paint0_linear_834_118583",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"})})]})),CC=dD;var fD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.95394 1.70028C10.1196 2.22713 9.82684 2.78853 9.29999 2.95421C8.49057 3.20875 7.71555 3.57824 6.99987 4.05644C5.26859 5.21324 3.99197 6.93456 3.38754 8.9271C2.78311 10.9196 2.88826 13.0601 3.68509 14.9838C4.48191 16.9075 5.9211 18.4954 7.75743 19.477C9.59377 20.4585 11.7136 20.7729 13.7558 20.3667C15.798 19.9605 17.6362 18.8588 18.9571 17.2492C20.278 15.6396 21 13.6219 21 11.5397C21 10.9874 21.4477 10.5397 22 10.5397C22.5523 10.5397 23 10.9874 23 11.5397C23 11.8969 22.9826 12.2526 22.9483 12.6056C22.9662 12.6949 22.9722 12.7883 22.9645 12.8837L22.9606 12.9309C22.9496 13.0607 22.9143 13.1825 22.8595 13.2924C22.5513 15.2017 21.7432 17.007 20.5031 18.518C18.8886 20.4852 16.642 21.8318 14.146 22.3283C11.65 22.8248 9.05905 22.4405 6.81464 21.2408C4.57023 20.0411 2.81122 18.1004 1.83733 15.7492C0.863434 13.398 0.734911 10.7819 1.47366 8.34653C2.21241 5.91121 3.77272 3.80737 5.88873 2.3935C6.76341 1.80905 7.71072 1.35743 8.70001 1.04633C9.22686 0.880646 9.78826 1.17343 9.95394 1.70028ZM11.8497 1.95155C11.8964 1.40125 12.3804 0.993017 12.9307 1.03974L12.9779 1.04385C13.528 1.0929 13.9342 1.57861 13.8851 2.12871C13.8361 2.67881 13.3503 3.085 12.8002 3.03595L12.7615 3.03257C12.2112 2.98585 11.8029 2.50186 11.8497 1.95155ZM16.8579 3.19953C17.172 2.74525 17.7949 2.63161 18.2492 2.9457C18.2751 2.96361 18.3009 2.98162 18.3266 2.99974C18.7782 3.31772 18.8865 3.94155 18.5685 4.39311C18.2505 4.84467 17.6267 4.95296 17.1751 4.63498C17.1541 4.62016 17.1329 4.60542 17.1118 4.59078C16.6575 4.27669 16.5438 3.6538 16.8579 3.19953ZM20.6058 6.80846C21.1045 6.57117 21.7011 6.78308 21.9384 7.28179C21.9519 7.3102 21.9653 7.33869 21.9786 7.36723C22.2116 7.86796 21.9946 8.46276 21.4939 8.69577C20.9931 8.92877 20.3983 8.71174 20.1653 8.21101L20.1506 8.17957L20.1324 8.14112C19.8951 7.64241 20.1071 7.04576 20.6058 6.80846ZM13 8.00027C13 7.44798 12.5523 7.00027 12 7.00027C11.4477 7.00027 11 7.44798 11 8.00027V12.0003C11 12.5526 11.4477 13.0003 12 13.0003H16C16.5523 13.0003 17 12.5526 17 12.0003C17 11.448 16.5523 11.0003 16 11.0003H13V8.00027Z",fill:"#7586B0"})})),PC=fD;var hD=t=>jsxRuntime.jsxs("svg",St(W({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 10.8954 9.89543 10 11 10H25C26.1046 10 27 10.8954 27 12V26C27 27.1046 26.1046 28 25 28H11C9.89543 28 9 27.1046 9 26V12Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M22 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M14 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M9 16H27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"paint0_linear_45_8861",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse",children:[jsxRuntime.jsx("stop",{stopColor:"#56ACF6"}),jsxRuntime.jsx("stop",{offset:1,stopColor:"#1559E6"})]})})]})),EC=hD;var mD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"trash-2",children:[jsxRuntime.jsx("path",{id:"Shape",d:"M3 6H5H21",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{id:"Shape_2",d:"M20 6C20 5.44772 19.5523 5 19 5C18.4477 5 18 5.44772 18 6H20ZM6 6C6 5.44772 5.55228 5 5 5C4.44772 5 4 5.44772 4 6H6ZM7 6C7 6.55228 7.44772 7 8 7C8.55228 7 9 6.55228 9 6H7ZM15 6C15 6.55228 15.4477 7 16 7C16.5523 7 17 6.55228 17 6H15ZM18 6V20H20V6H18ZM18 20C18 20.5523 17.5523 21 17 21V23C18.6569 23 20 21.6569 20 20H18ZM17 21H7V23H17V21ZM7 21C6.44772 21 6 20.5523 6 20H4C4 21.6569 5.34315 23 7 23V21ZM6 20V6H4V20H6ZM9 6V4H7V6H9ZM9 4C9 3.44772 9.44772 3 10 3V1C8.34315 1 7 2.34315 7 4H9ZM10 3H14V1H10V3ZM14 3C14.5523 3 15 3.44772 15 4H17C17 2.34315 15.6569 1 14 1V3ZM15 4V6H17V4H15Z",fill:"#F88078"}),jsxRuntime.jsx("path",{id:"Shape_3",d:"M10 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{id:"Shape_4",d:"M14 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})})),_C=mD;var yD=t=>jsxRuntime.jsxs("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("path",{d:"M21.1667 4H2.83333C1.82081 4 1 4.89543 1 6V18C1 19.1046 1.82081 20 2.83333 20H21.1667C22.1792 20 23 19.1046 23 18V6C23 4.89543 22.1792 4 21.1667 4Z",fill:"#C6C6C7"}),jsxRuntime.jsx("path",{opacity:.3,d:"M19.75 16.4286H17.5C17.0125 16.4286 16.75 16.2 16.75 15.6667C16.75 15.1334 17.0125 14.9048 17.5 14.9048H19.75C20.2375 14.9048 20.5 15.1334 20.5 15.6667C20.5 16.2 20.2375 16.4286 19.75 16.4286ZM15.25 16.4286H13C12.5125 16.4286 12.25 16.2 12.25 15.6667C12.25 15.1334 12.5125 14.9048 13 14.9048H15.25C15.7375 14.9048 16 15.1334 16 15.6667C16 16.2 15.7375 16.4286 15.25 16.4286ZM10.75 16.4286H8.5C8.0125 16.4286 7.75 16.2 7.75 15.6667C7.75 15.1334 8.0125 14.9048 8.5 14.9048H10.75C11.2375 14.9048 11.5 15.1334 11.5 15.6667C11.5 16.2 11.2375 16.4286 10.75 16.4286ZM6.25 16.4286H4C3.5125 16.4286 3.25 16.2 3.25 15.6667C3.25 15.1334 3.5125 14.9048 4 14.9048H6.25C6.7375 14.9048 7 15.1334 7 15.6667C7 16.2 6.7375 16.4286 6.25 16.4286Z",fill:"black"})]})),wC=yD;var vD=t=>jsxRuntime.jsx("svg",St(W({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("circle",{cx:10.333,cy:10,r:9,fill:"white",stroke:"#327EEE",strokeWidth:2})})),kC=vD;var CD=t=>jsxRuntime.jsx("svg",St(W({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"Group 16159",children:[jsxRuntime.jsx("circle",{id:"Ellipse 5",cx:10,cy:10,r:9.25,fill:"#327EEE",stroke:"#327EEE",strokeWidth:1.5}),jsxRuntime.jsx("path",{id:"Shape",d:"M5 10.3636L8.63667 14L12.637 10L14.6372 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})})),DC=CD;var PD=t=>jsxRuntime.jsx("svg",St(W({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"Stepper indicators",children:[jsxRuntime.jsx("circle",{id:"Ellipse 5",cx:10.667,cy:10,r:9.25,fill:"#B3BCD3",stroke:"#B3BCD3",strokeWidth:1.5}),jsxRuntime.jsx("path",{id:"Shape",d:"M5.66699 10.3636L9.30366 14L13.304 10L15.3042 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})})),AC=PD;var ED=t=>jsxRuntime.jsx("svg",St(W({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M9 3L7.9425 4.0575L12.1275 8.25H3V9.75H12.1275L7.9425 13.9425L9 15L15 9L9 3Z",fill:"white"})})),RC=ED;var _D=t=>jsxRuntime.jsx("svg",St(W({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M15.8337 5.34199L14.6587 4.16699L10.0003 8.82533L5.34199 4.16699L4.16699 5.34199L8.82533 10.0003L4.16699 14.6587L5.34199 15.8337L10.0003 11.1753L14.6587 15.8337L15.8337 14.6587L11.1753 10.0003L15.8337 5.34199Z",fill:"#327EEE"})})),MC=_D;var TD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("g",{id:"check",children:jsxRuntime.jsx("path",{id:"Shape",d:"M20 7L9 18L4 13",stroke:"#F5F6F9",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})})),NC=TD;var wD=t=>jsxRuntime.jsxs("svg",St(W({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_1889_12169)",children:[jsxRuntime.jsx("path",{d:"M11.4286 7.42578L8 13.1401",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M14.857 13.1412C15.3274 12.0123 15.5118 10.7848 15.3938 9.56751C15.2758 8.35027 14.8592 7.18097 14.1808 6.16341C13.5024 5.14585 12.5833 4.31152 11.5051 3.73446C10.4268 3.1574 9.22281 2.85547 7.99986 2.85547C6.77691 2.85547 5.57288 3.1574 4.49463 3.73446C3.41639 4.31152 2.49729 5.14585 1.81892 6.16341C1.14055 7.18097 0.723889 8.35027 0.605928 9.56751C0.487968 10.7848 0.672354 12.0123 1.14272 13.1412H14.857Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_1889_12169",children:jsxRuntime.jsx("rect",{width:16,height:16,fill:"white"})})})]})),BC=wD;var ID=t=>jsxRuntime.jsx("svg",St(W({width:16,height:16,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"tag--tags-bookmark-favorite",children:[jsxRuntime.jsx("path",{id:"Vector",d:"M1.26995 11.9426L6.05743 16.7301C6.2305 16.903 6.4651 17.0001 6.7097 17.0001C6.95431 17.0001 7.18891 16.903 7.36198 16.7301L16.8631 7.22895C16.9108 7.18332 16.9478 7.12758 16.9712 7.06583C16.9946 7.00408 17.0039 6.93787 16.9985 6.87205L16.2724 2.15839C16.2664 2.04607 16.2192 1.93992 16.1396 1.86038C16.0601 1.78085 15.9539 1.73357 15.8416 1.72764L11.128 1.00152C11.0622 0.996055 10.9959 1.00538 10.9342 1.0288C10.8724 1.05222 10.8167 1.08916 10.7711 1.1369L1.26995 10.638C1.09709 10.8111 1 11.0457 1 11.2903C1 11.5349 1.09709 11.7695 1.26995 11.9426Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{id:"Vector_2",d:"M12.5548 6.05884C12.3916 6.05884 12.2351 5.99401 12.1197 5.87861C12.0043 5.76321 11.9395 5.60669 11.9395 5.44348C11.9395 5.28028 12.0043 5.12376 12.1197 5.00836C12.2351 4.89296 12.3916 4.82812 12.5548 4.82812C12.718 4.82812 12.8745 4.89296 12.9899 5.00836C13.1053 5.12376 13.1702 5.28028 13.1702 5.44348C13.1702 5.60669 13.1053 5.76321 12.9899 5.87861C12.8745 5.99401 12.718 6.05884 12.5548 6.05884Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})})),UC=ID;var DD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M12 3V21.0001M3 11.9446H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})),GC=DD;var AD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M3 12H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})),VC=AD;var OD=t=>jsxRuntime.jsx("svg",St(W({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M3 11.1429L9.71572 17.8586C9.79383 17.9367 9.92046 17.9367 9.99856 17.8586L21.8571 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})})),HC=OD;var FD=Q.div`
|
|
4686
4686
|
${({$pathColor:t})=>t&&react.css`
|
|
4687
4687
|
path {
|
|
4688
4688
|
fill: ${t};
|
|
@@ -4701,27 +4701,27 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4701
4701
|
stroke: ${t};
|
|
4702
4702
|
}
|
|
4703
4703
|
`}
|
|
4704
|
-
`;function qn({icon:t,className:e,style:n,svgPathColor:r,svgRectColor:i,svgStrokeColor:o}){let s=Eb[t],c=react.useTheme();return jsxRuntime.jsx(
|
|
4704
|
+
`;function qn({icon:t,className:e,style:n,svgPathColor:r,svgRectColor:i,svgStrokeColor:o}){let s=Eb[t],c=react.useTheme();return jsxRuntime.jsx(FD,{className:e,style:n,$pathColor:rm(r,c),$rectColor:rm(i,c),$strokeColor:rm(o,c),children:jsxRuntime.jsx(s,{})})}var MD=Q(rt)`
|
|
4705
4705
|
margin: 0;
|
|
4706
|
-
`,
|
|
4706
|
+
`,ND=Q.div`
|
|
4707
4707
|
display: flex;
|
|
4708
4708
|
align-items: center;
|
|
4709
4709
|
gap: 16px;
|
|
4710
|
-
`,
|
|
4710
|
+
`,LD=Q.div`
|
|
4711
4711
|
display: flex;
|
|
4712
4712
|
align-items: center;
|
|
4713
4713
|
flex-shrink: 0;
|
|
4714
|
-
`,
|
|
4714
|
+
`,BD=Q(qn)`
|
|
4715
4715
|
width: 24px;
|
|
4716
4716
|
height: 24px;
|
|
4717
4717
|
color: ${({theme:t})=>t.stigg.palette.primary};
|
|
4718
|
-
`;function
|
|
4718
|
+
`;function UD(t){if(!t)return "";switch(t){case Ro.Day:return "per day";case Ro.Hour:return "per hour";case Ro.Week:return "per week";case Ro.Month:return "per month";case Ro.Year:return "per year";default:return ""}}function $D({hasUnlimitedUsage:t,feature:e,resetPeriod:n,usageLimit:r,minUnitQuantity:i,maxUnitQuantity:o,isCustom:s,enumValues:c}){let p=i||o,h=`${n&&r?`${UD(n)}`:""}`;if(c){let v=c.length===1?e==null?void 0:e.units:e==null?void 0:e.unitsPlural;return `${c.length} ${v}`}if(t)return `Unlimited ${e==null?void 0:e.unitsPlural}`;if(s)return `Custom ${e==null?void 0:e.unitsPlural}`;if(r){let v=r===1?e==null?void 0:e.units:e==null?void 0:e.unitsPlural;return `${Ya(r)} ${v} ${h}`}return p?nm(i,o,e==null?void 0:e.unitsPlural):e==null?void 0:e.displayName}function wb(t){var o;let i=t,{displayNameOverride:e}=i,n=On(i,["displayNameOverride"]),r=$D(n);return jsxRuntime.jsxs(ND,{className:`stigg-entitlement-row-container stigg-entitlement-${(o=n.feature)==null?void 0:o.id}`,children:[jsxRuntime.jsx(LD,{children:jsxRuntime.jsx(BD,{icon:"EntitlementCheck",className:"stigg-entitlement-row-icon"})}),jsxRuntime.jsx(MD,{className:"stigg-entitlement-name",variant:"h6",color:"secondary",children:e||r})]})}var jD=Q.div`
|
|
4719
4719
|
display: flex;
|
|
4720
4720
|
flex-direction: column;
|
|
4721
4721
|
gap: 16px;
|
|
4722
|
-
`;function
|
|
4722
|
+
`;function VD(t,e,n){if(e.entitlementsTitle)return e.entitlementsTitle(t);let r=n?"Includes:":"";return t.basePlan&&(r=`Everything in ${t.basePlan.displayName}${n?", plus:":""}`),r}function qC({plan:t,billingPeriod:e,paywallLocale:n}){var c;let i=(((c=t.pricePoints)==null?void 0:c.filter(p=>p.billingPeriod===e))||[]).filter(p=>(p==null?void 0:p.minUnitQuantity)&&(p==null?void 0:p.minUnitQuantity)>1||(p==null?void 0:p.maxUnitQuantity)).map(p=>{var h;return jsxRuntime.jsx(wb,{feature:p!=null&&p.feature?St(W({},p.feature),{id:p.feature.featureId}):null,minUnitQuantity:p==null?void 0:p.minUnitQuantity,maxUnitQuantity:p==null?void 0:p.maxUnitQuantity},`priceUnitEntitlement-${(h=p==null?void 0:p.feature)==null?void 0:h.displayName}`)}),o=t.entitlements.filter(({isGranted:p})=>p).filter(p=>!(p.hiddenFromWidgets||[]).includes(Fu.Paywall)),s=i.length>0||o.length>0;return jsxRuntime.jsxs(jD,{className:"stigg-plan-entitlements-container",children:[jsxRuntime.jsx(rt,{className:"stigg-plan-entitlements-title",color:"secondary",variant:"h6",bold:true,children:VD(t,n,s)}),i,o.map(p=>{var h;return jsxRuntime.jsx(wb,{displayNameOverride:p.displayNameOverride,feature:p.feature,resetPeriod:p.resetPeriod,hasUnlimitedUsage:p.hasUnlimitedUsage,usageLimit:p.usageLimit,enumValues:p.enumValues,isCustom:p.isCustom},(h=p.feature)==null?void 0:h.id)})]})}var kb=(p=>(p.START_TRIAL="START_TRIAL",p.UPGRADE_TRIAL_TO_PAID="UPGRADE_TRIAL_TO_PAID",p.REQUEST_CUSTOM_PLAN_ACCESS="REQUEST_CUSTOM_PLAN_ACCESS",p.CHANGE_BILLING_PERIOD="CHANGE_BILLING_PERIOD",p.CHANGE_UNIT_QUANTITY="CHANGE_UNIT_QUANTITY",p.UPGRADE_PLAN="UPGRADE_PLAN",p.DOWNGRADE_PLAN="DOWNGRADE_PLAN",p.CANCEL_SCHEDULED_UPDATES="CANCEL_SCHEDULED_UPDATES",p))(kb||{});var am=t=>({left:"flex-start",center:"center",right:"flex-end"})[t],YC=t=>{var h,v,P;let e=sc__default.default(((h=t==null?void 0:t.palette)==null?void 0:h.primary)||"#327EEE"),n=sc__default.default(((P=(v=t==null?void 0:t.palette)==null?void 0:v.text)==null?void 0:P.primary)||"#001E6C"),r=sc__default.default("#4CAF50"),i=sc__default.default("#f44336"),o=sc__default.default("#ff9800"),s=sc__default.default("#2196f3"),c=sc__default.default("#9e9e9e"),p={palette:{primary:e.hex(),primaryDark:e.darken(.3).hex(),primaryLight:e.alpha(.5).toString(),backgroundPaper:"#FFFFFF",backgroundHighlight:"#F5F6F9",backgroundSection:e.alpha(.1).toString(),backgroundButton:e.alpha(.08).toString(),outlinedBorder:"#C4CBDD",outlinedRestingBorder:e.alpha(.5).toString(),outlinedHoverBackground:e.lightness(95).hex(),switchBorder:e.lighten(.1).hex(),switchFill:e.lighten(.5).hex(),switchHandle:e.hex(),warning:"#ed6c02",error:i.hex(),errorDark:i.darken(.3).hex(),success:r.hex(),successDark:r.darken(.3).hex(),white:"#FFFFFF",text:{primary:n.hex(),secondary:n.alpha(.75).toString(),tertiary:n.alpha(.5).toString(),disabled:n.alpha(.35).toString()},statusChips:{success:{background:r.alpha(.15).toString(),text:r.darken(.2).hex(),border:"transparent"},warning:{background:o.alpha(.15).toString(),text:o.darken(.2).hex(),border:"transparent"},error:{background:i.alpha(.15).toString(),text:i.darken(.1).hex(),border:"transparent"},info:{background:s.alpha(.15).toString(),text:s.darken(.2).hex(),border:"transparent"},neutral:{background:c.alpha(.15).toString(),text:c.darken(.2).hex(),border:"transparent"}},progress:{background:"#e0e0e0",low:"#4caf50",medium:"#ff9800",high:"#f44336"}},layout:{planMinWidth:"330px",planMaxWidth:"330px",planMargin:"20px",planPadding:"40px",ctaAlignment:"left",headerAlignment:"left",descriptionAlignment:"left",descriptionMinHeight:"80px",switchBottomSpacing:"40px"},shadows:{light:"0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12)",popover:"0px 4px 5px -2px rgba(0, 30, 108, 0.2), 0px 7px 10px 1px rgba(0, 30, 108, 0.14), 0px 2px 16px 1px rgba(0, 30, 108, 0.12)"},border:{radius:"10px"},typography:{fontFamily:"custom-font, DM Sans, sans-serif",h1:{fontSize:"32px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"24px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"},caption:{fontSize:"12px",fontWeight:"normal",semanticElement:"span"}},customCss:""};return HD__default.default(p,t)};var Db=t=>$1__default.default.utc(t).format("MMMM Do, yyyy");function sm({scheduledUpdate:t,subscriptionPrices:e,billingPeriodRange:n,options:r={}}){var s,c;if(!t)return {};let{withDate:i,postfix:o=""}=r;switch(t.subscriptionScheduleType){case Ui.Downgrade:{let p=i;return lodash.isNil(p)&&(n!=null&&n.end)&&(p=!$1__default.default(t.scheduledExecutionTime).isSame(n==null?void 0:n.end,"day")),{line1:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["Your subscription will be downgraded to the ",jsxRuntime.jsxs("b",{children:[(s=t.targetPackage)==null?void 0:s.displayName," plan"]})," ",p?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["on ",Db(t.scheduledExecutionTime)]}):o,"."]}),line2:"Until then you still have access to your current plan."}}case Ui.BillingPeriod:{let p=t.scheduleVariables;return {line1:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["Your billing cycle will change to ",jsxRuntime.jsx("b",{children:(c=p.billingPeriod)==null?void 0:c.toLocaleLowerCase()})," ",i?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["on ",Db(t.scheduledExecutionTime)]}):o,"."]})}}case Ui.UnitAmount:{let p=t.scheduleVariables,v=lodash.compact(e==null?void 0:e.map(({feature:A})=>A)).find(({id:A})=>A===p.featureId),{featureUnits:P,featureUnitsPlural:x}=v||{},T=p.newUnitAmount===1?P:x,I=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["Your subscription will be updated to ",jsxRuntime.jsx("b",{children:p.newUnitAmount})," ",T," ",i?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["on ",Db(t.scheduledExecutionTime)]}):o,"."]}),R=`Until then you still have access to your current ${P} count.`;return {line1:I,line2:R}}default:return {}}}function ZC(t){return t.feature&&(t.feature.unitQuantity!==1?t.feature.unitsPlural:t.feature.units)||""}function Ob(t,e){let n=[...t];n.sort((r,i)=>r.upTo?i.upTo?r.upTo-i.upTo:-1:1);for(let r of n)if(r.upTo&&e<=r.upTo)return r;return n[n.length-1]}function XC(t,e,n){return e===be.Annually&&n?t/12:t}function Ab(t,e,n,r){let i=0;if(t.unitPrice){let o=XC(t.unitPrice.amount,n,r);i+=o*e;}return t.flatPrice&&(i+=XC(t.flatPrice.amount,n,r)),i}function Rb(t,e,n,r){let i=e,o=0,s=0,c=[];for(;i>0&&s<t.length;){let h=t[s],{upTo:v}=h;if(lm__default.default(v))c.push({unitQuantity:i,amount:Ab(h,i,n,r)}),i=0;else {let P=v-o,x=Math.min(i,P);c.push({unitQuantity:x,amount:Ab(h,x,n,r)}),i-=x,o=v;}s+=1;}let p=lodash.sum(c.map(({amount:h})=>h));return {breakdown:c,total:p}}function Bu(t,e,n,r){if(!t.tiers)return 0;switch(t.tiersMode){case ic.Volume:{let i=Ob(t.tiers,e);return Ab(i,e,n,r)}case ic.Graduated:return Rb(t.tiers,e,n,r).total;default:return 0}}function Fp(t){return t==null?void 0:t.some(({unitPrice:e,upTo:n})=>e&&!lm__default.default(n))}function JC(t){return t==null?void 0:t.every(({unitPrice:e,upTo:n})=>!e||lm__default.default(n))}function tS(t,e){return (t==null?void 0:t[0].upTo)&&e<=t[0].upTo}function cm({plan:t,billingPeriod:e,currentSubscription:n,currentSubscriptionOverride:r,selectDefaultTierIndex:i}){let o=t.pricePoints.filter(s=>s.billingPeriod===e&&s.isTieredPrice);if(o.length===1){let[s]=o,{featureId:c}=s.feature,p=i?i({plan:t}):0,h=s.tiers[p],v=Fp(s.tiers)?1:h.upTo||1;if(n&&n.plan.id===t.id){let x=n.prices.find(T=>{var I;return T.pricingModel===nn.PerUnit&&T.tiersMode&&((I=T.feature)==null?void 0:I.featureId)===c});x&&(v=x.feature.unitQuantity||1);}if((r==null?void 0:r.planId)===t.id){let x=r.billableFeatures.find(T=>T.featureId===c);x&&(v=x.quantity);}let P={};return P[c]=v,P}return {}}function eS({perUnitQuantityByFeature:t,plan:e,currentSubscription:n,currentSubscriptionOverride:r}){var v,P;if(!n)return 0;let i=n.prices.find(x=>x.pricingModel===nn.PerUnit&&x.tiersMode),o=e.id===(r==null?void 0:r.planId);if(o&&(i=(v=e.pricePoints.find(x=>x.pricingModel===nn.PerUnit&&x.tiersMode))!=null?v:i),!i)return 0;let{featureId:s,unitQuantity:c}=i.feature,p=c;if(o){let x=(P=r==null?void 0:r.billableFeatures)==null?void 0:P.find(T=>T.featureId===s);x&&(p=x.quantity);}if(lm__default.default(p))return 0;let h=t[s];return h<p?-1:h>p?1:0}var JD=Q(KD__default.default)`
|
|
4723
4723
|
margin-left: 10px;
|
|
4724
|
-
`,
|
|
4724
|
+
`,t2=Q.button`
|
|
4725
4725
|
cursor: ${({$disabled:t})=>t?"default":"pointer"};
|
|
4726
4726
|
padding: 8px 12px;
|
|
4727
4727
|
background-color: ${({theme:t})=>t.stigg.palette.backgroundButton};
|
|
@@ -4740,12 +4740,12 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4740
4740
|
&:hover {
|
|
4741
4741
|
background-color: ${({theme:t,$disabled:e})=>e?t.stigg.palette.backgroundButton:t.stigg.palette.outlinedHoverBackground};
|
|
4742
4742
|
}
|
|
4743
|
-
`,
|
|
4743
|
+
`,e2=Q(rt)`
|
|
4744
4744
|
margin: 0;
|
|
4745
4745
|
font-size: 15px;
|
|
4746
|
-
`,
|
|
4746
|
+
`,n2=Q(rt)`
|
|
4747
4747
|
min-height: 87px;
|
|
4748
|
-
`,
|
|
4748
|
+
`,r2=Q.button`
|
|
4749
4749
|
background: none;
|
|
4750
4750
|
border: none;
|
|
4751
4751
|
padding: 0;
|
|
@@ -4753,17 +4753,17 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4753
4753
|
|
|
4754
4754
|
text-decoration: underline;
|
|
4755
4755
|
cursor: pointer;
|
|
4756
|
-
`,
|
|
4756
|
+
`,i2=Q(rt)`
|
|
4757
4757
|
margin-top: 8px;
|
|
4758
4758
|
margin-bottom: 17px;
|
|
4759
4759
|
min-height: 20px;
|
|
4760
|
-
`,
|
|
4760
|
+
`,o2=Q.div`
|
|
4761
4761
|
display: flex;
|
|
4762
4762
|
flex-direction: column;
|
|
4763
4763
|
margin-top: 4px;
|
|
4764
4764
|
align-self: ${({theme:t})=>am(t.stigg.layout.ctaAlignment)};
|
|
4765
4765
|
width: 100%;
|
|
4766
|
-
`;function rS({isNextPlan:t,customer:e,plan:n,billingPeriod:r,isCustomerOnTrial:i,onPlanSelected:o,paywallLocale:s,withTrialLeftRow:c,currentSubscription:p,currentSubscriptionOverride:h,perUnitQuantityByFeature:v}){let P=react.useTheme(),[x,T]=Bv.useState(false),{currentPlan:I,custom:R,downgrade:A,startTrial:O,upgrade:N,startNew:V,switchToBillingPeriod:G,cancelScheduledUpdate:X}=s.planCTAButton,nt=lodash.isFunction(A)?A(n):A,st=lodash.isFunction(N)?N(n):N,U={title:e?n.isLowerThanCurrentPlan?nt:st:V,disabled:false,intentionType:n.isLowerThanCurrentPlan?"DOWNGRADE_PLAN":i?"UPGRADE_TRIAL_TO_PAID":"UPGRADE_PLAN"},j=n.pricingType===Rn.Custom,{line1:ut}=sm({scheduledUpdate:n.scheduledUpdate,options:{withDate:true}});if(n.isTriable&&!n.isCurrentCustomerPlan&&!i)U.title=O(n),U.intentionType="START_TRIAL";else if(n.isCurrentCustomerPlan&&!i)if(r===n.currentCustomerPlanBillingPeriod||n.pricingType&&[Rn.Free,Rn.Custom].includes(n.pricingType))switch(eS({perUnitQuantityByFeature:v,plan:n,currentSubscription:p,currentSubscriptionOverride:h})){case -1:U.intentionType="CHANGE_UNIT_QUANTITY",U.title=nt;break;case 1:U.intentionType="CHANGE_UNIT_QUANTITY",U.title=st;break;default:U.title=I,U.disabled=true;break}else U.title=G(r),U.intentionType="CHANGE_BILLING_PERIOD";else j&&(U.title=typeof R=="function"?R({plan:n,selectedBillingPeriod:r}):R,U.intentionType="REQUEST_CUSTOM_PLAN_ACCESS");t&&n.scheduledUpdate&&(U.disabled=false,U.title=X,U.intentionType="CANCEL_SCHEDULED_UPDATES");let Y=x||U.disabled;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(
|
|
4766
|
+
`;function rS({isNextPlan:t,customer:e,plan:n,billingPeriod:r,isCustomerOnTrial:i,onPlanSelected:o,paywallLocale:s,withTrialLeftRow:c,currentSubscription:p,currentSubscriptionOverride:h,perUnitQuantityByFeature:v}){let P=react.useTheme(),[x,T]=Bv.useState(false),{currentPlan:I,custom:R,downgrade:A,startTrial:O,upgrade:N,startNew:V,switchToBillingPeriod:G,cancelScheduledUpdate:X}=s.planCTAButton,nt=lodash.isFunction(A)?A(n):A,st=lodash.isFunction(N)?N(n):N,U={title:e?n.isLowerThanCurrentPlan?nt:st:V,disabled:false,intentionType:n.isLowerThanCurrentPlan?"DOWNGRADE_PLAN":i?"UPGRADE_TRIAL_TO_PAID":"UPGRADE_PLAN"},j=n.pricingType===Rn.Custom,{line1:ut}=sm({scheduledUpdate:n.scheduledUpdate,options:{withDate:true}});if(n.isTriable&&!n.isCurrentCustomerPlan&&!i)U.title=O(n),U.intentionType="START_TRIAL";else if(n.isCurrentCustomerPlan&&!i)if(r===n.currentCustomerPlanBillingPeriod||n.pricingType&&[Rn.Free,Rn.Custom].includes(n.pricingType))switch(eS({perUnitQuantityByFeature:v,plan:n,currentSubscription:p,currentSubscriptionOverride:h})){case -1:U.intentionType="CHANGE_UNIT_QUANTITY",U.title=nt;break;case 1:U.intentionType="CHANGE_UNIT_QUANTITY",U.title=st;break;default:U.title=I,U.disabled=true;break}else U.title=G(r),U.intentionType="CHANGE_BILLING_PERIOD";else j&&(U.title=typeof R=="function"?R({plan:n,selectedBillingPeriod:r}):R,U.intentionType="REQUEST_CUSTOM_PLAN_ACCESS");t&&n.scheduledUpdate&&(U.disabled=false,U.title=X,U.intentionType="CANCEL_SCHEDULED_UPDATES");let Y=x||U.disabled;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(o2,{className:"stigg-paywall-plan-button-layout",children:t&&ut?jsxRuntime.jsxs(n2,{color:"secondary",variant:"body1",className:"stigg-paywall-schedule-update-text",children:[ut," ",jsxRuntime.jsx(r2,{color:"secondary",onClick:()=>{T(true),Promise.resolve(o(U.intentionType)).finally(()=>T(false));},children:U.title})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(t2,{className:"stigg-paywall-plan-button","data-testid":`paywall-card-cta-${n.displayName}`,disabled:Y,$disabled:Y,onClick:()=>{T(true),Promise.resolve(o(U.intentionType)).finally(()=>T(false));},children:[jsxRuntime.jsx(e2,{className:"stigg-paywall-plan-button-text",variant:"h6",color:"primary.main",children:U.title}),x&&jsxRuntime.jsx(JD,{color:P.stigg.palette.text.disabled,loading:true,size:16})]}),c?jsxRuntime.jsx(i2,{className:"stigg-trial-days-left-text",variant:"h6",color:"secondary",children:n.isCurrentCustomerPlan&&n.trialDaysLeft&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("b",{children:[n.trialDaysLeft," days"]})," left on your free trial"]})}):jsxRuntime.jsx("div",{style:{height:"20px"}})]})})})}var wn=({amount:t,currency:e=Ru.Usd,locale:n,maximumFractionDigits:r=5,minimumFractionDigits:i=0,removeTrailingZero:o})=>{let s=e.toString(),c=a2__default.default(s),p=new Intl.NumberFormat(n,W({maximumFractionDigits:r,minimumFractionDigits:i,style:"currency",currency:s,trailingZeroDisplay:o?"stripIfInteger":"auto"},c?{currencyDisplay:"code"}:{})).format(t||0);return c&&(p=p.replace(s,c)),p=p.replace(/\s/g,""),p};function gr(t,{locale:e,maximumFractionDigits:n}={}){return new Intl.NumberFormat(e,{maximumFractionDigits:n}).format(t)}function iS({planPrices:t,paywallCalculatedPrice:e,selectedBillingPeriod:n,locale:r,shouldShowMonthlyPriceAmount:i,paywallLocale:o,perUnitQuantityByFeature:s}){var A,O,N;let{amount:c,currency:p}=e||t[0],h=c||0,v=t.length===1,P=n===be.Annually&&i?h/12:h,x,T,I=o.price.pricePeriod(i?be.Monthly:be.Annually),R=I;for(let V of t)if(V.isTieredPrice&&V.tiers){let G=(s==null?void 0:s[V.feature.featureId])||1;x=V.tiers,T=ZC(V),P+=Bu(V,G,n,i);}if(v){let V=t[0],G=V.blockSize&&V.blockSize>1?`for ${gr(V.blockSize)} ${((A=V.feature)==null?void 0:A.unitsPlural)||((O=V.feature)==null?void 0:O.units)||""}`:`per ${((N=V.feature)==null?void 0:N.units)||""}`;V.pricingModel===nn.PerUnit&&!V.isTieredPrice?R=`${G} ${I}`:V.pricingModel===nn.UsageBased&&(R=`${G}`);}return {price:wn({amount:P,currency:p,locale:r,minimumFractionDigits:2,removeTrailingZero:true}),unit:R,tiers:x,tierUnits:T}}function um(t,e,n,r,i,o){var s;switch(t.pricingType){case Rn.Free:return typeof n.price.free=="function"?n.price.free(t.paywallCurrency):n.price.free;case Rn.Custom:return {price:typeof n.price.custom=="function"?n.price.custom({plan:t,selectedBillingPeriod:e}):n.price.custom};case Rn.Paid:{let c=t.pricePoints.filter(v=>v.billingPeriod===e),p=(s=t.paywallCalculatedPricePoints)==null?void 0:s.find(v=>v.billingPeriod===e);if(!(c!=null&&c.length)&&!p)return {price:n.price.priceNotSet};let h={planPrices:c,paywallCalculatedPrice:p,selectedBillingPeriod:e,perUnitQuantityByFeature:o||{}};return n.price.paid?n.price.paid(St(W({},h),{plan:t})):iS(St(W({},h),{locale:r,shouldShowMonthlyPriceAmount:i,paywallLocale:n}))}default:return {price:""}}}var l2=Q(s2__default.default)`
|
|
4767
4767
|
border-radius: 10px;
|
|
4768
4768
|
text-transform: none;
|
|
4769
4769
|
|
|
@@ -4772,7 +4772,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4772
4772
|
&:hover {
|
|
4773
4773
|
background-color: ${({theme:t,$success:e,$error:n})=>e?t.stigg.palette.successDark:n?t.stigg.palette.errorDark:""};
|
|
4774
4774
|
}
|
|
4775
|
-
`,$i=n=>{var r=n,{variant:t="outlined"}=r,e=On(r,["variant"]);return jsxRuntime.jsx(
|
|
4775
|
+
`,$i=n=>{var r=n,{variant:t="outlined"}=r,e=On(r,["variant"]);return jsxRuntime.jsx(l2,W({variant:t},e))};var Zs=Q(u2__default.default)(({theme:t})=>({"& .MuiOutlinedInput-root":{height:"42px",borderRadius:t.stigg.border.radius,fieldset:{borderColor:t.stigg.palette.outlinedBorder},"&:not(.Mui-focused):hover fieldset":{borderColor:t.stigg.palette.outlinedRestingBorder}},"& .MuiInputBase-input":W({padding:"8px 12px",borderRadius:t.stigg.border.radius,fontFamily:t.stigg.typography.fontFamily,color:t.stigg.palette.text.primary},t.stigg.typography.body),"& .Mui-error":{fontFamily:t.stigg.typography.fontFamily}}));var uc=Q(da__default.default)`
|
|
4776
4776
|
display: flex;
|
|
4777
4777
|
flex-direction: ${({$flexDirection:t})=>t||"row"};
|
|
4778
4778
|
gap: ${({$gap:t})=>t}px;
|
|
@@ -4791,7 +4791,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4791
4791
|
`;var sS=Q(da__default.default)`
|
|
4792
4792
|
display: flex;
|
|
4793
4793
|
flex-direction: column;
|
|
4794
|
-
`;function lS(){return jsxRuntime.jsxs(sS,{container:true,children:[jsxRuntime.jsxs(uc,{item:true,$gap:48,children:[jsxRuntime.jsx(Un,{width:120,height:20}),jsxRuntime.jsx(Un,{width:120,height:20})]}),jsxRuntime.jsx(zP__default.default,{className:"stigg-checkout-plan-header-divider",sx:{marginY:2}}),jsxRuntime.jsxs(sS,{item:true,children:[jsxRuntime.jsx(Un,{width:120,height:20}),jsxRuntime.jsxs(aS,{$gap:16,marginTop:3,children:[jsxRuntime.jsx(Un,{height:20}),jsxRuntime.jsx(Un,{height:20})]}),jsxRuntime.jsxs(uc,{$gap:130,marginTop:3,children:[jsxRuntime.jsx(Np,{flex:1,children:jsxRuntime.jsx(Un,{height:20})}),jsxRuntime.jsx(Np,{flex:3,children:jsxRuntime.jsx(Un,{height:20})})]})]})]})}var Uu=t=>t.target.blur();function cS({width:t,tierUnits:e,value:n,handleChange:r,errorMessage:i}){return jsxRuntime.jsx(Zs,{type:"number",onWheel:Uu,fullWidth:true,error:!!i,sx:{minHeight:"46px",width:t},InputProps:{endAdornment:jsxRuntime.jsx(
|
|
4794
|
+
`;function lS(){return jsxRuntime.jsxs(sS,{container:true,children:[jsxRuntime.jsxs(uc,{item:true,$gap:48,children:[jsxRuntime.jsx(Un,{width:120,height:20}),jsxRuntime.jsx(Un,{width:120,height:20})]}),jsxRuntime.jsx(zP__default.default,{className:"stigg-checkout-plan-header-divider",sx:{marginY:2}}),jsxRuntime.jsxs(sS,{item:true,children:[jsxRuntime.jsx(Un,{width:120,height:20}),jsxRuntime.jsxs(aS,{$gap:16,marginTop:3,children:[jsxRuntime.jsx(Un,{height:20}),jsxRuntime.jsx(Un,{height:20})]}),jsxRuntime.jsxs(uc,{$gap:130,marginTop:3,children:[jsxRuntime.jsx(Np,{flex:1,children:jsxRuntime.jsx(Un,{height:20})}),jsxRuntime.jsx(Np,{flex:3,children:jsxRuntime.jsx(Un,{height:20})})]})]})]})}var Uu=t=>t.target.blur();function cS({width:t,tierUnits:e,value:n,handleChange:r,errorMessage:i}){return jsxRuntime.jsx(Zs,{type:"number",onWheel:Uu,fullWidth:true,error:!!i,sx:{minHeight:"46px",width:t},InputProps:{endAdornment:jsxRuntime.jsx(h2__default.default,{position:"end",children:jsxRuntime.jsx(rt,{variant:"body1",color:"primary",children:e})})},value:n,onChange:o=>{var c,p;let s=(c=o==null?void 0:o.target)!=null&&c.value?Number((p=o==null?void 0:o.target)==null?void 0:p.value):null;s&&r(s);}})}var v2=Q(g2__default.default)`
|
|
4795
4795
|
border-radius: 10px;
|
|
4796
4796
|
min-height: 42px;
|
|
4797
4797
|
min-width: 120px;
|
|
@@ -4799,7 +4799,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4799
4799
|
&:hover .MuiOutlinedInput-notchedOutline {
|
|
4800
4800
|
border-color: ${({theme:t})=>t.stigg.palette.outlinedBorder};
|
|
4801
4801
|
}
|
|
4802
|
-
`,
|
|
4802
|
+
`,C2=Q(m2__default.default)`
|
|
4803
4803
|
& .MuiInputBase-input {
|
|
4804
4804
|
padding: 10px 12px;
|
|
4805
4805
|
}
|
|
@@ -4807,34 +4807,34 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4807
4807
|
&.Mui-focused .MuiOutlinedInput-notchedOutline {
|
|
4808
4808
|
border-color: ${({theme:t})=>t.stigg.palette.primary} !important;
|
|
4809
4809
|
}
|
|
4810
|
-
`;function uS({value:t,componentId:e,tierUnits:n,tiers:r,handleChange:i,errorMessage:o}){return r?jsxRuntime.jsx(
|
|
4810
|
+
`;function uS({value:t,componentId:e,tierUnits:n,tiers:r,handleChange:i,errorMessage:o}){return r?jsxRuntime.jsx(v2,{value:t.toString(),fullWidth:true,error:!!o,onChange:s=>{var p,h;let c=(p=s==null?void 0:s.target)!=null&&p.value?Number((h=s==null?void 0:s.target)==null?void 0:h.value):null;c&&i(c);},id:e,input:jsxRuntime.jsx(C2,{}),MenuProps:{MenuListProps:{disablePadding:true},PaperProps:{sx:{marginTop:"4px",borderRadius:"10px"}}},children:lodash.map(r,s=>{var c;return jsxRuntime.jsx(y2__default.default,{className:"stigg-price-tier-menu-item-text",value:(c=s.upTo)==null?void 0:c.toString(),children:jsxRuntime.jsxs(rt,{variant:"body1",color:"primary",style:{lineHeight:"unset"},children:[Ya(s.upTo)," ",n]})},s.upTo)})}):null}var x2=Q(rt)`
|
|
4811
4811
|
min-height: 46px;
|
|
4812
|
-
`;function dm(t){let{tiers:e,errorMessage:n}=t;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(material.Box,{display:"flex",flexDirection:"column",justifyContent:"center",style:{width:"100%"},children:[jsxRuntime.jsx(
|
|
4812
|
+
`;function dm(t){let{tiers:e,errorMessage:n}=t;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(material.Box,{display:"flex",flexDirection:"column",justifyContent:"center",style:{width:"100%"},children:[jsxRuntime.jsx(x2,{as:"div",className:"stigg-price-tier-select",children:Fp(e)?jsxRuntime.jsx(cS,W({},t)):jsxRuntime.jsx(uS,W({},t))}),jsxRuntime.jsx(rt,{style:{margin:"4px"},variant:"caption",color:"error",children:n})]})})}var pS="\u200E",T2=Q(rt)`
|
|
4813
4813
|
word-break: break-word;
|
|
4814
4814
|
width: 100%;
|
|
4815
|
-
`,T2=Q(rt)`
|
|
4816
|
-
white-space: nowrap;
|
|
4817
4815
|
`,w2=Q(rt)`
|
|
4816
|
+
white-space: nowrap;
|
|
4817
|
+
`,I2=Q(rt)`
|
|
4818
4818
|
white-space: normal;
|
|
4819
4819
|
min-height: 39px;
|
|
4820
|
-
`;function
|
|
4820
|
+
`;function k2({plan:t,billingPeriod:e,hasMonthlyPrice:n,hasAnnuallyPrice:r,paywallLocale:i}){var c,p;let o=t.pricePoints.find(h=>h.billingPeriod===e),s=pS;return o&&n&&r&&(s=((p=(c=i.price).billingPeriod)==null?void 0:p.call(c,e))||`, billed ${e.toLowerCase()}`),jsxRuntime.jsx(rt,{as:"span",className:"stigg-price-billing-period-text",variant:"h6",color:"secondary",children:s})}var fS=({showStartingAt:t,withUnitPriceRow:e,withStartingAtRow:n,withTiersRow:r,plan:i,billingPeriod:o,paywallLocale:s,locale:c,hasMonthlyPrice:p,hasAnnuallyPrice:h,perUnitQuantityByFeature:v,setPerUnitQuantityByFeature:P})=>{var G;let{price:x,unit:T,tiers:I,tierUnits:R}=um(i,o,s,c,p,v),A=i.pricePoints.find(X=>X.billingPeriod===o&&X.isTieredPrice),O=A?A.feature.featureId:void 0,N=(G=v[O||""])!=null?G:1,V=X=>{O&&P(nt=>St(W({},nt),{[O]:X}));};return jsxRuntime.jsx(T2,{as:"div",className:"stigg-price-text",children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n&&jsxRuntime.jsx(rt,{style:{minHeight:"20px"},className:"stigg-starting-at-text",variant:"body1",color:"secondary",children:t?s.price.startingAtCaption:pS}),jsxRuntime.jsx(I2,{className:"stigg-price-point",variant:"h1",children:x}),e&&jsxRuntime.jsxs(rt,{as:"div",className:"stigg-price-unit-and-billing-period-text",style:{minHeight:"48px"},children:[jsxRuntime.jsx(w2,{className:"stigg-price-unit-text",as:"span",variant:"h6",color:"secondary",children:T}),jsxRuntime.jsx(k2,{plan:i,billingPeriod:o,hasAnnuallyPrice:h,hasMonthlyPrice:p,paywallLocale:s})]}),r?jsxRuntime.jsx(dm,{componentId:`${i.id}_${O}_tier`,tiers:I,tierUnits:R,tiersMode:A==null?void 0:A.tiersMode,handleChange:V,value:N}):null]})})};var F2=Q(s2__default.default)`
|
|
4821
4821
|
padding: 0px;
|
|
4822
4822
|
text-transform: none;
|
|
4823
4823
|
margin-left: 0px;
|
|
4824
|
-
`,
|
|
4824
|
+
`,M2=Q(rt)`
|
|
4825
4825
|
font-size: 14px;
|
|
4826
4826
|
font-weight: 500;
|
|
4827
|
-
`,
|
|
4827
|
+
`,N2=Q.div`
|
|
4828
4828
|
width: 100%;
|
|
4829
4829
|
gap: 10px;
|
|
4830
|
-
`,
|
|
4830
|
+
`,L2=Q.div`
|
|
4831
4831
|
margin-top: 10px;
|
|
4832
4832
|
overflow: hidden;
|
|
4833
4833
|
display: flex;
|
|
4834
4834
|
flex-direction: column;
|
|
4835
4835
|
gap: 4px;
|
|
4836
4836
|
width: 100%;
|
|
4837
|
-
`,
|
|
4837
|
+
`,B2=Q.div`
|
|
4838
4838
|
display: flex;
|
|
4839
4839
|
flex-direction: row;
|
|
4840
4840
|
flex-wrap: nowrap;
|
|
@@ -4843,7 +4843,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4843
4843
|
padding: 8px 0px;
|
|
4844
4844
|
max-height: 44px;
|
|
4845
4845
|
gap: 16px;
|
|
4846
|
-
`,
|
|
4846
|
+
`,U2=Q(rt)`
|
|
4847
4847
|
overflow: hidden;
|
|
4848
4848
|
font-feature-settings: 'liga' off, 'clig' off;
|
|
4849
4849
|
text-overflow: ellipsis;
|
|
@@ -4852,17 +4852,17 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4852
4852
|
white-space: nowrap;
|
|
4853
4853
|
min-width: 0;
|
|
4854
4854
|
flex-shrink: 1;
|
|
4855
|
-
|
|
4855
|
+
`,$2=Q(qn)`
|
|
4856
4856
|
width: 24px;
|
|
4857
4857
|
height: 24px;
|
|
4858
4858
|
color: ${({theme:t})=>t.stigg.palette.primary};
|
|
4859
|
-
|
|
4859
|
+
`,G2=Q.div`
|
|
4860
4860
|
flex: 1;
|
|
4861
4861
|
min-width: 0;
|
|
4862
|
-
`,
|
|
4862
|
+
`,j2=Q.div`
|
|
4863
4863
|
margin-top: 16px;
|
|
4864
4864
|
display: flex;
|
|
4865
|
-
`,Lb=4;function Bb({addons:t,paywallLocale:e}){let[n,r]=Bv.useState(false);if(!t||t.length===0)return null;let i=t.filter(c=>{var p;return !((p=c.hiddenFromWidgets)!=null&&p.includes(Fu.Paywall))}),o=()=>{r(!n);},s=n?i:i.slice(0,Lb);return s.length===0?null:jsxRuntime.jsxs(
|
|
4865
|
+
`,Lb=4;function Bb({addons:t,paywallLocale:e}){let[n,r]=Bv.useState(false);if(!t||t.length===0)return null;let i=t.filter(c=>{var p;return !((p=c.hiddenFromWidgets)!=null&&p.includes(Fu.Paywall))}),o=()=>{r(!n);},s=n?i:i.slice(0,Lb);return s.length===0?null:jsxRuntime.jsxs(N2,{className:"stigg-compatible-addons-container",children:[jsxRuntime.jsx(rt,{className:"stigg-compatible-addons-header",color:"secondary",variant:"body1",bold:true,children:e.addonsTitle}),jsxRuntime.jsx(L2,{className:"stigg-compatible-addons-list",children:s.map(c=>jsxRuntime.jsxs(B2,{className:R2__default.default(`stigg-compatible-addon--${c.id}`,"stigg-compatible-addon-item"),children:[jsxRuntime.jsx($2,{icon:"Add",className:"stigg-compatible-addon-icon"}),jsxRuntime.jsx(G2,{className:"stigg-compatible-addon-content",children:jsxRuntime.jsx(U2,{variant:"body1",color:"primary",className:"stigg-compatible-addon-name",children:c.displayName})})]},c.id))}),i.length>Lb&&jsxRuntime.jsx(j2,{children:jsxRuntime.jsx(F2,{variant:"text",onClick:o,children:jsxRuntime.jsx(M2,{color:"primary.main",children:n?"Show less":`Show ${i.length-Lb} more`})})})]})}var W2="66px",q2=Q.div`
|
|
4866
4866
|
position: relative;
|
|
4867
4867
|
background-color: ${({theme:t,$isCurrentPlan:e})=>e?t.stigg.palette.backgroundHighlight:t.stigg.palette.backgroundPaper};
|
|
4868
4868
|
border: ${({theme:t,$isHighlighted:e})=>e?`3px solid ${t.stigg.palette.primary}`:`1px solid ${t.stigg.palette.outlinedBorder}`};
|
|
@@ -4875,38 +4875,38 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4875
4875
|
align-items: flex-start;
|
|
4876
4876
|
justify-content: flex-start;
|
|
4877
4877
|
position: relative;
|
|
4878
|
-
`,
|
|
4878
|
+
`,Y2=Q.div`
|
|
4879
4879
|
margin-top: ${({$planHasEntitlements:t})=>t?"32px":"0px"};
|
|
4880
|
-
`,
|
|
4880
|
+
`,Q2=Q(rt)`
|
|
4881
4881
|
padding-bottom: 8px;
|
|
4882
|
-
`,
|
|
4882
|
+
`,K2=Q.div`
|
|
4883
4883
|
height: 2px;
|
|
4884
4884
|
width: 100%;
|
|
4885
4885
|
background-color: ${({theme:t})=>t.stigg.palette.outlinedBorder};
|
|
4886
4886
|
margin-bottom: 40px;
|
|
4887
|
-
`,
|
|
4887
|
+
`,X2=Q(rt)`
|
|
4888
4888
|
text-align: ${({theme:t})=>t.stigg.layout.descriptionAlignment};
|
|
4889
4889
|
min-height: ${({theme:t})=>t.stigg.layout.descriptionMinHeight};
|
|
4890
|
-
`,
|
|
4890
|
+
`,Z2=Q.div`
|
|
4891
4891
|
background-color: ${({theme:t})=>t.stigg.palette.primary};
|
|
4892
4892
|
border-radius: 40px;
|
|
4893
4893
|
position: absolute;
|
|
4894
4894
|
top: -12px;
|
|
4895
|
-
`,
|
|
4895
|
+
`,J2=Q(rt)`
|
|
4896
4896
|
margin: 0;
|
|
4897
4897
|
padding: 2px 8px;
|
|
4898
|
-
`,
|
|
4898
|
+
`,tA=Q.div`
|
|
4899
4899
|
width: 100%;
|
|
4900
4900
|
display: flex;
|
|
4901
4901
|
flex-direction: column;
|
|
4902
4902
|
align-items: ${({theme:t})=>am(t.stigg.layout.headerAlignment)};
|
|
4903
|
-
`,
|
|
4903
|
+
`,eA=Q.div`
|
|
4904
4904
|
position: absolute;
|
|
4905
4905
|
top: 0;
|
|
4906
4906
|
background-color: ${({theme:t})=>t.stigg.palette.outlinedBorder};
|
|
4907
4907
|
border-radius: 0px 0px 10px 10px;
|
|
4908
4908
|
padding: 3px 12px;
|
|
4909
|
-
`,
|
|
4909
|
+
`,nA=Q(im)`
|
|
4910
4910
|
display: flex;
|
|
4911
4911
|
height: 100%;
|
|
4912
4912
|
margin-right: 4px;
|
|
@@ -4914,7 +4914,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4914
4914
|
path {
|
|
4915
4915
|
fill: ${({theme:t})=>t.stigg.palette.text.primary};
|
|
4916
4916
|
}
|
|
4917
|
-
`;function
|
|
4917
|
+
`;function rA({text:t="Next",iconsColor:e}){return jsxRuntime.jsx(eA,{children:jsxRuntime.jsxs(da__default.default,{display:"flex",alignItems:"center",gap:1,children:[jsxRuntime.jsx(nA,{$iconsColor:e}),jsxRuntime.jsx(rt,{color:"primary",variant:"body1",children:t})]})})}function mS({withUnitPriceRow:t,withTiersRow:e,withTrialLeftRow:n,customer:r,plan:i,billingPeriod:o,isHighlighted:s,currentSubscription:c,currentSubscriptionOverride:p,shouldShowDescriptionSection:h,hasMonthlyPrice:v,hasAnnuallyPrice:P,isCustomerOnTrial:x,onPlanSelected:T,paywallLocale:I,locale:R,withStartingAtRow:A,isCustomerInCustomPlan:O,selectDefaultTierIndex:N,hideCompatibleAddons:V}){var pt;let G=i.isNextPlan&&i.isNextPlan(o),X=i.pricePoints.filter(dt=>dt.billingPeriod===o),nt=(pt=i.paywallCalculatedPricePoints)==null?void 0:pt.find(dt=>dt.billingPeriod===o),st=X.length>1&&!!(nt!=null&&nt.additionalChargesMayApply),U=!O||i.pricingType===Rn.Custom,j=null;G?j=jsxRuntime.jsx(rA,{text:"Next plan"}):s&&I.highlightChip&&(j=jsxRuntime.jsx(Z2,{className:"stigg-highlight-badge",children:jsxRuntime.jsx(J2,{className:"stigg-highlight-badge-text",color:"white",bold:true,children:I.highlightChip})}));let[ut,Y]=Bv.useState(cm({plan:i,billingPeriod:o,currentSubscription:c,currentSubscriptionOverride:p,selectDefaultTierIndex:N})),at=dt=>{let mt=Object.keys(ut).map(Ct=>({featureId:Ct,quantity:ut[Ct]}));return T(dt,mt)};return jsxRuntime.jsxs(q2,{className:R2__default.default(`stigg-${i.id}`,"stigg-plan-offering-container",{"stigg-current-plan":i.isCurrentCustomerPlan}),$isHighlighted:s,$isCurrentPlan:i.isCurrentCustomerPlan,children:[j,jsxRuntime.jsxs(tA,{className:"stigg-header-wrapper",children:[jsxRuntime.jsx(Q2,{className:"stigg-plan-header",variant:"h3",children:i.displayName}),h&&jsxRuntime.jsx(X2,{className:"stigg-plan-description",variant:"h6",color:"secondary",children:i.description}),jsxRuntime.jsx(fS,{showStartingAt:st,withUnitPriceRow:t,withStartingAtRow:A,withTiersRow:e,plan:i,billingPeriod:o,paywallLocale:I,locale:R,hasAnnuallyPrice:P,hasMonthlyPrice:v,setPerUnitQuantityByFeature:Y,perUnitQuantityByFeature:ut}),U?jsxRuntime.jsx(rS,{isNextPlan:G,customer:r,plan:i,currentSubscription:c,currentSubscriptionOverride:p,billingPeriod:o,isCustomerOnTrial:x,onPlanSelected:at,paywallLocale:I,withTrialLeftRow:n,perUnitQuantityByFeature:ut}):jsxRuntime.jsx("div",{style:{height:W2}}),jsxRuntime.jsx(K2,{className:"stigg-plan-header-divider"})]}),jsxRuntime.jsx(qC,{plan:i,billingPeriod:o,paywallLocale:I}),jsxRuntime.jsx(Y2,{$planHasEntitlements:i.entitlements.length>0,className:"stigg-addons-container",children:!V&&i.compatibleAddons&&i.compatibleAddons.length>0&&jsxRuntime.jsx(Bb,{addons:i.compatibleAddons,paywallLocale:I})})]})}var oA=Q.div`
|
|
4918
4918
|
height: 40px;
|
|
4919
4919
|
padding: 0 20px;
|
|
4920
4920
|
margin-bottom: ${({theme:t})=>t.stigg.layout.switchBottomSpacing};
|
|
@@ -4926,7 +4926,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4926
4926
|
justify-content: center;
|
|
4927
4927
|
`,gS=Q(rt)`
|
|
4928
4928
|
margin: 0 8px;
|
|
4929
|
-
`,
|
|
4929
|
+
`,aA=Q(iA__default.default)`
|
|
4930
4930
|
& .react-switch-bg {
|
|
4931
4931
|
border: ${({theme:t})=>`1px solid ${t.stigg.palette.switchBorder}`};
|
|
4932
4932
|
background: ${({theme:t})=>t.stigg.palette.switchFill} !important;
|
|
@@ -4937,17 +4937,17 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4937
4937
|
background: ${({theme:t})=>t.stigg.palette.switchHandle} !important;
|
|
4938
4938
|
top: 0.5px !important;
|
|
4939
4939
|
}
|
|
4940
|
-
`;function
|
|
4940
|
+
`;function sA({discount:t,disabled:e}){return jsxRuntime.jsxs(rt,{variant:"h6",color:e?"disabled":"primary",className:"stigg-discount-rate-text",children:[t,"% off"]})}function yS({discountRate:t,selectedBillingPeriod:e,onBillingPeriodChanged:n,availableBillingPeriods:r}){if(r.length<=1)return null;let i=e===be.Monthly;return jsxRuntime.jsxs(oA,{className:"stigg-period-picker-container",children:[jsxRuntime.jsx(gS,{variant:"h6",className:"stigg-monthly-period-text",color:i?"primary":"disabled",children:"Monthly"}),jsxRuntime.jsx(aA,{className:"stigg-period-switch",uncheckedIcon:false,checkedIcon:false,height:16,width:33,onChange:o=>n(o?be.Annually:be.Monthly),checked:!i,borderRadius:10,handleDiameter:19}),jsxRuntime.jsx(gS,{variant:"h6",className:"stigg-annual-period-text",color:i?"disabled":"primary",children:"Annual"}),t!==0&&jsxRuntime.jsx(sA,{discount:t,disabled:i})]})}function lA(t,e){if(!lm__default.default(t)&&!lm__default.default(e)){let n=e/12;return Math.round((t-n)/t*100)}return null}function CS(t,e){var r;let n;if(n=(r=t.paywallCalculatedPricePoints)==null?void 0:r.find(i=>i.billingPeriod===e),n||(n=t.pricePoints.find(i=>i.billingPeriod===e)),!(n!=null&&n.amount)){let i=t.pricePoints.find(o=>o.isTieredPrice&&o.billingPeriod===e);if(i)return Bu(i,1)}return n==null?void 0:n.amount}function SS(t){return t.reduce((e,n)=>{let r=CS(n,be.Monthly),i=CS(n,be.Annually),o=lA(r,i);return o&&(e=Math.max(e,o)),e},0)}var cA=t=>jsxRuntime.jsxs("svg",St(W({width:135,height:16,viewBox:"0 0 135 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("path",{d:"M0.0987549 3.43016V12.9878H1.15589V9.52681H3.96527C5.94922 9.52681 7.28874 8.25245 7.28874 6.47848C7.28874 4.70452 5.94922 3.43016 3.96527 3.43016H0.0987549ZM1.15589 8.55656V4.40765H4.04492C5.33376 4.40765 6.18816 5.26205 6.18816 6.47848C6.18816 7.69492 5.33376 8.55656 4.04492 8.55656H1.15589Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M11.7787 13.1616C13.9075 13.1616 15.6525 11.5397 15.6525 9.38199C15.6525 7.21703 13.9365 5.62408 11.8077 5.62408C9.64999 5.62408 7.93395 7.24599 7.93395 9.41095C7.93395 11.5687 9.62103 13.1616 11.7787 13.1616ZM11.7932 12.2276C10.2365 12.2276 9.02005 11.0256 9.02005 9.39647C9.02005 7.76732 10.2365 6.56537 11.7932 6.56537C13.321 6.56537 14.5664 7.76732 14.5664 9.39647C14.5664 11.0256 13.321 12.2276 11.7932 12.2276Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M19.9054 12.9878L21.4766 6.94189H21.5056L23.0623 12.9878H24.4018L26.5958 5.8051H25.4155L23.7936 11.909H23.7647L22.2152 5.8051H20.7815L19.232 11.909H19.203L17.5522 5.8051H16.3575L18.5659 12.9878H19.9054Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M34.9835 9.42544C34.9835 7.30392 33.4051 5.62408 31.1532 5.62408C29.0534 5.62408 27.3084 7.18083 27.3084 9.41095C27.3084 11.5542 28.9086 13.1616 31.1822 13.1616C32.7679 13.1616 34.0567 12.3941 34.6794 11.1922L33.7816 10.707C33.3688 11.6049 32.3696 12.2348 31.1966 12.2348C29.5241 12.2348 28.5031 10.9894 28.4017 9.7223H34.969C34.9835 9.59197 34.9835 9.54129 34.9835 9.42544ZM31.1387 6.55089C32.5434 6.55089 33.6657 7.49942 33.854 8.80998H28.4307C28.6552 7.5501 29.7558 6.55089 31.1387 6.55089Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M39.5922 5.68201C38.564 5.68201 37.8182 6.20334 37.4924 6.93464L37.391 5.8051H36.486V12.9878H37.5431V8.5638C37.5431 7.44873 38.1585 6.77535 39.3171 6.77535H39.9977V5.68201H39.5922Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M48.2486 9.42544C48.2486 7.30392 46.6702 5.62408 44.4183 5.62408C42.3185 5.62408 40.5735 7.18083 40.5735 9.41095C40.5735 11.5542 42.1737 13.1616 44.4473 13.1616C46.033 13.1616 47.3218 12.3941 47.9445 11.1922L47.0467 10.707C46.634 11.6049 45.6348 12.2348 44.4618 12.2348C42.7892 12.2348 41.7682 10.9894 41.6669 9.7223H48.2342C48.2486 9.59197 48.2486 9.54129 48.2486 9.42544ZM44.4039 6.55089C45.8085 6.55089 46.9308 7.49942 47.1191 8.80998H41.6958C41.9203 7.5501 43.0209 6.55089 44.4039 6.55089Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M55.846 7.02877C55.2161 6.13817 54.2024 5.63132 53.0149 5.63132C50.9224 5.63132 49.2425 7.21703 49.2425 9.39647C49.2425 11.5759 50.8934 13.1616 52.986 13.1616C54.1807 13.1616 55.2161 12.6403 55.8533 11.7425L55.9981 12.9878H56.9032V2.56128L55.846 2.67713V7.02877ZM53.0294 12.2276C51.5306 12.2276 50.3286 11.0401 50.3286 9.39647C50.3286 7.75284 51.5306 6.56537 53.0294 6.56537C54.5789 6.56537 55.846 7.76732 55.846 9.39647C55.846 11.0256 54.5789 12.2276 53.0294 12.2276Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M65.7314 5.63132C64.5367 5.63132 63.5085 6.14541 62.8713 7.04325V2.56128L61.8142 2.67713V12.9878H62.7192L62.8641 11.7497C63.494 12.6475 64.5077 13.1616 65.7024 13.1616C67.795 13.1616 69.4748 11.5759 69.4748 9.39647C69.4748 7.21703 67.8239 5.63132 65.7314 5.63132ZM65.6879 12.2276C64.1384 12.2276 62.8713 11.0256 62.8713 9.39647C62.8713 7.76732 64.1384 6.56537 65.6879 6.56537C67.1867 6.56537 68.3887 7.75284 68.3887 9.39647C68.3887 11.0401 67.1867 12.2276 65.6879 12.2276Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M76.2187 5.8051V9.9178C76.2187 11.3297 75.3136 12.1841 74.0465 12.1841C72.7866 12.1841 72.077 11.4456 72.077 10.1133V5.8051H71.0199V10.2726C71.0199 11.9669 72.1349 13.0965 73.7641 13.0965C74.843 13.0965 75.6901 12.6765 76.2187 11.9814V12.8937C76.2187 14.1608 75.2629 15.0804 73.8727 15.0804C72.7504 15.0804 71.8236 14.4794 71.5847 13.4295L70.6579 13.9074C71.0995 15.16 72.3087 16 73.8582 16C75.8132 16 77.2758 14.5953 77.2758 12.7923V5.8051H76.2187Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M108.672 10.4867C108.672 11.9077 107.411 12.7873 105.491 12.7873C104.464 12.7873 103.634 12.6028 102.84 12.2091C102.914 11.76 102.982 11.2187 103 10.5913C103.738 11.0219 104.575 11.231 105.381 11.231C106.34 11.231 106.839 11.0096 106.839 10.5421C106.857 10.0807 106.5 9.87155 105.067 9.59473C103.406 9.26255 102.668 8.57359 102.668 7.35559C102.668 5.97767 103.929 5.0857 105.848 5.0857C106.697 5.0857 107.54 5.24564 108.186 5.52246L107.866 7.06647C107.226 6.7712 106.537 6.63587 105.848 6.63587C104.95 6.63587 104.507 6.85733 104.507 7.29408C104.507 7.67547 104.815 7.83541 106.217 8.12453C108.007 8.50592 108.678 9.19488 108.678 10.4744L108.672 10.4867ZM112.879 11.0957C112.16 11.0957 111.581 10.7143 111.581 9.70546V6.88808H113.408L113.747 5.25794H111.581V2.93884C111.157 3.06187 110.517 3.2095 109.681 3.28332L109.662 10.0315C109.662 11.8708 110.763 12.7996 112.412 12.7996C112.787 12.7996 113.113 12.7627 113.39 12.6951L113.753 10.9665C113.525 11.0465 113.236 11.1018 112.879 11.1018V11.0957ZM114.965 12.6889H116.884V5.25794H114.965V12.6889ZM115.93 2.21912C115.309 2.21297 114.829 2.66817 114.823 3.27102C114.823 3.89232 115.278 4.35983 115.894 4.36598C116.515 4.36598 116.976 3.92923 116.989 3.32638C117.001 2.70508 116.546 2.23142 115.937 2.21912H115.93ZM126.056 5.25794V11.5263C126.056 13.8946 124.456 15.5247 121.756 15.5247C120.784 15.5247 119.714 15.3094 118.994 14.8973C119.492 14.3867 119.831 13.9438 120.046 13.6239C120.532 13.79 121.042 13.8762 121.565 13.8762C123.275 13.8762 124.143 12.9288 124.143 11.7354V11.4955C123.534 12.1968 122.654 12.6336 121.602 12.6336C119.584 12.6336 118.065 11.1326 118.065 8.90577C118.065 6.67893 119.726 5.098 121.756 5.098C122.808 5.098 123.724 5.4794 124.333 6.19912L124.395 5.25179H126.062L126.056 5.25794ZM124.155 8.90577C124.155 7.72468 123.294 6.82657 122.107 6.82657C120.919 6.82657 120.046 7.72468 120.046 8.90577C120.046 10.0868 120.907 10.9542 122.107 10.9542C123.306 10.9542 124.155 10.0561 124.155 8.90577ZM134.994 5.25794V11.5263C134.994 13.8946 133.394 15.5247 130.694 15.5247C129.722 15.5247 128.652 15.3094 127.932 14.8973C128.43 14.3867 128.769 13.9438 128.984 13.6239C129.47 13.79 129.98 13.8762 130.503 13.8762C132.213 13.8762 133.081 12.9288 133.081 11.7354V11.4955C132.472 12.1968 131.592 12.6336 130.54 12.6336C128.523 12.6336 127.003 11.1326 127.003 8.90577C127.003 6.67893 128.664 5.098 130.694 5.098C131.746 5.098 132.662 5.4794 133.271 6.19912L133.333 5.25179H135L134.994 5.25794ZM133.093 8.90577C133.093 7.72468 132.232 6.82657 131.045 6.82657C129.857 6.82657 128.984 7.72468 128.984 8.90577C128.984 10.0868 129.845 10.9542 131.045 10.9542C132.244 10.9542 133.093 10.0561 133.093 8.90577Z",fill:"#001E6C"}),jsxRuntime.jsx("path",{d:"M95.7092 14.9825C95.6354 15.0194 94.2267 15.6407 91.7353 15.5238C90.4374 15.4623 89.3117 15.2224 88.512 15.0009L92.8241 9.99361C93.5931 10.1905 94.5835 10.375 95.7092 10.4304C98.2005 10.5534 99.6092 9.92594 99.683 9.88903L95.7092 14.9886V14.9825ZM89.2686 5.36155C88.5612 2.96863 88.838 1.45537 88.8564 1.3754L84.8457 6.44421C84.8334 6.52418 84.5566 8.03744 85.2578 10.4304C85.6269 11.673 86.1252 12.7126 86.5312 13.4384L90.3759 8.0682C90.0068 7.36693 89.5885 6.44421 89.2686 5.3677V5.36155ZM99.2647 5.89058C98.6988 3.97132 97.813 2.55033 97.4501 2.009L93.8822 6.55494L94.5527 9.77216C94.9526 9.82752 95.3462 9.86443 95.7461 9.88903C95.9491 9.89518 96.1521 9.90134 96.3489 9.90134C98.2805 9.90134 99.357 9.44613 99.4739 9.39076L99.7507 9.26773C99.7753 8.60338 99.7322 7.42844 99.2709 5.88443L99.2647 5.89058ZM97.0256 1.68297C96.4166 1.45537 94.8295 0.932493 92.8303 0.83407C91.2248 0.754101 90.0744 0.987856 89.4347 1.1724L89.3793 1.46767C89.367 1.52919 89.121 2.96248 89.7792 5.20777C89.8899 5.58916 90.0252 5.9644 90.1729 6.33964L93.4577 6.22891L97.0318 1.68912L97.0256 1.68297Z",fill:"#001E6C"})]})),PS=cA;var $b="stigg-watermark",dA=Q(PS)`
|
|
4941
4941
|
* {
|
|
4942
4942
|
fill: ${({theme:t})=>t.stigg.palette.text.secondary};
|
|
4943
4943
|
}
|
|
4944
|
-
`,
|
|
4944
|
+
`,pA=Q.div`
|
|
4945
4945
|
align-self: ${({$alignSelf:t})=>t||"unset"};
|
|
4946
4946
|
|
|
4947
4947
|
@media (max-width: 1040px) {
|
|
4948
4948
|
${({$smallScreenAlign:t})=>t&&`align-self: ${t};`}
|
|
4949
4949
|
}
|
|
4950
|
-
`;function so({source:t,showWatermark:e,align:n,smallScreenAlign:r="center",style:i={}}){if(!e)return null;let o=()=>{let s=window.location.hostname.replace("www.","");window.open(`https://www.stigg.io/?utm_source=${s}&utm_medium=referral&utm_campaign=${t}`,"_blank");};return jsxRuntime.jsx(
|
|
4950
|
+
`;function so({source:t,showWatermark:e,align:n,smallScreenAlign:r="center",style:i={}}){if(!e)return null;let o=()=>{let s=window.location.hostname.replace("www.","");window.open(`https://www.stigg.io/?utm_source=${s}&utm_medium=referral&utm_campaign=${t}`,"_blank");};return jsxRuntime.jsx(pA,{$alignSelf:n,$smallScreenAlign:r,className:$b,style:W({cursor:"pointer"},i),onClick:o,children:jsxRuntime.jsx(dA,{})})}function Gb(t,e){return t.pricePoints.some(n=>n.billingPeriod===e)}function jb(t,e){return t.some(n=>Gb(n,e))}function ES(t,e,n){return t.filter(r=>r.pricingType!==Rn.Paid||Gb(r,e)).filter(r=>!n||!n({plan:r}))}var hA=Q.div`
|
|
4951
4951
|
color: ${({theme:t})=>t.stigg.palette.text.primary};
|
|
4952
4952
|
display: flex;
|
|
4953
4953
|
align-items: stretch;
|
|
@@ -4955,7 +4955,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4955
4955
|
flex-wrap: wrap;
|
|
4956
4956
|
padding: 10px 0;
|
|
4957
4957
|
gap: ${({theme:t})=>t.stigg.layout.planMargin};
|
|
4958
|
-
`,
|
|
4958
|
+
`,mA=Q.div`
|
|
4959
4959
|
display: flex;
|
|
4960
4960
|
flex-direction: column;
|
|
4961
4961
|
align-items: center;
|
|
@@ -4963,17 +4963,17 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4963
4963
|
& * {
|
|
4964
4964
|
box-sizing: border-box;
|
|
4965
4965
|
}
|
|
4966
|
-
`,
|
|
4966
|
+
`,gA=Q.div`
|
|
4967
4967
|
display: flex;
|
|
4968
4968
|
flex-direction: column;
|
|
4969
4969
|
align-items: center;
|
|
4970
|
-
`,_S=({plans:t,customer:e,currentSubscription:n,highlightedPlanId:r,selectedBillingPeriod:i,onBillingPeriodChanged:o,availableBillingPeriods:s,isCustomerOnTrial:c,onPlanSelected:p,paywallLocale:h,locale:v,shouldHidePlan:P,selectDefaultTierIndex:x,currentSubscriptionOverride:T,hideCompatibleAddons:I,showWatermark:R})=>{let A=SS(t),O=t.some(Y=>!!Y.description),N=jb(t,be.Monthly),V=jb(t,be.Annually),G=ES(t,i,P),X=Bv.useCallback((Y,at,pt)=>p({plan:Y,customer:e,subscription:n,intentionType:at,selectedBillingPeriod:i,billableFeatures:pt}),[e,i,n,p]),nt=!!n&&n.plan.pricingType===Rn.Custom,st=Bv.useMemo(()=>G.some(Y=>{var dt;let at=Y.pricePoints.filter(mt=>mt.billingPeriod===i),pt=(dt=Y.paywallCalculatedPricePoints)==null?void 0:dt.find(mt=>mt.billingPeriod===i);return at.length>1&&!!(pt!=null&&pt.additionalChargesMayApply)}),[i,G]),U=Bv.useMemo(()=>G.some(Y=>!!um(Y,i,h,v,N).unit),[i,N,v,h,G]),j=Bv.useMemo(()=>!nt&&G.some(Y=>{let at=cm({plan:Y,billingPeriod:i,currentSubscription:n,currentSubscriptionOverride:T});return Object.values(at).length>0}),[i,n,T,nt,G]),ut=G.some(Y=>Y.isCurrentCustomerPlan&&Y.trialDaysLeft);return jsxRuntime.jsx(hA,{className:"stigg-paywall-container",children:jsxRuntime.jsxs(mA,{className:"stigg-paywall-layout",children:[jsxRuntime.jsx(yS,{onBillingPeriodChanged:o,selectedBillingPeriod:i,availableBillingPeriods:s,discountRate:A}),jsxRuntime.jsx(fA,{className:"stigg-paywall-plans-layout",children:G.map(Y=>jsxRuntime.jsx(mS,{withUnitPriceRow:U,withTiersRow:j,withTrialLeftRow:ut,shouldShowDescriptionSection:O,hasMonthlyPrice:N,hasAnnuallyPrice:V,plan:Y,withStartingAtRow:st,currentSubscription:n,currentSubscriptionOverride:T,billingPeriod:i,isHighlighted:Y.id===r,isCustomerOnTrial:c,onPlanSelected:(at,pt)=>X(Y,at,pt),paywallLocale:h,locale:v,customer:e,isCustomerInCustomPlan:nt,selectDefaultTierIndex:x,hideCompatibleAddons:I},Y.id))}),jsxRuntime.jsx(so,{source:"paywall",align:"end",style:{marginTop:16},showWatermark:R})]})})};var zb=class{error(e,n,...r){console.error(e,n||{},r);}log(e,n){console.log(e,n||{});}debug(e,n){console.debug(e,n||{});}},tl=new zb;function TS(t,e,n){let r=t.flatMap(c=>c.pricePoints).map(c=>c.billingPeriod),i=lodash.countBy(r),o=lodash.uniq(r),s;if(n&&o.includes(n))s=n;else if(e){let c=e.find(p=>p.status===bi.Active);c&&c.prices.length>0&&(s=c==null?void 0:c.prices[0].billingPeriod);}return s||(s=(i[be.Monthly]||0)>(i[be.Annually]||0)?be.Monthly:be.Annually),{defaultBillingPeriod:s,availableBillingPeriods:o}}function IS(t){return $1__default.default.utc(t).diff($1__default.default.utc(),"days",false)+1}var fm={h1:{fontSize:"24px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"16px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};function el(t,e="px"){if(t)return `${t}${e}`}function hm(t){if(!t)return "normal";switch(t){case gb.Normal:return "normal";case gb.Bold:return "bold";default:return "normal"}}function $p(t,e){var r,i,o,s,c,p,h,v;let n=e||{h1:{fontSize:"32px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"24px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};return {fontFamilyUrl:(t==null?void 0:t.fontFamily)||void 0,h1:{fontSize:el((r=t==null?void 0:t.h1)==null?void 0:r.fontSize)||n.h1.fontSize,fontWeight:hm((i=t==null?void 0:t.h1)==null?void 0:i.fontWeight)||n.h1.fontWeight,semanticElement:n.h1.semanticElement},h2:{fontSize:el((o=t==null?void 0:t.h2)==null?void 0:o.fontSize)||n.h2.fontSize,fontWeight:hm((s=t==null?void 0:t.h2)==null?void 0:s.fontWeight)||n.h2.fontWeight,semanticElement:n.h2.semanticElement},h3:{fontSize:el((c=t==null?void 0:t.h3)==null?void 0:c.fontSize)||n.h3.fontSize,fontWeight:hm((p=t==null?void 0:t.h3)==null?void 0:p.fontWeight)||n.h3.fontWeight,semanticElement:n.h3.semanticElement},body:{fontSize:el((h=t==null?void 0:t.body)==null?void 0:h.fontSize)||n.body.fontSize,fontWeight:hm((v=t==null?void 0:t.body)==null?void 0:v.fontWeight)||n.body.fontWeight,semanticElement:n.body.semanticElement}}}function Hb(t){if(t)switch(t){case Jh.Left:return "left";case Jh.Center:return "center";case Jh.Right:return "right";default:return}}function kS(t){let{palette:e,customCss:n,typography:r}=t;return {palette:{primary:(e==null?void 0:e.primary)||void 0,backgroundPaper:(e==null?void 0:e.paywallBackgroundColor)||void 0,outlinedBorder:(e==null?void 0:e.borderColor)||void 0,backgroundHighlight:(e==null?void 0:e.currentPlanBackground)||void 0,text:{primary:(e==null?void 0:e.textColor)||void 0}},typography:$p(r),customCss:n||void 0}}function DS(t){let{palette:e,layout:n,customCss:r,typography:i}=t;return {customCss:r||void 0,palette:{primary:(e==null?void 0:e.primary)||void 0,backgroundPaper:(e==null?void 0:e.backgroundColor)||void 0,outlinedBorder:(e==null?void 0:e.borderColor)||void 0,backgroundHighlight:(e==null?void 0:e.currentPlanBackground)||void 0,text:{primary:(e==null?void 0:e.textColor)||void 0}},typography:$p(i),layout:{ctaAlignment:Hb(n==null?void 0:n.alignment),headerAlignment:Hb(n==null?void 0:n.alignment),descriptionAlignment:Hb(n==null?void 0:n.alignment),planMaxWidth:el(n==null?void 0:n.planWidth),planMinWidth:el(n==null?void 0:n.planWidth),planMargin:el(n==null?void 0:n.planMargin),planPadding:el(n==null?void 0:n.planPadding)}}}function AS(t){let{palette:e,typography:n,customCss:r}=t;return {palette:{primary:(e==null?void 0:e.primary)||void 0,backgroundPaper:(e==null?void 0:e.backgroundColor)||void 0,outlinedBorder:(e==null?void 0:e.borderColor)||void 0,text:{primary:(e==null?void 0:e.textColor)||void 0},backgroundHighlight:(e==null?void 0:e.summaryBackgroundColor)||void 0},typography:$p(n,fm),customCss:r||void 0}}function CA(t){let e=true,n=(t==null?void 0:t.find(o=>o.status===bi.InTrial))||null,r=n==null?void 0:n.plan,i=n!=null&&n.trialEndDate?IS(n.trialEndDate):void 0;return r||(e=false,n=(t==null?void 0:t.find(o=>o.status===bi.Active))||null,r=n==null?void 0:n.plan),{currentSubscription:n,currentPlan:r,isCustomerOnTrial:e,trialDaysLeft:i}}function RS(t,e,n){var G,X;let{plans:r,currency:i,configuration:o,customer:s,activeSubscriptions:c,paywallCalculatedPricePoints:p}=t||{},{currentSubscription:h,currentPlan:v,isCustomerOnTrial:P,trialDaysLeft:x}=CA(c),T=n==null?void 0:n({currentSubscription:h}),I=(h==null?void 0:h.scheduledUpdates)||[],R=(G=h==null?void 0:h.price)==null?void 0:G.billingPeriod,A=I.find(({subscriptionScheduleType:nt})=>nt===Ui.Downgrade),O=I.find(({subscriptionScheduleType:nt})=>nt===Ui.BillingPeriod),N=px__default.default(r,nt=>nt.order).map(nt=>{var ut;let st=(ut=s==null?void 0:s.eligibleForTrial)==null?void 0:ut.find(Y=>Y.productId===nt.product.id),U=T!=null&&T.planId?(T==null?void 0:T.planId)===nt.id:nt.id===(v==null?void 0:v.id),j=Y=>{var mt;let at=A==null?void 0:A.scheduleVariables,pt=O==null?void 0:O.scheduleVariables,dt=nt.pricePoints.some(Ct=>Ct.billingPeriod===Y);return A?((mt=A.targetPackage)==null?void 0:mt.refId)===nt.id&&(!dt||at.billingPeriod===Y):O&&U?pt.billingPeriod===Y:false};return St(W({},nt),{paywallCalculatedPricePoints:p==null?void 0:p.filter(Y=>Y.planId===nt.id),isTriable:!lm__default.default(nt.defaultTrialConfig)&&(!st||st.eligible),isCurrentCustomerPlan:U,currentCustomerPlanBillingPeriod:R,isUpcomingPlan:false,trialDaysLeft:x,isNextPlan:j,paywallCurrency:i,scheduledUpdate:A||O})});if(r&&v){let nt=v&&((X=r==null?void 0:r.find(st=>st.id===(v==null?void 0:v.id)))==null?void 0:X.order);lm__default.default(nt)||(N=N.map(st=>St(W({},st),{isLowerThanCurrentPlan:nt>st.order})),e&&(N=N.filter(st=>st.order>=nt)));}let V=o?DS(o):void 0;return {currentPlan:v,currentSubscription:h,currentSubscriptionOverride:T,isCustomerOnTrial:P,plans:N,paywallConfiguration:V}}var MS="7.12.0";var NS="@stigg/react-sdk";var Gp=Bv__default.default.createContext(null);Gp.displayName="StiggContext";var _A="en-US",TA=({apiKey:t,baseUri:e,baseEdgeUri:n,enableEdge:r,customerId:i,customerToken:o,resourceId:s,theme:c,locale:p,cacheTtlMs:h,useEntitlementPolling:v,entitlementPollingInterval:P,entitlementsFallback:x,stiggClient:T,children:I,offline:R,clientName:A=NS,clientVersion:O=MS})=>{let N=Bv.useRef(t),V={apiKey:t,customerId:i,customerToken:o,resourceId:s,baseUri:e,baseEdgeUri:n,enableEdge:r,entitlementsFallback:x,cacheTtlMs:h,useEntitlementPolling:v,entitlementPollingInterval:P,clientName:A,clientVersion:O,offline:R},[G,X]=Bv.useState(()=>({stigg:T!=null?T:bb.initialize(St(W({},V),{lazyLoad:true})),locale:p||_A,isInitialized:false,theme:c,refreshData:()=>ce(null,null,function*(){X(nt=>St(W({},nt),{customerPortalUpdatedAt:new Date})),yield G.stigg.refresh();})}));return Bv.useEffect(()=>{let nt=true,st=Y=>{nt&&X(Y);},U=()=>st(Y=>St(W({},Y),{updatedAt:new Date})),j=Y=>st(at=>(at.stigg&&at.stigg.removeListener("entitlementsUpdated",U),Y.addListener("entitlementsUpdated",U),St(W({},at),{stigg:Y,isInitialized:true,updatedAt:new Date})));return ce(null,null,function*(){let Y=G.stigg;t!==N.current&&(tl.log("Updating stigg client",{apiKey:t}),N.current=t,Y=bb.initialize(W({},V)),st(at=>St(W({},at),{isInitialized:false,updatedAt:new Date}))),yield Y.waitForInitialization(),j(Y);}),()=>{nt=false,G.stigg.removeListener("entitlementsUpdated",U),G.stigg.clearCustomer();}},[t]),Bv.useEffect(()=>{let nt=G.stigg;i?nt.setCustomerId(i,o,s):nt.clearCustomer();},[i,o,s]),Bv.useEffect(()=>{X(nt=>St(W({},nt),{theme:c}));},[c]),jsxRuntime.jsx(Gp.Provider,{value:G,children:jsxRuntime.jsx(nl.SkeletonTheme,{baseColor:"#F5F6F9",highlightColor:"#e5e6ea",children:I})})};function ve(t){let{optional:e}=t||{},n=Bv.useContext(Gp);if(!n&&!e)throw new Error("Could not find Stigg context; You need to wrap your app in an <StiggProvider> component.");return n}function BS({productId:t,resourceId:e,showOnlyEligiblePlans:n,billingCountryCode:r,preferredBillingPeriod:i,currentSubscriptionOverrideFn:o}){let{stigg:s,locale:c}=ve(),[p,h]=Bv.useState(be.Annually),[v,P]=Bv.useState([]),[x,T]=Bv.useState(null),[I,R]=Bv.useState(true);Bv.useEffect(()=>{ce(null,null,function*(){try{R(!0),yield s.waitForInitialization();let N=yield s.getPaywall({productId:t,resourceId:e,billingCountryCode:r}),{availableBillingPeriods:V,defaultBillingPeriod:G}=TS(N.plans,N.activeSubscriptions,i);T(N),P(V),h(G);}catch(N){tl.error(`Failed to load paywall ${N==null?void 0:N.message}`,N);}finally{R(false);}});},[s,t,s.isCustomerLoaded,r,e,i]);let A=RS(x,n,o);return W({customer:(x==null?void 0:x.customer)||null,isLoading:I,selectedBillingPeriod:p,setSelectedBillingPeriod:h,availableBillingPeriods:v,locale:c,configuration:A.paywallConfiguration,showWatermark:s.getShowWatermark()},A)}function US(t){return zD__default.default({highlightChip:"Recommended",addonsTitle:"Available add-ons:",planCTAButton:{upgrade:"Upgrade",downgrade:"Downgrade",startTrial:n=>{var r;return `Start ${(r=n.defaultTrialConfig)==null?void 0:r.duration} day trial`},custom:"Contact us",currentPlan:"Current plan",startNew:"Get started",switchToBillingPeriod:n=>n===be.Monthly?"Switch to monthly billing":"Switch to annual billing",cancelScheduledUpdate:"Cancel"},price:{startingAtCaption:"Starts at",pricePeriod:n=>n===be.Monthly?"/ month":"/ year",free:n=>({price:`${n==null?void 0:n.symbol}0`}),custom:"Custom",priceNotSet:"Price not set"}},t)}var DA=t=>jsxRuntime.jsx("svg",St(W({width:15,height:11,viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M5.59 7.9899L2.125 4.5249C1.73524 4.13514 1.10365 4.13402 0.712509 4.52241V4.52241C0.319409 4.91274 0.318286 5.54819 0.710005 5.9399L5.59 10.8199L14.2948 2.11513C14.6843 1.72565 14.6843 1.09417 14.2948 0.704691V0.704691C13.9055 0.315381 13.2743 0.315184 12.8848 0.70425L5.59 7.9899Z",fill:"#B2BBD3"})})),GS=DA;var AA=Q.div`
|
|
4970
|
+
`,_S=({plans:t,customer:e,currentSubscription:n,highlightedPlanId:r,selectedBillingPeriod:i,onBillingPeriodChanged:o,availableBillingPeriods:s,isCustomerOnTrial:c,onPlanSelected:p,paywallLocale:h,locale:v,shouldHidePlan:P,selectDefaultTierIndex:x,currentSubscriptionOverride:T,hideCompatibleAddons:I,showWatermark:R})=>{let A=SS(t),O=t.some(Y=>!!Y.description),N=jb(t,be.Monthly),V=jb(t,be.Annually),G=ES(t,i,P),X=Bv.useCallback((Y,at,pt)=>p({plan:Y,customer:e,subscription:n,intentionType:at,selectedBillingPeriod:i,billableFeatures:pt}),[e,i,n,p]),nt=!!n&&n.plan.pricingType===Rn.Custom,st=Bv.useMemo(()=>G.some(Y=>{var dt;let at=Y.pricePoints.filter(mt=>mt.billingPeriod===i),pt=(dt=Y.paywallCalculatedPricePoints)==null?void 0:dt.find(mt=>mt.billingPeriod===i);return at.length>1&&!!(pt!=null&&pt.additionalChargesMayApply)}),[i,G]),U=Bv.useMemo(()=>G.some(Y=>!!um(Y,i,h,v,N).unit),[i,N,v,h,G]),j=Bv.useMemo(()=>!nt&&G.some(Y=>{let at=cm({plan:Y,billingPeriod:i,currentSubscription:n,currentSubscriptionOverride:T});return Object.values(at).length>0}),[i,n,T,nt,G]),ut=G.some(Y=>Y.isCurrentCustomerPlan&&Y.trialDaysLeft);return jsxRuntime.jsx(mA,{className:"stigg-paywall-container",children:jsxRuntime.jsxs(gA,{className:"stigg-paywall-layout",children:[jsxRuntime.jsx(yS,{onBillingPeriodChanged:o,selectedBillingPeriod:i,availableBillingPeriods:s,discountRate:A}),jsxRuntime.jsx(hA,{className:"stigg-paywall-plans-layout",children:G.map(Y=>jsxRuntime.jsx(mS,{withUnitPriceRow:U,withTiersRow:j,withTrialLeftRow:ut,shouldShowDescriptionSection:O,hasMonthlyPrice:N,hasAnnuallyPrice:V,plan:Y,withStartingAtRow:st,currentSubscription:n,currentSubscriptionOverride:T,billingPeriod:i,isHighlighted:Y.id===r,isCustomerOnTrial:c,onPlanSelected:(at,pt)=>X(Y,at,pt),paywallLocale:h,locale:v,customer:e,isCustomerInCustomPlan:nt,selectDefaultTierIndex:x,hideCompatibleAddons:I},Y.id))}),jsxRuntime.jsx(so,{source:"paywall",align:"end",style:{marginTop:16},showWatermark:R})]})})};var zb=class{error(e,n,...r){console.error(e,n||{},r);}log(e,n){console.log(e,n||{});}debug(e,n){console.debug(e,n||{});}},tl=new zb;function TS(t,e,n){let r=t.flatMap(c=>c.pricePoints).map(c=>c.billingPeriod),i=lodash.countBy(r),o=lodash.uniq(r),s;if(n&&o.includes(n))s=n;else if(e){let c=e.find(p=>p.status===bi.Active);c&&c.prices.length>0&&(s=c==null?void 0:c.prices[0].billingPeriod);}return s||(s=(i[be.Monthly]||0)>(i[be.Annually]||0)?be.Monthly:be.Annually),{defaultBillingPeriod:s,availableBillingPeriods:o}}function IS(t){return $1__default.default.utc(t).diff($1__default.default.utc(),"days",false)+1}var fm={h1:{fontSize:"24px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"16px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};function el(t,e="px"){if(t)return `${t}${e}`}function hm(t){if(!t)return "normal";switch(t){case gb.Normal:return "normal";case gb.Bold:return "bold";default:return "normal"}}function $p(t,e){var r,i,o,s,c,p,h,v;let n=e||{h1:{fontSize:"32px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"24px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};return {fontFamilyUrl:(t==null?void 0:t.fontFamily)||void 0,h1:{fontSize:el((r=t==null?void 0:t.h1)==null?void 0:r.fontSize)||n.h1.fontSize,fontWeight:hm((i=t==null?void 0:t.h1)==null?void 0:i.fontWeight)||n.h1.fontWeight,semanticElement:n.h1.semanticElement},h2:{fontSize:el((o=t==null?void 0:t.h2)==null?void 0:o.fontSize)||n.h2.fontSize,fontWeight:hm((s=t==null?void 0:t.h2)==null?void 0:s.fontWeight)||n.h2.fontWeight,semanticElement:n.h2.semanticElement},h3:{fontSize:el((c=t==null?void 0:t.h3)==null?void 0:c.fontSize)||n.h3.fontSize,fontWeight:hm((p=t==null?void 0:t.h3)==null?void 0:p.fontWeight)||n.h3.fontWeight,semanticElement:n.h3.semanticElement},body:{fontSize:el((h=t==null?void 0:t.body)==null?void 0:h.fontSize)||n.body.fontSize,fontWeight:hm((v=t==null?void 0:t.body)==null?void 0:v.fontWeight)||n.body.fontWeight,semanticElement:n.body.semanticElement}}}function Hb(t){if(t)switch(t){case Jh.Left:return "left";case Jh.Center:return "center";case Jh.Right:return "right";default:return}}function kS(t){let{palette:e,customCss:n,typography:r}=t;return {palette:{primary:(e==null?void 0:e.primary)||void 0,backgroundPaper:(e==null?void 0:e.paywallBackgroundColor)||void 0,outlinedBorder:(e==null?void 0:e.borderColor)||void 0,backgroundHighlight:(e==null?void 0:e.currentPlanBackground)||void 0,text:{primary:(e==null?void 0:e.textColor)||void 0}},typography:$p(r),customCss:n||void 0}}function DS(t){let{palette:e,layout:n,customCss:r,typography:i}=t;return {customCss:r||void 0,palette:{primary:(e==null?void 0:e.primary)||void 0,backgroundPaper:(e==null?void 0:e.backgroundColor)||void 0,outlinedBorder:(e==null?void 0:e.borderColor)||void 0,backgroundHighlight:(e==null?void 0:e.currentPlanBackground)||void 0,text:{primary:(e==null?void 0:e.textColor)||void 0}},typography:$p(i),layout:{ctaAlignment:Hb(n==null?void 0:n.alignment),headerAlignment:Hb(n==null?void 0:n.alignment),descriptionAlignment:Hb(n==null?void 0:n.alignment),planMaxWidth:el(n==null?void 0:n.planWidth),planMinWidth:el(n==null?void 0:n.planWidth),planMargin:el(n==null?void 0:n.planMargin),planPadding:el(n==null?void 0:n.planPadding)}}}function AS(t){let{palette:e,typography:n,customCss:r}=t;return {palette:{primary:(e==null?void 0:e.primary)||void 0,backgroundPaper:(e==null?void 0:e.backgroundColor)||void 0,outlinedBorder:(e==null?void 0:e.borderColor)||void 0,text:{primary:(e==null?void 0:e.textColor)||void 0},backgroundHighlight:(e==null?void 0:e.summaryBackgroundColor)||void 0},typography:$p(n,fm),customCss:r||void 0}}function SA(t){let e=true,n=(t==null?void 0:t.find(o=>o.status===bi.InTrial))||null,r=n==null?void 0:n.plan,i=n!=null&&n.trialEndDate?IS(n.trialEndDate):void 0;return r||(e=false,n=(t==null?void 0:t.find(o=>o.status===bi.Active))||null,r=n==null?void 0:n.plan),{currentSubscription:n,currentPlan:r,isCustomerOnTrial:e,trialDaysLeft:i}}function RS(t,e,n){var G,X;let{plans:r,currency:i,configuration:o,customer:s,activeSubscriptions:c,paywallCalculatedPricePoints:p}=t||{},{currentSubscription:h,currentPlan:v,isCustomerOnTrial:P,trialDaysLeft:x}=SA(c),T=n==null?void 0:n({currentSubscription:h}),I=(h==null?void 0:h.scheduledUpdates)||[],R=(G=h==null?void 0:h.price)==null?void 0:G.billingPeriod,A=I.find(({subscriptionScheduleType:nt})=>nt===Ui.Downgrade),O=I.find(({subscriptionScheduleType:nt})=>nt===Ui.BillingPeriod),N=px__default.default(r,nt=>nt.order).map(nt=>{var ut;let st=(ut=s==null?void 0:s.eligibleForTrial)==null?void 0:ut.find(Y=>Y.productId===nt.product.id),U=T!=null&&T.planId?(T==null?void 0:T.planId)===nt.id:nt.id===(v==null?void 0:v.id),j=Y=>{var mt;let at=A==null?void 0:A.scheduleVariables,pt=O==null?void 0:O.scheduleVariables,dt=nt.pricePoints.some(Ct=>Ct.billingPeriod===Y);return A?((mt=A.targetPackage)==null?void 0:mt.refId)===nt.id&&(!dt||at.billingPeriod===Y):O&&U?pt.billingPeriod===Y:false};return St(W({},nt),{paywallCalculatedPricePoints:p==null?void 0:p.filter(Y=>Y.planId===nt.id),isTriable:!lm__default.default(nt.defaultTrialConfig)&&(!st||st.eligible),isCurrentCustomerPlan:U,currentCustomerPlanBillingPeriod:R,isUpcomingPlan:false,trialDaysLeft:x,isNextPlan:j,paywallCurrency:i,scheduledUpdate:A||O})});if(r&&v){let nt=v&&((X=r==null?void 0:r.find(st=>st.id===(v==null?void 0:v.id)))==null?void 0:X.order);lm__default.default(nt)||(N=N.map(st=>St(W({},st),{isLowerThanCurrentPlan:nt>st.order})),e&&(N=N.filter(st=>st.order>=nt)));}let V=o?DS(o):void 0;return {currentPlan:v,currentSubscription:h,currentSubscriptionOverride:T,isCustomerOnTrial:P,plans:N,paywallConfiguration:V}}var MS="7.12.2";var NS="@stigg/react-sdk";var Gp=Bv__default.default.createContext(null);Gp.displayName="StiggContext";var TA="en-US",wA=({apiKey:t,baseUri:e,baseEdgeUri:n,enableEdge:r,customerId:i,customerToken:o,resourceId:s,theme:c,locale:p,cacheTtlMs:h,useEntitlementPolling:v,entitlementPollingInterval:P,entitlementsFallback:x,stiggClient:T,children:I,offline:R,clientName:A=NS,clientVersion:O=MS})=>{let N=Bv.useRef(t),V={apiKey:t,customerId:i,customerToken:o,resourceId:s,baseUri:e,baseEdgeUri:n,enableEdge:r,entitlementsFallback:x,cacheTtlMs:h,useEntitlementPolling:v,entitlementPollingInterval:P,clientName:A,clientVersion:O,offline:R},[G,X]=Bv.useState(()=>({stigg:T!=null?T:bb.initialize(St(W({},V),{lazyLoad:true})),locale:p||TA,isInitialized:false,theme:c,refreshData:()=>ce(null,null,function*(){X(nt=>St(W({},nt),{customerPortalUpdatedAt:new Date})),yield G.stigg.refresh();})}));return Bv.useEffect(()=>{let nt=true,st=Y=>{nt&&X(Y);},U=()=>st(Y=>St(W({},Y),{updatedAt:new Date})),j=Y=>st(at=>(at.stigg&&at.stigg.removeListener("entitlementsUpdated",U),Y.addListener("entitlementsUpdated",U),St(W({},at),{stigg:Y,isInitialized:true,updatedAt:new Date})));return ce(null,null,function*(){let Y=G.stigg;t!==N.current&&(tl.log("Updating stigg client",{apiKey:t}),N.current=t,Y=bb.initialize(W({},V)),st(at=>St(W({},at),{isInitialized:false,updatedAt:new Date}))),yield Y.waitForInitialization(),j(Y);}),()=>{nt=false,G.stigg.removeListener("entitlementsUpdated",U),G.stigg.clearCustomer();}},[t]),Bv.useEffect(()=>{let nt=G.stigg;i?nt.setCustomerId(i,o,s):nt.clearCustomer();},[i,o,s]),Bv.useEffect(()=>{X(nt=>St(W({},nt),{theme:c}));},[c]),jsxRuntime.jsx(Gp.Provider,{value:G,children:jsxRuntime.jsx(nl.SkeletonTheme,{baseColor:"#F5F6F9",highlightColor:"#e5e6ea",children:I})})};function ve(t){let{optional:e}=t||{},n=Bv.useContext(Gp);if(!n&&!e)throw new Error("Could not find Stigg context; You need to wrap your app in an <StiggProvider> component.");return n}function BS({productId:t,resourceId:e,showOnlyEligiblePlans:n,billingCountryCode:r,preferredBillingPeriod:i,currentSubscriptionOverrideFn:o}){let{stigg:s,locale:c}=ve(),[p,h]=Bv.useState(be.Annually),[v,P]=Bv.useState([]),[x,T]=Bv.useState(null),[I,R]=Bv.useState(true);Bv.useEffect(()=>{ce(null,null,function*(){try{R(!0),yield s.waitForInitialization();let N=yield s.getPaywall({productId:t,resourceId:e,billingCountryCode:r}),{availableBillingPeriods:V,defaultBillingPeriod:G}=TS(N.plans,N.activeSubscriptions,i);T(N),P(V),h(G);}catch(N){tl.error(`Failed to load paywall ${N==null?void 0:N.message}`,N);}finally{R(false);}});},[s,t,s.isCustomerLoaded,r,e,i]);let A=RS(x,n,o);return W({customer:(x==null?void 0:x.customer)||null,isLoading:I,selectedBillingPeriod:p,setSelectedBillingPeriod:h,availableBillingPeriods:v,locale:c,configuration:A.paywallConfiguration,showWatermark:s.getShowWatermark()},A)}function US(t){return HD__default.default({highlightChip:"Recommended",addonsTitle:"Available add-ons:",planCTAButton:{upgrade:"Upgrade",downgrade:"Downgrade",startTrial:n=>{var r;return `Start ${(r=n.defaultTrialConfig)==null?void 0:r.duration} day trial`},custom:"Contact us",currentPlan:"Current plan",startNew:"Get started",switchToBillingPeriod:n=>n===be.Monthly?"Switch to monthly billing":"Switch to annual billing",cancelScheduledUpdate:"Cancel"},price:{startingAtCaption:"Starts at",pricePeriod:n=>n===be.Monthly?"/ month":"/ year",free:n=>({price:`${n==null?void 0:n.symbol}0`}),custom:"Custom",priceNotSet:"Price not set"}},t)}var AA=t=>jsxRuntime.jsx("svg",St(W({width:15,height:11,viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{d:"M5.59 7.9899L2.125 4.5249C1.73524 4.13514 1.10365 4.13402 0.712509 4.52241V4.52241C0.319409 4.91274 0.318286 5.54819 0.710005 5.9399L5.59 10.8199L14.2948 2.11513C14.6843 1.72565 14.6843 1.09417 14.2948 0.704691V0.704691C13.9055 0.315381 13.2743 0.315184 12.8848 0.70425L5.59 7.9899Z",fill:"#B2BBD3"})})),GS=AA;var OA=Q.div`
|
|
4971
4971
|
display: flex;
|
|
4972
4972
|
flex-direction: column;
|
|
4973
4973
|
align-items: center;
|
|
4974
4974
|
`,qb=Q(GS)`
|
|
4975
4975
|
margin-right: 16px;
|
|
4976
|
-
`,
|
|
4976
|
+
`,RA=Q.div`
|
|
4977
4977
|
display: flex;
|
|
4978
4978
|
flex-direction: column;
|
|
4979
4979
|
align-items: flex-start;
|
|
@@ -4985,7 +4985,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4985
4985
|
max-width: ${({theme:t})=>t.stigg.layout.planMaxWidth};
|
|
4986
4986
|
min-height: 450px;
|
|
4987
4987
|
border: ${({theme:t})=>`1px solid ${t.stigg.palette.outlinedBorder}`};
|
|
4988
|
-
`,
|
|
4988
|
+
`,FA=Q.div`
|
|
4989
4989
|
display: flex;
|
|
4990
4990
|
gap: ${({theme:t})=>t.stigg.layout.planMargin};
|
|
4991
4991
|
flex-wrap: wrap;
|
|
@@ -4994,16 +4994,16 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
4994
4994
|
display: flex;
|
|
4995
4995
|
align-items: center;
|
|
4996
4996
|
margin-bottom: 12px;
|
|
4997
|
-
`,FA=Q.div`
|
|
4998
|
-
margin-top: auto;
|
|
4999
4997
|
`,MA=Q.div`
|
|
4998
|
+
margin-top: auto;
|
|
4999
|
+
`,NA=Q.div`
|
|
5000
5000
|
width: 150px;
|
|
5001
5001
|
margin-bottom: ${({theme:t})=>t.stigg.layout.switchBottomSpacing};
|
|
5002
5002
|
padding: 12px 12px;
|
|
5003
5003
|
border-radius: 10px;
|
|
5004
5004
|
background-color: white;
|
|
5005
5005
|
border: ${({theme:t})=>`1px solid ${t.stigg.palette.outlinedBorder}`};
|
|
5006
|
-
`;function
|
|
5006
|
+
`;function LA(){return jsxRuntime.jsxs(RA,{children:[jsxRuntime.jsx(nl__default.default,{width:120,borderRadius:4}),jsxRuntime.jsx(nl__default.default,{circle:true,width:40,height:40}),jsxRuntime.jsx(nl__default.default,{style:{marginBottom:33},width:120,borderRadius:4}),jsxRuntime.jsxs(Yb,{children:[jsxRuntime.jsx(qb,{}),jsxRuntime.jsx(nl__default.default,{width:120,borderRadius:4})]}),jsxRuntime.jsxs(Yb,{children:[jsxRuntime.jsx(qb,{}),jsxRuntime.jsx(nl__default.default,{width:120,borderRadius:4})]}),jsxRuntime.jsxs(Yb,{children:[jsxRuntime.jsx(qb,{}),jsxRuntime.jsx(nl__default.default,{width:120,borderRadius:4})]}),jsxRuntime.jsx(MA,{children:jsxRuntime.jsx(nl__default.default,{height:50,borderRadius:4})})]})}function jS({skeletonPlanCount:t=3}){return jsxRuntime.jsxs(OA,{className:"stigg-skeleton-loader-container",children:[jsxRuntime.jsx(NA,{className:"stigg-skeleton-loader-billing-period",children:jsxRuntime.jsx(nl__default.default,{borderRadius:4})}),jsxRuntime.jsx(FA,{className:"stigg-skeleton-loader-plans-container",children:Array.from({length:t}).map((e,n)=>jsxRuntime.jsx(LA,{},n))})]})}var VS=({externalFontUrl:t})=>jsxRuntime.jsx(react.Global,{styles:react.css`
|
|
5007
5007
|
${t&&`
|
|
5008
5008
|
@font-face {
|
|
5009
5009
|
font-family: 'custom-font';
|
|
@@ -5073,11 +5073,11 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5073
5073
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,
|
|
5074
5074
|
U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
5075
5075
|
}
|
|
5076
|
-
`});var
|
|
5076
|
+
`});var qA=Q.div`
|
|
5077
5077
|
${({$customCss:t})=>t&&react.css`
|
|
5078
5078
|
${t}
|
|
5079
5079
|
`}
|
|
5080
|
-
`;function pc(t){let{theme:e}=ve(),n=
|
|
5080
|
+
`;function pc(t){let{theme:e}=ve(),n=HD__default.default(t,e);return YC(n)}var YA=t=>({primary:{main:t.palette.primary}}),vi=({children:t,componentTheme:e})=>{let n=pc(e),r=YA(n),i=styles.createTheme({palette:r,stigg:n});return jsxRuntime.jsx(styles.ThemeProvider,{theme:{[styles.THEME_ID]:i},children:jsxRuntime.jsx(react.ThemeProvider,{theme:{stigg:n},children:jsxRuntime.jsxs(qA,{$customCss:n.customCss,children:[jsxRuntime.jsx(VS,{externalFontUrl:n.typography.fontFamilyUrl}),t]})})})};var Mo=Bv__default.default.createContext(null);Mo.displayName="CustomerPortalContext";var ir=()=>{let t=Bv.useContext(Mo);if(!t)throw new Error("Could not find Customer portal context; You need to wrap your customer portal components in an <CustomerPortalProvider> component.");return t};function fc(t){return !!Bv.useContext(t)}var HS=({productId:t,resourceId:e,highlightedPlanId:n,showOnlyEligiblePlans:r,textOverrides:i,onPlanSelected:o,preferredBillingPeriod:s,onBillingPeriodChange:c,billingCountryCode:p,shouldHidePlan:h,selectDefaultTierIndex:v,currentSubscriptionOverride:P,hideCompatibleAddons:x,skeletonPlanCount:T=3})=>{let I=fc(Mo),R=false;if(I){let{isLoading:mt,resourceId:Ct}=ir();R=mt,e=Ct;}let{plans:A,customer:O,currentSubscription:N,currentSubscriptionOverride:V,isCustomerOnTrial:G,isLoading:X,selectedBillingPeriod:nt,setSelectedBillingPeriod:st,availableBillingPeriods:U,locale:j,configuration:ut,showWatermark:Y}=BS({productId:t,resourceId:e,showOnlyEligiblePlans:r,billingCountryCode:p,preferredBillingPeriod:s,currentSubscriptionOverrideFn:P}),at=US(i),dt=!A||X||R?jsxRuntime.jsx(jS,{skeletonPlanCount:T}):jsxRuntime.jsx(_S,{plans:A,customer:O,currentSubscription:N,currentSubscriptionOverride:V,selectedBillingPeriod:nt,onBillingPeriodChanged:mt=>{st(mt),c&&c(mt);},availableBillingPeriods:U,highlightedPlanId:n,isCustomerOnTrial:G,onPlanSelected:o,paywallLocale:at,locale:j,shouldHidePlan:h,selectDefaultTierIndex:v,hideCompatibleAddons:x,showWatermark:Y});return I?dt:jsxRuntime.jsx(vi,{componentTheme:ut,children:dt})};function qS({resourceId:t,productId:e}){let{stigg:n,customerPortalUpdatedAt:r}=ve(),[i,o]=Bv.useState(false),[s,c]=Bv.useState();return Bv.useEffect(()=>{ce(null,null,function*(){if(n.isCustomerLoaded)try{o(!0);let h=yield n.getCustomerPortal({resourceId:t,productId:e});c(h);}catch(h){tl.error(`Failed to load customer portal ${h==null?void 0:h.message}`,h);}finally{o(false);}});},[n,n.isCustomerLoaded,r,t,e]),{customerPortal:s,showWatermark:n.getShowWatermark(),isLoading:i}}function YS(t){return HD__default.default({manageSubscription:"Manage",usageTabTitle:"Usage",addonsTabTitle:"Add-ons",promotionsTabTitle:"Promotions",promotionsSubtitle:"You were granted access to additional functionality at no additional cost.",contactSupportTitle:"Have questions about your subscription?",contactSupportLink:"Contact support",editBilling:"Edit billing details",invoicesTitle:"Invoices",viewInvoiceHistory:"View invoice history",editPaymentDetails:"Edit",paywallSectionTitle:"Plans",cancelScheduledUpdatesButtonTitle:"Cancel"},t)}function QS(t,e,n){var i,o,s,c;return {sectionTitleColor:(e==null?void 0:e.sectionTitleColor)||t.palette.text.secondary,planNameColor:(e==null?void 0:e.planNameColor)||t.palette.text.primary,backgroundColor:(e==null?void 0:e.backgroundColor)||((i=n==null?void 0:n.palette)==null?void 0:i.backgroundColor)||"white",borderColor:(e==null?void 0:e.borderColor)||((o=n==null?void 0:n.palette)==null?void 0:o.borderColor)||"rgba(0, 30, 108, 0.15)",listItemBackgroundColor:(e==null?void 0:e.backgroundColor)||((s=n==null?void 0:n.palette)==null?void 0:s.backgroundColor)||"white",tabMaxHeight:(e==null?void 0:e.tabMaxHeight)||"380px",iconsColor:(e==null?void 0:e.iconsColor)||((c=n==null?void 0:n.palette)==null?void 0:c.iconsColor)||void 0,iconsBackgroundColor:e==null?void 0:e.iconsBackgroundColor}}function gm({children:t,textOverrides:e,theme:n,resourceId:r,productId:i}){let{customerPortalUpdatedAt:o}=ve(),{customerPortal:s,isLoading:c,showWatermark:p}=qS({resourceId:r,productId:i}),h=s!=null&&s.configuration?kS(s.configuration):void 0,v=pc(h),P=QS(v,n,s==null?void 0:s.configuration),x=YS(e);return jsxRuntime.jsx(vi,{componentTheme:h,children:jsxRuntime.jsx(Mo.Provider,{value:{customerPortal:s,isLoading:c,showWatermark:p,textOverrides:x,theme:P,resourceId:r},children:t},o==null?void 0:o.toString())})}var rl=Q(s2__default.default)`
|
|
5081
5081
|
border-radius: 10px;
|
|
5082
5082
|
padding: 8px 16px;
|
|
5083
5083
|
text-transform: none;
|
|
@@ -5086,7 +5086,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5086
5086
|
&:hover {
|
|
5087
5087
|
border-color: ${({theme:t})=>t.stigg.palette.outlinedRestingBorder};
|
|
5088
5088
|
}
|
|
5089
|
-
`;var
|
|
5089
|
+
`;var tO=t=>jsxRuntime.jsx("svg",St(W({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3333 2.5L17.5 6.66667L6.66667 17.5H2.5V13.3333L13.3333 2.5V2.5Z",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})),ZS=tO;var ca=Q.div`
|
|
5090
5090
|
display: flex;
|
|
5091
5091
|
align-items: center;
|
|
5092
5092
|
justify-content: space-between;
|
|
@@ -5096,11 +5096,11 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5096
5096
|
margin-bottom: 32px;
|
|
5097
5097
|
}
|
|
5098
5098
|
`};
|
|
5099
|
-
`;function ua({title:t,className:e,isLoading:n}){let{theme:r}=ir();return n?jsxRuntime.jsx(nl__default.default,{width:120}):jsxRuntime.jsx(rt,{className:e,overrideColor:r.sectionTitleColor,variant:"h3",bold:true,children:t})}var
|
|
5099
|
+
`;function ua({title:t,className:e,isLoading:n}){let{theme:r}=ir();return n?jsxRuntime.jsx(nl__default.default,{width:120}):jsxRuntime.jsx(rt,{className:e,overrideColor:r.sectionTitleColor,variant:"h3",bold:true,children:t})}var nO=Q(ZS)`
|
|
5100
5100
|
path {
|
|
5101
5101
|
stroke: ${({theme:t})=>t.stigg.palette.primary};
|
|
5102
5102
|
}
|
|
5103
|
-
`;function nP({onManageSubscription:t,hideManageButton:e,textOverrides:n}){return jsxRuntime.jsxs(ca,{className:"stigg-customer-portal-overview-header",$disableMargin:true,children:[jsxRuntime.jsx(ua,{title:"Subscription",className:"stigg-overview-title"}),!e&&jsxRuntime.jsxs(rl,{className:"stigg-manage-subscription-button",variant:"outlined",onClick:()=>t({intentionType:"MANAGE_SUBSCRIPTION"}),children:[jsxRuntime.jsx(
|
|
5103
|
+
`;function nP({onManageSubscription:t,hideManageButton:e,textOverrides:n}){return jsxRuntime.jsxs(ca,{className:"stigg-customer-portal-overview-header",$disableMargin:true,children:[jsxRuntime.jsx(ua,{title:"Subscription",className:"stigg-overview-title"}),!e&&jsxRuntime.jsxs(rl,{className:"stigg-manage-subscription-button",variant:"outlined",onClick:()=>t({intentionType:"MANAGE_SUBSCRIPTION"}),children:[jsxRuntime.jsx(nO,{className:"stigg-manage-subscription-button-image"}),jsxRuntime.jsx(rt,{className:"stigg-manage-subscription-button-text",color:"primary.main",style:{marginLeft:"8px"},variant:"body1",children:n==null?void 0:n.manageSubscription})]})]})}function ym(){let{customerPortal:t}=ir(),e=rO__default.default(t==null?void 0:t.subscriptions,n=>n.addons);return iO__default.default(e)?null:jsxRuntime.jsx("div",{className:"stigg-addons-list-layout",children:e.map((n,r)=>jsxRuntime.jsxs(rt,{as:"span",className:"stigg-addon-list-item-text",variant:"body1",children:[n.quantity>1&&`${n.quantity} X `,n.displayName,r===e.length-1?"":", "]},n.addonId))})}var rP=Q.div`
|
|
5104
5104
|
display: flex;
|
|
5105
5105
|
justify-content: space-between;
|
|
5106
5106
|
align-items: center;
|
|
@@ -5111,7 +5111,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5111
5111
|
& > *:first-of-type {
|
|
5112
5112
|
max-width: 60%;
|
|
5113
5113
|
}
|
|
5114
|
-
`;function
|
|
5114
|
+
`;function lO(t){var i;let{displayName:e,usageLimit:n,hasUnlimitedUsage:r}=t;return r?`Unlimited ${e}`:n?`${e} x ${(i=t.usageLimit)==null?void 0:i.toLocaleString()}`:e}function vm(){let{customerPortal:t,textOverrides:e,theme:n}=ir(),r=t==null?void 0:t.promotionalEntitlements;return jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[jsxRuntime.jsx(rt,{color:"secondary",children:e.promotionsSubtitle}),jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[jsxRuntime.jsxs(rP,{$borderColor:n.borderColor,children:[jsxRuntime.jsx(rt,{variant:"body1",bold:true,children:"Feature"}),jsxRuntime.jsx(rt,{variant:"body1",bold:true,children:"Expiration date"})]}),r==null?void 0:r.map((i,o)=>jsxRuntime.jsxs(rP,{$borderColor:n.borderColor,children:[jsxRuntime.jsx(rt,{variant:"body1",children:lO(i)}),jsxRuntime.jsx(rt,{variant:"body1",color:"disabled",children:i.endDate?$1__default.default.utc(i.endDate).format("MMM Do, YYYY"):"None"})]},`${i.displayName}-${o}`))]})]})}var iP=Q(uO__default.default)`
|
|
5115
5115
|
.MuiTabs-indicator {
|
|
5116
5116
|
background-color: #001e6c;
|
|
5117
5117
|
}
|
|
@@ -5132,28 +5132,28 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5132
5132
|
margin-bottom: 16px;
|
|
5133
5133
|
row-gap: 16px;
|
|
5134
5134
|
background-color: ${({$backgroundColor:t})=>t};
|
|
5135
|
-
`;function lP(t){let s=t,{children:e,value:n,index:r,maxHeight:i}=s,o=On(s,["children","value","index","maxHeight"]);return jsxRuntime.jsx("div",St(W({role:"tabpanel",hidden:n!==r},o),{children:n===r&&jsxRuntime.jsx(aP,{$maxHeight:i,children:e})}))}function cP({isSelected:t,label:e,icon:n}){let r=t?"primary":"secondary";return jsxRuntime.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[jsxRuntime.jsx(qn,{icon:n,svgStrokeColor:r}),jsxRuntime.jsx(rt,{variant:"h6",bold:t,color:r,children:e})]})}function uP({customerPortal:t,hiddenSections:e,textOverrides:n,theme:r}){let i=
|
|
5135
|
+
`;function lP(t){let s=t,{children:e,value:n,index:r,maxHeight:i}=s,o=On(s,["children","value","index","maxHeight"]);return jsxRuntime.jsx("div",St(W({role:"tabpanel",hidden:n!==r},o),{children:n===r&&jsxRuntime.jsx(aP,{$maxHeight:i,children:e})}))}function cP({isSelected:t,label:e,icon:n}){let r=t?"primary":"secondary";return jsxRuntime.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[jsxRuntime.jsx(qn,{icon:n,svgStrokeColor:r}),jsxRuntime.jsx(rt,{variant:"h6",bold:t,color:r,children:e})]})}function uP({customerPortal:t,hiddenSections:e,textOverrides:n,theme:r}){let i=rO__default.default(t.subscriptions,x=>x.addons),o=x=>e==null?void 0:e.some(T=>T===x),s=i.length>0&&!o("addons"),c=t.promotionalEntitlements.length>0&&!o("promotionalEntitlements"),[p,h]=Bv.useState(s?1:2),v=(x,T)=>{h(T);};return s||c?jsxRuntime.jsxs(oP,{children:[jsxRuntime.jsx(bg__default.default,{sx:{borderBottom:1,borderColor:"divider"},children:jsxRuntime.jsxs(iP,{value:p,onChange:v,children:[s?jsxRuntime.jsx(sP__default.default,{sx:{textTransform:"none"},value:1,label:jsxRuntime.jsx(cP,{isSelected:p===1,label:n.addonsTabTitle,icon:"Addons"})}):null,c?jsxRuntime.jsx(sP__default.default,{sx:{textTransform:"none"},value:2,label:jsxRuntime.jsx(cP,{isSelected:p===2,label:n.promotionsTabTitle,icon:"Promotions"})}):null]})}),jsxRuntime.jsx(lP,{value:p,index:1,maxHeight:r.tabMaxHeight,children:jsxRuntime.jsx(ym,{})}),jsxRuntime.jsx(lP,{value:p,index:2,maxHeight:r.tabMaxHeight,children:jsxRuntime.jsx(vm,{})})]}):null}var dP={xs:320,sm:640,md:768,lg:1024,xl:1280,xxl:1536},Jb=t=>`(min-width: ${dP[t]}px)`,qr=Object.keys(dP).reduce((t,e)=>St(W({},t),{[e]:`@media ${Jb(e)}`}),{});function Ci(t){return material.useMediaQuery(Jb(t))}var mO=Q.div`
|
|
5136
5136
|
display: flex;
|
|
5137
5137
|
justify-content: space-between;
|
|
5138
5138
|
flex-wrap: wrap;
|
|
5139
|
-
`,
|
|
5139
|
+
`,gO=Q.div`
|
|
5140
5140
|
display: flex;
|
|
5141
5141
|
flex-direction: column;
|
|
5142
5142
|
gap: 32px;
|
|
5143
|
-
`;function fP(){let t=Ci("md");return jsxRuntime.jsxs(
|
|
5143
|
+
`;function fP(){let t=Ci("md");return jsxRuntime.jsxs(mO,{className:"stigg-subscription-overview-skeleton-layout",children:[jsxRuntime.jsxs(gO,{children:[jsxRuntime.jsx(nl__default.default,{width:120}),jsxRuntime.jsx(nl__default.default,{width:120})]}),jsxRuntime.jsx(nl__default.default,{width:t?295:260,height:193})]})}function bO({scheduleUpdate:t}){let{targetPackage:e}=t;return jsxRuntime.jsxs(da__default.default,{container:true,alignItems:"center",children:[jsxRuntime.jsx(da__default.default,{children:jsxRuntime.jsx(reactFeather.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),jsxRuntime.jsx(da__default.default,{item:true,children:jsxRuntime.jsxs(rt,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Downgrade to the ",jsxRuntime.jsx("b",{children:e==null?void 0:e.displayName})," plan"]})})]})}function vO({scheduleUpdate:t}){let{scheduleVariables:e}=t,{billingPeriod:n}=e,r=n===be.Monthly?"annually":"monthly",i=n===be.Monthly?"monthly":"annually";return jsxRuntime.jsxs(da__default.default,{container:true,alignItems:"center",children:[jsxRuntime.jsx(da__default.default,{children:jsxRuntime.jsx(reactFeather.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),jsxRuntime.jsx(da__default.default,{item:true,children:jsxRuntime.jsxs(rt,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Change from an ",r," to a ",jsxRuntime.jsx("b",{children:i})," billing cycle"]})})]})}function CO({subscription:t,scheduleUpdate:e}){let{scheduleVariables:n}=e,{newUnitAmount:r,featureId:i}=n,s=lodash.compact(t.prices.map(({feature:v})=>v)).find(v=>v.id===i);if(!s)return null;let{featureUnits:c,featureUnitsPlural:p}=s;return jsxRuntime.jsxs(da__default.default,{container:true,alignItems:"flex-start",flexWrap:"nowrap",children:[jsxRuntime.jsx(da__default.default,{children:jsxRuntime.jsx(reactFeather.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),jsxRuntime.jsx(da__default.default,{item:true,children:jsxRuntime.jsxs(rt,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Reduce the ",jsxRuntime.jsx("b",{children:c})," quantity to ",r," ",r===1?c:p]})})]})}function hP({scheduleUpdate:t,subscription:e}){switch(t.subscriptionScheduleType){case Ui.Downgrade:return jsxRuntime.jsx(bO,{scheduleUpdate:t});case Ui.BillingPeriod:return jsxRuntime.jsx(vO,{scheduleUpdate:t});case Ui.UnitAmount:return jsxRuntime.jsx(CO,{scheduleUpdate:t,subscription:e});default:return null}}var _O=Q(bg__default.default)`
|
|
5144
5144
|
border-bottom: ${({$borderColor:t})=>`1px solid ${t}`};
|
|
5145
5145
|
border-top-left-radius: 10px;
|
|
5146
5146
|
border-top-right-radius: 10px;
|
|
5147
5147
|
margin: -64px -64px 64px -64px;
|
|
5148
5148
|
padding: 24px 32px;
|
|
5149
|
-
`,
|
|
5149
|
+
`,TO=Q(KD__default.default)`
|
|
5150
5150
|
margin-left: 4px;
|
|
5151
|
-
`,
|
|
5151
|
+
`,wO=Q(om)`
|
|
5152
5152
|
color: ${({theme:t})=>t.stigg.palette.primary};
|
|
5153
5153
|
path {
|
|
5154
5154
|
fill: ${({theme:t})=>t.stigg.palette.primary};
|
|
5155
5155
|
}
|
|
5156
|
-
`;function
|
|
5156
|
+
`;function IO({subscription:t}){let{scheduledUpdates:e}=t;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(da__default.default,{container:true,alignItems:"center",justifyContent:"space-between",gap:1,children:jsxRuntime.jsx(da__default.default,{children:jsxRuntime.jsx(rt,{className:"stigg-scheduled-updates-description",variant:"body1",children:"The following updates will take effect in the next billing cycle:"})})}),jsxRuntime.jsx(da__default.default,{children:(e||[]).map(n=>jsxRuntime.jsx(hP,{scheduleUpdate:n,subscription:t},n.subscriptionScheduleType))})]})}function kO({subscription:t}){let{scheduledUpdates:e}=t,[n]=e||[],{line1:r,line2:i}=sm({scheduledUpdate:n,subscriptionPrices:t.prices,billingPeriodRange:t.billingPeriodRange,options:{postfix:"at the end of the current billing period"}});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(da__default.default,{container:true,alignItems:"center",justifyContent:"space-between",gap:1,children:jsxRuntime.jsx(da__default.default,{children:jsxRuntime.jsx(rt,{className:"stigg-scheduled-updates-title",variant:"body1",color:"primary",children:r})})}),i&&jsxRuntime.jsx(da__default.default,{children:jsxRuntime.jsx(rt,{className:"stigg-scheduled-updates-subtitle",variant:"body1",color:"secondary",children:i})})]})}function mP({subscription:t,onCancelScheduledUpdates:e,theme:n,cancelScheduledUpdatesButtonTitle:r}){let i=react.useTheme(),[o,s]=Bv.useState(false),{scheduledUpdates:c}=t;if(!c||c.length===0)return null;let p=c.length===1;return jsxRuntime.jsx(_O,{$borderColor:n.borderColor,className:"stigg-scheduled-updates-alert-container",children:jsxRuntime.jsxs(da__default.default,{container:true,alignItems:p?"center":"flex-start",gap:2,children:[jsxRuntime.jsx(da__default.default,{item:true,display:"flex",children:jsxRuntime.jsx(qn,{icon:"ScheduleBox",svgPathColor:n.iconsColor,svgRectColor:n.iconsBackgroundColor})}),jsxRuntime.jsx(da__default.default,{item:true,flex:1,children:p?jsxRuntime.jsx(kO,{subscription:t}):jsxRuntime.jsx(IO,{subscription:t})}),!!e&&jsxRuntime.jsx(da__default.default,{item:true,children:jsxRuntime.jsxs(rl,{variant:"outlined",onClick:()=>{s(true),Promise.resolve(e(t)).finally(()=>s(false));},children:[o?jsxRuntime.jsx(TO,{loading:true,size:16,color:i.stigg.palette.text.disabled}):jsxRuntime.jsx(wO,{style:{display:"flex",marginRight:4},className:"stigg-scheduled-updates-cancel-update-button-icon"}),jsxRuntime.jsx(rt,{variant:"body1",color:"primary.main",className:"stigg-scheduled-updates-cancel-update-button",children:r})]})})]})})}var pa=Q.div`
|
|
5157
5157
|
width: 100%;
|
|
5158
5158
|
display: flex;
|
|
5159
5159
|
flex-direction: column;
|
|
@@ -5171,12 +5171,12 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5171
5171
|
${qr.lg} {
|
|
5172
5172
|
padding: 64px;
|
|
5173
5173
|
}
|
|
5174
|
-
`;function bP({billingPeriod:t,rangeEnd:e,amount:n,currency:r}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(rt,{variant:"h6",children:"Next estimated bill"}),jsxRuntime.jsx(rt,{variant:"h1",children:wn({amount:n,currency:r,maximumFractionDigits:2})}),jsxRuntime.jsxs(rt,{as:"div",variant:"body1",color:"secondary",children:["Billed ",t===be.Monthly?"monthly":"annually"," on"," ",jsxRuntime.jsx(rt,{variant:"body1",as:"span",color:"primary",children:$1__default.default.utc(e).format("MMM Do, YYYY")})]}),jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:"* Additional tax rates may apply"})]})}function Pm({description:t}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(rt,{variant:"h6",color:"secondary",children:"No upcoming bill"}),jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:t})]})}var
|
|
5174
|
+
`;function bP({billingPeriod:t,rangeEnd:e,amount:n,currency:r}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(rt,{variant:"h6",children:"Next estimated bill"}),jsxRuntime.jsx(rt,{variant:"h1",children:wn({amount:n,currency:r,maximumFractionDigits:2})}),jsxRuntime.jsxs(rt,{as:"div",variant:"body1",color:"secondary",children:["Billed ",t===be.Monthly?"monthly":"annually"," on"," ",jsxRuntime.jsx(rt,{variant:"body1",as:"span",color:"primary",children:$1__default.default.utc(e).format("MMM Do, YYYY")})]}),jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:"* Additional tax rates may apply"})]})}function Pm({description:t}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(rt,{variant:"h6",color:"secondary",children:"No upcoming bill"}),jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:t})]})}var MO=Q.div`
|
|
5175
5175
|
display: flex;
|
|
5176
5176
|
flex-direction: column;
|
|
5177
5177
|
align-items: left;
|
|
5178
5178
|
gap: 8px;
|
|
5179
|
-
`,
|
|
5179
|
+
`,NO=Q(s2__default.default)`
|
|
5180
5180
|
width: fit-content;
|
|
5181
5181
|
&.MuiButton-root {
|
|
5182
5182
|
padding: 0;
|
|
@@ -5184,7 +5184,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5184
5184
|
background: none;
|
|
5185
5185
|
}
|
|
5186
5186
|
}
|
|
5187
|
-
`;function CP({onContactSupport:t,label:e,linkLabel:n}){let r=jsxRuntime.jsx(rt,{color:t?"primary.main":"secondary",children:n});return jsxRuntime.jsxs(
|
|
5187
|
+
`;function CP({onContactSupport:t,label:e,linkLabel:n}){let r=jsxRuntime.jsx(rt,{color:t?"primary.main":"secondary",children:n});return jsxRuntime.jsxs(MO,{className:"stigg-contact-support-layout",children:[jsxRuntime.jsx(rt,{className:"stigg-contact-support-label",color:"secondary",children:e}),t?jsxRuntime.jsx(NO,{className:"stigg-contact-support-button",style:{textTransform:"none"},variant:"text",onClick:t,children:r}):r]})}var BO=Q.div`
|
|
5188
5188
|
max-height: 278px;
|
|
5189
5189
|
display: flex;
|
|
5190
5190
|
flex-direction: column;
|
|
@@ -5193,7 +5193,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5193
5193
|
border: ${({$borderColor:t})=>`1px solid ${t}`};
|
|
5194
5194
|
padding: 32px;
|
|
5195
5195
|
gap: 16px;
|
|
5196
|
-
`;function SP({subscription:t,theme:e,textOverrides:n,onContactSupport:r}){var p,h,v,P,x,T,I;let{pricingType:i}=t,o,s=(h=(p=t.prices)==null?void 0:p.every(R=>R.billingModel!==nn.UsageBased))!=null?h:true,c=(v=t.scheduledUpdates)==null?void 0:v.find(({subscriptionScheduleType:R,targetPackage:A})=>R===Ui.Downgrade&&(A==null?void 0:A.pricingType)===Rn.Free);if(i===Rn.Free)o=jsxRuntime.jsx(Pm,{description:"You're on a free plan, so you don\u2019t have any upcoming charges"});else if(i===Rn.Paid)if(c&&s)o=jsxRuntime.jsx(Pm,{description:"Your plan will be downgraded to a free plan, so you don\u2019t have any upcoming charges"});else if(t.status===bi.InTrial)o=jsxRuntime.jsx(Pm,{description:`You\u2019re on a free trial of the ${t.planName} plan, so you don\u2019t have any upcoming charges`});else {let R=(x=(P=t.prices)==null?void 0:P[0])==null?void 0:x.billingPeriod,A=(T=t.billingPeriodRange)==null?void 0:T.end,O=(I=t.totalPrice)==null?void 0:I.total;R&&A&&O&&(o=jsxRuntime.jsx(bP,{billingPeriod:R,rangeEnd:A,amount:O.amount,currency:O.currency}));}else i===Rn.Custom&&(o=jsxRuntime.jsx(CP,{onContactSupport:r,label:n.contactSupportTitle,linkLabel:n.contactSupportLink}));return jsxRuntime.jsx(
|
|
5196
|
+
`;function SP({subscription:t,theme:e,textOverrides:n,onContactSupport:r}){var p,h,v,P,x,T,I;let{pricingType:i}=t,o,s=(h=(p=t.prices)==null?void 0:p.every(R=>R.billingModel!==nn.UsageBased))!=null?h:true,c=(v=t.scheduledUpdates)==null?void 0:v.find(({subscriptionScheduleType:R,targetPackage:A})=>R===Ui.Downgrade&&(A==null?void 0:A.pricingType)===Rn.Free);if(i===Rn.Free)o=jsxRuntime.jsx(Pm,{description:"You're on a free plan, so you don\u2019t have any upcoming charges"});else if(i===Rn.Paid)if(c&&s)o=jsxRuntime.jsx(Pm,{description:"Your plan will be downgraded to a free plan, so you don\u2019t have any upcoming charges"});else if(t.status===bi.InTrial)o=jsxRuntime.jsx(Pm,{description:`You\u2019re on a free trial of the ${t.planName} plan, so you don\u2019t have any upcoming charges`});else {let R=(x=(P=t.prices)==null?void 0:P[0])==null?void 0:x.billingPeriod,A=(T=t.billingPeriodRange)==null?void 0:T.end,O=(I=t.totalPrice)==null?void 0:I.total;R&&A&&O&&(o=jsxRuntime.jsx(bP,{billingPeriod:R,rangeEnd:A,amount:O.amount,currency:O.currency}));}else i===Rn.Custom&&(o=jsxRuntime.jsx(CP,{onContactSupport:r,label:n.contactSupportTitle,linkLabel:n.contactSupportLink}));return jsxRuntime.jsx(BO,{className:"stigg-subscription-total-price-layout",$borderColor:e.borderColor,children:o})}var UO=t=>jsxRuntime.jsxs("svg",St(W({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:[jsxRuntime.jsx("path",{d:"M12.9469 13.5999H11.9344L11.935 10.7756C11.935 10.6288 11.87 10.4819 11.7557 10.3838L8.62061 7.91816L11.755 5.4532C11.8694 5.35507 11.9344 5.22444 11.9344 5.06132L11.935 2.40004H12.9475C13.225 2.40004 13.4375 2.18755 13.4375 1.91004C13.4375 1.63254 13.225 1.42004 12.9475 1.42004L3.05311 1.42067C2.77561 1.42067 2.56311 1.63316 2.56311 1.91067C2.56311 2.18817 2.77561 2.40067 3.05311 2.40067H4.06561L4.06498 5.06131C4.06498 5.20818 4.12998 5.35505 4.24436 5.45318L7.36244 7.91814L4.245 10.3837C4.13062 10.4819 4.06562 10.6125 4.06562 10.7756V13.5999H3.05313C2.77562 13.5999 2.56313 13.8124 2.56313 14.0899C2.56313 14.3674 2.77562 14.5799 3.05313 14.5799H12.9469C13.2244 14.5799 13.4369 14.3674 13.4369 14.0899C13.4369 13.8124 13.2244 13.5999 12.9469 13.5999ZM5.04498 2.39995H10.9551V4.81627L8.00002 7.16747L5.04498 4.81627V2.39995ZM5.04498 11.0206L8.00002 8.66939L10.9551 11.0044V13.5838H5.04498V11.0206Z",fill:"white"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.05303 1.25404L12.9474 1.25342C13.317 1.25342 13.6041 1.54053 13.6041 1.91008C13.6041 2.27964 13.317 2.56675 12.9474 2.56675H12.1016L12.101 5.06136V5.06136C12.101 5.2747 12.0135 5.45101 11.8635 5.57973L11.8581 5.58436L8.89014 7.9182L11.8642 10.2572C12.0164 10.3878 12.1016 10.5814 12.1016 10.7757L12.101 13.4333H12.9468C13.3164 13.4333 13.6035 13.7204 13.6035 14.09C13.6035 14.4595 13.3164 14.7466 12.9468 14.7466H3.05304C2.68349 14.7466 2.39638 14.4595 2.39638 14.09C2.39638 13.7204 2.68349 13.4333 3.05304 13.4333H3.89887V10.7757C3.89887 10.5623 3.98635 10.386 4.13639 10.2573L4.14144 10.253L7.09365 7.91821L4.13566 5.57982C3.98346 5.44923 3.89823 5.25562 3.89823 5.06135L3.89882 2.56738H3.05303C2.68348 2.56738 2.39636 2.28026 2.39636 1.91071C2.39636 1.54116 2.68348 1.25405 3.05303 1.25404V1.25404ZM12.9474 1.58675L3.05304 1.58738C2.86758 1.58738 2.7297 1.72525 2.7297 1.91071C2.7297 2.09617 2.86757 2.23404 3.05303 2.23404H4.23223L4.23157 5.06135V5.06135C4.23158 5.15983 4.27538 5.25908 4.35053 5.32476L7.63107 7.91815L4.35113 10.5123C4.2739 10.5795 4.23221 10.6639 4.23221 10.7757V13.7666H3.05304C2.86759 13.7666 2.72971 13.9045 2.72971 14.09C2.72971 14.2754 2.86759 14.4133 3.05304 14.4133H12.9468C13.1323 14.4133 13.2701 14.2754 13.2701 14.09C13.2701 13.9045 13.1323 13.7667 12.9468 13.7667H11.7676L11.7683 10.7757V10.7757C11.7683 10.6772 11.7245 10.5781 11.6495 10.5124L8.35092 7.91819L11.6489 5.32461C11.726 5.25743 11.7676 5.17306 11.7676 5.06136L11.7683 2.23342H12.9474C13.1329 2.23342 13.2708 2.09554 13.2708 1.91008C13.2708 1.72463 13.1329 1.58676 12.9474 1.58675V1.58675ZM4.87823 2.23332H11.1216V4.89669L7.99994 7.3805L4.87823 4.89669V2.23332ZM5.21157 2.56666V4.73593L7.99994 6.95452L10.7883 4.73593V2.56666H5.21157ZM7.99958 8.45673L11.1216 10.9237V13.7505H4.87823V10.9403L7.99958 8.45673ZM8.0003 8.88213L5.21157 11.101V13.4172H10.7883V11.0852L8.0003 8.88213Z",fill:"white"})]})),xP=UO;var ju=Q(i=>{var o=i,{children:t,className:e,placement:n="top"}=o,r=On(o,["children","className","placement"]);return jsxRuntime.jsx(GO__default.default,St(W({arrow:true,placement:n},r),{classes:{popper:e,tooltip:"stigg-tooltip",arrow:"stigg-tooltip-arrow"},children:jsxRuntime.jsx("div",{children:t})}))})(({theme:t,$padding:e=8,$maxWidth:n=300})=>({[`& .${GO.tooltipClasses.tooltip}`]:{backgroundColor:t.stigg.palette.white,maxWidth:n,boxShadow:t.stigg.shadows.popover,padding:e,borderRadius:t.stigg.border.radius,color:t.stigg.palette.text.primary},[`& .${GO.tooltipClasses.arrow}`]:{color:t.stigg.palette.white}}));var HO=Q(rt)`
|
|
5197
5197
|
display: ${({$display:t})=>t};
|
|
5198
5198
|
-webkit-line-clamp: ${({$maxLines:t})=>t};
|
|
5199
5199
|
-webkit-box-orient: vertical;
|
|
@@ -5207,7 +5207,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5207
5207
|
${({$bold:t})=>t&&react.css`
|
|
5208
5208
|
font-weight: bold;
|
|
5209
5209
|
`}
|
|
5210
|
-
`;function wP(t){return t&&(t.clientHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)}var il=({leaveDelay:t,children:e,variant:n,color:r,maxLines:i=1,wordBreak:o,bold:s,tooltipPlacement:c="top",className:p,display:h="-webkit-box",style:v,"data-testid":P})=>{let[x,T]=Bv.useState(false),I=Bv.useRef(null),R=jsxRuntime.jsx(
|
|
5210
|
+
`;function wP(t){return t&&(t.clientHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)}var il=({leaveDelay:t,children:e,variant:n,color:r,maxLines:i=1,wordBreak:o,bold:s,tooltipPlacement:c="top",className:p,display:h="-webkit-box",style:v,"data-testid":P})=>{let[x,T]=Bv.useState(false),I=Bv.useRef(null),R=jsxRuntime.jsx(HO,{ref:I,variant:n,color:r,$maxLines:i,$wordBreak:o,$bold:s,className:p,$display:h,style:v,"data-testid":P,children:e});Bv.useEffect(()=>{if(I!=null&&I.current){let O=wP(I.current);T(O);}},[I]);let A=(I==null?void 0:I.current)&&wP(I.current);return jsxRuntime.jsx("span",{children:x||A?jsxRuntime.jsx(ju,{placement:c,leaveDelay:t,title:jsxRuntime.jsx(rt,{variant:"body1",children:e}),children:R}):R})};var qO=Q.div`
|
|
5211
5211
|
width: 100%;
|
|
5212
5212
|
display: flex;
|
|
5213
5213
|
align-items: center;
|
|
@@ -5216,48 +5216,48 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5216
5216
|
border-radius: 10px;
|
|
5217
5217
|
padding: 8px 16px;
|
|
5218
5218
|
margin-top: 16px;
|
|
5219
|
-
`,
|
|
5219
|
+
`,YO=Q(WO__default.default)`
|
|
5220
5220
|
text-decoration-color: white;
|
|
5221
5221
|
color: white;
|
|
5222
5222
|
cursor: pointer;
|
|
5223
|
-
`;function kP({subscription:t,includePlanName:e,onManageSubscription:n}){return (t==null?void 0:t.status)!==bi.InTrial?null:jsxRuntime.jsxs(
|
|
5223
|
+
`;function kP({subscription:t,includePlanName:e,onManageSubscription:n}){return (t==null?void 0:t.status)!==bi.InTrial?null:jsxRuntime.jsxs(qO,{className:"stigg-subscription-trial-badge",children:[jsxRuntime.jsx(xP,{className:"stigg-subscription-trial-badge-image"}),jsxRuntime.jsx("div",{style:{flex:1,marginRight:4},children:jsxRuntime.jsxs(il,{variant:"body1",className:"stigg-subscription-trial-badge-text",color:"white",children:[`${t.trialRemainingDays} days remaining in trial`,e&&` of the ${t.planName} plan`]})}),jsxRuntime.jsx(YO,{className:"stigg-subscription-trial-upgrade-button",onClick:()=>n({intentionType:"UPGRADE_TRIAL_PLAN"}),children:jsxRuntime.jsx(rt,{color:"white",children:"Upgrade plan"})})]})}function AP({mainSubscription:t,trialSubscription:e,onManageSubscription:n,theme:r}){return jsxRuntime.jsxs("div",{className:"stigg-subscription-view-layout",children:[jsxRuntime.jsxs(rt,{className:"stigg-subscription-plan-name",variant:"h1",overrideColor:r.planNameColor,style:{marginTop:8},children:[t.planName," plan"]}),jsxRuntime.jsx(kP,{subscription:e,includePlanName:(e==null?void 0:e.planName)!==t.planName,onManageSubscription:n})]})}var iv=70;function Vu(t,e){return Math.min(Math.floor(t/e*100),100)}function RP(t){let e;return t<iv?e="standard":t<100?e="warning":e="error",e}function FP(t){if(!t.resetPeriod||!t.usagePeriodEnd)return null;let e=n=>$1__default.default.utc(t.usagePeriodEnd).diff($1__default.default.utc(),n);switch(t.resetPeriod){case Ro.Month:return `Resets monthly - in ${e("days")} days`;case Ro.Week:return `Resets weekly - in ${e("days")} days`;case Ro.Day:return `Resets daily - in ${e("hours")} hours`;case Ro.Hour:return `Resets hourly - in ${e("minutes")} minutes`;default:return null}}var ZO=Q(KO__default.default)`
|
|
5224
5224
|
height: 4px;
|
|
5225
5225
|
background-color: ${({theme:t})=>sc__default.default(t.stigg.palette.primary).alpha(.4).string()};
|
|
5226
5226
|
|
|
5227
5227
|
span {
|
|
5228
5228
|
background-color: ${({$progressStatus:t,theme:e})=>{switch(t){case "standard":return e.stigg.palette.primary;case "warning":return e.stigg.palette.warning;case "error":return e.stigg.palette.error;default:return e.stigg.palette.primary}}};
|
|
5229
5229
|
}
|
|
5230
|
-
`,
|
|
5230
|
+
`,JO=Q(zP__default.default)`
|
|
5231
5231
|
border-style: dotted;
|
|
5232
5232
|
border-bottom-width: 2px;
|
|
5233
5233
|
border-color: ${({theme:t})=>sc__default.default(t.stigg.palette.outlinedRestingBorder).alpha(.4).string()};
|
|
5234
|
-
`;function _m({entitlement:t}){if(t.hasUnlimitedUsage)return jsxRuntime.jsx(
|
|
5234
|
+
`;function _m({entitlement:t}){if(t.hasUnlimitedUsage)return jsxRuntime.jsx(JO,{});let e=Vu(t.currentUsage||0,t.usageLimit),n=RP(e);return jsxRuntime.jsx(ZO,{$progressStatus:n,className:`stigg-feature-usage-progress-bar-${n.toString()}`,variant:"determinate",value:e})}var LP=Q(s2__default.default)`
|
|
5235
5235
|
text-transform: none;
|
|
5236
5236
|
padding: 0;
|
|
5237
5237
|
white-space: nowrap;
|
|
5238
|
-
`;function wm({entitlement:t,feature:e,onManageSubscription:n,onBuyMore:r,canBuyMore:i,canUpgradeSubscription:o,hasCustomSubscription:s}){return s||t.hasUnlimitedUsage||Vu(t.currentUsage||0,t.usageLimit)<iv?null:i?r?jsxRuntime.jsx(LP,{variant:"text",onClick:()=>r(e,t),children:jsxRuntime.jsx(rt,{color:"primary.main",children:"Buy more"})}):null:o&&n?jsxRuntime.jsx(LP,{variant:"text",onClick:()=>n({intentionType:"UPGRADE_PLAN"}),children:jsxRuntime.jsx(rt,{color:"primary.main",children:"Upgrade"})}):null}function BP({amount:t,currency:e,blockSize:n,entitlement:r,feature:i,hideChargePrice:o,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:p,hasCustomSubscription:h}){var v,P,x;return jsxRuntime.jsxs("div",{className:`stigg-charge-list-item stigg-charge-list-item-${r.feature.refId}`,style:{display:"flex",flexDirection:"column",gap:12},children:[jsxRuntime.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:12},children:[jsxRuntime.jsxs("div",{style:{display:"flex",gap:12},children:[jsxRuntime.jsx(il,{variant:"body1",color:"primary",children:i.displayName}),!o&&jsxRuntime.jsxs(il,{variant:"body1",color:"secondary",children:[wn({amount:t,currency:e})," per ",n?`${n} `:"",n?i.featureUnitsPlural:i.featureUnits]})]}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:12},children:[jsxRuntime.jsx(wm,{entitlement:r,feature:i,canBuyMore:true,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:p,hasCustomSubscription:h}),jsxRuntime.jsx(rt,{variant:"body1",color:"primary",style:{whiteSpace:"nowrap"},children:r.hasUnlimitedUsage?(v=r.currentUsage)==null?void 0:v.toLocaleString():`${(P=r.currentUsage)==null?void 0:P.toLocaleString()} of ${(x=r.usageLimit)==null?void 0:x.toLocaleString()}`})]})]}),jsxRuntime.jsx(_m,{entitlement:r})]})}function $P({subscription:t,entitlements:e,onBuyMore:n,onManageSubscription:r,hasCustomSubscription:i,canUpgradeSubscription:o}){let s=lodash.keyBy(e,"feature.refId"),c=t.prices.filter(({feature:p,price:h})=>!!p&&s[p.refId]&&!!h);return c.length?jsxRuntime.jsx("div",{className:"stigg-charge-list",style:{display:"flex",flexDirection:"column",gap:16,marginTop:32},children:c.map(({feature:p,price:h,blockSize:v,billingModel:P})=>{if(!p||!h)return null;let x=s[p.refId];return !x||!x.feature?null:jsxRuntime.jsx(BP,{entitlement:x,feature:x.feature,amount:h.amount,blockSize:v,currency:h.currency,hideChargePrice:P===nn.PerUnit,onBuyMore:n,onManageSubscription:r,canUpgradeSubscription:o,hasCustomSubscription:i},p.refId)})}):null}function km({onManageSubscription:t,onBuyMore:e,onCancelScheduledUpdates:n,onContactSupport:r,hiddenSections:i,cancelScheduledUpdatesButtonTitle:o}){let{customerPortal:s,isLoading:c,textOverrides:p,theme:h}=ir(),v=c||!s,{subscriptions:P,entitlements:x,canUpgradeSubscription:T}=s||{},I=P==null?void 0:P.find(({status:N})=>N===bi.Active),R=P==null?void 0:P.find(({status:N})=>N===bi.InTrial),A=(I==null?void 0:I.pricingType)===Rn.Custom,O=I||R;return jsxRuntime.jsxs(pa,{className:"stigg-customer-portal-subscriptions-overview",$backgroundColor:h.backgroundColor,$borderColor:h.borderColor,children:[!v&&I&&I.scheduledUpdates&&jsxRuntime.jsx(mP,{theme:h,subscription:I,onCancelScheduledUpdates:n,cancelScheduledUpdatesButtonTitle:o}),v||!O?jsxRuntime.jsx(fP,{}):jsxRuntime.jsxs("div",{className:"stigg-overview-layout",style:{display:"flex",alignItems:"flex-start",gap:64,flexWrap:"wrap"},children:[jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[jsxRuntime.jsx(nP,{onManageSubscription:t,hideManageButton:A,textOverrides:p}),jsxRuntime.jsx(AP,{mainSubscription:O,trialSubscription:R,theme:h,onManageSubscription:t}),I&&x&&jsxRuntime.jsx($P,{subscription:I,entitlements:x,onBuyMore:e,onManageSubscription:t,canUpgradeSubscription:!!T,hasCustomSubscription:A}),jsxRuntime.jsx(uP,{customerPortal:s,hiddenSections:i,textOverrides:p,theme:h})]}),jsxRuntime.jsx("div",{style:{display:"flex",flexDirection:"column",width:319,gap:24},children:jsxRuntime.jsx(SP,{subscription:O,theme:h,onContactSupport:r,textOverrides:p})})]})]})}var
|
|
5238
|
+
`;function wm({entitlement:t,feature:e,onManageSubscription:n,onBuyMore:r,canBuyMore:i,canUpgradeSubscription:o,hasCustomSubscription:s}){return s||t.hasUnlimitedUsage||Vu(t.currentUsage||0,t.usageLimit)<iv?null:i?r?jsxRuntime.jsx(LP,{variant:"text",onClick:()=>r(e,t),children:jsxRuntime.jsx(rt,{color:"primary.main",children:"Buy more"})}):null:o&&n?jsxRuntime.jsx(LP,{variant:"text",onClick:()=>n({intentionType:"UPGRADE_PLAN"}),children:jsxRuntime.jsx(rt,{color:"primary.main",children:"Upgrade"})}):null}function BP({amount:t,currency:e,blockSize:n,entitlement:r,feature:i,hideChargePrice:o,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:p,hasCustomSubscription:h}){var v,P,x;return jsxRuntime.jsxs("div",{className:`stigg-charge-list-item stigg-charge-list-item-${r.feature.refId}`,style:{display:"flex",flexDirection:"column",gap:12},children:[jsxRuntime.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:12},children:[jsxRuntime.jsxs("div",{style:{display:"flex",gap:12},children:[jsxRuntime.jsx(il,{variant:"body1",color:"primary",children:i.displayName}),!o&&jsxRuntime.jsxs(il,{variant:"body1",color:"secondary",children:[wn({amount:t,currency:e})," per ",n?`${n} `:"",n?i.featureUnitsPlural:i.featureUnits]})]}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:12},children:[jsxRuntime.jsx(wm,{entitlement:r,feature:i,canBuyMore:true,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:p,hasCustomSubscription:h}),jsxRuntime.jsx(rt,{variant:"body1",color:"primary",style:{whiteSpace:"nowrap"},children:r.hasUnlimitedUsage?(v=r.currentUsage)==null?void 0:v.toLocaleString():`${(P=r.currentUsage)==null?void 0:P.toLocaleString()} of ${(x=r.usageLimit)==null?void 0:x.toLocaleString()}`})]})]}),jsxRuntime.jsx(_m,{entitlement:r})]})}function $P({subscription:t,entitlements:e,onBuyMore:n,onManageSubscription:r,hasCustomSubscription:i,canUpgradeSubscription:o}){let s=lodash.keyBy(e,"feature.refId"),c=t.prices.filter(({feature:p,price:h})=>!!p&&s[p.refId]&&!!h);return c.length?jsxRuntime.jsx("div",{className:"stigg-charge-list",style:{display:"flex",flexDirection:"column",gap:16,marginTop:32},children:c.map(({feature:p,price:h,blockSize:v,billingModel:P})=>{if(!p||!h)return null;let x=s[p.refId];return !x||!x.feature?null:jsxRuntime.jsx(BP,{entitlement:x,feature:x.feature,amount:h.amount,blockSize:v,currency:h.currency,hideChargePrice:P===nn.PerUnit,onBuyMore:n,onManageSubscription:r,canUpgradeSubscription:o,hasCustomSubscription:i},p.refId)})}):null}function km({onManageSubscription:t,onBuyMore:e,onCancelScheduledUpdates:n,onContactSupport:r,hiddenSections:i,cancelScheduledUpdatesButtonTitle:o}){let{customerPortal:s,isLoading:c,textOverrides:p,theme:h}=ir(),v=c||!s,{subscriptions:P,entitlements:x,canUpgradeSubscription:T}=s||{},I=P==null?void 0:P.find(({status:N})=>N===bi.Active),R=P==null?void 0:P.find(({status:N})=>N===bi.InTrial),A=(I==null?void 0:I.pricingType)===Rn.Custom,O=I||R;return jsxRuntime.jsxs(pa,{className:"stigg-customer-portal-subscriptions-overview",$backgroundColor:h.backgroundColor,$borderColor:h.borderColor,children:[!v&&I&&I.scheduledUpdates&&jsxRuntime.jsx(mP,{theme:h,subscription:I,onCancelScheduledUpdates:n,cancelScheduledUpdatesButtonTitle:o}),v||!O?jsxRuntime.jsx(fP,{}):jsxRuntime.jsxs("div",{className:"stigg-overview-layout",style:{display:"flex",alignItems:"flex-start",gap:64,flexWrap:"wrap"},children:[jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[jsxRuntime.jsx(nP,{onManageSubscription:t,hideManageButton:A,textOverrides:p}),jsxRuntime.jsx(AP,{mainSubscription:O,trialSubscription:R,theme:h,onManageSubscription:t}),I&&x&&jsxRuntime.jsx($P,{subscription:I,entitlements:x,onBuyMore:e,onManageSubscription:t,canUpgradeSubscription:!!T,hasCustomSubscription:A}),jsxRuntime.jsx(uP,{customerPortal:s,hiddenSections:i,textOverrides:p,theme:h})]}),jsxRuntime.jsx("div",{style:{display:"flex",flexDirection:"column",width:319,gap:24},children:jsxRuntime.jsx(SP,{subscription:O,theme:h,onContactSupport:r,textOverrides:p})})]})]})}var nR=Q.div`
|
|
5239
5239
|
display: flex;
|
|
5240
5240
|
width: 100%;
|
|
5241
5241
|
align-items: flex-end;
|
|
5242
5242
|
justify-content: flex-end;
|
|
5243
5243
|
margin-bottom: 24px;
|
|
5244
|
-
`;function jP({showWatermark:t}){return jsxRuntime.jsx(
|
|
5244
|
+
`;function jP({showWatermark:t}){return jsxRuntime.jsx(nR,{className:"stigg-customer-portal-header-layout",children:jsxRuntime.jsx(so,{source:"customer_portal",showWatermark:t})})}var iR=Q(rt)`
|
|
5245
5245
|
text-transform: none;
|
|
5246
|
-
`,
|
|
5246
|
+
`,oR=Q(reactFeather.ExternalLink)`
|
|
5247
5247
|
color: ${({theme:t})=>t.stigg.palette.primary};
|
|
5248
|
-
`;function Dm({text:t,url:e,className:n}){return jsxRuntime.jsx(rl,{className:n,variant:"outlined",startIcon:jsxRuntime.jsx(
|
|
5248
|
+
`;function Dm({text:t,url:e,className:n}){return jsxRuntime.jsx(rl,{className:n,variant:"outlined",startIcon:jsxRuntime.jsx(oR,{size:20,strokeWidth:2.5}),onClick:()=>{window.open(e,"_blank");},children:jsxRuntime.jsx(iR,{color:"primary.main",children:t})})}var Am=Q.div`
|
|
5249
5249
|
display: flex;
|
|
5250
5250
|
flex-direction: column;
|
|
5251
5251
|
align-items: flex-start;
|
|
5252
5252
|
gap: 16px;
|
|
5253
5253
|
flex: 1 0 0;
|
|
5254
|
-
`,
|
|
5254
|
+
`,aR=Q.div`
|
|
5255
5255
|
display: flex;
|
|
5256
5256
|
align-items: flex-start;
|
|
5257
5257
|
gap: 16px;
|
|
5258
5258
|
align-self: stretch;
|
|
5259
5259
|
flex-wrap: wrap;
|
|
5260
|
-
`;function lv({title:t,rows:e}){return jsxRuntime.jsxs(Am,{children:[jsxRuntime.jsx(rt,{variant:"h6",color:"secondary",bold:true,children:t}),e.map(({classNamePrefix:n,label:r,value:i,labelTypographyProps:o,valueTypographyProps:s})=>jsxRuntime.jsxs(
|
|
5260
|
+
`;function lv({title:t,rows:e}){return jsxRuntime.jsxs(Am,{children:[jsxRuntime.jsx(rt,{variant:"h6",color:"secondary",bold:true,children:t}),e.map(({classNamePrefix:n,label:r,value:i,labelTypographyProps:o,valueTypographyProps:s})=>jsxRuntime.jsxs(aR,{children:[jsxRuntime.jsx(rt,St(W({className:`${n}-label`,variant:"body1",color:"secondary",style:{width:80}},o),{children:r})),jsxRuntime.jsx(rt,St(W({className:`${n}-text`,variant:"body1",color:"secondary"},s),{children:i}))]},r))]})}function Om(){return jsxRuntime.jsx(nl__default.default,{width:220,height:42})}var HP="-";function Fm(){let{customerPortal:t,isLoading:e,textOverrides:n,theme:r}=ir(),i=Ci("md"),{billingInformation:o}=t||{},s=!o||e,c=[];if(s?c.push(jsxRuntime.jsxs(Am,{children:[jsxRuntime.jsx(nl__default.default,{width:220,height:12}),jsxRuntime.jsx(nl__default.default,{width:220,height:12}),jsxRuntime.jsx(nl__default.default,{width:220,height:12})]},"information-loading-data-top"),jsxRuntime.jsx(zP__default.default,{orientation:"vertical",style:{minHeight:93,display:i?"block":"none"}},"information-loading-data-divider"),jsxRuntime.jsxs(Am,{children:[jsxRuntime.jsx(nl__default.default,{width:220,height:12}),jsxRuntime.jsx(nl__default.default,{width:220,height:12}),jsxRuntime.jsx(nl__default.default,{width:220,height:12})]},"information-loading-data-bottom")):(c.push(jsxRuntime.jsx(lv,{title:"Billed to",rows:[{classNamePrefix:"stigg-customer-name",label:"Name",value:(o==null?void 0:o.name)||HP,valueTypographyProps:o!=null&&o.name?{}:{color:"disabled"}},{classNamePrefix:"stigg-customer-email",label:"Email",value:(o==null?void 0:o.email)||HP,valueTypographyProps:o!=null&&o.email?{}:{color:"disabled"}}]},"information-billing-data-billed-to")),o!=null&&o.defaultPaymentMethodId&&o.defaultPaymentMethodLast4Digits&&o.defaultPaymentExpirationMonth&&o.defaultPaymentExpirationYear&&(c.unshift(jsxRuntime.jsx(zP__default.default,{orientation:"vertical",style:{minHeight:93,display:i?"block":"none"}},"information-billing-data-divider")),c.unshift(jsxRuntime.jsx(lv,{title:"Payment method",rows:[{classNamePrefix:"stigg-credit-card",label:"Card",value:`Ending in ${o.defaultPaymentMethodLast4Digits}`},{classNamePrefix:"stigg-credit-card-expiration",label:"Expires",value:`${lodash.padStart(o.defaultPaymentExpirationMonth.toString(),2,"0")}/${o.defaultPaymentExpirationYear}`}]},"information-billing-data-payment-method")))),!s&&!(o!=null&&o.name)&&!(o!=null&&o.email)&&!(o!=null&&o.defaultPaymentMethodId))return null;let p=s?jsxRuntime.jsx(Om,{}):t!=null&&t.billingPortalUrl?jsxRuntime.jsx(Dm,{url:t.billingPortalUrl,text:n.editPaymentDetails,className:"stigg-edit-payment-details-button"}):null;return jsxRuntime.jsxs(pa,{className:"stigg-payment-details-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor,children:[jsxRuntime.jsxs(ca,{className:"stigg-payment-details-section-header",children:[jsxRuntime.jsx(ua,{isLoading:s,className:"stigg-payment-details-section-title",title:"Payment details"}),p]}),jsxRuntime.jsx("div",{style:{display:"flex",alignItems:"stretch",gap:i?64:32,flexWrap:"wrap"},children:c})]})}var WP=Q(pa)`
|
|
5261
5261
|
position: relative;
|
|
5262
5262
|
|
|
5263
5263
|
.stigg-paywall-layout {
|
|
@@ -5309,10 +5309,10 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5309
5309
|
${({theme:t,$highlight:e})=>e&&`background-color: ${t.stigg.palette.backgroundSection}`};
|
|
5310
5310
|
`;function JP({entitlement:t,subscriptionPrice:e,onManageSubscription:n,onBuyMore:r,hasCustomSubscription:i,canUpgradeSubscription:o}){var p,h,v;let{theme:s}=ir(),c=!t.hasUnlimitedUsage&&t.currentUsage>t.usageLimit;return t.feature?jsxRuntime.jsxs(XP,{$highlight:!!e,$borderColor:s.borderColor,children:[jsxRuntime.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16},children:[jsxRuntime.jsx(il,{variant:"body1",children:t.feature&&KP(t.feature)}),e&&jsxRuntime.jsx(ju,{title:jsxRuntime.jsx(rt,{variant:"body1",children:e.billingModel===nn.PerUnit?"Billed for committed usage":"Billed for actual usage"}),children:jsxRuntime.jsx(qn,{icon:"DollarCoin",svgStrokeColor:s.iconsColor})})]}),jsxRuntime.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[jsxRuntime.jsxs(il,{variant:"body1",color:c?"error":"primary","data-testid":`usage-data-${(p=t.feature)==null?void 0:p.refId}`,children:[(h=t.currentUsage)==null?void 0:h.toLocaleString(),!t.hasUnlimitedUsage&&` / ${(v=t.usageLimit)==null?void 0:v.toLocaleString()} (${Vu(t.currentUsage||0,t.usageLimit)}%)`]}),jsxRuntime.jsx(wm,{entitlement:t,feature:t.feature,onBuyMore:r,canBuyMore:!!e,onManageSubscription:n,canUpgradeSubscription:o,hasCustomSubscription:i})]}),jsxRuntime.jsx(_m,{entitlement:t}),!t.hasUnlimitedUsage&&!ZP__default.default(t.usageLimit)&&!ZP__default.default(t.currentUsage)&&t.resetPeriod&&t.usagePeriodEnd?jsxRuntime.jsx(rt,{color:"secondary",children:FP(t)}):null,t.hasUnlimitedUsage&&jsxRuntime.jsx(rt,{color:"secondary",children:"In current billing period"})]}):null}var ex=Q.div`
|
|
5311
5311
|
margin-top: 32px;
|
|
5312
|
-
`;function nx(){let t=Ci("md");return jsxRuntime.jsx(da__default.default,{container:true,spacing:4,className:"stigg-subscription-usage-skeleton-layout",sx:{flexWrap:"wrap"},children:lodash.range(6).map(e=>jsxRuntime.jsx(da__default.default,{item:true,xs:t?4:12,children:jsxRuntime.jsx(nl__default.default,{width:280,height:120})},e))})}var ax=6;function Nm({onManageSubscription:t,onBuyMore:e,filterEntitlements:n}){var ut,Y;let[r,i]=Bv.useState(false),o=Ci("md"),{customerPortal:s,isLoading:c,textOverrides:p,theme:h}=ir(),v=c||!s,{entitlements:P,subscriptions:x}=s||{},T=P==null?void 0:P.filter(at=>{var pt,dt;return ((pt=at.feature)==null?void 0:pt.meterType)===yb.Fluctuating||((dt=at.feature)==null?void 0:dt.meterType)===yb.Incremental}),I=x==null?void 0:x.find(({status:at})=>at===bi.Active),R=(I==null?void 0:I.pricingType)===Rn.Custom,A=!!(s!=null&&s.canUpgradeSubscription),O=lodash.keyBy((ut=I==null?void 0:I.prices)!=null?ut:[],"feature.refId"),N=lodash.keyBy(T!=null?T:[],"feature.refId"),V=lodash.compact(((Y=I==null?void 0:I.prices)!=null?Y:[]).map(at=>at.feature&&N[at.feature.refId]||void 0)),G=lodash.compact((T!=null?T:[]).filter(at=>!O[at.feature.refId])),X=[...V,...G].filter(at=>at.usageLimit!==0),nt=n?n(X):X,st=o?nt.length>2?4:6:12,U=r?nt:nt.slice(0,ax),j=()=>i(at=>!at);return !v&&!(T!=null&&T.length)?null:jsxRuntime.jsxs(pa,{className:"stigg-subscription-usage-layout",$backgroundColor:h.backgroundColor,$borderColor:h.borderColor,children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx(ua,{title:p.usageTabTitle,className:"stigg-customer-portal-usage-section-title",isLoading:v})}),v?jsxRuntime.jsx(nx,{}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(da__default.default,{container:true,spacing:4,children:U.map(at=>jsxRuntime.jsx(da__default.default,{className:`stigg-entitlement-usage-${at.feature.refId}`,item:true,xs:st,children:jsxRuntime.jsx(JP,{subscriptionPrice:O[at.feature.refId],entitlement:at,onManageSubscription:t,onBuyMore:e,hasCustomSubscription:R,canUpgradeSubscription:A},at.feature.refId)},at.feature.refId))}),nt.length>ax&&jsxRuntime.jsx(ex,{children:jsxRuntime.jsx(rl,{className:"stigg-usage-toggle-many-button",variant:"text",startIcon:r?jsxRuntime.jsx(reactFeather.Minus,{}):jsxRuntime.jsx(reactFeather.Plus,{}),onClick:j,children:r?"Show less":"Show more"})})]})]})}function cx({onManageSubscription:t,onBuyMore:e,onCancelScheduledUpdates:n,onContactSupport:r,paywallComponent:i,hiddenSections:o,filterEntitlements:s}){let{customerPortal:c,textOverrides:p,theme:h,isLoading:v,showWatermark:P}=ir(),x=Bv.useRef(null),T=({intentionType:O})=>{var N,V;t?t({intentionType:O,customerSubscriptions:(N=c==null?void 0:c.subscriptions)!=null?N:[]}):(V=x==null?void 0:x.current)==null||V.scrollIntoView({behavior:"smooth"});},I=!(o!=null&&o.some(O=>O==="usage")),R=!(o!=null&&o.some(O=>O==="paymentDetails"||O==="billingInformation")),A=!(o!=null&&o.some(O=>O==="invoices"||O==="billingInformation"));return jsxRuntime.jsxs(YP,{className:"stigg-customer-portal-layout",children:[jsxRuntime.jsx(jP,{showWatermark:P}),jsxRuntime.jsxs(QP,{className:"stigg-customer-portal-sections",children:[jsxRuntime.jsx(km,{onCancelScheduledUpdates:n,onBuyMore:e,onManageSubscription:T,onContactSupport:r,hiddenSections:o,cancelScheduledUpdatesButtonTitle:p.cancelScheduledUpdatesButtonTitle}),I&&jsxRuntime.jsx(Nm,{onManageSubscription:T,onBuyMore:e,filterEntitlements:s}),jsxRuntime.jsx(cv,{ref:x,paywallComponent:i,theme:h,title:p.paywallSectionTitle,isLoading:!c||v}),R&&jsxRuntime.jsx(Fm,{}),A&&jsxRuntime.jsx(Lm,{})]})]})}function dx(o){var s=o,{textOverrides:t,theme:e,resourceId:n,productId:r}=s,i=On(s,["textOverrides","theme","resourceId","productId"]);return jsxRuntime.jsx(gm,{textOverrides:t,theme:e,resourceId:n,productId:r,children:jsxRuntime.jsx(cx,W({},i))})}function Lm(){let{customerPortal:t,isLoading:e,textOverrides:n,theme:r}=ir(),i=!t||e,o=i?jsxRuntime.jsx(Om,{}):t!=null&&t.billingPortalUrl?jsxRuntime.jsx(Dm,{url:t.billingPortalUrl,text:n.viewInvoiceHistory,className:"stigg-view-invoice-history-button"}):null;return !i&&!(t!=null&&t.billingPortalUrl)?null:jsxRuntime.jsx(pa,{className:"stigg-invoices-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor,children:jsxRuntime.jsxs(ca,{className:"stigg-invoices-section-header",children:[jsxRuntime.jsx(ua,{isLoading:i,className:"stigg-invoices-section-title",title:n.invoicesTitle}),o]})})}var fx=t=>px__default.default(t,"displayName"),pv=t=>px__default.default(t,"addon.displayName");function vR(t,e){return t.pricePoints.some(n=>n.billingPeriod===e)}function hx({addon:t,currency:e,billingCountryCode:n}){return St(W({},t),{pricePoints:t.pricePoints.filter(r=>r.currency===e&&(n?r.billingCountryCode===n:true))})}function mx({addons:t,billingCountryCode:e,currency:n}){var r;return ((r=t==null?void 0:t.filter(i=>{var o;return !((o=i.hiddenFromWidgets)!=null&&o.includes(Fu.Checkout))}))==null?void 0:r.map(i=>hx({addon:i,currency:n,billingCountryCode:e})))||[]}function gx({addons:t,billingPeriod:e,billingCountryCode:n,currency:r}){var i;return ((i=t==null?void 0:t.filter(o=>vR(o.addon,e)))==null?void 0:i.map(o=>St(W({},o),{addon:hx({addon:o.addon,currency:r,billingCountryCode:n})})))||[]}function yx({activeSubscription:t,plan:e,billingCountryCode:n}){var c,p;let r=[],i=((p=(c=e==null?void 0:e.pricePoints)==null?void 0:c[0])==null?void 0:p.currency)||Ru.Usd,o=fx(mx({addons:e==null?void 0:e.compatibleAddons,billingCountryCode:n,currency:i})),s=gx({addons:t==null?void 0:t.addons,billingCountryCode:n,currency:i});return s!=null&&s.length&&(o!=null&&o.length)&&(r=pv(s.filter(h=>o.some(v=>v.id===h.addon.id)))),{addons:r,initialAddons:CR__default.default(r),availableAddons:o}}function PR(){let[,t]=Ye();return (e,n)=>t(r=>{let i=r.addonsStep.addons.find(o=>o.addon.id===e.id);i?i.quantity=n:(r.addonsStep.addons.push({addon:e,quantity:n}),r.addonsStep.addons=pv(r.addonsStep.addons));})}function xR(){let[,t]=Ye();return e=>t(n=>{SR__default.default(n.addonsStep.addons,r=>r.addon.id===e);})}function ER(){let[{addonsStep:t}]=Ye();return t}function bx(){let t=ER();return St(W({},t),{setAddon:PR(),removeAddon:xR()})}function _R(){let[{checkout:t,widgetState:e,checkoutLocalization:n,checkoutSuccess:r}]=Ye();return {checkoutState:t,widgetState:e,checkoutLocalization:n,checkoutSuccess:r}}function TR(){let[,t]=Ye();return e=>t(n=>{n.widgetState.readOnly=e;})}function wR(){let[,t]=Ye();return e=>t(n=>{n.widgetState.isValid=e;})}function IR(){let[,t]=Ye();return e=>t(n=>{n.checkoutSuccess=e;})}function ze(){let{checkoutState:t,widgetState:e,checkoutLocalization:n,checkoutSuccess:r}=_R();return {checkoutState:t,widgetState:e,checkoutLocalization:n,checkoutSuccess:r,setWidgetReadOnly:TR(),setIsValid:wR(),setCheckoutSuccess:IR()}}function Cx({planId:t,resourceId:e,billingCountryCode:n,onMockCheckoutState:r}){let{stigg:i}=ve(),[o,s]=Bv.useState(true),[c,p]=Bv.useState();return Bv.useEffect(()=>{let h=()=>ce(null,null,function*(){try{let v=yield i.getCheckoutState({planId:t,resourceId:e,billingCountryCode:n});p(v);}catch(v){tl.error(`Failed to load checkout ${v==null?void 0:v.message}`,v);}finally{s(false);}});if(r){s(false),p(r({planId:t,resourceId:e,billingCountryCode:n}));return}i.isCustomerLoaded&&(s(true),h());},[i,i.isCustomerLoaded,e,t,n,r]),{checkout:c,isLoading:o,showWatermark:i.getShowWatermark()}}var qu=X1(kv());var tg=(t,e)=>t.minUnitQuantity&&e<t.minUnitQuantity?t.minUnitQuantity:t.maxUnitQuantity&&e>t.maxUnitQuantity?t.maxUnitQuantity:e;var Dv=X1(kv()),Av=t=>!!(t!=null&&t.pricePoints.some(e=>e.billingPeriod===Dv.BillingPeriod.Monthly)),Ov=t=>!!(t!=null&&t.pricePoints.some(e=>e.billingPeriod===Dv.BillingPeriod.Annually)),sE=t=>Av(t)&&Ov(t);var uE=(t,e,n)=>t===qu.BillingPeriod.Monthly&&e||t===qu.BillingPeriod.Annually&&n?t:null,dE=({pricingModel:t})=>t===nn.PerUnit;function IN(t,e,n){var o;if(!e)return [];let r=lE__default.default(t,"featureId"),i=lE__default.default(cE__default.default((o=n==null?void 0:n.prices)==null?void 0:o.map(s=>{let{feature:c}=s;return !c||!dE(s)?null:{featureId:c.featureId,quantity:c.unitQuantity||null}})),"featureId");return cE__default.default(e==null?void 0:e.map(s=>{var v,P,x;let c=(v=s.feature)==null?void 0:v.featureId;if(!c||!dE(s))return null;let p,h=((P=r[c])==null?void 0:P.quantity)||((x=i[c])==null?void 0:x.quantity);return p=tg(s,h||1),s.isTieredPrice&&!Fp(s.tiers)&&(p=Ob(s.tiers,p).upTo),{featureId:c,quantity:p}}))}function kN({plan:t,activeSubscription:e,preferredBillingPeriod:n}){var s,c;let r=Av(t),i=Ov(t);if(n){let p=uE(n,r,i);if(p)return p}if(((s=e==null?void 0:e.plan)==null?void 0:s.id)===(t==null?void 0:t.id))return ((c=e==null?void 0:e.price)==null?void 0:c.billingPeriod)||qu.BillingPeriod.Monthly;if(e!=null&&e.prices&&(e==null?void 0:e.prices.length)>0){let p=uE(e==null?void 0:e.prices[0].billingPeriod,r,i);if(p)return p}return i?qu.BillingPeriod.Annually:qu.BillingPeriod.Monthly}function pE({preferredBillingPeriod:t,plan:e,activeSubscription:n,billingCountryCode:r,preconfiguredBillableFeatures:i}){let o=kN({plan:e,activeSubscription:n,preferredBillingPeriod:t}),s=e==null?void 0:e.pricePoints.filter(p=>p.billingPeriod===o),c=IN(i,s,n);return {billingPeriod:o,billableFeatures:c,billingCountryCode:r}}function DN(){let[{planStep:t}]=Ye();return t}function AN(){let[,t]=Ye();return (e,n)=>t(r=>{let i=r.planStep.billableFeatures.find(o=>o.featureId===e);i?i.quantity=n:r.planStep.billableFeatures.push({featureId:e,quantity:n});})}function ON(){let[,t]=Ye();return e=>t(n=>{n.planStep.billingPeriod=e,n.addonsStep.addons=n.addonsStep.addons.filter(r=>r.addon.pricePoints.some(i=>i.billingPeriod===e));})}function lo(){let t=DN();return St(W({},t),{setBillingPeriod:ON(),setBillableFeature:AN()})}var hE=[{key:"PLAN",label:"Plan"},{key:"ADDONS",label:"Add-ons"},{key:"PAYMENT",label:"Payment details"}],fE={activeStep:0,completedSteps:[],steps:hE,isDisabled:false},FN=(t,e,n,r)=>{if(sE(t)&&!r)return false;let i=e.map(s=>s.featureId),o=n.map(s=>s.featureId);return !(i.length!==o.length||!i.every(s=>o.includes(s)))};function mE({isLoading:t,skipCheckoutSteps:e,plan:n,availableAddons:r,availableCharges:i,preferredBillingPeriod:o,preconfiguredBillableFeatures:s}){if(t||!n)return fE;let c=[];return e.includes("PLAN")&&FN(n,i,s,o)&&c.push("PLAN"),((r==null?void 0:r.length)===0||e.includes("ADDONS"))&&c.push("ADDONS"),St(W({},fE),{steps:hE.filter(p=>!c.includes(p.key))})}function MN(){let[{progressBar:t}]=Ye();return t}function NN(){let[t,e]=Ye();return n=>ce(null,null,function*(){let{progressBar:r,planStep:i,addonsStep:o,paymentStep:s,onBeforeStepChange:c}=t;if(n!==r.activeStep&&c){let p=r.steps[r.activeStep],h=r.steps[n];if(p&&h){let v={planStep:i,addonsStep:o,paymentStep:s};if(!(yield c({from:p.key,to:h.key,state:v})))return}}e(({progressBar:p})=>{p.activeStep=n;});})}function LN(){let[,t]=Ye();return e=>t(({progressBar:n})=>{n.completedSteps.push(e);})}function BN(t){return t.completedSteps.length>=t.steps.length-1}function UN(){let[t,e]=Ye();return ()=>ce(null,null,function*(){let{progressBar:n,planStep:r,addonsStep:i,paymentStep:o,onBeforeStepChange:s}=t;if(n.isDisabled)return;let c=n.steps[n.activeStep],p=n.steps[n.activeStep+1];if(p&&s){let h={planStep:r,addonsStep:i,paymentStep:o};if(!(yield s({from:c.key,to:p.key,state:h})))return}e(({progressBar:h})=>{h.completedSteps.includes(h.activeStep)||h.completedSteps.push(h.activeStep),h.activeStep<h.steps.length-1&&(h.activeStep+=1);});})}function $N(){let[,t]=Ye();return e=>t(({progressBar:n})=>{n.isDisabled=!!e;})}function ha(){let t=MN();return {currentStep:t.steps[t.activeStep],progressBarState:t,isLastStep:t.activeStep===t.steps.length-1,isCheckoutComplete:BN(t),setActiveStep:NN(),markStepAsCompleted:LN(),goNext:UN(),setIsDisabled:$N()}}function Yu(){let[{planStep:t,addonsStep:e,promotionCode:n,paymentStep:r}]=Ye();return St(W({},t),{addons:e.addons,promotionCode:n,billingAddress:r.billingAddress,taxPercentage:r.taxPercentage})}function zN({billingAddress:t,taxPercentage:e}){return !t&&!e?{}:{billingInformation:W(W({},t?{billingAddress:t}:{}),e?{taxPercentage:e}:{})}}var HN=x=>ce(null,[x],function*({stigg:t,customerId:e,planId:n,resourceId:r,promotionCode:i,addons:o,billableFeatures:s,billingCountryCode:c,billingPeriod:p,billingAddress:h,taxPercentage:v,onMockCheckoutPreview:P}){var A;let T=o.map(({addon:O,quantity:N})=>({addonId:O.id,quantity:N})),I=null,R=null;try{if(e&&n){let O=W({customerId:e,planId:n,resourceId:r,billingCountryCode:c,addons:T,billingPeriod:p,promotionCode:i,billableFeatures:rO__default.default(s)?void 0:s},zN({billingAddress:h,taxPercentage:v}));I=P?P(O):yield t.previewSubscription(O);}}catch(O){let[,N]=((A=O==null?void 0:O.message)==null?void 0:A.split("Error:"))||[];R=N==null?void 0:N.trim();}return {subscriptionPreview:I,errorMessage:R}}),Rv=({onMockCheckoutPreview:t}={})=>{let{stigg:e}=ve(),n=Yu(),[{resourceId:r}]=Ye(),{checkoutState:i,widgetState:o}=ze(),{plan:s,customer:c}=i||{};return {previewSubscriptionAction:Bv.useCallback((...v)=>ce(null,[...v],function*({promotionCode:h}={}){return o.isValid?HN({stigg:e,customerId:c==null?void 0:c.id,planId:s==null?void 0:s.id,resourceId:r,addons:n.addons,billableFeatures:n.billableFeatures,billingCountryCode:n.billingCountryCode,billingPeriod:n.billingPeriod,billingAddress:n.billingAddress,taxPercentage:n.taxPercentage,promotionCode:h!=null?h:n.promotionCode,onMockCheckoutPreview:t}):{subscriptionPreview:null,errorMessage:null}}),[e,c==null?void 0:c.id,s==null?void 0:s.id,r,n.addons,n.billableFeatures,n.billingCountryCode,n.billingPeriod,n.billingAddress,n.taxPercentage,n.promotionCode,o.isValid,t])}},WN=500,yE=({onMockCheckoutPreview:t}={})=>{let[e,n]=Bv.useState(null),[r,i]=Bv.useState(false),{previewSubscriptionAction:o}=Rv({onMockCheckoutPreview:t});return Bv.useEffect(()=>{let s=()=>ce(null,null,function*(){let{subscriptionPreview:p}=yield o();p&&n(p),i(false);});i(true);let c=setTimeout(()=>{i(true),s();},WN);return ()=>{clearTimeout(c);}},[o]),{subscriptionPreview:e,isFetchingSubscriptionPreview:r}};function bE({customer:t,taxPercentage:e}){return {useNewPaymentMethod:!(t!=null&&t.paymentMethodDetails),taxPercentage:e}}function qN(){let[,t]=Ye();return e=>t(n=>{n.paymentStep.useNewPaymentMethod=e;})}function YN(){let[,t]=Ye();return e=>t(n=>{n.paymentStep.errorMessage=e;})}function QN(){let[,t]=Ye();return e=>t(n=>{n.paymentStep.billingAddress=e;})}function KN(){let[{paymentStep:t}]=Ye();return t}function Pi(){let t=KN();return St(W({},t),{setUseNewPaymentMethod:qN(),setErrorMessage:YN(),setBillingAddress:QN()})}function vE(t){return zD__default.default({changePlan:"Change",billingPeriodsTitle:"Billing cycle",addAddonText:"Add",addonBillingPeriodNotAvailableText:({planBillingPeriod:n})=>n===be.Monthly?"Exclusively available on annual plans":"Exclusively available on monthly plans",newPaymentMethodText:"New payment method",newPaymentMethodBillingAddressTitle:"Billing address",newPaymentMethodCardTitle:"Payment method",summary:{title:"Order summary",planName:({plan:n})=>`${n.displayName} plan`,addCouponCodeText:"Add promotion code",couponCodeTitle:"Promotion code",addonsSectionTitle:"Add-ons",discountsSectionTitle:"Discounts",onlyPayAsYouGoText:"Varies by usage",startsAtText:"Starts at ",proratedTotalDueText:"Prorated charge today",baseChargeText:()=>"Base charge",totalText:"Total",totalDueText:"Total due today",totalBillingPeriodText:({billingPeriod:n})=>`Billed ${n.toLowerCase()}`,appliedCreditsTitle:"Applied credits",creditsForUnusedTimeText:({credits:n})=>`Your account will be granted credits worth ${n} for unused time, which will be automatically applied to future payments.`,discountText:({discountDetails:n,currency:r})=>{let i="";n.type===mb.Percentage?i=`${n.value}% off`:i=`${wn({amount:n.value,currency:r})}`;let o="";switch(n.durationType){case tm.Once:{o=" once";break}case tm.Repeating:{o=`${n.type===mb.Fixed?" per month":""} for ${n.durationInMonths} months`;break}case tm.Forever:default:o="";}return `${i}${o}`},taxTitle:({taxDetails:n})=>`Tax (${n==null?void 0:n.percentage}%)`,changesWillApplyAtEndOfBillingPeriod:({billingPeriodEnd:n})=>`Your changes will take effect at the end of your current billing cycle on ${$1__default.default(n).format("MMMM D, YYYY")}.`,checkoutSuccessText:"Changes applied",payAsYouGoTooltipText:"Billed according to actual usage"},checkoutButton:{nextText:"Next",noChangesText:"No changes",updateText:"Update subscription",downgradeToFreeText:"Cancel subscription",upgradeText:"Subscribe"},downgradeToFree:{alertText:()=>"We\u2019re sorry to see you cancel your paid subscription \u{1F62D}",freePlanHeader:()=>"New plan",freePlanName:({plan:n})=>`${n.displayName}`,freePlanPriceText:()=>"Free",paidPlanHeader:()=>"Current plan",paidPlanName:({plan:n})=>`${n.displayName}`,paidPlanPriceText:({billingPeriod:n})=>`Paid plan${n?`, billed ${n.toLowerCase()}`:""}`}},t)}var Jp={primary:"rgb(50, 126, 238)",textColor:"rgb(0, 30, 108)",backgroundColor:"rgb(255, 255, 255)",borderColor:"rgb(235, 237, 243)",summaryBackgroundColor:"rgb(109, 121, 144)"};function CE(t,e,n){let{palette:r}=t||{};return {primary:(e==null?void 0:e.primary)||(r==null?void 0:r.primary)||Jp.primary,textColor:(e==null?void 0:e.textColor)||(r==null?void 0:r.text.primary)||Jp.textColor,backgroundColor:(e==null?void 0:e.backgroundColor)||(r==null?void 0:r.backgroundPaper)||Jp.backgroundColor,borderColor:(e==null?void 0:e.borderColor)||(r==null?void 0:r.outlinedBorder)||Jp.borderColor,summaryBackgroundColor:(e==null?void 0:e.summaryBackgroundColor)||(r==null?void 0:r.backgroundHighlight)||Jp.summaryBackgroundColor,paymentInputBackgroundColor:e==null?void 0:e.paymentInputBackgroundColor,paymentInputBorderColor:e==null?void 0:e.paymentInputBorderColor,paymentInputBorderRadius:e==null?void 0:e.paymentInputBorderRadius}}var Mv=Bv__default.default.createContext(null);Mv.displayName="CheckoutContext";var Ye=()=>{let t=Bv.useContext(Mv);if(!t)throw new Error("Could not find Checkout context; You need to wrap your checkout components in an <CheckoutProvider> component.");return t},o3=({children:t,initialState:e})=>{let[n,r]=Bv.useState(e);Bv.useEffect(()=>{r(e);},[e]);let i=Bv.useCallback(c=>r(p=>immer.produce(p,h=>c(h))),[r]),[o,s]=Bv.useMemo(()=>[n,i],[i,n]);return jsxRuntime.jsx(Mv.Provider,{value:[o,s],children:t})};function PE({children:t,textOverrides:e,theme:n,preferredBillingPeriod:r,billableFeatures:i,resourceId:o,planId:s,billingCountryCode:c,billingInformation:p,onMockCheckoutState:h,skipCheckoutSteps:v,onBeforeStepChange:P}){var N;let{checkout:x,isLoading:T,showWatermark:I}=Cx({resourceId:o,planId:s,billingCountryCode:c,onMockCheckoutState:h}),R=x!=null&&x.configuration?AS(x.configuration):{typography:$p(null,fm)},A=pc(R),O=Bv.useMemo(()=>{var ut,Y;let V=CE(A,n,x==null?void 0:x.configuration),G=vE(e),X=pE({preferredBillingPeriod:r,plan:x==null?void 0:x.plan,activeSubscription:x==null?void 0:x.activeSubscription,billingCountryCode:c,preconfiguredBillableFeatures:i!=null?i:[]}),nt=yx({plan:x==null?void 0:x.plan,activeSubscription:x==null?void 0:x.activeSubscription}),st=bE({customer:x==null?void 0:x.customer,taxPercentage:(ut=p==null?void 0:p.taxDetails)==null?void 0:ut.taxPercentage}),U=mE({isLoading:T,skipCheckoutSteps:v!=null?v:[],plan:x==null?void 0:x.plan,availableAddons:nt.availableAddons,availableCharges:X.billableFeatures,preferredBillingPeriod:r,preconfiguredBillableFeatures:i!=null?i:[]});return {checkout:x,checkoutLocalization:G,stiggTheme:A,theme:V,progressBar:U,planStep:X,addonsStep:nt,paymentStep:st,resourceId:(Y=x==null?void 0:x.resource)==null?void 0:Y.id,widgetState:{readOnly:false,isValid:true,isLoadingCheckoutData:T},showWatermark:I,checkoutSuccess:false,onBeforeStepChange:P}},[r,c,x,T,v,(N=p==null?void 0:p.taxDetails)==null?void 0:N.taxPercentage,P]);return jsxRuntime.jsx(vi,{componentTheme:R,children:jsxRuntime.jsx(o3,{initialState:O,children:t})},x==null?void 0:x.plan.id)}var EE=Q.div`
|
|
5312
|
+
`;function nx(){let t=Ci("md");return jsxRuntime.jsx(da__default.default,{container:true,spacing:4,className:"stigg-subscription-usage-skeleton-layout",sx:{flexWrap:"wrap"},children:lodash.range(6).map(e=>jsxRuntime.jsx(da__default.default,{item:true,xs:t?4:12,children:jsxRuntime.jsx(nl__default.default,{width:280,height:120})},e))})}var ax=6;function Nm({onManageSubscription:t,onBuyMore:e,filterEntitlements:n}){var ut,Y;let[r,i]=Bv.useState(false),o=Ci("md"),{customerPortal:s,isLoading:c,textOverrides:p,theme:h}=ir(),v=c||!s,{entitlements:P,subscriptions:x}=s||{},T=P==null?void 0:P.filter(at=>{var pt,dt;return ((pt=at.feature)==null?void 0:pt.meterType)===yb.Fluctuating||((dt=at.feature)==null?void 0:dt.meterType)===yb.Incremental}),I=x==null?void 0:x.find(({status:at})=>at===bi.Active),R=(I==null?void 0:I.pricingType)===Rn.Custom,A=!!(s!=null&&s.canUpgradeSubscription),O=lodash.keyBy((ut=I==null?void 0:I.prices)!=null?ut:[],"feature.refId"),N=lodash.keyBy(T!=null?T:[],"feature.refId"),V=lodash.compact(((Y=I==null?void 0:I.prices)!=null?Y:[]).map(at=>at.feature&&N[at.feature.refId]||void 0)),G=lodash.compact((T!=null?T:[]).filter(at=>!O[at.feature.refId])),X=[...V,...G].filter(at=>at.usageLimit!==0),nt=n?n(X):X,st=o?nt.length>2?4:6:12,U=r?nt:nt.slice(0,ax),j=()=>i(at=>!at);return !v&&!(T!=null&&T.length)?null:jsxRuntime.jsxs(pa,{className:"stigg-subscription-usage-layout",$backgroundColor:h.backgroundColor,$borderColor:h.borderColor,children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx(ua,{title:p.usageTabTitle,className:"stigg-customer-portal-usage-section-title",isLoading:v})}),v?jsxRuntime.jsx(nx,{}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(da__default.default,{container:true,spacing:4,children:U.map(at=>jsxRuntime.jsx(da__default.default,{className:`stigg-entitlement-usage-${at.feature.refId}`,item:true,xs:st,children:jsxRuntime.jsx(JP,{subscriptionPrice:O[at.feature.refId],entitlement:at,onManageSubscription:t,onBuyMore:e,hasCustomSubscription:R,canUpgradeSubscription:A},at.feature.refId)},at.feature.refId))}),nt.length>ax&&jsxRuntime.jsx(ex,{children:jsxRuntime.jsx(rl,{className:"stigg-usage-toggle-many-button",variant:"text",startIcon:r?jsxRuntime.jsx(reactFeather.Minus,{}):jsxRuntime.jsx(reactFeather.Plus,{}),onClick:j,children:r?"Show less":"Show more"})})]})]})}function cx({onManageSubscription:t,onBuyMore:e,onCancelScheduledUpdates:n,onContactSupport:r,paywallComponent:i,hiddenSections:o,filterEntitlements:s}){let{customerPortal:c,textOverrides:p,theme:h,isLoading:v,showWatermark:P}=ir(),x=Bv.useRef(null),T=({intentionType:O})=>{var N,V;t?t({intentionType:O,customerSubscriptions:(N=c==null?void 0:c.subscriptions)!=null?N:[]}):(V=x==null?void 0:x.current)==null||V.scrollIntoView({behavior:"smooth"});},I=!(o!=null&&o.some(O=>O==="usage")),R=!(o!=null&&o.some(O=>O==="paymentDetails"||O==="billingInformation")),A=!(o!=null&&o.some(O=>O==="invoices"||O==="billingInformation"));return jsxRuntime.jsxs(YP,{className:"stigg-customer-portal-layout",children:[jsxRuntime.jsx(jP,{showWatermark:P}),jsxRuntime.jsxs(QP,{className:"stigg-customer-portal-sections",children:[jsxRuntime.jsx(km,{onCancelScheduledUpdates:n,onBuyMore:e,onManageSubscription:T,onContactSupport:r,hiddenSections:o,cancelScheduledUpdatesButtonTitle:p.cancelScheduledUpdatesButtonTitle}),I&&jsxRuntime.jsx(Nm,{onManageSubscription:T,onBuyMore:e,filterEntitlements:s}),jsxRuntime.jsx(cv,{ref:x,paywallComponent:i,theme:h,title:p.paywallSectionTitle,isLoading:!c||v}),R&&jsxRuntime.jsx(Fm,{}),A&&jsxRuntime.jsx(Lm,{})]})]})}function dx(o){var s=o,{textOverrides:t,theme:e,resourceId:n,productId:r}=s,i=On(s,["textOverrides","theme","resourceId","productId"]);return jsxRuntime.jsx(gm,{textOverrides:t,theme:e,resourceId:n,productId:r,children:jsxRuntime.jsx(cx,W({},i))})}function Lm(){let{customerPortal:t,isLoading:e,textOverrides:n,theme:r}=ir(),i=!t||e,o=i?jsxRuntime.jsx(Om,{}):t!=null&&t.billingPortalUrl?jsxRuntime.jsx(Dm,{url:t.billingPortalUrl,text:n.viewInvoiceHistory,className:"stigg-view-invoice-history-button"}):null;return !i&&!(t!=null&&t.billingPortalUrl)?null:jsxRuntime.jsx(pa,{className:"stigg-invoices-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor,children:jsxRuntime.jsxs(ca,{className:"stigg-invoices-section-header",children:[jsxRuntime.jsx(ua,{isLoading:i,className:"stigg-invoices-section-title",title:n.invoicesTitle}),o]})})}var fx=t=>px__default.default(t,"displayName"),pv=t=>px__default.default(t,"addon.displayName");function CR(t,e){return t.pricePoints.some(n=>n.billingPeriod===e)}function hx({addon:t,currency:e,billingCountryCode:n}){return St(W({},t),{pricePoints:t.pricePoints.filter(r=>r.currency===e&&(n?r.billingCountryCode===n:true))})}function mx({addons:t,billingCountryCode:e,currency:n}){var r;return ((r=t==null?void 0:t.filter(i=>{var o;return !((o=i.hiddenFromWidgets)!=null&&o.includes(Fu.Checkout))}))==null?void 0:r.map(i=>hx({addon:i,currency:n,billingCountryCode:e})))||[]}function gx({addons:t,billingPeriod:e,billingCountryCode:n,currency:r}){var i;return ((i=t==null?void 0:t.filter(o=>CR(o.addon,e)))==null?void 0:i.map(o=>St(W({},o),{addon:hx({addon:o.addon,currency:r,billingCountryCode:n})})))||[]}function yx({activeSubscription:t,plan:e,billingCountryCode:n}){var c,p;let r=[],i=((p=(c=e==null?void 0:e.pricePoints)==null?void 0:c[0])==null?void 0:p.currency)||Ru.Usd,o=fx(mx({addons:e==null?void 0:e.compatibleAddons,billingCountryCode:n,currency:i})),s=gx({addons:t==null?void 0:t.addons,billingCountryCode:n,currency:i});return s!=null&&s.length&&(o!=null&&o.length)&&(r=pv(s.filter(h=>o.some(v=>v.id===h.addon.id)))),{addons:r,initialAddons:SR__default.default(r),availableAddons:o}}function xR(){let[,t]=Ye();return (e,n)=>t(r=>{let i=r.addonsStep.addons.find(o=>o.addon.id===e.id);i?i.quantity=n:(r.addonsStep.addons.push({addon:e,quantity:n}),r.addonsStep.addons=pv(r.addonsStep.addons));})}function ER(){let[,t]=Ye();return e=>t(n=>{PR__default.default(n.addonsStep.addons,r=>r.addon.id===e);})}function _R(){let[{addonsStep:t}]=Ye();return t}function bx(){let t=_R();return St(W({},t),{setAddon:xR(),removeAddon:ER()})}function TR(){let[{checkout:t,widgetState:e,checkoutLocalization:n,checkoutSuccess:r}]=Ye();return {checkoutState:t,widgetState:e,checkoutLocalization:n,checkoutSuccess:r}}function wR(){let[,t]=Ye();return e=>t(n=>{n.widgetState.readOnly=e;})}function IR(){let[,t]=Ye();return e=>t(n=>{n.widgetState.isValid=e;})}function kR(){let[,t]=Ye();return e=>t(n=>{n.checkoutSuccess=e;})}function ze(){let{checkoutState:t,widgetState:e,checkoutLocalization:n,checkoutSuccess:r}=TR();return {checkoutState:t,widgetState:e,checkoutLocalization:n,checkoutSuccess:r,setWidgetReadOnly:wR(),setIsValid:IR(),setCheckoutSuccess:kR()}}function Cx({planId:t,resourceId:e,billingCountryCode:n,onMockCheckoutState:r}){let{stigg:i}=ve(),[o,s]=Bv.useState(true),[c,p]=Bv.useState();return Bv.useEffect(()=>{let h=()=>ce(null,null,function*(){try{let v=yield i.getCheckoutState({planId:t,resourceId:e,billingCountryCode:n});p(v);}catch(v){tl.error(`Failed to load checkout ${v==null?void 0:v.message}`,v);}finally{s(false);}});if(r){s(false),p(r({planId:t,resourceId:e,billingCountryCode:n}));return}i.isCustomerLoaded&&(s(true),h());},[i,i.isCustomerLoaded,e,t,n,r]),{checkout:c,isLoading:o,showWatermark:i.getShowWatermark()}}var qu=X1(kv());var tg=(t,e)=>t.minUnitQuantity&&e<t.minUnitQuantity?t.minUnitQuantity:t.maxUnitQuantity&&e>t.maxUnitQuantity?t.maxUnitQuantity:e;var Dv=X1(kv()),Av=t=>!!(t!=null&&t.pricePoints.some(e=>e.billingPeriod===Dv.BillingPeriod.Monthly)),Ov=t=>!!(t!=null&&t.pricePoints.some(e=>e.billingPeriod===Dv.BillingPeriod.Annually)),sE=t=>Av(t)&&Ov(t);var uE=(t,e,n)=>t===qu.BillingPeriod.Monthly&&e||t===qu.BillingPeriod.Annually&&n?t:null,dE=({pricingModel:t})=>t===nn.PerUnit;function kN(t,e,n){var o;if(!e)return [];let r=lE__default.default(t,"featureId"),i=lE__default.default(cE__default.default((o=n==null?void 0:n.prices)==null?void 0:o.map(s=>{let{feature:c}=s;return !c||!dE(s)?null:{featureId:c.featureId,quantity:c.unitQuantity||null}})),"featureId");return cE__default.default(e==null?void 0:e.map(s=>{var v,P,x;let c=(v=s.feature)==null?void 0:v.featureId;if(!c||!dE(s))return null;let p,h=((P=r[c])==null?void 0:P.quantity)||((x=i[c])==null?void 0:x.quantity);return p=tg(s,h||1),s.isTieredPrice&&!Fp(s.tiers)&&(p=Ob(s.tiers,p).upTo),{featureId:c,quantity:p}}))}function DN({plan:t,activeSubscription:e,preferredBillingPeriod:n}){var s,c;let r=Av(t),i=Ov(t);if(n){let p=uE(n,r,i);if(p)return p}if(((s=e==null?void 0:e.plan)==null?void 0:s.id)===(t==null?void 0:t.id))return ((c=e==null?void 0:e.price)==null?void 0:c.billingPeriod)||qu.BillingPeriod.Monthly;if(e!=null&&e.prices&&(e==null?void 0:e.prices.length)>0){let p=uE(e==null?void 0:e.prices[0].billingPeriod,r,i);if(p)return p}return i?qu.BillingPeriod.Annually:qu.BillingPeriod.Monthly}function pE({preferredBillingPeriod:t,plan:e,activeSubscription:n,billingCountryCode:r,preconfiguredBillableFeatures:i}){let o=DN({plan:e,activeSubscription:n,preferredBillingPeriod:t}),s=e==null?void 0:e.pricePoints.filter(p=>p.billingPeriod===o),c=kN(i,s,n);return {billingPeriod:o,billableFeatures:c,billingCountryCode:r}}function AN(){let[{planStep:t}]=Ye();return t}function ON(){let[,t]=Ye();return (e,n)=>t(r=>{let i=r.planStep.billableFeatures.find(o=>o.featureId===e);i?i.quantity=n:r.planStep.billableFeatures.push({featureId:e,quantity:n});})}function RN(){let[,t]=Ye();return e=>t(n=>{n.planStep.billingPeriod=e,n.addonsStep.addons=n.addonsStep.addons.filter(r=>r.addon.pricePoints.some(i=>i.billingPeriod===e));})}function lo(){let t=AN();return St(W({},t),{setBillingPeriod:RN(),setBillableFeature:ON()})}var hE=[{key:"PLAN",label:"Plan"},{key:"ADDONS",label:"Add-ons"},{key:"PAYMENT",label:"Payment details"}],fE={activeStep:0,completedSteps:[],steps:hE,isDisabled:false},MN=(t,e,n,r)=>{if(sE(t)&&!r)return false;let i=e.map(s=>s.featureId),o=n.map(s=>s.featureId);return !(i.length!==o.length||!i.every(s=>o.includes(s)))};function mE({isLoading:t,skipCheckoutSteps:e,plan:n,availableAddons:r,availableCharges:i,preferredBillingPeriod:o,preconfiguredBillableFeatures:s}){if(t||!n)return fE;let c=[];return e.includes("PLAN")&&MN(n,i,s,o)&&c.push("PLAN"),((r==null?void 0:r.length)===0||e.includes("ADDONS"))&&c.push("ADDONS"),St(W({},fE),{steps:hE.filter(p=>!c.includes(p.key))})}function NN(){let[{progressBar:t}]=Ye();return t}function LN(){let[t,e]=Ye();return n=>ce(null,null,function*(){let{progressBar:r,planStep:i,addonsStep:o,paymentStep:s,onBeforeStepChange:c}=t;if(n!==r.activeStep&&c){let p=r.steps[r.activeStep],h=r.steps[n];if(p&&h){let v={planStep:i,addonsStep:o,paymentStep:s};if(!(yield c({from:p.key,to:h.key,state:v})))return}}e(({progressBar:p})=>{p.activeStep=n;});})}function BN(){let[,t]=Ye();return e=>t(({progressBar:n})=>{n.completedSteps.push(e);})}function UN(t){return t.completedSteps.length>=t.steps.length-1}function $N(){let[t,e]=Ye();return ()=>ce(null,null,function*(){let{progressBar:n,planStep:r,addonsStep:i,paymentStep:o,onBeforeStepChange:s}=t;if(n.isDisabled)return;let c=n.steps[n.activeStep],p=n.steps[n.activeStep+1];if(p&&s){let h={planStep:r,addonsStep:i,paymentStep:o};if(!(yield s({from:c.key,to:p.key,state:h})))return}e(({progressBar:h})=>{h.completedSteps.includes(h.activeStep)||h.completedSteps.push(h.activeStep),h.activeStep<h.steps.length-1&&(h.activeStep+=1);});})}function GN(){let[,t]=Ye();return e=>t(({progressBar:n})=>{n.isDisabled=!!e;})}function ha(){let t=NN();return {currentStep:t.steps[t.activeStep],progressBarState:t,isLastStep:t.activeStep===t.steps.length-1,isCheckoutComplete:UN(t),setActiveStep:LN(),markStepAsCompleted:BN(),goNext:$N(),setIsDisabled:GN()}}function Yu(){let[{planStep:t,addonsStep:e,promotionCode:n,paymentStep:r}]=Ye();return St(W({},t),{addons:e.addons,promotionCode:n,billingAddress:r.billingAddress,taxPercentage:r.taxPercentage})}function HN({billingAddress:t,taxPercentage:e}){return !t&&!e?{}:{billingInformation:W(W({},t?{billingAddress:t}:{}),e?{taxPercentage:e}:{})}}var WN=x=>ce(null,[x],function*({stigg:t,customerId:e,planId:n,resourceId:r,promotionCode:i,addons:o,billableFeatures:s,billingCountryCode:c,billingPeriod:p,billingAddress:h,taxPercentage:v,onMockCheckoutPreview:P}){var A;let T=o.map(({addon:O,quantity:N})=>({addonId:O.id,quantity:N})),I=null,R=null;try{if(e&&n){let O=W({customerId:e,planId:n,resourceId:r,billingCountryCode:c,addons:T,billingPeriod:p,promotionCode:i,billableFeatures:iO__default.default(s)?void 0:s},HN({billingAddress:h,taxPercentage:v}));I=P?P(O):yield t.previewSubscription(O);}}catch(O){let[,N]=((A=O==null?void 0:O.message)==null?void 0:A.split("Error:"))||[];R=N==null?void 0:N.trim();}return {subscriptionPreview:I,errorMessage:R}}),Rv=({onMockCheckoutPreview:t}={})=>{let{stigg:e}=ve(),n=Yu(),[{resourceId:r}]=Ye(),{checkoutState:i,widgetState:o}=ze(),{plan:s,customer:c}=i||{};return {previewSubscriptionAction:Bv.useCallback((...v)=>ce(null,[...v],function*({promotionCode:h}={}){return o.isValid?WN({stigg:e,customerId:c==null?void 0:c.id,planId:s==null?void 0:s.id,resourceId:r,addons:n.addons,billableFeatures:n.billableFeatures,billingCountryCode:n.billingCountryCode,billingPeriod:n.billingPeriod,billingAddress:n.billingAddress,taxPercentage:n.taxPercentage,promotionCode:h!=null?h:n.promotionCode,onMockCheckoutPreview:t}):{subscriptionPreview:null,errorMessage:null}}),[e,c==null?void 0:c.id,s==null?void 0:s.id,r,n.addons,n.billableFeatures,n.billingCountryCode,n.billingPeriod,n.billingAddress,n.taxPercentage,n.promotionCode,o.isValid,t])}},qN=500,yE=({onMockCheckoutPreview:t}={})=>{let[e,n]=Bv.useState(null),[r,i]=Bv.useState(false),{previewSubscriptionAction:o}=Rv({onMockCheckoutPreview:t});return Bv.useEffect(()=>{let s=()=>ce(null,null,function*(){let{subscriptionPreview:p}=yield o();p&&n(p),i(false);});i(true);let c=setTimeout(()=>{i(true),s();},qN);return ()=>{clearTimeout(c);}},[o]),{subscriptionPreview:e,isFetchingSubscriptionPreview:r}};function bE({customer:t,taxPercentage:e}){return {useNewPaymentMethod:!(t!=null&&t.paymentMethodDetails),taxPercentage:e}}function YN(){let[,t]=Ye();return e=>t(n=>{n.paymentStep.useNewPaymentMethod=e;})}function QN(){let[,t]=Ye();return e=>t(n=>{n.paymentStep.errorMessage=e;})}function KN(){let[,t]=Ye();return e=>t(n=>{n.paymentStep.billingAddress=e;})}function XN(){let[{paymentStep:t}]=Ye();return t}function Pi(){let t=XN();return St(W({},t),{setUseNewPaymentMethod:YN(),setErrorMessage:QN(),setBillingAddress:KN()})}function vE(t){return HD__default.default({changePlan:"Change",billingPeriodsTitle:"Billing cycle",addAddonText:"Add",addonBillingPeriodNotAvailableText:({planBillingPeriod:n})=>n===be.Monthly?"Exclusively available on annual plans":"Exclusively available on monthly plans",newPaymentMethodText:"New payment method",newPaymentMethodBillingAddressTitle:"Billing address",newPaymentMethodCardTitle:"Payment method",summary:{title:"Order summary",planName:({plan:n})=>`${n.displayName} plan`,addCouponCodeText:"Add promotion code",couponCodeTitle:"Promotion code",addonsSectionTitle:"Add-ons",discountsSectionTitle:"Discounts",onlyPayAsYouGoText:"Varies by usage",startsAtText:"Starts at ",proratedTotalDueText:"Prorated charge today",baseChargeText:()=>"Base charge",totalText:"Total",totalDueText:"Total due today",totalBillingPeriodText:({billingPeriod:n})=>`Billed ${n.toLowerCase()}`,appliedCreditsTitle:"Applied credits",creditsForUnusedTimeText:({credits:n})=>`Your account will be granted credits worth ${n} for unused time, which will be automatically applied to future payments.`,discountText:({discountDetails:n,currency:r})=>{let i="";n.type===mb.Percentage?i=`${n.value}% off`:i=`${wn({amount:n.value,currency:r})}`;let o="";switch(n.durationType){case tm.Once:{o=" once";break}case tm.Repeating:{o=`${n.type===mb.Fixed?" per month":""} for ${n.durationInMonths} months`;break}case tm.Forever:default:o="";}return `${i}${o}`},taxTitle:({taxDetails:n})=>`Tax (${n==null?void 0:n.percentage}%)`,changesWillApplyAtEndOfBillingPeriod:({billingPeriodEnd:n})=>`Your changes will take effect at the end of your current billing cycle on ${$1__default.default(n).format("MMMM D, YYYY")}.`,checkoutSuccessText:"Changes applied",payAsYouGoTooltipText:"Billed according to actual usage"},checkoutButton:{nextText:"Next",noChangesText:"No changes",updateText:"Update subscription",downgradeToFreeText:"Cancel subscription",upgradeText:"Subscribe"},downgradeToFree:{alertText:()=>"We\u2019re sorry to see you cancel your paid subscription \u{1F62D}",freePlanHeader:()=>"New plan",freePlanName:({plan:n})=>`${n.displayName}`,freePlanPriceText:()=>"Free",paidPlanHeader:()=>"Current plan",paidPlanName:({plan:n})=>`${n.displayName}`,paidPlanPriceText:({billingPeriod:n})=>`Paid plan${n?`, billed ${n.toLowerCase()}`:""}`}},t)}var Jp={primary:"rgb(50, 126, 238)",textColor:"rgb(0, 30, 108)",backgroundColor:"rgb(255, 255, 255)",borderColor:"rgb(235, 237, 243)",summaryBackgroundColor:"rgb(109, 121, 144)"};function CE(t,e,n){let{palette:r}=t||{};return {primary:(e==null?void 0:e.primary)||(r==null?void 0:r.primary)||Jp.primary,textColor:(e==null?void 0:e.textColor)||(r==null?void 0:r.text.primary)||Jp.textColor,backgroundColor:(e==null?void 0:e.backgroundColor)||(r==null?void 0:r.backgroundPaper)||Jp.backgroundColor,borderColor:(e==null?void 0:e.borderColor)||(r==null?void 0:r.outlinedBorder)||Jp.borderColor,summaryBackgroundColor:(e==null?void 0:e.summaryBackgroundColor)||(r==null?void 0:r.backgroundHighlight)||Jp.summaryBackgroundColor,paymentInputBackgroundColor:e==null?void 0:e.paymentInputBackgroundColor,paymentInputBorderColor:e==null?void 0:e.paymentInputBorderColor,paymentInputBorderRadius:e==null?void 0:e.paymentInputBorderRadius}}var Mv=Bv__default.default.createContext(null);Mv.displayName="CheckoutContext";var Ye=()=>{let t=Bv.useContext(Mv);if(!t)throw new Error("Could not find Checkout context; You need to wrap your checkout components in an <CheckoutProvider> component.");return t},a3=({children:t,initialState:e})=>{let[n,r]=Bv.useState(e);Bv.useEffect(()=>{r(e);},[e]);let i=Bv.useCallback(c=>r(p=>immer.produce(p,h=>c(h))),[r]),[o,s]=Bv.useMemo(()=>[n,i],[i,n]);return jsxRuntime.jsx(Mv.Provider,{value:[o,s],children:t})};function PE({children:t,textOverrides:e,theme:n,preferredBillingPeriod:r,billableFeatures:i,resourceId:o,planId:s,billingCountryCode:c,billingInformation:p,onMockCheckoutState:h,skipCheckoutSteps:v,onBeforeStepChange:P}){var N;let{checkout:x,isLoading:T,showWatermark:I}=Cx({resourceId:o,planId:s,billingCountryCode:c,onMockCheckoutState:h}),R=x!=null&&x.configuration?AS(x.configuration):{typography:$p(null,fm)},A=pc(R),O=Bv.useMemo(()=>{var ut,Y;let V=CE(A,n,x==null?void 0:x.configuration),G=vE(e),X=pE({preferredBillingPeriod:r,plan:x==null?void 0:x.plan,activeSubscription:x==null?void 0:x.activeSubscription,billingCountryCode:c,preconfiguredBillableFeatures:i!=null?i:[]}),nt=yx({plan:x==null?void 0:x.plan,activeSubscription:x==null?void 0:x.activeSubscription}),st=bE({customer:x==null?void 0:x.customer,taxPercentage:(ut=p==null?void 0:p.taxDetails)==null?void 0:ut.taxPercentage}),U=mE({isLoading:T,skipCheckoutSteps:v!=null?v:[],plan:x==null?void 0:x.plan,availableAddons:nt.availableAddons,availableCharges:X.billableFeatures,preferredBillingPeriod:r,preconfiguredBillableFeatures:i!=null?i:[]});return {checkout:x,checkoutLocalization:G,stiggTheme:A,theme:V,progressBar:U,planStep:X,addonsStep:nt,paymentStep:st,resourceId:(Y=x==null?void 0:x.resource)==null?void 0:Y.id,widgetState:{readOnly:false,isValid:true,isLoadingCheckoutData:T},showWatermark:I,checkoutSuccess:false,onBeforeStepChange:P}},[r,c,x,T,v,(N=p==null?void 0:p.taxDetails)==null?void 0:N.taxPercentage,P]);return jsxRuntime.jsx(vi,{componentTheme:R,children:jsxRuntime.jsx(a3,{initialState:O,children:t})},x==null?void 0:x.plan.id)}var xE="920px",_E=Q.div`
|
|
5313
5313
|
margin: auto;
|
|
5314
5314
|
min-height: 760px;
|
|
5315
|
-
max-width:
|
|
5315
|
+
max-width: ${xE};
|
|
5316
5316
|
display: flex;
|
|
5317
5317
|
position: relative;
|
|
5318
5318
|
flex-direction: column;
|
|
@@ -5328,10 +5328,10 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5328
5328
|
padding: 16px 16px;
|
|
5329
5329
|
${qr.md} {
|
|
5330
5330
|
padding: 32px;
|
|
5331
|
-
width: calc(100% - 64px);
|
|
5332
5331
|
border-radius: 10px;
|
|
5332
|
+
width: ${xE};
|
|
5333
5333
|
}
|
|
5334
|
-
`,
|
|
5334
|
+
`,TE=Q(bg__default.default)`
|
|
5335
5335
|
display: flex;
|
|
5336
5336
|
align-items: flex-start;
|
|
5337
5337
|
gap: 32px;
|
|
@@ -5342,7 +5342,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5342
5342
|
${qr.md} {
|
|
5343
5343
|
flex-direction: row;
|
|
5344
5344
|
}
|
|
5345
|
-
`,
|
|
5345
|
+
`,wE=Q(bg__default.default)`
|
|
5346
5346
|
display: flex;
|
|
5347
5347
|
flex-direction: column;
|
|
5348
5348
|
gap: 0;
|
|
@@ -5352,18 +5352,18 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5352
5352
|
${qr.md} {
|
|
5353
5353
|
width: auto;
|
|
5354
5354
|
}
|
|
5355
|
-
`;var
|
|
5355
|
+
`;var kE=Q(KO__default.default)(({theme:t,$disabled:e})=>({[`&.${KO.linearProgressClasses.root}`]:{borderRadius:t.stigg.border.radius,backgroundColor:t.stigg.palette.outlinedBorder},[`& .${KO.linearProgressClasses.bar}`]:{backgroundColor:e?t.stigg.palette.primaryLight:t.stigg.palette.primary}})),DE=Q(s2__default.default)({[`&.${s2.buttonClasses.root}`]:{textTransform:"none",lineHeight:"inherit",justifyContent:"flex-start",padding:"8px 4px"}}),AE=Q(qn)(({theme:t,$disabled:e,$shouldFill:n})=>({circle:{stroke:e?t.stigg.palette.primaryLight:t.stigg.palette.primary,fill:n?e?t.stigg.palette.primaryLight:t.stigg.palette.primary:void 0}}));var RE=()=>{let{progressBarState:t,setActiveStep:e,currentStep:n}=ha(),{widgetState:r}=ze(),i=Ci("md"),o=Bv.useRef(),{readOnly:s,isLoadingCheckoutData:c}=r,{activeStep:p,completedSteps:h,steps:v}=t||{},P=(p+1)*100/v.length,[x,T]=Bv__default.default.useState(n);return Bv.useEffect(()=>{i||o.current&&n!==x&&o.current.scrollIntoView({behavior:"smooth"}),T(n);},[n,i,x,T]),t.steps.length===1?null:jsxRuntime.jsxs(bg__default.default,{className:"stigg-checkout-progress-container",sx:{width:"100%",mb:3},ref:o,children:[jsxRuntime.jsx(kE,{variant:"determinate",value:P,$disabled:s}),jsxRuntime.jsx(da__default.default,{container:true,display:"flex",children:v.map(({key:I,label:R},A)=>{let O=h.includes(A),N=s||A>p&&!O&&!h.includes(A-1)||p!==A&&t.isDisabled;return jsxRuntime.jsx(da__default.default,{item:true,display:"flex",flexDirection:"row",flex:i?1:"auto",justifyContent:"flex-start",children:c?jsxRuntime.jsx(Un,{width:120,height:20,style:{marginTop:8}}):jsxRuntime.jsx(DE,{onClick:()=>e(A),fullWidth:true,disabled:N,children:jsxRuntime.jsxs(da__default.default,{item:true,display:"flex",flexDirection:"row",alignItems:"center",gap:1,children:[jsxRuntime.jsx(h3__default.default,{icon:jsxRuntime.jsx(AE,{icon:O?N?"OutlinedCheckedCircleDisabled":"OutlinedCheckedCircle":"OutlinedCircle",$disabled:N,$shouldFill:O})}),jsxRuntime.jsx(rt,{variant:"h6",color:N?"primary.main.light":"primary.main",children:R})]})})},I)})})]})};var y3=[nn.FlatFee,nn.PerUnit,nn.UsageBased],b3=t=>px__default.default(t,[e=>y3.indexOf(e.pricingModel),e=>{var n;return (n=e.feature)==null?void 0:n.displayName}]),eg=t=>Bv.useMemo(()=>b3(t),[t]);function v3(){let[{promotionCode:t}]=Ye();return t}function C3(){let[,t]=Ye();return e=>t(n=>{n.promotionCode=e;})}function ng(){return {promotionCode:v3(),setPromotionCode:C3()}}var S3=t=>jsxRuntime.jsx("svg",St(W({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"plus",children:[jsxRuntime.jsx("path",{id:"Shape",d:"M10 4.16666V15.8333",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{id:"Shape_2",d:"M4.16699 10H15.8337",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})})),FE=S3;var x3=Q(FE)`
|
|
5356
5356
|
margin-right: 8px;
|
|
5357
5357
|
path {
|
|
5358
5358
|
stroke: ${({theme:t,$disabled:e})=>e?t.stigg.palette.text.disabled:t.stigg.palette.primary};
|
|
5359
5359
|
}
|
|
5360
|
-
`,
|
|
5360
|
+
`,NE=({onAddClick:t,checkoutLocalization:e,disabled:n})=>jsxRuntime.jsxs($i,{disabled:n,fullWidth:true,className:"stigg-checkout-summary-add-coupon-code-button",sx:{textTransform:"none",justifyContent:"flex-start",color:n?"text.disabled":"primary.main"},variant:"text",size:"medium",onClick:t,children:[jsxRuntime.jsx(x3,{$disabled:n,className:"stigg-checkout-summary-add-coupon-code-button-icon"}),jsxRuntime.jsx(rt,{className:"stigg-checkout-change-plan-button-text",color:n?"disabled":"primary.main",style:{lineHeight:"24px"},variant:"h3",children:e.summary.addCouponCodeText})]});var I3=Q($i)`
|
|
5361
5361
|
padding: 4px 10px;
|
|
5362
5362
|
min-width: unset;
|
|
5363
5363
|
border-radius: ${({theme:t})=>t.stigg.border.radius};
|
|
5364
5364
|
display: flex;
|
|
5365
5365
|
align-items: center;
|
|
5366
|
-
`,
|
|
5366
|
+
`,LE=({disabled:t,checkoutLocalization:e,onMockCheckoutPreview:n})=>{let{setPromotionCode:r}=ng(),[i,o]=Bv.useState(false),[s,c]=Bv__default.default.useState(""),[p,h]=Bv__default.default.useState(false),[v,P]=Bv__default.default.useState(""),{previewSubscriptionAction:x}=Rv({onMockCheckoutPreview:n}),T=()=>ce(null,null,function*(){var A;h(true),P("");let{subscriptionPreview:I,errorMessage:R}=yield x({promotionCode:s});!R&&((A=I==null?void 0:I.immediateInvoice)!=null&&A.discountDetails)?(r(s.toUpperCase()),o(false)):R&&P(R),h(false);});return i?jsxRuntime.jsxs(da__default.default,{children:[jsxRuntime.jsx(rt,{variant:"body1",color:v?"error":t?"disabled":"primary.main",children:e.summary.couponCodeTitle}),jsxRuntime.jsx(Zs,{disabled:t,autoFocus:true,variant:"outlined",fullWidth:true,error:!!v,value:s,onChange:I=>{c(I.target.value);},inputProps:{maxLength:20},onKeyDown:I=>{I.key==="Enter"&&(T(),I.preventDefault());},InputProps:{endAdornment:jsxRuntime.jsx(I3,{variant:"contained",disabled:t,onClick:()=>{T();},children:p?jsxRuntime.jsx(T3__default.default,{size:18,sx:{color:"white"}}):jsxRuntime.jsx(qn,{style:{display:"flex"},icon:"ArrowForward"})})}}),!!v&&jsxRuntime.jsx(rt,{variant:"body1",color:"error",children:v})]}):jsxRuntime.jsx(NE,{disabled:t,onAddClick:()=>o(true),checkoutLocalization:e})};var D3=Q(da__default.default)`
|
|
5367
5367
|
width: auto;
|
|
5368
5368
|
display: inline-flex;
|
|
5369
5369
|
align-items: center;
|
|
@@ -5372,7 +5372,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5372
5372
|
padding: 6px 8px;
|
|
5373
5373
|
border-radius: ${({theme:t})=>t.stigg.border.radius};
|
|
5374
5374
|
border: 1px solid ${({theme:t})=>t.stigg.palette.primary};
|
|
5375
|
-
`,
|
|
5375
|
+
`,BE=Q(qn)`
|
|
5376
5376
|
display: flex;
|
|
5377
5377
|
|
|
5378
5378
|
g {
|
|
@@ -5382,9 +5382,9 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5382
5382
|
path {
|
|
5383
5383
|
fill: ${({theme:t,$shouldFill:e})=>e?t.stigg.palette.primary:void 0};
|
|
5384
5384
|
}
|
|
5385
|
-
|
|
5385
|
+
`,$E=({promotionCode:t,onClearPromotionCode:e})=>jsxRuntime.jsxs(D3,{container:true,children:[jsxRuntime.jsxs(da__default.default,{item:true,display:"flex",gap:1,alignItems:"center",children:[jsxRuntime.jsx(BE,{icon:"Coupon"}),jsxRuntime.jsx(rt,{variant:"body1",color:"primary.main",lineHeight:"auto",children:t})]}),jsxRuntime.jsx(da__default.default,{item:true,children:jsxRuntime.jsx($i,{variant:"text",sx:{minWidth:"unset",padding:0},onClick:e,children:jsxRuntime.jsx(BE,{icon:"Close",$shouldFill:true})})})]});var A3=Q.div`
|
|
5386
5386
|
margin: 16px 0;
|
|
5387
|
-
`,$E=({disabled:t,checkoutLocalization:e,onMockCheckoutPreview:n})=>{let{promotionCode:r,setPromotionCode:i}=ng();return jsxRuntime.jsx(D3,{children:r?jsxRuntime.jsx(UE,{promotionCode:r,onClearPromotionCode:()=>{i("");}}):jsxRuntime.jsx(NE,{disabled:t,checkoutLocalization:e,onMockCheckoutPreview:n})})};function GE({onBillingAddressChange:t,collectPhoneNumber:e}){var x;let{checkoutState:n,checkoutLocalization:r,widgetState:i,setWidgetReadOnly:o}=ze(),{setBillingAddress:s}=Pi(),{customer:c,configuration:p}=n||{},{readOnly:h}=i,v=!!(e!=null?e:(x=p==null?void 0:p.content)!=null&&x.collectPhoneNumber),P=T=>{if(!T.complete)return;let O=T.value.address,{postal_code:I}=O,R=On(O,["postal_code"]),A=W({postalCode:I},R);o(true),s(A),t?ce(null,null,function*(){yield t({billingAddress:A}),o(false);}):o(false);};return jsxRuntime.jsxs(da__default.default,{flexDirection:"column",container:true,gap:3,padding:"16px",sx:{pointerEvents:h?"none":void 0},children:[jsxRuntime.jsxs(da__default.default,{flexDirection:"column",container:true,gap:2,children:[jsxRuntime.jsx(rt,{variant:"h6",children:r.newPaymentMethodBillingAddressTitle}),jsxRuntime.jsx(reactStripeJs.AddressElement,{onChange:P,options:{mode:"billing",fields:{phone:v?"always":"auto"},defaultValues:W({},(c==null?void 0:c.name)&&{name:c.name})}})]}),jsxRuntime.jsxs(da__default.default,{flexDirection:"column",container:true,gap:2,children:[jsxRuntime.jsx(rt,{variant:"h6",children:r.newPaymentMethodCardTitle}),jsxRuntime.jsx(reactStripeJs.PaymentElement,{onChange:()=>{},onReady:()=>{},options:{readOnly:h,terms:{card:"never"},defaultValues:{billingDetails:W(W({},(c==null?void 0:c.name)&&{name:c.name}),(c==null?void 0:c.email)&&{email:c.email})}}})]})]})}function jE(){let[t,e]=Bv.useState(null),{checkoutState:n}=ze(),{billingIntegration:r,setupSecret:i}=n||{};return Bv.useEffect(()=>{if(r){let{billingIdentifier:o,credentials:s}=r;if(o!==kp.Stripe)return;let{accountId:c,publicKey:p}=s;if(!c||!p){console.error("Stripe account ID or public key is missing");return}import('@stripe/stripe-js').then(({loadStripe:h})=>{e(h(p,{stripeAccount:c}));});}},[r]),{stripePromise:t,setupIntentClientSecret:i}}function ig(t){var r;let e=ve({optional:true}),n=e==null?void 0:e.stigg;return n?n.getBooleanEntitlement(t):W(W({},J1),(r=t.options)==null?void 0:r.fallback)}function og(t){var r;let e=ve({optional:true}),n=e==null?void 0:e.stigg;return n?n.getNumericEntitlement(t):W(W({},nC),(r=t.options)==null?void 0:r.fallback)}function ag(t){var r;let e=ve({optional:true}),n=e==null?void 0:e.stigg;return n?n.getMeteredEntitlement(t):W(W({},eC),(r=t.options)==null?void 0:r.fallback)}function sg(t){var r;let e=ve({optional:true}),n=e==null?void 0:e.stigg;return n?n.getEnumEntitlement(t):W(W({},tC),(r=t.options)==null?void 0:r.fallback)}function co({func:t}){let[e,n]=Bv.useState(true),[r,i]=Bv.useState(null),[o,s]=Bv.useState(null);return Bv.useEffect(()=>{ce(null,null,function*(){n(true);try{let p=yield t();s(p),i(null);}catch(p){i(p);}finally{n(false);}});},[t]),{isLoading:e,error:r,data:o}}function VE(t){let e=ve({optional:true}),n=e==null?void 0:e.stigg,r=Bv.useCallback(()=>n?n.getActiveSubscriptions(t):Promise.resolve([]),[t,n]),{data:i,error:o,isLoading:s}=co({func:r});return Bv.useMemo(()=>({activeSubscriptions:i,isLoading:s,error:o}),[i,o,s])}function zE(t){let e=ve({optional:true}),n=e==null?void 0:e.stigg,r=Bv.useCallback(()=>n?n.getPaywall(t):Promise.resolve(null),[t,n]),{data:i,error:o,isLoading:s}=co({func:r});return Bv.useMemo(()=>({paywall:i,isLoading:s,error:o}),[i,o,s])}function HE(t){let e=ve({optional:true}),n=e==null?void 0:e.stigg,r=Bv.useCallback(()=>n?n.getCustomerPortal(t):Promise.resolve(null),[t,n]),{data:i,error:o,isLoading:s}=co({func:r});return Bv.useMemo(()=>({customerPortal:i,isLoading:s,error:o}),[i,o,s])}function lg(){let t=Yu(),[{resourceId:e}]=Ye(),{checkoutState:n}=ze(),{plan:r}=n||{},i=t.addons.map(({addon:o,quantity:s})=>({addonId:o.id,quantity:s}));if(r!=null&&r.id)return {resourceId:e,planId:r.id,billingPeriod:t.billingPeriod,billableFeatures:t.billableFeatures,addons:i,promotionCode:t.promotionCode,billingCountryCode:t.billingCountryCode}}var j3=[em.Failed,em.Processing];function V3(e){return ce(this,arguments,function*({elements:t}){if(!t){let r="Stripe elements not initialized";return console.error(r),{success:false,errorMessage:r}}let{error:n}=yield t.submit();return n?(console.log(n.message),{success:false,errorMessage:n.message||""}):{success:true}})}function zv(n){return ce(this,arguments,function*({applySubscriptionResults:t,stripe:e}){var s,c;let r=t==null?void 0:t.subscription,i=(s=r==null?void 0:r.latestInvoice)==null?void 0:s.paymentSecret,o=r==null?void 0:r.paymentCollection;if(e&&i&&o===em.ActionRequired){let{error:p}=yield e.handleNextAction({clientSecret:i});if(p)return {errorMessage:p.message||""}}else if(o&&j3.includes(o))return {errorMessage:((c=r==null?void 0:r.latestInvoice)==null?void 0:c.errorMessage)||"An error occurred - try again later"};return {subscription:r}})}function z3(r){return ce(this,arguments,function*({stripe:t,elements:e,clientSecret:n}){let i,o,{error:s}=yield t.confirmSetup({elements:e,confirmParams:{return_url:window.location.href},redirect:"if_required"});if(s)s.type==="card_error"||s.type==="validation_error"?s.type==="card_error"&&(o=s.message||""):o="An unexpected error occurred.";else try{let{setupIntent:c}=yield t.retrieveSetupIntent(n);c!=null&&c.payment_method&&(i=c.payment_method);}catch(c){o="An unexpected error occurred.",console.error(c);}return {newPaymentMethodId:i,setupErrorMessage:o}})}function WE(r){return ce(this,arguments,function*({stripe:t,elements:e,setupIntentClientSecret:n}){if(!t||!e||!n)return {success:false};let i=yield V3({elements:e});if(!i.success)return {success:false,errorMessage:i.errorMessage};let{newPaymentMethodId:o,setupErrorMessage:s}=yield z3({stripe:t,elements:e,clientSecret:n});return s||!o?{success:false,errorMessage:s}:{success:true,paymentMethodId:o}})}var qE={v:"5.12.1",fr:30,ip:0,op:201,w:700,h:700,nm:"Check",ddd:0,assets:[],layers:[{ddd:0,ind:1,ty:4,nm:"Shape Layer 8",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:315,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:2,ty:4,nm:"Shape Layer 7",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:270,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:3,ty:4,nm:"Shape Layer 6",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:225,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:4,ty:4,nm:"Shape Layer 5",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:180,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:5,ty:4,nm:"Shape Layer 4",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:135,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:6,ty:4,nm:"Shape Layer 3",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:90,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:7,ty:4,nm:"Shape Layer 2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:45,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:8,ty:4,nm:"Shape Layer 1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:9,ty:4,nm:"Check v",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:-1.9,ix:10},p:{a:0,k:[352,360,0],ix:2,l:2},a:{a:0,k:[-120.265,116.765,0],ix:1,l:2},s:{a:0,k:[278,278,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0]],v:[[-161,123],[-137,148],[-79.531,85.531]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:5.5,ix:5},lc:2,lj:2,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.333],y:[0]},t:135,s:[0]},{t:148,s:[100]}],ix:1},e:{a:0,k:0,ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:135,op:201,st:-35,ct:1,bm:0},{ddd:0,ind:11,ty:4,nm:"Circle Stroke",sr:1,ks:{o:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:7,s:[100]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[4,-6,0],ix:1,l:2},s:{a:0,k:[132,132,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[306,306],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:false},{ty:"st",c:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:30,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:61,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:87,s:[1,1,1,1]},{t:136,s:[1,1,1,1]}],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:8,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[4,-6],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[50]},{t:122,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[45]},{t:122,s:[0]}],ix:2},o:{a:1,k:[{i:{x:[.474],y:[1]},o:{x:[.43],y:[0]},t:0,s:[-170.4]},{t:111,s:[-1250.4]}],ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:0,op:201,st:0,ct:1,bm:0},{ddd:0,ind:13,ty:1,nm:"Dark Gray Solid 1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[350,350,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,sw:700,sh:700,sc:"#2d2d2d",ip:0,op:201,st:0,bm:0}],markers:[],props:{}};var cg=5e3,K3=Q(bg__default.default)`
|
|
5387
|
+
`,GE=({disabled:t,checkoutLocalization:e,onMockCheckoutPreview:n})=>{let{promotionCode:r,setPromotionCode:i}=ng();return jsxRuntime.jsx(A3,{children:r?jsxRuntime.jsx($E,{promotionCode:r,onClearPromotionCode:()=>{i("");}}):jsxRuntime.jsx(LE,{disabled:t,checkoutLocalization:e,onMockCheckoutPreview:n})})};function jE({onBillingAddressChange:t,collectPhoneNumber:e}){var x;let{checkoutState:n,checkoutLocalization:r,widgetState:i,setWidgetReadOnly:o}=ze(),{setBillingAddress:s}=Pi(),{customer:c,configuration:p}=n||{},{readOnly:h}=i,v=!!(e!=null?e:(x=p==null?void 0:p.content)!=null&&x.collectPhoneNumber),P=T=>{if(!T.complete)return;let O=T.value.address,{postal_code:I}=O,R=On(O,["postal_code"]),A=W({postalCode:I},R);o(true),s(A),t?ce(null,null,function*(){yield t({billingAddress:A}),o(false);}):o(false);};return jsxRuntime.jsxs(da__default.default,{flexDirection:"column",container:true,gap:3,padding:"16px",sx:{pointerEvents:h?"none":void 0},children:[jsxRuntime.jsxs(da__default.default,{flexDirection:"column",container:true,gap:2,children:[jsxRuntime.jsx(rt,{variant:"h6",children:r.newPaymentMethodBillingAddressTitle}),jsxRuntime.jsx(reactStripeJs.AddressElement,{onChange:P,options:{mode:"billing",fields:{phone:v?"always":"auto"},defaultValues:W({},(c==null?void 0:c.name)&&{name:c.name})}})]}),jsxRuntime.jsxs(da__default.default,{flexDirection:"column",container:true,gap:2,children:[jsxRuntime.jsx(rt,{variant:"h6",children:r.newPaymentMethodCardTitle}),jsxRuntime.jsx(reactStripeJs.PaymentElement,{onChange:()=>{},onReady:()=>{},options:{readOnly:h,terms:{card:"never"},defaultValues:{billingDetails:W(W({},(c==null?void 0:c.name)&&{name:c.name}),(c==null?void 0:c.email)&&{email:c.email})}}})]})]})}function VE(){let[t,e]=Bv.useState(null),{checkoutState:n}=ze(),{billingIntegration:r,setupSecret:i}=n||{};return Bv.useEffect(()=>{if(r){let{billingIdentifier:o,credentials:s}=r;if(o!==kp.Stripe)return;let{accountId:c,publicKey:p}=s;if(!c||!p){console.error("Stripe account ID or public key is missing");return}import('@stripe/stripe-js').then(({loadStripe:h})=>{e(h(p,{stripeAccount:c}));});}},[r]),{stripePromise:t,setupIntentClientSecret:i}}function ig(t){var r;let e=ve({optional:true}),n=e==null?void 0:e.stigg;return n?n.getBooleanEntitlement(t):W(W({},J1),(r=t.options)==null?void 0:r.fallback)}function og(t){var r;let e=ve({optional:true}),n=e==null?void 0:e.stigg;return n?n.getNumericEntitlement(t):W(W({},nC),(r=t.options)==null?void 0:r.fallback)}function ag(t){var r;let e=ve({optional:true}),n=e==null?void 0:e.stigg;return n?n.getMeteredEntitlement(t):W(W({},eC),(r=t.options)==null?void 0:r.fallback)}function sg(t){var r;let e=ve({optional:true}),n=e==null?void 0:e.stigg;return n?n.getEnumEntitlement(t):W(W({},tC),(r=t.options)==null?void 0:r.fallback)}function co({func:t}){let[e,n]=Bv.useState(true),[r,i]=Bv.useState(null),[o,s]=Bv.useState(null);return Bv.useEffect(()=>{ce(null,null,function*(){n(true);try{let p=yield t();s(p),i(null);}catch(p){i(p);}finally{n(false);}});},[t]),{isLoading:e,error:r,data:o}}function zE(t){let e=ve({optional:true}),n=e==null?void 0:e.stigg,r=Bv.useCallback(()=>n?n.getActiveSubscriptions(t):Promise.resolve([]),[t,n]),{data:i,error:o,isLoading:s}=co({func:r});return Bv.useMemo(()=>({activeSubscriptions:i,isLoading:s,error:o}),[i,o,s])}function HE(t){let e=ve({optional:true}),n=e==null?void 0:e.stigg,r=Bv.useCallback(()=>n?n.getPaywall(t):Promise.resolve(null),[t,n]),{data:i,error:o,isLoading:s}=co({func:r});return Bv.useMemo(()=>({paywall:i,isLoading:s,error:o}),[i,o,s])}function WE(t){let e=ve({optional:true}),n=e==null?void 0:e.stigg,r=Bv.useCallback(()=>n?n.getCustomerPortal(t):Promise.resolve(null),[t,n]),{data:i,error:o,isLoading:s}=co({func:r});return Bv.useMemo(()=>({customerPortal:i,isLoading:s,error:o}),[i,o,s])}function lg(){let t=Yu(),[{resourceId:e}]=Ye(),{checkoutState:n}=ze(),{plan:r}=n||{},i=t.addons.map(({addon:o,quantity:s})=>({addonId:o.id,quantity:s}));if(r!=null&&r.id)return {resourceId:e,planId:r.id,billingPeriod:t.billingPeriod,billableFeatures:t.billableFeatures,addons:i,promotionCode:t.promotionCode,billingCountryCode:t.billingCountryCode}}var V3=[em.Failed,em.Processing];function z3(e){return ce(this,arguments,function*({elements:t}){if(!t){let r="Stripe elements not initialized";return console.error(r),{success:false,errorMessage:r}}let{error:n}=yield t.submit();return n?(console.log(n.message),{success:false,errorMessage:n.message||""}):{success:true}})}function zv(n){return ce(this,arguments,function*({applySubscriptionResults:t,stripe:e}){var s,c;let r=t==null?void 0:t.subscription,i=(s=r==null?void 0:r.latestInvoice)==null?void 0:s.paymentSecret,o=r==null?void 0:r.paymentCollection;if(e&&i&&o===em.ActionRequired){let{error:p}=yield e.handleNextAction({clientSecret:i});if(p)return {errorMessage:p.message||""}}else if(o&&V3.includes(o))return {errorMessage:((c=r==null?void 0:r.latestInvoice)==null?void 0:c.errorMessage)||"An error occurred - try again later"};return {subscription:r}})}function H3(r){return ce(this,arguments,function*({stripe:t,elements:e,clientSecret:n}){let i,o,{error:s}=yield t.confirmSetup({elements:e,confirmParams:{return_url:window.location.href},redirect:"if_required"});if(s)s.type==="card_error"||s.type==="validation_error"?s.type==="card_error"&&(o=s.message||""):o="An unexpected error occurred.";else try{let{setupIntent:c}=yield t.retrieveSetupIntent(n);c!=null&&c.payment_method&&(i=c.payment_method);}catch(c){o="An unexpected error occurred.",console.error(c);}return {newPaymentMethodId:i,setupErrorMessage:o}})}function qE(r){return ce(this,arguments,function*({stripe:t,elements:e,setupIntentClientSecret:n}){if(!t||!e||!n)return {success:false};let i=yield z3({elements:e});if(!i.success)return {success:false,errorMessage:i.errorMessage};let{newPaymentMethodId:o,setupErrorMessage:s}=yield H3({stripe:t,elements:e,clientSecret:n});return s||!o?{success:false,errorMessage:s}:{success:true,paymentMethodId:o}})}var YE={v:"5.12.1",fr:30,ip:0,op:201,w:700,h:700,nm:"Check",ddd:0,assets:[],layers:[{ddd:0,ind:1,ty:4,nm:"Shape Layer 8",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:315,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:2,ty:4,nm:"Shape Layer 7",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:270,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:3,ty:4,nm:"Shape Layer 6",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:225,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:4,ty:4,nm:"Shape Layer 5",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:180,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:5,ty:4,nm:"Shape Layer 4",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:135,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:6,ty:4,nm:"Shape Layer 3",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:90,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:7,ty:4,nm:"Shape Layer 2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:45,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:8,ty:4,nm:"Shape Layer 1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[-304,91,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-304,-241],[-304,-161]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:9,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:130,s:[100]},{t:139.6005859375,s:[0]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:130,op:204,st:-2,ct:1,bm:0},{ddd:0,ind:9,ty:4,nm:"Check v",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:-1.9,ix:10},p:{a:0,k:[352,360,0],ix:2,l:2},a:{a:0,k:[-120.265,116.765,0],ix:1,l:2},s:{a:0,k:[278,278,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0]],v:[[-161,123],[-137,148],[-79.531,85.531]],c:false},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:5.5,ix:5},lc:2,lj:2,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.333],y:[0]},t:135,s:[0]},{t:148,s:[100]}],ix:1},e:{a:0,k:0,ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:135,op:201,st:-35,ct:1,bm:0},{ddd:0,ind:11,ty:4,nm:"Circle Stroke",sr:1,ks:{o:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:7,s:[100]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[4,-6,0],ix:1,l:2},s:{a:0,k:[132,132,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[306,306],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:false},{ty:"st",c:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:30,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:61,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:87,s:[1,1,1,1]},{t:136,s:[1,1,1,1]}],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:8,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:false},{ty:"tr",p:{a:0,k:[4,-6],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false},{ty:"tm",s:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[50]},{t:122,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[45]},{t:122,s:[0]}],ix:2},o:{a:1,k:[{i:{x:[.474],y:[1]},o:{x:[.43],y:[0]},t:0,s:[-170.4]},{t:111,s:[-1250.4]}],ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:false}],ip:0,op:201,st:0,ct:1,bm:0},{ddd:0,ind:13,ty:1,nm:"Dark Gray Solid 1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[350,350,0],ix:2,l:2},a:{a:0,k:[350,350,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,sw:700,sh:700,sc:"#2d2d2d",ip:0,op:201,st:0,bm:0}],markers:[],props:{}};var cg=5e3,X3=Q(bg__default.default)`
|
|
5388
5388
|
@keyframes blurFade {
|
|
5389
5389
|
0% {
|
|
5390
5390
|
background-color: ${({theme:t})=>sc__default.default(t.stigg.palette.backgroundPaper).alpha(0).toString()};
|
|
@@ -5415,7 +5415,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5415
5415
|
& path {
|
|
5416
5416
|
stroke: ${({theme:t})=>t.stigg.palette.primary};
|
|
5417
5417
|
}
|
|
5418
|
-
`,
|
|
5418
|
+
`,Z3=Q(rt)`
|
|
5419
5419
|
@keyframes fadeIn {
|
|
5420
5420
|
0% {
|
|
5421
5421
|
opacity: 0;
|
|
@@ -5430,7 +5430,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5430
5430
|
|
|
5431
5431
|
align-self: center;
|
|
5432
5432
|
animation: fadeIn 5s ease-in forwards;
|
|
5433
|
-
`;function
|
|
5433
|
+
`;function KE({checkoutLocalization:t}){let e=Bv.useRef();return Bv.useEffect(()=>{e.current&&e.current.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});},[]),jsxRuntime.jsxs(X3,{className:"stigg-checkout-success-container",ref:e,children:[jsxRuntime.jsx(K3__default.default,{options:{animationData:YE,loop:false,autoplay:true},width:350,height:"auto",style:{display:"flex",justifyContent:"center"}}),jsxRuntime.jsx(Z3,{variant:"h1",color:"primary.main",children:t.summary.checkoutSuccessText})]})}var nL=t=>new Promise(e=>setTimeout(e,t));function XE({isMocked:t=false,onCheckout:e,onCheckoutCompleted:n,onSuccess:r,disableSuccessAnimation:i}){let{stigg:o}=ve(),{useNewPaymentMethod:s}=Pi(),c=lg(),{checkoutState:p,widgetState:h,setWidgetReadOnly:v}=ze(),{setupSecret:P,customer:x}=p||{},T=reactStripeJs.useStripe(),I=reactStripeJs.useElements();return {handleSubmit:A=>ce(null,null,function*(){if(A.preventDefault(),!c)return {success:false,errorMessage:"Unexpected error, please contact support."};let O=true,N,V=false,G;if(v(true),!t&&s){let U=yield qE({elements:I,stripe:T,setupIntentClientSecret:P});U.success?G=U.paymentMethodId:(N=U.errorMessage,O=false);}let X=St(W({},c),{paymentMethodId:G}),nt=U=>ce(null,null,function*(){V=true;try{let j=yield o.applySubscription(U),ut=yield zv({applySubscriptionResults:j,stripe:T});return {success:!ut.errorMessage,errorMessage:ut.errorMessage,results:j}}catch(j){return console.error(j),N=j==null?void 0:j.message,{success:false,errorMessage:N}}}),st;if(O)if(e){let U=yield e({customerId:x.id,checkoutParams:X,checkoutAction:nt});if(U.errorMessage&&(N=U.errorMessage),!V&&U.results&&U.success){let j=yield zv({applySubscriptionResults:U.results,stripe:T});j.errorMessage&&(N=j.errorMessage,O=false);}O=O&&U.success&&!N,st=U.results;}else {let U=yield nt(X);!U.success&&U.errorMessage&&(N=U.errorMessage),O=U.success&&!N,st=U.results;}return v(false),O&&r&&(r(),i||(yield nL(cg))),yield n({success:O,error:N}),{results:st,success:!N,errorMessage:N}}),isLoading:!!(h!=null&&h.readOnly)}}function ZE(){return !!window.Zuora}function JE(){let t=document.createElement("script");t.type="text/javascript",t.src="https://js.zuora.com/payment/v3/zuora.js",t.async=true,t.onerror=()=>{throw new Error("Failed to load Zuora library")},document.head.appendChild(t);}function t_(t,e,n,r){return {locale:r||"en",region:(r==null?void 0:r.toUpperCase())||"US",currency:n,amount:"1",createPaymentSession:t,onComplete:e}}function Qu(){let{stigg:t}=ve(),{setErrorMessage:e}=Pi(),{billingCountryCode:n}=lo(),[r,i]=Bv.useState(false),{checkoutState:o}=ze(),{billingIntegration:s}=o||{},c=Bv.useCallback(()=>ce(null,null,function*(){if(!(o!=null&&o.customer.id)||!(o!=null&&o.plan.id))throw new Error("Customer and plan are required");let{token:v}=yield t.createPaymentSession({planId:o.plan.id,billingCountryCode:n});return v}),[o,t,n]),p=Bv.useCallback(()=>{try{ZE()||JE(),i(!0);}catch(v){e("Failed to initialize Zuora");}},[i,e]);return Bv.useEffect(()=>{if(s){let{billingIdentifier:v}=s;v===kp.Zuora&&p();}},[s,p]),{isZuoraIntegration:(s==null?void 0:s.billingIdentifier)===kp.Zuora,isInitialized:r,createPaymentSession:c}}var aL=t=>new Promise(e=>setTimeout(e,t));function ug({onCheckout:t,onCheckoutCompleted:e,onSuccess:n,disableSuccessAnimation:r}){let{stigg:i}=ve(),o=lg(),{checkoutState:s,setWidgetReadOnly:c,setCheckoutSuccess:p}=ze(),{setErrorMessage:h}=Pi();return {handleZuoraSubmit:Bv.useCallback(P=>ce(null,null,function*(){c(true);let x=true,T,I=o;if(!I)x=false,T="Unexpected error, please contact support.";else {let R=St(W({},I),{paymentMethodId:P}),A=O=>ce(null,null,function*(){try{return {success:!0,results:yield i.applySubscription(O)}}catch(N){return console.error(N),{success:false,errorMessage:(N==null?void 0:N.message)||"Failed to apply subscription"}}});try{if(t){let O=yield t({customerId:s.customer.id,checkoutParams:R,checkoutAction:A});O.errorMessage&&(T=O.errorMessage),x=x&&O.success&&!T;}else {let O=yield A(R);!O.success&&O.errorMessage&&(T=O.errorMessage),x=O.success&&!T;}}catch(O){x=false,T=O.message||"Failed to process checkout";}}return x?(p(true),n&&(n(),r||(yield aL(cg)))):h(T),c(false),yield e({success:x,error:T}),{success:x,errorMessage:T}}),[i,o,s,t,e,n,r,c,p,h])}}var No=({isLoading:t,width:e=50,height:n=16,children:r})=>t?jsxRuntime.jsx(Un,{width:e,height:n}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:r});var cL=({subscriptionPreview:t,isFetchingSubscriptionPreview:e,checkoutLocalization:n})=>{var s,c,p,h;let{immediateInvoice:r}=t||{};if(!((c=(s=r==null?void 0:r.proration)==null?void 0:s.netAmount)!=null&&c.amount)||((h=(p=r==null?void 0:r.proration)==null?void 0:p.netAmount)==null?void 0:h.amount)>=0)return null;let i=r.proration.netAmount.amount*-1,o=wn({amount:i,currency:r.proration.netAmount.currency,minimumFractionDigits:2});return jsxRuntime.jsx(rt,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-remaining-credits",children:jsxRuntime.jsx(No,{isLoading:e,width:"100%",children:n.summary.creditsForUnusedTimeText({credits:o})})})},uL=({subscriptionPreview:t,activeSubscription:e,isFetchingSubscriptionPreview:n,checkoutLocalization:r})=>{if(!(t!=null&&t.hasScheduledUpdates)||!(e!=null&&e.currentBillingPeriodEnd))return null;let{currentBillingPeriodEnd:i}=e,o=typeof r.summary.changesWillApplyAtEndOfBillingPeriod=="function"?r.summary.changesWillApplyAtEndOfBillingPeriod({billingPeriodEnd:i}):r.summary.changesWillApplyAtEndOfBillingPeriod;return jsxRuntime.jsx(rt,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-scheduled-updates",children:jsxRuntime.jsx(No,{isLoading:n,width:"100%",children:o})})},dL=({subscriptionPreview:t,activeSubscription:e,plan:n,isFetchingSubscriptionPreview:r,billingPeriod:i})=>{let{recurringInvoice:o}=t||{};if(!t||!(o!=null&&o.total.amount))return null;let s=t.hasScheduledUpdates?e==null?void 0:e.currentBillingPeriodEnd:t==null?void 0:t.billingPeriodRange.end,c=wn(St(W({},o.total),{minimumFractionDigits:2})),p=n==null?void 0:n.pricePoints.some(I=>I.pricingModel===nn.UsageBased),h=n==null?void 0:n.pricePoints.some(I=>I.pricingModel!==nn.UsageBased),v="We will bill you ",P=`${c} `;p&&(h?P+="+":P="for",P+=" applicable usage-based charges for this subscription ");let x,T;switch(i){case be.Monthly:T="month",x=`the ${$1__default.default(s).format("Do")}`;break;case be.Annually:T="year",x=$1__default.default(s).format("MMMM Do");break;}return v+=`${P}for this subscription every ${T} on ${x}, unless you cancel.`,jsxRuntime.jsx(rt,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-next-billing",children:jsxRuntime.jsx(No,{isLoading:r,width:"100%",children:v})})};function i_(t){return jsxRuntime.jsxs(material.Box,{className:"stigg-checkout-summary-captions",children:[jsxRuntime.jsx(cL,W({},t)),jsxRuntime.jsx(uL,W({},t)),jsxRuntime.jsx(dL,W({},t))]})}function Wv({quantity:t,totalAmount:e,pricingModel:n,billingPeriod:r,currency:i,blockSize:o,priceAmount:s,availableBillingPeriods:c}){let p=c==null?void 0:c.has(be.Monthly),h=n===nn.PerUnit,v=o||1,P=r===be.Annually&&p,x=t&&(h||t>1)?`${gr(t)} ${v>1?"for":"x"} `:"",T=P?" x 12 months":"",I=(s||e/t)/(P?12:1),R=wn({amount:I,currency:i,minimumFractionDigits:2}),A=wn({amount:e,currency:i,minimumFractionDigits:2});return `${x}${R}${T} ${T||x?` = ${A}`:""}`}function o_(t){let{totalAmount:e,quantity:n,tiersMode:r,tiers:i,currency:o}=t;if(JC(i)||r===ic.Graduated&&!tS(i,n)){let s=wn({amount:e,currency:o,minimumFractionDigits:2});return `${gr(n)} for ${s}`}return Wv(t)}function hL(t,e){let{unitPrice:n,upTo:r}=t[e];if(!n)return "";if(e===0)return `First ${r}`;let o=(t[e-1].upTo||0)+1;return lm__default.default(r)?`${gr(o)} and above`:`Next ${gr(o)} to ${gr(r)}`}function a_({price:t,unitQuantity:e}){let n=t.tiers||[],{checkoutState:r}=ze(),i=r==null?void 0:r.plan,{breakdown:o}=Rb(n,e);return o.length===1?null:jsxRuntime.jsx(jsxRuntime.Fragment,{children:o.map(({unitQuantity:s,amount:c},p)=>jsxRuntime.jsx(ma,{children:jsxRuntime.jsxs(Lo,{style:{alignItems:"flex-start"},children:[jsxRuntime.jsx(rt,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"},children:hL(n,p)}),jsxRuntime.jsx(rt,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"},children:Wv({quantity:s,totalAmount:c,currency:t.currency,pricingModel:t.pricingModel,billingPeriod:t.billingPeriod,tiers:t.tiers,tiersMode:t.tiersMode,blockSize:t.blockSize,priceAmount:t.amount,availableBillingPeriods:new Set(i==null?void 0:i.pricePoints.map(h=>h.billingPeriod))})})]})},p))})}var s_=Q(reactFeather.ChevronRight)`
|
|
5434
5434
|
height: ${({$size:t=24})=>`${t}px`};
|
|
5435
5435
|
width: ${({$size:t=24})=>`${t}px`};
|
|
5436
5436
|
transition: all 0.2s ease-in;
|
|
@@ -5439,7 +5439,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5439
5439
|
& + & {
|
|
5440
5440
|
margin-top: 16px;
|
|
5441
5441
|
}
|
|
5442
|
-
`,
|
|
5442
|
+
`,EL=Q.div`
|
|
5443
5443
|
margin-top: 16px;
|
|
5444
5444
|
margin-left: 16px;
|
|
5445
5445
|
`,Lo=Q.div`
|
|
@@ -5452,28 +5452,28 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5452
5452
|
align-items: center;
|
|
5453
5453
|
justify-content: space-between;
|
|
5454
5454
|
}
|
|
5455
|
-
`,
|
|
5455
|
+
`,_L=({checkoutLocalization:t})=>{let e=jsxRuntime.jsx(rt,{variant:"body1",children:t.summary.payAsYouGoTooltipText});return jsxRuntime.jsx(ju,{placement:"left",title:e,children:jsxRuntime.jsx(qn,{icon:"PayAsYouGoCharge",style:{display:"flex"}})})},fg=({checkoutLocalization:t,label:e,quantity:n,price:r})=>{let{checkoutState:i}=ze(),o=i==null?void 0:i.plan,s=Ci("lg"),[c,p]=Bv.useState(false),h=()=>p(R=>!R),v=r.pricingModel===nn.UsageBased,P=r.isTieredPrice?Bu(r,n):(r.amount||0)*Math.ceil(n/(r.blockSize||1)),x;r.tiersMode===ic.Graduated&&!!r.tiers&&!iO__default.default(r.tiers)&&!lm__default.default(r.tiers[0].upTo)&&n>r.tiers[0].upTo&&(x=jsxRuntime.jsx(a_,{price:r,unitQuantity:n}));let I=jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:e});return x&&(I=jsxRuntime.jsx(WO__default.default,{onClick:h,underline:"none",style:{cursor:"pointer"},children:I})),jsxRuntime.jsxs(ma,{className:"stigg-checkout-summary-base-charges-container",children:[jsxRuntime.jsxs(Lo,{style:{alignItems:"flex-start"},children:[jsxRuntime.jsxs(da__default.default,{item:true,display:"flex",gap:.5,style:{whiteSpace:s?"nowrap":"break-spaces"},children:[I,x&&jsxRuntime.jsx(material.IconButton,{onClick:h,sx:{padding:0},children:jsxRuntime.jsx(s_,{$isOpen:c,$size:16})})]}),jsxRuntime.jsxs(da__default.default,{item:true,display:"flex",gap:1,alignItems:"center",children:[v&&jsxRuntime.jsx(_L,{checkoutLocalization:t}),jsxRuntime.jsxs(rt,{variant:"body1",color:"secondary",style:{whiteSpace:s?"nowrap":"break-spaces"},children:[o_({totalAmount:P,quantity:n,currency:r.currency,pricingModel:r.pricingModel,billingPeriod:r.billingPeriod,tiers:r.tiers,tiersMode:r.tiersMode,blockSize:r.blockSize,priceAmount:r.amount,availableBillingPeriods:new Set(o==null?void 0:o.pricePoints.map(R=>R.billingPeriod))}),v&&" / unit"]})]})]}),x&&jsxRuntime.jsx(xL__default.default,{in:c,children:jsxRuntime.jsx(EL,{children:x})})]})},l_=({label:t})=>jsxRuntime.jsx(ma,{children:jsxRuntime.jsxs(Lo,{style:{alignItems:"flex-end"},children:[jsxRuntime.jsx(da__default.default,{item:true,children:jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:t})}),jsxRuntime.jsx(da__default.default,{item:true,display:"flex",gap:1,alignItems:"center",children:jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",style:{wordBreak:"break-word"},children:"Free"})})]})}),c_=({subscriptionPreview:t,isFetchingSubscriptionPreview:e,checkoutLocalization:n})=>{let{immediateInvoice:r,recurringInvoice:i}=t,{discount:o,discountDetails:s}=i||{};return !o||!s?null:jsxRuntime.jsx(ma,{children:jsxRuntime.jsxs(Lo,{children:[jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:n.summary.discountText({discountDetails:s,currency:r.total.currency})}),jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:e?jsxRuntime.jsx(Un,{width:50,height:16}):wn({amount:o.amount,currency:o.currency,minimumFractionDigits:2})})]})})},u_=({subscriptionPreview:t,isFetchingSubscriptionPreview:e,checkoutLocalization:n})=>{let{immediateInvoice:r}=t||{},{credits:i}=r||{};return !i||!i.used||i.used.amount<=0?null:jsxRuntime.jsx(ma,{children:jsxRuntime.jsxs(Lo,{children:[jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:n.summary.appliedCreditsTitle}),jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:jsxRuntime.jsx(No,{isLoading:e,children:wn({amount:-1*i.used.amount,currency:i.used.currency,minimumFractionDigits:2})})})]})})},d_=({tax:t,taxDetails:e,isFetchingSubscriptionPreview:n,checkoutLocalization:r})=>!e||!t||(t==null?void 0:t.amount)<=0?null:jsxRuntime.jsx(ma,{children:jsxRuntime.jsxs(Lo,{children:[jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:r.summary.taxTitle({taxDetails:e})}),jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:jsxRuntime.jsx(No,{isLoading:n,children:wn({amount:t==null?void 0:t.amount,currency:t==null?void 0:t.currency,minimumFractionDigits:2})})})]})});var qv=Q(bg__default.default)`
|
|
5456
5456
|
width: 100%;
|
|
5457
5457
|
max-width: 470px;
|
|
5458
5458
|
flex: 1.5;
|
|
5459
|
-
`,hg=Q(
|
|
5459
|
+
`,hg=Q(AL__default.default)`
|
|
5460
5460
|
background: ${({theme:t})=>t.stigg.palette.backgroundHighlight};
|
|
5461
5461
|
padding: 16px;
|
|
5462
5462
|
|
|
5463
5463
|
${qr.md} {
|
|
5464
5464
|
border-radius: 10px;
|
|
5465
5465
|
}
|
|
5466
|
-
`;hg.defaultProps={elevation:0};var
|
|
5466
|
+
`;hg.defaultProps={elevation:0};var OL=Q(rt)`
|
|
5467
5467
|
margin-bottom: 16px;
|
|
5468
5468
|
font-weight: 500;
|
|
5469
5469
|
`,Ku=Q(zP__default.default)`
|
|
5470
5470
|
margin: 16px 0;
|
|
5471
|
-
`,
|
|
5471
|
+
`,p_=Q(rt)`
|
|
5472
5472
|
margin-bottom: 8px;
|
|
5473
|
-
`;function
|
|
5473
|
+
`;function RL({isLastStep:t,checkoutHasChanges:e,isFreeDowngrade:n,checkoutLocalization:r,isPlanUpdate:i}){return t?e?i?r.checkoutButton.updateText:n?r.checkoutButton.downgradeToFreeText:r.checkoutButton.upgradeText:r.checkoutButton.noChangesText:r.checkoutButton.nextText}var h_=({onCheckout:t,onCheckoutCompleted:e,disablePromotionCode:n,disableSuccessAnimation:r,isFreeDowngrade:i,onMockCheckoutPreview:o,showWatermark:s})=>{var Gn,ln,Ke,dn,or;let[c,p]=Bv.useState(false),{setErrorMessage:h,useNewPaymentMethod:v}=Pi(),P=ha(),x=Yu(),{checkoutState:T,checkoutLocalization:I,checkoutSuccess:R,widgetState:A}=ze(),{plan:O,activeSubscription:N}=T||{},V=eg(((Gn=O==null?void 0:O.pricePoints)==null?void 0:Gn.filter(_e=>_e.billingPeriod===x.billingPeriod))||[]),[G,X]=wL__default.default(V,_e=>_e.pricingModel===nn.FlatFee),nt=G[0],st=i||P.isCheckoutComplete&&P.isLastStep,{isZuoraIntegration:U}=Qu(),j=c||R,{subscriptionPreview:ut,isFetchingSubscriptionPreview:Y}=yE({onMockCheckoutPreview:o}),{handleSubmit:at,isLoading:pt}=XE({isMocked:!!o,disableSuccessAnimation:r,onCheckout:t,onCheckoutCompleted:e,onSuccess:()=>{p(true),P.markStepAsCompleted(P.progressBarState.activeStep);}}),{handleZuoraSubmit:dt}=ug({onCheckout:t,onCheckoutCompleted:e,disableSuccessAnimation:r,onSuccess:()=>{P.markStepAsCompleted(P.progressBarState.activeStep);}}),mt=_e=>ce(null,null,function*(){if(j)return;let De;U&&!v?De=yield dt():De=yield at(_e);let{errorMessage:vr}=De||{};vr?(h(vr),p(false)):h(void 0);}),Ct=U&&!v?A.readOnly:pt,jt=_e=>ce(null,null,function*(){Ct||(st?yield mt(_e):P.goNext());}),{immediateInvoice:Gt,recurringInvoice:Jt}=ut||{},ee=!!ut&&(!!(Gt!=null&&Gt.proration)||!!ut.hasScheduledUpdates),re=!n&&!i&&!U,Ee=!!(Jt!=null&&Jt.discountDetails)&&!i,je=re||Ee,sn=X.some(_e=>_e.pricingModel===nn.UsageBased),Ze=sn&&!nt&&X.every(_e=>_e.pricingModel===nn.UsageBased),Pn=typeof I.summary.baseChargeText=="function"?I.summary.baseChargeText({billingPeriod:x.billingPeriod}):I.summary.baseChargeText;return jsxRuntime.jsxs(qv,{children:[jsxRuntime.jsxs(hg,{children:[jsxRuntime.jsx(OL,{variant:"h3",children:I.summary.title}),jsxRuntime.jsxs(da__default.default,{className:"stigg-checkout-summary-plan-title-container",display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[jsxRuntime.jsx(rt,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:I.summary.planName({plan:O})}),jsxRuntime.jsx(Ku,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),nt&&jsxRuntime.jsx(fg,{checkoutLocalization:I,label:Pn,quantity:1,price:nt}),!nt&&i?jsxRuntime.jsx(l_,{label:Pn}):null,jsxRuntime.jsx(da__default.default,{item:true,className:"stigg-checkout-summary-usage-charges-container",children:X.map(_e=>{var vr,Ve,bt,ar,sr;let De=(vr=x.billableFeatures)==null?void 0:vr.find(Jn=>{var lr;return Jn.featureId===((lr=_e.feature)==null?void 0:lr.featureId)});return jsxRuntime.jsx(fg,{checkoutLocalization:I,label:Hp(((bt=_e.feature)==null?void 0:bt.displayName)||"",(ar=_e.feature)==null?void 0:ar.units,(sr=_e.feature)==null?void 0:sr.unitsPlural),quantity:(De==null?void 0:De.quantity)||1,price:_e},(Ve=_e.feature)==null?void 0:Ve.featureId)})}),!!((ln=x.addons)!=null&&ln.length)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(da__default.default,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[jsxRuntime.jsx(rt,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:I.summary.addonsSectionTitle}),jsxRuntime.jsx(Ku,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),x.addons.map(_e=>{var Ve,bt;let De=(Ve=_e.addon.pricePoints)==null?void 0:Ve.find(ar=>ar.billingPeriod===x.billingPeriod);if(!De)return null;let vr=_e.quantity&&_e.quantity>0?_e.quantity:1;return jsxRuntime.jsx(fg,{checkoutLocalization:I,label:_e.addon.displayName,quantity:vr,price:De},(bt=_e==null?void 0:_e.addon)==null?void 0:bt.id)})]}),!je&&jsxRuntime.jsx(Ku,{className:"stigg-checkout-summary-divider"}),je&&jsxRuntime.jsxs(da__default.default,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[jsxRuntime.jsx(rt,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:I.summary.discountsSectionTitle}),jsxRuntime.jsx(Ku,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),re&&jsxRuntime.jsx(GE,{disabled:Ct||Y,checkoutLocalization:I,onMockCheckoutPreview:o}),Ee&&ut&&jsxRuntime.jsx(c_,{subscriptionPreview:ut,isFetchingSubscriptionPreview:Y,checkoutLocalization:I}),je&&jsxRuntime.jsx(Ku,{className:"stigg-checkout-summary-divider"}),jsxRuntime.jsx(d_,{tax:Jt==null?void 0:Jt.tax,taxDetails:Jt==null?void 0:Jt.taxDetails,isFetchingSubscriptionPreview:Y,checkoutLocalization:I}),i?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Lo,{style:{marginTop:16},children:jsxRuntime.jsxs(da__default.default,{display:"flex",flexDirection:"column",container:true,children:[jsxRuntime.jsxs(da__default.default,{item:true,display:"flex",justifyContent:"space-between",children:[jsxRuntime.jsx(rt,{variant:"h6",children:I.summary.totalText}),jsxRuntime.jsx(rt,{variant:"h6",children:jsxRuntime.jsxs(No,{isLoading:Y,children:[Ze?I.summary.onlyPayAsYouGoText:null,!Ze&&sn?I.summary.startsAtText:null,Ze?null:wn(St(W({amount:0},Jt==null?void 0:Jt.total),{minimumFractionDigits:2}))]})})]}),jsxRuntime.jsx(da__default.default,{item:true,children:jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:I.summary.totalBillingPeriodText({billingPeriod:x.billingPeriod})})})]})}),jsxRuntime.jsx(Ku,{className:"stigg-checkout-summary-divider"})]}),(Ke=Gt==null?void 0:Gt.proration)!=null&&Ke.hasProrations&&(Gt!=null&&Gt.subTotal)&&(Gt==null?void 0:Gt.subTotal.amount)>0?jsxRuntime.jsx(ma,{children:jsxRuntime.jsxs(Lo,{children:[jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:I.summary.proratedTotalDueText}),jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:jsxRuntime.jsx(No,{isLoading:Y,children:wn({amount:Number(((dn=Gt==null?void 0:Gt.subTotal)==null?void 0:dn.amount)||0)+Number(((or=Gt==null?void 0:Gt.tax)==null?void 0:or.amount)||0),currency:Gt==null?void 0:Gt.subTotal.currency,minimumFractionDigits:2})})})]})}):null,jsxRuntime.jsx(u_,{subscriptionPreview:ut,isFetchingSubscriptionPreview:Y,checkoutLocalization:I}),jsxRuntime.jsx(ma,{children:jsxRuntime.jsxs(Lo,{children:[jsxRuntime.jsx(p_,{variant:"h6",children:I.summary.totalDueText}),jsxRuntime.jsx(p_,{variant:"h6",children:jsxRuntime.jsx(No,{isLoading:Y,children:wn(St(W({amount:0},Gt==null?void 0:Gt.total),{minimumFractionDigits:2}))})})]})}),jsxRuntime.jsx(i_,{plan:O,activeSubscription:N,subscriptionPreview:ut,isFetchingSubscriptionPreview:Y,checkoutLocalization:I,billingPeriod:x.billingPeriod}),(!st||!U||U&&!v)&&jsxRuntime.jsx($i,{$success:j,$error:st&&i,disabled:Ct||Y||P.progressBarState.isDisabled||st&&!ee,className:"stigg-checkout-summary-cta-button",sx:{textTransform:"none",borderRadius:"10px",marginTop:"24px",height:"36px"},variant:"contained",size:"medium",onClick:_e=>{jt(_e);},fullWidth:true,children:jsxRuntime.jsx(rt,{className:"stigg-checkout-summary-cta-button-text",variant:"h3",color:"white",style:{display:"flex"},children:j?jsxRuntime.jsx(qn,{icon:"Check",style:{display:"contents"}}):Ct||Y?jsxRuntime.jsx(T3__default.default,{size:20,sx:{color:"white"}}):RL({isLastStep:st,checkoutHasChanges:ee,isFreeDowngrade:i,checkoutLocalization:I,isPlanUpdate:!!N&&(N==null?void 0:N.plan.id)===(O==null?void 0:O.id)})})})]}),jsxRuntime.jsx(so,{source:"checkout",showWatermark:s,style:{marginTop:8,display:"flex",justifyContent:"center"}}),!r&&j&&jsxRuntime.jsx(KE,{checkoutLocalization:I})]})};var m_=({showWatermark:t})=>jsxRuntime.jsxs(qv,{children:[jsxRuntime.jsxs(hg,{children:[jsxRuntime.jsxs(uc,{$flexDirection:"column",$gap:24,children:[jsxRuntime.jsx(Un,{width:120,height:20}),jsxRuntime.jsx(Un,{width:120,height:20}),jsxRuntime.jsx(Un,{width:120,height:20}),jsxRuntime.jsx(Un,{width:120,height:20})]}),jsxRuntime.jsxs(uc,{$flexDirection:"column",$gap:24,marginTop:5,children:[jsxRuntime.jsx(Un,{height:20}),jsxRuntime.jsx(Un,{height:20}),jsxRuntime.jsx(Un,{height:20})]}),jsxRuntime.jsx(Np,{flex:1,marginTop:5,children:jsxRuntime.jsx(Un,{height:34})})]}),jsxRuntime.jsx(so,{source:"checkout",showWatermark:t,style:{marginTop:8,display:"flex",justifyContent:"center"}})]});var y_=Q(da__default.default)`
|
|
5474
5474
|
width: 100%;
|
|
5475
5475
|
gap: 8px;
|
|
5476
|
-
`,
|
|
5476
|
+
`,b_=Q(da__default.default)`
|
|
5477
5477
|
display: flex;
|
|
5478
5478
|
flex-direction: column;
|
|
5479
5479
|
gap: 16px;
|
|
@@ -5483,56 +5483,56 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5483
5483
|
gap: 0;
|
|
5484
5484
|
flex-direction: row;
|
|
5485
5485
|
justify-content: space-between;
|
|
5486
|
-
min-height:
|
|
5486
|
+
min-height: 104px;
|
|
5487
5487
|
align-items: flex-start;
|
|
5488
5488
|
padding-top: 16px;
|
|
5489
5489
|
padding-bottom: 16px;
|
|
5490
5490
|
}
|
|
5491
|
-
`,
|
|
5491
|
+
`,v_=Q($i)`
|
|
5492
5492
|
min-width: unset;
|
|
5493
5493
|
width: 41px;
|
|
5494
5494
|
height: 41px;
|
|
5495
5495
|
padding: 0;
|
|
5496
|
-
`;var
|
|
5496
|
+
`;var ML=material.styled(material.Grid)`
|
|
5497
5497
|
display: flex;
|
|
5498
5498
|
flex-direction: row;
|
|
5499
5499
|
align-items: center;
|
|
5500
5500
|
width: 100%;
|
|
5501
5501
|
justify-content: flex-end;
|
|
5502
|
-
`;function
|
|
5502
|
+
`;function P_({addon:t,addonState:e,hasChanges:n,errorMessage:r,isPriceForBillingPeriodAvailable:i,checkoutLocalization:o,handleQuantityChange:s,handleUndo:c,handleRemoveAddon:p}){var x;let h=Ci("lg"),v=!!e,P=t.maxQuantity!==1;return jsxRuntime.jsxs(ML,{item:true,sx:{gap:"16px"},container:!h,children:[n&&jsxRuntime.jsx($i,{variant:"text",size:"small",sx:{padding:"8px",minWidth:"unset"},onClick:c,children:jsxRuntime.jsx(rt,{color:"primary.main",variant:"body1",children:"Undo"})}),v&&jsxRuntime.jsxs(material.Grid,{sx:{display:"flex",width:"100%",justifyContent:"flex-end"},children:[P&&jsxRuntime.jsx(Zs,{id:`${t.id}-input`,type:"number",onWheel:Uu,sx:h?{marginX:2,width:"100%"}:{flex:1},value:(x=e==null?void 0:e.quantity)!=null?x:"",error:!!r,helperText:r,FormHelperTextProps:{sx:{margin:"4px"}},onChange:T=>{var I,R;return s((I=T==null?void 0:T.target)!=null&&I.value?Number((R=T==null?void 0:T.target)==null?void 0:R.value):null)},onFocus:T=>T.target.select()}),jsxRuntime.jsx(v_,{color:"error",onClick:p,children:jsxRuntime.jsx(qn,{icon:"Trash",style:{display:"flex",padding:"8px"}})})]}),!v&&jsxRuntime.jsx($i,{sx:{paddingX:"22px",paddingY:"8px"},onClick:()=>s(1),disabled:!i,children:jsxRuntime.jsx(rt,{color:i?"primary.main":"disabled",variant:"body1",children:o.addAddonText})})]})}var LL=Q(material.Grid)`
|
|
5503
5503
|
display: flex;
|
|
5504
5504
|
flex-direction: column;
|
|
5505
5505
|
justify-content: center;
|
|
5506
5506
|
width: 100%;
|
|
5507
5507
|
height: 42px;
|
|
5508
|
-
`;function
|
|
5508
|
+
`;function x_({addon:t,billingPeriod:e,checkoutLocalization:n}){let r=t.pricePoints.find(i=>i.billingPeriod===e);return jsxRuntime.jsxs(LL,{item:true,children:[jsxRuntime.jsx(rt,{variant:"h6",lineHeight:"24px",children:t.displayName}),r?jsxRuntime.jsx(rt,{variant:"body1",lineHeight:"20px",color:"secondary",children:`${wn({amount:r.amount,currency:r.currency,minimumFractionDigits:2})}/${e===be.Annually?"year":"month"}`}):jsxRuntime.jsx(rt,{variant:"body1",lineHeight:"20px",color:"secondary",children:n.addonBillingPeriodNotAvailableText({planBillingPeriod:e})})]})}function $L({addon:t,billingPeriod:e,addonState:n,initialAddonState:r,setAddon:i,removeAddon:o,checkoutLocalization:s,onAddonsValidationChange:c,onAddonChange:p}){let[h,v]=Bv.useState(void 0),P=!!n&&!!r&&n.quantity!==r.quantity||!!r&&!n,x=t.pricePoints.some(A=>A.billingPeriod===e),T=A=>ce(null,null,function*(){if(!A||A<=0){c({addonId:t.id,isValid:false}),v("Minimum 1"),i(t,A!=null?A:null);return}let O=yield p==null?void 0:p({addon:t,quantity:A});v(O==null?void 0:O.errorMessage),c({addonId:t.id,isValid:!(O!=null&&O.disableNextStep)}),i(t,A);}),I=()=>ce(null,null,function*(){yield p==null?void 0:p({addon:t,quantity:0}),o(t.id),c({addonId:t.id,isValid:true});});return jsxRuntime.jsxs(b_,{children:[jsxRuntime.jsx(x_,{addon:t,billingPeriod:e,checkoutLocalization:s}),jsxRuntime.jsx(P_,{addon:t,addonState:n,hasChanges:P,handleUndo:()=>ce(null,null,function*(){if(r){let A=yield p==null?void 0:p({addon:t,quantity:r.quantity});c({addonId:t.id,isValid:!(A!=null&&A.disableNextStep)}),i(t,r.quantity);}else yield I();c({addonId:t.id,isValid:true});}),errorMessage:h,handleQuantityChange:T,isPriceForBillingPeriodAvailable:x,checkoutLocalization:s,handleRemoveAddon:I})]})}function __({onAddonChange:t}){let{checkoutLocalization:e,setIsValid:n}=ze(),{billingPeriod:r}=lo(),{setIsDisabled:i}=ha(),{initialAddons:o,addons:s,availableAddons:c,setAddon:p,removeAddon:h}=bx(),[v,P]=Bv.useState((c==null?void 0:c.reduce((x,T)=>(x[T.id]=true,x),{}))||{});return Bv.useEffect(()=>{let x=Object.values(v).some(T=>!T);i(x),n(!x);},[v,i,n]),jsxRuntime.jsx(y_,{container:true,children:c==null?void 0:c.map(x=>{let T=s.find(R=>R.addon.id===x.id),I=o==null?void 0:o.find(R=>R.addon.id===x.id);return jsxRuntime.jsx($L,{addon:x,billingPeriod:r,addonState:T,initialAddonState:I,setAddon:p,removeAddon:h,checkoutLocalization:e,onAddonsValidationChange:({addonId:R,isValid:A})=>P(St(W({},v),{[R]:A})),onAddonChange:t},x.id)})})}var Kv=Q(da__default.default)`
|
|
5509
5509
|
padding: 8px;
|
|
5510
5510
|
border-radius: 10px;
|
|
5511
5511
|
border: 1px solid ${({theme:t})=>t.stigg.palette.outlinedBorder};
|
|
5512
5512
|
cursor: ${({$disabled:t})=>t?"not-allowed":"pointer"};
|
|
5513
5513
|
opacity: ${({$disabled:t})=>t?.6:1};
|
|
5514
|
-
`,
|
|
5514
|
+
`,T_=Q(Kv)`
|
|
5515
5515
|
flex-direction: column;
|
|
5516
5516
|
align-items: unset;
|
|
5517
5517
|
${({$hideBorders:t})=>t&&react.css`
|
|
5518
5518
|
border: none;
|
|
5519
5519
|
padding: 0;
|
|
5520
5520
|
`}
|
|
5521
|
-
`,
|
|
5521
|
+
`,w_=Q(da__default.default)`
|
|
5522
5522
|
display: flex;
|
|
5523
5523
|
align-items: center;
|
|
5524
5524
|
flex: 1;
|
|
5525
5525
|
gap: 12px;
|
|
5526
|
-
`,
|
|
5526
|
+
`,I_=Q(da__default.default)`
|
|
5527
5527
|
display: flex;
|
|
5528
5528
|
flex-direction: column;
|
|
5529
|
-
`;var
|
|
5529
|
+
`;var YL=Q(bg__default.default)`
|
|
5530
5530
|
position: relative;
|
|
5531
5531
|
max-width: 500px;
|
|
5532
|
-
`,
|
|
5532
|
+
`,QL=Q(bg__default.default)`
|
|
5533
5533
|
opacity: ${({$showLoading:t})=>t?.6:1};
|
|
5534
5534
|
pointer-events: ${({$showLoading:t})=>t?"none":"auto"};
|
|
5535
|
-
`,
|
|
5535
|
+
`,KL=Q(bg__default.default)`
|
|
5536
5536
|
position: absolute;
|
|
5537
5537
|
top: 40px;
|
|
5538
5538
|
left: 0;
|
|
@@ -5544,18 +5544,18 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5544
5544
|
justify-content: center;
|
|
5545
5545
|
border-radius: 4px;
|
|
5546
5546
|
z-index: 10;
|
|
5547
|
-
`,
|
|
5547
|
+
`,XL=Q(bg__default.default)`
|
|
5548
5548
|
display: flex;
|
|
5549
5549
|
flex-direction: column;
|
|
5550
5550
|
align-items: center;
|
|
5551
5551
|
gap: 12px;
|
|
5552
|
-
`;function
|
|
5552
|
+
`;function k_({onCheckout:t,onCheckoutCompleted:e}){var A,O,N;let{isZuoraIntegration:n,isInitialized:r,createPaymentSession:i}=Qu(),{setErrorMessage:o}=Pi(),{billingCountryCode:s}=lo(),{checkoutState:c,widgetState:p}=ze(),{handleZuoraSubmit:h}=ug({onCheckout:t,onCheckoutCompleted:e}),v=Bv.useRef(false),[P,x]=Bv__default.default.useState(false),T=((N=(O=(A=c==null?void 0:c.plan)==null?void 0:A.pricePoints)==null?void 0:O[0])==null?void 0:N.currency)||Ru.Usd,{publishableKey:I}=c==null?void 0:c.billingIntegration.billingCredentials,R=Bv.useCallback(V=>ce(null,null,function*(){var G;if(!V.success||!V.paymentMethodId){let X=((G=V.error)==null?void 0:G.message)||"Payment failed";o(X),yield e({success:false,error:X});return}yield h(V.paymentMethodId);}),[h,o,e]);return Bv.useEffect(()=>(ce(null,null,function*(){if(!(!r||v.current)){x(true),o(void 0);try{v.current=!0;let G=window.Zuora(I),X=t_(i,R,T,s);(yield G.createPaymentForm(X)).mount("#zuora_payment");}catch(G){v.current=false,o("Failed to render Zuora payment form");}finally{x(false);}}}),()=>{v.current=false;}),[r]),n?jsxRuntime.jsxs(YL,{children:[jsxRuntime.jsx(QL,{id:"zuora_payment",$showLoading:p.readOnly||P}),(p.readOnly||P)&&jsxRuntime.jsx(KL,{children:jsxRuntime.jsx(XL,{children:jsxRuntime.jsx(T3__default.default,{size:28})})})]}):null}function A_({checked:t,text:e,subtitle:n,readOnly:r}){return jsxRuntime.jsxs(w_,{children:[jsxRuntime.jsx(t5__default.default,{checked:t,disabled:r}),jsxRuntime.jsxs(I_,{container:true,children:[jsxRuntime.jsx(da__default.default,{item:true,children:e}),n&&jsxRuntime.jsx(da__default.default,{item:true,children:n})]})]})}function O_({checked:t,paymentMethodDetails:e,readOnly:n,onSelect:r}){if(!e)return null;let{last4Digits:i,expirationMonth:o,expirationYear:s}=e;return jsxRuntime.jsx(Kv,{item:true,onClick:r,$disabled:n,children:jsxRuntime.jsx(A_,{checked:t,readOnly:n,text:jsxRuntime.jsx(rt,{variant:"h6",children:`Card ending in ${i}`}),subtitle:!!o&&!!s&&jsxRuntime.jsx(rt,{variant:"body1",children:`Expires ${o.toString().padStart(2,"0")}/${s}`})})})}function R_({hasExistingPaymentMethod:t,checked:e,onSelect:n,readOnly:r,checkoutLocalization:i,onBillingAddressChange:o,collectPhoneNumber:s,onCheckout:c,onCheckoutCompleted:p}){let{isZuoraIntegration:h}=Qu();return jsxRuntime.jsxs(T_,{item:true,$hideBorders:!t,onClick:n,$disabled:r,children:[t&&jsxRuntime.jsx(A_,{checked:e,readOnly:r,text:jsxRuntime.jsx(rt,{variant:"h6",children:i.newPaymentMethodText})}),jsxRuntime.jsx(xL__default.default,{in:e,children:h?jsxRuntime.jsx(k_,{onCheckout:c,onCheckoutCompleted:p}):jsxRuntime.jsx(jE,{onBillingAddressChange:o,collectPhoneNumber:s})})]})}var r5=Q(da__default.default)`
|
|
5553
5553
|
display: flex;
|
|
5554
5554
|
flex-direction: column;
|
|
5555
5555
|
gap: 24px;
|
|
5556
|
-
`;function
|
|
5556
|
+
`;function F_({onBillingAddressChange:t,collectPhoneNumber:e,onCheckout:n,onCheckoutCompleted:r}){let{checkoutState:i,checkoutLocalization:o,widgetState:s}=ze(),{customer:c}=i||{},{errorMessage:p,useNewPaymentMethod:h,setUseNewPaymentMethod:v}=Pi(),{readOnly:P}=s,x=T=>{P||v(T);};return jsxRuntime.jsxs(r5,{container:true,children:[!!p&&jsxRuntime.jsx(e5__default.default,{severity:"error",sx:{alignItems:"center"},children:jsxRuntime.jsx(rt,{overrideColor:"inherit",children:p})}),jsxRuntime.jsx(O_,{readOnly:P,checked:!h,paymentMethodDetails:c==null?void 0:c.paymentMethodDetails,onSelect:()=>x(false)}),jsxRuntime.jsx(R_,{hasExistingPaymentMethod:!!(c!=null&&c.paymentMethodDetails),readOnly:P,checked:h,checkoutLocalization:o,onSelect:()=>x(true),onBillingAddressChange:t,collectPhoneNumber:e,onCheckout:n,onCheckoutCompleted:r})]})}var Cg=({onClick:t,checkoutLocalization:e,size:n})=>jsxRuntime.jsx(s2__default.default,{className:"stigg-checkout-change-plan-button",sx:{textTransform:"none"},variant:"text",size:n,onClick:t,children:jsxRuntime.jsx(rt,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",variant:"h3",style:{lineHeight:"24px"},children:e.changePlan})});function L_({allowChangePlan:t=false,onChangePlan:e}){let{checkoutState:n,checkoutLocalization:r}=ze(),{plan:i}=n||{};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(bg__default.default,{sx:{marginBottom:"16px"},children:[jsxRuntime.jsx(rt,{variant:"body1",color:"disabled",style:{opacity:.6,marginBottom:"8px"},children:"Selected plan"}),jsxRuntime.jsxs(bg__default.default,{sx:{display:"flex",justifyContent:"space-between"},children:[jsxRuntime.jsx(rt,{variant:"h1",children:i==null?void 0:i.displayName}),t&&e&&jsxRuntime.jsx(Cg,{onClick:()=>{e({currentPlan:i});},checkoutLocalization:r,size:"medium"})]})]}),jsxRuntime.jsx(zP__default.default,{className:"stigg-checkout-plan-header-divider"})]})}function Jv(t){switch(t){case be.Annually:return "Annual";case be.Monthly:return "Monthly";default:return ""}}var U_=Q(bg__default.default)`
|
|
5557
5557
|
margin: 16px 0;
|
|
5558
|
-
|
|
5558
|
+
`,$_=Q.button`
|
|
5559
5559
|
cursor: ${({$disabled:t,$isOnlyBillingPeriod:e})=>t||e?"default":"pointer"};
|
|
5560
5560
|
flex: 1;
|
|
5561
5561
|
display: flex;
|
|
@@ -5575,7 +5575,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5575
5575
|
background: none;
|
|
5576
5576
|
}
|
|
5577
5577
|
}
|
|
5578
|
-
|
|
5578
|
+
`,G_=Q(bg__default.default)`
|
|
5579
5579
|
display: flex;
|
|
5580
5580
|
gap: 16px;
|
|
5581
5581
|
margin-top: 16px;
|
|
@@ -5583,11 +5583,11 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5583
5583
|
display: flex;
|
|
5584
5584
|
align-items: baseline;
|
|
5585
5585
|
gap: 8px;
|
|
5586
|
-
`;Q(
|
|
5586
|
+
`;Q(l5__default.default)`
|
|
5587
5587
|
& .MuiChip-label {
|
|
5588
5588
|
font-size: 12px;
|
|
5589
5589
|
}
|
|
5590
|
-
`;var
|
|
5590
|
+
`;var j_=({billingPeriod:t,isOnlyBillingPeriod:e})=>{let{billingPeriod:n,setBillingPeriod:r}=lo(),i=n===t;return jsxRuntime.jsxs($_,{onClick:()=>r(t),$isActive:i,$isOnlyBillingPeriod:e,children:[jsxRuntime.jsx(t5__default.default,{checked:i,onChange:()=>r(t),value:t,disabled:e,inputProps:{"aria-label":Jv(t)},sx:{padding:0,marginRight:"8px"}}),jsxRuntime.jsx(bg__default.default,{children:jsxRuntime.jsx(rt,{variant:"h3",color:"primary",children:Jv(t)})})]})};function V_({plan:t,checkoutLocalization:e}){let[n,r]=lodash.partition(t==null?void 0:t.pricePoints,o=>o.billingPeriod===be.Monthly),i=!!(n!=null&&n.length)&&!!(r!=null&&r.length);return i?jsxRuntime.jsxs(U_,{children:[jsxRuntime.jsx(rt,{variant:"h6",color:"primary",children:e.billingPeriodsTitle}),jsxRuntime.jsxs(G_,{children:[!!(n!=null&&n.length)&&jsxRuntime.jsx(j_,{billingPeriod:be.Monthly,isOnlyBillingPeriod:!i},be.Monthly),!!(r!=null&&r.length)&&jsxRuntime.jsx(j_,{billingPeriod:be.Annually,isOnlyBillingPeriod:!i},be.Annually)]})]}):null}var m5=Q.div`
|
|
5591
5591
|
display: flex;
|
|
5592
5592
|
min-height: 60px;
|
|
5593
5593
|
margin-top: 16px;
|
|
@@ -5598,44 +5598,44 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5598
5598
|
align-items: flex-start;
|
|
5599
5599
|
justify-content: space-between;
|
|
5600
5600
|
}
|
|
5601
|
-
`,
|
|
5601
|
+
`,g5=Q(bg__default.default)`
|
|
5602
5602
|
display: flex;
|
|
5603
5603
|
flex-direction: column;
|
|
5604
5604
|
justify-content: center;
|
|
5605
5605
|
width: 100%;
|
|
5606
5606
|
height: 42px;
|
|
5607
|
-
`,
|
|
5607
|
+
`,y5=Q(rt)`
|
|
5608
5608
|
display: flex;
|
|
5609
5609
|
align-items: center;
|
|
5610
5610
|
justify-content: flex-end;
|
|
5611
5611
|
width: 100%;
|
|
5612
5612
|
min-height: 42px;
|
|
5613
|
-
`,
|
|
5613
|
+
`,b5=(t,e)=>{let{minUnitQuantity:n,maxUnitQuantity:r}=t;return !e||e<(n||1)?`Minimum ${n||1}`:r&&e>r?`Maximum ${r}`:""};function v5({charge:t,setBillableFeature:e,billableFeature:n,onValidationChange:r,onBillableFeatureChange:i}){var I,R,A,O,N,V;let[o,s]=Bv.useState(void 0),c=(I=t.feature)==null?void 0:I.featureId,p=!c,h=t.pricingModel===nn.UsageBased,v=p?"Base charge":Hp(((R=t.feature)==null?void 0:R.displayName)||"",(A=t.feature)==null?void 0:A.units,(O=t.feature)==null?void 0:O.unitsPlural),P=!!(t!=null&&t.minUnitQuantity||t!=null&&t.maxUnitQuantity),x=G=>ce(null,null,function*(){var ut,Y;if(p||!c)return;let{minUnitQuantity:X,maxUnitQuantity:nt}=t,st=(ut=G==null?void 0:G.target)!=null&&ut.value?Number((Y=G==null?void 0:G.target)==null?void 0:Y.value):null;if(!st||st<=0||X&&st<X||nt&&st>nt){r({featureId:c,isValid:false}),s(b5(t,st!=null?st:void 0)),e(c,st!=null?st:null);return}let U=tg(t,st),j=yield i==null?void 0:i({feature:t.feature,quantity:U});s(j==null?void 0:j.errorMessage),r({featureId:c,isValid:!(j!=null&&j.disableNextStep)}),e(c,U);}),T;if(p||h)T=`${wn({amount:t.amount,currency:t.currency,locale:"en-us",minimumFractionDigits:2})}`,h&&(T+=" / unit");else if(t.isTieredPrice&&t.tiersMode&&c){let G=(n==null?void 0:n.quantity)||1;T=jsxRuntime.jsx(dm,{componentId:`${c}-tiers`,tiers:t.tiers,tiersMode:t.tiersMode,value:G,errorMessage:o,handleChange:X=>ce(null,null,function*(){let nt=yield i==null?void 0:i({feature:t.feature,quantity:X});s(nt==null?void 0:nt.errorMessage),r({featureId:c,isValid:!(nt!=null&&nt.disableNextStep)}),e(c,X);}),width:"100%"});}else T=jsxRuntime.jsx(Zs,{sx:{width:"100%"},id:`${c}-input`,type:"number",onWheel:Uu,error:!!o,helperText:o,FormHelperTextProps:{sx:{margin:"4px"}},value:(N=n==null?void 0:n.quantity)!=null?N:"",onChange:x});return jsxRuntime.jsxs(m5,{children:[jsxRuntime.jsxs(g5,{children:[jsxRuntime.jsx(rt,{variant:"h6",color:"primary",lineHeight:"24px",children:v}),P&&jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",lineHeight:"20px",children:nm(t.minUnitQuantity,t.maxUnitQuantity,(V=t.feature)==null?void 0:V.unitsPlural)})]}),jsxRuntime.jsx(y5,{variant:"h6",color:"primary",children:T})]})}function W_({plan:t,billingPeriod:e,onBillableFeatureChange:n}){var v;let{billableFeatures:r,setBillableFeature:i}=lo(),{setIsDisabled:o}=ha(),{setIsValid:s}=ze(),c=eg(((v=t==null?void 0:t.pricePoints)==null?void 0:v.filter(P=>P.billingPeriod===e))||[]),[p,h]=Bv.useState(c==null?void 0:c.reduce((P,x)=>{var T;return P[((T=x.feature)==null?void 0:T.featureId)||"base-charge"]=true,P},{}));return Bv.useEffect(()=>{let P=Object.values(p).some(x=>!x);o(P),s(!P);},[p,o,s]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:c==null?void 0:c.map(P=>{var T;let x=r.find(I=>{var R;return I.featureId===((R=P.feature)==null?void 0:R.featureId)});return jsxRuntime.jsx(v5,{charge:P,setBillableFeature:i,billableFeature:x,onValidationChange:({featureId:I,isValid:R})=>h(A=>St(W({},A),{[I]:R})),onBillableFeatureChange:n},((T=P.feature)==null?void 0:T.featureId)||"base-charge")})})}var q_=Q(bg__default.default)`
|
|
5614
5614
|
width: 100%;
|
|
5615
|
-
`;var
|
|
5615
|
+
`;var Q_=({onChangePlan:t,onBillableFeatureChange:e})=>{let{checkoutState:n,checkoutLocalization:r}=ze(),{plan:i}=n||{},{billingPeriod:o}=lo();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(L_,{allowChangePlan:true,onChangePlan:t}),jsxRuntime.jsxs(q_,{children:[jsxRuntime.jsx(V_,{plan:i,checkoutLocalization:r}),jsxRuntime.jsx(W_,{plan:i,billingPeriod:o,onBillableFeatureChange:e})]})]})};var x5=t=>jsxRuntime.jsx("svg",St(W({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:jsxRuntime.jsxs("g",{id:"arrow-right",children:[jsxRuntime.jsx("path",{id:"Shape",d:"M2.66699 8H13.3337",stroke:"#7586B0",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{id:"Shape_2",d:"M9.33301 4L13.333 8L9.33301 12",stroke:"#7586B0",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})]})})),K_=x5;var X_=Q(K_)`
|
|
5616
5616
|
path {
|
|
5617
5617
|
stroke: ${({theme:t})=>t.stigg.palette.text.secondary};
|
|
5618
5618
|
}
|
|
5619
|
-
`;var
|
|
5619
|
+
`;var T5=Q(bg__default.default)`
|
|
5620
5620
|
display: flex;
|
|
5621
|
-
`,
|
|
5621
|
+
`,w5=Q(e5__default.default)`
|
|
5622
5622
|
margin-bottom: 16px;
|
|
5623
|
-
`,
|
|
5623
|
+
`,I5=Q(bg__default.default)`
|
|
5624
5624
|
padding: 16px;
|
|
5625
5625
|
border-radius: 10px;
|
|
5626
5626
|
width: 100%;
|
|
5627
5627
|
border: ${({theme:t})=>`1px solid ${t.stigg.palette.outlinedBorder}`};
|
|
5628
|
-
`,
|
|
5628
|
+
`,Z_=({headerText:t,planName:e,priceText:n})=>jsxRuntime.jsxs(I5,{className:"stigg-checkout-downgrade-to-free-container",children:[jsxRuntime.jsx(rt,{className:"stigg-checkout-downgrade-to-free-text-header",style:{opacity:.8},variant:"caption",color:"disabled",children:t}),jsxRuntime.jsx(rt,{className:"stigg-checkout-downgrade-to-free-plan-name",bold:true,variant:"h3",color:"primary",children:e}),jsxRuntime.jsx(rt,{className:"stigg-checkout-downgrade-to-free-price-text",color:"secondary",children:n})]}),tT=({checkoutLocalization:t,activeSubscription:e,freePlan:n,allowChangePlan:r=false,onChangePlan:i})=>{let o;r&&i&&(o=jsxRuntime.jsx(Cg,{onClick:()=>{i({currentPlan:n});},checkoutLocalization:t,size:"small"}));let s=e.prices.length>0?e.prices[0].billingPeriod:void 0;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(w5,{action:o,className:"stigg-checkout-downgrade-to-free-alert",severity:"info",children:jsxRuntime.jsx(rt,{as:"span",color:"secondary",children:t.downgradeToFree.alertText({plan:e.plan})})}),jsxRuntime.jsxs(T5,{className:"stigg-checkout-downgrade-to-free-plans-container",children:[jsxRuntime.jsx(Z_,{headerText:t.downgradeToFree.paidPlanHeader({plan:e.plan}),planName:t.downgradeToFree.paidPlanName({plan:e.plan}),priceText:t.downgradeToFree.paidPlanPriceText({plan:e.plan,billingPeriod:s})}),jsxRuntime.jsx(X_,{className:"stigg-checkout-downgrade-to-free-arrow",style:{margin:"auto 16px",minWidth:"16px"}}),jsxRuntime.jsx(Z_,{headerText:t.downgradeToFree.freePlanHeader({plan:n}),planName:t.downgradeToFree.freePlanName({plan:n}),priceText:t.downgradeToFree.freePlanPriceText({plan:n})})]})]})};var O5=(t,{onBillingAddressChange:e,onChangePlan:n,onBillableFeatureChange:r,onAddonChange:i,collectPhoneNumber:o,onCheckout:s,onCheckoutCompleted:c})=>{switch(t.key){case "PLAN":return {content:jsxRuntime.jsx(Q_,{onChangePlan:n,onBillableFeatureChange:r})};case "ADDONS":return {content:jsxRuntime.jsx(__,{onAddonChange:i})};case "PAYMENT":return {content:jsxRuntime.jsx(F_,{onBillingAddressChange:e,collectPhoneNumber:o,onCheckout:s,onCheckoutCompleted:c})};default:return {content:null}}};function rT({onCheckout:t,onCheckoutCompleted:e,onChangePlan:n,onBillingAddressChange:r,onBillableFeatureChange:i,onAddonChange:o,collectPhoneNumber:s,disablePromotionCode:c,disableSuccessAnimation:p,onMockCheckoutPreview:h}){let{stripePromise:v,setupIntentClientSecret:P}=VE(),[{stiggTheme:x,widgetState:T,theme:I,showWatermark:R}]=Ye(),{currentStep:A}=ha(),{isLoadingCheckoutData:O}=T,{checkoutState:N,checkoutLocalization:V}=ze(),{plan:G,activeSubscription:X}=N||{},nt=!!G&&G.pricingType===Rn.Free&&!!X&&X.pricingType!==Rn.Free,{content:st}=O5(A,{onBillingAddressChange:r,onChangePlan:n,onBillableFeatureChange:i,onAddonChange:o,collectPhoneNumber:s,onCheckout:t,onCheckoutCompleted:e}),U=jsxRuntime.jsx(jsxRuntime.Fragment,{children:nt?jsxRuntime.jsx(tT,{freePlan:G,activeSubscription:X,allowChangePlan:true,checkoutLocalization:V,onChangePlan:n}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:st})}),j=Bv.useMemo(()=>P?{clientSecret:P}:{mode:"setup",currency:"usd"},[P]);return jsxRuntime.jsx(reactStripeJs.Elements,{stripe:v,options:St(W({},j),{appearance:{theme:"stripe",variables:{colorText:x.palette.text.primary,colorPrimaryText:x.palette.text.primary,colorTextPlaceholder:x.palette.text.disabled,fontFamily:x.typography.fontFamily,colorBackground:I==null?void 0:I.paymentInputBackgroundColor,borderRadius:I==null?void 0:I.paymentInputBorderRadius},rules:I!=null&&I.paymentInputBorderColor?{".Input":{borderColor:I==null?void 0:I.paymentInputBorderColor}}:void 0}}),children:jsxRuntime.jsxs(_E,{className:"stigg-checkout-layout",children:[!nt&&jsxRuntime.jsx(RE,{}),jsxRuntime.jsxs(TE,{children:[jsxRuntime.jsx(wE,{children:O?jsxRuntime.jsx(lS,{}):U}),O?jsxRuntime.jsx(m_,{showWatermark:R}):jsxRuntime.jsx(h_,{disablePromotionCode:c,disableSuccessAnimation:p,onCheckout:t,onCheckoutCompleted:e,isFreeDowngrade:nt,onMockCheckoutPreview:h,showWatermark:R})]})]})},P)}var oT=x=>{var T=x,{textOverrides:t,theme:e,resourceId:n,planId:r,preferredBillingPeriod:i,billingCountryCode:o,billableFeatures:s,billingInformation:c,onMockCheckoutState:p,skipCheckoutSteps:h,onBeforeStepChange:v}=T,P=On(T,["textOverrides","theme","resourceId","planId","preferredBillingPeriod","billingCountryCode","billableFeatures","billingInformation","onMockCheckoutState","skipCheckoutSteps","onBeforeStepChange"]);return jsxRuntime.jsx(PE,{textOverrides:t,theme:e,resourceId:n,planId:r,preferredBillingPeriod:i,billingCountryCode:o,billableFeatures:s,billingInformation:c,onMockCheckoutState:p,skipCheckoutSteps:h,onBeforeStepChange:v,children:jsxRuntime.jsx(rT,W({},P))})};function M5(t){return Bv.useMemo(()=>{let e=new URLSearchParams(window.location.search);return e.get(t)},[t,window.location.search])}var i0=(r=>(r.IN_PROGRESS="IN_PROGRESS",r.SUCCEEDED="SUCCEEDED",r.FAILED="FAILED",r))(i0||{}),sT=({onProvisionStart:t,onProvisionSucceeded:e,onProvisionFailed:n}={})=>{let{stigg:r}=ve(),[i,o]=Bv.useState("IN_PROGRESS"),[s,c]=Bv.useState(false),p=M5("checkoutCompleted");return Bv.useEffect(()=>{ce(null,null,function*(){if(!(!p||p.toLowerCase()==="false"||s)){c(true),t&&t();try{let v=yield r.waitForCheckoutCompleted();o("SUCCEEDED"),e&&e(v);}catch(v){console.error("Failed to wait for checkout to complete",v),o("FAILED"),n&&n(v);}finally{c(false);}}});},[r,p]),{isAwaitingCheckout:s,provisionStatus:i}};function N5(r){var i=r,{noAccessComponent:t,children:e}=i,n=On(i,["noAccessComponent","children"]);let{hasAccess:o}=ig(n);return o?e:jsxRuntime.jsx(jsxRuntime.Fragment,{children:t!=null?t:null})}function U5(r){var i=r,{noAccessComponent:t,children:e}=i,n=On(i,["noAccessComponent","children"]);let{hasAccess:o}=og(n);return o?e:jsxRuntime.jsx(jsxRuntime.Fragment,{children:t!=null?t:null})}function j5(r){var i=r,{noAccessComponent:t,children:e}=i,n=On(i,["noAccessComponent","children"]);let{hasAccess:o}=ag(n);return o?e:jsxRuntime.jsx(jsxRuntime.Fragment,{children:t!=null?t:null})}function H5(r){var i=r,{noAccessComponent:t,children:e}=i,n=On(i,["noAccessComponent","children"]);let{hasAccess:o}=sg(n);return o?e:jsxRuntime.jsx(jsxRuntime.Fragment,{children:t!=null?t:null})}function Zu(t){let e=ve(),n=e==null?void 0:e.stigg,r=e==null?void 0:e.updatedAt,i=Bv.useCallback(()=>ce(null,null,function*(){if(!n||!n.isCustomerLoaded)return null;try{let p={currencyId:t.currencyId},h=yield n.getCreditBalance(p);if(h.balances&&h.balances.length>0){let{currentBalance:v,totalConsumed:P,totalGranted:x,currency:{currencyId:T,displayName:I,units:R,symbol:A}}=h.balances[0];return {currentBalance:v,totalConsumed:P,totalGranted:x,currencyId:T,displayName:I,units:R,symbol:A}}return {currencyId:t.currencyId,currentBalance:0,totalConsumed:0,totalGranted:0}}catch(p){throw console.error(p),p}}),[n,t.currencyId,r]),{data:o,error:s,isLoading:c}=co({func:i});return Bv.useMemo(()=>({balance:o,isLoading:c,error:s}),[o,s,c])}var ll=(t,e)=>t?gr(t,{maximumFractionDigits:e!=null?e:void 0}):0,Pg=(t,e=true,n=false)=>{let{currentBalance:r,displayName:i,units:o,symbol:s}=t,c=n&&s,p=o?r===1?o.singular:o.plural:i;return [c,e?p:""].filter(Boolean).join(" ")},lT=(t,e)=>e===0?0:Math.min(t/e*100,100);var X5=Q.div`
|
|
5629
5629
|
display: flex;
|
|
5630
5630
|
flex-direction: row;
|
|
5631
5631
|
gap: 4px;
|
|
5632
5632
|
align-items: baseline;
|
|
5633
|
-
`;function
|
|
5633
|
+
`;function cT({currencyId:t,decimalPlaces:e=null,showUnits:n=true,showSymbol:r=false}){let{balance:i,isLoading:o,error:s}=Zu({currencyId:t});if(s)return jsxRuntime.jsx(rt,{variant:"body1",color:"error",className:"stigg-credit-balance-value-error",children:s.message||"Failed to load balance"});if(o)return jsxRuntime.jsx(nl__default.default,{width:120,height:24,className:"stigg-credit-balance-value-loading"});if(i){let c=Pg(i,n,r);return jsxRuntime.jsxs(X5,{children:[jsxRuntime.jsx(rt,{variant:"h3",color:"primary",bold:true,className:"stigg-credit-balance-value-amount",children:ll(i.currentBalance,e)}),jsxRuntime.jsx(rt,{variant:"caption",color:"secondary",className:"stigg-credit-balance-value-suffix",children:c})]})}return jsxRuntime.jsx(rt,{variant:"body1",color:"disabled",className:"stigg-credit-balance-value-no-balance",children:"No balance data available"})}var uT={title:"Credit balance"},xg={title:"Credit utilization",remaining:"Remaining"},dT={receivedAt:"Received",effectiveAt:"Effective At",grantType:"Grant Type",status:"State",balance:"Balance",expiryDate:"Expires",emptyState:"No credit grants found",loadingState:"Loading credit grants...",errorState:"Failed to load credit grants"},pT={title:"Usage",totalSpend:"Total spend"};var J5=Q.div`
|
|
5634
5634
|
display: flex;
|
|
5635
5635
|
flex-direction: column;
|
|
5636
5636
|
gap: 8px;
|
|
5637
5637
|
width: 100%;
|
|
5638
|
-
`,
|
|
5638
|
+
`,tB=Q.div`
|
|
5639
5639
|
display: flex;
|
|
5640
5640
|
flex-direction: column;
|
|
5641
5641
|
gap: 8px;
|
|
@@ -5643,12 +5643,12 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5643
5643
|
border-radius: 8px;
|
|
5644
5644
|
border: 1px solid ${({theme:t})=>{var e,n;return (n=(e=t.stigg)==null?void 0:e.palette)==null?void 0:n.outlinedBorder}};
|
|
5645
5645
|
background-color: ${({theme:t})=>{var e,n;return (n=(e=t==null?void 0:t.stigg)==null?void 0:e.palette)==null?void 0:n.backgroundPaper}};
|
|
5646
|
-
`;function pT({currencyId:t,localization:e,decimalPlaces:n,showUnits:r=true,showSymbol:i=false}){var v;let o=fc(Mo),s=ve({optional:true}),c=s==null?void 0:s.theme,p=(v=e==null?void 0:e.title)!=null?v:cT.title,h=jsxRuntime.jsx(Z5,{className:"stigg-credit-balance-container",children:jsxRuntime.jsxs(J5,{className:"stigg-credit-balance-card",children:[jsxRuntime.jsx(rt,{variant:"h6",color:"primary",className:"stigg-credit-balance-title",children:p}),jsxRuntime.jsx(lT,{currencyId:t,decimalPlaces:n,showUnits:r,showSymbol:i})]})});return o?h:jsxRuntime.jsx(vi,{componentTheme:c,children:h})}function Bo(){}var d0=(function(){let t=0;return function(){return t++}})();function Le(t){return t===null||typeof t=="undefined"}function He(t){if(Array.isArray&&Array.isArray(t))return true;let e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Te(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}var Mn=t=>(typeof t=="number"||t instanceof Number)&&isFinite(+t);function xi(t,e){return Mn(t)?t:e}function me(t,e){return typeof t=="undefined"?e:t}var p0=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:t/e,Og=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Qe(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function tn(t,e,n,r){let i,o,s;if(He(t))if(o=t.length,r);else for(i=0;i<o;i++)e.call(n,t[i],i);else if(Te(t))for(s=Object.keys(t),o=s.length,i=0;i<o;i++)e.call(n,t[s[i]],s[i]);}function rd(t,e){let n,r,i,o;if(!t||!e||t.length!==e.length)return false;for(n=0,r=t.length;n<r;++n)if(i=t[n],o=e[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return false;return true}function of(t){if(He(t))return t.map(of);if(Te(t)){let e=Object.create(null),n=Object.keys(t),r=n.length,i=0;for(;i<r;++i)e[n[i]]=of(t[n[i]]);return e}return t}function TT(t){return ["__proto__","prototype","constructor"].indexOf(t)===-1}function wT(t,e,n,r){if(!TT(t))return;let i=e[t],o=n[t];Te(i)&&Te(o)?ji(i,o,r):e[t]=of(o);}function ji(t,e,n){let r=He(e)?e:[e],i=r.length;if(!Te(t))return t;n=n||{};let o=n.merger||wT;for(let s=0;s<i;++s){if(e=r[s],!Te(e))continue;let c=Object.keys(e);for(let p=0,h=c.length;p<h;++p)o(c[p],t,e,n);}return t}function xc(t,e){return ji(t,e,{merger:IT})}function IT(t,e,n){if(!TT(t))return;let r=e[t],i=n[t];Te(r)&&Te(i)?xc(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=of(i));}var fT={"":t=>t,x:t=>t.x,y:t=>t.y};function ya(t,e){return (fT[e]||(fT[e]=eB(e)))(t)}function eB(t){let e=kT(t);return n=>{for(let r of e){if(r==="")break;n=n&&n[r];}return n}}function kT(t){let e=t.split("."),n=[],r="";for(let i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function sf(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Fn=t=>typeof t!="undefined",Gr=t=>typeof t=="function",Rg=(t,e)=>{if(t.size!==e.size)return false;for(let n of t)if(!e.has(n))return false;return true};function f0(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}var Be=Math.PI,rn=2*Be,DT=rn+Be,af=Number.POSITIVE_INFINITY,lf=Be/180,bn=Be/2,mo=Be/4,td=Be*2/3,Ei=Math.log10,go=Math.sign;function Fg(t){let e=Math.round(t);t=Ec(t,e,t/1e3)?e:t;let n=Math.pow(10,Math.floor(Ei(t))),r=t/n;return (r<=1?1:r<=2?2:r<=5?5:10)*n}function h0(t){let e=[],n=Math.sqrt(t),r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((i,o)=>i-o).pop(),e}function Vi(t){return !isNaN(parseFloat(t))&&isFinite(t)}function Ec(t,e,n){return Math.abs(t-e)<n}function m0(t,e){let n=Math.round(t);return n-e<=t&&n+e>=t}function Mg(t,e,n){let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o));}function Qn(t){return t*(Be/180)}function _c(t){return t*(180/Be)}function Ng(t){if(!Mn(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Lg(t,e){let n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r),o=Math.atan2(r,n);return o<-0.5*Be&&(o+=rn),{angle:o,distance:i}}function ns(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function AT(t,e){return (t-e+DT)%rn-Be}function ai(t){return (t%rn+rn)%rn}function Tc(t,e,n,r){let i=ai(t),o=ai(e),s=ai(n),c=ai(o-i),p=ai(s-i),h=ai(i-o),v=ai(i-s);return i===o||i===s||r&&o===s||c>p&&h<v}function Nr(t,e,n){return Math.max(e,Math.min(n,t))}function g0(t){return Nr(t,-32768,32767)}function Uo(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function cf(t,e,n){n=n||(s=>t[s]<e);let r=t.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return {lo:i,hi:r}}var es=(t,e,n,r)=>cf(t,n,r?i=>t[i][e]<=n:i=>t[i][e]<n),y0=(t,e,n)=>cf(t,n,r=>t[r][e]>=n);function b0(t,e,n){let r=0,i=t.length;for(;r<i&&t[r]<e;)r++;for(;i>r&&t[i-1]>n;)i--;return r>0||i<t.length?t.slice(r,i):t}var OT=["push","pop","shift","splice","unshift"];function v0(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:true,enumerable:false,value:{listeners:[e]}}),OT.forEach(n=>{let r="_onData"+sf(n),i=t[n];Object.defineProperty(t,n,{configurable:true,enumerable:false,value(...o){let s=i.apply(this,o);return t._chartjs.listeners.forEach(c=>{typeof c[r]=="function"&&c[r](...o);}),s}});});}function Bg(t,e){let n=t._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(e);i!==-1&&r.splice(i,1),!(r.length>0)&&(OT.forEach(o=>{delete t[o];}),delete t._chartjs);}function Ug(t){let e=new Set,n,r;for(n=0,r=t.length;n<r;++n)e.add(t[n]);return e.size===r?t:Array.from(e)}var $g=(function(){return typeof window=="undefined"?function(t){return t()}:window.requestAnimationFrame})();function Gg(t,e,n){let r=n||(s=>Array.prototype.slice.call(s)),i=false,o=[];return function(...s){o=r(s),i||(i=true,$g.call(window,()=>{i=false,t.apply(e,o);}));}}function C0(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}var uf=t=>t==="start"?"left":t==="end"?"right":"center",Lr=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,S0=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function jg(t,e,n){let r=e.length,i=0,o=r;if(t._sorted){let{iScale:s,_parsed:c}=t,p=s.axis,{min:h,max:v,minDefined:P,maxDefined:x}=s.getUserBounds();P&&(i=Nr(Math.min(es(c,s.axis,h).lo,n?r:es(e,p,s.getPixelForValue(h)).lo),0,r-1)),x?o=Nr(Math.max(es(c,s.axis,v,true).hi+1,n?0:es(e,p,s.getPixelForValue(v),true).hi+1),i,r)-i:o=r-i;}return {start:i,count:o}}function Vg(t){let{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,true;let o=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}var _g=t=>t===0||t===1,hT=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*rn/n)),mT=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*rn/n)+1,Cc={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*bn)+1,easeOutSine:t=>Math.sin(t*bn),easeInOutSine:t=>-0.5*(Math.cos(Be*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>_g(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>_g(t)?t:hT(t,.075,.3),easeOutElastic:t=>_g(t)?t:mT(t,.075,.3),easeInOutElastic(t){return _g(t)?t:t<.5?.5*hT(t*2,.1125,.45):.5+.5*mT(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return (t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return (t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Cc.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Cc.easeInBounce(t*2)*.5:Cc.easeOutBounce(t*2-1)*.5+.5};function df(t){return t+.5|0}var cl=(t,e,n)=>Math.max(Math.min(t,n),e);function nf(t){return cl(df(t*2.55),0,255)}function ul(t){return cl(df(t*255),0,255)}function Ja(t){return cl(df(t/2.55)/100,0,1)}function gT(t){return cl(df(t*100),0,100)}var ho={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},l0=[..."0123456789ABCDEF"],nB=t=>l0[t&15],rB=t=>l0[(t&240)>>4]+l0[t&15],Tg=t=>(t&240)>>4===(t&15),iB=t=>Tg(t.r)&&Tg(t.g)&&Tg(t.b)&&Tg(t.a);function oB(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&ho[t[1]]*17,g:255&ho[t[2]]*17,b:255&ho[t[3]]*17,a:e===5?ho[t[4]]*17:255}:(e===7||e===9)&&(n={r:ho[t[1]]<<4|ho[t[2]],g:ho[t[3]]<<4|ho[t[4]],b:ho[t[5]]<<4|ho[t[6]],a:e===9?ho[t[7]]<<4|ho[t[8]]:255})),n}var aB=(t,e)=>t<255?e(t):"";function sB(t){var e=iB(t)?nB:rB;return t?"#"+e(t.r)+e(t.g)+e(t.b)+aB(t.a,e):void 0}var lB=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function RT(t,e,n){let r=e*Math.min(n,1-n),i=(o,s=(o+t/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return [i(0),i(8),i(4)]}function cB(t,e,n){let r=(i,o=(i+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return [r(5),r(3),r(1)]}function uB(t,e,n){let r=RT(t,1,.5),i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function dB(t,e,n,r,i){return t===i?(e-n)/r+(e<n?6:0):e===i?(n-t)/r+2:(t-e)/r+4}function P0(t){let n=t.r/255,r=t.g/255,i=t.b/255,o=Math.max(n,r,i),s=Math.min(n,r,i),c=(o+s)/2,p,h,v;return o!==s&&(v=o-s,h=c>.5?v/(2-o-s):v/(o+s),p=dB(n,r,i,v,o),p=p*60+.5),[p|0,h||0,c]}function x0(t,e,n,r){return (Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(ul)}function E0(t,e,n){return x0(RT,t,e,n)}function pB(t,e,n){return x0(uB,t,e,n)}function fB(t,e,n){return x0(cB,t,e,n)}function FT(t){return (t%360+360)%360}function hB(t){let e=lB.exec(t),n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?nf(+e[5]):ul(+e[5]));let i=FT(+e[2]),o=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?r=pB(i,o,s):e[1]==="hsv"?r=fB(i,o,s):r=E0(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function mB(t,e){var n=P0(t);n[0]=FT(n[0]+e),n=E0(n),t.r=n[0],t.g=n[1],t.b=n[2];}function gB(t){if(!t)return;let e=P0(t),n=e[0],r=gT(e[1]),i=gT(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${Ja(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}var yT={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},bT={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function yB(){let t={},e=Object.keys(bT),n=Object.keys(yT),r,i,o,s,c;for(r=0;r<e.length;r++){for(s=c=e[r],i=0;i<n.length;i++)o=n[i],c=c.replace(o,yT[o]);o=parseInt(bT[s],16),t[c]=[o>>16&255,o>>8&255,o&255];}return t}var wg;function bB(t){wg||(wg=yB(),wg.transparent=[0,0,0,0]);let e=wg[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}var vB=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function CB(t){let e=vB.exec(t),n=255,r,i,o;if(e){if(e[7]!==r){let s=+e[7];n=e[8]?nf(s):cl(s*255,0,255);}return r=+e[1],i=+e[3],o=+e[5],r=255&(e[2]?nf(r):cl(r,0,255)),i=255&(e[4]?nf(i):cl(i,0,255)),o=255&(e[6]?nf(o):cl(o,0,255)),{r,g:i,b:o,a:n}}}function SB(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ja(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}var o0=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Ju=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function PB(t,e,n){let r=Ju(Ja(t.r)),i=Ju(Ja(t.g)),o=Ju(Ja(t.b));return {r:ul(o0(r+n*(Ju(Ja(e.r))-r))),g:ul(o0(i+n*(Ju(Ja(e.g))-i))),b:ul(o0(o+n*(Ju(Ja(e.b))-o))),a:t.a+n*(e.a-t.a)}}function Ig(t,e,n){if(t){let r=P0(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=E0(r),t.r=r[0],t.g=r[1],t.b=r[2];}}function MT(t,e){return t&&Object.assign(e||{},t)}function vT(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ul(t[3]))):(e=MT(t,{r:0,g:0,b:0,a:1}),e.a=ul(e.a)),e}function xB(t){return t.charAt(0)==="r"?CB(t):hB(t)}var c0=class t{constructor(e){if(e instanceof t)return e;let n=typeof e,r;n==="object"?r=vT(e):n==="string"&&(r=oB(e)||bB(e)||xB(e)),this._rgb=r,this._valid=!!r;}get valid(){return this._valid}get rgb(){var e=MT(this._rgb);return e&&(e.a=Ja(e.a)),e}set rgb(e){this._rgb=vT(e);}rgbString(){return this._valid?SB(this._rgb):void 0}hexString(){return this._valid?sB(this._rgb):void 0}hslString(){return this._valid?gB(this._rgb):void 0}mix(e,n){if(e){let r=this.rgb,i=e.rgb,o,s=n===o?.5:n,c=2*s-1,p=r.a-i.a,h=((c*p===-1?c:(c+p)/(1+c*p))+1)/2;o=1-h,r.r=255&h*r.r+o*i.r+.5,r.g=255&h*r.g+o*i.g+.5,r.b=255&h*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r;}return this}interpolate(e,n){return e&&(this._rgb=PB(this._rgb,e._rgb,n)),this}clone(){return new t(this.rgb)}alpha(e){return this._rgb.a=ul(e),this}clearer(e){let n=this._rgb;return n.a*=1-e,this}greyscale(){let e=this._rgb,n=df(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){let n=this._rgb;return n.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ig(this._rgb,2,e),this}darken(e){return Ig(this._rgb,2,-e),this}saturate(e){return Ig(this._rgb,1,e),this}desaturate(e){return Ig(this._rgb,1,-e),this}rotate(e){return mB(this._rgb,e),this}};function NT(t){return new c0(t)}function _0(t){if(t&&typeof t=="object"){let e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return false}function wc(t){return _0(t)?t:NT(t)}function Dg(t){return _0(t)?t:NT(t).saturate(.5).darken(.1).hexString()}var pl=Object.create(null),zg=Object.create(null);function rf(t,e){if(!e)return t;let n=e.split(".");for(let r=0,i=n.length;r<i;++r){let o=n[r];t=t[o]||(t[o]=Object.create(null));}return t}function a0(t,e,n){return typeof e=="string"?ji(rf(t,e),n):ji(rf(t,""),e)}var u0=class{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>Dg(r.backgroundColor),this.hoverBorderColor=(n,r)=>Dg(r.borderColor),this.hoverColor=(n,r)=>Dg(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:true,includeInvisible:false},this.maintainAspectRatio=true,this.onHover=null,this.onClick=null,this.parsing=true,this.plugins={},this.responsive=true,this.scale=void 0,this.scales={},this.showLine=true,this.drawActiveElementsOnTop=true,this.describe(e);}set(e,n){return a0(this,e,n)}get(e){return rf(this,e)}describe(e,n){return a0(zg,e,n)}override(e,n){return a0(pl,e,n)}route(e,n,r,i){let o=rf(this,e),s=rf(this,r),c="_"+n;Object.defineProperties(o,{[c]:{value:o[n],writable:true},[n]:{enumerable:true,get(){let p=this[c],h=s[i];return Te(p)?Object.assign({},h,p):me(p,h)},set(p){this[c]=p;}}});}},ke=new u0({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:false,_indexable:false}});function LT(t){return !t||Le(t.size)||Le(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function ed(t,e,n,r,i){let o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>r&&(r=o),r}function T0(t,e,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},o=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let s=0,c=n.length,p,h,v,P,x;for(p=0;p<c;p++)if(P=n[p],P!=null&&He(P)!==true)s=ed(t,i,o,s,P);else if(He(P))for(h=0,v=P.length;h<v;h++)x=P[h],x!=null&&!He(x)&&(s=ed(t,i,o,s,x));t.restore();let T=o.length/2;if(T>n.length){for(p=0;p<T;p++)delete i[o[p]];o.splice(0,T);}return s}function rs(t,e,n){let r=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function Hg(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore();}function pf(t,e,n,r){Wg(t,e,n,r,null);}function Wg(t,e,n,r,i){let o,s,c,p,h,v,P=e.pointStyle,x=e.rotation,T=e.radius,I=(x||0)*lf;if(P&&typeof P=="object"&&(o=P.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(I),t.drawImage(P,-P.width/2,-P.height/2,P.width,P.height),t.restore();return}if(!(isNaN(T)||T<=0)){switch(t.beginPath(),P){default:i?t.ellipse(n,r,i/2,T,0,0,rn):t.arc(n,r,T,0,rn),t.closePath();break;case "triangle":t.moveTo(n+Math.sin(I)*T,r-Math.cos(I)*T),I+=td,t.lineTo(n+Math.sin(I)*T,r-Math.cos(I)*T),I+=td,t.lineTo(n+Math.sin(I)*T,r-Math.cos(I)*T),t.closePath();break;case "rectRounded":h=T*.516,p=T-h,s=Math.cos(I+mo)*p,c=Math.sin(I+mo)*p,t.arc(n-s,r-c,h,I-Be,I-bn),t.arc(n+c,r-s,h,I-bn,I),t.arc(n+s,r+c,h,I,I+bn),t.arc(n-c,r+s,h,I+bn,I+Be),t.closePath();break;case "rect":if(!x){p=Math.SQRT1_2*T,v=i?i/2:p,t.rect(n-v,r-p,2*v,2*p);break}I+=mo;case "rectRot":s=Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+c,r-s),t.lineTo(n+s,r+c),t.lineTo(n-c,r+s),t.closePath();break;case "crossRot":I+=mo;case "cross":s=Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+s,r+c),t.moveTo(n+c,r-s),t.lineTo(n-c,r+s);break;case "star":s=Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+s,r+c),t.moveTo(n+c,r-s),t.lineTo(n-c,r+s),I+=mo,s=Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+s,r+c),t.moveTo(n+c,r-s),t.lineTo(n-c,r+s);break;case "line":s=i?i/2:Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+s,r+c);break;case "dash":t.moveTo(n,r),t.lineTo(n+Math.cos(I)*T,r+Math.sin(I)*T);break}t.fill(),e.borderWidth>0&&t.stroke();}}function Pc(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function fl(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip();}function hl(t){t.restore();}function w0(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){let o=(e.x+n.x)/2;t.lineTo(o,e.y),t.lineTo(o,n.y);}else i==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y);}function I0(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y);}function is(t,e,n,r,i,o={}){let s=He(e)?e:[e],c=o.strokeWidth>0&&o.strokeColor!=="",p,h;for(t.save(),t.font=i.string,EB(t,o),p=0;p<s.length;++p)h=s[p],c&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),Le(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,n,r,o.maxWidth)),t.fillText(h,n,r,o.maxWidth),_B(t,n,r,h,o),r+=i.lineHeight;t.restore();}function EB(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Le(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline);}function _B(t,e,n,r,i){if(i.strikethrough||i.underline){let o=t.measureText(r),s=e-o.actualBoundingBoxLeft,c=e+o.actualBoundingBoxRight,p=n-o.actualBoundingBoxAscent,h=n+o.actualBoundingBoxDescent,v=i.strikethrough?(p+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(s,v),t.lineTo(c,v),t.stroke();}}function os(t,e){let{x:n,y:r,w:i,h:o,radius:s}=e;t.arc(n+s.topLeft,r+s.topLeft,s.topLeft,-bn,Be,true),t.lineTo(n,r+o-s.bottomLeft),t.arc(n+s.bottomLeft,r+o-s.bottomLeft,s.bottomLeft,Be,bn,true),t.lineTo(n+i-s.bottomRight,r+o),t.arc(n+i-s.bottomRight,r+o-s.bottomRight,s.bottomRight,bn,0,true),t.lineTo(n+i,r+s.topRight),t.arc(n+i-s.topRight,r+s.topRight,s.topRight,0,-bn,true),t.lineTo(n+s.topLeft,r);}var TB=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),wB=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function BT(t,e){let n=(""+t).match(TB);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case "px":return t;case "%":t/=100;break}return e*t}var IB=t=>+t||0;function ff(t,e){let n={},r=Te(e),i=r?Object.keys(e):e,o=Te(t)?r?s=>me(t[s],t[e[s]]):s=>t[s]:()=>t;for(let s of i)n[s]=IB(o(s));return n}function qg(t){return ff(t,{top:"y",right:"x",bottom:"y",left:"x"})}function $o(t){return ff(t,["topLeft","topRight","bottomLeft","bottomRight"])}function $n(t){let e=qg(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Sn(t,e){t=t||{},e=e||ke.font;let n=me(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=me(t.style,e.style);r&&!(""+r).match(wB)&&(console.warn('Invalid font style specified: "'+r+'"'),r="");let i={family:me(t.family,e.family),lineHeight:BT(me(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:me(t.weight,e.weight),string:""};return i.string=LT(i),i}function In(t,e,n,r){let o,s,c;for(o=0,s=t.length;o<s;++o)if(c=t[o],c!==void 0&&(e!==void 0&&typeof c=="function"&&(c=c(e),false),n!==void 0&&He(c)&&(c=c[n%c.length],false),c!==void 0))return c}function k0(t,e,n){let{min:r,max:i}=t,o=Og(e,(i-r)/2),s=(c,p)=>n&&c===0?0:c+p;return {min:s(r,-Math.abs(o)),max:s(i,o)}}function ba(t,e){return Object.assign(Object.create(t),e)}function hf(t,e=[""],n=t,r,i=()=>t[0]){Fn(r)||(r=GT("_fallback",t));let o={[Symbol.toStringTag]:"Object",_cacheable:true,_scopes:t,_rootScopes:n,_fallback:r,_getTarget:i,override:s=>hf([s,...t],e,n,r)};return new Proxy(o,{deleteProperty(s,c){return delete s[c],delete s._keys,delete t[0][c],true},get(s,c){return UT(s,c,()=>NB(c,e,t,s))},getOwnPropertyDescriptor(s,c){return Reflect.getOwnPropertyDescriptor(s._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(s,c){return ST(s).includes(c)},ownKeys(s){return ST(s)},set(s,c,p){let h=s._storage||(s._storage=i());return s[c]=h[c]=p,delete s._keys,true}})}function dl(t,e,n,r){let i={_cacheable:false,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Yg(t,r),setContext:o=>dl(t,o,n,r),override:o=>dl(t.override(o),e,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete t[s],true},get(o,s,c){return UT(o,s,()=>DB(o,s,c))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(t,s)?{enumerable:true,configurable:true}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(o,s,c){return t[s]=c,delete o[s],true}})}function Yg(t,e={scriptable:true,indexable:true}){let{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return {allKeys:i,scriptable:n,indexable:r,isScriptable:Gr(n)?n:()=>n,isIndexable:Gr(r)?r:()=>r}}var kB=(t,e)=>t?t+sf(e):e,D0=(t,e)=>Te(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function UT(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];let r=n();return t[e]=r,r}function DB(t,e,n){let{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=t,c=r[e];return Gr(c)&&s.isScriptable(e)&&(c=AB(e,c,t,n)),He(c)&&c.length&&(c=OB(e,c,t,s.isIndexable)),D0(e,c)&&(c=dl(c,i,o&&o[e],s)),c}function AB(t,e,n,r){let{_proxy:i,_context:o,_subProxy:s,_stack:c}=n;if(c.has(t))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+t);return c.add(t),e=e(o,s||r),c.delete(t),D0(t,e)&&(e=A0(i._scopes,i,t,e)),e}function OB(t,e,n,r){let{_proxy:i,_context:o,_subProxy:s,_descriptors:c}=n;if(Fn(o.index)&&r(t))e=e[o.index%e.length];else if(Te(e[0])){let p=e,h=i._scopes.filter(v=>v!==p);e=[];for(let v of p){let P=A0(h,i,t,v);e.push(dl(P,o,s&&s[t],c));}}return e}function $T(t,e,n){return Gr(t)?t(e,n):t}var RB=(t,e)=>t===true?e:typeof t=="string"?ya(e,t):void 0;function FB(t,e,n,r,i){for(let o of e){let s=RB(n,o);if(s){t.add(s);let c=$T(s._fallback,n,i);if(Fn(c)&&c!==n&&c!==r)return c}else if(s===false&&Fn(r)&&n!==r)return null}return false}function A0(t,e,n,r){let i=e._rootScopes,o=$T(e._fallback,n,r),s=[...t,...i],c=new Set;c.add(r);let p=CT(c,s,n,o||n,r);return p===null||Fn(o)&&o!==n&&(p=CT(c,s,o,p,r),p===null)?false:hf(Array.from(c),[""],i,o,()=>MB(e,n,r))}function CT(t,e,n,r,i){for(;n;)n=FB(t,e,n,r,i);return n}function MB(t,e,n){let r=t._getTarget();e in r||(r[e]={});let i=r[e];return He(i)&&Te(n)?n:i}function NB(t,e,n,r){let i;for(let o of e)if(i=GT(kB(o,t),n),Fn(i))return D0(t,i)?A0(n,r,t,i):i}function GT(t,e){for(let n of e){if(!n)continue;let r=n[t];if(Fn(r))return r}}function ST(t){let e=t._keys;return e||(e=t._keys=LB(t._scopes)),e}function LB(t){let e=new Set;for(let n of t)for(let r of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(r);return Array.from(e)}function Qg(t,e,n,r){let{iScale:i}=t,{key:o="r"}=this._parsing,s=new Array(r),c,p,h,v;for(c=0,p=r;c<p;++c)h=c+n,v=e[h],s[c]={r:i.parse(ya(v,o),h)};return s}var BB=Number.EPSILON||1e-14,nd=(t,e)=>e<t.length&&!t[e].skip&&t[e],jT=t=>t==="x"?"y":"x";function VT(t,e,n,r){let i=t.skip?e:t,o=e,s=n.skip?e:n,c=ns(o,i),p=ns(s,o),h=c/(c+p),v=p/(c+p);h=isNaN(h)?0:h,v=isNaN(v)?0:v;let P=r*h,x=r*v;return {previous:{x:o.x-P*(s.x-i.x),y:o.y-P*(s.y-i.y)},next:{x:o.x+x*(s.x-i.x),y:o.y+x*(s.y-i.y)}}}function UB(t,e,n){let r=t.length,i,o,s,c,p,h=nd(t,0);for(let v=0;v<r-1;++v)if(p=h,h=nd(t,v+1),!(!p||!h)){if(Ec(e[v],0,BB)){n[v]=n[v+1]=0;continue}i=n[v]/e[v],o=n[v+1]/e[v],c=Math.pow(i,2)+Math.pow(o,2),!(c<=9)&&(s=3/Math.sqrt(c),n[v]=i*s*e[v],n[v+1]=o*s*e[v]);}}function $B(t,e,n="x"){let r=jT(n),i=t.length,o,s,c,p=nd(t,0);for(let h=0;h<i;++h){if(s=c,c=p,p=nd(t,h+1),!c)continue;let v=c[n],P=c[r];s&&(o=(v-s[n])/3,c[`cp1${n}`]=v-o,c[`cp1${r}`]=P-o*e[h]),p&&(o=(p[n]-v)/3,c[`cp2${n}`]=v+o,c[`cp2${r}`]=P+o*e[h]);}}function zT(t,e="x"){let n=jT(e),r=t.length,i=Array(r).fill(0),o=Array(r),s,c,p,h=nd(t,0);for(s=0;s<r;++s)if(c=p,p=h,h=nd(t,s+1),!!p){if(h){let v=h[e]-p[e];i[s]=v!==0?(h[n]-p[n])/v:0;}o[s]=c?h?go(i[s-1])!==go(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s];}UB(t,i,o),$B(t,o,e);}function kg(t,e,n){return Math.max(Math.min(t,n),e)}function GB(t,e){let n,r,i,o,s,c=Pc(t[0],e);for(n=0,r=t.length;n<r;++n)s=o,o=c,c=n<r-1&&Pc(t[n+1],e),o&&(i=t[n],s&&(i.cp1x=kg(i.cp1x,e.left,e.right),i.cp1y=kg(i.cp1y,e.top,e.bottom)),c&&(i.cp2x=kg(i.cp2x,e.left,e.right),i.cp2y=kg(i.cp2y,e.top,e.bottom)));}function O0(t,e,n,r,i){let o,s,c,p;if(e.spanGaps&&(t=t.filter(h=>!h.skip)),e.cubicInterpolationMode==="monotone")zT(t,i);else {let h=r?t[t.length-1]:t[0];for(o=0,s=t.length;o<s;++o)c=t[o],p=VT(h,c,t[Math.min(o+1,s-(r?0:1))%s],e.tension),c.cp1x=p.previous.x,c.cp1y=p.previous.y,c.cp2x=p.next.x,c.cp2y=p.next.y,h=c;}e.capBezierPoints&&GB(t,n);}function Kg(){return typeof window!="undefined"&&typeof document!="undefined"}function mf(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Ag(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}var Xg=t=>window.getComputedStyle(t,null);function HT(t,e){return Xg(t).getPropertyValue(e)}var jB=["top","right","bottom","left"];function Sc(t,e,n){let r={};n=n?"-"+n:"";for(let i=0;i<4;i++){let o=jB[i];r[o]=parseFloat(t[e+"-"+o+n])||0;}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var VB=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function zB(t,e){let n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:o}=r,s=false,c,p;if(VB(i,o,t.target))c=i,p=o;else {let h=e.getBoundingClientRect();c=r.clientX-h.left,p=r.clientY-h.top,s=true;}return {x:c,y:p,box:s}}function as(t,e){if("native"in t)return t;let{canvas:n,currentDevicePixelRatio:r}=e,i=Xg(n),o=i.boxSizing==="border-box",s=Sc(i,"padding"),c=Sc(i,"border","width"),{x:p,y:h,box:v}=zB(t,n),P=s.left+(v&&c.left),x=s.top+(v&&c.top),{width:T,height:I}=e;return o&&(T-=s.width+c.width,I-=s.height+c.height),{x:Math.round((p-P)/T*n.width/r),y:Math.round((h-x)/I*n.height/r)}}function HB(t,e,n){let r,i;if(e===void 0||n===void 0){let o=mf(t);if(!o)e=t.clientWidth,n=t.clientHeight;else {let s=o.getBoundingClientRect(),c=Xg(o),p=Sc(c,"border","width"),h=Sc(c,"padding");e=s.width-h.width-p.width,n=s.height-h.height-p.height,r=Ag(c.maxWidth,o,"clientWidth"),i=Ag(c.maxHeight,o,"clientHeight");}}return {width:e,height:n,maxWidth:r||af,maxHeight:i||af}}var s0=t=>Math.round(t*10)/10;function R0(t,e,n,r){let i=Xg(t),o=Sc(i,"margin"),s=Ag(i.maxWidth,t,"clientWidth")||af,c=Ag(i.maxHeight,t,"clientHeight")||af,p=HB(t,e,n),{width:h,height:v}=p;if(i.boxSizing==="content-box"){let P=Sc(i,"border","width"),x=Sc(i,"padding");h-=x.width+P.width,v-=x.height+P.height;}return h=Math.max(0,h-o.width),v=Math.max(0,r?Math.floor(h/r):v-o.height),h=s0(Math.min(h,s,p.maxWidth)),v=s0(Math.min(v,c,p.maxHeight)),h&&!v&&(v=s0(h/2)),{width:h,height:v}}function Zg(t,e,n){let r=e||1,i=Math.floor(t.height*r),o=Math.floor(t.width*r);t.height=i/r,t.width=o/r;let s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(t.currentDevicePixelRatio=r,s.height=i,s.width=o,t.ctx.setTransform(r,0,0,r,0,0),true):false}var F0=(function(){let t=false;try{let e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e);}catch(e){}return t})();function Jg(t,e){let n=HT(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ts(t,e,n,r){return {x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function M0(t,e,n,r){return {x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function N0(t,e,n,r){let i={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=ts(t,i,n),c=ts(i,o,n),p=ts(o,e,n),h=ts(s,c,n),v=ts(c,p,n);return ts(h,v,n)}var PT=new Map;function WB(t,e){e=e||{};let n=t+JSON.stringify(e),r=PT.get(n);return r||(r=new Intl.NumberFormat(t,e),PT.set(n,r)),r}function Ic(t,e,n){return WB(e,n).format(t)}var qB=function(t,e){return {x(n){return t+t+e-n},setWidth(n){e=n;},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},YB=function(){return {x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ml(t,e,n){return t?qB(e,n):YB()}function ty(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r);}function ey(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]));}function WT(t){return t==="angle"?{between:Tc,compare:AT,normalize:ai}:{between:Uo,compare:(e,n)=>e-n,normalize:e=>e}}function xT({start:t,end:e,count:n,loop:r,style:i}){return {start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:i}}function QB(t,e,n){let{property:r,start:i,end:o}=n,{between:s,normalize:c}=WT(r),p=e.length,{start:h,end:v,loop:P}=t,x,T;if(P){for(h+=p,v+=p,x=0,T=p;x<T&&s(c(e[h%p][r]),i,o);++x)h--,v--;h%=p,v%=p;}return v<h&&(v+=p),{start:h,end:v,loop:P,style:t.style}}function ny(t,e,n){if(!n)return [t];let{property:r,start:i,end:o}=n,s=e.length,{compare:c,between:p,normalize:h}=WT(r),{start:v,end:P,loop:x,style:T}=QB(t,e,n),I=[],R=false,A=null,O,N,V,G=()=>p(i,V,O)&&c(i,V)!==0,X=()=>c(o,O)===0||p(o,V,O),nt=()=>R||G(),st=()=>!R||X();for(let U=v,j=v;U<=P;++U)N=e[U%s],!N.skip&&(O=h(N[r]),O!==V&&(R=p(O,i,o),A===null&&nt()&&(A=c(O,i)===0?U:j),A!==null&&st()&&(I.push(xT({start:A,end:U,loop:x,count:s,style:T})),A=null),j=U,V=O));return A!==null&&I.push(xT({start:A,end:P,loop:x,count:s,style:T})),I}function ry(t,e){let n=[],r=t.segments;for(let i=0;i<r.length;i++){let o=ny(r[i],t.points,e);o.length&&n.push(...o);}return n}function KB(t,e,n,r){let i=0,o=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(o+=i);o>i&&t[o%e].skip;)o--;return o%=e,{start:i,end:o}}function XB(t,e,n,r){let i=t.length,o=[],s=e,c=t[e],p;for(p=e+1;p<=n;++p){let h=t[p%i];h.skip||h.stop?c.skip||(r=false,o.push({start:e%i,end:(p-1)%i,loop:r}),e=s=h.stop?p:null):(s=p,c.skip&&(e=p)),c=h;}return s!==null&&o.push({start:e%i,end:s%i,loop:r}),o}function L0(t,e){let n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return [];let o=!!t._loop,{start:s,end:c}=KB(n,i,o,r);if(r===true)return ET(t,[{start:s,end:c,loop:o}],n,e);let p=c<s?c+i:c,h=!!t._fullLoop&&s===0&&c===i-1;return ET(t,XB(n,s,p,h),n,e)}function ET(t,e,n,r){return !r||!r.setContext||!n?e:ZB(t,e,n,r)}function ZB(t,e,n,r){let i=t._chart.getContext(),o=_T(t.options),{_datasetIndex:s,options:{spanGaps:c}}=t,p=n.length,h=[],v=o,P=e[0].start,x=P;function T(I,R,A,O){let N=c?-1:1;if(I!==R){for(I+=p;n[I%p].skip;)I-=N;for(;n[R%p].skip;)R+=N;I%p!==R%p&&(h.push({start:I%p,end:R%p,loop:A,style:O}),v=O,P=R%p);}}for(let I of e){P=c?P:I.start;let R=n[P%p],A;for(x=P+1;x<=I.end;x++){let O=n[x%p];A=_T(r.setContext(ba(i,{type:"segment",p0:R,p1:O,p0DataIndex:(x-1)%p,p1DataIndex:x%p,datasetIndex:s}))),JB(A,v)&&T(P,x-1,I.loop,v),R=O,v=A;}P<x-1&&T(P,x-1,I.loop,v);}return h}function _T(t){return {backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function JB(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var q0=class{constructor(){this._request=null,this._charts=new Map,this._running=false,this._lastDate=void 0;}_notify(e,n,r,i){let o=n.listeners[i],s=n.duration;o.forEach(c=>c({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}));}_refresh(){this._request||(this._running=true,this._request=$g.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh();}));}_update(e=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;let o=r.items,s=o.length-1,c=false,p;for(;s>=0;--s)p=o[s],p._active?(p._total>r.duration&&(r.duration=p._total),p.tick(e),c=true):(o[s]=o[o.length-1],o.pop());c&&(i.draw(),this._notify(i,r,e,"progress")),o.length||(r.running=false,this._notify(i,r,e,"complete"),r.initial=false),n+=o.length;}),this._lastDate=e,n===0&&(this._running=false);}_getAnims(e){let n=this._charts,r=n.get(e);return r||(r={running:false,initial:true,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r);}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n);}has(e){return this._getAnims(e).items.length>0}start(e){let n=this._charts.get(e);n&&(n.running=true,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh());}running(e){if(!this._running)return false;let n=this._charts.get(e);return !(!n||!n.running||!n.items.length)}stop(e){let n=this._charts.get(e);if(!n||!n.items.length)return;let r=n.items,i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete");}remove(e){return this._charts.delete(e)}},ss=new q0,qT="transparent",t6={boolean(t,e,n){return n>.5?e:t},color(t,e,n){let r=wc(t||qT),i=r.valid&&wc(e||qT);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}},Y0=class{constructor(e,n,r,i){let o=n[r];i=In([e.to,i,o,e.from]);let s=In([e.from,o,i]);this._active=true,this._fn=e.fn||t6[e.type||typeof s],this._easing=Cc[e.easing]||Cc.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0;}active(){return this._active}update(e,n,r){if(this._active){this._notify(false);let i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=In([e.to,n,i,e.from]),this._from=In([e.from,i,n]);}}cancel(){this._active&&(this.tick(Date.now()),this._active=false,this._notify(false));}tick(e){let n=e-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,c=this._to,p;if(this._active=o!==c&&(s||n<r),!this._active){this._target[i]=c,this._notify(true);return}if(n<0){this._target[i]=o;return}p=n/r%2,p=s&&p>1?2-p:p,p=this._easing(Math.min(1,Math.max(0,p))),this._target[i]=this._fn(o,c,p);}wait(){let e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r});})}_notify(e){let n=e?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]();}},e6=["x","y","borderWidth","radius","tension"],n6=["color","borderColor","backgroundColor"];ke.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});var r6=Object.keys(ke.animation);ke.describe("animation",{_fallback:false,_indexable:false,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"});ke.set("animations",{colors:{type:"color",properties:n6},numbers:{type:"number",properties:e6}});ke.describe("animations",{_fallback:"animation"});ke.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}});var ad=class{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n);}configure(e){if(!Te(e))return;let n=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{let i=e[r];if(!Te(i))return;let o={};for(let s of r6)o[s]=i[s];(He(i.properties)&&i.properties||[r]).forEach(s=>{(s===r||!n.has(s))&&n.set(s,o);});});}_animateOptions(e,n){let r=n.options,i=o6(e,r);if(!i)return [];let o=this._createAnimations(i,r);return r.$shared&&i6(e.options.$animations,r).then(()=>{e.options=r;},()=>{}),o}_createAnimations(e,n){let r=this._properties,i=[],o=e.$animations||(e.$animations={}),s=Object.keys(n),c=Date.now(),p;for(p=s.length-1;p>=0;--p){let h=s[p];if(h.charAt(0)==="$")continue;if(h==="options"){i.push(...this._animateOptions(e,n));continue}let v=n[h],P=o[h],x=r.get(h);if(P)if(x&&P.active()){P.update(x,v,c);continue}else P.cancel();if(!x||!x.duration){e[h]=v;continue}o[h]=P=new Y0(x,e,h,v),i.push(P);}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}let r=this._createAnimations(e,n);if(r.length)return ss.add(this._chart,r),true}};function i6(t,e){let n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){let o=t[r[i]];o&&o.active()&&n.push(o.wait());}return Promise.all(n)}function o6(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:false,$animations:{}})),n}function YT(t,e){let n=t&&t.options||{},r=n.reverse,i=n.min===void 0?e:0,o=n.max===void 0?e:0;return {start:r?o:i,end:r?i:o}}function a6(t,e,n){if(n===false)return false;let r=YT(t,n),i=YT(e,n);return {top:i.end,right:r.end,bottom:i.start,left:r.start}}function s6(t){let e,n,r,i;return Te(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:t===false}}function Lw(t,e){let n=[],r=t._getSortedDatasetMetas(e),i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function QT(t,e,n,r={}){let i=t.keys,o=r.mode==="single",s,c,p,h;if(e!==null){for(s=0,c=i.length;s<c;++s){if(p=+i[s],p===n){if(r.all)continue;break}h=t.values[p],Mn(h)&&(o||e===0||go(e)===go(h))&&(e+=h);}return e}}function l6(t){let e=Object.keys(t),n=new Array(e.length),r,i,o;for(r=0,i=e.length;r<i;++r)o=e[r],n[r]={x:o,y:t[o]};return n}function KT(t,e){let n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function c6(t,e,n){return `${t.id}.${e.id}.${n.stack||n.type}`}function u6(t){let{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return {min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function d6(t,e,n){let r=t[e]||(t[e]={});return r[n]||(r[n]={})}function XT(t,e,n,r){for(let i of e.getMatchingVisibleMetas(r).reverse()){let o=t[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function ZT(t,e){let{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:c}=r,p=o.axis,h=s.axis,v=c6(o,s,r),P=e.length,x;for(let T=0;T<P;++T){let I=e[T],{[p]:R,[h]:A}=I,O=I._stacks||(I._stacks={});x=O[h]=d6(i,v,R),x[c]=A,x._top=XT(x,s,true,r.type),x._bottom=XT(x,s,false,r.type);}}function B0(t,e){let n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function p6(t,e){return ba(t,{active:false,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function f6(t,e,n){return ba(t,{active:false,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function gf(t,e){let n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(let i of e){let o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n];}}}var U0=t=>t==="reset"||t==="none",JT=(t,e)=>e?t:Object.assign({},t),h6=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Lw(n,true),values:null},zi=class{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=false,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=false,this.supportsDecimation=false,this.$context=void 0,this._syncList=[],this.initialize();}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=KT(e.vScale,e),this.addElements();}updateIndex(e){this.index!==e&&gf(this._cachedMeta),this.index=e;}linkScales(){let e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(P,x,T,I)=>P==="x"?x:P==="r"?I:T,o=n.xAxisID=me(r.xAxisID,B0(e,"x")),s=n.yAxisID=me(r.yAxisID,B0(e,"y")),c=n.rAxisID=me(r.rAxisID,B0(e,"r")),p=n.indexAxis,h=n.iAxisID=i(p,o,s,c),v=n.vAxisID=i(p,s,o,c);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(v);}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset");}_destroy(){let e=this._cachedMeta;this._data&&Bg(this._data,this),e._stacked&&gf(e);}_dataCheck(){let e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(Te(n))this._data=l6(n);else if(r!==n){if(r){Bg(r,this);let i=this._cachedMeta;gf(i),i._parsed=[];}n&&Object.isExtensible(n)&&v0(n,this),this._syncList=[],this._data=n;}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType);}buildOrUpdateElements(e){let n=this._cachedMeta,r=this.getDataset(),i=false;this._dataCheck();let o=n._stacked;n._stacked=KT(n.vScale,n),n.stack!==r.stack&&(i=true,gf(n),n.stack=r.stack),this._resyncElements(e),(i||o!==n._stacked)&&ZT(this,n._parsed);}configure(){let e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,true);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={};}parse(e,n){let{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,c=o.axis,p=e===0&&n===i.length?true:r._sorted,h=e>0&&r._parsed[e-1],v,P,x;if(this._parsing===false)r._parsed=i,r._sorted=true,x=i;else {He(i[e])?x=this.parseArrayData(r,i,e,n):Te(i[e])?x=this.parseObjectData(r,i,e,n):x=this.parsePrimitiveData(r,i,e,n);let T=()=>P[c]===null||h&&P[c]<h[c];for(v=0;v<n;++v)r._parsed[v+e]=P=x[v],p&&(T()&&(p=false),h=P);r._sorted=p;}s&&ZT(this,x);}parsePrimitiveData(e,n,r,i){let{iScale:o,vScale:s}=e,c=o.axis,p=s.axis,h=o.getLabels(),v=o===s,P=new Array(i),x,T,I;for(x=0,T=i;x<T;++x)I=x+r,P[x]={[c]:v||o.parse(h[I],I),[p]:s.parse(n[I],I)};return P}parseArrayData(e,n,r,i){let{xScale:o,yScale:s}=e,c=new Array(i),p,h,v,P;for(p=0,h=i;p<h;++p)v=p+r,P=n[v],c[p]={x:o.parse(P[0],v),y:s.parse(P[1],v)};return c}parseObjectData(e,n,r,i){let{xScale:o,yScale:s}=e,{xAxisKey:c="x",yAxisKey:p="y"}=this._parsing,h=new Array(i),v,P,x,T;for(v=0,P=i;v<P;++v)x=v+r,T=n[x],h[v]={x:o.parse(ya(T,c),x),y:s.parse(ya(T,p),x)};return h}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){let i=this.chart,o=this._cachedMeta,s=n[e.axis],c={keys:Lw(i,true),values:n._stacks[e.axis]};return QT(c,s,o.index,{mode:r})}updateRangeFromParsed(e,n,r,i){let o=r[n.axis],s=o===null?NaN:o,c=i&&r._stacks[n.axis];i&&c&&(i.values=c,s=QT(i,o,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s);}getMinMax(e,n){let r=this._cachedMeta,i=r._parsed,o=r._sorted&&e===r.iScale,s=i.length,c=this._getOtherScale(e),p=h6(n,r,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:v,max:P}=u6(c),x,T;function I(){T=i[x];let R=T[c.axis];return !Mn(T[e.axis])||v>R||P<R}for(x=0;x<s&&!(!I()&&(this.updateRangeFromParsed(h,e,T,p),o));++x);if(o){for(x=s-1;x>=0;--x)if(!I()){this.updateRangeFromParsed(h,e,T,p);break}}return h}getAllParsedValues(e){let n=this._cachedMeta._parsed,r=[],i,o,s;for(i=0,o=n.length;i<o;++i)s=n[i][e.axis],Mn(s)&&r.push(s);return r}getMaxOverflow(){return false}getLabelAndValue(e){let n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(e);return {label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(e){let n=this._cachedMeta;this.update(e||"default"),n._clip=s6(me(this.options.clip,a6(n.xScale,n.yScale,this.getMaxOverflow())));}update(e){}draw(){let e=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,s=[],c=this._drawStart||0,p=this._drawCount||i.length-c,h=this.options.drawActiveElementsOnTop,v;for(r.dataset&&r.dataset.draw(e,o,c,p),v=c;v<c+p;++v){let P=i[v];P.hidden||(P.active&&h?s.push(P):P.draw(e,o));}for(v=0;v<s.length;++v)s[v].draw(e,o);}getStyle(e,n){let r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){let i=this.getDataset(),o;if(e>=0&&e<this._cachedMeta.data.length){let s=this._cachedMeta.data[e];o=s.$context||(s.$context=f6(this.getContext(),e,s)),o.parsed=this.getParsed(e),o.raw=i.data[e],o.index=o.dataIndex=e;}else o=this.$context||(this.$context=p6(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){let i=n==="active",o=this._cachedDataOpts,s=e+"-"+n,c=o[s],p=this.enableOptionSharing&&Fn(r);if(c)return JT(c,p);let h=this.chart.config,v=h.datasetElementScopeKeys(this._type,e),P=i?[`${e}Hover`,"hover",e,""]:[e,""],x=h.getOptionScopes(this.getDataset(),v),T=Object.keys(ke.elements[e]),I=()=>this.getContext(r,i),R=h.resolveNamedOptions(x,T,I,P);return R.$shared&&(R.$shared=p,o[s]=Object.freeze(JT(R,p))),R}_resolveAnimations(e,n,r){let i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,c=o[s];if(c)return c;let p;if(i.options.animation!==false){let v=this.chart.config,P=v.datasetAnimationScopeKeys(this._type,n),x=v.getOptionScopes(this.getDataset(),P);p=v.createResolver(x,this.getContext(e,r,n));}let h=new ad(i,p&&p.animations);return p&&p._cacheable&&(o[s]=Object.freeze(h)),h}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return !n||U0(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){let r=this.resolveDataElementOptions(e,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(e,n,r,i){U0(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r);}updateSharedOptions(e,n,r){e&&!U0(n)&&this._resolveAnimations(void 0,n).update(e,r);}_setStyle(e,n,r,i){e.active=i;let o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(o)||o});}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",false);}setHoverStyle(e,n,r){this._setStyle(e,r,"active",true);}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",false);}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",true);}_resyncElements(e){let n=this._data,r=this._cachedMeta.data;for(let[c,p,h]of this._syncList)this[c](p,h);this._syncList=[];let i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,e):o<i&&this._removeElements(o,i-o);}_insertElements(e,n,r=true){let i=this._cachedMeta,o=i.data,s=e+n,c,p=h=>{for(h.length+=n,c=h.length-1;c>=s;c--)h[c]=h[c-n];};for(p(o),c=e;c<s;++c)o[c]=new this.dataElementType;this._parsing&&p(i._parsed),this.parse(e,n),r&&this.updateElements(o,e,n,"reset");}updateElements(e,n,r,i){}_removeElements(e,n){let r=this._cachedMeta;if(this._parsing){let i=r._parsed.splice(e,n);r._stacked&&gf(r,i);}r.data.splice(e,n);}_sync(e){if(this._parsing)this._syncList.push(e);else {let[n,r,i]=e;this[n](r,i);}this.chart._dataChanges.push([this.index,...e]);}_onDataPush(){let e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e]);}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1]);}_onDataShift(){this._sync(["_removeElements",0,1]);}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);let r=arguments.length-2;r&&this._sync(["_insertElements",e,r]);}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length]);}};zi.defaults={};zi.prototype.datasetElementType=null;zi.prototype.dataElementType=null;function m6(t,e){if(!t._cache.$bar){let n=t.getMatchingVisibleMetas(e),r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=Ug(r.sort((i,o)=>i-o));}return t._cache.$bar}function g6(t){let e=t.iScale,n=m6(e,t.type),r=e._length,i,o,s,c,p=()=>{s===32767||s===-32768||(Fn(c)&&(r=Math.min(r,Math.abs(s-c)||r)),c=s);};for(i=0,o=n.length;i<o;++i)s=e.getPixelForValue(n[i]),p();for(c=void 0,i=0,o=e.ticks.length;i<o;++i)s=e.getPixelForTick(i),p();return r}function y6(t,e,n,r){let i=n.barThickness,o,s;return Le(i)?(o=e.min*n.categoryPercentage,s=n.barPercentage):(o=i*r,s=1),{chunk:o/r,ratio:s,start:e.pixels[t]-o/2}}function b6(t,e,n,r){let i=e.pixels,o=i[t],s=t>0?i[t-1]:null,c=t<i.length-1?i[t+1]:null,p=n.categoryPercentage;s===null&&(s=o-(c===null?e.end-e.start:c-o)),c===null&&(c=o+o-s);let h=o-(o-Math.min(s,c))/2*p;return {chunk:Math.abs(c-s)/2*p/r,ratio:n.barPercentage,start:h}}function v6(t,e,n,r){let i=n.parse(t[0],r),o=n.parse(t[1],r),s=Math.min(i,o),c=Math.max(i,o),p=s,h=c;Math.abs(s)>Math.abs(c)&&(p=c,h=s),e[n.axis]=h,e._custom={barStart:p,barEnd:h,start:i,end:o,min:s,max:c};}function Bw(t,e,n,r){return He(t)?v6(t,e,n,r):e[n.axis]=n.parse(t,r),e}function tw(t,e,n,r){let i=t.iScale,o=t.vScale,s=i.getLabels(),c=i===o,p=[],h,v,P,x;for(h=n,v=n+r;h<v;++h)x=e[h],P={},P[i.axis]=c||i.parse(s[h],h),p.push(Bw(x,P,o,h));return p}function $0(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function C6(t,e,n){return t!==0?go(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function S6(t){let e,n,r,i,o;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:e,top:i,bottom:o}}function P6(t,e,n,r){let i=e.borderSkipped,o={};if(!i){t.borderSkipped=o;return}if(i===true){t.borderSkipped={top:true,right:true,bottom:true,left:true};return}let{start:s,end:c,reverse:p,top:h,bottom:v}=S6(t);i==="middle"&&n&&(t.enableBorderRadius=true,(n._top||0)===r?i=h:(n._bottom||0)===r?i=v:(o[ew(v,s,c,p)]=true,i=h)),o[ew(i,s,c,p)]=true,t.borderSkipped=o;}function ew(t,e,n,r){return r?(t=x6(t,e,n),t=nw(t,n,e)):t=nw(t,e,n),t}function x6(t,e,n){return t===e?n:t===n?e:t}function nw(t,e,n){return t==="start"?e:t==="end"?n:t}function E6(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e;}var xf=class extends zi{parsePrimitiveData(e,n,r,i){return tw(e,n,r,i)}parseArrayData(e,n,r,i){return tw(e,n,r,i)}parseObjectData(e,n,r,i){let{iScale:o,vScale:s}=e,{xAxisKey:c="x",yAxisKey:p="y"}=this._parsing,h=o.axis==="x"?c:p,v=s.axis==="x"?c:p,P=[],x,T,I,R;for(x=r,T=r+i;x<T;++x)R=n[x],I={},I[o.axis]=o.parse(ya(R,h),x),P.push(Bw(ya(R,v),I,s,x));return P}updateRangeFromParsed(e,n,r,i){super.updateRangeFromParsed(e,n,r,i);let o=r._custom;o&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max));}getMaxOverflow(){return 0}getLabelAndValue(e){let n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(e),s=o._custom,c=$0(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(o[i.axis]);return {label:""+r.getLabelForValue(o[r.axis]),value:c}}initialize(){this.enableOptionSharing=true,super.initialize();let e=this._cachedMeta;e.stack=this.getDataset().stack;}update(e){let n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e);}updateElements(e,n,r,i){let o=i==="reset",{index:s,_cachedMeta:{vScale:c}}=this,p=c.getBasePixel(),h=c.isHorizontal(),v=this._getRuler(),{sharedOptions:P,includeOptions:x}=this._getSharedOptions(n,i);for(let T=n;T<n+r;T++){let I=this.getParsed(T),R=o||Le(I[c.axis])?{base:p,head:p}:this._calculateBarValuePixels(T),A=this._calculateBarIndexPixels(T,v),O=(I._stacks||{})[c.axis],N={horizontal:h,base:R.base,enableBorderRadius:!O||$0(I._custom)||s===O._top||s===O._bottom,x:h?R.head:A.center,y:h?A.center:R.head,height:h?A.size:Math.abs(R.size),width:h?Math.abs(R.size):A.size};x&&(N.options=P||this.resolveDataElementOptions(T,e[T].active?"active":i));let V=N.options||e[T].options;P6(N,V,O,s),E6(N,V,v.ratio),this.updateElement(e[T],T,N,i);}}_getStacks(e,n){let{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(p=>p.controller.options.grouped),o=r.options.stacked,s=[],c=p=>{let h=p.controller.getParsed(n),v=h&&h[p.vScale.axis];if(Le(v)||isNaN(v))return true};for(let p of i)if(!(n!==void 0&&c(p))&&((o===false||s.indexOf(p.stack)===-1||o===void 0&&p.stack===void 0)&&s.push(p.stack),p.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,r){let i=this._getStacks(e,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){let e=this.options,n=this._cachedMeta,r=n.iScale,i=[],o,s;for(o=0,s=n.data.length;o<s;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));let c=e.barThickness;return {min:c||g6(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){let{_cachedMeta:{vScale:n,_stacked:r},options:{base:i,minBarLength:o}}=this,s=i||0,c=this.getParsed(e),p=c._custom,h=$0(p),v=c[n.axis],P=0,x=r?this.applyStack(n,c,r):v,T,I;x!==v&&(P=x-v,x=v),h&&(v=p.barStart,x=p.barEnd-p.barStart,v!==0&&go(v)!==go(p.barEnd)&&(P=0),P+=v);let R=!Le(i)&&!h?i:P,A=n.getPixelForValue(R);if(this.chart.getDataVisibility(e)?T=n.getPixelForValue(P+x):T=A,I=T-A,Math.abs(I)<o){I=C6(I,n,s)*o,v===s&&(A-=I/2);let O=n.getPixelForDecimal(0),N=n.getPixelForDecimal(1),V=Math.min(O,N),G=Math.max(O,N);A=Math.max(Math.min(A,G),V),T=A+I;}if(A===n.getPixelForValue(s)){let O=go(I)*n.getLineWidthForValue(s)/2;A+=O,I-=O;}return {size:I,base:A,head:T,center:T+I/2}}_calculateBarIndexPixels(e,n){let r=n.scale,i=this.options,o=i.skipNull,s=me(i.maxBarThickness,1/0),c,p;if(n.grouped){let h=o?this._getStackCount(e):n.stackCount,v=i.barThickness==="flex"?b6(e,n,i,h):y6(e,n,i,h),P=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);c=v.start+v.chunk*P+v.chunk/2,p=Math.min(s,v.chunk*v.ratio);}else c=r.getPixelForValue(this.getParsed(e)[r.axis],e),p=Math.min(s,n.min*n.ratio);return {base:c-p/2,head:c+p/2,center:c,size:p}}draw(){let e=this._cachedMeta,n=e.vScale,r=e.data,i=r.length,o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&r[o].draw(this._ctx);}};xf.id="bar";xf.defaults={datasetElementType:false,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:true,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};xf.overrides={scales:{_index_:{type:"category",offset:true,grid:{offset:true}},_value_:{type:"linear",beginAtZero:true}}};var Ef=class extends zi{initialize(){this.enableOptionSharing=true,super.initialize();}parsePrimitiveData(e,n,r,i){let o=super.parsePrimitiveData(e,n,r,i);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+r).radius;return o}parseArrayData(e,n,r,i){let o=super.parseArrayData(e,n,r,i);for(let s=0;s<o.length;s++){let c=n[r+s];o[s]._custom=me(c[2],this.resolveDataElementOptions(s+r).radius);}return o}parseObjectData(e,n,r,i){let o=super.parseObjectData(e,n,r,i);for(let s=0;s<o.length;s++){let c=n[r+s];o[s]._custom=me(c&&c.r&&+c.r,this.resolveDataElementOptions(s+r).radius);}return o}getMaxOverflow(){let e=this._cachedMeta.data,n=0;for(let r=e.length-1;r>=0;--r)n=Math.max(n,e[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(e){let n=this._cachedMeta,{xScale:r,yScale:i}=n,o=this.getParsed(e),s=r.getLabelForValue(o.x),c=i.getLabelForValue(o.y),p=o._custom;return {label:n.label,value:"("+s+", "+c+(p?", "+p:"")+")"}}update(e){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,e);}updateElements(e,n,r,i){let o=i==="reset",{iScale:s,vScale:c}=this._cachedMeta,{sharedOptions:p,includeOptions:h}=this._getSharedOptions(n,i),v=s.axis,P=c.axis;for(let x=n;x<n+r;x++){let T=e[x],I=!o&&this.getParsed(x),R={},A=R[v]=o?s.getPixelForDecimal(.5):s.getPixelForValue(I[v]),O=R[P]=o?c.getBasePixel():c.getPixelForValue(I[P]);R.skip=isNaN(A)||isNaN(O),h&&(R.options=p||this.resolveDataElementOptions(x,T.active?"active":i),o&&(R.options.radius=0)),this.updateElement(T,x,R,i);}}resolveDataElementOptions(e,n){let r=this.getParsed(e),i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:false}));let o=i.radius;return n!=="active"&&(i.radius=0),i.radius+=me(r&&r._custom,o),i}};Ef.id="bubble";Ef.defaults={datasetElementType:false,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};Ef.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return ""}}}}};function _6(t,e,n){let r=1,i=1,o=0,s=0;if(e<rn){let c=t,p=c+e,h=Math.cos(c),v=Math.sin(c),P=Math.cos(p),x=Math.sin(p),T=(V,G,X)=>Tc(V,c,p,true)?1:Math.max(G,G*n,X,X*n),I=(V,G,X)=>Tc(V,c,p,true)?-1:Math.min(G,G*n,X,X*n),R=T(0,h,P),A=T(bn,v,x),O=I(Be,h,P),N=I(Be+bn,v,x);r=(R-O)/2,i=(A-N)/2,o=-(R+O)/2,s=-(A+N)/2;}return {ratioX:r,ratioY:i,offsetX:o,offsetY:s}}var Dc=class extends zi{constructor(e,n){super(e,n),this.enableOptionSharing=true,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0;}linkScales(){}parse(e,n){let r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===false)i._parsed=r;else {let o=p=>+r[p];if(Te(r[e])){let{key:p="value"}=this._parsing;o=h=>+ya(r[h],p);}let s,c;for(s=e,c=e+n;s<c;++s)i._parsed[s]=o(s);}}_getRotation(){return Qn(this.options.rotation-90)}_getCircumference(){return Qn(this.options.circumference)}_getRotationExtents(){let e=rn,n=-rn;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)){let i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),s=i._getCircumference();e=Math.min(e,o),n=Math.max(n,o+s);}return {rotation:e,circumference:n-e}}update(e){let n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,c=Math.max((Math.min(r.width,r.height)-s)/2,0),p=Math.min(p0(this.options.cutout,c),1),h=this._getRingWeight(this.index),{circumference:v,rotation:P}=this._getRotationExtents(),{ratioX:x,ratioY:T,offsetX:I,offsetY:R}=_6(P,v,p),A=(r.width-s)/x,O=(r.height-s)/T,N=Math.max(Math.min(A,O)/2,0),V=Og(this.options.radius,N),G=Math.max(V*p,0),X=(V-G)/this._getVisibleDatasetWeightTotal();this.offsetX=I*V,this.offsetY=R*V,i.total=this.calculateTotal(),this.outerRadius=V-X*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-X*h,0),this.updateElements(o,0,o.length,e);}_circumference(e,n){let r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*o/rn)}updateElements(e,n,r,i){let o=i==="reset",s=this.chart,c=s.chartArea,h=s.options.animation,v=(c.left+c.right)/2,P=(c.top+c.bottom)/2,x=o&&h.animateScale,T=x?0:this.innerRadius,I=x?0:this.outerRadius,{sharedOptions:R,includeOptions:A}=this._getSharedOptions(n,i),O=this._getRotation(),N;for(N=0;N<n;++N)O+=this._circumference(N,o);for(N=n;N<n+r;++N){let V=this._circumference(N,o),G=e[N],X={x:v+this.offsetX,y:P+this.offsetY,startAngle:O,endAngle:O+V,circumference:V,outerRadius:I,innerRadius:T};A&&(X.options=R||this.resolveDataElementOptions(N,G.active?"active":i)),O+=V,this.updateElement(G,N,X,i);}}calculateTotal(){let e=this._cachedMeta,n=e.data,r=0,i;for(i=0;i<n.length;i++){let o=e._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o));}return r}calculateCircumference(e){let n=this._cachedMeta.total;return n>0&&!isNaN(e)?rn*(Math.abs(e)/n):0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ic(n._parsed[e],r.options.locale);return {label:i[e]||"",value:o}}getMaxBorderWidth(e){let n=0,r=this.chart,i,o,s,c,p;if(!e){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){s=r.getDatasetMeta(i),e=s.data,c=s.controller;break}}if(!e)return 0;for(i=0,o=e.length;i<o;++i)p=c.resolveDataElementOptions(i),p.borderAlign!=="inner"&&(n=Math.max(n,p.borderWidth||0,p.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,i=e.length;r<i;++r){let o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0);}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(me(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}};Dc.id="doughnut";Dc.defaults={datasetElementType:false,dataElementType:"arc",animation:{animateRotate:true,animateScale:false},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};Dc.descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"};Dc.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:n}}=t.legend.options;return e.labels.map((r,i)=>{let s=t.getDatasetMeta(0).controller.getStyle(i);return {text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}})}return []}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update();}},tooltip:{callbacks:{title(){return ""},label(t){let e=t.label,n=": "+t.formattedValue;return He(e)?(e=e.slice(),e[0]+=n):e+=n,e}}}}};var _f=class extends zi{initialize(){this.enableOptionSharing=true,this.supportsDecimation=true,super.initialize();}update(e){let n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled,{start:c,count:p}=jg(n,i,s);this._drawStart=c,this._drawCount=p,Vg(n)&&(c=0,p=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;let h=this.resolveDatasetElementOptions(e);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:h},e),this.updateElements(i,c,p,e);}updateElements(e,n,r,i){let o=i==="reset",{iScale:s,vScale:c,_stacked:p,_dataset:h}=this._cachedMeta,{sharedOptions:v,includeOptions:P}=this._getSharedOptions(n,i),x=s.axis,T=c.axis,{spanGaps:I,segment:R}=this.options,A=Vi(I)?I:Number.POSITIVE_INFINITY,O=this.chart._animationsDisabled||o||i==="none",N=n>0&&this.getParsed(n-1);for(let V=n;V<n+r;++V){let G=e[V],X=this.getParsed(V),nt=O?G:{},st=Le(X[T]),U=nt[x]=s.getPixelForValue(X[x],V),j=nt[T]=o||st?c.getBasePixel():c.getPixelForValue(p?this.applyStack(c,X,p):X[T],V);nt.skip=isNaN(U)||isNaN(j)||st,nt.stop=V>0&&Math.abs(X[x]-N[x])>A,R&&(nt.parsed=X,nt.raw=h.data[V]),P&&(nt.options=v||this.resolveDataElementOptions(V,G.active?"active":i)),O||this.updateElement(G,V,nt,i),N=X;}}getMaxOverflow(){let e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return r;let o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw();}};_f.id="line";_f.defaults={datasetElementType:"line",dataElementType:"point",showLine:true,spanGaps:false};_f.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var Tf=class extends zi{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0;}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ic(n._parsed[e].r,r.options.locale);return {label:i[e]||"",value:o}}parseObjectData(e,n,r,i){return Qg.bind(this)(e,n,r,i)}update(e){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e);}getMinMax(){let e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,i)=>{let o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o));}),n}_updateRadius(){let e=this.chart,n=e.chartArea,r=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),c=(o-s)/e.getVisibleDatasetCount();this.outerRadius=o-c*this.index,this.innerRadius=this.outerRadius-c;}updateElements(e,n,r,i){let o=i==="reset",s=this.chart,p=s.options.animation,h=this._cachedMeta.rScale,v=h.xCenter,P=h.yCenter,x=h.getIndexAngle(0)-.5*Be,T=x,I,R=360/this.countVisibleElements();for(I=0;I<n;++I)T+=this._computeAngle(I,i,R);for(I=n;I<n+r;I++){let A=e[I],O=T,N=T+this._computeAngle(I,i,R),V=s.getDataVisibility(I)?h.getDistanceFromCenterForValue(this.getParsed(I).r):0;T=N,o&&(p.animateScale&&(V=0),p.animateRotate&&(O=N=x));let G={x:v,y:P,innerRadius:0,outerRadius:V,startAngle:O,endAngle:N,options:this.resolveDataElementOptions(I,A.active?"active":i)};this.updateElement(A,I,G,i);}}countVisibleElements(){let e=this._cachedMeta,n=0;return e.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++;}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?Qn(this.resolveDataElementOptions(e,n).angle||r):0}};Tf.id="polarArea";Tf.defaults={dataElementType:"arc",animation:{animateRotate:true,animateScale:true},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Tf.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:n}}=t.legend.options;return e.labels.map((r,i)=>{let s=t.getDatasetMeta(0).controller.getStyle(i);return {text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}})}return []}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update();}},tooltip:{callbacks:{title(){return ""},label(t){return t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:false},beginAtZero:true,grid:{circular:true},pointLabels:{display:false},startAngle:0}}};var uy=class extends Dc{};uy.id="pie";uy.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};var wf=class extends zi{getLabelAndValue(e){let n=this._cachedMeta.vScale,r=this.getParsed(e);return {label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,i){return Qg.bind(this)(e,n,r,i)}update(e){let n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,e!=="resize"){let s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0);let c={_loop:true,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,c,e);}this.updateElements(i,0,i.length,e);}updateElements(e,n,r,i){let o=this._cachedMeta.rScale,s=i==="reset";for(let c=n;c<n+r;c++){let p=e[c],h=this.resolveDataElementOptions(c,p.active?"active":i),v=o.getPointPositionForValue(c,this.getParsed(c).r),P=s?o.xCenter:v.x,x=s?o.yCenter:v.y,T={x:P,y:x,angle:v.angle,skip:isNaN(P)||isNaN(x),options:h};this.updateElement(p,c,T,i);}}};wf.id="radar";wf.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:true,elements:{line:{fill:"start"}}};wf.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};var br=class{constructor(){this.x=void 0,this.y=void 0,this.active=false,this.options=void 0,this.$animations=void 0;}tooltipPosition(e){let{x:n,y:r}=this.getProps(["x","y"],e);return {x:n,y:r}}hasValue(){return Vi(this.x)&&Vi(this.y)}getProps(e,n){let r=this.$animations;if(!n||!r)return this;let i={};return e.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o];}),i}};br.defaults={};br.defaultRoutes=void 0;var Uw={values(t){return He(t)?t:""+t},numeric(t,e,n){if(t===0)return "0";let r=this.chart.options.locale,i,o=t;if(n.length>1){let h=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(h<1e-4||h>1e15)&&(i="scientific"),o=T6(t,n);}let s=Ei(Math.abs(o)),c=Math.max(Math.min(-1*Math.floor(s),20),0),p={notation:i,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(p,this.options.ticks.format),Ic(t,r,p)},logarithmic(t,e,n){if(t===0)return "0";let r=t/Math.pow(10,Math.floor(Ei(t)));return r===1||r===2||r===5?Uw.numeric.call(this,t,e,n):""}};function T6(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var vy={formatters:Uw};ke.set("scale",{display:true,offset:false,reverse:false,beginAtZero:false,bounds:"ticks",grace:0,grid:{display:true,lineWidth:1,drawBorder:true,drawOnChartArea:true,drawTicks:true,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:false,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:false,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:false,textStrokeWidth:0,textStrokeColor:"",padding:3,display:true,autoSkip:true,autoSkipPadding:3,labelOffset:0,callback:vy.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:false,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});ke.route("scale.ticks","color","","color");ke.route("scale.grid","color","","borderColor");ke.route("scale.grid","borderColor","","borderColor");ke.route("scale.title","color","","color");ke.describe("scale",{_fallback:false,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"});ke.describe("scales",{_fallback:"scale"});ke.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"});function w6(t,e){let n=t.options.ticks,r=n.maxTicksLimit||I6(t),i=n.major.enabled?D6(e):[],o=i.length,s=i[0],c=i[o-1],p=[];if(o>r)return A6(e,p,i,o/r),p;let h=k6(i,e,r);if(o>0){let v,P,x=o>1?Math.round((c-s)/(o-1)):null;for(iy(e,p,h,Le(x)?0:s-x,s),v=0,P=o-1;v<P;v++)iy(e,p,h,i[v],i[v+1]);return iy(e,p,h,c,Le(x)?e.length:c+x),p}return iy(e,p,h),p}function I6(t){let e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}function k6(t,e,n){let r=O6(t),i=e.length/n;if(!r)return Math.max(i,1);let o=h0(r);for(let s=0,c=o.length-1;s<c;s++){let p=o[s];if(p>i)return p}return Math.max(i,1)}function D6(t){let e=[],n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function A6(t,e,n,r){let i=0,o=n[0],s;for(r=Math.ceil(r),s=0;s<t.length;s++)s===o&&(e.push(t[s]),i++,o=n[i*r]);}function iy(t,e,n,r,i){let o=me(r,0),s=Math.min(me(i,t.length),t.length),c=0,p,h,v;for(n=Math.ceil(n),i&&(p=i-r,n=p/Math.floor(p/n)),v=o;v<0;)c++,v=Math.round(o+c*n);for(h=Math.max(o,0);h<s;h++)h===v&&(e.push(t[h]),c++,v=Math.round(o+c*n));}function O6(t){let e=t.length,n,r;if(e<2)return false;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return false;return r}var R6=t=>t==="left"?"right":t==="right"?"left":t,rw=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n;function iw(t,e){let n=[],r=t.length/e,i=t.length,o=0;for(;o<i;o+=r)n.push(t[Math.floor(o)]);return n}function F6(t,e,n){let r=t.ticks.length,i=Math.min(e,r-1),o=t._startPixel,s=t._endPixel,c=1e-6,p=t.getPixelForTick(i),h;if(!(n&&(r===1?h=Math.max(p-o,s-p):e===0?h=(t.getPixelForTick(1)-p)/2:h=(p-t.getPixelForTick(i-1))/2,p+=i<e?h:-h,p<o-c||p>s+c)))return p}function M6(t,e){tn(t,n=>{let r=n.gc,i=r.length/2,o;if(i>e){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i);}});}function yf(t){return t.drawTicks?t.tickLength:0}function ow(t,e){if(!t.display)return 0;let n=Sn(t.font,e),r=$n(t.padding);return (He(t.text)?t.text.length:1)*n.lineHeight+r.height}function N6(t,e){return ba(t,{scale:e,type:"scale"})}function L6(t,e,n){return ba(t,{tick:n,index:e,type:"tick"})}function B6(t,e,n){let r=uf(t);return (n&&e!=="right"||!n&&e==="right")&&(r=R6(r)),r}function U6(t,e,n,r){let{top:i,left:o,bottom:s,right:c,chart:p}=t,{chartArea:h,scales:v}=p,P=0,x,T,I,R=s-i,A=c-o;if(t.isHorizontal()){if(T=Lr(r,o,c),Te(n)){let O=Object.keys(n)[0],N=n[O];I=v[O].getPixelForValue(N)+R-e;}else n==="center"?I=(h.bottom+h.top)/2+R-e:I=rw(t,n,e);x=c-o;}else {if(Te(n)){let O=Object.keys(n)[0],N=n[O];T=v[O].getPixelForValue(N)-A+e;}else n==="center"?T=(h.left+h.right)/2-A+e:T=rw(t,n,e);I=Lr(r,s,i),P=n==="left"?-bn:bn;}return {titleX:T,titleY:I,maxWidth:x,rotation:P}}var Ac=class t extends br{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=false,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=false,this.$context=void 0;}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax);}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return e=xi(e,Number.POSITIVE_INFINITY),n=xi(n,Number.NEGATIVE_INFINITY),r=xi(r,Number.POSITIVE_INFINITY),i=xi(i,Number.NEGATIVE_INFINITY),{min:xi(e,r),max:xi(n,i),minDefined:Mn(e),maxDefined:Mn(n)}}getMinMax(e){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),s;if(i&&o)return {min:n,max:r};let c=this.getMatchingVisibleMetas();for(let p=0,h=c.length;p<h;++p)s=c[p].controller.getMinMax(this,e),i||(n=Math.min(n,s.min)),o||(r=Math.max(r,s.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:xi(n,xi(r,n)),max:xi(r,xi(n,r))}}getPadding(){return {left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=false;}beforeUpdate(){Qe(this.options.beforeUpdate,[this]);}update(e,n,r){let{beginAtZero:i,grace:o,ticks:s}=this.options,c=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=k0(this,o,i),this._dataLimitsCached=true),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let p=c<this.ticks.length;this._convertTicksToLabels(p?iw(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=w6(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),p&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate();}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels;}afterUpdate(){Qe(this.options.afterUpdate,[this]);}beforeSetDimensions(){Qe(this.options.beforeSetDimensions,[this]);}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0;}afterSetDimensions(){Qe(this.options.afterSetDimensions,[this]);}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Qe(this.options[e],[this]);}beforeDataLimits(){this._callHooks("beforeDataLimits");}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits");}beforeBuildTicks(){this._callHooks("beforeBuildTicks");}buildTicks(){return []}afterBuildTicks(){this._callHooks("afterBuildTicks");}beforeTickToLabelConversion(){Qe(this.options.beforeTickToLabelConversion,[this]);}generateTickLabels(e){let n=this.options.ticks,r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r],o.label=Qe(n.callback,[o.value,r,e],this);}afterTickToLabelConversion(){Qe(this.options.afterTickToLabelConversion,[this]);}beforeCalculateLabelRotation(){Qe(this.options.beforeCalculateLabelRotation,[this]);}calculateLabelRotation(){let e=this.options,n=e.ticks,r=this.ticks.length,i=n.minRotation||0,o=n.maxRotation,s=i,c,p,h;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}let v=this._getLabelSizes(),P=v.widest.width,x=v.highest.height,T=Nr(this.chart.width-P,0,this.maxWidth);c=e.offset?this.maxWidth/r:T/(r-1),P+6>c&&(c=T/(r-(e.offset?.5:1)),p=this.maxHeight-yf(e.grid)-n.padding-ow(e.title,this.chart.options.font),h=Math.sqrt(P*P+x*x),s=_c(Math.min(Math.asin(Nr((v.highest.height+6)/c,-1,1)),Math.asin(Nr(p/h,-1,1))-Math.asin(Nr(x/h,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s;}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this]);}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this]);}fit(){let e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),c=this.isHorizontal();if(s){let p=ow(i,n.options.font);if(c?(e.width=this.maxWidth,e.height=yf(o)+p):(e.height=this.maxHeight,e.width=yf(o)+p),r.display&&this.ticks.length){let{first:h,last:v,widest:P,highest:x}=this._getLabelSizes(),T=r.padding*2,I=Qn(this.labelRotation),R=Math.cos(I),A=Math.sin(I);if(c){let O=r.mirror?0:A*P.width+R*x.height;e.height=Math.min(this.maxHeight,e.height+O+T);}else {let O=r.mirror?0:R*P.width+A*x.height;e.width=Math.min(this.maxWidth,e.width+O+T);}this._calculatePadding(h,v,A,R);}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom);}_calculatePadding(e,n,r,i){let{ticks:{align:o,padding:s},position:c}=this.options,p=this.labelRotation!==0,h=c!=="top"&&this.axis==="x";if(this.isHorizontal()){let v=this.getPixelForTick(0)-this.left,P=this.right-this.getPixelForTick(this.ticks.length-1),x=0,T=0;p?h?(x=i*e.width,T=r*n.height):(x=r*e.height,T=i*n.width):o==="start"?T=n.width:o==="end"?x=e.width:o!=="inner"&&(x=e.width/2,T=n.width/2),this.paddingLeft=Math.max((x-v+s)*this.width/(this.width-v),0),this.paddingRight=Math.max((T-P+s)*this.width/(this.width-P),0);}else {let v=n.height/2,P=e.height/2;o==="start"?(v=0,P=e.height):o==="end"&&(v=n.height,P=0),this.paddingTop=v+s,this.paddingBottom=P+s;}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom));}afterFit(){Qe(this.options.afterFit,[this]);}isHorizontal(){let{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)Le(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion();}_getLabelSizes(){let e=this._labelSizes;if(!e){let n=this.options.ticks.sampleSize,r=this.ticks;n<r.length&&(r=iw(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length);}return e}_computeLabelSizes(e,n){let{ctx:r,_longestTextCache:i}=this,o=[],s=[],c=0,p=0,h,v,P,x,T,I,R,A,O,N,V;for(h=0;h<n;++h){if(x=e[h].label,T=this._resolveTickFontOptions(h),r.font=I=T.string,R=i[I]=i[I]||{data:{},gc:[]},A=T.lineHeight,O=N=0,!Le(x)&&!He(x))O=ed(r,R.data,R.gc,O,x),N=A;else if(He(x))for(v=0,P=x.length;v<P;++v)V=x[v],!Le(V)&&!He(V)&&(O=ed(r,R.data,R.gc,O,V),N+=A);o.push(O),s.push(N),c=Math.max(O,c),p=Math.max(N,p);}M6(i,n);let G=o.indexOf(c),X=s.indexOf(p),nt=st=>({width:o[st]||0,height:s[st]||0});return {first:nt(0),last:nt(n-1),widest:nt(G),highest:nt(X),widths:o,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){let n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let n=this._startPixel+e*this._length;return g0(this._alignToPixels?rs(this.chart,n,0):n)}getDecimalForPixel(e){let n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){let n=this.ticks||[];if(e>=0&&e<n.length){let r=n[e];return r.$context||(r.$context=L6(this.getContext(),e,r))}return this.$context||(this.$context=N6(this.chart.getContext(),this))}_tickSize(){let e=this.options.ticks,n=Qn(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),s=e.autoSkipPadding||0,c=o?o.widest.width+s:0,p=o?o.highest.height+s:0;return this.isHorizontal()?p*r>c*i?c/r:p/i:p*i<c*r?p/r:c/i}_isVisible(){let e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){let n=this.axis,r=this.chart,i=this.options,{grid:o,position:s}=i,c=o.offset,p=this.isHorizontal(),v=this.ticks.length+(c?1:0),P=yf(o),x=[],T=o.setContext(this.getContext()),I=T.drawBorder?T.borderWidth:0,R=I/2,A=function(mt){return rs(r,mt,I)},O,N,V,G,X,nt,st,U,j,ut,Y,at;if(s==="top")O=A(this.bottom),nt=this.bottom-P,U=O-R,ut=A(e.top)+R,at=e.bottom;else if(s==="bottom")O=A(this.top),ut=e.top,at=A(e.bottom)-R,nt=O+R,U=this.top+P;else if(s==="left")O=A(this.right),X=this.right-P,st=O-R,j=A(e.left)+R,Y=e.right;else if(s==="right")O=A(this.left),j=e.left,Y=A(e.right)-R,X=O+R,st=this.left+P;else if(n==="x"){if(s==="center")O=A((e.top+e.bottom)/2+.5);else if(Te(s)){let mt=Object.keys(s)[0],Ct=s[mt];O=A(this.chart.scales[mt].getPixelForValue(Ct));}ut=e.top,at=e.bottom,nt=O+R,U=nt+P;}else if(n==="y"){if(s==="center")O=A((e.left+e.right)/2);else if(Te(s)){let mt=Object.keys(s)[0],Ct=s[mt];O=A(this.chart.scales[mt].getPixelForValue(Ct));}X=O-R,st=X-P,j=e.left,Y=e.right;}let pt=me(i.ticks.maxTicksLimit,v),dt=Math.max(1,Math.ceil(v/pt));for(N=0;N<v;N+=dt){let mt=o.setContext(this.getContext(N)),Ct=mt.lineWidth,jt=mt.color,Gt=mt.borderDash||[],Jt=mt.borderDashOffset,ee=mt.tickWidth,re=mt.tickColor,Ee=mt.tickBorderDash||[],je=mt.tickBorderDashOffset;V=F6(this,N,c),V!==void 0&&(G=rs(r,V,Ct),p?X=st=j=Y=G:nt=U=ut=at=G,x.push({tx1:X,ty1:nt,tx2:st,ty2:U,x1:j,y1:ut,x2:Y,y2:at,width:Ct,color:jt,borderDash:Gt,borderDashOffset:Jt,tickWidth:ee,tickColor:re,tickBorderDash:Ee,tickBorderDashOffset:je}));}return this._ticksLength=v,this._borderValue=O,x}_computeLabelItems(e){let n=this.axis,r=this.options,{position:i,ticks:o}=r,s=this.isHorizontal(),c=this.ticks,{align:p,crossAlign:h,padding:v,mirror:P}=o,x=yf(r.grid),T=x+v,I=P?-v:T,R=-Qn(this.labelRotation),A=[],O,N,V,G,X,nt,st,U,j,ut,Y,at,pt="middle";if(i==="top")nt=this.bottom-I,st=this._getXAxisLabelAlignment();else if(i==="bottom")nt=this.top+I,st=this._getXAxisLabelAlignment();else if(i==="left"){let mt=this._getYAxisLabelAlignment(x);st=mt.textAlign,X=mt.x;}else if(i==="right"){let mt=this._getYAxisLabelAlignment(x);st=mt.textAlign,X=mt.x;}else if(n==="x"){if(i==="center")nt=(e.top+e.bottom)/2+T;else if(Te(i)){let mt=Object.keys(i)[0],Ct=i[mt];nt=this.chart.scales[mt].getPixelForValue(Ct)+T;}st=this._getXAxisLabelAlignment();}else if(n==="y"){if(i==="center")X=(e.left+e.right)/2-T;else if(Te(i)){let mt=Object.keys(i)[0],Ct=i[mt];X=this.chart.scales[mt].getPixelForValue(Ct);}st=this._getYAxisLabelAlignment(x).textAlign;}n==="y"&&(p==="start"?pt="top":p==="end"&&(pt="bottom"));let dt=this._getLabelSizes();for(O=0,N=c.length;O<N;++O){V=c[O],G=V.label;let mt=o.setContext(this.getContext(O));U=this.getPixelForTick(O)+o.labelOffset,j=this._resolveTickFontOptions(O),ut=j.lineHeight,Y=He(G)?G.length:1;let Ct=Y/2,jt=mt.color,Gt=mt.textStrokeColor,Jt=mt.textStrokeWidth,ee=st;s?(X=U,st==="inner"&&(O===N-1?ee=this.options.reverse?"left":"right":O===0?ee=this.options.reverse?"right":"left":ee="center"),i==="top"?h==="near"||R!==0?at=-Y*ut+ut/2:h==="center"?at=-dt.highest.height/2-Ct*ut+ut:at=-dt.highest.height+ut/2:h==="near"||R!==0?at=ut/2:h==="center"?at=dt.highest.height/2-Ct*ut:at=dt.highest.height-Y*ut,P&&(at*=-1)):(nt=U,at=(1-Y)*ut/2);let re;if(mt.showLabelBackdrop){let Ee=$n(mt.backdropPadding),je=dt.heights[O],sn=dt.widths[O],Ze=nt+at-Ee.top,Pn=X-Ee.left;switch(pt){case "middle":Ze-=je/2;break;case "bottom":Ze-=je;break}switch(st){case "center":Pn-=sn/2;break;case "right":Pn-=sn;break}re={left:Pn,top:Ze,width:sn+Ee.width,height:je+Ee.height,color:mt.backdropColor};}A.push({rotation:R,label:G,font:j,color:jt,strokeColor:Gt,strokeWidth:Jt,textOffset:at,textAlign:ee,textBaseline:pt,translation:[X,nt],backdrop:re});}return A}_getXAxisLabelAlignment(){let{position:e,ticks:n}=this.options;if(-Qn(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){let{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,s=this._getLabelSizes(),c=e+o,p=s.widest.width,h,v;return n==="left"?i?(v=this.right+o,r==="near"?h="left":r==="center"?(h="center",v+=p/2):(h="right",v+=p)):(v=this.right-c,r==="near"?h="right":r==="center"?(h="center",v-=p/2):(h="left",v=this.left)):n==="right"?i?(v=this.left+o,r==="near"?h="right":r==="center"?(h="center",v-=p/2):(h="left",v-=p)):(v=this.left+c,r==="near"?h="left":r==="center"?(h="center",v+=p/2):(h="right",v=this.right)):h="right",{textAlign:h,x:v}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,n=this.options.position;if(n==="left"||n==="right")return {top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return {top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:n},left:r,top:i,width:o,height:s}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,i,o,s),e.restore());}getLineWidthForValue(e){let n=this.options.grid;if(!this._isVisible()||!n.display)return 0;let i=this.ticks.findIndex(o=>o.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){let n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),o,s,c=(p,h,v)=>{!v.width||!v.color||(r.save(),r.lineWidth=v.width,r.strokeStyle=v.color,r.setLineDash(v.borderDash||[]),r.lineDashOffset=v.borderDashOffset,r.beginPath(),r.moveTo(p.x,p.y),r.lineTo(h.x,h.y),r.stroke(),r.restore());};if(n.display)for(o=0,s=i.length;o<s;++o){let p=i[o];n.drawOnChartArea&&c({x:p.x1,y:p.y1},{x:p.x2,y:p.y2},p),n.drawTicks&&c({x:p.tx1,y:p.ty1},{x:p.tx2,y:p.ty2},{color:p.tickColor,width:p.tickWidth,borderDash:p.tickBorderDash,borderDashOffset:p.tickBorderDashOffset});}}drawBorder(){let{chart:e,ctx:n,options:{grid:r}}=this,i=r.setContext(this.getContext()),o=r.drawBorder?i.borderWidth:0;if(!o)return;let s=r.setContext(this.getContext(0)).lineWidth,c=this._borderValue,p,h,v,P;this.isHorizontal()?(p=rs(e,this.left,o)-o/2,h=rs(e,this.right,s)+s/2,v=P=c):(v=rs(e,this.top,o)-o/2,P=rs(e,this.bottom,s)+s/2,p=h=c),n.save(),n.lineWidth=i.borderWidth,n.strokeStyle=i.borderColor,n.beginPath(),n.moveTo(p,v),n.lineTo(h,P),n.stroke(),n.restore();}drawLabels(e){if(!this.options.ticks.display)return;let r=this.ctx,i=this._computeLabelArea();i&&fl(r,i);let o=this._labelItems||(this._labelItems=this._computeLabelItems(e)),s,c;for(s=0,c=o.length;s<c;++s){let p=o[s],h=p.font,v=p.label;p.backdrop&&(r.fillStyle=p.backdrop.color,r.fillRect(p.backdrop.left,p.backdrop.top,p.backdrop.width,p.backdrop.height));let P=p.textOffset;is(r,v,0,P,h,p);}i&&hl(r);}drawTitle(){let{ctx:e,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;let o=Sn(r.font),s=$n(r.padding),c=r.align,p=o.lineHeight/2;n==="bottom"||n==="center"||Te(n)?(p+=s.bottom,He(r.text)&&(p+=o.lineHeight*(r.text.length-1))):p+=s.top;let{titleX:h,titleY:v,maxWidth:P,rotation:x}=U6(this,p,n,c);is(e,r.text,0,0,o,{color:r.color,maxWidth:P,rotation:x,textAlign:B6(c,n,i),textBaseline:"middle",translation:[h,v]});}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e));}_layers(){let e=this.options,n=e.ticks&&e.ticks.z||0,r=me(e.grid&&e.grid.z,-1);return !this._isVisible()||this.draw!==t.prototype.draw?[{z:n,draw:i=>{this.draw(i);}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle();}},{z:r+1,draw:()=>{this.drawBorder();}},{z:n,draw:i=>{this.drawLabels(i);}}]}getMatchingVisibleMetas(e){let n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[],o,s;for(o=0,s=n.length;o<s;++o){let c=n[o];c[r]===this.id&&(!e||c.type===e)&&i.push(c);}return i}_resolveTickFontOptions(e){let n=this.options.ticks.setContext(this.getContext(e));return Sn(n.font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return (this.isHorizontal()?this.width:this.height)/e}},od=class{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null);}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let n=Object.getPrototypeOf(e),r;j6(n)&&(r=this.register(n));let i=this.items,o=e.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in i||(i[o]=e,$6(e,s,r),this.override&&ke.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){let n=this.items,r=e.id,i=this.scope;r in n&&delete n[r],i&&r in ke[i]&&(delete ke[i][r],this.override&&delete pl[r]);}};function $6(t,e,n){let r=ji(Object.create(null),[n?ke.get(n):{},ke.get(e),t.defaults]);ke.set(e,r),t.defaultRoutes&&G6(e,t.defaultRoutes),t.descriptors&&ke.describe(e,t.descriptors);}function G6(t,e){Object.keys(e).forEach(n=>{let r=n.split("."),i=r.pop(),o=[t].concat(r).join("."),s=e[n].split("."),c=s.pop(),p=s.join(".");ke.route(o,i,p,c);});}function j6(t){return "id"in t&&"defaults"in t}var Q0=class{constructor(){this.controllers=new od(zi,"datasets",true),this.elements=new od(br,"elements"),this.plugins=new od(Object,"plugins"),this.scales=new od(Ac,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements];}add(...e){this._each("register",e);}remove(...e){this._each("unregister",e);}addControllers(...e){this._each("register",e,this.controllers);}addElements(...e){this._each("register",e,this.elements);}addPlugins(...e){this._each("register",e,this.plugins);}addScales(...e){this._each("register",e,this.scales);}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers);}removeElements(...e){this._each("unregister",e,this.elements);}removePlugins(...e){this._each("unregister",e,this.plugins);}removeScales(...e){this._each("unregister",e,this.scales);}_each(e,n,r){[...n].forEach(i=>{let o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(e,o,i):tn(i,s=>{let c=r||this._getRegistryForType(s);this._exec(e,c,s);});});}_exec(e,n,r){let i=sf(e);Qe(r["before"+i],[],r),n[e](r),Qe(r["after"+i],[],r);}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){let r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){let i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return i}},Ca=new Q0,If=class extends zi{update(e){let n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled,{start:o,count:s}=jg(n,r,i);if(this._drawStart=o,this._drawCount=s,Vg(n)&&(o=0,s=r.length),this.options.showLine){let{dataset:c,_dataset:p}=n;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!p._decimated,c.points=r;let h=this.resolveDatasetElementOptions(e);h.segment=this.options.segment,this.updateElement(c,void 0,{animated:!i,options:h},e);}this.updateElements(r,o,s,e);}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=Ca.getElement("line")),super.addElements();}updateElements(e,n,r,i){let o=i==="reset",{iScale:s,vScale:c,_stacked:p,_dataset:h}=this._cachedMeta,v=this.resolveDataElementOptions(n,i),P=this.getSharedOptions(v),x=this.includeOptions(i,P),T=s.axis,I=c.axis,{spanGaps:R,segment:A}=this.options,O=Vi(R)?R:Number.POSITIVE_INFINITY,N=this.chart._animationsDisabled||o||i==="none",V=n>0&&this.getParsed(n-1);for(let G=n;G<n+r;++G){let X=e[G],nt=this.getParsed(G),st=N?X:{},U=Le(nt[I]),j=st[T]=s.getPixelForValue(nt[T],G),ut=st[I]=o||U?c.getBasePixel():c.getPixelForValue(p?this.applyStack(c,nt,p):nt[I],G);st.skip=isNaN(j)||isNaN(ut)||U,st.stop=G>0&&Math.abs(nt[T]-V[T])>O,A&&(st.parsed=nt,st.raw=h.data[G]),x&&(st.options=P||this.resolveDataElementOptions(G,X.active?"active":i)),N||this.updateElement(X,G,st,i),V=nt;}this.updateSharedOptions(P,i,v);}getMaxOverflow(){let e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let c=0;for(let p=n.length-1;p>=0;--p)c=Math.max(c,n[p].size(this.resolveDataElementOptions(p))/2);return c>0&&c}let r=e.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;let o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}};If.id="scatter";If.defaults={datasetElementType:false,dataElementType:"point",showLine:false,fill:false};If.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return ""},label(t){return "("+t.label+", "+t.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function kc(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var kf=class{constructor(e){this.options=e||{};}init(e){}formats(){return kc()}parse(e,n){return kc()}format(e,n){return kc()}add(e,n,r){return kc()}diff(e,n,r){return kc()}startOf(e,n,r){return kc()}endOf(e,n){return kc()}};kf.override=function(t){Object.assign(kf.prototype,t);};var V6={_date:kf};function z6(t,e,n,r){let{controller:i,data:o,_sorted:s}=t,c=i._cachedMeta.iScale;if(c&&e===c.axis&&e!=="r"&&s&&o.length){let p=c._reversePixels?y0:es;if(r){if(i._sharedOptions){let h=o[0],v=typeof h.getRange=="function"&&h.getRange(e);if(v){let P=p(o,e,n-v),x=p(o,e,n+v);return {lo:P.lo,hi:x.hi}}}}else return p(o,e,n)}return {lo:0,hi:o.length-1}}function Of(t,e,n,r,i){let o=t.getSortedVisibleDatasetMetas(),s=n[e];for(let c=0,p=o.length;c<p;++c){let{index:h,data:v}=o[c],{lo:P,hi:x}=z6(o[c],e,s,i);for(let T=P;T<=x;++T){let I=v[T];I.skip||r(I,h,T);}}}function H6(t){let e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,i){let o=e?Math.abs(r.x-i.x):0,s=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function G0(t,e,n,r,i){let o=[];return !i&&!t.isPointInArea(e)||Of(t,n,e,function(c,p,h){!i&&!Pc(c,t.chartArea,0)||c.inRange(e.x,e.y,r)&&o.push({element:c,datasetIndex:p,index:h});},true),o}function W6(t,e,n,r){let i=[];function o(s,c,p){let{startAngle:h,endAngle:v}=s.getProps(["startAngle","endAngle"],r),{angle:P}=Lg(s,{x:e.x,y:e.y});Tc(P,h,v)&&i.push({element:s,datasetIndex:c,index:p});}return Of(t,n,e,o),i}function q6(t,e,n,r,i,o){let s=[],c=H6(n),p=Number.POSITIVE_INFINITY;function h(v,P,x){let T=v.inRange(e.x,e.y,i);if(r&&!T)return;let I=v.getCenterPoint(i);if(!(!!o||t.isPointInArea(I))&&!T)return;let A=c(e,I);A<p?(s=[{element:v,datasetIndex:P,index:x}],p=A):A===p&&s.push({element:v,datasetIndex:P,index:x});}return Of(t,n,e,h),s}function j0(t,e,n,r,i,o){return !o&&!t.isPointInArea(e)?[]:n==="r"&&!r?W6(t,e,n,i):q6(t,e,n,r,i,o)}function aw(t,e,n,r,i){let o=[],s=n==="x"?"inXRange":"inYRange",c=false;return Of(t,n,e,(p,h,v)=>{p[s](e[n],i)&&(o.push({element:p,datasetIndex:h,index:v}),c=c||p.inRange(e.x,e.y,i));}),r&&!c?[]:o}var Y6={modes:{index(t,e,n,r){let i=as(e,t),o=n.axis||"x",s=n.includeInvisible||false,c=n.intersect?G0(t,i,o,r,s):j0(t,i,o,false,r,s),p=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(h=>{let v=c[0].index,P=h.data[v];P&&!P.skip&&p.push({element:P,datasetIndex:h.index,index:v});}),p):[]},dataset(t,e,n,r){let i=as(e,t),o=n.axis||"xy",s=n.includeInvisible||false,c=n.intersect?G0(t,i,o,r,s):j0(t,i,o,false,r,s);if(c.length>0){let p=c[0].datasetIndex,h=t.getDatasetMeta(p).data;c=[];for(let v=0;v<h.length;++v)c.push({element:h[v],datasetIndex:p,index:v});}return c},point(t,e,n,r){let i=as(e,t),o=n.axis||"xy",s=n.includeInvisible||false;return G0(t,i,o,r,s)},nearest(t,e,n,r){let i=as(e,t),o=n.axis||"xy",s=n.includeInvisible||false;return j0(t,i,o,n.intersect,r,s)},x(t,e,n,r){let i=as(e,t);return aw(t,i,"x",n.intersect,r)},y(t,e,n,r){let i=as(e,t);return aw(t,i,"y",n.intersect,r)}}},$w=["left","top","right","bottom"];function bf(t,e){return t.filter(n=>n.pos===e)}function sw(t,e){return t.filter(n=>$w.indexOf(n.pos)===-1&&n.box.axis===e)}function vf(t,e){return t.sort((n,r)=>{let i=e?r:n,o=e?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function Q6(t){let e=[],n,r,i,o,s,c;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],{position:o,options:{stack:s,stackWeight:c=1}}=i,e.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&o+s,stackWeight:c});return e}function K6(t){let e={};for(let n of t){let{stack:r,pos:i,stackWeight:o}=n;if(!r||!$w.includes(i))continue;let s=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o;}return e}function X6(t,e){let n=K6(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e,o,s,c;for(o=0,s=t.length;o<s;++o){c=t[o];let{fullSize:p}=c.box,h=n[c.stack],v=h&&c.stackWeight/h.weight;c.horizontal?(c.width=v?v*r:p&&e.availableWidth,c.height=i):(c.width=r,c.height=v?v*i:p&&e.availableHeight);}return n}function Z6(t){let e=Q6(t),n=vf(e.filter(h=>h.box.fullSize),true),r=vf(bf(e,"left"),true),i=vf(bf(e,"right")),o=vf(bf(e,"top"),true),s=vf(bf(e,"bottom")),c=sw(e,"x"),p=sw(e,"y");return {fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(p).concat(s).concat(c),chartArea:bf(e,"chartArea"),vertical:r.concat(i).concat(p),horizontal:o.concat(s).concat(c)}}function lw(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function Gw(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right);}function J6(t,e,n,r){let{pos:i,box:o}=n,s=t.maxPadding;if(!Te(i)){n.size&&(t[i]-=n.size);let P=r[n.stack]||{size:0,count:1};P.size=Math.max(P.size,n.horizontal?o.height:o.width),n.size=P.size/P.count,t[i]+=n.size;}o.getPadding&&Gw(s,o.getPadding());let c=Math.max(0,e.outerWidth-lw(s,t,"left","right")),p=Math.max(0,e.outerHeight-lw(s,t,"top","bottom")),h=c!==t.w,v=p!==t.h;return t.w=c,t.h=p,n.horizontal?{same:h,other:v}:{same:v,other:h}}function t4(t){let e=t.maxPadding;function n(r){let i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom");}function e4(t,e){let n=e.maxPadding;function r(i){let o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(e[s],n[s]);}),o}return r(t?["left","right"]:["top","bottom"])}function Sf(t,e,n,r){let i=[],o,s,c,p,h,v;for(o=0,s=t.length,h=0;o<s;++o){c=t[o],p=c.box,p.update(c.width||e.w,c.height||e.h,e4(c.horizontal,e));let{same:P,other:x}=J6(e,n,c,r);h|=P&&i.length,v=v||x,p.fullSize||i.push(c);}return h&&Sf(i,e,n,r)||v}function oy(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i;}function cw(t,e,n,r){let i=n.padding,{x:o,y:s}=e;for(let c of t){let p=c.box,h=r[c.stack]||{placed:0,weight:1},v=c.stackWeight/h.weight||1;if(c.horizontal){let P=e.w*v,x=h.size||p.height;Fn(h.start)&&(s=h.start),p.fullSize?oy(p,i.left,s,n.outerWidth-i.right-i.left,x):oy(p,e.left+h.placed,s,P,x),h.start=s,h.placed+=P,s=p.bottom;}else {let P=e.h*v,x=h.size||p.width;Fn(h.start)&&(o=h.start),p.fullSize?oy(p,o,i.top,x,n.outerHeight-i.bottom-i.top):oy(p,o,e.top+h.placed,x,P),h.start=o,h.placed+=P,o=p.right;}}e.x=o,e.y=s;}ke.set("layout",{autoPadding:true,padding:{top:0,right:0,bottom:0,left:0}});var yo={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||false,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return [{z:0,draw(n){e.draw(n);}}]},t.boxes.push(e);},removeBox(t,e){let n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1);},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight;},update(t,e,n,r){if(!t)return;let i=$n(t.options.layout.padding),o=Math.max(e-i.width,0),s=Math.max(n-i.height,0),c=Z6(t.boxes),p=c.vertical,h=c.horizontal;tn(t.boxes,R=>{typeof R.beforeLayout=="function"&&R.beforeLayout();});let v=p.reduce((R,A)=>A.box.options&&A.box.options.display===false?R:R+1,0)||1,P=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/v,hBoxMaxHeight:s/2}),x=Object.assign({},i);Gw(x,$n(r));let T=Object.assign({maxPadding:x,w:o,h:s,x:i.left,y:i.top},i),I=X6(p.concat(h),P);Sf(c.fullSize,T,P,I),Sf(p,T,P,I),Sf(h,T,P,I)&&Sf(p,T,P,I),t4(T),cw(c.leftAndTop,T,P,I),T.x+=T.w,T.y+=T.h,cw(c.rightAndBottom,T,P,I),t.chartArea={left:T.left,top:T.top,right:T.left+T.w,bottom:T.top+T.h,height:T.h,width:T.w},tn(c.chartArea,R=>{let A=R.box;Object.assign(A,t.chartArea),A.update(T.w,T.h,{left:0,top:0,right:0,bottom:0});});}},dy=class{acquireContext(e,n){}releaseContext(e){return false}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return true}updateConfig(e){}},K0=class extends dy{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=false;}},cy="$chartjs",n4={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},uw=t=>t===null||t==="";function r4(t,e){let n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[cy]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",uw(i)){let o=Jg(t,"width");o!==void 0&&(t.width=o);}if(uw(r))if(t.style.height==="")t.height=t.width/(e||2);else {let o=Jg(t,"height");o!==void 0&&(t.height=o);}return t}var jw=F0?{passive:true}:false;function i4(t,e,n){t.addEventListener(e,n,jw);}function o4(t,e,n){t.canvas.removeEventListener(e,n,jw);}function a4(t,e){let n=n4[t.type]||t.type,{x:r,y:i}=as(t,e);return {type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function py(t,e){for(let n of t)if(n===e||n.contains(e))return true}function s4(t,e,n){let r=t.canvas,i=new MutationObserver(o=>{let s=false;for(let c of o)s=s||py(c.addedNodes,r),s=s&&!py(c.removedNodes,r);s&&n();});return i.observe(document,{childList:true,subtree:true}),i}function l4(t,e,n){let r=t.canvas,i=new MutationObserver(o=>{let s=false;for(let c of o)s=s||py(c.removedNodes,r),s=s&&!py(c.addedNodes,r);s&&n();});return i.observe(document,{childList:true,subtree:true}),i}var Df=new Map,dw=0;function Vw(){let t=window.devicePixelRatio;t!==dw&&(dw=t,Df.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e();}));}function c4(t,e){Df.size||window.addEventListener("resize",Vw),Df.set(t,e);}function u4(t){Df.delete(t),Df.size||window.removeEventListener("resize",Vw);}function d4(t,e,n){let r=t.canvas,i=r&&mf(r);if(!i)return;let o=Gg((c,p)=>{let h=i.clientWidth;n(c,p),h<i.clientWidth&&n();},window),s=new ResizeObserver(c=>{let p=c[0],h=p.contentRect.width,v=p.contentRect.height;h===0&&v===0||o(h,v);});return s.observe(i),c4(t,o),s}function V0(t,e,n){n&&n.disconnect(),e==="resize"&&u4(t);}function p4(t,e,n){let r=t.canvas,i=Gg(o=>{t.ctx!==null&&n(a4(o,t));},t,o=>{let s=o[0];return [s,s.offsetX,s.offsetY]});return i4(r,e,i),i}var X0=class extends dy{acquireContext(e,n){let r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(r4(e,n),r):null}releaseContext(e){let n=e.canvas;if(!n[cy])return false;let r=n[cy].initial;["height","width"].forEach(o=>{let s=r[o];Le(s)?n.removeAttribute(o):n.setAttribute(o,s);});let i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o];}),n.width=n.width,delete n[cy],true}addEventListener(e,n,r){this.removeEventListener(e,n);let i=e.$proxies||(e.$proxies={}),s={attach:s4,detach:l4,resize:d4}[n]||p4;i[n]=s(e,n,r);}removeEventListener(e,n){let r=e.$proxies||(e.$proxies={}),i=r[n];if(!i)return;(({attach:V0,detach:V0,resize:V0})[n]||o4)(e,n,i),r[n]=void 0;}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return R0(e,n,r,i)}isAttached(e){let n=mf(e);return !!(n&&n.isConnected)}};function f4(t){return !Kg()||typeof OffscreenCanvas!="undefined"&&t instanceof OffscreenCanvas?K0:X0}var Z0=class{constructor(){this._init=[];}notify(e,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,true),this._notify(this._init,e,"install"));let o=i?this._descriptors(e).filter(i):this._descriptors(e),s=this._notify(o,e,n,r);return n==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,n,r,i){i=i||{};for(let o of e){let s=o.plugin,c=s[r],p=[n,i,o.options];if(Qe(c,p,s)===false&&i.cancelable)return false}return true}invalidate(){Le(this._cache)||(this._oldCache=this._cache,this._cache=void 0);}_descriptors(e){if(this._cache)return this._cache;let n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){let r=e&&e.config,i=me(r.options&&r.options.plugins,{}),o=h4(r);return i===false&&!n?[]:g4(e,o,i,n)}_notifyStateChanges(e){let n=this._oldCache||[],r=this._cache,i=(o,s)=>o.filter(c=>!s.some(p=>c.plugin.id===p.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start");}};function h4(t){let e={},n=[],r=Object.keys(Ca.plugins.items);for(let o=0;o<r.length;o++)n.push(Ca.getPlugin(r[o]));let i=t.plugins||[];for(let o=0;o<i.length;o++){let s=i[o];n.indexOf(s)===-1&&(n.push(s),e[s.id]=true);}return {plugins:n,localIds:e}}function m4(t,e){return !e&&t===false?null:t===true?{}:t}function g4(t,{plugins:e,localIds:n},r,i){let o=[],s=t.getContext();for(let c of e){let p=c.id,h=m4(r[p],i);h!==null&&o.push({plugin:c,options:y4(t.config,{plugin:c,local:n[p]},h,s)});}return o}function y4(t,{plugin:e,local:n},r,i){let o=t.pluginScopeKeys(e),s=t.getOptionScopes(r,o);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,i,[""],{scriptable:false,indexable:false,allKeys:true})}function J0(t,e){let n=ke.datasets[t]||{};return ((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function b4(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function v4(t,e){return t===e?"_index_":"_value_"}function C4(t){if(t==="top"||t==="bottom")return "x";if(t==="left"||t==="right")return "y"}function t1(t,e){return t==="x"||t==="y"?t:e.axis||C4(e.position)||t.charAt(0).toLowerCase()}function S4(t,e){let n=pl[t.type]||{scales:{}},r=e.scales||{},i=J0(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(r).forEach(c=>{let p=r[c];if(!Te(p))return console.error(`Invalid scale configuration for scale: ${c}`);if(p._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${c}`);let h=t1(c,p),v=v4(h,i),P=n.scales||{};o[h]=o[h]||c,s[c]=xc(Object.create(null),[{axis:h},p,P[h],P[v]]);}),t.data.datasets.forEach(c=>{let p=c.type||t.type,h=c.indexAxis||J0(p,e),P=(pl[p]||{}).scales||{};Object.keys(P).forEach(x=>{let T=b4(x,h),I=c[T+"AxisID"]||o[T]||T;s[I]=s[I]||Object.create(null),xc(s[I],[{axis:T},r[I],P[x]]);});}),Object.keys(s).forEach(c=>{let p=s[c];xc(p,[ke.scales[p.type],ke.scale]);}),s}function zw(t){let e=t.options||(t.options={});e.plugins=me(e.plugins,{}),e.scales=S4(t,e);}function Hw(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function P4(t){return t=t||{},t.data=Hw(t.data),zw(t),t}var pw=new Map,Ww=new Set;function ay(t,e){let n=pw.get(t);return n||(n=e(),pw.set(t,n),Ww.add(n)),n}var Cf=(t,e,n)=>{let r=ya(e,n);r!==void 0&&t.add(r);},e1=class{constructor(e){this._config=P4(e),this._scopeCache=new Map,this._resolverCache=new Map;}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e;}get data(){return this._config.data}set data(e){this._config.data=Hw(e);}get options(){return this._config.options}set options(e){this._config.options=e;}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),zw(e);}clearCache(){this._scopeCache.clear(),this._resolverCache.clear();}datasetScopeKeys(e){return ay(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return ay(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return ay(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){let n=e.id,r=this.type;return ay(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){let r=this._scopeCache,i=r.get(e);return (!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){let{options:i,type:o}=this,s=this._cachedScopes(e,r),c=s.get(n);if(c)return c;let p=new Set;n.forEach(v=>{e&&(p.add(e),v.forEach(P=>Cf(p,e,P))),v.forEach(P=>Cf(p,i,P)),v.forEach(P=>Cf(p,pl[o]||{},P)),v.forEach(P=>Cf(p,ke,P)),v.forEach(P=>Cf(p,zg,P));});let h=Array.from(p);return h.length===0&&h.push(Object.create(null)),Ww.has(n)&&s.set(n,h),h}chartOptionScopes(){let{options:e,type:n}=this;return [e,pl[n]||{},ke.datasets[n]||{},{type:n},ke,zg]}resolveNamedOptions(e,n,r,i=[""]){let o={$shared:true},{resolver:s,subPrefixes:c}=fw(this._resolverCache,e,i),p=s;if(E4(s,n)){o.$shared=false,r=Gr(r)?r():r;let h=this.createResolver(e,r,c);p=dl(s,r,h);}for(let h of n)o[h]=p[h];return o}createResolver(e,n,r=[""],i){let{resolver:o}=fw(this._resolverCache,e,r);return Te(n)?dl(o,n,void 0,i):o}};function fw(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));let i=n.join(),o=r.get(i);return o||(o={resolver:hf(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},r.set(i,o)),o}var x4=t=>Te(t)&&Object.getOwnPropertyNames(t).reduce((e,n)=>e||Gr(t[n]),false);function E4(t,e){let{isScriptable:n,isIndexable:r}=Yg(t);for(let i of e){let o=n(i),s=r(i),c=(s||o)&&t[i];if(o&&(Gr(c)||x4(c))||s&&He(c))return true}return false}var _4="3.9.1",T4=["top","bottom","left","right","chartArea"];function hw(t,e){return t==="top"||t==="bottom"||T4.indexOf(t)===-1&&e==="x"}function mw(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function gw(t){let e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Qe(n&&n.onComplete,[t],e);}function w4(t){let e=t.chart,n=e.options.animation;Qe(n&&n.onProgress,[t],e);}function qw(t){return Kg()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var fy={},Yw=t=>{let e=qw(t);return Object.values(fy).filter(n=>n.canvas===e).pop()};function I4(t,e,n){let r=Object.keys(t);for(let i of r){let o=+i;if(o>=e){let s=t[i];delete t[i],(n>0||o>e)&&(t[o+n]=s);}}}function k4(t,e,n,r){return !n||t.type==="mouseout"?null:r?e:t}var bo=class{constructor(e,n){let r=this.config=new e1(n),i=qw(e),o=Yw(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||f4(i)),this.platform.updateConfig(r);let c=this.platform.acquireContext(i,s.aspectRatio),p=c&&c.canvas,h=p&&p.height,v=p&&p.width;if(this.id=d0(),this.ctx=c,this.canvas=p,this.width=v,this.height=h,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Z0,this.$proxies={},this._hiddenIndices={},this.attached=false,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=C0(P=>this.update(P),s.resizeDelay||0),this._dataChanges=[],fy[this.id]=this,!c||!p){console.error("Failed to create chart: can't acquire context from the given item");return}ss.listen(this,"complete",gw),ss.listen(this,"progress",w4),this._initialize(),this.attached&&this.update();}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Le(e)?n&&o?o:i?r/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e;}get options(){return this._options}set options(e){this.config.options=e;}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Zg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Hg(this.canvas,this.ctx),this}stop(){return ss.stop(this),this}resize(e,n){ss.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n);}_resize(e,n){let r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,e,n,o),c=r.devicePixelRatio||this.platform.getDevicePixelRatio(),p=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Zg(this,c,true)&&(this.notifyPlugins("resize",{size:s}),Qe(r.onResize,[this,s],this),this.attached&&this._doResize(p)&&this.render());}ensureScalesHaveIDs(){let n=this.options.scales||{};tn(n,(r,i)=>{r.id=i;});}buildOrUpdateScales(){let e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((s,c)=>(s[c]=false,s),{}),o=[];n&&(o=o.concat(Object.keys(n).map(s=>{let c=n[s],p=t1(s,c),h=p==="r",v=p==="x";return {options:c,dposition:h?"chartArea":v?"bottom":"left",dtype:h?"radialLinear":v?"category":"linear"}}))),tn(o,s=>{let c=s.options,p=c.id,h=t1(p,c),v=me(c.type,s.dtype);(c.position===void 0||hw(c.position,h)!==hw(s.dposition))&&(c.position=s.dposition),i[p]=true;let P=null;if(p in r&&r[p].type===v)P=r[p];else {let x=Ca.getScale(v);P=new x({id:p,type:v,ctx:this.ctx,chart:this}),r[P.id]=P;}P.init(c,e);}),tn(i,(s,c)=>{s||delete r[c];}),tn(r,s=>{yo.configure(this,s,s.options),yo.addBox(this,s);});}_updateMetasets(){let e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);e.splice(n,r-n);}this._sortedMetasets=e.slice(0).sort(mw("order","index"));}_removeUnreferencedMetasets(){let{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i);});}buildOrUpdateControllers(){let e=[],n=this.data.datasets,r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){let o=n[r],s=this.getDatasetMeta(r),c=o.type||this.config.type;if(s.type&&s.type!==c&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=c,s.indexAxis=o.indexAxis||J0(c,this.options),s.order=o.order||0,s.index=r,s.label=""+o.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else {let p=Ca.getController(c),{datasetElementType:h,dataElementType:v}=ke.datasets[c];Object.assign(p.prototype,{dataElementType:Ca.getElement(v),datasetElementType:h&&Ca.getElement(h)}),s.controller=new p(this,r),e.push(s.controller);}}return this._updateMetasets(),e}_resetElements(){tn(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset();},this);}reset(){this._resetElements(),this.notifyPlugins("reset");}update(e){let n=this.config;n.update();let r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:true})===false)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let h=0,v=this.data.datasets.length;h<v;h++){let{controller:P}=this.getDatasetMeta(h),x=!i&&o.indexOf(P)===-1;P.buildOrUpdateElements(x),s=Math.max(+P.getMaxOverflow(),s);}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||tn(o,h=>{h.reset();}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(mw("z","_idx"));let{_active:c,_lastEvent:p}=this;p?this._eventHandler(p,true):c.length&&this._updateHoverStyles(c,c,true),this.render();}_updateScales(){tn(this.scales,e=>{yo.removeBox(this,e);}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales();}_checkEventBindings(){let e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!Rg(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents());}_updateHiddenIndices(){let{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(let{method:r,start:i,count:o}of n){let s=r==="_removeElements"?-o:o;I4(e,i,s);}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let n=this.data.datasets.length,r=o=>new Set(e.filter(s=>s[0]===o).map((s,c)=>c+","+s.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!Rg(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:true})===false)return;yo.update(this,this.width,this.height,e);let n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],tn(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()));},this),this._layers.forEach((i,o)=>{i._idx=o;}),this.notifyPlugins("afterLayout");}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:true})!==false){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Gr(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e});}}_updateDataset(e,n){let r=this.getDatasetMeta(e),i={meta:r,index:e,mode:n,cancelable:true};this.notifyPlugins("beforeDatasetUpdate",i)!==false&&(r.controller._update(n),i.cancelable=false,this.notifyPlugins("afterDatasetUpdate",i));}render(){this.notifyPlugins("beforeRender",{cancelable:true})!==false&&(ss.has(this)?this.attached&&!ss.running(this)&&ss.start(this):(this.draw(),gw({chart:this})));}draw(){let e;if(this._resizeBeforeDraw){let{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null;}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:true})===false)return;let n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw");}_getSortedDatasetMetas(e){let n=this._sortedMetasets,r=[],i,o;for(i=0,o=n.length;i<o;++i){let s=n[i];(!e||s.visible)&&r.push(s);}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(true)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:true})===false)return;let e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw");}_drawDataset(e){let n=this.ctx,r=e._clip,i=!r.disabled,o=this.chartArea,s={meta:e,index:e.index,cancelable:true};this.notifyPlugins("beforeDatasetDraw",s)!==false&&(i&&fl(n,{left:r.left===false?0:o.left-r.left,right:r.right===false?this.width:o.right+r.right,top:r.top===false?0:o.top-r.top,bottom:r.bottom===false?this.height:o.bottom+r.bottom}),e.controller.draw(),i&&hl(n),s.cancelable=false,this.notifyPlugins("afterDatasetDraw",s));}isPointInArea(e){return Pc(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,i){let o=Y6.modes[n];return typeof o=="function"?o(this,e,r,i):[]}getDatasetMeta(e){let n=this.data.datasets[e],r=this._metasets,i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:false},r.push(i)),i}getContext(){return this.$context||(this.$context=ba(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let n=this.data.datasets[e];if(!n)return false;let r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){let r=this.getDatasetMeta(e);r.hidden=!n;}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e];}getDataVisibility(e){return !this._hiddenIndices[e]}_updateVisibility(e,n,r){let i=r?"show":"hide",o=this.getDatasetMeta(e),s=o.controller._resolveAnimations(void 0,i);Fn(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),s.update(o,{visible:r}),this.update(c=>c.datasetIndex===e?i:void 0));}hide(e,n){this._updateVisibility(e,n,false);}show(e,n){this._updateVisibility(e,n,true);}_destroyDatasetMeta(e){let n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e];}_stop(){let e,n;for(this.stop(),ss.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e);}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Hg(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete fy[this.id],this.notifyPlugins("afterDestroy");}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=true;}bindUserEvents(){let e=this._listeners,n=this.platform,r=(o,s)=>{n.addEventListener(this,o,s),e[o]=s;},i=(o,s,c)=>{o.offsetX=s,o.offsetY=c,this._eventHandler(o);};tn(this.options.events,o=>r(o,i));}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,n=this.platform,r=(p,h)=>{n.addEventListener(this,p,h),e[p]=h;},i=(p,h)=>{e[p]&&(n.removeEventListener(this,p,h),delete e[p]);},o=(p,h)=>{this.canvas&&this.resize(p,h);},s,c=()=>{i("attach",c),this.attached=true,this.resize(),r("resize",o),r("detach",s);};s=()=>{this.attached=false,i("resize",o),this._stop(),this._resize(0,0),r("attach",c);},n.isAttached(this.canvas)?c():s();}unbindEvents(){tn(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e);}),this._listeners={},tn(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e);}),this._responsiveListeners=void 0;}updateHoverStyle(e,n,r){let i=r?"set":"remove",o,s,c,p;for(n==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),c=0,p=e.length;c<p;++c){s=e[c];let h=s&&this.getDatasetMeta(s.datasetIndex).controller;h&&h[i+"HoverStyle"](s.element,s.datasetIndex,s.index);}}getActiveElements(){return this._active||[]}setActiveElements(e){let n=this._active||[],r=e.map(({datasetIndex:o,index:s})=>{let c=this.getDatasetMeta(o);if(!c)throw new Error("No dataset found at index "+o);return {datasetIndex:o,element:c.data[s],index:s}});!rd(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n));}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}_updateHoverStyles(e,n,r){let i=this.options.hover,o=(p,h)=>p.filter(v=>!h.some(P=>v.datasetIndex===P.datasetIndex&&v.index===P.index)),s=o(n,e),c=r?e:o(e,n);s.length&&this.updateHoverStyle(s,i.mode,false),c.length&&i.mode&&this.updateHoverStyle(c,i.mode,true);}_eventHandler(e,n){let r={event:e,replay:n,cancelable:true,inChartArea:this.isPointInArea(e)},i=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,i)===false)return;let o=this._handleEvent(e,n,r.inChartArea);return r.cancelable=false,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(e,n,r){let{_active:i=[],options:o}=this,s=n,c=this._getActiveElements(e,i,r,s),p=f0(e),h=k4(e,this._lastEvent,r,p);r&&(this._lastEvent=null,Qe(o.onHover,[e,c,this],this),p&&Qe(o.onClick,[e,c,this],this));let v=!rd(c,i);return (v||n)&&(this._active=c,this._updateHoverStyles(c,i,n)),this._lastEvent=h,v}_getActiveElements(e,n,r,i){if(e.type==="mouseout")return [];if(!r)return n;let o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,i)}},yw=()=>tn(bo.instances,t=>t._plugins.invalidate()),gl=true;Object.defineProperties(bo,{defaults:{enumerable:gl,value:ke},instances:{enumerable:gl,value:fy},overrides:{enumerable:gl,value:pl},registry:{enumerable:gl,value:Ca},version:{enumerable:gl,value:_4},getChart:{enumerable:gl,value:Yw},register:{enumerable:gl,value:(...t)=>{Ca.add(...t),yw();}},unregister:{enumerable:gl,value:(...t)=>{Ca.remove(...t),yw();}}});function Qw(t,e,n){let{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:c,innerRadius:p}=e,h=i/c;t.beginPath(),t.arc(o,s,c,r-h,n+h),p>i?(h=i/p,t.arc(o,s,p,n+h,r-h,true)):t.arc(o,s,i,n+bn,r-bn),t.closePath(),t.clip();}function D4(t){return ff(t,["outerStart","outerEnd","innerStart","innerEnd"])}function A4(t,e,n,r){let i=D4(t.options.borderRadius),o=(n-e)/2,s=Math.min(o,r*e/2),c=p=>{let h=(n-Math.min(o,p))*r/2;return Nr(p,0,Math.min(o,h))};return {outerStart:c(i.outerStart),outerEnd:c(i.outerEnd),innerStart:Nr(i.innerStart,0,s),innerEnd:Nr(i.innerEnd,0,s)}}function id(t,e,n,r){return {x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function n1(t,e,n,r,i,o){let{x:s,y:c,startAngle:p,pixelMargin:h,innerRadius:v}=e,P=Math.max(e.outerRadius+r+n-h,0),x=v>0?v+r+n+h:0,T=0,I=i-p;if(r){let mt=v>0?v-r:0,Ct=P>0?P-r:0,jt=(mt+Ct)/2,Gt=jt!==0?I*jt/(jt+r):I;T=(I-Gt)/2;}let R=Math.max(.001,I*P-n/Be)/P,A=(I-R)/2,O=p+A+T,N=i-A-T,{outerStart:V,outerEnd:G,innerStart:X,innerEnd:nt}=A4(e,x,P,N-O),st=P-V,U=P-G,j=O+V/st,ut=N-G/U,Y=x+X,at=x+nt,pt=O+X/Y,dt=N-nt/at;if(t.beginPath(),o){if(t.arc(s,c,P,j,ut),G>0){let jt=id(U,ut,s,c);t.arc(jt.x,jt.y,G,ut,N+bn);}let mt=id(at,N,s,c);if(t.lineTo(mt.x,mt.y),nt>0){let jt=id(at,dt,s,c);t.arc(jt.x,jt.y,nt,N+bn,dt+Math.PI);}if(t.arc(s,c,x,N-nt/x,O+X/x,true),X>0){let jt=id(Y,pt,s,c);t.arc(jt.x,jt.y,X,pt+Math.PI,O-bn);}let Ct=id(st,O,s,c);if(t.lineTo(Ct.x,Ct.y),V>0){let jt=id(st,j,s,c);t.arc(jt.x,jt.y,V,O-bn,j);}}else {t.moveTo(s,c);let mt=Math.cos(j)*P+s,Ct=Math.sin(j)*P+c;t.lineTo(mt,Ct);let jt=Math.cos(ut)*P+s,Gt=Math.sin(ut)*P+c;t.lineTo(jt,Gt);}t.closePath();}function O4(t,e,n,r,i){let{fullCircles:o,startAngle:s,circumference:c}=e,p=e.endAngle;if(o){n1(t,e,n,r,s+rn,i);for(let h=0;h<o;++h)t.fill();isNaN(c)||(p=s+c%rn,c%rn===0&&(p+=rn));}return n1(t,e,n,r,p,i),t.fill(),p}function R4(t,e,n){let{x:r,y:i,startAngle:o,pixelMargin:s,fullCircles:c}=e,p=Math.max(e.outerRadius-s,0),h=e.innerRadius+s,v;for(n&&Qw(t,e,o+rn),t.beginPath(),t.arc(r,i,h,o+rn,o,true),v=0;v<c;++v)t.stroke();for(t.beginPath(),t.arc(r,i,p,o,o+rn),v=0;v<c;++v)t.stroke();}function F4(t,e,n,r,i,o){let{options:s}=e,{borderWidth:c,borderJoinStyle:p}=s,h=s.borderAlign==="inner";c&&(h?(t.lineWidth=c*2,t.lineJoin=p||"round"):(t.lineWidth=c,t.lineJoin=p||"bevel"),e.fullCircles&&R4(t,e,h),h&&Qw(t,e,i),n1(t,e,n,r,i,o),t.stroke());}var cs=class extends br{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e);}inRange(e,n,r){let i=this.getProps(["x","y"],r),{angle:o,distance:s}=Lg(i,{x:e,y:n}),{startAngle:c,endAngle:p,innerRadius:h,outerRadius:v,circumference:P}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),x=this.options.spacing/2,I=me(P,p-c)>=rn||Tc(o,c,p),R=Uo(s,h+x,v+x);return I&&R}getCenterPoint(e){let{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:p,spacing:h}=this.options,v=(i+o)/2,P=(s+c+h+p)/2;return {x:n+Math.cos(v)*P,y:r+Math.sin(v)*P}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:n,circumference:r}=this,i=(n.offset||0)/2,o=(n.spacing||0)/2,s=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>rn?Math.floor(r/rn):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let c=0;if(i){c=i/2;let h=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(h)*c,Math.sin(h)*c),this.circumference>=Be&&(c=i);}e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor;let p=O4(e,this,c,o,s);F4(e,this,c,o,p,s),e.restore();}};cs.id="arc";cs.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:true};cs.defaultRoutes={backgroundColor:"backgroundColor"};function Kw(t,e,n=e){t.lineCap=me(n.borderCapStyle,e.borderCapStyle),t.setLineDash(me(n.borderDash,e.borderDash)),t.lineDashOffset=me(n.borderDashOffset,e.borderDashOffset),t.lineJoin=me(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=me(n.borderWidth,e.borderWidth),t.strokeStyle=me(n.borderColor,e.borderColor);}function M4(t,e,n){t.lineTo(n.x,n.y);}function N4(t){return t.stepped?w0:t.tension||t.cubicInterpolationMode==="monotone"?I0:M4}function Xw(t,e,n={}){let r=t.length,{start:i=0,end:o=r-1}=n,{start:s,end:c}=e,p=Math.max(i,s),h=Math.min(o,c),v=i<s&&o<s||i>c&&o>c;return {count:r,start:p,loop:e.loop,ilen:h<p&&!v?r+h-p:h-p}}function L4(t,e,n,r){let{points:i,options:o}=e,{count:s,start:c,loop:p,ilen:h}=Xw(i,n,r),v=N4(o),{move:P=true,reverse:x}=r||{},T,I,R;for(T=0;T<=h;++T)I=i[(c+(x?h-T:T))%s],!I.skip&&(P?(t.moveTo(I.x,I.y),P=false):v(t,R,I,x,o.stepped),R=I);return p&&(I=i[(c+(x?h:0))%s],v(t,R,I,x,o.stepped)),!!p}function B4(t,e,n,r){let i=e.points,{count:o,start:s,ilen:c}=Xw(i,n,r),{move:p=true,reverse:h}=r||{},v=0,P=0,x,T,I,R,A,O,N=G=>(s+(h?c-G:G))%o,V=()=>{R!==A&&(t.lineTo(v,A),t.lineTo(v,R),t.lineTo(v,O));};for(p&&(T=i[N(0)],t.moveTo(T.x,T.y)),x=0;x<=c;++x){if(T=i[N(x)],T.skip)continue;let G=T.x,X=T.y,nt=G|0;nt===I?(X<R?R=X:X>A&&(A=X),v=(P*v+G)/++P):(V(),t.lineTo(G,X),I=nt,P=0,R=A=X),O=X;}V();}function r1(t){let e=t.options,n=e.borderDash&&e.borderDash.length;return !t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?B4:L4}function U4(t){return t.stepped?M0:t.tension||t.cubicInterpolationMode==="monotone"?N0:ts}function $4(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),Kw(t,e.options),t.stroke(i);}function G4(t,e,n,r){let{segments:i,options:o}=e,s=r1(e);for(let c of i)Kw(t,o,c.style),t.beginPath(),s(t,e,c,{start:n,end:n+r-1})&&t.closePath(),t.stroke();}var j4=typeof Path2D=="function";function V4(t,e,n,r){j4&&!e.options.segment?$4(t,e,n,r):G4(t,e,n,r);}var Go=class extends br{constructor(e){super(),this.animated=true,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=false,this._pointsUpdated=false,this._datasetIndex=void 0,e&&Object.assign(this,e);}updateControlPoints(e,n){let r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){let i=r.spanGaps?this._loop:this._fullLoop;O0(this._points,r,e,i,n),this._pointsUpdated=true;}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=false;}get points(){return this._points}get segments(){return this._segments||(this._segments=L0(this,this.options.segment))}first(){let e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){let e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){let r=this.options,i=e[n],o=this.points,s=ry(this,{property:n,start:i,end:i});if(!s.length)return;let c=[],p=U4(r),h,v;for(h=0,v=s.length;h<v;++h){let{start:P,end:x}=s[h],T=o[P],I=o[x];if(T===I){c.push(T);continue}let R=Math.abs((i-T[n])/(I[n]-T[n])),A=p(T,I,R,r.stepped);A[n]=e[n],c.push(A);}return c.length===1?c[0]:c}pathSegment(e,n,r){return r1(this)(e,this,n,r)}path(e,n,r){let i=this.segments,o=r1(this),s=this._loop;n=n||0,r=r||this.points.length-n;for(let c of i)s&=o(e,this,c,{start:n,end:n+r-1});return !!s}draw(e,n,r,i){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),V4(e,this,r,i),e.restore()),this.animated&&(this._pointsUpdated=false,this._path=void 0);}};Go.id="line";Go.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:true,cubicInterpolationMode:"default",fill:false,spanGaps:false,stepped:false,tension:0};Go.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};Go.descriptors={_scriptable:true,_indexable:t=>t!=="borderDash"&&t!=="fill"};function bw(t,e,n,r){let i=t.options,{[n]:o}=t.getProps([n],r);return Math.abs(e-o)<i.radius+i.hitRadius}var us=class extends br{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e);}inRange(e,n,r){let i=this.options,{x:o,y:s}=this.getProps(["x","y"],r);return Math.pow(e-o,2)+Math.pow(n-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(e,n){return bw(this,e,"x",n)}inYRange(e,n){return bw(this,e,"y",n)}getCenterPoint(e){let{x:n,y:r}=this.getProps(["x","y"],e);return {x:n,y:r}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);let r=n&&e.borderWidth||0;return (n+r)*2}draw(e,n){let r=this.options;this.skip||r.radius<.1||!Pc(this,n,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,pf(e,r,this.x,this.y));}getRange(){let e=this.options||{};return e.radius+e.hitRadius}};us.id="point";us.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};us.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Zw(t,e){let{x:n,y:r,base:i,width:o,height:s}=t.getProps(["x","y","base","width","height"],e),c,p,h,v,P;return t.horizontal?(P=s/2,c=Math.min(n,i),p=Math.max(n,i),h=r-P,v=r+P):(P=o/2,c=n-P,p=n+P,h=Math.min(r,i),v=Math.max(r,i)),{left:c,top:h,right:p,bottom:v}}function yl(t,e,n,r){return t?0:Nr(e,n,r)}function z4(t,e,n){let r=t.options.borderWidth,i=t.borderSkipped,o=qg(r);return {t:yl(i.top,o.top,0,n),r:yl(i.right,o.right,0,e),b:yl(i.bottom,o.bottom,0,n),l:yl(i.left,o.left,0,e)}}function H4(t,e,n){let{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,o=$o(i),s=Math.min(e,n),c=t.borderSkipped,p=r||Te(i);return {topLeft:yl(!p||c.top||c.left,o.topLeft,0,s),topRight:yl(!p||c.top||c.right,o.topRight,0,s),bottomLeft:yl(!p||c.bottom||c.left,o.bottomLeft,0,s),bottomRight:yl(!p||c.bottom||c.right,o.bottomRight,0,s)}}function W4(t){let e=Zw(t),n=e.right-e.left,r=e.bottom-e.top,i=z4(t,n/2,r/2),o=H4(t,n/2,r/2);return {outer:{x:e.left,y:e.top,w:n,h:r,radius:o},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function z0(t,e,n,r){let i=e===null,o=n===null,c=t&&!(i&&o)&&Zw(t,r);return c&&(i||Uo(e,c.left,c.right))&&(o||Uo(n,c.top,c.bottom))}function q4(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Y4(t,e){t.rect(e.x,e.y,e.w,e.h);}function H0(t,e,n={}){let r=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-r,s=(t.y+t.h!==n.y+n.h?e:0)-i;return {x:t.x+r,y:t.y+i,w:t.w+o,h:t.h+s,radius:t.radius}}var ds=class extends br{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e);}draw(e){let{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:s}=W4(this),c=q4(s.radius)?os:Y4;e.save(),(s.w!==o.w||s.h!==o.h)&&(e.beginPath(),c(e,H0(s,n,o)),e.clip(),c(e,H0(o,-n,s)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),c(e,H0(o,n)),e.fillStyle=i,e.fill(),e.restore();}inRange(e,n,r){return z0(this,e,n,r)}inXRange(e,n){return z0(this,e,null,n)}inYRange(e,n){return z0(this,null,e,n)}getCenterPoint(e){let{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return {x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}};ds.id="bar";ds.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};ds.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Q4(t,e,n){let r=t.segments,i=t.points,o=e.points,s=[];for(let c of r){let{start:p,end:h}=c;h=a1(p,h,i);let v=i1(n,i[p],i[h],c.loop);if(!e.segments){s.push({source:c,target:v,start:i[p],end:i[h]});continue}let P=ry(e,v);for(let x of P){let T=i1(n,o[x.start],o[x.end],x.loop),I=ny(c,i,T);for(let R of I)s.push({source:R,target:x,start:{[n]:vw(v,T,"start",Math.max)},end:{[n]:vw(v,T,"end",Math.min)}});}}return s}function i1(t,e,n,r){if(r)return;let i=e[t],o=n[t];return t==="angle"&&(i=ai(i),o=ai(o)),{property:t,start:i,end:o}}function K4(t,e){let{x:n=null,y:r=null}=t||{},i=e.points,o=[];return e.segments.forEach(({start:s,end:c})=>{c=a1(s,c,i);let p=i[s],h=i[c];r!==null?(o.push({x:p.x,y:r}),o.push({x:h.x,y:r})):n!==null&&(o.push({x:n,y:p.y}),o.push({x:n,y:h.y}));}),o}function a1(t,e,n){for(;e>t;e--){let r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function vw(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function Jw(t,e){let n=[],r=false;return He(t)?(r=true,n=t):n=K4(t,e),n.length?new Go({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Cw(t){return t&&t.fill!==false}function X4(t,e,n){let i=t[e].fill,o=[e],s;if(!n)return i;for(;i!==false&&o.indexOf(i)===-1;){if(!Mn(i))return i;if(s=t[i],!s)return false;if(s.visible)return i;o.push(i),i=s.fill;}return false}function Z4(t,e,n){let r=nU(t);if(Te(r))return isNaN(r.value)?false:r;let i=parseFloat(r);return Mn(i)&&Math.floor(i)===i?J4(r[0],e,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function J4(t,e,n,r){return (t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?false:n}function tU(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:Te(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function eU(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:Te(t)?r=t.value:r=e.getBaseValue(),r}function nU(t){let e=t.options,n=e.fill,r=me(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===false||r===null?false:r===true?"origin":r}function rU(t){let{scale:e,index:n,line:r}=t,i=[],o=r.segments,s=r.points,c=iU(e,n);c.push(Jw({x:null,y:e.bottom},r));for(let p=0;p<o.length;p++){let h=o[p];for(let v=h.start;v<=h.end;v++)oU(i,s[v],c);}return new Go({points:i,options:{}})}function iU(t,e){let n=[],r=t.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){let o=r[i];if(o.index===e)break;o.hidden||n.unshift(o.dataset);}return n}function oU(t,e,n){let r=[];for(let i=0;i<n.length;i++){let o=n[i],{first:s,last:c,point:p}=aU(o,e,"x");if(!(!p||s&&c)){if(s)r.unshift(p);else if(t.push(p),!c)break}}t.push(...r);}function aU(t,e,n){let r=t.interpolate(e,n);if(!r)return {};let i=r[n],o=t.segments,s=t.points,c=false,p=false;for(let h=0;h<o.length;h++){let v=o[h],P=s[v.start][n],x=s[v.end][n];if(Uo(i,P,x)){c=i===P,p=i===x;break}}return {first:c,last:p,point:r}}var hy=class{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius;}pathSegment(e,n,r){let{x:i,y:o,radius:s}=this;return n=n||{start:0,end:rn},e.arc(i,o,s,n.end,n.start,true),!r.bounds}interpolate(e){let{x:n,y:r,radius:i}=this,o=e.angle;return {x:n+Math.cos(o)*i,y:r+Math.sin(o)*i,angle:o}}};function sU(t){let{chart:e,fill:n,line:r}=t;if(Mn(n))return lU(e,n);if(n==="stack")return rU(t);if(n==="shape")return true;let i=cU(t);return i instanceof hy?i:Jw(i,r)}function lU(t,e){let n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function cU(t){return (t.scale||{}).getPointPositionForValue?dU(t):uU(t)}function uU(t){let{scale:e={},fill:n}=t,r=tU(n,e);if(Mn(r)){let i=e.isHorizontal();return {x:i?r:null,y:i?null:r}}return null}function dU(t){let{scale:e,fill:n}=t,r=e.options,i=e.getLabels().length,o=r.reverse?e.max:e.min,s=eU(n,e,o),c=[];if(r.grid.circular){let p=e.getPointPositionForValue(0,o);return new hy({x:p.x,y:p.y,radius:e.getDistanceFromCenterForValue(s)})}for(let p=0;p<i;++p)c.push(e.getPointPositionForValue(p,s));return c}function W0(t,e,n){let r=sU(e),{line:i,scale:o,axis:s}=e,c=i.options,p=c.fill,h=c.backgroundColor,{above:v=h,below:P=h}=p||{};r&&i.points.length&&(fl(t,n),pU(t,{line:i,target:r,above:v,below:P,area:n,scale:o,axis:s}),hl(t));}function pU(t,e){let{line:n,target:r,above:i,below:o,area:s,scale:c}=e,p=n._loop?"angle":e.axis;t.save(),p==="x"&&o!==i&&(Sw(t,r,s.top),Pw(t,{line:n,target:r,color:i,scale:c,property:p}),t.restore(),t.save(),Sw(t,r,s.bottom)),Pw(t,{line:n,target:r,color:o,scale:c,property:p}),t.restore();}function Sw(t,e,n){let{segments:r,points:i}=e,o=true,s=false;t.beginPath();for(let c of r){let{start:p,end:h}=c,v=i[p],P=i[a1(p,h,i)];o?(t.moveTo(v.x,v.y),o=false):(t.lineTo(v.x,n),t.lineTo(v.x,v.y)),s=!!e.pathSegment(t,c,{move:s}),s?t.closePath():t.lineTo(P.x,n);}t.lineTo(e.first().x,n),t.closePath(),t.clip();}function Pw(t,e){let{line:n,target:r,property:i,color:o,scale:s}=e,c=Q4(n,r,i);for(let{source:p,target:h,start:v,end:P}of c){let{style:{backgroundColor:x=o}={}}=p,T=r!==true;t.save(),t.fillStyle=x,fU(t,s,T&&i1(i,v,P)),t.beginPath();let I=!!n.pathSegment(t,p),R;if(T){I?t.closePath():xw(t,r,P,i);let A=!!r.pathSegment(t,h,{move:I,reverse:true});R=I&&A,R||xw(t,r,v,i);}t.closePath(),t.fill(R?"evenodd":"nonzero"),t.restore();}}function fU(t,e,n){let{top:r,bottom:i}=e.chart.chartArea,{property:o,start:s,end:c}=n||{};o==="x"&&(t.beginPath(),t.rect(s,r,c-s,i-r),t.clip());}function xw(t,e,n,r){let i=e.interpolate(n,r);i&&t.lineTo(i.x,i.y);}var tI={id:"filler",afterDatasetsUpdate(t,e,n){let r=(t.data.datasets||[]).length,i=[],o,s,c,p;for(s=0;s<r;++s)o=t.getDatasetMeta(s),c=o.dataset,p=null,c&&c.options&&c instanceof Go&&(p={visible:t.isDatasetVisible(s),index:s,fill:Z4(c,s,r),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:c}),o.$filler=p,i.push(p);for(s=0;s<r;++s)p=i[s],!(!p||p.fill===false)&&(p.fill=X4(i,s,n.propagate));},beforeDraw(t,e,n){let r=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let s=i.length-1;s>=0;--s){let c=i[s].$filler;c&&(c.line.updateControlPoints(o,c.axis),r&&c.fill&&W0(t.ctx,c,o));}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;let r=t.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){let o=r[i].$filler;Cw(o)&&W0(t.ctx,o,t.chartArea);}},beforeDatasetDraw(t,e,n){let r=e.meta.$filler;!Cw(r)||n.drawTime!=="beforeDatasetDraw"||W0(t.ctx,r,t.chartArea);},defaults:{propagate:true,drawTime:"beforeDatasetDraw"}},Ew=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},hU=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index,my=class extends br{constructor(e){super(),this._added=false,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=false,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0;}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit();}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height);}buildLabels(){let e=this.options.labels||{},n=Qe(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,i)=>e.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n;}fit(){let{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}let r=e.labels,i=Sn(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:c,itemHeight:p}=Ew(r,o),h,v;n.font=i.string,this.isHorizontal()?(h=this.maxWidth,v=this._fitRows(s,o,c,p)+10):(v=this.maxHeight,h=this._fitCols(s,o,c,p)+10),this.width=Math.min(h,e.maxWidth||this.maxWidth),this.height=Math.min(v,e.maxHeight||this.maxHeight);}_fitRows(e,n,r,i){let{ctx:o,maxWidth:s,options:{labels:{padding:c}}}=this,p=this.legendHitBoxes=[],h=this.lineWidths=[0],v=i+c,P=e;o.textAlign="left",o.textBaseline="middle";let x=-1,T=-v;return this.legendItems.forEach((I,R)=>{let A=r+n/2+o.measureText(I.text).width;(R===0||h[h.length-1]+A+2*c>s)&&(P+=v,h[h.length-(R>0?0:1)]=0,T+=v,x++),p[R]={left:0,top:T,row:x,width:A,height:i},h[h.length-1]+=A+c;}),P}_fitCols(e,n,r,i){let{ctx:o,maxHeight:s,options:{labels:{padding:c}}}=this,p=this.legendHitBoxes=[],h=this.columnSizes=[],v=s-e,P=c,x=0,T=0,I=0,R=0;return this.legendItems.forEach((A,O)=>{let N=r+n/2+o.measureText(A.text).width;O>0&&T+i+2*c>v&&(P+=x+c,h.push({width:x,height:T}),I+=x+c,R++,x=T=0),p[O]={left:I,top:T,col:R,width:N,height:i},x=Math.max(x,N),T+=i+c;}),P+=x,h.push({width:x,height:T}),P}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=ml(o,this.left,this.width);if(this.isHorizontal()){let c=0,p=Lr(r,this.left+i,this.right-this.lineWidths[c]);for(let h of n)c!==h.row&&(c=h.row,p=Lr(r,this.left+i,this.right-this.lineWidths[c])),h.top+=this.top+e+i,h.left=s.leftForLtr(s.x(p),h.width),p+=h.width+i;}else {let c=0,p=Lr(r,this.top+e+i,this.bottom-this.columnSizes[c].height);for(let h of n)h.col!==c&&(c=h.col,p=Lr(r,this.top+e+i,this.bottom-this.columnSizes[c].height)),h.top=p,h.left+=this.left+i,h.left=s.leftForLtr(s.x(h.left),h.width),p+=h.height+i;}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let e=this.ctx;fl(e,this),this._draw(),hl(e);}}_draw(){let{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=e,c=ke.color,p=ml(e.rtl,this.left,this.width),h=Sn(s.font),{color:v,padding:P}=s,x=h.size,T=x/2,I;this.drawTitle(),i.textAlign=p.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=h.string;let{boxWidth:R,boxHeight:A,itemHeight:O}=Ew(s,x),N=function(st,U,j){if(isNaN(R)||R<=0||isNaN(A)||A<0)return;i.save();let ut=me(j.lineWidth,1);if(i.fillStyle=me(j.fillStyle,c),i.lineCap=me(j.lineCap,"butt"),i.lineDashOffset=me(j.lineDashOffset,0),i.lineJoin=me(j.lineJoin,"miter"),i.lineWidth=ut,i.strokeStyle=me(j.strokeStyle,c),i.setLineDash(me(j.lineDash,[])),s.usePointStyle){let Y={radius:A*Math.SQRT2/2,pointStyle:j.pointStyle,rotation:j.rotation,borderWidth:ut},at=p.xPlus(st,R/2),pt=U+T;Wg(i,Y,at,pt,s.pointStyleWidth&&R);}else {let Y=U+Math.max((x-A)/2,0),at=p.leftForLtr(st,R),pt=$o(j.borderRadius);i.beginPath(),Object.values(pt).some(dt=>dt!==0)?os(i,{x:at,y:Y,w:R,h:A,radius:pt}):i.rect(at,Y,R,A),i.fill(),ut!==0&&i.stroke();}i.restore();},V=function(st,U,j){is(i,j.text,st,U+O/2,h,{strikethrough:j.hidden,textAlign:p.textAlign(j.textAlign)});},G=this.isHorizontal(),X=this._computeTitleHeight();G?I={x:Lr(o,this.left+P,this.right-r[0]),y:this.top+P+X,line:0}:I={x:this.left+P,y:Lr(o,this.top+X+P,this.bottom-n[0].height),line:0},ty(this.ctx,e.textDirection);let nt=O+P;this.legendItems.forEach((st,U)=>{i.strokeStyle=st.fontColor||v,i.fillStyle=st.fontColor||v;let j=i.measureText(st.text).width,ut=p.textAlign(st.textAlign||(st.textAlign=s.textAlign)),Y=R+T+j,at=I.x,pt=I.y;p.setWidth(this.width),G?U>0&&at+Y+P>this.right&&(pt=I.y+=nt,I.line++,at=I.x=Lr(o,this.left+P,this.right-r[I.line])):U>0&&pt+nt>this.bottom&&(at=I.x=at+n[I.line].width+P,I.line++,pt=I.y=Lr(o,this.top+X+P,this.bottom-n[I.line].height));let dt=p.x(at);N(dt,pt,st),at=S0(ut,at+R+T,G?at+Y:this.right,e.rtl),V(p.x(at),pt,st),G?I.x+=Y+P:I.y+=nt;}),ey(this.ctx,e.textDirection);}drawTitle(){let e=this.options,n=e.title,r=Sn(n.font),i=$n(n.padding);if(!n.display)return;let o=ml(e.rtl,this.left,this.width),s=this.ctx,c=n.position,p=r.size/2,h=i.top+p,v,P=this.left,x=this.width;if(this.isHorizontal())x=Math.max(...this.lineWidths),v=this.top+h,P=Lr(e.align,P,this.right-x);else {let I=this.columnSizes.reduce((R,A)=>Math.max(R,A.height),0);v=h+Lr(e.align,this.top,this.bottom-I-e.labels.padding-this._computeTitleHeight());}let T=Lr(c,P,P+x);s.textAlign=o.textAlign(uf(c)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,is(s,n.text,T,v,r);}_computeTitleHeight(){let e=this.options.title,n=Sn(e.font),r=$n(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,o;if(Uo(e,this.left,this.right)&&Uo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Uo(e,i.left,i.left+i.width)&&Uo(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(e){let n=this.options;if(!mU(e.type,n))return;let r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){let i=this._hoveredItem,o=hU(i,r);i&&!o&&Qe(n.onLeave,[e,i,this],this),this._hoveredItem=r,r&&!o&&Qe(n.onHover,[e,r,this],this);}else r&&Qe(n.onClick,[e,r,this],this);}};function mU(t,e){return !!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var eI={id:"legend",_element:my,start(t,e,n){let r=t.legend=new my({ctx:t.ctx,options:n,chart:t});yo.configure(t,r,n),yo.addBox(t,r);},stop(t){yo.removeBox(t,t.legend),delete t.legend;},beforeUpdate(t,e,n){let r=t.legend;yo.configure(t,r,n),r.options=n;},afterUpdate(t){let e=t.legend;e.buildLabels(),e.adjustHitBoxes();},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event);},defaults:{display:true,position:"top",align:"center",fullSize:true,reverse:false,weight:1e3,onClick(t,e,n){let r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=true):(i.show(r),e.hidden=false);},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map(s=>{let c=s.controller.getStyle(n?0:void 0),p=$n(c.borderWidth);return {text:e[s.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!s.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:0,datasetIndex:s.index}},this)}},title:{color:t=>t.chart.options.color,display:false,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},gy=class extends br{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0;}update(e,n){let r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;let i=He(r.text)?r.text.length:1;this._padding=$n(r.padding);let o=i*Sn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o;}isHorizontal(){let e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){let{top:n,left:r,bottom:i,right:o,options:s}=this,c=s.align,p=0,h,v,P;return this.isHorizontal()?(v=Lr(c,r,o),P=n+e,h=o-r):(s.position==="left"?(v=r+e,P=Lr(c,i,n),p=Be*-0.5):(v=o-e,P=Lr(c,n,i),p=Be*.5),h=i-n),{titleX:v,titleY:P,maxWidth:h,rotation:p}}draw(){let e=this.ctx,n=this.options;if(!n.display)return;let r=Sn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:c,maxWidth:p,rotation:h}=this._drawArgs(o);is(e,n.text,0,0,r,{color:n.color,maxWidth:p,rotation:h,textAlign:uf(n.align),textBaseline:"middle",translation:[s,c]});}};function gU(t,e){let n=new gy({ctx:t.ctx,options:e,chart:t});yo.configure(t,n,e),yo.addBox(t,n),t.titleBlock=n;}var nI={id:"title",_element:gy,start(t,e,n){gU(t,n);},stop(t){let e=t.titleBlock;yo.removeBox(t,e),delete t.titleBlock;},beforeUpdate(t,e,n){let r=t.titleBlock;yo.configure(t,r,n),r.options=n;},defaults:{align:"center",display:false,font:{weight:"bold"},fullSize:true,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:true,_indexable:false}};var Pf={average(t){if(!t.length)return false;let e,n,r=0,i=0,o=0;for(e=0,n=t.length;e<n;++e){let s=t[e].element;if(s&&s.hasValue()){let c=s.tooltipPosition();r+=c.x,i+=c.y,++o;}}return {x:r/o,y:i/o}},nearest(t,e){if(!t.length)return false;let n=e.x,r=e.y,i=Number.POSITIVE_INFINITY,o,s,c;for(o=0,s=t.length;o<s;++o){let p=t[o].element;if(p&&p.hasValue()){let h=p.getCenterPoint(),v=ns(e,h);v<i&&(i=v,c=p);}}if(c){let p=c.tooltipPosition();n=p.x,r=p.y;}return {x:n,y:r}}};function va(t,e){return e&&(He(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ls(t){return (typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
5646
|
+
`;function fT({currencyId:t,localization:e,decimalPlaces:n,showUnits:r=true,showSymbol:i=false}){var v;let o=fc(Mo),s=ve({optional:true}),c=s==null?void 0:s.theme,p=(v=e==null?void 0:e.title)!=null?v:uT.title,h=jsxRuntime.jsx(J5,{className:"stigg-credit-balance-container",children:jsxRuntime.jsxs(tB,{className:"stigg-credit-balance-card",children:[jsxRuntime.jsx(rt,{variant:"h6",color:"primary",className:"stigg-credit-balance-title",children:p}),jsxRuntime.jsx(cT,{currencyId:t,decimalPlaces:n,showUnits:r,showSymbol:i})]})});return o?h:jsxRuntime.jsx(vi,{componentTheme:c,children:h})}function Bo(){}var d0=(function(){let t=0;return function(){return t++}})();function Le(t){return t===null||typeof t=="undefined"}function He(t){if(Array.isArray&&Array.isArray(t))return true;let e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Te(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}var Mn=t=>(typeof t=="number"||t instanceof Number)&&isFinite(+t);function xi(t,e){return Mn(t)?t:e}function me(t,e){return typeof t=="undefined"?e:t}var p0=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:t/e,Og=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Qe(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function tn(t,e,n,r){let i,o,s;if(He(t))if(o=t.length,r);else for(i=0;i<o;i++)e.call(n,t[i],i);else if(Te(t))for(s=Object.keys(t),o=s.length,i=0;i<o;i++)e.call(n,t[s[i]],s[i]);}function rd(t,e){let n,r,i,o;if(!t||!e||t.length!==e.length)return false;for(n=0,r=t.length;n<r;++n)if(i=t[n],o=e[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return false;return true}function of(t){if(He(t))return t.map(of);if(Te(t)){let e=Object.create(null),n=Object.keys(t),r=n.length,i=0;for(;i<r;++i)e[n[i]]=of(t[n[i]]);return e}return t}function wT(t){return ["__proto__","prototype","constructor"].indexOf(t)===-1}function IT(t,e,n,r){if(!wT(t))return;let i=e[t],o=n[t];Te(i)&&Te(o)?ji(i,o,r):e[t]=of(o);}function ji(t,e,n){let r=He(e)?e:[e],i=r.length;if(!Te(t))return t;n=n||{};let o=n.merger||IT;for(let s=0;s<i;++s){if(e=r[s],!Te(e))continue;let c=Object.keys(e);for(let p=0,h=c.length;p<h;++p)o(c[p],t,e,n);}return t}function xc(t,e){return ji(t,e,{merger:kT})}function kT(t,e,n){if(!wT(t))return;let r=e[t],i=n[t];Te(r)&&Te(i)?xc(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=of(i));}var hT={"":t=>t,x:t=>t.x,y:t=>t.y};function ya(t,e){return (hT[e]||(hT[e]=nB(e)))(t)}function nB(t){let e=DT(t);return n=>{for(let r of e){if(r==="")break;n=n&&n[r];}return n}}function DT(t){let e=t.split("."),n=[],r="";for(let i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function sf(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Fn=t=>typeof t!="undefined",Gr=t=>typeof t=="function",Rg=(t,e)=>{if(t.size!==e.size)return false;for(let n of t)if(!e.has(n))return false;return true};function f0(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}var Be=Math.PI,rn=2*Be,AT=rn+Be,af=Number.POSITIVE_INFINITY,lf=Be/180,bn=Be/2,mo=Be/4,td=Be*2/3,Ei=Math.log10,go=Math.sign;function Fg(t){let e=Math.round(t);t=Ec(t,e,t/1e3)?e:t;let n=Math.pow(10,Math.floor(Ei(t))),r=t/n;return (r<=1?1:r<=2?2:r<=5?5:10)*n}function h0(t){let e=[],n=Math.sqrt(t),r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((i,o)=>i-o).pop(),e}function Vi(t){return !isNaN(parseFloat(t))&&isFinite(t)}function Ec(t,e,n){return Math.abs(t-e)<n}function m0(t,e){let n=Math.round(t);return n-e<=t&&n+e>=t}function Mg(t,e,n){let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o));}function Qn(t){return t*(Be/180)}function _c(t){return t*(180/Be)}function Ng(t){if(!Mn(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Lg(t,e){let n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r),o=Math.atan2(r,n);return o<-0.5*Be&&(o+=rn),{angle:o,distance:i}}function ns(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function OT(t,e){return (t-e+AT)%rn-Be}function ai(t){return (t%rn+rn)%rn}function Tc(t,e,n,r){let i=ai(t),o=ai(e),s=ai(n),c=ai(o-i),p=ai(s-i),h=ai(i-o),v=ai(i-s);return i===o||i===s||r&&o===s||c>p&&h<v}function Nr(t,e,n){return Math.max(e,Math.min(n,t))}function g0(t){return Nr(t,-32768,32767)}function Uo(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function cf(t,e,n){n=n||(s=>t[s]<e);let r=t.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return {lo:i,hi:r}}var es=(t,e,n,r)=>cf(t,n,r?i=>t[i][e]<=n:i=>t[i][e]<n),y0=(t,e,n)=>cf(t,n,r=>t[r][e]>=n);function b0(t,e,n){let r=0,i=t.length;for(;r<i&&t[r]<e;)r++;for(;i>r&&t[i-1]>n;)i--;return r>0||i<t.length?t.slice(r,i):t}var RT=["push","pop","shift","splice","unshift"];function v0(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:true,enumerable:false,value:{listeners:[e]}}),RT.forEach(n=>{let r="_onData"+sf(n),i=t[n];Object.defineProperty(t,n,{configurable:true,enumerable:false,value(...o){let s=i.apply(this,o);return t._chartjs.listeners.forEach(c=>{typeof c[r]=="function"&&c[r](...o);}),s}});});}function Bg(t,e){let n=t._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(e);i!==-1&&r.splice(i,1),!(r.length>0)&&(RT.forEach(o=>{delete t[o];}),delete t._chartjs);}function Ug(t){let e=new Set,n,r;for(n=0,r=t.length;n<r;++n)e.add(t[n]);return e.size===r?t:Array.from(e)}var $g=(function(){return typeof window=="undefined"?function(t){return t()}:window.requestAnimationFrame})();function Gg(t,e,n){let r=n||(s=>Array.prototype.slice.call(s)),i=false,o=[];return function(...s){o=r(s),i||(i=true,$g.call(window,()=>{i=false,t.apply(e,o);}));}}function C0(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}var uf=t=>t==="start"?"left":t==="end"?"right":"center",Lr=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,S0=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function jg(t,e,n){let r=e.length,i=0,o=r;if(t._sorted){let{iScale:s,_parsed:c}=t,p=s.axis,{min:h,max:v,minDefined:P,maxDefined:x}=s.getUserBounds();P&&(i=Nr(Math.min(es(c,s.axis,h).lo,n?r:es(e,p,s.getPixelForValue(h)).lo),0,r-1)),x?o=Nr(Math.max(es(c,s.axis,v,true).hi+1,n?0:es(e,p,s.getPixelForValue(v),true).hi+1),i,r)-i:o=r-i;}return {start:i,count:o}}function Vg(t){let{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,true;let o=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}var _g=t=>t===0||t===1,mT=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*rn/n)),gT=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*rn/n)+1,Cc={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*bn)+1,easeOutSine:t=>Math.sin(t*bn),easeInOutSine:t=>-0.5*(Math.cos(Be*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>_g(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>_g(t)?t:mT(t,.075,.3),easeOutElastic:t=>_g(t)?t:gT(t,.075,.3),easeInOutElastic(t){return _g(t)?t:t<.5?.5*mT(t*2,.1125,.45):.5+.5*gT(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return (t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return (t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Cc.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Cc.easeInBounce(t*2)*.5:Cc.easeOutBounce(t*2-1)*.5+.5};function df(t){return t+.5|0}var cl=(t,e,n)=>Math.max(Math.min(t,n),e);function nf(t){return cl(df(t*2.55),0,255)}function ul(t){return cl(df(t*255),0,255)}function Ja(t){return cl(df(t/2.55)/100,0,1)}function yT(t){return cl(df(t*100),0,100)}var ho={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},l0=[..."0123456789ABCDEF"],rB=t=>l0[t&15],iB=t=>l0[(t&240)>>4]+l0[t&15],Tg=t=>(t&240)>>4===(t&15),oB=t=>Tg(t.r)&&Tg(t.g)&&Tg(t.b)&&Tg(t.a);function aB(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&ho[t[1]]*17,g:255&ho[t[2]]*17,b:255&ho[t[3]]*17,a:e===5?ho[t[4]]*17:255}:(e===7||e===9)&&(n={r:ho[t[1]]<<4|ho[t[2]],g:ho[t[3]]<<4|ho[t[4]],b:ho[t[5]]<<4|ho[t[6]],a:e===9?ho[t[7]]<<4|ho[t[8]]:255})),n}var sB=(t,e)=>t<255?e(t):"";function lB(t){var e=oB(t)?rB:iB;return t?"#"+e(t.r)+e(t.g)+e(t.b)+sB(t.a,e):void 0}var cB=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function FT(t,e,n){let r=e*Math.min(n,1-n),i=(o,s=(o+t/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return [i(0),i(8),i(4)]}function uB(t,e,n){let r=(i,o=(i+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return [r(5),r(3),r(1)]}function dB(t,e,n){let r=FT(t,1,.5),i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function pB(t,e,n,r,i){return t===i?(e-n)/r+(e<n?6:0):e===i?(n-t)/r+2:(t-e)/r+4}function P0(t){let n=t.r/255,r=t.g/255,i=t.b/255,o=Math.max(n,r,i),s=Math.min(n,r,i),c=(o+s)/2,p,h,v;return o!==s&&(v=o-s,h=c>.5?v/(2-o-s):v/(o+s),p=pB(n,r,i,v,o),p=p*60+.5),[p|0,h||0,c]}function x0(t,e,n,r){return (Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(ul)}function E0(t,e,n){return x0(FT,t,e,n)}function fB(t,e,n){return x0(dB,t,e,n)}function hB(t,e,n){return x0(uB,t,e,n)}function MT(t){return (t%360+360)%360}function mB(t){let e=cB.exec(t),n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?nf(+e[5]):ul(+e[5]));let i=MT(+e[2]),o=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?r=fB(i,o,s):e[1]==="hsv"?r=hB(i,o,s):r=E0(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function gB(t,e){var n=P0(t);n[0]=MT(n[0]+e),n=E0(n),t.r=n[0],t.g=n[1],t.b=n[2];}function yB(t){if(!t)return;let e=P0(t),n=e[0],r=yT(e[1]),i=yT(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${Ja(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}var bT={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},vT={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function bB(){let t={},e=Object.keys(vT),n=Object.keys(bT),r,i,o,s,c;for(r=0;r<e.length;r++){for(s=c=e[r],i=0;i<n.length;i++)o=n[i],c=c.replace(o,bT[o]);o=parseInt(vT[s],16),t[c]=[o>>16&255,o>>8&255,o&255];}return t}var wg;function vB(t){wg||(wg=bB(),wg.transparent=[0,0,0,0]);let e=wg[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}var CB=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function SB(t){let e=CB.exec(t),n=255,r,i,o;if(e){if(e[7]!==r){let s=+e[7];n=e[8]?nf(s):cl(s*255,0,255);}return r=+e[1],i=+e[3],o=+e[5],r=255&(e[2]?nf(r):cl(r,0,255)),i=255&(e[4]?nf(i):cl(i,0,255)),o=255&(e[6]?nf(o):cl(o,0,255)),{r,g:i,b:o,a:n}}}function PB(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ja(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}var o0=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Ju=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function xB(t,e,n){let r=Ju(Ja(t.r)),i=Ju(Ja(t.g)),o=Ju(Ja(t.b));return {r:ul(o0(r+n*(Ju(Ja(e.r))-r))),g:ul(o0(i+n*(Ju(Ja(e.g))-i))),b:ul(o0(o+n*(Ju(Ja(e.b))-o))),a:t.a+n*(e.a-t.a)}}function Ig(t,e,n){if(t){let r=P0(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=E0(r),t.r=r[0],t.g=r[1],t.b=r[2];}}function NT(t,e){return t&&Object.assign(e||{},t)}function CT(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ul(t[3]))):(e=NT(t,{r:0,g:0,b:0,a:1}),e.a=ul(e.a)),e}function EB(t){return t.charAt(0)==="r"?SB(t):mB(t)}var c0=class t{constructor(e){if(e instanceof t)return e;let n=typeof e,r;n==="object"?r=CT(e):n==="string"&&(r=aB(e)||vB(e)||EB(e)),this._rgb=r,this._valid=!!r;}get valid(){return this._valid}get rgb(){var e=NT(this._rgb);return e&&(e.a=Ja(e.a)),e}set rgb(e){this._rgb=CT(e);}rgbString(){return this._valid?PB(this._rgb):void 0}hexString(){return this._valid?lB(this._rgb):void 0}hslString(){return this._valid?yB(this._rgb):void 0}mix(e,n){if(e){let r=this.rgb,i=e.rgb,o,s=n===o?.5:n,c=2*s-1,p=r.a-i.a,h=((c*p===-1?c:(c+p)/(1+c*p))+1)/2;o=1-h,r.r=255&h*r.r+o*i.r+.5,r.g=255&h*r.g+o*i.g+.5,r.b=255&h*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r;}return this}interpolate(e,n){return e&&(this._rgb=xB(this._rgb,e._rgb,n)),this}clone(){return new t(this.rgb)}alpha(e){return this._rgb.a=ul(e),this}clearer(e){let n=this._rgb;return n.a*=1-e,this}greyscale(){let e=this._rgb,n=df(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){let n=this._rgb;return n.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ig(this._rgb,2,e),this}darken(e){return Ig(this._rgb,2,-e),this}saturate(e){return Ig(this._rgb,1,e),this}desaturate(e){return Ig(this._rgb,1,-e),this}rotate(e){return gB(this._rgb,e),this}};function LT(t){return new c0(t)}function _0(t){if(t&&typeof t=="object"){let e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return false}function wc(t){return _0(t)?t:LT(t)}function Dg(t){return _0(t)?t:LT(t).saturate(.5).darken(.1).hexString()}var pl=Object.create(null),zg=Object.create(null);function rf(t,e){if(!e)return t;let n=e.split(".");for(let r=0,i=n.length;r<i;++r){let o=n[r];t=t[o]||(t[o]=Object.create(null));}return t}function a0(t,e,n){return typeof e=="string"?ji(rf(t,e),n):ji(rf(t,""),e)}var u0=class{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>Dg(r.backgroundColor),this.hoverBorderColor=(n,r)=>Dg(r.borderColor),this.hoverColor=(n,r)=>Dg(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:true,includeInvisible:false},this.maintainAspectRatio=true,this.onHover=null,this.onClick=null,this.parsing=true,this.plugins={},this.responsive=true,this.scale=void 0,this.scales={},this.showLine=true,this.drawActiveElementsOnTop=true,this.describe(e);}set(e,n){return a0(this,e,n)}get(e){return rf(this,e)}describe(e,n){return a0(zg,e,n)}override(e,n){return a0(pl,e,n)}route(e,n,r,i){let o=rf(this,e),s=rf(this,r),c="_"+n;Object.defineProperties(o,{[c]:{value:o[n],writable:true},[n]:{enumerable:true,get(){let p=this[c],h=s[i];return Te(p)?Object.assign({},h,p):me(p,h)},set(p){this[c]=p;}}});}},ke=new u0({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:false,_indexable:false}});function BT(t){return !t||Le(t.size)||Le(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function ed(t,e,n,r,i){let o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>r&&(r=o),r}function T0(t,e,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},o=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let s=0,c=n.length,p,h,v,P,x;for(p=0;p<c;p++)if(P=n[p],P!=null&&He(P)!==true)s=ed(t,i,o,s,P);else if(He(P))for(h=0,v=P.length;h<v;h++)x=P[h],x!=null&&!He(x)&&(s=ed(t,i,o,s,x));t.restore();let T=o.length/2;if(T>n.length){for(p=0;p<T;p++)delete i[o[p]];o.splice(0,T);}return s}function rs(t,e,n){let r=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function Hg(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore();}function pf(t,e,n,r){Wg(t,e,n,r,null);}function Wg(t,e,n,r,i){let o,s,c,p,h,v,P=e.pointStyle,x=e.rotation,T=e.radius,I=(x||0)*lf;if(P&&typeof P=="object"&&(o=P.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(I),t.drawImage(P,-P.width/2,-P.height/2,P.width,P.height),t.restore();return}if(!(isNaN(T)||T<=0)){switch(t.beginPath(),P){default:i?t.ellipse(n,r,i/2,T,0,0,rn):t.arc(n,r,T,0,rn),t.closePath();break;case "triangle":t.moveTo(n+Math.sin(I)*T,r-Math.cos(I)*T),I+=td,t.lineTo(n+Math.sin(I)*T,r-Math.cos(I)*T),I+=td,t.lineTo(n+Math.sin(I)*T,r-Math.cos(I)*T),t.closePath();break;case "rectRounded":h=T*.516,p=T-h,s=Math.cos(I+mo)*p,c=Math.sin(I+mo)*p,t.arc(n-s,r-c,h,I-Be,I-bn),t.arc(n+c,r-s,h,I-bn,I),t.arc(n+s,r+c,h,I,I+bn),t.arc(n-c,r+s,h,I+bn,I+Be),t.closePath();break;case "rect":if(!x){p=Math.SQRT1_2*T,v=i?i/2:p,t.rect(n-v,r-p,2*v,2*p);break}I+=mo;case "rectRot":s=Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+c,r-s),t.lineTo(n+s,r+c),t.lineTo(n-c,r+s),t.closePath();break;case "crossRot":I+=mo;case "cross":s=Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+s,r+c),t.moveTo(n+c,r-s),t.lineTo(n-c,r+s);break;case "star":s=Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+s,r+c),t.moveTo(n+c,r-s),t.lineTo(n-c,r+s),I+=mo,s=Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+s,r+c),t.moveTo(n+c,r-s),t.lineTo(n-c,r+s);break;case "line":s=i?i/2:Math.cos(I)*T,c=Math.sin(I)*T,t.moveTo(n-s,r-c),t.lineTo(n+s,r+c);break;case "dash":t.moveTo(n,r),t.lineTo(n+Math.cos(I)*T,r+Math.sin(I)*T);break}t.fill(),e.borderWidth>0&&t.stroke();}}function Pc(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function fl(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip();}function hl(t){t.restore();}function w0(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){let o=(e.x+n.x)/2;t.lineTo(o,e.y),t.lineTo(o,n.y);}else i==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y);}function I0(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y);}function is(t,e,n,r,i,o={}){let s=He(e)?e:[e],c=o.strokeWidth>0&&o.strokeColor!=="",p,h;for(t.save(),t.font=i.string,_B(t,o),p=0;p<s.length;++p)h=s[p],c&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),Le(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,n,r,o.maxWidth)),t.fillText(h,n,r,o.maxWidth),TB(t,n,r,h,o),r+=i.lineHeight;t.restore();}function _B(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Le(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline);}function TB(t,e,n,r,i){if(i.strikethrough||i.underline){let o=t.measureText(r),s=e-o.actualBoundingBoxLeft,c=e+o.actualBoundingBoxRight,p=n-o.actualBoundingBoxAscent,h=n+o.actualBoundingBoxDescent,v=i.strikethrough?(p+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(s,v),t.lineTo(c,v),t.stroke();}}function os(t,e){let{x:n,y:r,w:i,h:o,radius:s}=e;t.arc(n+s.topLeft,r+s.topLeft,s.topLeft,-bn,Be,true),t.lineTo(n,r+o-s.bottomLeft),t.arc(n+s.bottomLeft,r+o-s.bottomLeft,s.bottomLeft,Be,bn,true),t.lineTo(n+i-s.bottomRight,r+o),t.arc(n+i-s.bottomRight,r+o-s.bottomRight,s.bottomRight,bn,0,true),t.lineTo(n+i,r+s.topRight),t.arc(n+i-s.topRight,r+s.topRight,s.topRight,0,-bn,true),t.lineTo(n+s.topLeft,r);}var wB=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),IB=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function UT(t,e){let n=(""+t).match(wB);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case "px":return t;case "%":t/=100;break}return e*t}var kB=t=>+t||0;function ff(t,e){let n={},r=Te(e),i=r?Object.keys(e):e,o=Te(t)?r?s=>me(t[s],t[e[s]]):s=>t[s]:()=>t;for(let s of i)n[s]=kB(o(s));return n}function qg(t){return ff(t,{top:"y",right:"x",bottom:"y",left:"x"})}function $o(t){return ff(t,["topLeft","topRight","bottomLeft","bottomRight"])}function $n(t){let e=qg(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Sn(t,e){t=t||{},e=e||ke.font;let n=me(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=me(t.style,e.style);r&&!(""+r).match(IB)&&(console.warn('Invalid font style specified: "'+r+'"'),r="");let i={family:me(t.family,e.family),lineHeight:UT(me(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:me(t.weight,e.weight),string:""};return i.string=BT(i),i}function In(t,e,n,r){let o,s,c;for(o=0,s=t.length;o<s;++o)if(c=t[o],c!==void 0&&(e!==void 0&&typeof c=="function"&&(c=c(e),false),n!==void 0&&He(c)&&(c=c[n%c.length],false),c!==void 0))return c}function k0(t,e,n){let{min:r,max:i}=t,o=Og(e,(i-r)/2),s=(c,p)=>n&&c===0?0:c+p;return {min:s(r,-Math.abs(o)),max:s(i,o)}}function ba(t,e){return Object.assign(Object.create(t),e)}function hf(t,e=[""],n=t,r,i=()=>t[0]){Fn(r)||(r=jT("_fallback",t));let o={[Symbol.toStringTag]:"Object",_cacheable:true,_scopes:t,_rootScopes:n,_fallback:r,_getTarget:i,override:s=>hf([s,...t],e,n,r)};return new Proxy(o,{deleteProperty(s,c){return delete s[c],delete s._keys,delete t[0][c],true},get(s,c){return $T(s,c,()=>LB(c,e,t,s))},getOwnPropertyDescriptor(s,c){return Reflect.getOwnPropertyDescriptor(s._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(s,c){return PT(s).includes(c)},ownKeys(s){return PT(s)},set(s,c,p){let h=s._storage||(s._storage=i());return s[c]=h[c]=p,delete s._keys,true}})}function dl(t,e,n,r){let i={_cacheable:false,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Yg(t,r),setContext:o=>dl(t,o,n,r),override:o=>dl(t.override(o),e,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete t[s],true},get(o,s,c){return $T(o,s,()=>AB(o,s,c))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(t,s)?{enumerable:true,configurable:true}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(o,s,c){return t[s]=c,delete o[s],true}})}function Yg(t,e={scriptable:true,indexable:true}){let{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return {allKeys:i,scriptable:n,indexable:r,isScriptable:Gr(n)?n:()=>n,isIndexable:Gr(r)?r:()=>r}}var DB=(t,e)=>t?t+sf(e):e,D0=(t,e)=>Te(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function $T(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];let r=n();return t[e]=r,r}function AB(t,e,n){let{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=t,c=r[e];return Gr(c)&&s.isScriptable(e)&&(c=OB(e,c,t,n)),He(c)&&c.length&&(c=RB(e,c,t,s.isIndexable)),D0(e,c)&&(c=dl(c,i,o&&o[e],s)),c}function OB(t,e,n,r){let{_proxy:i,_context:o,_subProxy:s,_stack:c}=n;if(c.has(t))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+t);return c.add(t),e=e(o,s||r),c.delete(t),D0(t,e)&&(e=A0(i._scopes,i,t,e)),e}function RB(t,e,n,r){let{_proxy:i,_context:o,_subProxy:s,_descriptors:c}=n;if(Fn(o.index)&&r(t))e=e[o.index%e.length];else if(Te(e[0])){let p=e,h=i._scopes.filter(v=>v!==p);e=[];for(let v of p){let P=A0(h,i,t,v);e.push(dl(P,o,s&&s[t],c));}}return e}function GT(t,e,n){return Gr(t)?t(e,n):t}var FB=(t,e)=>t===true?e:typeof t=="string"?ya(e,t):void 0;function MB(t,e,n,r,i){for(let o of e){let s=FB(n,o);if(s){t.add(s);let c=GT(s._fallback,n,i);if(Fn(c)&&c!==n&&c!==r)return c}else if(s===false&&Fn(r)&&n!==r)return null}return false}function A0(t,e,n,r){let i=e._rootScopes,o=GT(e._fallback,n,r),s=[...t,...i],c=new Set;c.add(r);let p=ST(c,s,n,o||n,r);return p===null||Fn(o)&&o!==n&&(p=ST(c,s,o,p,r),p===null)?false:hf(Array.from(c),[""],i,o,()=>NB(e,n,r))}function ST(t,e,n,r,i){for(;n;)n=MB(t,e,n,r,i);return n}function NB(t,e,n){let r=t._getTarget();e in r||(r[e]={});let i=r[e];return He(i)&&Te(n)?n:i}function LB(t,e,n,r){let i;for(let o of e)if(i=jT(DB(o,t),n),Fn(i))return D0(t,i)?A0(n,r,t,i):i}function jT(t,e){for(let n of e){if(!n)continue;let r=n[t];if(Fn(r))return r}}function PT(t){let e=t._keys;return e||(e=t._keys=BB(t._scopes)),e}function BB(t){let e=new Set;for(let n of t)for(let r of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(r);return Array.from(e)}function Qg(t,e,n,r){let{iScale:i}=t,{key:o="r"}=this._parsing,s=new Array(r),c,p,h,v;for(c=0,p=r;c<p;++c)h=c+n,v=e[h],s[c]={r:i.parse(ya(v,o),h)};return s}var UB=Number.EPSILON||1e-14,nd=(t,e)=>e<t.length&&!t[e].skip&&t[e],VT=t=>t==="x"?"y":"x";function zT(t,e,n,r){let i=t.skip?e:t,o=e,s=n.skip?e:n,c=ns(o,i),p=ns(s,o),h=c/(c+p),v=p/(c+p);h=isNaN(h)?0:h,v=isNaN(v)?0:v;let P=r*h,x=r*v;return {previous:{x:o.x-P*(s.x-i.x),y:o.y-P*(s.y-i.y)},next:{x:o.x+x*(s.x-i.x),y:o.y+x*(s.y-i.y)}}}function $B(t,e,n){let r=t.length,i,o,s,c,p,h=nd(t,0);for(let v=0;v<r-1;++v)if(p=h,h=nd(t,v+1),!(!p||!h)){if(Ec(e[v],0,UB)){n[v]=n[v+1]=0;continue}i=n[v]/e[v],o=n[v+1]/e[v],c=Math.pow(i,2)+Math.pow(o,2),!(c<=9)&&(s=3/Math.sqrt(c),n[v]=i*s*e[v],n[v+1]=o*s*e[v]);}}function GB(t,e,n="x"){let r=VT(n),i=t.length,o,s,c,p=nd(t,0);for(let h=0;h<i;++h){if(s=c,c=p,p=nd(t,h+1),!c)continue;let v=c[n],P=c[r];s&&(o=(v-s[n])/3,c[`cp1${n}`]=v-o,c[`cp1${r}`]=P-o*e[h]),p&&(o=(p[n]-v)/3,c[`cp2${n}`]=v+o,c[`cp2${r}`]=P+o*e[h]);}}function HT(t,e="x"){let n=VT(e),r=t.length,i=Array(r).fill(0),o=Array(r),s,c,p,h=nd(t,0);for(s=0;s<r;++s)if(c=p,p=h,h=nd(t,s+1),!!p){if(h){let v=h[e]-p[e];i[s]=v!==0?(h[n]-p[n])/v:0;}o[s]=c?h?go(i[s-1])!==go(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s];}$B(t,i,o),GB(t,o,e);}function kg(t,e,n){return Math.max(Math.min(t,n),e)}function jB(t,e){let n,r,i,o,s,c=Pc(t[0],e);for(n=0,r=t.length;n<r;++n)s=o,o=c,c=n<r-1&&Pc(t[n+1],e),o&&(i=t[n],s&&(i.cp1x=kg(i.cp1x,e.left,e.right),i.cp1y=kg(i.cp1y,e.top,e.bottom)),c&&(i.cp2x=kg(i.cp2x,e.left,e.right),i.cp2y=kg(i.cp2y,e.top,e.bottom)));}function O0(t,e,n,r,i){let o,s,c,p;if(e.spanGaps&&(t=t.filter(h=>!h.skip)),e.cubicInterpolationMode==="monotone")HT(t,i);else {let h=r?t[t.length-1]:t[0];for(o=0,s=t.length;o<s;++o)c=t[o],p=zT(h,c,t[Math.min(o+1,s-(r?0:1))%s],e.tension),c.cp1x=p.previous.x,c.cp1y=p.previous.y,c.cp2x=p.next.x,c.cp2y=p.next.y,h=c;}e.capBezierPoints&&jB(t,n);}function Kg(){return typeof window!="undefined"&&typeof document!="undefined"}function mf(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Ag(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}var Xg=t=>window.getComputedStyle(t,null);function WT(t,e){return Xg(t).getPropertyValue(e)}var VB=["top","right","bottom","left"];function Sc(t,e,n){let r={};n=n?"-"+n:"";for(let i=0;i<4;i++){let o=VB[i];r[o]=parseFloat(t[e+"-"+o+n])||0;}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var zB=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function HB(t,e){let n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:o}=r,s=false,c,p;if(zB(i,o,t.target))c=i,p=o;else {let h=e.getBoundingClientRect();c=r.clientX-h.left,p=r.clientY-h.top,s=true;}return {x:c,y:p,box:s}}function as(t,e){if("native"in t)return t;let{canvas:n,currentDevicePixelRatio:r}=e,i=Xg(n),o=i.boxSizing==="border-box",s=Sc(i,"padding"),c=Sc(i,"border","width"),{x:p,y:h,box:v}=HB(t,n),P=s.left+(v&&c.left),x=s.top+(v&&c.top),{width:T,height:I}=e;return o&&(T-=s.width+c.width,I-=s.height+c.height),{x:Math.round((p-P)/T*n.width/r),y:Math.round((h-x)/I*n.height/r)}}function WB(t,e,n){let r,i;if(e===void 0||n===void 0){let o=mf(t);if(!o)e=t.clientWidth,n=t.clientHeight;else {let s=o.getBoundingClientRect(),c=Xg(o),p=Sc(c,"border","width"),h=Sc(c,"padding");e=s.width-h.width-p.width,n=s.height-h.height-p.height,r=Ag(c.maxWidth,o,"clientWidth"),i=Ag(c.maxHeight,o,"clientHeight");}}return {width:e,height:n,maxWidth:r||af,maxHeight:i||af}}var s0=t=>Math.round(t*10)/10;function R0(t,e,n,r){let i=Xg(t),o=Sc(i,"margin"),s=Ag(i.maxWidth,t,"clientWidth")||af,c=Ag(i.maxHeight,t,"clientHeight")||af,p=WB(t,e,n),{width:h,height:v}=p;if(i.boxSizing==="content-box"){let P=Sc(i,"border","width"),x=Sc(i,"padding");h-=x.width+P.width,v-=x.height+P.height;}return h=Math.max(0,h-o.width),v=Math.max(0,r?Math.floor(h/r):v-o.height),h=s0(Math.min(h,s,p.maxWidth)),v=s0(Math.min(v,c,p.maxHeight)),h&&!v&&(v=s0(h/2)),{width:h,height:v}}function Zg(t,e,n){let r=e||1,i=Math.floor(t.height*r),o=Math.floor(t.width*r);t.height=i/r,t.width=o/r;let s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(t.currentDevicePixelRatio=r,s.height=i,s.width=o,t.ctx.setTransform(r,0,0,r,0,0),true):false}var F0=(function(){let t=false;try{let e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e);}catch(e){}return t})();function Jg(t,e){let n=WT(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ts(t,e,n,r){return {x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function M0(t,e,n,r){return {x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function N0(t,e,n,r){let i={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=ts(t,i,n),c=ts(i,o,n),p=ts(o,e,n),h=ts(s,c,n),v=ts(c,p,n);return ts(h,v,n)}var xT=new Map;function qB(t,e){e=e||{};let n=t+JSON.stringify(e),r=xT.get(n);return r||(r=new Intl.NumberFormat(t,e),xT.set(n,r)),r}function Ic(t,e,n){return qB(e,n).format(t)}var YB=function(t,e){return {x(n){return t+t+e-n},setWidth(n){e=n;},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},QB=function(){return {x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ml(t,e,n){return t?YB(e,n):QB()}function ty(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r);}function ey(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]));}function qT(t){return t==="angle"?{between:Tc,compare:OT,normalize:ai}:{between:Uo,compare:(e,n)=>e-n,normalize:e=>e}}function ET({start:t,end:e,count:n,loop:r,style:i}){return {start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:i}}function KB(t,e,n){let{property:r,start:i,end:o}=n,{between:s,normalize:c}=qT(r),p=e.length,{start:h,end:v,loop:P}=t,x,T;if(P){for(h+=p,v+=p,x=0,T=p;x<T&&s(c(e[h%p][r]),i,o);++x)h--,v--;h%=p,v%=p;}return v<h&&(v+=p),{start:h,end:v,loop:P,style:t.style}}function ny(t,e,n){if(!n)return [t];let{property:r,start:i,end:o}=n,s=e.length,{compare:c,between:p,normalize:h}=qT(r),{start:v,end:P,loop:x,style:T}=KB(t,e,n),I=[],R=false,A=null,O,N,V,G=()=>p(i,V,O)&&c(i,V)!==0,X=()=>c(o,O)===0||p(o,V,O),nt=()=>R||G(),st=()=>!R||X();for(let U=v,j=v;U<=P;++U)N=e[U%s],!N.skip&&(O=h(N[r]),O!==V&&(R=p(O,i,o),A===null&&nt()&&(A=c(O,i)===0?U:j),A!==null&&st()&&(I.push(ET({start:A,end:U,loop:x,count:s,style:T})),A=null),j=U,V=O));return A!==null&&I.push(ET({start:A,end:P,loop:x,count:s,style:T})),I}function ry(t,e){let n=[],r=t.segments;for(let i=0;i<r.length;i++){let o=ny(r[i],t.points,e);o.length&&n.push(...o);}return n}function XB(t,e,n,r){let i=0,o=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(o+=i);o>i&&t[o%e].skip;)o--;return o%=e,{start:i,end:o}}function ZB(t,e,n,r){let i=t.length,o=[],s=e,c=t[e],p;for(p=e+1;p<=n;++p){let h=t[p%i];h.skip||h.stop?c.skip||(r=false,o.push({start:e%i,end:(p-1)%i,loop:r}),e=s=h.stop?p:null):(s=p,c.skip&&(e=p)),c=h;}return s!==null&&o.push({start:e%i,end:s%i,loop:r}),o}function L0(t,e){let n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return [];let o=!!t._loop,{start:s,end:c}=XB(n,i,o,r);if(r===true)return _T(t,[{start:s,end:c,loop:o}],n,e);let p=c<s?c+i:c,h=!!t._fullLoop&&s===0&&c===i-1;return _T(t,ZB(n,s,p,h),n,e)}function _T(t,e,n,r){return !r||!r.setContext||!n?e:JB(t,e,n,r)}function JB(t,e,n,r){let i=t._chart.getContext(),o=TT(t.options),{_datasetIndex:s,options:{spanGaps:c}}=t,p=n.length,h=[],v=o,P=e[0].start,x=P;function T(I,R,A,O){let N=c?-1:1;if(I!==R){for(I+=p;n[I%p].skip;)I-=N;for(;n[R%p].skip;)R+=N;I%p!==R%p&&(h.push({start:I%p,end:R%p,loop:A,style:O}),v=O,P=R%p);}}for(let I of e){P=c?P:I.start;let R=n[P%p],A;for(x=P+1;x<=I.end;x++){let O=n[x%p];A=TT(r.setContext(ba(i,{type:"segment",p0:R,p1:O,p0DataIndex:(x-1)%p,p1DataIndex:x%p,datasetIndex:s}))),t6(A,v)&&T(P,x-1,I.loop,v),R=O,v=A;}P<x-1&&T(P,x-1,I.loop,v);}return h}function TT(t){return {backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function t6(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var q0=class{constructor(){this._request=null,this._charts=new Map,this._running=false,this._lastDate=void 0;}_notify(e,n,r,i){let o=n.listeners[i],s=n.duration;o.forEach(c=>c({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}));}_refresh(){this._request||(this._running=true,this._request=$g.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh();}));}_update(e=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;let o=r.items,s=o.length-1,c=false,p;for(;s>=0;--s)p=o[s],p._active?(p._total>r.duration&&(r.duration=p._total),p.tick(e),c=true):(o[s]=o[o.length-1],o.pop());c&&(i.draw(),this._notify(i,r,e,"progress")),o.length||(r.running=false,this._notify(i,r,e,"complete"),r.initial=false),n+=o.length;}),this._lastDate=e,n===0&&(this._running=false);}_getAnims(e){let n=this._charts,r=n.get(e);return r||(r={running:false,initial:true,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r);}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n);}has(e){return this._getAnims(e).items.length>0}start(e){let n=this._charts.get(e);n&&(n.running=true,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh());}running(e){if(!this._running)return false;let n=this._charts.get(e);return !(!n||!n.running||!n.items.length)}stop(e){let n=this._charts.get(e);if(!n||!n.items.length)return;let r=n.items,i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete");}remove(e){return this._charts.delete(e)}},ss=new q0,YT="transparent",e6={boolean(t,e,n){return n>.5?e:t},color(t,e,n){let r=wc(t||YT),i=r.valid&&wc(e||YT);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}},Y0=class{constructor(e,n,r,i){let o=n[r];i=In([e.to,i,o,e.from]);let s=In([e.from,o,i]);this._active=true,this._fn=e.fn||e6[e.type||typeof s],this._easing=Cc[e.easing]||Cc.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0;}active(){return this._active}update(e,n,r){if(this._active){this._notify(false);let i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=In([e.to,n,i,e.from]),this._from=In([e.from,i,n]);}}cancel(){this._active&&(this.tick(Date.now()),this._active=false,this._notify(false));}tick(e){let n=e-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,c=this._to,p;if(this._active=o!==c&&(s||n<r),!this._active){this._target[i]=c,this._notify(true);return}if(n<0){this._target[i]=o;return}p=n/r%2,p=s&&p>1?2-p:p,p=this._easing(Math.min(1,Math.max(0,p))),this._target[i]=this._fn(o,c,p);}wait(){let e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r});})}_notify(e){let n=e?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]();}},n6=["x","y","borderWidth","radius","tension"],r6=["color","borderColor","backgroundColor"];ke.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});var i6=Object.keys(ke.animation);ke.describe("animation",{_fallback:false,_indexable:false,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"});ke.set("animations",{colors:{type:"color",properties:r6},numbers:{type:"number",properties:n6}});ke.describe("animations",{_fallback:"animation"});ke.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}});var ad=class{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n);}configure(e){if(!Te(e))return;let n=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{let i=e[r];if(!Te(i))return;let o={};for(let s of i6)o[s]=i[s];(He(i.properties)&&i.properties||[r]).forEach(s=>{(s===r||!n.has(s))&&n.set(s,o);});});}_animateOptions(e,n){let r=n.options,i=a6(e,r);if(!i)return [];let o=this._createAnimations(i,r);return r.$shared&&o6(e.options.$animations,r).then(()=>{e.options=r;},()=>{}),o}_createAnimations(e,n){let r=this._properties,i=[],o=e.$animations||(e.$animations={}),s=Object.keys(n),c=Date.now(),p;for(p=s.length-1;p>=0;--p){let h=s[p];if(h.charAt(0)==="$")continue;if(h==="options"){i.push(...this._animateOptions(e,n));continue}let v=n[h],P=o[h],x=r.get(h);if(P)if(x&&P.active()){P.update(x,v,c);continue}else P.cancel();if(!x||!x.duration){e[h]=v;continue}o[h]=P=new Y0(x,e,h,v),i.push(P);}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}let r=this._createAnimations(e,n);if(r.length)return ss.add(this._chart,r),true}};function o6(t,e){let n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){let o=t[r[i]];o&&o.active()&&n.push(o.wait());}return Promise.all(n)}function a6(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:false,$animations:{}})),n}function QT(t,e){let n=t&&t.options||{},r=n.reverse,i=n.min===void 0?e:0,o=n.max===void 0?e:0;return {start:r?o:i,end:r?i:o}}function s6(t,e,n){if(n===false)return false;let r=QT(t,n),i=QT(e,n);return {top:i.end,right:r.end,bottom:i.start,left:r.start}}function l6(t){let e,n,r,i;return Te(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:t===false}}function Bw(t,e){let n=[],r=t._getSortedDatasetMetas(e),i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function KT(t,e,n,r={}){let i=t.keys,o=r.mode==="single",s,c,p,h;if(e!==null){for(s=0,c=i.length;s<c;++s){if(p=+i[s],p===n){if(r.all)continue;break}h=t.values[p],Mn(h)&&(o||e===0||go(e)===go(h))&&(e+=h);}return e}}function c6(t){let e=Object.keys(t),n=new Array(e.length),r,i,o;for(r=0,i=e.length;r<i;++r)o=e[r],n[r]={x:o,y:t[o]};return n}function XT(t,e){let n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function u6(t,e,n){return `${t.id}.${e.id}.${n.stack||n.type}`}function d6(t){let{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return {min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function p6(t,e,n){let r=t[e]||(t[e]={});return r[n]||(r[n]={})}function ZT(t,e,n,r){for(let i of e.getMatchingVisibleMetas(r).reverse()){let o=t[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function JT(t,e){let{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:c}=r,p=o.axis,h=s.axis,v=u6(o,s,r),P=e.length,x;for(let T=0;T<P;++T){let I=e[T],{[p]:R,[h]:A}=I,O=I._stacks||(I._stacks={});x=O[h]=p6(i,v,R),x[c]=A,x._top=ZT(x,s,true,r.type),x._bottom=ZT(x,s,false,r.type);}}function B0(t,e){let n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function f6(t,e){return ba(t,{active:false,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function h6(t,e,n){return ba(t,{active:false,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function gf(t,e){let n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(let i of e){let o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n];}}}var U0=t=>t==="reset"||t==="none",tw=(t,e)=>e?t:Object.assign({},t),m6=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Bw(n,true),values:null},zi=class{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=false,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=false,this.supportsDecimation=false,this.$context=void 0,this._syncList=[],this.initialize();}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=XT(e.vScale,e),this.addElements();}updateIndex(e){this.index!==e&&gf(this._cachedMeta),this.index=e;}linkScales(){let e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(P,x,T,I)=>P==="x"?x:P==="r"?I:T,o=n.xAxisID=me(r.xAxisID,B0(e,"x")),s=n.yAxisID=me(r.yAxisID,B0(e,"y")),c=n.rAxisID=me(r.rAxisID,B0(e,"r")),p=n.indexAxis,h=n.iAxisID=i(p,o,s,c),v=n.vAxisID=i(p,s,o,c);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(v);}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset");}_destroy(){let e=this._cachedMeta;this._data&&Bg(this._data,this),e._stacked&&gf(e);}_dataCheck(){let e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(Te(n))this._data=c6(n);else if(r!==n){if(r){Bg(r,this);let i=this._cachedMeta;gf(i),i._parsed=[];}n&&Object.isExtensible(n)&&v0(n,this),this._syncList=[],this._data=n;}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType);}buildOrUpdateElements(e){let n=this._cachedMeta,r=this.getDataset(),i=false;this._dataCheck();let o=n._stacked;n._stacked=XT(n.vScale,n),n.stack!==r.stack&&(i=true,gf(n),n.stack=r.stack),this._resyncElements(e),(i||o!==n._stacked)&&JT(this,n._parsed);}configure(){let e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,true);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={};}parse(e,n){let{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,c=o.axis,p=e===0&&n===i.length?true:r._sorted,h=e>0&&r._parsed[e-1],v,P,x;if(this._parsing===false)r._parsed=i,r._sorted=true,x=i;else {He(i[e])?x=this.parseArrayData(r,i,e,n):Te(i[e])?x=this.parseObjectData(r,i,e,n):x=this.parsePrimitiveData(r,i,e,n);let T=()=>P[c]===null||h&&P[c]<h[c];for(v=0;v<n;++v)r._parsed[v+e]=P=x[v],p&&(T()&&(p=false),h=P);r._sorted=p;}s&&JT(this,x);}parsePrimitiveData(e,n,r,i){let{iScale:o,vScale:s}=e,c=o.axis,p=s.axis,h=o.getLabels(),v=o===s,P=new Array(i),x,T,I;for(x=0,T=i;x<T;++x)I=x+r,P[x]={[c]:v||o.parse(h[I],I),[p]:s.parse(n[I],I)};return P}parseArrayData(e,n,r,i){let{xScale:o,yScale:s}=e,c=new Array(i),p,h,v,P;for(p=0,h=i;p<h;++p)v=p+r,P=n[v],c[p]={x:o.parse(P[0],v),y:s.parse(P[1],v)};return c}parseObjectData(e,n,r,i){let{xScale:o,yScale:s}=e,{xAxisKey:c="x",yAxisKey:p="y"}=this._parsing,h=new Array(i),v,P,x,T;for(v=0,P=i;v<P;++v)x=v+r,T=n[x],h[v]={x:o.parse(ya(T,c),x),y:s.parse(ya(T,p),x)};return h}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){let i=this.chart,o=this._cachedMeta,s=n[e.axis],c={keys:Bw(i,true),values:n._stacks[e.axis]};return KT(c,s,o.index,{mode:r})}updateRangeFromParsed(e,n,r,i){let o=r[n.axis],s=o===null?NaN:o,c=i&&r._stacks[n.axis];i&&c&&(i.values=c,s=KT(i,o,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s);}getMinMax(e,n){let r=this._cachedMeta,i=r._parsed,o=r._sorted&&e===r.iScale,s=i.length,c=this._getOtherScale(e),p=m6(n,r,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:v,max:P}=d6(c),x,T;function I(){T=i[x];let R=T[c.axis];return !Mn(T[e.axis])||v>R||P<R}for(x=0;x<s&&!(!I()&&(this.updateRangeFromParsed(h,e,T,p),o));++x);if(o){for(x=s-1;x>=0;--x)if(!I()){this.updateRangeFromParsed(h,e,T,p);break}}return h}getAllParsedValues(e){let n=this._cachedMeta._parsed,r=[],i,o,s;for(i=0,o=n.length;i<o;++i)s=n[i][e.axis],Mn(s)&&r.push(s);return r}getMaxOverflow(){return false}getLabelAndValue(e){let n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(e);return {label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(e){let n=this._cachedMeta;this.update(e||"default"),n._clip=l6(me(this.options.clip,s6(n.xScale,n.yScale,this.getMaxOverflow())));}update(e){}draw(){let e=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,s=[],c=this._drawStart||0,p=this._drawCount||i.length-c,h=this.options.drawActiveElementsOnTop,v;for(r.dataset&&r.dataset.draw(e,o,c,p),v=c;v<c+p;++v){let P=i[v];P.hidden||(P.active&&h?s.push(P):P.draw(e,o));}for(v=0;v<s.length;++v)s[v].draw(e,o);}getStyle(e,n){let r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){let i=this.getDataset(),o;if(e>=0&&e<this._cachedMeta.data.length){let s=this._cachedMeta.data[e];o=s.$context||(s.$context=h6(this.getContext(),e,s)),o.parsed=this.getParsed(e),o.raw=i.data[e],o.index=o.dataIndex=e;}else o=this.$context||(this.$context=f6(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){let i=n==="active",o=this._cachedDataOpts,s=e+"-"+n,c=o[s],p=this.enableOptionSharing&&Fn(r);if(c)return tw(c,p);let h=this.chart.config,v=h.datasetElementScopeKeys(this._type,e),P=i?[`${e}Hover`,"hover",e,""]:[e,""],x=h.getOptionScopes(this.getDataset(),v),T=Object.keys(ke.elements[e]),I=()=>this.getContext(r,i),R=h.resolveNamedOptions(x,T,I,P);return R.$shared&&(R.$shared=p,o[s]=Object.freeze(tw(R,p))),R}_resolveAnimations(e,n,r){let i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,c=o[s];if(c)return c;let p;if(i.options.animation!==false){let v=this.chart.config,P=v.datasetAnimationScopeKeys(this._type,n),x=v.getOptionScopes(this.getDataset(),P);p=v.createResolver(x,this.getContext(e,r,n));}let h=new ad(i,p&&p.animations);return p&&p._cacheable&&(o[s]=Object.freeze(h)),h}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return !n||U0(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){let r=this.resolveDataElementOptions(e,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(e,n,r,i){U0(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r);}updateSharedOptions(e,n,r){e&&!U0(n)&&this._resolveAnimations(void 0,n).update(e,r);}_setStyle(e,n,r,i){e.active=i;let o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(o)||o});}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",false);}setHoverStyle(e,n,r){this._setStyle(e,r,"active",true);}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",false);}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",true);}_resyncElements(e){let n=this._data,r=this._cachedMeta.data;for(let[c,p,h]of this._syncList)this[c](p,h);this._syncList=[];let i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,e):o<i&&this._removeElements(o,i-o);}_insertElements(e,n,r=true){let i=this._cachedMeta,o=i.data,s=e+n,c,p=h=>{for(h.length+=n,c=h.length-1;c>=s;c--)h[c]=h[c-n];};for(p(o),c=e;c<s;++c)o[c]=new this.dataElementType;this._parsing&&p(i._parsed),this.parse(e,n),r&&this.updateElements(o,e,n,"reset");}updateElements(e,n,r,i){}_removeElements(e,n){let r=this._cachedMeta;if(this._parsing){let i=r._parsed.splice(e,n);r._stacked&&gf(r,i);}r.data.splice(e,n);}_sync(e){if(this._parsing)this._syncList.push(e);else {let[n,r,i]=e;this[n](r,i);}this.chart._dataChanges.push([this.index,...e]);}_onDataPush(){let e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e]);}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1]);}_onDataShift(){this._sync(["_removeElements",0,1]);}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);let r=arguments.length-2;r&&this._sync(["_insertElements",e,r]);}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length]);}};zi.defaults={};zi.prototype.datasetElementType=null;zi.prototype.dataElementType=null;function g6(t,e){if(!t._cache.$bar){let n=t.getMatchingVisibleMetas(e),r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=Ug(r.sort((i,o)=>i-o));}return t._cache.$bar}function y6(t){let e=t.iScale,n=g6(e,t.type),r=e._length,i,o,s,c,p=()=>{s===32767||s===-32768||(Fn(c)&&(r=Math.min(r,Math.abs(s-c)||r)),c=s);};for(i=0,o=n.length;i<o;++i)s=e.getPixelForValue(n[i]),p();for(c=void 0,i=0,o=e.ticks.length;i<o;++i)s=e.getPixelForTick(i),p();return r}function b6(t,e,n,r){let i=n.barThickness,o,s;return Le(i)?(o=e.min*n.categoryPercentage,s=n.barPercentage):(o=i*r,s=1),{chunk:o/r,ratio:s,start:e.pixels[t]-o/2}}function v6(t,e,n,r){let i=e.pixels,o=i[t],s=t>0?i[t-1]:null,c=t<i.length-1?i[t+1]:null,p=n.categoryPercentage;s===null&&(s=o-(c===null?e.end-e.start:c-o)),c===null&&(c=o+o-s);let h=o-(o-Math.min(s,c))/2*p;return {chunk:Math.abs(c-s)/2*p/r,ratio:n.barPercentage,start:h}}function C6(t,e,n,r){let i=n.parse(t[0],r),o=n.parse(t[1],r),s=Math.min(i,o),c=Math.max(i,o),p=s,h=c;Math.abs(s)>Math.abs(c)&&(p=c,h=s),e[n.axis]=h,e._custom={barStart:p,barEnd:h,start:i,end:o,min:s,max:c};}function Uw(t,e,n,r){return He(t)?C6(t,e,n,r):e[n.axis]=n.parse(t,r),e}function ew(t,e,n,r){let i=t.iScale,o=t.vScale,s=i.getLabels(),c=i===o,p=[],h,v,P,x;for(h=n,v=n+r;h<v;++h)x=e[h],P={},P[i.axis]=c||i.parse(s[h],h),p.push(Uw(x,P,o,h));return p}function $0(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function S6(t,e,n){return t!==0?go(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function P6(t){let e,n,r,i,o;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:e,top:i,bottom:o}}function x6(t,e,n,r){let i=e.borderSkipped,o={};if(!i){t.borderSkipped=o;return}if(i===true){t.borderSkipped={top:true,right:true,bottom:true,left:true};return}let{start:s,end:c,reverse:p,top:h,bottom:v}=P6(t);i==="middle"&&n&&(t.enableBorderRadius=true,(n._top||0)===r?i=h:(n._bottom||0)===r?i=v:(o[nw(v,s,c,p)]=true,i=h)),o[nw(i,s,c,p)]=true,t.borderSkipped=o;}function nw(t,e,n,r){return r?(t=E6(t,e,n),t=rw(t,n,e)):t=rw(t,e,n),t}function E6(t,e,n){return t===e?n:t===n?e:t}function rw(t,e,n){return t==="start"?e:t==="end"?n:t}function _6(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e;}var xf=class extends zi{parsePrimitiveData(e,n,r,i){return ew(e,n,r,i)}parseArrayData(e,n,r,i){return ew(e,n,r,i)}parseObjectData(e,n,r,i){let{iScale:o,vScale:s}=e,{xAxisKey:c="x",yAxisKey:p="y"}=this._parsing,h=o.axis==="x"?c:p,v=s.axis==="x"?c:p,P=[],x,T,I,R;for(x=r,T=r+i;x<T;++x)R=n[x],I={},I[o.axis]=o.parse(ya(R,h),x),P.push(Uw(ya(R,v),I,s,x));return P}updateRangeFromParsed(e,n,r,i){super.updateRangeFromParsed(e,n,r,i);let o=r._custom;o&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max));}getMaxOverflow(){return 0}getLabelAndValue(e){let n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(e),s=o._custom,c=$0(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(o[i.axis]);return {label:""+r.getLabelForValue(o[r.axis]),value:c}}initialize(){this.enableOptionSharing=true,super.initialize();let e=this._cachedMeta;e.stack=this.getDataset().stack;}update(e){let n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e);}updateElements(e,n,r,i){let o=i==="reset",{index:s,_cachedMeta:{vScale:c}}=this,p=c.getBasePixel(),h=c.isHorizontal(),v=this._getRuler(),{sharedOptions:P,includeOptions:x}=this._getSharedOptions(n,i);for(let T=n;T<n+r;T++){let I=this.getParsed(T),R=o||Le(I[c.axis])?{base:p,head:p}:this._calculateBarValuePixels(T),A=this._calculateBarIndexPixels(T,v),O=(I._stacks||{})[c.axis],N={horizontal:h,base:R.base,enableBorderRadius:!O||$0(I._custom)||s===O._top||s===O._bottom,x:h?R.head:A.center,y:h?A.center:R.head,height:h?A.size:Math.abs(R.size),width:h?Math.abs(R.size):A.size};x&&(N.options=P||this.resolveDataElementOptions(T,e[T].active?"active":i));let V=N.options||e[T].options;x6(N,V,O,s),_6(N,V,v.ratio),this.updateElement(e[T],T,N,i);}}_getStacks(e,n){let{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(p=>p.controller.options.grouped),o=r.options.stacked,s=[],c=p=>{let h=p.controller.getParsed(n),v=h&&h[p.vScale.axis];if(Le(v)||isNaN(v))return true};for(let p of i)if(!(n!==void 0&&c(p))&&((o===false||s.indexOf(p.stack)===-1||o===void 0&&p.stack===void 0)&&s.push(p.stack),p.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,r){let i=this._getStacks(e,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){let e=this.options,n=this._cachedMeta,r=n.iScale,i=[],o,s;for(o=0,s=n.data.length;o<s;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));let c=e.barThickness;return {min:c||y6(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){let{_cachedMeta:{vScale:n,_stacked:r},options:{base:i,minBarLength:o}}=this,s=i||0,c=this.getParsed(e),p=c._custom,h=$0(p),v=c[n.axis],P=0,x=r?this.applyStack(n,c,r):v,T,I;x!==v&&(P=x-v,x=v),h&&(v=p.barStart,x=p.barEnd-p.barStart,v!==0&&go(v)!==go(p.barEnd)&&(P=0),P+=v);let R=!Le(i)&&!h?i:P,A=n.getPixelForValue(R);if(this.chart.getDataVisibility(e)?T=n.getPixelForValue(P+x):T=A,I=T-A,Math.abs(I)<o){I=S6(I,n,s)*o,v===s&&(A-=I/2);let O=n.getPixelForDecimal(0),N=n.getPixelForDecimal(1),V=Math.min(O,N),G=Math.max(O,N);A=Math.max(Math.min(A,G),V),T=A+I;}if(A===n.getPixelForValue(s)){let O=go(I)*n.getLineWidthForValue(s)/2;A+=O,I-=O;}return {size:I,base:A,head:T,center:T+I/2}}_calculateBarIndexPixels(e,n){let r=n.scale,i=this.options,o=i.skipNull,s=me(i.maxBarThickness,1/0),c,p;if(n.grouped){let h=o?this._getStackCount(e):n.stackCount,v=i.barThickness==="flex"?v6(e,n,i,h):b6(e,n,i,h),P=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);c=v.start+v.chunk*P+v.chunk/2,p=Math.min(s,v.chunk*v.ratio);}else c=r.getPixelForValue(this.getParsed(e)[r.axis],e),p=Math.min(s,n.min*n.ratio);return {base:c-p/2,head:c+p/2,center:c,size:p}}draw(){let e=this._cachedMeta,n=e.vScale,r=e.data,i=r.length,o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&r[o].draw(this._ctx);}};xf.id="bar";xf.defaults={datasetElementType:false,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:true,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};xf.overrides={scales:{_index_:{type:"category",offset:true,grid:{offset:true}},_value_:{type:"linear",beginAtZero:true}}};var Ef=class extends zi{initialize(){this.enableOptionSharing=true,super.initialize();}parsePrimitiveData(e,n,r,i){let o=super.parsePrimitiveData(e,n,r,i);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+r).radius;return o}parseArrayData(e,n,r,i){let o=super.parseArrayData(e,n,r,i);for(let s=0;s<o.length;s++){let c=n[r+s];o[s]._custom=me(c[2],this.resolveDataElementOptions(s+r).radius);}return o}parseObjectData(e,n,r,i){let o=super.parseObjectData(e,n,r,i);for(let s=0;s<o.length;s++){let c=n[r+s];o[s]._custom=me(c&&c.r&&+c.r,this.resolveDataElementOptions(s+r).radius);}return o}getMaxOverflow(){let e=this._cachedMeta.data,n=0;for(let r=e.length-1;r>=0;--r)n=Math.max(n,e[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(e){let n=this._cachedMeta,{xScale:r,yScale:i}=n,o=this.getParsed(e),s=r.getLabelForValue(o.x),c=i.getLabelForValue(o.y),p=o._custom;return {label:n.label,value:"("+s+", "+c+(p?", "+p:"")+")"}}update(e){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,e);}updateElements(e,n,r,i){let o=i==="reset",{iScale:s,vScale:c}=this._cachedMeta,{sharedOptions:p,includeOptions:h}=this._getSharedOptions(n,i),v=s.axis,P=c.axis;for(let x=n;x<n+r;x++){let T=e[x],I=!o&&this.getParsed(x),R={},A=R[v]=o?s.getPixelForDecimal(.5):s.getPixelForValue(I[v]),O=R[P]=o?c.getBasePixel():c.getPixelForValue(I[P]);R.skip=isNaN(A)||isNaN(O),h&&(R.options=p||this.resolveDataElementOptions(x,T.active?"active":i),o&&(R.options.radius=0)),this.updateElement(T,x,R,i);}}resolveDataElementOptions(e,n){let r=this.getParsed(e),i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:false}));let o=i.radius;return n!=="active"&&(i.radius=0),i.radius+=me(r&&r._custom,o),i}};Ef.id="bubble";Ef.defaults={datasetElementType:false,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};Ef.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return ""}}}}};function T6(t,e,n){let r=1,i=1,o=0,s=0;if(e<rn){let c=t,p=c+e,h=Math.cos(c),v=Math.sin(c),P=Math.cos(p),x=Math.sin(p),T=(V,G,X)=>Tc(V,c,p,true)?1:Math.max(G,G*n,X,X*n),I=(V,G,X)=>Tc(V,c,p,true)?-1:Math.min(G,G*n,X,X*n),R=T(0,h,P),A=T(bn,v,x),O=I(Be,h,P),N=I(Be+bn,v,x);r=(R-O)/2,i=(A-N)/2,o=-(R+O)/2,s=-(A+N)/2;}return {ratioX:r,ratioY:i,offsetX:o,offsetY:s}}var Dc=class extends zi{constructor(e,n){super(e,n),this.enableOptionSharing=true,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0;}linkScales(){}parse(e,n){let r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===false)i._parsed=r;else {let o=p=>+r[p];if(Te(r[e])){let{key:p="value"}=this._parsing;o=h=>+ya(r[h],p);}let s,c;for(s=e,c=e+n;s<c;++s)i._parsed[s]=o(s);}}_getRotation(){return Qn(this.options.rotation-90)}_getCircumference(){return Qn(this.options.circumference)}_getRotationExtents(){let e=rn,n=-rn;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)){let i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),s=i._getCircumference();e=Math.min(e,o),n=Math.max(n,o+s);}return {rotation:e,circumference:n-e}}update(e){let n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,c=Math.max((Math.min(r.width,r.height)-s)/2,0),p=Math.min(p0(this.options.cutout,c),1),h=this._getRingWeight(this.index),{circumference:v,rotation:P}=this._getRotationExtents(),{ratioX:x,ratioY:T,offsetX:I,offsetY:R}=T6(P,v,p),A=(r.width-s)/x,O=(r.height-s)/T,N=Math.max(Math.min(A,O)/2,0),V=Og(this.options.radius,N),G=Math.max(V*p,0),X=(V-G)/this._getVisibleDatasetWeightTotal();this.offsetX=I*V,this.offsetY=R*V,i.total=this.calculateTotal(),this.outerRadius=V-X*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-X*h,0),this.updateElements(o,0,o.length,e);}_circumference(e,n){let r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*o/rn)}updateElements(e,n,r,i){let o=i==="reset",s=this.chart,c=s.chartArea,h=s.options.animation,v=(c.left+c.right)/2,P=(c.top+c.bottom)/2,x=o&&h.animateScale,T=x?0:this.innerRadius,I=x?0:this.outerRadius,{sharedOptions:R,includeOptions:A}=this._getSharedOptions(n,i),O=this._getRotation(),N;for(N=0;N<n;++N)O+=this._circumference(N,o);for(N=n;N<n+r;++N){let V=this._circumference(N,o),G=e[N],X={x:v+this.offsetX,y:P+this.offsetY,startAngle:O,endAngle:O+V,circumference:V,outerRadius:I,innerRadius:T};A&&(X.options=R||this.resolveDataElementOptions(N,G.active?"active":i)),O+=V,this.updateElement(G,N,X,i);}}calculateTotal(){let e=this._cachedMeta,n=e.data,r=0,i;for(i=0;i<n.length;i++){let o=e._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o));}return r}calculateCircumference(e){let n=this._cachedMeta.total;return n>0&&!isNaN(e)?rn*(Math.abs(e)/n):0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ic(n._parsed[e],r.options.locale);return {label:i[e]||"",value:o}}getMaxBorderWidth(e){let n=0,r=this.chart,i,o,s,c,p;if(!e){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){s=r.getDatasetMeta(i),e=s.data,c=s.controller;break}}if(!e)return 0;for(i=0,o=e.length;i<o;++i)p=c.resolveDataElementOptions(i),p.borderAlign!=="inner"&&(n=Math.max(n,p.borderWidth||0,p.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,i=e.length;r<i;++r){let o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0);}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(me(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}};Dc.id="doughnut";Dc.defaults={datasetElementType:false,dataElementType:"arc",animation:{animateRotate:true,animateScale:false},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};Dc.descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"};Dc.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:n}}=t.legend.options;return e.labels.map((r,i)=>{let s=t.getDatasetMeta(0).controller.getStyle(i);return {text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}})}return []}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update();}},tooltip:{callbacks:{title(){return ""},label(t){let e=t.label,n=": "+t.formattedValue;return He(e)?(e=e.slice(),e[0]+=n):e+=n,e}}}}};var _f=class extends zi{initialize(){this.enableOptionSharing=true,this.supportsDecimation=true,super.initialize();}update(e){let n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled,{start:c,count:p}=jg(n,i,s);this._drawStart=c,this._drawCount=p,Vg(n)&&(c=0,p=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;let h=this.resolveDatasetElementOptions(e);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:h},e),this.updateElements(i,c,p,e);}updateElements(e,n,r,i){let o=i==="reset",{iScale:s,vScale:c,_stacked:p,_dataset:h}=this._cachedMeta,{sharedOptions:v,includeOptions:P}=this._getSharedOptions(n,i),x=s.axis,T=c.axis,{spanGaps:I,segment:R}=this.options,A=Vi(I)?I:Number.POSITIVE_INFINITY,O=this.chart._animationsDisabled||o||i==="none",N=n>0&&this.getParsed(n-1);for(let V=n;V<n+r;++V){let G=e[V],X=this.getParsed(V),nt=O?G:{},st=Le(X[T]),U=nt[x]=s.getPixelForValue(X[x],V),j=nt[T]=o||st?c.getBasePixel():c.getPixelForValue(p?this.applyStack(c,X,p):X[T],V);nt.skip=isNaN(U)||isNaN(j)||st,nt.stop=V>0&&Math.abs(X[x]-N[x])>A,R&&(nt.parsed=X,nt.raw=h.data[V]),P&&(nt.options=v||this.resolveDataElementOptions(V,G.active?"active":i)),O||this.updateElement(G,V,nt,i),N=X;}}getMaxOverflow(){let e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return r;let o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw();}};_f.id="line";_f.defaults={datasetElementType:"line",dataElementType:"point",showLine:true,spanGaps:false};_f.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var Tf=class extends zi{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0;}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ic(n._parsed[e].r,r.options.locale);return {label:i[e]||"",value:o}}parseObjectData(e,n,r,i){return Qg.bind(this)(e,n,r,i)}update(e){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e);}getMinMax(){let e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,i)=>{let o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o));}),n}_updateRadius(){let e=this.chart,n=e.chartArea,r=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),c=(o-s)/e.getVisibleDatasetCount();this.outerRadius=o-c*this.index,this.innerRadius=this.outerRadius-c;}updateElements(e,n,r,i){let o=i==="reset",s=this.chart,p=s.options.animation,h=this._cachedMeta.rScale,v=h.xCenter,P=h.yCenter,x=h.getIndexAngle(0)-.5*Be,T=x,I,R=360/this.countVisibleElements();for(I=0;I<n;++I)T+=this._computeAngle(I,i,R);for(I=n;I<n+r;I++){let A=e[I],O=T,N=T+this._computeAngle(I,i,R),V=s.getDataVisibility(I)?h.getDistanceFromCenterForValue(this.getParsed(I).r):0;T=N,o&&(p.animateScale&&(V=0),p.animateRotate&&(O=N=x));let G={x:v,y:P,innerRadius:0,outerRadius:V,startAngle:O,endAngle:N,options:this.resolveDataElementOptions(I,A.active?"active":i)};this.updateElement(A,I,G,i);}}countVisibleElements(){let e=this._cachedMeta,n=0;return e.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++;}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?Qn(this.resolveDataElementOptions(e,n).angle||r):0}};Tf.id="polarArea";Tf.defaults={dataElementType:"arc",animation:{animateRotate:true,animateScale:true},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Tf.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:n}}=t.legend.options;return e.labels.map((r,i)=>{let s=t.getDatasetMeta(0).controller.getStyle(i);return {text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}})}return []}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update();}},tooltip:{callbacks:{title(){return ""},label(t){return t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:false},beginAtZero:true,grid:{circular:true},pointLabels:{display:false},startAngle:0}}};var uy=class extends Dc{};uy.id="pie";uy.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};var wf=class extends zi{getLabelAndValue(e){let n=this._cachedMeta.vScale,r=this.getParsed(e);return {label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,i){return Qg.bind(this)(e,n,r,i)}update(e){let n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,e!=="resize"){let s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0);let c={_loop:true,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,c,e);}this.updateElements(i,0,i.length,e);}updateElements(e,n,r,i){let o=this._cachedMeta.rScale,s=i==="reset";for(let c=n;c<n+r;c++){let p=e[c],h=this.resolveDataElementOptions(c,p.active?"active":i),v=o.getPointPositionForValue(c,this.getParsed(c).r),P=s?o.xCenter:v.x,x=s?o.yCenter:v.y,T={x:P,y:x,angle:v.angle,skip:isNaN(P)||isNaN(x),options:h};this.updateElement(p,c,T,i);}}};wf.id="radar";wf.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:true,elements:{line:{fill:"start"}}};wf.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};var br=class{constructor(){this.x=void 0,this.y=void 0,this.active=false,this.options=void 0,this.$animations=void 0;}tooltipPosition(e){let{x:n,y:r}=this.getProps(["x","y"],e);return {x:n,y:r}}hasValue(){return Vi(this.x)&&Vi(this.y)}getProps(e,n){let r=this.$animations;if(!n||!r)return this;let i={};return e.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o];}),i}};br.defaults={};br.defaultRoutes=void 0;var $w={values(t){return He(t)?t:""+t},numeric(t,e,n){if(t===0)return "0";let r=this.chart.options.locale,i,o=t;if(n.length>1){let h=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(h<1e-4||h>1e15)&&(i="scientific"),o=w6(t,n);}let s=Ei(Math.abs(o)),c=Math.max(Math.min(-1*Math.floor(s),20),0),p={notation:i,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(p,this.options.ticks.format),Ic(t,r,p)},logarithmic(t,e,n){if(t===0)return "0";let r=t/Math.pow(10,Math.floor(Ei(t)));return r===1||r===2||r===5?$w.numeric.call(this,t,e,n):""}};function w6(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var vy={formatters:$w};ke.set("scale",{display:true,offset:false,reverse:false,beginAtZero:false,bounds:"ticks",grace:0,grid:{display:true,lineWidth:1,drawBorder:true,drawOnChartArea:true,drawTicks:true,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:false,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:false,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:false,textStrokeWidth:0,textStrokeColor:"",padding:3,display:true,autoSkip:true,autoSkipPadding:3,labelOffset:0,callback:vy.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:false,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});ke.route("scale.ticks","color","","color");ke.route("scale.grid","color","","borderColor");ke.route("scale.grid","borderColor","","borderColor");ke.route("scale.title","color","","color");ke.describe("scale",{_fallback:false,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"});ke.describe("scales",{_fallback:"scale"});ke.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"});function I6(t,e){let n=t.options.ticks,r=n.maxTicksLimit||k6(t),i=n.major.enabled?A6(e):[],o=i.length,s=i[0],c=i[o-1],p=[];if(o>r)return O6(e,p,i,o/r),p;let h=D6(i,e,r);if(o>0){let v,P,x=o>1?Math.round((c-s)/(o-1)):null;for(iy(e,p,h,Le(x)?0:s-x,s),v=0,P=o-1;v<P;v++)iy(e,p,h,i[v],i[v+1]);return iy(e,p,h,c,Le(x)?e.length:c+x),p}return iy(e,p,h),p}function k6(t){let e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}function D6(t,e,n){let r=R6(t),i=e.length/n;if(!r)return Math.max(i,1);let o=h0(r);for(let s=0,c=o.length-1;s<c;s++){let p=o[s];if(p>i)return p}return Math.max(i,1)}function A6(t){let e=[],n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function O6(t,e,n,r){let i=0,o=n[0],s;for(r=Math.ceil(r),s=0;s<t.length;s++)s===o&&(e.push(t[s]),i++,o=n[i*r]);}function iy(t,e,n,r,i){let o=me(r,0),s=Math.min(me(i,t.length),t.length),c=0,p,h,v;for(n=Math.ceil(n),i&&(p=i-r,n=p/Math.floor(p/n)),v=o;v<0;)c++,v=Math.round(o+c*n);for(h=Math.max(o,0);h<s;h++)h===v&&(e.push(t[h]),c++,v=Math.round(o+c*n));}function R6(t){let e=t.length,n,r;if(e<2)return false;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return false;return r}var F6=t=>t==="left"?"right":t==="right"?"left":t,iw=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n;function ow(t,e){let n=[],r=t.length/e,i=t.length,o=0;for(;o<i;o+=r)n.push(t[Math.floor(o)]);return n}function M6(t,e,n){let r=t.ticks.length,i=Math.min(e,r-1),o=t._startPixel,s=t._endPixel,c=1e-6,p=t.getPixelForTick(i),h;if(!(n&&(r===1?h=Math.max(p-o,s-p):e===0?h=(t.getPixelForTick(1)-p)/2:h=(p-t.getPixelForTick(i-1))/2,p+=i<e?h:-h,p<o-c||p>s+c)))return p}function N6(t,e){tn(t,n=>{let r=n.gc,i=r.length/2,o;if(i>e){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i);}});}function yf(t){return t.drawTicks?t.tickLength:0}function aw(t,e){if(!t.display)return 0;let n=Sn(t.font,e),r=$n(t.padding);return (He(t.text)?t.text.length:1)*n.lineHeight+r.height}function L6(t,e){return ba(t,{scale:e,type:"scale"})}function B6(t,e,n){return ba(t,{tick:n,index:e,type:"tick"})}function U6(t,e,n){let r=uf(t);return (n&&e!=="right"||!n&&e==="right")&&(r=F6(r)),r}function $6(t,e,n,r){let{top:i,left:o,bottom:s,right:c,chart:p}=t,{chartArea:h,scales:v}=p,P=0,x,T,I,R=s-i,A=c-o;if(t.isHorizontal()){if(T=Lr(r,o,c),Te(n)){let O=Object.keys(n)[0],N=n[O];I=v[O].getPixelForValue(N)+R-e;}else n==="center"?I=(h.bottom+h.top)/2+R-e:I=iw(t,n,e);x=c-o;}else {if(Te(n)){let O=Object.keys(n)[0],N=n[O];T=v[O].getPixelForValue(N)-A+e;}else n==="center"?T=(h.left+h.right)/2-A+e:T=iw(t,n,e);I=Lr(r,s,i),P=n==="left"?-bn:bn;}return {titleX:T,titleY:I,maxWidth:x,rotation:P}}var Ac=class t extends br{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=false,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=false,this.$context=void 0;}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax);}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return e=xi(e,Number.POSITIVE_INFINITY),n=xi(n,Number.NEGATIVE_INFINITY),r=xi(r,Number.POSITIVE_INFINITY),i=xi(i,Number.NEGATIVE_INFINITY),{min:xi(e,r),max:xi(n,i),minDefined:Mn(e),maxDefined:Mn(n)}}getMinMax(e){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),s;if(i&&o)return {min:n,max:r};let c=this.getMatchingVisibleMetas();for(let p=0,h=c.length;p<h;++p)s=c[p].controller.getMinMax(this,e),i||(n=Math.min(n,s.min)),o||(r=Math.max(r,s.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:xi(n,xi(r,n)),max:xi(r,xi(n,r))}}getPadding(){return {left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=false;}beforeUpdate(){Qe(this.options.beforeUpdate,[this]);}update(e,n,r){let{beginAtZero:i,grace:o,ticks:s}=this.options,c=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=k0(this,o,i),this._dataLimitsCached=true),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let p=c<this.ticks.length;this._convertTicksToLabels(p?ow(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=I6(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),p&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate();}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels;}afterUpdate(){Qe(this.options.afterUpdate,[this]);}beforeSetDimensions(){Qe(this.options.beforeSetDimensions,[this]);}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0;}afterSetDimensions(){Qe(this.options.afterSetDimensions,[this]);}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Qe(this.options[e],[this]);}beforeDataLimits(){this._callHooks("beforeDataLimits");}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits");}beforeBuildTicks(){this._callHooks("beforeBuildTicks");}buildTicks(){return []}afterBuildTicks(){this._callHooks("afterBuildTicks");}beforeTickToLabelConversion(){Qe(this.options.beforeTickToLabelConversion,[this]);}generateTickLabels(e){let n=this.options.ticks,r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r],o.label=Qe(n.callback,[o.value,r,e],this);}afterTickToLabelConversion(){Qe(this.options.afterTickToLabelConversion,[this]);}beforeCalculateLabelRotation(){Qe(this.options.beforeCalculateLabelRotation,[this]);}calculateLabelRotation(){let e=this.options,n=e.ticks,r=this.ticks.length,i=n.minRotation||0,o=n.maxRotation,s=i,c,p,h;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}let v=this._getLabelSizes(),P=v.widest.width,x=v.highest.height,T=Nr(this.chart.width-P,0,this.maxWidth);c=e.offset?this.maxWidth/r:T/(r-1),P+6>c&&(c=T/(r-(e.offset?.5:1)),p=this.maxHeight-yf(e.grid)-n.padding-aw(e.title,this.chart.options.font),h=Math.sqrt(P*P+x*x),s=_c(Math.min(Math.asin(Nr((v.highest.height+6)/c,-1,1)),Math.asin(Nr(p/h,-1,1))-Math.asin(Nr(x/h,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s;}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this]);}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this]);}fit(){let e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),c=this.isHorizontal();if(s){let p=aw(i,n.options.font);if(c?(e.width=this.maxWidth,e.height=yf(o)+p):(e.height=this.maxHeight,e.width=yf(o)+p),r.display&&this.ticks.length){let{first:h,last:v,widest:P,highest:x}=this._getLabelSizes(),T=r.padding*2,I=Qn(this.labelRotation),R=Math.cos(I),A=Math.sin(I);if(c){let O=r.mirror?0:A*P.width+R*x.height;e.height=Math.min(this.maxHeight,e.height+O+T);}else {let O=r.mirror?0:R*P.width+A*x.height;e.width=Math.min(this.maxWidth,e.width+O+T);}this._calculatePadding(h,v,A,R);}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom);}_calculatePadding(e,n,r,i){let{ticks:{align:o,padding:s},position:c}=this.options,p=this.labelRotation!==0,h=c!=="top"&&this.axis==="x";if(this.isHorizontal()){let v=this.getPixelForTick(0)-this.left,P=this.right-this.getPixelForTick(this.ticks.length-1),x=0,T=0;p?h?(x=i*e.width,T=r*n.height):(x=r*e.height,T=i*n.width):o==="start"?T=n.width:o==="end"?x=e.width:o!=="inner"&&(x=e.width/2,T=n.width/2),this.paddingLeft=Math.max((x-v+s)*this.width/(this.width-v),0),this.paddingRight=Math.max((T-P+s)*this.width/(this.width-P),0);}else {let v=n.height/2,P=e.height/2;o==="start"?(v=0,P=e.height):o==="end"&&(v=n.height,P=0),this.paddingTop=v+s,this.paddingBottom=P+s;}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom));}afterFit(){Qe(this.options.afterFit,[this]);}isHorizontal(){let{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)Le(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion();}_getLabelSizes(){let e=this._labelSizes;if(!e){let n=this.options.ticks.sampleSize,r=this.ticks;n<r.length&&(r=ow(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length);}return e}_computeLabelSizes(e,n){let{ctx:r,_longestTextCache:i}=this,o=[],s=[],c=0,p=0,h,v,P,x,T,I,R,A,O,N,V;for(h=0;h<n;++h){if(x=e[h].label,T=this._resolveTickFontOptions(h),r.font=I=T.string,R=i[I]=i[I]||{data:{},gc:[]},A=T.lineHeight,O=N=0,!Le(x)&&!He(x))O=ed(r,R.data,R.gc,O,x),N=A;else if(He(x))for(v=0,P=x.length;v<P;++v)V=x[v],!Le(V)&&!He(V)&&(O=ed(r,R.data,R.gc,O,V),N+=A);o.push(O),s.push(N),c=Math.max(O,c),p=Math.max(N,p);}N6(i,n);let G=o.indexOf(c),X=s.indexOf(p),nt=st=>({width:o[st]||0,height:s[st]||0});return {first:nt(0),last:nt(n-1),widest:nt(G),highest:nt(X),widths:o,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){let n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let n=this._startPixel+e*this._length;return g0(this._alignToPixels?rs(this.chart,n,0):n)}getDecimalForPixel(e){let n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){let n=this.ticks||[];if(e>=0&&e<n.length){let r=n[e];return r.$context||(r.$context=B6(this.getContext(),e,r))}return this.$context||(this.$context=L6(this.chart.getContext(),this))}_tickSize(){let e=this.options.ticks,n=Qn(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),s=e.autoSkipPadding||0,c=o?o.widest.width+s:0,p=o?o.highest.height+s:0;return this.isHorizontal()?p*r>c*i?c/r:p/i:p*i<c*r?p/r:c/i}_isVisible(){let e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){let n=this.axis,r=this.chart,i=this.options,{grid:o,position:s}=i,c=o.offset,p=this.isHorizontal(),v=this.ticks.length+(c?1:0),P=yf(o),x=[],T=o.setContext(this.getContext()),I=T.drawBorder?T.borderWidth:0,R=I/2,A=function(mt){return rs(r,mt,I)},O,N,V,G,X,nt,st,U,j,ut,Y,at;if(s==="top")O=A(this.bottom),nt=this.bottom-P,U=O-R,ut=A(e.top)+R,at=e.bottom;else if(s==="bottom")O=A(this.top),ut=e.top,at=A(e.bottom)-R,nt=O+R,U=this.top+P;else if(s==="left")O=A(this.right),X=this.right-P,st=O-R,j=A(e.left)+R,Y=e.right;else if(s==="right")O=A(this.left),j=e.left,Y=A(e.right)-R,X=O+R,st=this.left+P;else if(n==="x"){if(s==="center")O=A((e.top+e.bottom)/2+.5);else if(Te(s)){let mt=Object.keys(s)[0],Ct=s[mt];O=A(this.chart.scales[mt].getPixelForValue(Ct));}ut=e.top,at=e.bottom,nt=O+R,U=nt+P;}else if(n==="y"){if(s==="center")O=A((e.left+e.right)/2);else if(Te(s)){let mt=Object.keys(s)[0],Ct=s[mt];O=A(this.chart.scales[mt].getPixelForValue(Ct));}X=O-R,st=X-P,j=e.left,Y=e.right;}let pt=me(i.ticks.maxTicksLimit,v),dt=Math.max(1,Math.ceil(v/pt));for(N=0;N<v;N+=dt){let mt=o.setContext(this.getContext(N)),Ct=mt.lineWidth,jt=mt.color,Gt=mt.borderDash||[],Jt=mt.borderDashOffset,ee=mt.tickWidth,re=mt.tickColor,Ee=mt.tickBorderDash||[],je=mt.tickBorderDashOffset;V=M6(this,N,c),V!==void 0&&(G=rs(r,V,Ct),p?X=st=j=Y=G:nt=U=ut=at=G,x.push({tx1:X,ty1:nt,tx2:st,ty2:U,x1:j,y1:ut,x2:Y,y2:at,width:Ct,color:jt,borderDash:Gt,borderDashOffset:Jt,tickWidth:ee,tickColor:re,tickBorderDash:Ee,tickBorderDashOffset:je}));}return this._ticksLength=v,this._borderValue=O,x}_computeLabelItems(e){let n=this.axis,r=this.options,{position:i,ticks:o}=r,s=this.isHorizontal(),c=this.ticks,{align:p,crossAlign:h,padding:v,mirror:P}=o,x=yf(r.grid),T=x+v,I=P?-v:T,R=-Qn(this.labelRotation),A=[],O,N,V,G,X,nt,st,U,j,ut,Y,at,pt="middle";if(i==="top")nt=this.bottom-I,st=this._getXAxisLabelAlignment();else if(i==="bottom")nt=this.top+I,st=this._getXAxisLabelAlignment();else if(i==="left"){let mt=this._getYAxisLabelAlignment(x);st=mt.textAlign,X=mt.x;}else if(i==="right"){let mt=this._getYAxisLabelAlignment(x);st=mt.textAlign,X=mt.x;}else if(n==="x"){if(i==="center")nt=(e.top+e.bottom)/2+T;else if(Te(i)){let mt=Object.keys(i)[0],Ct=i[mt];nt=this.chart.scales[mt].getPixelForValue(Ct)+T;}st=this._getXAxisLabelAlignment();}else if(n==="y"){if(i==="center")X=(e.left+e.right)/2-T;else if(Te(i)){let mt=Object.keys(i)[0],Ct=i[mt];X=this.chart.scales[mt].getPixelForValue(Ct);}st=this._getYAxisLabelAlignment(x).textAlign;}n==="y"&&(p==="start"?pt="top":p==="end"&&(pt="bottom"));let dt=this._getLabelSizes();for(O=0,N=c.length;O<N;++O){V=c[O],G=V.label;let mt=o.setContext(this.getContext(O));U=this.getPixelForTick(O)+o.labelOffset,j=this._resolveTickFontOptions(O),ut=j.lineHeight,Y=He(G)?G.length:1;let Ct=Y/2,jt=mt.color,Gt=mt.textStrokeColor,Jt=mt.textStrokeWidth,ee=st;s?(X=U,st==="inner"&&(O===N-1?ee=this.options.reverse?"left":"right":O===0?ee=this.options.reverse?"right":"left":ee="center"),i==="top"?h==="near"||R!==0?at=-Y*ut+ut/2:h==="center"?at=-dt.highest.height/2-Ct*ut+ut:at=-dt.highest.height+ut/2:h==="near"||R!==0?at=ut/2:h==="center"?at=dt.highest.height/2-Ct*ut:at=dt.highest.height-Y*ut,P&&(at*=-1)):(nt=U,at=(1-Y)*ut/2);let re;if(mt.showLabelBackdrop){let Ee=$n(mt.backdropPadding),je=dt.heights[O],sn=dt.widths[O],Ze=nt+at-Ee.top,Pn=X-Ee.left;switch(pt){case "middle":Ze-=je/2;break;case "bottom":Ze-=je;break}switch(st){case "center":Pn-=sn/2;break;case "right":Pn-=sn;break}re={left:Pn,top:Ze,width:sn+Ee.width,height:je+Ee.height,color:mt.backdropColor};}A.push({rotation:R,label:G,font:j,color:jt,strokeColor:Gt,strokeWidth:Jt,textOffset:at,textAlign:ee,textBaseline:pt,translation:[X,nt],backdrop:re});}return A}_getXAxisLabelAlignment(){let{position:e,ticks:n}=this.options;if(-Qn(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){let{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,s=this._getLabelSizes(),c=e+o,p=s.widest.width,h,v;return n==="left"?i?(v=this.right+o,r==="near"?h="left":r==="center"?(h="center",v+=p/2):(h="right",v+=p)):(v=this.right-c,r==="near"?h="right":r==="center"?(h="center",v-=p/2):(h="left",v=this.left)):n==="right"?i?(v=this.left+o,r==="near"?h="right":r==="center"?(h="center",v-=p/2):(h="left",v-=p)):(v=this.left+c,r==="near"?h="left":r==="center"?(h="center",v+=p/2):(h="right",v=this.right)):h="right",{textAlign:h,x:v}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,n=this.options.position;if(n==="left"||n==="right")return {top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return {top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:n},left:r,top:i,width:o,height:s}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,i,o,s),e.restore());}getLineWidthForValue(e){let n=this.options.grid;if(!this._isVisible()||!n.display)return 0;let i=this.ticks.findIndex(o=>o.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){let n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),o,s,c=(p,h,v)=>{!v.width||!v.color||(r.save(),r.lineWidth=v.width,r.strokeStyle=v.color,r.setLineDash(v.borderDash||[]),r.lineDashOffset=v.borderDashOffset,r.beginPath(),r.moveTo(p.x,p.y),r.lineTo(h.x,h.y),r.stroke(),r.restore());};if(n.display)for(o=0,s=i.length;o<s;++o){let p=i[o];n.drawOnChartArea&&c({x:p.x1,y:p.y1},{x:p.x2,y:p.y2},p),n.drawTicks&&c({x:p.tx1,y:p.ty1},{x:p.tx2,y:p.ty2},{color:p.tickColor,width:p.tickWidth,borderDash:p.tickBorderDash,borderDashOffset:p.tickBorderDashOffset});}}drawBorder(){let{chart:e,ctx:n,options:{grid:r}}=this,i=r.setContext(this.getContext()),o=r.drawBorder?i.borderWidth:0;if(!o)return;let s=r.setContext(this.getContext(0)).lineWidth,c=this._borderValue,p,h,v,P;this.isHorizontal()?(p=rs(e,this.left,o)-o/2,h=rs(e,this.right,s)+s/2,v=P=c):(v=rs(e,this.top,o)-o/2,P=rs(e,this.bottom,s)+s/2,p=h=c),n.save(),n.lineWidth=i.borderWidth,n.strokeStyle=i.borderColor,n.beginPath(),n.moveTo(p,v),n.lineTo(h,P),n.stroke(),n.restore();}drawLabels(e){if(!this.options.ticks.display)return;let r=this.ctx,i=this._computeLabelArea();i&&fl(r,i);let o=this._labelItems||(this._labelItems=this._computeLabelItems(e)),s,c;for(s=0,c=o.length;s<c;++s){let p=o[s],h=p.font,v=p.label;p.backdrop&&(r.fillStyle=p.backdrop.color,r.fillRect(p.backdrop.left,p.backdrop.top,p.backdrop.width,p.backdrop.height));let P=p.textOffset;is(r,v,0,P,h,p);}i&&hl(r);}drawTitle(){let{ctx:e,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;let o=Sn(r.font),s=$n(r.padding),c=r.align,p=o.lineHeight/2;n==="bottom"||n==="center"||Te(n)?(p+=s.bottom,He(r.text)&&(p+=o.lineHeight*(r.text.length-1))):p+=s.top;let{titleX:h,titleY:v,maxWidth:P,rotation:x}=$6(this,p,n,c);is(e,r.text,0,0,o,{color:r.color,maxWidth:P,rotation:x,textAlign:U6(c,n,i),textBaseline:"middle",translation:[h,v]});}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e));}_layers(){let e=this.options,n=e.ticks&&e.ticks.z||0,r=me(e.grid&&e.grid.z,-1);return !this._isVisible()||this.draw!==t.prototype.draw?[{z:n,draw:i=>{this.draw(i);}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle();}},{z:r+1,draw:()=>{this.drawBorder();}},{z:n,draw:i=>{this.drawLabels(i);}}]}getMatchingVisibleMetas(e){let n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[],o,s;for(o=0,s=n.length;o<s;++o){let c=n[o];c[r]===this.id&&(!e||c.type===e)&&i.push(c);}return i}_resolveTickFontOptions(e){let n=this.options.ticks.setContext(this.getContext(e));return Sn(n.font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return (this.isHorizontal()?this.width:this.height)/e}},od=class{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null);}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let n=Object.getPrototypeOf(e),r;V6(n)&&(r=this.register(n));let i=this.items,o=e.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in i||(i[o]=e,G6(e,s,r),this.override&&ke.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){let n=this.items,r=e.id,i=this.scope;r in n&&delete n[r],i&&r in ke[i]&&(delete ke[i][r],this.override&&delete pl[r]);}};function G6(t,e,n){let r=ji(Object.create(null),[n?ke.get(n):{},ke.get(e),t.defaults]);ke.set(e,r),t.defaultRoutes&&j6(e,t.defaultRoutes),t.descriptors&&ke.describe(e,t.descriptors);}function j6(t,e){Object.keys(e).forEach(n=>{let r=n.split("."),i=r.pop(),o=[t].concat(r).join("."),s=e[n].split("."),c=s.pop(),p=s.join(".");ke.route(o,i,p,c);});}function V6(t){return "id"in t&&"defaults"in t}var Q0=class{constructor(){this.controllers=new od(zi,"datasets",true),this.elements=new od(br,"elements"),this.plugins=new od(Object,"plugins"),this.scales=new od(Ac,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements];}add(...e){this._each("register",e);}remove(...e){this._each("unregister",e);}addControllers(...e){this._each("register",e,this.controllers);}addElements(...e){this._each("register",e,this.elements);}addPlugins(...e){this._each("register",e,this.plugins);}addScales(...e){this._each("register",e,this.scales);}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers);}removeElements(...e){this._each("unregister",e,this.elements);}removePlugins(...e){this._each("unregister",e,this.plugins);}removeScales(...e){this._each("unregister",e,this.scales);}_each(e,n,r){[...n].forEach(i=>{let o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(e,o,i):tn(i,s=>{let c=r||this._getRegistryForType(s);this._exec(e,c,s);});});}_exec(e,n,r){let i=sf(e);Qe(r["before"+i],[],r),n[e](r),Qe(r["after"+i],[],r);}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){let r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){let i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return i}},Ca=new Q0,If=class extends zi{update(e){let n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled,{start:o,count:s}=jg(n,r,i);if(this._drawStart=o,this._drawCount=s,Vg(n)&&(o=0,s=r.length),this.options.showLine){let{dataset:c,_dataset:p}=n;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!p._decimated,c.points=r;let h=this.resolveDatasetElementOptions(e);h.segment=this.options.segment,this.updateElement(c,void 0,{animated:!i,options:h},e);}this.updateElements(r,o,s,e);}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=Ca.getElement("line")),super.addElements();}updateElements(e,n,r,i){let o=i==="reset",{iScale:s,vScale:c,_stacked:p,_dataset:h}=this._cachedMeta,v=this.resolveDataElementOptions(n,i),P=this.getSharedOptions(v),x=this.includeOptions(i,P),T=s.axis,I=c.axis,{spanGaps:R,segment:A}=this.options,O=Vi(R)?R:Number.POSITIVE_INFINITY,N=this.chart._animationsDisabled||o||i==="none",V=n>0&&this.getParsed(n-1);for(let G=n;G<n+r;++G){let X=e[G],nt=this.getParsed(G),st=N?X:{},U=Le(nt[I]),j=st[T]=s.getPixelForValue(nt[T],G),ut=st[I]=o||U?c.getBasePixel():c.getPixelForValue(p?this.applyStack(c,nt,p):nt[I],G);st.skip=isNaN(j)||isNaN(ut)||U,st.stop=G>0&&Math.abs(nt[T]-V[T])>O,A&&(st.parsed=nt,st.raw=h.data[G]),x&&(st.options=P||this.resolveDataElementOptions(G,X.active?"active":i)),N||this.updateElement(X,G,st,i),V=nt;}this.updateSharedOptions(P,i,v);}getMaxOverflow(){let e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let c=0;for(let p=n.length-1;p>=0;--p)c=Math.max(c,n[p].size(this.resolveDataElementOptions(p))/2);return c>0&&c}let r=e.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;let o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}};If.id="scatter";If.defaults={datasetElementType:false,dataElementType:"point",showLine:false,fill:false};If.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return ""},label(t){return "("+t.label+", "+t.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function kc(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var kf=class{constructor(e){this.options=e||{};}init(e){}formats(){return kc()}parse(e,n){return kc()}format(e,n){return kc()}add(e,n,r){return kc()}diff(e,n,r){return kc()}startOf(e,n,r){return kc()}endOf(e,n){return kc()}};kf.override=function(t){Object.assign(kf.prototype,t);};var z6={_date:kf};function H6(t,e,n,r){let{controller:i,data:o,_sorted:s}=t,c=i._cachedMeta.iScale;if(c&&e===c.axis&&e!=="r"&&s&&o.length){let p=c._reversePixels?y0:es;if(r){if(i._sharedOptions){let h=o[0],v=typeof h.getRange=="function"&&h.getRange(e);if(v){let P=p(o,e,n-v),x=p(o,e,n+v);return {lo:P.lo,hi:x.hi}}}}else return p(o,e,n)}return {lo:0,hi:o.length-1}}function Of(t,e,n,r,i){let o=t.getSortedVisibleDatasetMetas(),s=n[e];for(let c=0,p=o.length;c<p;++c){let{index:h,data:v}=o[c],{lo:P,hi:x}=H6(o[c],e,s,i);for(let T=P;T<=x;++T){let I=v[T];I.skip||r(I,h,T);}}}function W6(t){let e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,i){let o=e?Math.abs(r.x-i.x):0,s=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function G0(t,e,n,r,i){let o=[];return !i&&!t.isPointInArea(e)||Of(t,n,e,function(c,p,h){!i&&!Pc(c,t.chartArea,0)||c.inRange(e.x,e.y,r)&&o.push({element:c,datasetIndex:p,index:h});},true),o}function q6(t,e,n,r){let i=[];function o(s,c,p){let{startAngle:h,endAngle:v}=s.getProps(["startAngle","endAngle"],r),{angle:P}=Lg(s,{x:e.x,y:e.y});Tc(P,h,v)&&i.push({element:s,datasetIndex:c,index:p});}return Of(t,n,e,o),i}function Y6(t,e,n,r,i,o){let s=[],c=W6(n),p=Number.POSITIVE_INFINITY;function h(v,P,x){let T=v.inRange(e.x,e.y,i);if(r&&!T)return;let I=v.getCenterPoint(i);if(!(!!o||t.isPointInArea(I))&&!T)return;let A=c(e,I);A<p?(s=[{element:v,datasetIndex:P,index:x}],p=A):A===p&&s.push({element:v,datasetIndex:P,index:x});}return Of(t,n,e,h),s}function j0(t,e,n,r,i,o){return !o&&!t.isPointInArea(e)?[]:n==="r"&&!r?q6(t,e,n,i):Y6(t,e,n,r,i,o)}function sw(t,e,n,r,i){let o=[],s=n==="x"?"inXRange":"inYRange",c=false;return Of(t,n,e,(p,h,v)=>{p[s](e[n],i)&&(o.push({element:p,datasetIndex:h,index:v}),c=c||p.inRange(e.x,e.y,i));}),r&&!c?[]:o}var Q6={modes:{index(t,e,n,r){let i=as(e,t),o=n.axis||"x",s=n.includeInvisible||false,c=n.intersect?G0(t,i,o,r,s):j0(t,i,o,false,r,s),p=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(h=>{let v=c[0].index,P=h.data[v];P&&!P.skip&&p.push({element:P,datasetIndex:h.index,index:v});}),p):[]},dataset(t,e,n,r){let i=as(e,t),o=n.axis||"xy",s=n.includeInvisible||false,c=n.intersect?G0(t,i,o,r,s):j0(t,i,o,false,r,s);if(c.length>0){let p=c[0].datasetIndex,h=t.getDatasetMeta(p).data;c=[];for(let v=0;v<h.length;++v)c.push({element:h[v],datasetIndex:p,index:v});}return c},point(t,e,n,r){let i=as(e,t),o=n.axis||"xy",s=n.includeInvisible||false;return G0(t,i,o,r,s)},nearest(t,e,n,r){let i=as(e,t),o=n.axis||"xy",s=n.includeInvisible||false;return j0(t,i,o,n.intersect,r,s)},x(t,e,n,r){let i=as(e,t);return sw(t,i,"x",n.intersect,r)},y(t,e,n,r){let i=as(e,t);return sw(t,i,"y",n.intersect,r)}}},Gw=["left","top","right","bottom"];function bf(t,e){return t.filter(n=>n.pos===e)}function lw(t,e){return t.filter(n=>Gw.indexOf(n.pos)===-1&&n.box.axis===e)}function vf(t,e){return t.sort((n,r)=>{let i=e?r:n,o=e?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function K6(t){let e=[],n,r,i,o,s,c;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],{position:o,options:{stack:s,stackWeight:c=1}}=i,e.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&o+s,stackWeight:c});return e}function X6(t){let e={};for(let n of t){let{stack:r,pos:i,stackWeight:o}=n;if(!r||!Gw.includes(i))continue;let s=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o;}return e}function Z6(t,e){let n=X6(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e,o,s,c;for(o=0,s=t.length;o<s;++o){c=t[o];let{fullSize:p}=c.box,h=n[c.stack],v=h&&c.stackWeight/h.weight;c.horizontal?(c.width=v?v*r:p&&e.availableWidth,c.height=i):(c.width=r,c.height=v?v*i:p&&e.availableHeight);}return n}function J6(t){let e=K6(t),n=vf(e.filter(h=>h.box.fullSize),true),r=vf(bf(e,"left"),true),i=vf(bf(e,"right")),o=vf(bf(e,"top"),true),s=vf(bf(e,"bottom")),c=lw(e,"x"),p=lw(e,"y");return {fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(p).concat(s).concat(c),chartArea:bf(e,"chartArea"),vertical:r.concat(i).concat(p),horizontal:o.concat(s).concat(c)}}function cw(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function jw(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right);}function t4(t,e,n,r){let{pos:i,box:o}=n,s=t.maxPadding;if(!Te(i)){n.size&&(t[i]-=n.size);let P=r[n.stack]||{size:0,count:1};P.size=Math.max(P.size,n.horizontal?o.height:o.width),n.size=P.size/P.count,t[i]+=n.size;}o.getPadding&&jw(s,o.getPadding());let c=Math.max(0,e.outerWidth-cw(s,t,"left","right")),p=Math.max(0,e.outerHeight-cw(s,t,"top","bottom")),h=c!==t.w,v=p!==t.h;return t.w=c,t.h=p,n.horizontal?{same:h,other:v}:{same:v,other:h}}function e4(t){let e=t.maxPadding;function n(r){let i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom");}function n4(t,e){let n=e.maxPadding;function r(i){let o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(e[s],n[s]);}),o}return r(t?["left","right"]:["top","bottom"])}function Sf(t,e,n,r){let i=[],o,s,c,p,h,v;for(o=0,s=t.length,h=0;o<s;++o){c=t[o],p=c.box,p.update(c.width||e.w,c.height||e.h,n4(c.horizontal,e));let{same:P,other:x}=t4(e,n,c,r);h|=P&&i.length,v=v||x,p.fullSize||i.push(c);}return h&&Sf(i,e,n,r)||v}function oy(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i;}function uw(t,e,n,r){let i=n.padding,{x:o,y:s}=e;for(let c of t){let p=c.box,h=r[c.stack]||{placed:0,weight:1},v=c.stackWeight/h.weight||1;if(c.horizontal){let P=e.w*v,x=h.size||p.height;Fn(h.start)&&(s=h.start),p.fullSize?oy(p,i.left,s,n.outerWidth-i.right-i.left,x):oy(p,e.left+h.placed,s,P,x),h.start=s,h.placed+=P,s=p.bottom;}else {let P=e.h*v,x=h.size||p.width;Fn(h.start)&&(o=h.start),p.fullSize?oy(p,o,i.top,x,n.outerHeight-i.bottom-i.top):oy(p,o,e.top+h.placed,x,P),h.start=o,h.placed+=P,o=p.right;}}e.x=o,e.y=s;}ke.set("layout",{autoPadding:true,padding:{top:0,right:0,bottom:0,left:0}});var yo={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||false,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return [{z:0,draw(n){e.draw(n);}}]},t.boxes.push(e);},removeBox(t,e){let n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1);},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight;},update(t,e,n,r){if(!t)return;let i=$n(t.options.layout.padding),o=Math.max(e-i.width,0),s=Math.max(n-i.height,0),c=J6(t.boxes),p=c.vertical,h=c.horizontal;tn(t.boxes,R=>{typeof R.beforeLayout=="function"&&R.beforeLayout();});let v=p.reduce((R,A)=>A.box.options&&A.box.options.display===false?R:R+1,0)||1,P=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/v,hBoxMaxHeight:s/2}),x=Object.assign({},i);jw(x,$n(r));let T=Object.assign({maxPadding:x,w:o,h:s,x:i.left,y:i.top},i),I=Z6(p.concat(h),P);Sf(c.fullSize,T,P,I),Sf(p,T,P,I),Sf(h,T,P,I)&&Sf(p,T,P,I),e4(T),uw(c.leftAndTop,T,P,I),T.x+=T.w,T.y+=T.h,uw(c.rightAndBottom,T,P,I),t.chartArea={left:T.left,top:T.top,right:T.left+T.w,bottom:T.top+T.h,height:T.h,width:T.w},tn(c.chartArea,R=>{let A=R.box;Object.assign(A,t.chartArea),A.update(T.w,T.h,{left:0,top:0,right:0,bottom:0});});}},dy=class{acquireContext(e,n){}releaseContext(e){return false}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return true}updateConfig(e){}},K0=class extends dy{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=false;}},cy="$chartjs",r4={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},dw=t=>t===null||t==="";function i4(t,e){let n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[cy]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",dw(i)){let o=Jg(t,"width");o!==void 0&&(t.width=o);}if(dw(r))if(t.style.height==="")t.height=t.width/(e||2);else {let o=Jg(t,"height");o!==void 0&&(t.height=o);}return t}var Vw=F0?{passive:true}:false;function o4(t,e,n){t.addEventListener(e,n,Vw);}function a4(t,e,n){t.canvas.removeEventListener(e,n,Vw);}function s4(t,e){let n=r4[t.type]||t.type,{x:r,y:i}=as(t,e);return {type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function py(t,e){for(let n of t)if(n===e||n.contains(e))return true}function l4(t,e,n){let r=t.canvas,i=new MutationObserver(o=>{let s=false;for(let c of o)s=s||py(c.addedNodes,r),s=s&&!py(c.removedNodes,r);s&&n();});return i.observe(document,{childList:true,subtree:true}),i}function c4(t,e,n){let r=t.canvas,i=new MutationObserver(o=>{let s=false;for(let c of o)s=s||py(c.removedNodes,r),s=s&&!py(c.addedNodes,r);s&&n();});return i.observe(document,{childList:true,subtree:true}),i}var Df=new Map,pw=0;function zw(){let t=window.devicePixelRatio;t!==pw&&(pw=t,Df.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e();}));}function u4(t,e){Df.size||window.addEventListener("resize",zw),Df.set(t,e);}function d4(t){Df.delete(t),Df.size||window.removeEventListener("resize",zw);}function p4(t,e,n){let r=t.canvas,i=r&&mf(r);if(!i)return;let o=Gg((c,p)=>{let h=i.clientWidth;n(c,p),h<i.clientWidth&&n();},window),s=new ResizeObserver(c=>{let p=c[0],h=p.contentRect.width,v=p.contentRect.height;h===0&&v===0||o(h,v);});return s.observe(i),u4(t,o),s}function V0(t,e,n){n&&n.disconnect(),e==="resize"&&d4(t);}function f4(t,e,n){let r=t.canvas,i=Gg(o=>{t.ctx!==null&&n(s4(o,t));},t,o=>{let s=o[0];return [s,s.offsetX,s.offsetY]});return o4(r,e,i),i}var X0=class extends dy{acquireContext(e,n){let r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(i4(e,n),r):null}releaseContext(e){let n=e.canvas;if(!n[cy])return false;let r=n[cy].initial;["height","width"].forEach(o=>{let s=r[o];Le(s)?n.removeAttribute(o):n.setAttribute(o,s);});let i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o];}),n.width=n.width,delete n[cy],true}addEventListener(e,n,r){this.removeEventListener(e,n);let i=e.$proxies||(e.$proxies={}),s={attach:l4,detach:c4,resize:p4}[n]||f4;i[n]=s(e,n,r);}removeEventListener(e,n){let r=e.$proxies||(e.$proxies={}),i=r[n];if(!i)return;(({attach:V0,detach:V0,resize:V0})[n]||a4)(e,n,i),r[n]=void 0;}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return R0(e,n,r,i)}isAttached(e){let n=mf(e);return !!(n&&n.isConnected)}};function h4(t){return !Kg()||typeof OffscreenCanvas!="undefined"&&t instanceof OffscreenCanvas?K0:X0}var Z0=class{constructor(){this._init=[];}notify(e,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,true),this._notify(this._init,e,"install"));let o=i?this._descriptors(e).filter(i):this._descriptors(e),s=this._notify(o,e,n,r);return n==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,n,r,i){i=i||{};for(let o of e){let s=o.plugin,c=s[r],p=[n,i,o.options];if(Qe(c,p,s)===false&&i.cancelable)return false}return true}invalidate(){Le(this._cache)||(this._oldCache=this._cache,this._cache=void 0);}_descriptors(e){if(this._cache)return this._cache;let n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){let r=e&&e.config,i=me(r.options&&r.options.plugins,{}),o=m4(r);return i===false&&!n?[]:y4(e,o,i,n)}_notifyStateChanges(e){let n=this._oldCache||[],r=this._cache,i=(o,s)=>o.filter(c=>!s.some(p=>c.plugin.id===p.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start");}};function m4(t){let e={},n=[],r=Object.keys(Ca.plugins.items);for(let o=0;o<r.length;o++)n.push(Ca.getPlugin(r[o]));let i=t.plugins||[];for(let o=0;o<i.length;o++){let s=i[o];n.indexOf(s)===-1&&(n.push(s),e[s.id]=true);}return {plugins:n,localIds:e}}function g4(t,e){return !e&&t===false?null:t===true?{}:t}function y4(t,{plugins:e,localIds:n},r,i){let o=[],s=t.getContext();for(let c of e){let p=c.id,h=g4(r[p],i);h!==null&&o.push({plugin:c,options:b4(t.config,{plugin:c,local:n[p]},h,s)});}return o}function b4(t,{plugin:e,local:n},r,i){let o=t.pluginScopeKeys(e),s=t.getOptionScopes(r,o);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,i,[""],{scriptable:false,indexable:false,allKeys:true})}function J0(t,e){let n=ke.datasets[t]||{};return ((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function v4(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function C4(t,e){return t===e?"_index_":"_value_"}function S4(t){if(t==="top"||t==="bottom")return "x";if(t==="left"||t==="right")return "y"}function t1(t,e){return t==="x"||t==="y"?t:e.axis||S4(e.position)||t.charAt(0).toLowerCase()}function P4(t,e){let n=pl[t.type]||{scales:{}},r=e.scales||{},i=J0(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(r).forEach(c=>{let p=r[c];if(!Te(p))return console.error(`Invalid scale configuration for scale: ${c}`);if(p._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${c}`);let h=t1(c,p),v=C4(h,i),P=n.scales||{};o[h]=o[h]||c,s[c]=xc(Object.create(null),[{axis:h},p,P[h],P[v]]);}),t.data.datasets.forEach(c=>{let p=c.type||t.type,h=c.indexAxis||J0(p,e),P=(pl[p]||{}).scales||{};Object.keys(P).forEach(x=>{let T=v4(x,h),I=c[T+"AxisID"]||o[T]||T;s[I]=s[I]||Object.create(null),xc(s[I],[{axis:T},r[I],P[x]]);});}),Object.keys(s).forEach(c=>{let p=s[c];xc(p,[ke.scales[p.type],ke.scale]);}),s}function Hw(t){let e=t.options||(t.options={});e.plugins=me(e.plugins,{}),e.scales=P4(t,e);}function Ww(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function x4(t){return t=t||{},t.data=Ww(t.data),Hw(t),t}var fw=new Map,qw=new Set;function ay(t,e){let n=fw.get(t);return n||(n=e(),fw.set(t,n),qw.add(n)),n}var Cf=(t,e,n)=>{let r=ya(e,n);r!==void 0&&t.add(r);},e1=class{constructor(e){this._config=x4(e),this._scopeCache=new Map,this._resolverCache=new Map;}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e;}get data(){return this._config.data}set data(e){this._config.data=Ww(e);}get options(){return this._config.options}set options(e){this._config.options=e;}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),Hw(e);}clearCache(){this._scopeCache.clear(),this._resolverCache.clear();}datasetScopeKeys(e){return ay(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return ay(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return ay(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){let n=e.id,r=this.type;return ay(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){let r=this._scopeCache,i=r.get(e);return (!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){let{options:i,type:o}=this,s=this._cachedScopes(e,r),c=s.get(n);if(c)return c;let p=new Set;n.forEach(v=>{e&&(p.add(e),v.forEach(P=>Cf(p,e,P))),v.forEach(P=>Cf(p,i,P)),v.forEach(P=>Cf(p,pl[o]||{},P)),v.forEach(P=>Cf(p,ke,P)),v.forEach(P=>Cf(p,zg,P));});let h=Array.from(p);return h.length===0&&h.push(Object.create(null)),qw.has(n)&&s.set(n,h),h}chartOptionScopes(){let{options:e,type:n}=this;return [e,pl[n]||{},ke.datasets[n]||{},{type:n},ke,zg]}resolveNamedOptions(e,n,r,i=[""]){let o={$shared:true},{resolver:s,subPrefixes:c}=hw(this._resolverCache,e,i),p=s;if(_4(s,n)){o.$shared=false,r=Gr(r)?r():r;let h=this.createResolver(e,r,c);p=dl(s,r,h);}for(let h of n)o[h]=p[h];return o}createResolver(e,n,r=[""],i){let{resolver:o}=hw(this._resolverCache,e,r);return Te(n)?dl(o,n,void 0,i):o}};function hw(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));let i=n.join(),o=r.get(i);return o||(o={resolver:hf(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},r.set(i,o)),o}var E4=t=>Te(t)&&Object.getOwnPropertyNames(t).reduce((e,n)=>e||Gr(t[n]),false);function _4(t,e){let{isScriptable:n,isIndexable:r}=Yg(t);for(let i of e){let o=n(i),s=r(i),c=(s||o)&&t[i];if(o&&(Gr(c)||E4(c))||s&&He(c))return true}return false}var T4="3.9.1",w4=["top","bottom","left","right","chartArea"];function mw(t,e){return t==="top"||t==="bottom"||w4.indexOf(t)===-1&&e==="x"}function gw(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function yw(t){let e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Qe(n&&n.onComplete,[t],e);}function I4(t){let e=t.chart,n=e.options.animation;Qe(n&&n.onProgress,[t],e);}function Yw(t){return Kg()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var fy={},Qw=t=>{let e=Yw(t);return Object.values(fy).filter(n=>n.canvas===e).pop()};function k4(t,e,n){let r=Object.keys(t);for(let i of r){let o=+i;if(o>=e){let s=t[i];delete t[i],(n>0||o>e)&&(t[o+n]=s);}}}function D4(t,e,n,r){return !n||t.type==="mouseout"?null:r?e:t}var bo=class{constructor(e,n){let r=this.config=new e1(n),i=Yw(e),o=Qw(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||h4(i)),this.platform.updateConfig(r);let c=this.platform.acquireContext(i,s.aspectRatio),p=c&&c.canvas,h=p&&p.height,v=p&&p.width;if(this.id=d0(),this.ctx=c,this.canvas=p,this.width=v,this.height=h,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Z0,this.$proxies={},this._hiddenIndices={},this.attached=false,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=C0(P=>this.update(P),s.resizeDelay||0),this._dataChanges=[],fy[this.id]=this,!c||!p){console.error("Failed to create chart: can't acquire context from the given item");return}ss.listen(this,"complete",yw),ss.listen(this,"progress",I4),this._initialize(),this.attached&&this.update();}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Le(e)?n&&o?o:i?r/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e;}get options(){return this._options}set options(e){this.config.options=e;}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Zg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Hg(this.canvas,this.ctx),this}stop(){return ss.stop(this),this}resize(e,n){ss.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n);}_resize(e,n){let r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,e,n,o),c=r.devicePixelRatio||this.platform.getDevicePixelRatio(),p=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Zg(this,c,true)&&(this.notifyPlugins("resize",{size:s}),Qe(r.onResize,[this,s],this),this.attached&&this._doResize(p)&&this.render());}ensureScalesHaveIDs(){let n=this.options.scales||{};tn(n,(r,i)=>{r.id=i;});}buildOrUpdateScales(){let e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((s,c)=>(s[c]=false,s),{}),o=[];n&&(o=o.concat(Object.keys(n).map(s=>{let c=n[s],p=t1(s,c),h=p==="r",v=p==="x";return {options:c,dposition:h?"chartArea":v?"bottom":"left",dtype:h?"radialLinear":v?"category":"linear"}}))),tn(o,s=>{let c=s.options,p=c.id,h=t1(p,c),v=me(c.type,s.dtype);(c.position===void 0||mw(c.position,h)!==mw(s.dposition))&&(c.position=s.dposition),i[p]=true;let P=null;if(p in r&&r[p].type===v)P=r[p];else {let x=Ca.getScale(v);P=new x({id:p,type:v,ctx:this.ctx,chart:this}),r[P.id]=P;}P.init(c,e);}),tn(i,(s,c)=>{s||delete r[c];}),tn(r,s=>{yo.configure(this,s,s.options),yo.addBox(this,s);});}_updateMetasets(){let e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);e.splice(n,r-n);}this._sortedMetasets=e.slice(0).sort(gw("order","index"));}_removeUnreferencedMetasets(){let{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i);});}buildOrUpdateControllers(){let e=[],n=this.data.datasets,r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){let o=n[r],s=this.getDatasetMeta(r),c=o.type||this.config.type;if(s.type&&s.type!==c&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=c,s.indexAxis=o.indexAxis||J0(c,this.options),s.order=o.order||0,s.index=r,s.label=""+o.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else {let p=Ca.getController(c),{datasetElementType:h,dataElementType:v}=ke.datasets[c];Object.assign(p.prototype,{dataElementType:Ca.getElement(v),datasetElementType:h&&Ca.getElement(h)}),s.controller=new p(this,r),e.push(s.controller);}}return this._updateMetasets(),e}_resetElements(){tn(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset();},this);}reset(){this._resetElements(),this.notifyPlugins("reset");}update(e){let n=this.config;n.update();let r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:true})===false)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let h=0,v=this.data.datasets.length;h<v;h++){let{controller:P}=this.getDatasetMeta(h),x=!i&&o.indexOf(P)===-1;P.buildOrUpdateElements(x),s=Math.max(+P.getMaxOverflow(),s);}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||tn(o,h=>{h.reset();}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(gw("z","_idx"));let{_active:c,_lastEvent:p}=this;p?this._eventHandler(p,true):c.length&&this._updateHoverStyles(c,c,true),this.render();}_updateScales(){tn(this.scales,e=>{yo.removeBox(this,e);}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales();}_checkEventBindings(){let e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!Rg(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents());}_updateHiddenIndices(){let{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(let{method:r,start:i,count:o}of n){let s=r==="_removeElements"?-o:o;k4(e,i,s);}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let n=this.data.datasets.length,r=o=>new Set(e.filter(s=>s[0]===o).map((s,c)=>c+","+s.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!Rg(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:true})===false)return;yo.update(this,this.width,this.height,e);let n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],tn(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()));},this),this._layers.forEach((i,o)=>{i._idx=o;}),this.notifyPlugins("afterLayout");}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:true})!==false){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Gr(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e});}}_updateDataset(e,n){let r=this.getDatasetMeta(e),i={meta:r,index:e,mode:n,cancelable:true};this.notifyPlugins("beforeDatasetUpdate",i)!==false&&(r.controller._update(n),i.cancelable=false,this.notifyPlugins("afterDatasetUpdate",i));}render(){this.notifyPlugins("beforeRender",{cancelable:true})!==false&&(ss.has(this)?this.attached&&!ss.running(this)&&ss.start(this):(this.draw(),yw({chart:this})));}draw(){let e;if(this._resizeBeforeDraw){let{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null;}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:true})===false)return;let n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw");}_getSortedDatasetMetas(e){let n=this._sortedMetasets,r=[],i,o;for(i=0,o=n.length;i<o;++i){let s=n[i];(!e||s.visible)&&r.push(s);}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(true)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:true})===false)return;let e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw");}_drawDataset(e){let n=this.ctx,r=e._clip,i=!r.disabled,o=this.chartArea,s={meta:e,index:e.index,cancelable:true};this.notifyPlugins("beforeDatasetDraw",s)!==false&&(i&&fl(n,{left:r.left===false?0:o.left-r.left,right:r.right===false?this.width:o.right+r.right,top:r.top===false?0:o.top-r.top,bottom:r.bottom===false?this.height:o.bottom+r.bottom}),e.controller.draw(),i&&hl(n),s.cancelable=false,this.notifyPlugins("afterDatasetDraw",s));}isPointInArea(e){return Pc(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,i){let o=Q6.modes[n];return typeof o=="function"?o(this,e,r,i):[]}getDatasetMeta(e){let n=this.data.datasets[e],r=this._metasets,i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:false},r.push(i)),i}getContext(){return this.$context||(this.$context=ba(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let n=this.data.datasets[e];if(!n)return false;let r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){let r=this.getDatasetMeta(e);r.hidden=!n;}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e];}getDataVisibility(e){return !this._hiddenIndices[e]}_updateVisibility(e,n,r){let i=r?"show":"hide",o=this.getDatasetMeta(e),s=o.controller._resolveAnimations(void 0,i);Fn(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),s.update(o,{visible:r}),this.update(c=>c.datasetIndex===e?i:void 0));}hide(e,n){this._updateVisibility(e,n,false);}show(e,n){this._updateVisibility(e,n,true);}_destroyDatasetMeta(e){let n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e];}_stop(){let e,n;for(this.stop(),ss.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e);}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Hg(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete fy[this.id],this.notifyPlugins("afterDestroy");}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=true;}bindUserEvents(){let e=this._listeners,n=this.platform,r=(o,s)=>{n.addEventListener(this,o,s),e[o]=s;},i=(o,s,c)=>{o.offsetX=s,o.offsetY=c,this._eventHandler(o);};tn(this.options.events,o=>r(o,i));}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,n=this.platform,r=(p,h)=>{n.addEventListener(this,p,h),e[p]=h;},i=(p,h)=>{e[p]&&(n.removeEventListener(this,p,h),delete e[p]);},o=(p,h)=>{this.canvas&&this.resize(p,h);},s,c=()=>{i("attach",c),this.attached=true,this.resize(),r("resize",o),r("detach",s);};s=()=>{this.attached=false,i("resize",o),this._stop(),this._resize(0,0),r("attach",c);},n.isAttached(this.canvas)?c():s();}unbindEvents(){tn(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e);}),this._listeners={},tn(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e);}),this._responsiveListeners=void 0;}updateHoverStyle(e,n,r){let i=r?"set":"remove",o,s,c,p;for(n==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),c=0,p=e.length;c<p;++c){s=e[c];let h=s&&this.getDatasetMeta(s.datasetIndex).controller;h&&h[i+"HoverStyle"](s.element,s.datasetIndex,s.index);}}getActiveElements(){return this._active||[]}setActiveElements(e){let n=this._active||[],r=e.map(({datasetIndex:o,index:s})=>{let c=this.getDatasetMeta(o);if(!c)throw new Error("No dataset found at index "+o);return {datasetIndex:o,element:c.data[s],index:s}});!rd(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n));}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}_updateHoverStyles(e,n,r){let i=this.options.hover,o=(p,h)=>p.filter(v=>!h.some(P=>v.datasetIndex===P.datasetIndex&&v.index===P.index)),s=o(n,e),c=r?e:o(e,n);s.length&&this.updateHoverStyle(s,i.mode,false),c.length&&i.mode&&this.updateHoverStyle(c,i.mode,true);}_eventHandler(e,n){let r={event:e,replay:n,cancelable:true,inChartArea:this.isPointInArea(e)},i=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,i)===false)return;let o=this._handleEvent(e,n,r.inChartArea);return r.cancelable=false,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(e,n,r){let{_active:i=[],options:o}=this,s=n,c=this._getActiveElements(e,i,r,s),p=f0(e),h=D4(e,this._lastEvent,r,p);r&&(this._lastEvent=null,Qe(o.onHover,[e,c,this],this),p&&Qe(o.onClick,[e,c,this],this));let v=!rd(c,i);return (v||n)&&(this._active=c,this._updateHoverStyles(c,i,n)),this._lastEvent=h,v}_getActiveElements(e,n,r,i){if(e.type==="mouseout")return [];if(!r)return n;let o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,i)}},bw=()=>tn(bo.instances,t=>t._plugins.invalidate()),gl=true;Object.defineProperties(bo,{defaults:{enumerable:gl,value:ke},instances:{enumerable:gl,value:fy},overrides:{enumerable:gl,value:pl},registry:{enumerable:gl,value:Ca},version:{enumerable:gl,value:T4},getChart:{enumerable:gl,value:Qw},register:{enumerable:gl,value:(...t)=>{Ca.add(...t),bw();}},unregister:{enumerable:gl,value:(...t)=>{Ca.remove(...t),bw();}}});function Kw(t,e,n){let{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:c,innerRadius:p}=e,h=i/c;t.beginPath(),t.arc(o,s,c,r-h,n+h),p>i?(h=i/p,t.arc(o,s,p,n+h,r-h,true)):t.arc(o,s,i,n+bn,r-bn),t.closePath(),t.clip();}function A4(t){return ff(t,["outerStart","outerEnd","innerStart","innerEnd"])}function O4(t,e,n,r){let i=A4(t.options.borderRadius),o=(n-e)/2,s=Math.min(o,r*e/2),c=p=>{let h=(n-Math.min(o,p))*r/2;return Nr(p,0,Math.min(o,h))};return {outerStart:c(i.outerStart),outerEnd:c(i.outerEnd),innerStart:Nr(i.innerStart,0,s),innerEnd:Nr(i.innerEnd,0,s)}}function id(t,e,n,r){return {x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function n1(t,e,n,r,i,o){let{x:s,y:c,startAngle:p,pixelMargin:h,innerRadius:v}=e,P=Math.max(e.outerRadius+r+n-h,0),x=v>0?v+r+n+h:0,T=0,I=i-p;if(r){let mt=v>0?v-r:0,Ct=P>0?P-r:0,jt=(mt+Ct)/2,Gt=jt!==0?I*jt/(jt+r):I;T=(I-Gt)/2;}let R=Math.max(.001,I*P-n/Be)/P,A=(I-R)/2,O=p+A+T,N=i-A-T,{outerStart:V,outerEnd:G,innerStart:X,innerEnd:nt}=O4(e,x,P,N-O),st=P-V,U=P-G,j=O+V/st,ut=N-G/U,Y=x+X,at=x+nt,pt=O+X/Y,dt=N-nt/at;if(t.beginPath(),o){if(t.arc(s,c,P,j,ut),G>0){let jt=id(U,ut,s,c);t.arc(jt.x,jt.y,G,ut,N+bn);}let mt=id(at,N,s,c);if(t.lineTo(mt.x,mt.y),nt>0){let jt=id(at,dt,s,c);t.arc(jt.x,jt.y,nt,N+bn,dt+Math.PI);}if(t.arc(s,c,x,N-nt/x,O+X/x,true),X>0){let jt=id(Y,pt,s,c);t.arc(jt.x,jt.y,X,pt+Math.PI,O-bn);}let Ct=id(st,O,s,c);if(t.lineTo(Ct.x,Ct.y),V>0){let jt=id(st,j,s,c);t.arc(jt.x,jt.y,V,O-bn,j);}}else {t.moveTo(s,c);let mt=Math.cos(j)*P+s,Ct=Math.sin(j)*P+c;t.lineTo(mt,Ct);let jt=Math.cos(ut)*P+s,Gt=Math.sin(ut)*P+c;t.lineTo(jt,Gt);}t.closePath();}function R4(t,e,n,r,i){let{fullCircles:o,startAngle:s,circumference:c}=e,p=e.endAngle;if(o){n1(t,e,n,r,s+rn,i);for(let h=0;h<o;++h)t.fill();isNaN(c)||(p=s+c%rn,c%rn===0&&(p+=rn));}return n1(t,e,n,r,p,i),t.fill(),p}function F4(t,e,n){let{x:r,y:i,startAngle:o,pixelMargin:s,fullCircles:c}=e,p=Math.max(e.outerRadius-s,0),h=e.innerRadius+s,v;for(n&&Kw(t,e,o+rn),t.beginPath(),t.arc(r,i,h,o+rn,o,true),v=0;v<c;++v)t.stroke();for(t.beginPath(),t.arc(r,i,p,o,o+rn),v=0;v<c;++v)t.stroke();}function M4(t,e,n,r,i,o){let{options:s}=e,{borderWidth:c,borderJoinStyle:p}=s,h=s.borderAlign==="inner";c&&(h?(t.lineWidth=c*2,t.lineJoin=p||"round"):(t.lineWidth=c,t.lineJoin=p||"bevel"),e.fullCircles&&F4(t,e,h),h&&Kw(t,e,i),n1(t,e,n,r,i,o),t.stroke());}var cs=class extends br{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e);}inRange(e,n,r){let i=this.getProps(["x","y"],r),{angle:o,distance:s}=Lg(i,{x:e,y:n}),{startAngle:c,endAngle:p,innerRadius:h,outerRadius:v,circumference:P}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),x=this.options.spacing/2,I=me(P,p-c)>=rn||Tc(o,c,p),R=Uo(s,h+x,v+x);return I&&R}getCenterPoint(e){let{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:p,spacing:h}=this.options,v=(i+o)/2,P=(s+c+h+p)/2;return {x:n+Math.cos(v)*P,y:r+Math.sin(v)*P}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:n,circumference:r}=this,i=(n.offset||0)/2,o=(n.spacing||0)/2,s=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>rn?Math.floor(r/rn):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let c=0;if(i){c=i/2;let h=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(h)*c,Math.sin(h)*c),this.circumference>=Be&&(c=i);}e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor;let p=R4(e,this,c,o,s);M4(e,this,c,o,p,s),e.restore();}};cs.id="arc";cs.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:true};cs.defaultRoutes={backgroundColor:"backgroundColor"};function Xw(t,e,n=e){t.lineCap=me(n.borderCapStyle,e.borderCapStyle),t.setLineDash(me(n.borderDash,e.borderDash)),t.lineDashOffset=me(n.borderDashOffset,e.borderDashOffset),t.lineJoin=me(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=me(n.borderWidth,e.borderWidth),t.strokeStyle=me(n.borderColor,e.borderColor);}function N4(t,e,n){t.lineTo(n.x,n.y);}function L4(t){return t.stepped?w0:t.tension||t.cubicInterpolationMode==="monotone"?I0:N4}function Zw(t,e,n={}){let r=t.length,{start:i=0,end:o=r-1}=n,{start:s,end:c}=e,p=Math.max(i,s),h=Math.min(o,c),v=i<s&&o<s||i>c&&o>c;return {count:r,start:p,loop:e.loop,ilen:h<p&&!v?r+h-p:h-p}}function B4(t,e,n,r){let{points:i,options:o}=e,{count:s,start:c,loop:p,ilen:h}=Zw(i,n,r),v=L4(o),{move:P=true,reverse:x}=r||{},T,I,R;for(T=0;T<=h;++T)I=i[(c+(x?h-T:T))%s],!I.skip&&(P?(t.moveTo(I.x,I.y),P=false):v(t,R,I,x,o.stepped),R=I);return p&&(I=i[(c+(x?h:0))%s],v(t,R,I,x,o.stepped)),!!p}function U4(t,e,n,r){let i=e.points,{count:o,start:s,ilen:c}=Zw(i,n,r),{move:p=true,reverse:h}=r||{},v=0,P=0,x,T,I,R,A,O,N=G=>(s+(h?c-G:G))%o,V=()=>{R!==A&&(t.lineTo(v,A),t.lineTo(v,R),t.lineTo(v,O));};for(p&&(T=i[N(0)],t.moveTo(T.x,T.y)),x=0;x<=c;++x){if(T=i[N(x)],T.skip)continue;let G=T.x,X=T.y,nt=G|0;nt===I?(X<R?R=X:X>A&&(A=X),v=(P*v+G)/++P):(V(),t.lineTo(G,X),I=nt,P=0,R=A=X),O=X;}V();}function r1(t){let e=t.options,n=e.borderDash&&e.borderDash.length;return !t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?U4:B4}function $4(t){return t.stepped?M0:t.tension||t.cubicInterpolationMode==="monotone"?N0:ts}function G4(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),Xw(t,e.options),t.stroke(i);}function j4(t,e,n,r){let{segments:i,options:o}=e,s=r1(e);for(let c of i)Xw(t,o,c.style),t.beginPath(),s(t,e,c,{start:n,end:n+r-1})&&t.closePath(),t.stroke();}var V4=typeof Path2D=="function";function z4(t,e,n,r){V4&&!e.options.segment?G4(t,e,n,r):j4(t,e,n,r);}var Go=class extends br{constructor(e){super(),this.animated=true,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=false,this._pointsUpdated=false,this._datasetIndex=void 0,e&&Object.assign(this,e);}updateControlPoints(e,n){let r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){let i=r.spanGaps?this._loop:this._fullLoop;O0(this._points,r,e,i,n),this._pointsUpdated=true;}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=false;}get points(){return this._points}get segments(){return this._segments||(this._segments=L0(this,this.options.segment))}first(){let e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){let e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){let r=this.options,i=e[n],o=this.points,s=ry(this,{property:n,start:i,end:i});if(!s.length)return;let c=[],p=$4(r),h,v;for(h=0,v=s.length;h<v;++h){let{start:P,end:x}=s[h],T=o[P],I=o[x];if(T===I){c.push(T);continue}let R=Math.abs((i-T[n])/(I[n]-T[n])),A=p(T,I,R,r.stepped);A[n]=e[n],c.push(A);}return c.length===1?c[0]:c}pathSegment(e,n,r){return r1(this)(e,this,n,r)}path(e,n,r){let i=this.segments,o=r1(this),s=this._loop;n=n||0,r=r||this.points.length-n;for(let c of i)s&=o(e,this,c,{start:n,end:n+r-1});return !!s}draw(e,n,r,i){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),z4(e,this,r,i),e.restore()),this.animated&&(this._pointsUpdated=false,this._path=void 0);}};Go.id="line";Go.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:true,cubicInterpolationMode:"default",fill:false,spanGaps:false,stepped:false,tension:0};Go.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};Go.descriptors={_scriptable:true,_indexable:t=>t!=="borderDash"&&t!=="fill"};function vw(t,e,n,r){let i=t.options,{[n]:o}=t.getProps([n],r);return Math.abs(e-o)<i.radius+i.hitRadius}var us=class extends br{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e);}inRange(e,n,r){let i=this.options,{x:o,y:s}=this.getProps(["x","y"],r);return Math.pow(e-o,2)+Math.pow(n-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(e,n){return vw(this,e,"x",n)}inYRange(e,n){return vw(this,e,"y",n)}getCenterPoint(e){let{x:n,y:r}=this.getProps(["x","y"],e);return {x:n,y:r}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);let r=n&&e.borderWidth||0;return (n+r)*2}draw(e,n){let r=this.options;this.skip||r.radius<.1||!Pc(this,n,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,pf(e,r,this.x,this.y));}getRange(){let e=this.options||{};return e.radius+e.hitRadius}};us.id="point";us.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};us.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Jw(t,e){let{x:n,y:r,base:i,width:o,height:s}=t.getProps(["x","y","base","width","height"],e),c,p,h,v,P;return t.horizontal?(P=s/2,c=Math.min(n,i),p=Math.max(n,i),h=r-P,v=r+P):(P=o/2,c=n-P,p=n+P,h=Math.min(r,i),v=Math.max(r,i)),{left:c,top:h,right:p,bottom:v}}function yl(t,e,n,r){return t?0:Nr(e,n,r)}function H4(t,e,n){let r=t.options.borderWidth,i=t.borderSkipped,o=qg(r);return {t:yl(i.top,o.top,0,n),r:yl(i.right,o.right,0,e),b:yl(i.bottom,o.bottom,0,n),l:yl(i.left,o.left,0,e)}}function W4(t,e,n){let{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,o=$o(i),s=Math.min(e,n),c=t.borderSkipped,p=r||Te(i);return {topLeft:yl(!p||c.top||c.left,o.topLeft,0,s),topRight:yl(!p||c.top||c.right,o.topRight,0,s),bottomLeft:yl(!p||c.bottom||c.left,o.bottomLeft,0,s),bottomRight:yl(!p||c.bottom||c.right,o.bottomRight,0,s)}}function q4(t){let e=Jw(t),n=e.right-e.left,r=e.bottom-e.top,i=H4(t,n/2,r/2),o=W4(t,n/2,r/2);return {outer:{x:e.left,y:e.top,w:n,h:r,radius:o},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function z0(t,e,n,r){let i=e===null,o=n===null,c=t&&!(i&&o)&&Jw(t,r);return c&&(i||Uo(e,c.left,c.right))&&(o||Uo(n,c.top,c.bottom))}function Y4(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Q4(t,e){t.rect(e.x,e.y,e.w,e.h);}function H0(t,e,n={}){let r=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-r,s=(t.y+t.h!==n.y+n.h?e:0)-i;return {x:t.x+r,y:t.y+i,w:t.w+o,h:t.h+s,radius:t.radius}}var ds=class extends br{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e);}draw(e){let{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:s}=q4(this),c=Y4(s.radius)?os:Q4;e.save(),(s.w!==o.w||s.h!==o.h)&&(e.beginPath(),c(e,H0(s,n,o)),e.clip(),c(e,H0(o,-n,s)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),c(e,H0(o,n)),e.fillStyle=i,e.fill(),e.restore();}inRange(e,n,r){return z0(this,e,n,r)}inXRange(e,n){return z0(this,e,null,n)}inYRange(e,n){return z0(this,null,e,n)}getCenterPoint(e){let{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return {x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}};ds.id="bar";ds.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};ds.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function K4(t,e,n){let r=t.segments,i=t.points,o=e.points,s=[];for(let c of r){let{start:p,end:h}=c;h=a1(p,h,i);let v=i1(n,i[p],i[h],c.loop);if(!e.segments){s.push({source:c,target:v,start:i[p],end:i[h]});continue}let P=ry(e,v);for(let x of P){let T=i1(n,o[x.start],o[x.end],x.loop),I=ny(c,i,T);for(let R of I)s.push({source:R,target:x,start:{[n]:Cw(v,T,"start",Math.max)},end:{[n]:Cw(v,T,"end",Math.min)}});}}return s}function i1(t,e,n,r){if(r)return;let i=e[t],o=n[t];return t==="angle"&&(i=ai(i),o=ai(o)),{property:t,start:i,end:o}}function X4(t,e){let{x:n=null,y:r=null}=t||{},i=e.points,o=[];return e.segments.forEach(({start:s,end:c})=>{c=a1(s,c,i);let p=i[s],h=i[c];r!==null?(o.push({x:p.x,y:r}),o.push({x:h.x,y:r})):n!==null&&(o.push({x:n,y:p.y}),o.push({x:n,y:h.y}));}),o}function a1(t,e,n){for(;e>t;e--){let r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function Cw(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function tI(t,e){let n=[],r=false;return He(t)?(r=true,n=t):n=X4(t,e),n.length?new Go({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Sw(t){return t&&t.fill!==false}function Z4(t,e,n){let i=t[e].fill,o=[e],s;if(!n)return i;for(;i!==false&&o.indexOf(i)===-1;){if(!Mn(i))return i;if(s=t[i],!s)return false;if(s.visible)return i;o.push(i),i=s.fill;}return false}function J4(t,e,n){let r=rU(t);if(Te(r))return isNaN(r.value)?false:r;let i=parseFloat(r);return Mn(i)&&Math.floor(i)===i?tU(r[0],e,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function tU(t,e,n,r){return (t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?false:n}function eU(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:Te(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function nU(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:Te(t)?r=t.value:r=e.getBaseValue(),r}function rU(t){let e=t.options,n=e.fill,r=me(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===false||r===null?false:r===true?"origin":r}function iU(t){let{scale:e,index:n,line:r}=t,i=[],o=r.segments,s=r.points,c=oU(e,n);c.push(tI({x:null,y:e.bottom},r));for(let p=0;p<o.length;p++){let h=o[p];for(let v=h.start;v<=h.end;v++)aU(i,s[v],c);}return new Go({points:i,options:{}})}function oU(t,e){let n=[],r=t.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){let o=r[i];if(o.index===e)break;o.hidden||n.unshift(o.dataset);}return n}function aU(t,e,n){let r=[];for(let i=0;i<n.length;i++){let o=n[i],{first:s,last:c,point:p}=sU(o,e,"x");if(!(!p||s&&c)){if(s)r.unshift(p);else if(t.push(p),!c)break}}t.push(...r);}function sU(t,e,n){let r=t.interpolate(e,n);if(!r)return {};let i=r[n],o=t.segments,s=t.points,c=false,p=false;for(let h=0;h<o.length;h++){let v=o[h],P=s[v.start][n],x=s[v.end][n];if(Uo(i,P,x)){c=i===P,p=i===x;break}}return {first:c,last:p,point:r}}var hy=class{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius;}pathSegment(e,n,r){let{x:i,y:o,radius:s}=this;return n=n||{start:0,end:rn},e.arc(i,o,s,n.end,n.start,true),!r.bounds}interpolate(e){let{x:n,y:r,radius:i}=this,o=e.angle;return {x:n+Math.cos(o)*i,y:r+Math.sin(o)*i,angle:o}}};function lU(t){let{chart:e,fill:n,line:r}=t;if(Mn(n))return cU(e,n);if(n==="stack")return iU(t);if(n==="shape")return true;let i=uU(t);return i instanceof hy?i:tI(i,r)}function cU(t,e){let n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function uU(t){return (t.scale||{}).getPointPositionForValue?pU(t):dU(t)}function dU(t){let{scale:e={},fill:n}=t,r=eU(n,e);if(Mn(r)){let i=e.isHorizontal();return {x:i?r:null,y:i?null:r}}return null}function pU(t){let{scale:e,fill:n}=t,r=e.options,i=e.getLabels().length,o=r.reverse?e.max:e.min,s=nU(n,e,o),c=[];if(r.grid.circular){let p=e.getPointPositionForValue(0,o);return new hy({x:p.x,y:p.y,radius:e.getDistanceFromCenterForValue(s)})}for(let p=0;p<i;++p)c.push(e.getPointPositionForValue(p,s));return c}function W0(t,e,n){let r=lU(e),{line:i,scale:o,axis:s}=e,c=i.options,p=c.fill,h=c.backgroundColor,{above:v=h,below:P=h}=p||{};r&&i.points.length&&(fl(t,n),fU(t,{line:i,target:r,above:v,below:P,area:n,scale:o,axis:s}),hl(t));}function fU(t,e){let{line:n,target:r,above:i,below:o,area:s,scale:c}=e,p=n._loop?"angle":e.axis;t.save(),p==="x"&&o!==i&&(Pw(t,r,s.top),xw(t,{line:n,target:r,color:i,scale:c,property:p}),t.restore(),t.save(),Pw(t,r,s.bottom)),xw(t,{line:n,target:r,color:o,scale:c,property:p}),t.restore();}function Pw(t,e,n){let{segments:r,points:i}=e,o=true,s=false;t.beginPath();for(let c of r){let{start:p,end:h}=c,v=i[p],P=i[a1(p,h,i)];o?(t.moveTo(v.x,v.y),o=false):(t.lineTo(v.x,n),t.lineTo(v.x,v.y)),s=!!e.pathSegment(t,c,{move:s}),s?t.closePath():t.lineTo(P.x,n);}t.lineTo(e.first().x,n),t.closePath(),t.clip();}function xw(t,e){let{line:n,target:r,property:i,color:o,scale:s}=e,c=K4(n,r,i);for(let{source:p,target:h,start:v,end:P}of c){let{style:{backgroundColor:x=o}={}}=p,T=r!==true;t.save(),t.fillStyle=x,hU(t,s,T&&i1(i,v,P)),t.beginPath();let I=!!n.pathSegment(t,p),R;if(T){I?t.closePath():Ew(t,r,P,i);let A=!!r.pathSegment(t,h,{move:I,reverse:true});R=I&&A,R||Ew(t,r,v,i);}t.closePath(),t.fill(R?"evenodd":"nonzero"),t.restore();}}function hU(t,e,n){let{top:r,bottom:i}=e.chart.chartArea,{property:o,start:s,end:c}=n||{};o==="x"&&(t.beginPath(),t.rect(s,r,c-s,i-r),t.clip());}function Ew(t,e,n,r){let i=e.interpolate(n,r);i&&t.lineTo(i.x,i.y);}var eI={id:"filler",afterDatasetsUpdate(t,e,n){let r=(t.data.datasets||[]).length,i=[],o,s,c,p;for(s=0;s<r;++s)o=t.getDatasetMeta(s),c=o.dataset,p=null,c&&c.options&&c instanceof Go&&(p={visible:t.isDatasetVisible(s),index:s,fill:J4(c,s,r),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:c}),o.$filler=p,i.push(p);for(s=0;s<r;++s)p=i[s],!(!p||p.fill===false)&&(p.fill=Z4(i,s,n.propagate));},beforeDraw(t,e,n){let r=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let s=i.length-1;s>=0;--s){let c=i[s].$filler;c&&(c.line.updateControlPoints(o,c.axis),r&&c.fill&&W0(t.ctx,c,o));}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;let r=t.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){let o=r[i].$filler;Sw(o)&&W0(t.ctx,o,t.chartArea);}},beforeDatasetDraw(t,e,n){let r=e.meta.$filler;!Sw(r)||n.drawTime!=="beforeDatasetDraw"||W0(t.ctx,r,t.chartArea);},defaults:{propagate:true,drawTime:"beforeDatasetDraw"}},_w=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},mU=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index,my=class extends br{constructor(e){super(),this._added=false,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=false,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0;}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit();}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height);}buildLabels(){let e=this.options.labels||{},n=Qe(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,i)=>e.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n;}fit(){let{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}let r=e.labels,i=Sn(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:c,itemHeight:p}=_w(r,o),h,v;n.font=i.string,this.isHorizontal()?(h=this.maxWidth,v=this._fitRows(s,o,c,p)+10):(v=this.maxHeight,h=this._fitCols(s,o,c,p)+10),this.width=Math.min(h,e.maxWidth||this.maxWidth),this.height=Math.min(v,e.maxHeight||this.maxHeight);}_fitRows(e,n,r,i){let{ctx:o,maxWidth:s,options:{labels:{padding:c}}}=this,p=this.legendHitBoxes=[],h=this.lineWidths=[0],v=i+c,P=e;o.textAlign="left",o.textBaseline="middle";let x=-1,T=-v;return this.legendItems.forEach((I,R)=>{let A=r+n/2+o.measureText(I.text).width;(R===0||h[h.length-1]+A+2*c>s)&&(P+=v,h[h.length-(R>0?0:1)]=0,T+=v,x++),p[R]={left:0,top:T,row:x,width:A,height:i},h[h.length-1]+=A+c;}),P}_fitCols(e,n,r,i){let{ctx:o,maxHeight:s,options:{labels:{padding:c}}}=this,p=this.legendHitBoxes=[],h=this.columnSizes=[],v=s-e,P=c,x=0,T=0,I=0,R=0;return this.legendItems.forEach((A,O)=>{let N=r+n/2+o.measureText(A.text).width;O>0&&T+i+2*c>v&&(P+=x+c,h.push({width:x,height:T}),I+=x+c,R++,x=T=0),p[O]={left:I,top:T,col:R,width:N,height:i},x=Math.max(x,N),T+=i+c;}),P+=x,h.push({width:x,height:T}),P}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=ml(o,this.left,this.width);if(this.isHorizontal()){let c=0,p=Lr(r,this.left+i,this.right-this.lineWidths[c]);for(let h of n)c!==h.row&&(c=h.row,p=Lr(r,this.left+i,this.right-this.lineWidths[c])),h.top+=this.top+e+i,h.left=s.leftForLtr(s.x(p),h.width),p+=h.width+i;}else {let c=0,p=Lr(r,this.top+e+i,this.bottom-this.columnSizes[c].height);for(let h of n)h.col!==c&&(c=h.col,p=Lr(r,this.top+e+i,this.bottom-this.columnSizes[c].height)),h.top=p,h.left+=this.left+i,h.left=s.leftForLtr(s.x(h.left),h.width),p+=h.height+i;}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let e=this.ctx;fl(e,this),this._draw(),hl(e);}}_draw(){let{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=e,c=ke.color,p=ml(e.rtl,this.left,this.width),h=Sn(s.font),{color:v,padding:P}=s,x=h.size,T=x/2,I;this.drawTitle(),i.textAlign=p.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=h.string;let{boxWidth:R,boxHeight:A,itemHeight:O}=_w(s,x),N=function(st,U,j){if(isNaN(R)||R<=0||isNaN(A)||A<0)return;i.save();let ut=me(j.lineWidth,1);if(i.fillStyle=me(j.fillStyle,c),i.lineCap=me(j.lineCap,"butt"),i.lineDashOffset=me(j.lineDashOffset,0),i.lineJoin=me(j.lineJoin,"miter"),i.lineWidth=ut,i.strokeStyle=me(j.strokeStyle,c),i.setLineDash(me(j.lineDash,[])),s.usePointStyle){let Y={radius:A*Math.SQRT2/2,pointStyle:j.pointStyle,rotation:j.rotation,borderWidth:ut},at=p.xPlus(st,R/2),pt=U+T;Wg(i,Y,at,pt,s.pointStyleWidth&&R);}else {let Y=U+Math.max((x-A)/2,0),at=p.leftForLtr(st,R),pt=$o(j.borderRadius);i.beginPath(),Object.values(pt).some(dt=>dt!==0)?os(i,{x:at,y:Y,w:R,h:A,radius:pt}):i.rect(at,Y,R,A),i.fill(),ut!==0&&i.stroke();}i.restore();},V=function(st,U,j){is(i,j.text,st,U+O/2,h,{strikethrough:j.hidden,textAlign:p.textAlign(j.textAlign)});},G=this.isHorizontal(),X=this._computeTitleHeight();G?I={x:Lr(o,this.left+P,this.right-r[0]),y:this.top+P+X,line:0}:I={x:this.left+P,y:Lr(o,this.top+X+P,this.bottom-n[0].height),line:0},ty(this.ctx,e.textDirection);let nt=O+P;this.legendItems.forEach((st,U)=>{i.strokeStyle=st.fontColor||v,i.fillStyle=st.fontColor||v;let j=i.measureText(st.text).width,ut=p.textAlign(st.textAlign||(st.textAlign=s.textAlign)),Y=R+T+j,at=I.x,pt=I.y;p.setWidth(this.width),G?U>0&&at+Y+P>this.right&&(pt=I.y+=nt,I.line++,at=I.x=Lr(o,this.left+P,this.right-r[I.line])):U>0&&pt+nt>this.bottom&&(at=I.x=at+n[I.line].width+P,I.line++,pt=I.y=Lr(o,this.top+X+P,this.bottom-n[I.line].height));let dt=p.x(at);N(dt,pt,st),at=S0(ut,at+R+T,G?at+Y:this.right,e.rtl),V(p.x(at),pt,st),G?I.x+=Y+P:I.y+=nt;}),ey(this.ctx,e.textDirection);}drawTitle(){let e=this.options,n=e.title,r=Sn(n.font),i=$n(n.padding);if(!n.display)return;let o=ml(e.rtl,this.left,this.width),s=this.ctx,c=n.position,p=r.size/2,h=i.top+p,v,P=this.left,x=this.width;if(this.isHorizontal())x=Math.max(...this.lineWidths),v=this.top+h,P=Lr(e.align,P,this.right-x);else {let I=this.columnSizes.reduce((R,A)=>Math.max(R,A.height),0);v=h+Lr(e.align,this.top,this.bottom-I-e.labels.padding-this._computeTitleHeight());}let T=Lr(c,P,P+x);s.textAlign=o.textAlign(uf(c)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,is(s,n.text,T,v,r);}_computeTitleHeight(){let e=this.options.title,n=Sn(e.font),r=$n(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,o;if(Uo(e,this.left,this.right)&&Uo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Uo(e,i.left,i.left+i.width)&&Uo(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(e){let n=this.options;if(!gU(e.type,n))return;let r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){let i=this._hoveredItem,o=mU(i,r);i&&!o&&Qe(n.onLeave,[e,i,this],this),this._hoveredItem=r,r&&!o&&Qe(n.onHover,[e,r,this],this);}else r&&Qe(n.onClick,[e,r,this],this);}};function gU(t,e){return !!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var nI={id:"legend",_element:my,start(t,e,n){let r=t.legend=new my({ctx:t.ctx,options:n,chart:t});yo.configure(t,r,n),yo.addBox(t,r);},stop(t){yo.removeBox(t,t.legend),delete t.legend;},beforeUpdate(t,e,n){let r=t.legend;yo.configure(t,r,n),r.options=n;},afterUpdate(t){let e=t.legend;e.buildLabels(),e.adjustHitBoxes();},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event);},defaults:{display:true,position:"top",align:"center",fullSize:true,reverse:false,weight:1e3,onClick(t,e,n){let r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=true):(i.show(r),e.hidden=false);},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map(s=>{let c=s.controller.getStyle(n?0:void 0),p=$n(c.borderWidth);return {text:e[s.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!s.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:0,datasetIndex:s.index}},this)}},title:{color:t=>t.chart.options.color,display:false,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},gy=class extends br{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0;}update(e,n){let r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;let i=He(r.text)?r.text.length:1;this._padding=$n(r.padding);let o=i*Sn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o;}isHorizontal(){let e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){let{top:n,left:r,bottom:i,right:o,options:s}=this,c=s.align,p=0,h,v,P;return this.isHorizontal()?(v=Lr(c,r,o),P=n+e,h=o-r):(s.position==="left"?(v=r+e,P=Lr(c,i,n),p=Be*-0.5):(v=o-e,P=Lr(c,n,i),p=Be*.5),h=i-n),{titleX:v,titleY:P,maxWidth:h,rotation:p}}draw(){let e=this.ctx,n=this.options;if(!n.display)return;let r=Sn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:c,maxWidth:p,rotation:h}=this._drawArgs(o);is(e,n.text,0,0,r,{color:n.color,maxWidth:p,rotation:h,textAlign:uf(n.align),textBaseline:"middle",translation:[s,c]});}};function yU(t,e){let n=new gy({ctx:t.ctx,options:e,chart:t});yo.configure(t,n,e),yo.addBox(t,n),t.titleBlock=n;}var rI={id:"title",_element:gy,start(t,e,n){yU(t,n);},stop(t){let e=t.titleBlock;yo.removeBox(t,e),delete t.titleBlock;},beforeUpdate(t,e,n){let r=t.titleBlock;yo.configure(t,r,n),r.options=n;},defaults:{align:"center",display:false,font:{weight:"bold"},fullSize:true,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:true,_indexable:false}};var Pf={average(t){if(!t.length)return false;let e,n,r=0,i=0,o=0;for(e=0,n=t.length;e<n;++e){let s=t[e].element;if(s&&s.hasValue()){let c=s.tooltipPosition();r+=c.x,i+=c.y,++o;}}return {x:r/o,y:i/o}},nearest(t,e){if(!t.length)return false;let n=e.x,r=e.y,i=Number.POSITIVE_INFINITY,o,s,c;for(o=0,s=t.length;o<s;++o){let p=t[o].element;if(p&&p.hasValue()){let h=p.getCenterPoint(),v=ns(e,h);v<i&&(i=v,c=p);}}if(c){let p=c.tooltipPosition();n=p.x,r=p.y;}return {x:n,y:r}}};function va(t,e){return e&&(He(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ls(t){return (typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
5647
5647
|
`)>-1?t.split(`
|
|
5648
|
-
`):t}function yU(t,e){let{element:n,datasetIndex:r,index:i}=e,o=t.getDatasetMeta(r).controller,{label:s,value:c}=o.getLabelAndValue(i);return {chart:t,label:s,parsed:o.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:c,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function _w(t,e){let n=t.chart.ctx,{body:r,footer:i,title:o}=t,{boxWidth:s,boxHeight:c}=e,p=Sn(e.bodyFont),h=Sn(e.titleFont),v=Sn(e.footerFont),P=o.length,x=i.length,T=r.length,I=$n(e.padding),R=I.height,A=0,O=r.reduce((G,X)=>G+X.before.length+X.lines.length+X.after.length,0);if(O+=t.beforeBody.length+t.afterBody.length,P&&(R+=P*h.lineHeight+(P-1)*e.titleSpacing+e.titleMarginBottom),O){let G=e.displayColors?Math.max(c,p.lineHeight):p.lineHeight;R+=T*G+(O-T)*p.lineHeight+(O-1)*e.bodySpacing;}x&&(R+=e.footerMarginTop+x*v.lineHeight+(x-1)*e.footerSpacing);let N=0,V=function(G){A=Math.max(A,n.measureText(G).width+N);};return n.save(),n.font=h.string,tn(t.title,V),n.font=p.string,tn(t.beforeBody.concat(t.afterBody),V),N=e.displayColors?s+2+e.boxPadding:0,tn(r,G=>{tn(G.before,V),tn(G.lines,V),tn(G.after,V);}),N=0,n.font=v.string,tn(t.footer,V),n.restore(),A+=I.width,{width:A,height:R}}function bU(t,e){let{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function vU(t,e,n,r){let{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(t==="left"&&i+o+s>e.width||t==="right"&&i-o-s<0)return true}function CU(t,e,n,r){let{x:i,width:o}=n,{width:s,chartArea:{left:c,right:p}}=t,h="center";return r==="center"?h=i<=(c+p)/2?"left":"right":i<=o/2?h="left":i>=s-o/2&&(h="right"),vU(h,t,e,n)&&(h="center"),h}function Tw(t,e,n){let r=n.yAlign||e.yAlign||bU(t,n);return {xAlign:n.xAlign||e.xAlign||CU(t,e,n,r),yAlign:r}}function SU(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function PU(t,e,n){let{y:r,height:i}=t;return e==="top"?r+=n:e==="bottom"?r-=i+n:r-=i/2,r}function ww(t,e,n,r){let{caretSize:i,caretPadding:o,cornerRadius:s}=t,{xAlign:c,yAlign:p}=n,h=i+o,{topLeft:v,topRight:P,bottomLeft:x,bottomRight:T}=$o(s),I=SU(e,c),R=PU(e,p,h);return p==="center"?c==="left"?I+=h:c==="right"&&(I-=h):c==="left"?I-=Math.max(v,x)+i:c==="right"&&(I+=Math.max(P,T)+i),{x:Nr(I,0,r.width-e.width),y:Nr(R,0,r.height-e.height)}}function sy(t,e,n){let r=$n(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function Iw(t){return va([],ls(t))}function xU(t,e,n){return ba(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function kw(t,e){let n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}var Af=class extends br{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0;}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0;}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new ad(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=xU(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){let{callbacks:r}=n,i=r.beforeTitle.apply(this,[e]),o=r.title.apply(this,[e]),s=r.afterTitle.apply(this,[e]),c=[];return c=va(c,ls(i)),c=va(c,ls(o)),c=va(c,ls(s)),c}getBeforeBody(e,n){return Iw(n.callbacks.beforeBody.apply(this,[e]))}getBody(e,n){let{callbacks:r}=n,i=[];return tn(e,o=>{let s={before:[],lines:[],after:[]},c=kw(r,o);va(s.before,ls(c.beforeLabel.call(this,o))),va(s.lines,c.label.call(this,o)),va(s.after,ls(c.afterLabel.call(this,o))),i.push(s);}),i}getAfterBody(e,n){return Iw(n.callbacks.afterBody.apply(this,[e]))}getFooter(e,n){let{callbacks:r}=n,i=r.beforeFooter.apply(this,[e]),o=r.footer.apply(this,[e]),s=r.afterFooter.apply(this,[e]),c=[];return c=va(c,ls(i)),c=va(c,ls(o)),c=va(c,ls(s)),c}_createItems(e){let n=this._active,r=this.chart.data,i=[],o=[],s=[],c=[],p,h;for(p=0,h=n.length;p<h;++p)c.push(yU(this.chart,n[p]));return e.filter&&(c=c.filter((v,P,x)=>e.filter(v,P,x,r))),e.itemSort&&(c=c.sort((v,P)=>e.itemSort(v,P,r))),tn(c,v=>{let P=kw(e.callbacks,v);i.push(P.labelColor.call(this,v)),o.push(P.labelPointStyle.call(this,v)),s.push(P.labelTextColor.call(this,v));}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=c,c}update(e,n){let r=this.options.setContext(this.getContext()),i=this._active,o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else {let c=Pf[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);let p=this._size=_w(this,r),h=Object.assign({},c,p),v=Tw(this.chart,r,h),P=ww(r,h,v,this.chart);this.xAlign=v.xAlign,this.yAlign=v.yAlign,o={opacity:1,x:P.x,y:P.y,width:p.width,height:p.height,caretX:c.x,caretY:c.y};}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n});}drawCaret(e,n,r,i){let o=this.getCaretPosition(e,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3);}getCaretPosition(e,n,r){let{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:c}=r,{topLeft:p,topRight:h,bottomLeft:v,bottomRight:P}=$o(c),{x,y:T}=e,{width:I,height:R}=n,A,O,N,V,G,X;return o==="center"?(G=T+R/2,i==="left"?(A=x,O=A-s,V=G+s,X=G-s):(A=x+I,O=A+s,V=G-s,X=G+s),N=A):(i==="left"?O=x+Math.max(p,v)+s:i==="right"?O=x+I-Math.max(h,P)-s:O=this.caretX,o==="top"?(V=T,G=V-s,A=O-s,N=O+s):(V=T+R,G=V+s,A=O+s,N=O-s),X=V),{x1:A,x2:O,x3:N,y1:V,y2:G,y3:X}}drawTitle(e,n,r){let i=this.title,o=i.length,s,c,p;if(o){let h=ml(r.rtl,this.x,this.width);for(e.x=sy(this,r.titleAlign,r),n.textAlign=h.textAlign(r.titleAlign),n.textBaseline="middle",s=Sn(r.titleFont),c=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,p=0;p<o;++p)n.fillText(i[p],h.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+c,p+1===o&&(e.y+=r.titleMarginBottom-c);}}_drawColorBox(e,n,r,i,o){let s=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:p,boxWidth:h,boxPadding:v}=o,P=Sn(o.bodyFont),x=sy(this,"left",o),T=i.x(x),I=p<P.lineHeight?(P.lineHeight-p)/2:0,R=n.y+I;if(o.usePointStyle){let A={radius:Math.min(h,p)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},O=i.leftForLtr(T,h)+h/2,N=R+p/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,pf(e,A,O,N),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,pf(e,A,O,N);}else {e.lineWidth=Te(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;let A=i.leftForLtr(T,h-v),O=i.leftForLtr(i.xPlus(T,1),h-v-2),N=$o(s.borderRadius);Object.values(N).some(V=>V!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,os(e,{x:A,y:R,w:h,h:p,radius:N}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),os(e,{x:O,y:R+1,w:h-2,h:p-2,radius:N}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(A,R,h,p),e.strokeRect(A,R,h,p),e.fillStyle=s.backgroundColor,e.fillRect(O,R+1,h-2,p-2));}e.fillStyle=this.labelTextColors[r];}drawBody(e,n,r){let{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:c,boxHeight:p,boxWidth:h,boxPadding:v}=r,P=Sn(r.bodyFont),x=P.lineHeight,T=0,I=ml(r.rtl,this.x,this.width),R=function(U){n.fillText(U,I.x(e.x+T),e.y+x/2),e.y+=x+o;},A=I.textAlign(s),O,N,V,G,X,nt,st;for(n.textAlign=s,n.textBaseline="middle",n.font=P.string,e.x=sy(this,A,r),n.fillStyle=r.bodyColor,tn(this.beforeBody,R),T=c&&A!=="right"?s==="center"?h/2+v:h+2+v:0,G=0,nt=i.length;G<nt;++G){for(O=i[G],N=this.labelTextColors[G],n.fillStyle=N,tn(O.before,R),V=O.lines,c&&V.length&&(this._drawColorBox(n,e,G,I,r),x=Math.max(P.lineHeight,p)),X=0,st=V.length;X<st;++X)R(V[X]),x=P.lineHeight;tn(O.after,R);}T=0,x=P.lineHeight,tn(this.afterBody,R),e.y-=o;}drawFooter(e,n,r){let i=this.footer,o=i.length,s,c;if(o){let p=ml(r.rtl,this.x,this.width);for(e.x=sy(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=p.textAlign(r.footerAlign),n.textBaseline="middle",s=Sn(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,c=0;c<o;++c)n.fillText(i[c],p.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+r.footerSpacing;}}drawBackground(e,n,r,i){let{xAlign:o,yAlign:s}=this,{x:c,y:p}=e,{width:h,height:v}=r,{topLeft:P,topRight:x,bottomLeft:T,bottomRight:I}=$o(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(c+P,p),s==="top"&&this.drawCaret(e,n,r,i),n.lineTo(c+h-x,p),n.quadraticCurveTo(c+h,p,c+h,p+x),s==="center"&&o==="right"&&this.drawCaret(e,n,r,i),n.lineTo(c+h,p+v-I),n.quadraticCurveTo(c+h,p+v,c+h-I,p+v),s==="bottom"&&this.drawCaret(e,n,r,i),n.lineTo(c+T,p+v),n.quadraticCurveTo(c,p+v,c,p+v-T),s==="center"&&o==="left"&&this.drawCaret(e,n,r,i),n.lineTo(c,p+P),n.quadraticCurveTo(c,p,c+P,p),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke();}_updateAnimationTarget(e){let n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){let s=Pf[e.position].call(this,this._active,this._eventPosition);if(!s)return;let c=this._size=_w(this,e),p=Object.assign({},s,this._size),h=Tw(n,e,p),v=ww(e,p,h,n);(i._to!==v.x||o._to!==v.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=c.width,this.height=c.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,v));}}_willRender(){return !!this.opacity}draw(e){let n=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(n);let i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let s=$n(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=r,this.drawBackground(o,e,i,n),ty(e,n.textDirection),o.y+=s.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),ey(e,n.textDirection),e.restore());}getActiveElements(){return this._active||[]}setActiveElements(e,n){let r=this._active,i=e.map(({datasetIndex:c,index:p})=>{let h=this.chart.getDatasetMeta(c);if(!h)throw new Error("Cannot find a dataset at index "+c);return {datasetIndex:c,element:h.data[p],index:p}}),o=!rd(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=true,this.update(true));}handleEvent(e,n,r=true){if(n&&this._ignoreReplayEvents)return false;this._ignoreReplayEvents=false;let i=this.options,o=this._active||[],s=this._getActiveElements(e,o,n,r),c=this._positionChanged(s,e),p=n||!rd(s,o)||c;return p&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(true,n))),p}_getActiveElements(e,n,r,i){let o=this.options;if(e.type==="mouseout")return [];if(!i)return n;let s=this.chart.getElementsAtEventForMode(e,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(e,n){let{caretX:r,caretY:i,options:o}=this,s=Pf[o.position].call(this,e,n);return s!==false&&(r!==s.x||i!==s.y)}};Af.positioners=Pf;var rI={id:"tooltip",_element:Af,positioners:Pf,afterInit(t,e,n){n&&(t.tooltip=new Af({chart:t,options:n}));},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n);},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n);},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",n)===false)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n);}},afterEvent(t,e){if(t.tooltip){let n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=true);}},defaults:{enabled:true,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:true,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Bo,title(t){if(t.length>0){let e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return ""},afterTitle:Bo,beforeBody:Bo,beforeLabel:Bo,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");let n=t.formattedValue;return Le(n)||(e+=n),e},labelColor(t){let n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return {borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){let n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return {pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Bo,afterBody:Bo,beforeFooter:Bo,footer:Bo,afterFooter:Bo}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:false,callbacks:{_scriptable:false,_indexable:false},animation:{_fallback:false},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};var EU=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function _U(t,e,n,r){let i=t.indexOf(e);if(i===-1)return EU(t,e,n,r);let o=t.lastIndexOf(e);return i!==o?n:i}var TU=(t,e)=>t===null?null:Nr(Math.round(t),0,e),Oc=class extends Ac{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[];}init(e){let n=this._addedLabels;if(n.length){let r=this.getLabels();for(let{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[];}super.init(e);}parse(e,n){if(Le(e))return null;let r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:_U(r,e,me(n,e),this._addedLabels),TU(n,r.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:r,max:i}=this.getMinMax(true);this.options.bounds==="ticks"&&(e||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i;}buildTicks(){let e=this.min,n=this.max,r=this.options.offset,i=[],o=this.getLabels();o=e===0&&n===o.length-1?o:o.slice(e,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=e;s<=n;s++)i.push({value:s});return i}getLabelForValue(e){let n=this.getLabels();return e>=0&&e<n.length?n[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels);}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};Oc.id="category";Oc.defaults={ticks:{callback:Oc.prototype.getLabelForValue}};function wU(t,e){let n=[],{bounds:i,step:o,min:s,max:c,precision:p,count:h,maxTicks:v,maxDigits:P,includeBounds:x}=t,T=o||1,I=v-1,{min:R,max:A}=e,O=!Le(s),N=!Le(c),V=!Le(h),G=(A-R)/(P+1),X=Fg((A-R)/I/T)*T,nt,st,U,j;if(X<1e-14&&!O&&!N)return [{value:R},{value:A}];j=Math.ceil(A/X)-Math.floor(R/X),j>I&&(X=Fg(j*X/I/T)*T),Le(p)||(nt=Math.pow(10,p),X=Math.ceil(X*nt)/nt),i==="ticks"?(st=Math.floor(R/X)*X,U=Math.ceil(A/X)*X):(st=R,U=A),O&&N&&o&&m0((c-s)/o,X/1e3)?(j=Math.round(Math.min((c-s)/X,v)),X=(c-s)/j,st=s,U=c):V?(st=O?s:st,U=N?c:U,j=h-1,X=(U-st)/j):(j=(U-st)/X,Ec(j,Math.round(j),X/1e3)?j=Math.round(j):j=Math.ceil(j));let ut=Math.max(Ng(X),Ng(st));nt=Math.pow(10,Le(p)?ut:p),st=Math.round(st*nt)/nt,U=Math.round(U*nt)/nt;let Y=0;for(O&&(x&&st!==s?(n.push({value:s}),st<s&&Y++,Ec(Math.round((st+Y*X)*nt)/nt,s,Dw(s,G,t))&&Y++):st<s&&Y++);Y<j;++Y)n.push({value:Math.round((st+Y*X)*nt)/nt});return N&&x&&U!==c?n.length&&Ec(n[n.length-1].value,c,Dw(c,G,t))?n[n.length-1].value=c:n.push({value:c}):(!N||U===c)&&n.push({value:U}),n}function Dw(t,e,{horizontal:n,minRotation:r}){let i=Qn(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/o,s)}var sd=class extends Ac{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0;}parse(e,n){return Le(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds(),{min:i,max:o}=this,s=p=>i=n?i:p,c=p=>o=r?o:p;if(e){let p=go(i),h=go(o);p<0&&h<0?c(0):p>0&&h>0&&s(0);}if(i===o){let p=1;(o>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(p=Math.abs(o*.05)),c(o+p),e||s(i-p);}this.min=i,this.max=o;}getTickLimit(){let e=this.options.ticks,{maxTicksLimit:n,stepSize:r}=e,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,n=e.ticks,r=this.getTickLimit();r=Math.max(2,r);let i={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==false},o=this._range||this,s=wU(i,o);return e.bounds==="ticks"&&Mg(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let e=this.ticks,n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){let i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i;}this._startValue=n,this._endValue=r,this._valueRange=r-n;}getLabelForValue(e){return Ic(e,this.chart.options.locale,this.options.ticks.format)}},ld=class extends sd{determineDataLimits(){let{min:e,max:n}=this.getMinMax(true);this.min=Mn(e)?e:0,this.max=Mn(n)?n:1,this.handleTickRangeOptions();}computeTickLimit(){let e=this.isHorizontal(),n=e?this.width:this.height,r=Qn(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}};ld.id="linear";ld.defaults={ticks:{callback:vy.formatters.numeric}};function Aw(t){return t/Math.pow(10,Math.floor(Ei(t)))===1}function IU(t,e){let n=Math.floor(Ei(e.max)),r=Math.ceil(e.max/Math.pow(10,n)),i=[],o=xi(t.min,Math.pow(10,Math.floor(Ei(e.min)))),s=Math.floor(Ei(o)),c=Math.floor(o/Math.pow(10,s)),p=s<0?Math.pow(10,Math.abs(s)):1;do i.push({value:o,major:Aw(o)}),++c,c===10&&(c=1,++s,p=s>=0?1:p),o=Math.round(c*Math.pow(10,s)*p)/p;while(s<n||s===n&&c<r);let h=xi(t.max,o);return i.push({value:h,major:Aw(o)}),i}var yy=class extends Ac{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0;}parse(e,n){let r=sd.prototype.parse.apply(this,[e,n]);if(r===0){this._zero=true;return}return Mn(r)&&r>0?r:null}determineDataLimits(){let{min:e,max:n}=this.getMinMax(true);this.min=Mn(e)?Math.max(0,e):null,this.max=Mn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=true),this.handleTickRangeOptions();}handleTickRangeOptions(){let{minDefined:e,maxDefined:n}=this.getUserBounds(),r=this.min,i=this.max,o=p=>r=e?r:p,s=p=>i=n?i:p,c=(p,h)=>Math.pow(10,Math.floor(Ei(p))+h);r===i&&(r<=0?(o(1),s(10)):(o(c(r,-1)),s(c(i,1)))),r<=0&&o(c(i,-1)),i<=0&&s(c(r,1)),this._zero&&this.min!==this._suggestedMin&&r===c(this.min,0)&&o(c(r,-1)),this.min=r,this.max=i;}buildTicks(){let e=this.options,n={min:this._userMin,max:this._userMax},r=IU(n,this);return e.bounds==="ticks"&&Mg(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(e){return e===void 0?"0":Ic(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=Ei(e),this._valueRange=Ei(this.max)-Ei(e);}getPixelForValue(e){return (e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Ei(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}};yy.id="logarithmic";yy.defaults={ticks:{callback:vy.formatters.logarithmic,major:{enabled:true}}};function o1(t){let e=t.ticks;if(e.display&&t.display){let n=$n(e.backdropPadding);return me(e.font&&e.font.size,ke.font.size)+n.height}return 0}function kU(t,e,n){return n=He(n)?n:[n],{w:T0(t,e.string,n),h:n.length*e.lineHeight}}function Ow(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:t<r||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function DU(t){let e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],i=[],o=t._pointLabels.length,s=t.options.pointLabels,c=s.centerPointLabels?Be/o:0;for(let p=0;p<o;p++){let h=s.setContext(t.getPointLabelContext(p));i[p]=h.padding;let v=t.getPointPosition(p,t.drawingArea+i[p],c),P=Sn(h.font),x=kU(t.ctx,P,t._pointLabels[p]);r[p]=x;let T=ai(t.getIndexAngle(p)+c),I=Math.round(_c(T)),R=Ow(I,v.x,x.w,0,180),A=Ow(I,v.y,x.h,90,270);AU(n,e,T,R,A);}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=OU(t,r,i);}function AU(t,e,n,r,i){let o=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n)),c=0,p=0;r.start<e.l?(c=(e.l-r.start)/o,t.l=Math.min(t.l,e.l-c)):r.end>e.r&&(c=(r.end-e.r)/o,t.r=Math.max(t.r,e.r+c)),i.start<e.t?(p=(e.t-i.start)/s,t.t=Math.min(t.t,e.t-p)):i.end>e.b&&(p=(i.end-e.b)/s,t.b=Math.max(t.b,e.b+p));}function OU(t,e,n){let r=[],i=t._pointLabels.length,o=t.options,s=o1(o)/2,c=t.drawingArea,p=o.pointLabels.centerPointLabels?Be/i:0;for(let h=0;h<i;h++){let v=t.getPointPosition(h,c+s+n[h],p),P=Math.round(_c(ai(v.angle+bn))),x=e[h],T=MU(v.y,x.h,P),I=RU(P),R=FU(v.x,x.w,I);r.push({x:v.x,y:T,textAlign:I,left:R,top:T,right:R+x.w,bottom:T+x.h});}return r}function RU(t){return t===0||t===180?"center":t<180?"left":"right"}function FU(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function MU(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function NU(t,e){let{ctx:n,options:{pointLabels:r}}=t;for(let i=e-1;i>=0;i--){let o=r.setContext(t.getPointLabelContext(i)),s=Sn(o.font),{x:c,y:p,textAlign:h,left:v,top:P,right:x,bottom:T}=t._pointLabelItems[i],{backdropColor:I}=o;if(!Le(I)){let R=$o(o.borderRadius),A=$n(o.backdropPadding);n.fillStyle=I;let O=v-A.left,N=P-A.top,V=x-v+A.width,G=T-P+A.height;Object.values(R).some(X=>X!==0)?(n.beginPath(),os(n,{x:O,y:N,w:V,h:G,radius:R}),n.fill()):n.fillRect(O,N,V,G);}is(n,t._pointLabels[i],c,p+s.lineHeight/2,s,{color:o.color,textAlign:h,textBaseline:"middle"});}}function iI(t,e,n,r){let{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,rn);else {let o=t.getPointPosition(0,e);i.moveTo(o.x,o.y);for(let s=1;s<r;s++)o=t.getPointPosition(s,e),i.lineTo(o.x,o.y);}}function LU(t,e,n,r){let i=t.ctx,o=e.circular,{color:s,lineWidth:c}=e;!o&&!r||!s||!c||n<0||(i.save(),i.strokeStyle=s,i.lineWidth=c,i.setLineDash(e.borderDash),i.lineDashOffset=e.borderDashOffset,i.beginPath(),iI(t,n,o,r),i.closePath(),i.stroke(),i.restore());}function BU(t,e,n){return ba(t,{label:n,index:e,type:"pointLabel"})}var cd=class extends sd{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[];}setDimensions(){let e=this._padding=$n(o1(this.options)/2),n=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(n,r)/2);}determineDataLimits(){let{min:e,max:n}=this.getMinMax(false);this.min=Mn(e)&&!isNaN(e)?e:0,this.max=Mn(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions();}computeTickLimit(){return Math.ceil(this.drawingArea/o1(this.options))}generateTickLabels(e){sd.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,r)=>{let i=Qe(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r));}fit(){let e=this.options;e.display&&e.pointLabels.display?DU(this):this.setCenterPoint(0,0,0,0);}setCenterPoint(e,n,r,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,i));}getIndexAngle(e){let n=rn/(this._pointLabels.length||1),r=this.options.startAngle||0;return ai(e*n+Qn(r))}getDistanceFromCenterForValue(e){if(Le(e))return NaN;let n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(Le(e))return NaN;let n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){let n=this._pointLabels||[];if(e>=0&&e<n.length){let r=n[e];return BU(this.getContext(),e,r)}}getPointPosition(e,n,r=0){let i=this.getIndexAngle(e)-bn+r;return {x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:n,top:r,right:i,bottom:o}=this._pointLabelItems[e];return {left:n,top:r,right:i,bottom:o}}drawBackground(){let{backgroundColor:e,grid:{circular:n}}=this.options;if(e){let r=this.ctx;r.save(),r.beginPath(),iI(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore();}}drawGrid(){let e=this.ctx,n=this.options,{angleLines:r,grid:i}=n,o=this._pointLabels.length,s,c,p;if(n.pointLabels.display&&NU(this,o),i.display&&this.ticks.forEach((h,v)=>{if(v!==0){c=this.getDistanceFromCenterForValue(h.value);let P=i.setContext(this.getContext(v-1));LU(this,P,c,o);}}),r.display){for(e.save(),s=o-1;s>=0;s--){let h=r.setContext(this.getPointLabelContext(s)),{color:v,lineWidth:P}=h;!P||!v||(e.lineWidth=P,e.strokeStyle=v,e.setLineDash(h.borderDash),e.lineDashOffset=h.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),p=this.getPointPosition(s,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(p.x,p.y),e.stroke());}e.restore();}}drawBorder(){}drawLabels(){let e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;let i=this.getIndexAngle(0),o,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,p)=>{if(p===0&&!n.reverse)return;let h=r.setContext(this.getContext(p)),v=Sn(h.font);if(o=this.getDistanceFromCenterForValue(this.ticks[p].value),h.showLabelBackdrop){e.font=v.string,s=e.measureText(c.label).width,e.fillStyle=h.backdropColor;let P=$n(h.backdropPadding);e.fillRect(-s/2-P.left,-o-v.size/2-P.top,s+P.width,v.size+P.height);}is(e,c.label,0,-o,v,{color:h.color});}),e.restore();}drawTitle(){}};cd.id="radialLinear";cd.defaults={display:true,animate:true,position:"chartArea",angleLines:{display:true,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:false},startAngle:0,ticks:{showLabelBackdrop:true,callback:vy.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:true,font:{size:10},callback(t){return t},padding:5,centerPointLabels:false}};cd.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};cd.descriptors={angleLines:{_fallback:"grid"}};var Cy={millisecond:{common:true,size:1,steps:1e3},second:{common:true,size:1e3,steps:60},minute:{common:true,size:6e4,steps:60},hour:{common:true,size:36e5,steps:24},day:{common:true,size:864e5,steps:30},week:{common:false,size:6048e5,steps:4},month:{common:true,size:2628e6,steps:12},quarter:{common:false,size:7884e6,steps:4},year:{common:true,size:3154e7}},_i=Object.keys(Cy);function UU(t,e){return t-e}function Rw(t,e){if(Le(e))return null;let n=t._adapter,{parser:r,round:i,isoWeekday:o}=t._parseOpts,s=e;return typeof r=="function"&&(s=r(s)),Mn(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Vi(o)||o===true)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function Fw(t,e,n,r){let i=_i.length;for(let o=_i.indexOf(t);o<i-1;++o){let s=Cy[_i[o]],c=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(c*s.size))<=r)return _i[o]}return _i[i-1]}function $U(t,e,n,r,i){for(let o=_i.length-1;o>=_i.indexOf(n);o--){let s=_i[o];if(Cy[s].common&&t._adapter.diff(i,r,s)>=e-1)return s}return _i[n?_i.indexOf(n):0]}function GU(t){for(let e=_i.indexOf(t)+1,n=_i.length;e<n;++e)if(Cy[_i[e]].common)return _i[e]}function Mw(t,e,n){if(!n)t[e]=true;else if(n.length){let{lo:r,hi:i}=cf(n,e),o=n[r]>=e?n[r]:n[i];t[o]=true;}}function jU(t,e,n,r){let i=t._adapter,o=+i.startOf(e[0].value,r),s=e[e.length-1].value,c,p;for(c=o;c<=s;c=+i.add(c,1,r))p=n[c],p>=0&&(e[p].major=true);return e}function Nw(t,e,n){let r=[],i={},o=e.length,s,c;for(s=0;s<o;++s)c=e[s],i[c]=s,r.push({value:c,major:false});return o===0||!n?r:jU(t,r,i,n)}var ud=class extends Ac{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=false,this._parseOpts=void 0;}init(e,n){let r=e.time||(e.time={}),i=this._adapter=new V6._date(e.adapters.date);i.init(n),xc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized;}parse(e,n){return e===void 0?null:Rw(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]};}determineDataLimits(){let e=this.options,n=this._adapter,r=e.time.unit||"day",{min:i,max:o,minDefined:s,maxDefined:c}=this.getUserBounds();function p(h){!s&&!isNaN(h.min)&&(i=Math.min(i,h.min)),!c&&!isNaN(h.max)&&(o=Math.max(o,h.max));}(!s||!c)&&(p(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&p(this.getMinMax(false))),i=Mn(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Mn(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o);}_getLabelBounds(){let e=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){let e=this.options,n=e.time,r=e.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);let o=this.min,s=this.max,c=b0(i,o,s);return this._unit=n.unit||(r.autoSkip?Fw(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):$U(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:GU(this._unit),this.initOffsets(i),e.reverse&&c.reverse(),Nw(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value));}initOffsets(e){let n=0,r=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?r=o:r=(o-this.getDecimalForValue(e[e.length-2]))/2);let s=e.length<3?.5:.25;n=Nr(n,0,s),r=Nr(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)};}_generate(){let e=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||Fw(o.minUnit,n,r,this._getLabelCapacity(n)),c=me(o.stepSize,1),p=s==="week"?o.isoWeekday:false,h=Vi(p)||p===true,v={},P=n,x,T;if(h&&(P=+e.startOf(P,"isoWeek",p)),P=+e.startOf(P,h?"day":s),e.diff(r,n,s)>1e5*c)throw new Error(n+" and "+r+" are too far apart with stepSize of "+c+" "+s);let I=i.ticks.source==="data"&&this.getDataTimestamps();for(x=P,T=0;x<r;x=+e.add(x,c,s),T++)Mw(v,x,I);return (x===r||i.bounds==="ticks"||T===1)&&Mw(v,x,I),Object.keys(v).sort((R,A)=>R-A).map(R=>+R)}getLabelForValue(e){let n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}_tickFormatFunction(e,n,r,i){let o=this.options,s=o.time.displayFormats,c=this._unit,p=this._majorUnit,h=c&&s[c],v=p&&s[p],P=r[n],x=p&&v&&P&&P.major,T=this._adapter.format(e,i||(x?v:h)),I=o.ticks.callback;return I?Qe(I,[T,n,r],this):T}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e);}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){let n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){let n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){let n=this.options.ticks,r=this.ctx.measureText(e).width,i=Qn(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),s=Math.sin(i),c=this._resolveTickFontOptions(0).size;return {w:r*o+c*s,h:r*s+c*o}}_getLabelCapacity(e){let n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(e,0,Nw(this,[e],this._majorUnit),i),s=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;let i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){let e=this._cache.labels||[],n,r;if(e.length)return e;let i=this.getLabels();for(n=0,r=i.length;n<r;++n)e.push(Rw(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Ug(e.sort(UU))}};ud.id="time";ud.defaults={bounds:"data",adapters:{},time:{parser:false,unit:false,round:false,isoWeekday:false,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:false}}};function ly(t,e,n){let r=0,i=t.length-1,o,s,c,p;n?(e>=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=es(t,"pos",e)),{pos:o,time:c}=t[r],{pos:s,time:p}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=es(t,"time",e)),{time:o,pos:c}=t[r],{time:s,pos:p}=t[i]);let h=s-o;return h?c+(p-c)*(e-o)/h:c}var by=class extends ud{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0;}initOffsets(){let e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ly(n,this.min),this._tableRange=ly(n,this.max)-this._minPos,super.initOffsets(e);}buildLookupTable(e){let{min:n,max:r}=this,i=[],o=[],s,c,p,h,v;for(s=0,c=e.length;s<c;++s)h=e[s],h>=n&&h<=r&&i.push(h);if(i.length<2)return [{time:n,pos:0},{time:r,pos:1}];for(s=0,c=i.length;s<c;++s)v=i[s+1],p=i[s-1],h=i[s],Math.round((v+p)/2)!==h&&o.push({time:h,pos:s/(c-1)});return o}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return (ly(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return ly(this._table,r*this._tableRange+this._minPos,true)}};by.id="timeseries";by.defaults=ud.defaults;var oI=(function(){if(typeof window!="undefined"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return (t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1})(),Ff={toTextLines:function(t){var e=[],n;for(t=[].concat(t);t.length;)n=t.pop(),typeof n=="string"?e.unshift.apply(e,n.split(`
|
|
5649
|
-
`)):Array.isArray(n)?t.push.apply(t,n):Le(t)||e.unshift(""+n);return e},textSize:function(t,e,n){var r=[].concat(e),i=r.length,o=t.font,s=0,c;for(t.font=n.string,c=0;c<i;++c)s=Math.max(t.measureText(r[c]).width,s);return t.font=o,{height:i*n.lineHeight,width:s}},bound:function(t,e,n){return Math.max(t,Math.min(e,n))},arrayDiff:function(t,e){var n=t.slice(),r=[],i,o,s,c;for(i=0,s=e.length;i<s;++i)c=e[i],o=n.indexOf(c),o===-1?r.push([c,1]):n.splice(o,1);for(i=0,s=n.length;i<s;++i)r.push([n[i],-1]);return r},rasterize:function(t){return Math.round(t*oI)/oI}};function s1(t,e){var n=e.x,r=e.y;if(n===null)return {x:0,y:-1};if(r===null)return {x:1,y:0};var i=t.x-n,o=t.y-r,s=Math.sqrt(i*i+o*o);return {x:s?i/s:0,y:s?o/s:-1}}function VU(t,e,n,r,i){switch(i){case "center":n=r=0;break;case "bottom":n=0,r=1;break;case "right":n=1,r=0;break;case "left":n=-1,r=0;break;case "top":n=0,r=-1;break;case "start":n=-n,r=-r;break;case "end":break;default:i*=Math.PI/180,n=Math.cos(i),r=Math.sin(i);break}return {x:t,y:e,vx:n,vy:r}}var zU=0,sI=1,lI=2,cI=4,uI=8;function Sy(t,e,n){var r=zU;return t<n.left?r|=sI:t>n.right&&(r|=lI),e<n.top?r|=uI:e>n.bottom&&(r|=cI),r}function HU(t,e){for(var n=t.x0,r=t.y0,i=t.x1,o=t.y1,s=Sy(n,r,e),c=Sy(i,o,e),p,h,v;!(!(s|c)||s&c);)p=s||c,p&uI?(h=n+(i-n)*(e.top-r)/(o-r),v=e.top):p&cI?(h=n+(i-n)*(e.bottom-r)/(o-r),v=e.bottom):p&lI?(v=r+(o-r)*(e.right-n)/(i-n),h=e.right):p&sI&&(v=r+(o-r)*(e.left-n)/(i-n),h=e.left),p===s?(n=h,r=v,s=Sy(n,r,e)):(i=h,o=v,c=Sy(i,o,e));return {x0:n,x1:i,y0:r,y1:o}}function Py(t,e){var n=e.anchor,r=t,i,o;return e.clamp&&(r=HU(r,e.area)),n==="start"?(i=r.x0,o=r.y0):n==="end"?(i=r.x1,o=r.y1):(i=(r.x0+r.x1)/2,o=(r.y0+r.y1)/2),VU(i,o,t.vx,t.vy,e.align)}var xy={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,r=Math.cos(n),i=Math.sin(n),o=t.innerRadius,s=t.outerRadius;return Py({x0:t.x+r*o,y0:t.y+i*o,x1:t.x+r*s,y1:t.y+i*s,vx:r,vy:i},e)},point:function(t,e){var n=s1(t,e.origin),r=n.x*t.options.radius,i=n.y*t.options.radius;return Py({x0:t.x-r,y0:t.y-i,x1:t.x+r,y1:t.y+i,vx:n.x,vy:n.y},e)},bar:function(t,e){var n=s1(t,e.origin),r=t.x,i=t.y,o=0,s=0;return t.horizontal?(r=Math.min(t.x,t.base),o=Math.abs(t.base-t.x)):(i=Math.min(t.y,t.base),s=Math.abs(t.base-t.y)),Py({x0:r,y0:i+s,x1:r+o,y1:i,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=s1(t,e.origin);return Py({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:n.x,vy:n.y},e)}},ps=Ff.rasterize;function WU(t){var e=t.borderWidth||0,n=t.padding,r=t.size.height,i=t.size.width,o=-i/2,s=-r/2;return {frame:{x:o-n.left-e,y:s-n.top-e,w:i+n.width+e*2,h:r+n.height+e*2},text:{x:o,y:s,w:i,h:r}}}function qU(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return {x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return t.horizontal?{x:r,y:null}:{x:null,y:r}}function YU(t){return t instanceof cs?xy.arc:t instanceof us?xy.point:t instanceof ds?xy.bar:xy.fallback}function QU(t,e,n,r,i,o){var s=Math.PI/2;if(o){var c=Math.min(o,i/2,r/2),p=e+c,h=n+c,v=e+r-c,P=n+i-c;t.moveTo(e,h),p<v&&h<P?(t.arc(p,h,c,-Math.PI,-s),t.arc(v,h,c,-s,0),t.arc(v,P,c,0,s),t.arc(p,P,c,s,Math.PI)):p<v?(t.moveTo(p,n),t.arc(v,h,c,-s,s),t.arc(p,h,c,s,Math.PI+s)):h<P?(t.arc(p,h,c,-Math.PI,0),t.arc(p,P,c,0,Math.PI)):t.arc(p,h,c,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,n);}else t.rect(e,n,r,i);}function KU(t,e,n){var r=n.backgroundColor,i=n.borderColor,o=n.borderWidth;!r&&(!i||!o)||(t.beginPath(),QU(t,ps(e.x)+o/2,ps(e.y)+o/2,ps(e.w)-o,ps(e.h)-o,n.borderRadius),t.closePath(),r&&(t.fillStyle=r,t.fill()),i&&o&&(t.strokeStyle=i,t.lineWidth=o,t.lineJoin="miter",t.stroke()));}function XU(t,e,n){var r=n.lineHeight,i=t.w,o=t.x,s=t.y+r/2;return e==="center"?o+=i/2:(e==="end"||e==="right")&&(o+=i),{h:r,w:i,x:o,y:s}}function ZU(t,e,n){var r=t.shadowBlur,i=n.stroked,o=ps(n.x),s=ps(n.y),c=ps(n.w);i&&t.strokeText(e,o,s,c),n.filled&&(r&&i&&(t.shadowBlur=0),t.fillText(e,o,s,c),r&&i&&(t.shadowBlur=r));}function JU(t,e,n,r){var i=r.textAlign,o=r.color,s=!!o,c=r.font,p=e.length,h=r.textStrokeColor,v=r.textStrokeWidth,P=h&&v,x;if(!(!p||!s&&!P))for(n=XU(n,i,c),t.font=c.string,t.textAlign=i,t.textBaseline="middle",t.shadowBlur=r.textShadowBlur,t.shadowColor=r.textShadowColor,s&&(t.fillStyle=o),P&&(t.lineJoin="round",t.lineWidth=v,t.strokeStyle=h),x=0,p=e.length;x<p;++x)ZU(t,e[x],{stroked:P,filled:s,w:n.w,x:n.x,y:n.y+n.h*x});}var dI=function(t,e,n,r){var i=this;i._config=t,i._index=r,i._model=null,i._rects=null,i._ctx=e,i._el=n;};ji(dI.prototype,{_modelize:function(t,e,n,r){var i=this,o=i._index,s=Sn(In([n.font,{}],r,o)),c=In([n.color,ke.color],r,o);return {align:In([n.align,"center"],r,o),anchor:In([n.anchor,"center"],r,o),area:r.chart.chartArea,backgroundColor:In([n.backgroundColor,null],r,o),borderColor:In([n.borderColor,null],r,o),borderRadius:In([n.borderRadius,0],r,o),borderWidth:In([n.borderWidth,0],r,o),clamp:In([n.clamp,false],r,o),clip:In([n.clip,false],r,o),color:c,display:t,font:s,lines:e,offset:In([n.offset,4],r,o),opacity:In([n.opacity,1],r,o),origin:qU(i._el,r),padding:$n(In([n.padding,4],r,o)),positioner:YU(i._el),rotation:In([n.rotation,0],r,o)*(Math.PI/180),size:Ff.textSize(i._ctx,e,s),textAlign:In([n.textAlign,"start"],r,o),textShadowBlur:In([n.textShadowBlur,0],r,o),textShadowColor:In([n.textShadowColor,c],r,o),textStrokeColor:In([n.textStrokeColor,c],r,o),textStrokeWidth:In([n.textStrokeWidth,0],r,o)}},update:function(t){var e=this,n=null,r=null,i=e._index,o=e._config,s,c,p,h=In([o.display,true],t,i);h&&(s=t.dataset.data[i],c=me(Qe(o.formatter,[s,t]),s),p=Le(c)?[]:Ff.toTextLines(c),p.length&&(n=e._modelize(h,p,o,t),r=WU(n))),e._model=n,e._rects=r;},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var n=this,r=t.ctx,i=n._model,o=n._rects,s;this.visible()&&(r.save(),i.clip&&(s=i.area,r.beginPath(),r.rect(s.left,s.top,s.right-s.left,s.bottom-s.top),r.clip()),r.globalAlpha=Ff.bound(0,i.opacity,1),r.translate(ps(e.x),ps(e.y)),r.rotate(i.rotation),KU(r,o.frame,i),JU(r,i.lines,o.text,i),r.restore());}});var t8=Number.MIN_SAFE_INTEGER||-9007199254740991,e8=Number.MAX_SAFE_INTEGER||9007199254740991;function Rf(t,e,n){var r=Math.cos(n),i=Math.sin(n),o=e.x,s=e.y;return {x:o+r*(t.x-o)-i*(t.y-s),y:s+i*(t.x-o)+r*(t.y-s)}}function aI(t,e){var n=e8,r=t8,i=e.origin,o,s,c,p,h;for(o=0;o<t.length;++o)s=t[o],c=s.x-i.x,p=s.y-i.y,h=e.vx*c+e.vy*p,n=Math.min(n,h),r=Math.max(r,h);return {min:n,max:r}}function Ey(t,e){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);return {vx:(e.x-t.x)/i,vy:(e.y-t.y)/i,origin:t,ln:i}}var pI=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0};};ji(pI.prototype,{center:function(){var t=this._rect;return {x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,n){this._rotation=n,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h};},contains:function(t){var e=this,n=1,r=e._rect;return t=Rf(t,e.center(),-e._rotation),!(t.x<r.x-n||t.y<r.y-n||t.x>r.x+r.w+n*2||t.y>r.y+r.h+n*2)},intersects:function(t){var e=this._points(),n=t._points(),r=[Ey(e[0],e[1]),Ey(e[0],e[3])],i,o,s;for(this._rotation!==t._rotation&&r.push(Ey(n[0],n[1]),Ey(n[0],n[3])),i=0;i<r.length;++i)if(o=aI(e,r[i]),s=aI(n,r[i]),o.max<s.min||s.max<o.min)return false;return true},_points:function(){var t=this,e=t._rect,n=t._rotation,r=t.center();return [Rf({x:e.x,y:e.y},r,n),Rf({x:e.x+e.w,y:e.y},r,n),Rf({x:e.x+e.w,y:e.y+e.h},r,n),Rf({x:e.x,y:e.y+e.h},r,n)]}});function fI(t,e,n){var r=e.positioner(t,e),i=r.vx,o=r.vy;if(!i&&!o)return {x:r.x,y:r.y};var s=n.w,c=n.h,p=e.rotation,h=Math.abs(s/2*Math.cos(p))+Math.abs(c/2*Math.sin(p)),v=Math.abs(s/2*Math.sin(p))+Math.abs(c/2*Math.cos(p)),P=1/Math.max(Math.abs(i),Math.abs(o));return h*=i*P,v*=o*P,h+=e.offset*i,v+=e.offset*o,{x:r.x+h,y:r.y+v}}function n8(t,e){var n,r,i,o;for(n=t.length-1;n>=0;--n)for(i=t[n].$layout,r=n-1;r>=0&&i._visible;--r)o=t[r].$layout,o._visible&&i._box.intersects(o._box)&&e(i,o);return t}function r8(t){var e,n,r,i,o,s,c;for(e=0,n=t.length;e<n;++e)r=t[e],i=r.$layout,i._visible&&(c=new Proxy(r._el,{get:(p,h)=>p.getProps([h],true)[h]}),o=r.geometry(),s=fI(c,r.model(),o),i._box.update(s,o,r.rotation()));return n8(t,function(p,h){var v=p._hidable,P=h._hidable;v&&P||P?h._visible=false:v&&(p._visible=false);})}var Mf={prepare:function(t){var e=[],n,r,i,o,s;for(n=0,i=t.length;n<i;++n)for(r=0,o=t[n].length;r<o;++r)s=t[n][r],e.push(s),s.$layout={_box:new pI,_hidable:false,_visible:true,_set:n,_idx:s._index};return e.sort(function(c,p){var h=c.$layout,v=p.$layout;return h._idx===v._idx?v._set-h._set:v._idx-h._idx}),this.update(e),e},update:function(t){var e=false,n,r,i,o,s;for(n=0,r=t.length;n<r;++n)i=t[n],o=i.model(),s=i.$layout,s._hidable=o&&o.display==="auto",s._visible=i.visible(),e|=s._hidable;e&&r8(t);},lookup:function(t,e){var n,r;for(n=t.length-1;n>=0;--n)if(r=t[n].$layout,r&&r._visible&&r._box.contains(e))return t[n];return null},draw:function(t,e){var n,r,i,o,s,c;for(n=0,r=e.length;n<r;++n)i=e[n],o=i.$layout,o._visible&&(s=i.geometry(),c=fI(i._el,i.model(),s),o._box.update(c,s,i.rotation()),i.draw(t,c));}},i8=function(t){if(Le(t))return null;var e=t,n,r,i;if(Te(t))if(!Le(t.label))e=t.label;else if(!Le(t.r))e=t.r;else for(e="",n=Object.keys(t),i=0,r=n.length;i<r;++i)e+=(i!==0?", ":"")+n[i]+": "+t[n[i]];return ""+e},o8={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:false,clip:false,color:void 0,display:true,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:i8,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Ti="$datalabels",hI="$default";function a8(t,e){var n=t.datalabels,r={},i=[],o,s;return n===false?null:(n===true&&(n={}),e=ji({},[e,n]),o=e.labels||{},s=Object.keys(o),delete e.labels,s.length?s.forEach(function(c){o[c]&&i.push(ji({},[e,o[c],{_key:c}]));}):i.push(e),r=i.reduce(function(c,p){return tn(p.listeners||{},function(h,v){c[v]=c[v]||{},c[v][p._key||hI]=h;}),delete p.listeners,c},{}),{labels:i,listeners:r})}function l1(t,e,n,r){if(e){var i=n.$context,o=n.$groups,s;e[o._set]&&(s=e[o._set][o._key],s&&Qe(s,[i,r])===true&&(t[Ti]._dirty=true,n.update(i)));}}function s8(t,e,n,r,i){var o,s;!n&&!r||(n?r?n!==r&&(s=o=true):s=true:o=true,s&&l1(t,e.leave,n,i),o&&l1(t,e.enter,r,i));}function l8(t,e){var n=t[Ti],r=n._listeners,i,o;if(!(!r.enter&&!r.leave)){if(e.type==="mousemove")o=Mf.lookup(n._labels,e);else if(e.type!=="mouseout")return;i=n._hovered,n._hovered=o,s8(t,r,i,o,e);}}function c8(t,e){var n=t[Ti],r=n._listeners.click,i=r&&Mf.lookup(n._labels,e);i&&l1(t,r,i,e);}var mI={id:"datalabels",defaults:o8,beforeInit:function(t){t[Ti]={_actives:[]};},beforeUpdate:function(t){var e=t[Ti];e._listened=false,e._listeners={},e._datasets=[],e._labels=[];},afterDatasetUpdate:function(t,e,n){var r=e.index,i=t[Ti],o=i._datasets[r]=[],s=t.isDatasetVisible(r),c=t.data.datasets[r],p=a8(c,n),h=e.meta.data||[],v=t.ctx,P,x,T,I,R,A,O,N;for(v.save(),P=0,T=h.length;P<T;++P)if(O=h[P],O[Ti]=[],s&&O&&t.getDataVisibility(P)&&!O.skip)for(x=0,I=p.labels.length;x<I;++x)R=p.labels[x],A=R._key,N=new dI(R,v,O,P),N.$groups={_set:r,_key:A||hI},N.$context={active:false,chart:t,dataIndex:P,dataset:c,datasetIndex:r},N.update(N.$context),O[Ti].push(N),o.push(N);v.restore(),ji(i._listeners,p.listeners,{merger:function(V,G,X){G[V]=G[V]||{},G[V][e.index]=X[V],i._listened=true;}});},afterUpdate:function(t){t[Ti]._labels=Mf.prepare(t[Ti]._datasets);},afterDatasetsDraw:function(t){Mf.draw(t,t[Ti]._labels);},beforeEvent:function(t,e){if(t[Ti]._listened){var n=e.event;switch(n.type){case "mousemove":case "mouseout":l8(t,n);break;case "click":c8(t,n);break}}},afterEvent:function(t){var e=t[Ti],n=e._actives,r=e._actives=t.getActiveElements(),i=Ff.arrayDiff(n,r),o,s,c,p,h,v,P;for(o=0,s=i.length;o<s;++o)if(h=i[o],h[1])for(P=h[0].element[Ti]||[],c=0,p=P.length;c<p;++c)v=P[c],v.$context.active=h[1]===1,v.update(v.$context);(e._dirty||i.length)&&(Mf.update(e._labels),t.render()),delete e._dirty;}};var gI={modes:{point(t,e){return Ty(t,e,{intersect:true})},nearest(t,e,n){return p8(t,e,n)},x(t,e,n){return Ty(t,e,{intersect:n.intersect,axis:"x"})},y(t,e,n){return Ty(t,e,{intersect:n.intersect,axis:"y"})}}};function y1(t,e,n){return (gI.modes[n.mode]||gI.modes.nearest)(t,e,n)}function u8(t,e,n){return n!=="x"&&n!=="y"?t.inRange(e.x,e.y,"x",true)||t.inRange(e.x,e.y,"y",true):t.inRange(e.x,e.y,n,true)}function d8(t,e,n){return n==="x"?{x:t.x,y:e.y}:n==="y"?{x:e.x,y:t.y}:e}function Ty(t,e,n){return t.visibleElements.filter(r=>n.intersect?r.inRange(e.x,e.y):u8(r,e,n.axis))}function p8(t,e,n){let r=Number.POSITIVE_INFINITY;return Ty(t,e,n).reduce((i,o)=>{let s=o.getCenterPoint(),c=d8(e,s,n.axis),p=ns(e,c);return p<r?(i=[o],r=p):p===r&&i.push(o),i},[]).sort((i,o)=>i._index-o._index).slice(0,1)}var f8=(t,e)=>e>t||t.length>e.length&&t.slice(0,e.length)===e,Rc=.001,Iy=(t,e,n)=>Math.min(n,Math.max(e,t));function h8(t,e,n){for(let r of Object.keys(t))t[r]=Iy(t[r],e,n);return t}function m8(t,e,n,r){if(!t||!e||n<=0)return false;let i=r/2;return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(n+i,2)}function MI(t,{x:e,y:n,x2:r,y2:i},o,s){let c=s/2,p=t.x>=e-c-Rc&&t.x<=r+c+Rc,h=t.y>=n-c-Rc&&t.y<=i+c+Rc;return o==="x"?p:(o==="y"||p)&&h}function hd(t,e){let{centerX:n,centerY:r}=t.getProps(["centerX","centerY"],e);return {x:n,y:r}}function g8(t,e,n,r=true){let i=n.split("."),o=0;for(let s of e.split(".")){let c=i[o++];if(parseInt(s,10)<parseInt(c,10))break;if(f8(c,s)){if(r)throw new Error(`${t} v${n} is not supported. v${e} or newer is required.`);return false}}return true}var NI=t=>typeof t=="string"&&t.endsWith("%"),LI=t=>parseFloat(t)/100,BI=t=>Iy(LI(t),0,1);function b1(t,e){return e==="start"?0:e==="end"?t:NI(e)?BI(e)*t:t/2}function Cl(t,e,n=true){return typeof e=="number"?e:NI(e)?(n?BI(e):LI(e))*t:t}function y8(t,e){let{x:n,width:r}=t,i=e.textAlign;return i==="center"?n+r/2:i==="end"||i==="right"?n+r:n}function v1(t,e="center"){return Te(t)?{x:me(t.x,e),y:me(t.y,e)}:(t=me(t,e),{x:t,y:t})}function UI(t){return t&&(Fn(t.xValue)||Fn(t.yValue))}function Lf(t,e,n,r=false){let i=n.init;if(i){if(i===true)return GI(e,r)}else return;return b8(e,r,Qe(i,[{chart:t,properties:e,options:n}]))}function $I(t,e,n){let r=false;return e.forEach(i=>{Gr(t[i])?(r=true,n[i]=t[i]):Fn(n[i])&&delete n[i];}),r}function GI({centerX:t,centerY:e},n){return n?{centerX:t,centerY:e,radius:0,width:0,height:0}:{x:t,y:e,x2:t,y2:e,width:0,height:0}}function b8(t,e,n){if(n===true)return GI(t,e);if(Te(n))return n}var c1=new Map,v8=t=>isNaN(t)||t<=0,C8=t=>t.reduce(function(e,n){return e+=n.string,e},"");function ky(t){if(t&&typeof t=="object"){let e=t.toString();return e==="[object HTMLImageElement]"||e==="[object HTMLCanvasElement]"}}function C1(t,{x:e,y:n},r){r&&(t.translate(e,n),t.rotate(Qn(r)),t.translate(-e,-n));}function Sl(t,e){if(e&&e.borderWidth)return t.lineCap=e.borderCapStyle,t.setLineDash(e.borderDash),t.lineDashOffset=e.borderDashOffset,t.lineJoin=e.borderJoinStyle,t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,true}function md(t,e){t.shadowColor=e.backgroundShadowColor,t.shadowBlur=e.shadowBlur,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY;}function S1(t,e){let n=e.content;if(ky(n))return {width:Cl(n.width,e.width),height:Cl(n.height,e.height)};let r=e.font,i=He(r)?r.map(p=>Sn(p)):[Sn(r)],o=e.textStrokeWidth,s=He(n)?n:[n],c=s.join()+C8(i)+o+(t._measureText?"-spriting":"");return c1.has(c)||c1.set(c,_8(t,s,i,o)),c1.get(c)}function jI(t,e,n){let{x:r,y:i,width:o,height:s}=e;t.save(),md(t,n);let c=Sl(t,n);t.fillStyle=n.backgroundColor,t.beginPath(),os(t,{x:r,y:i,w:o,h:s,radius:h8($o(n.borderRadius),0,Math.min(o,s)/2)}),t.closePath(),t.fill(),c&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore();}function S8(t,e,n){let r=n.content;if(ky(r)){t.save(),t.globalAlpha=I8(n.opacity,r.style.opacity),t.drawImage(r,e.x,e.y,e.width,e.height),t.restore();return}let i=He(r)?r:[r],o=n.font,s=He(o)?o.map(P=>Sn(P)):[Sn(o)],c=n.color,p=He(c)?c:[c],h=y8(e,n),v=e.y+n.textStrokeWidth/2;t.save(),t.textBaseline="middle",t.textAlign=n.textAlign,P8(t,n)&&T8(t,{x:h,y:v},i,s),w8(t,{x:h,y:v},i,{fonts:s,colors:p}),t.restore();}function P8(t,e){if(e.textStrokeWidth>0)return t.lineJoin="round",t.miterLimit=2,t.lineWidth=e.textStrokeWidth,t.strokeStyle=e.textStrokeColor,true}function x8(t,e,n,r){let{radius:i,options:o}=e,s=o.pointStyle,c=o.rotation,p=(c||0)*lf;if(ky(s)){t.save(),t.translate(n,r),t.rotate(p),t.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),t.restore();return}v8(i)||E8(t,{x:n,y:r,radius:i,rotation:c,style:s,rad:p});}function E8(t,{x:e,y:n,radius:r,rotation:i,style:o,rad:s}){let c,p,h,v;switch(t.beginPath(),o){default:t.arc(e,n,r,0,rn),t.closePath();break;case "triangle":t.moveTo(e+Math.sin(s)*r,n-Math.cos(s)*r),s+=td,t.lineTo(e+Math.sin(s)*r,n-Math.cos(s)*r),s+=td,t.lineTo(e+Math.sin(s)*r,n-Math.cos(s)*r),t.closePath();break;case "rectRounded":v=r*.516,h=r-v,c=Math.cos(s+mo)*h,p=Math.sin(s+mo)*h,t.arc(e-c,n-p,v,s-Be,s-bn),t.arc(e+p,n-c,v,s-bn,s),t.arc(e+c,n+p,v,s,s+bn),t.arc(e-p,n+c,v,s+bn,s+Be),t.closePath();break;case "rect":if(!i){h=Math.SQRT1_2*r,t.rect(e-h,n-h,2*h,2*h);break}s+=mo;case "rectRot":c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+p,n-c),t.lineTo(e+c,n+p),t.lineTo(e-p,n+c),t.closePath();break;case "crossRot":s+=mo;case "cross":c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+c,n+p),t.moveTo(e+p,n-c),t.lineTo(e-p,n+c);break;case "star":c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+c,n+p),t.moveTo(e+p,n-c),t.lineTo(e-p,n+c),s+=mo,c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+c,n+p),t.moveTo(e+p,n-c),t.lineTo(e-p,n+c);break;case "line":c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+c,n+p);break;case "dash":t.moveTo(e,n),t.lineTo(e+Math.cos(s)*r,n+Math.sin(s)*r);break}t.fill();}function _8(t,e,n,r){t.save();let i=e.length,o=0,s=r;for(let c=0;c<i;c++){let p=n[Math.min(c,n.length-1)];t.font=p.string;let h=e[c];o=Math.max(o,t.measureText(h).width+r),s+=p.lineHeight;}return t.restore(),{width:o,height:s}}function T8(t,{x:e,y:n},r,i){t.beginPath();let o=0;r.forEach(function(s,c){let p=i[Math.min(c,i.length-1)],h=p.lineHeight;t.font=p.string,t.strokeText(s,e,n+h/2+o),o+=h;}),t.stroke();}function w8(t,{x:e,y:n},r,{fonts:i,colors:o}){let s=0;r.forEach(function(c,p){let h=o[Math.min(p,o.length-1)],v=i[Math.min(p,i.length-1)],P=v.lineHeight;t.beginPath(),t.font=v.string,t.fillStyle=h,t.fillText(c,e,n+P/2+s),s+=P,t.fill();});}function I8(t,e){let n=Vi(t)?t:e;return Vi(n)?Iy(n,0,1):1}var yI={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function dd(t,e,n){return e=typeof e=="number"?e:t.parse(e),Mn(e)?t.getPixelForValue(e):n}function Fc(t,e,n){let r=e[n];if(r||n==="scaleID")return r;let i=n.charAt(0),o=Object.values(t).filter(s=>s.axis&&s.axis===i);return o.length?o[0].id:i}function VI(t,e){if(t){let n=t.options.reverse,r=dd(t,e.min,n?e.end:e.start),i=dd(t,e.max,n?e.start:e.end);return {start:r,end:i}}}function zI(t,e){let{chartArea:n,scales:r}=t,i=r[Fc(r,e,"xScaleID")],o=r[Fc(r,e,"yScaleID")],s=n.width/2,c=n.height/2;return i&&(s=dd(i,e.xValue,i.left+i.width/2)),o&&(c=dd(o,e.yValue,o.top+o.height/2)),{x:s,y:c}}function P1(t,e){let n=t.scales,r=n[Fc(n,e,"xScaleID")],i=n[Fc(n,e,"yScaleID")];if(!r&&!i)return {};let{left:o,right:s}=r||t.chartArea,{top:c,bottom:p}=i||t.chartArea,h=bI(r,{min:e.xMin,max:e.xMax,start:o,end:s});o=h.start,s=h.end;let v=bI(i,{min:e.yMin,max:e.yMax,start:p,end:c});return c=v.start,p=v.end,{x:o,y:c,x2:s,y2:p,width:s-o,height:p-c,centerX:o+(s-o)/2,centerY:c+(p-c)/2}}function HI(t,e){if(!UI(e)){let n=P1(t,e),r=e.radius;(!r||isNaN(r))&&(r=Math.min(n.width,n.height)/2,e.radius=r);let i=r*2,o=n.centerX+e.xAdjust,s=n.centerY+e.yAdjust;return {x:o-r,y:s-r,x2:o+r,y2:s+r,centerX:o,centerY:s,width:i,height:i,radius:r}}return D8(t,e)}function k8(t,e){let{scales:n,chartArea:r}=t,i=n[e.scaleID],o={x:r.left,y:r.top,x2:r.right,y2:r.bottom};return i?A8(i,o,e):O8(n,o,e),o}function WI(t,e,n){let r=P1(t,e);return r.initProperties=Lf(t,r,e,n),r.elements=[{type:"label",optionScope:"label",properties:M8(t,r,e),initProperties:r.initProperties}],r}function D8(t,e){let n=zI(t,e),r=e.radius*2;return {x:n.x-e.radius+e.xAdjust,y:n.y-e.radius+e.yAdjust,x2:n.x+e.radius+e.xAdjust,y2:n.y+e.radius+e.yAdjust,centerX:n.x+e.xAdjust,centerY:n.y+e.yAdjust,radius:e.radius,width:r,height:r}}function bI(t,e){let n=VI(t,e)||e;return {start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function A8(t,e,n){let r=dd(t,n.value,NaN),i=dd(t,n.endValue,r);t.isHorizontal()?(e.x=r,e.x2=i):(e.y=r,e.y2=i);}function O8(t,e,n){for(let r of Object.keys(yI)){let i=t[Fc(t,n,r)];if(i){let{min:o,max:s,start:c,end:p,startProp:h,endProp:v}=yI[r],P=VI(i,{min:n[o],max:n[s],start:i[c],end:i[p]});e[h]=P.start,e[v]=P.end;}}}function R8({properties:t,options:e},n,r,i){let{x:o,x2:s,width:c}=t;return qI({start:o,end:s,borderWidth:e.borderWidth},{position:r.x,padding:{start:i.left,end:i.right},adjust:e.label.xAdjust,size:n.width})}function F8({properties:t,options:e},n,r,i){let{y:o,y2:s,height:c}=t;return qI({start:o,end:s,borderWidth:e.borderWidth},{position:r.y,padding:{start:i.top,end:i.bottom},adjust:e.label.yAdjust,size:n.height})}function qI(t,e){let{start:n,end:r,borderWidth:i}=t,{position:o,padding:{start:s,end:c},adjust:p}=e,h=r-i-n-s-c-e.size;return n+i/2+p+b1(h,o)}function M8(t,e,n){let r=n.label;r.backgroundColor="transparent",r.callout.display=false;let i=v1(r.position),o=$n(r.padding),s=S1(t.ctx,r),c=R8({properties:e,options:n},s,i,o),p=F8({properties:e,options:n},s,i,o),h=s.width+o.width,v=s.height+o.height;return {x:c,y:p,x2:c+h,y2:p+v,width:h,height:v,centerX:c+h/2,centerY:p+v/2,rotation:r.rotation}}function Bc(t,e,n){let r=Math.cos(n),i=Math.sin(n),o=e.x,s=e.y;return {x:o+r*(t.x-o)-i*(t.y-s),y:s+i*(t.x-o)+r*(t.y-s)}}var u1=["enter","leave"],x1=u1.concat("click");function N8(t,e,n){e.listened=$I(n,x1,e.listeners),e.moveListened=false,e._getElements=y1,u1.forEach(r=>{Gr(n[r])&&(e.moveListened=true);}),(!e.listened||!e.moveListened)&&e.annotations.forEach(r=>{!e.listened&&Gr(r.click)&&(e.listened=true),e.moveListened||u1.forEach(i=>{Gr(r[i])&&(e.listened=true,e.moveListened=true);});});}function L8(t,e,n){if(t.listened)switch(e.type){case "mousemove":case "mouseout":return B8(t,e,n);case "click":return U8(t,e,n)}}function B8(t,e,n){if(!t.moveListened)return;let r;e.type==="mousemove"?r=y1(t,e,n.interaction):r=[];let i=t.hovered;t.hovered=r;let o={state:t,event:e},s=vI(o,"leave",i,r);return vI(o,"enter",r,i)||s}function vI({state:t,event:e},n,r,i){let o;for(let s of r)i.indexOf(s)<0&&(o=YI(s.options[n]||t.listeners[n],s,e)||o);return o}function U8(t,e,n){let r=t.listeners,i=y1(t,e,n.interaction),o;for(let s of i)o=YI(s.options.click||r.click,s,e)||o;return o}function YI(t,e,n){return Qe(t,[e.$context,n])===true}var wy=["afterDraw","beforeDraw"];function $8(t,e,n){let r=e.visibleElements;e.hooked=$I(n,wy,e.hooks),e.hooked||r.forEach(i=>{e.hooked||wy.forEach(o=>{Gr(i.options[o])&&(e.hooked=true);});});}function CI(t,e,n){if(t.hooked){let r=e.options[n]||t.hooks[n];return Qe(r,[e.$context])}}function G8(t,e,n){let r=W8(t.scales,e,n),i=SI(e,r,"min","suggestedMin");i=SI(e,r,"max","suggestedMax")||i,i&&Gr(e.handleTickRangeOptions)&&e.handleTickRangeOptions();}function j8(t,e){for(let n of t)z8(n,e);}function SI(t,e,n,r){if(Mn(e[n])&&!V8(t.options,n,r)){let i=t[n]!==e[n];return t[n]=e[n],i}}function V8(t,e,n){return Fn(t[e])||Fn(t[n])}function z8(t,e){for(let n of ["scaleID","xScaleID","yScaleID"]){let r=Fc(e,t,n);r&&!e[r]&&H8(t,n)&&console.warn(`No scale found with id '${r}' for annotation '${t.id}'`);}}function H8(t,e){if(e==="scaleID")return true;let n=e.charAt(0);for(let r of ["Min","Max","Value"])if(Fn(t[n+r]))return true;return false}function W8(t,e,n){let r=e.axis,i=e.id,o=r+"ScaleID",s={min:me(e.min,Number.NEGATIVE_INFINITY),max:me(e.max,Number.POSITIVE_INFINITY)};for(let c of n)c.scaleID===i?PI(c,e,["value","endValue"],s):Fc(t,c,o)===i&&PI(c,e,[r+"Min",r+"Max",r+"Value"],s);return s}function PI(t,e,n,r){for(let i of n){let o=t[i];if(Fn(o)){let s=e.parse(o);r.min=Math.min(r.min,s),r.max=Math.max(r.max,s);}}}var Pl=class extends br{inRange(e,n,r,i){let{x:o,y:s}=Bc({x:e,y:n},this.getCenterPoint(i),Qn(-this.options.rotation));return MI({x:o,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(e){return hd(this,e)}draw(e){e.save(),C1(e,this.getCenterPoint(),this.options.rotation),jI(e,this,this.options),e.restore();}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,n){return WI(e,n)}};Pl.id="boxAnnotation";Pl.defaults={adjustScaleRange:true,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:true,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:false},color:"black",content:null,display:false,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Pl.defaultRoutes={borderColor:"color",backgroundColor:"color"};Pl.descriptors={label:{_fallback:true}};var QI=["left","bottom","top","right"],Mc=class extends br{inRange(e,n,r,i){let{x:o,y:s}=Bc({x:e,y:n},this.getCenterPoint(i),Qn(-this.rotation));return MI({x:o,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(e){return hd(this,e)}draw(e){let n=this.options,r=!Fn(this._visible)||this._visible;!n.display||!n.content||!r||(e.save(),C1(e,this.getCenterPoint(),this.rotation),Y8(e,this),jI(e,this,n),S8(e,e7(this),n),e.restore());}resolveElementProperties(e,n){let r;if(UI(n))r=zI(e,n);else {let{centerX:c,centerY:p}=P1(e,n);r={x:c,y:p};}let i=$n(n.padding),o=S1(e.ctx,n),s=q8(r,o,n,i);return St(W({initProperties:Lf(e,s,n),pointX:r.x,pointY:r.y},s),{rotation:n.rotation})}};Mc.id="labelAnnotation";Mc.defaults={adjustScaleRange:true,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:false,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:true,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};Mc.defaultRoutes={borderColor:"color"};function q8(t,e,n,r){let i=e.width+r.width+n.borderWidth,o=e.height+r.height+n.borderWidth,s=v1(n.position,"center"),c=xI(t.x,i,n.xAdjust,s.x),p=xI(t.y,o,n.yAdjust,s.y);return {x:c,y:p,x2:c+i,y2:p+o,width:i,height:o,centerX:c+i/2,centerY:p+o/2}}function xI(t,e,n=0,r){return t-b1(e,r)+n}function Y8(t,e){let{pointX:n,pointY:r,options:i}=e,o=i.callout,s=o&&o.display&&J8(e,o);if(!s||n7(e,o,s))return;if(t.save(),t.beginPath(),!Sl(t,o))return t.restore();let{separatorStart:p,separatorEnd:h}=Q8(e,s),{sideStart:v,sideEnd:P}=X8(e,s,p);(o.margin>0||i.borderWidth===0)&&(t.moveTo(p.x,p.y),t.lineTo(h.x,h.y)),t.moveTo(v.x,v.y),t.lineTo(P.x,P.y);let x=Bc({x:n,y:r},e.getCenterPoint(),Qn(-e.rotation));t.lineTo(x.x,x.y),t.stroke(),t.restore();}function Q8(t,e){let{x:n,y:r,x2:i,y2:o}=t,s=K8(t,e),c,p;return e==="left"||e==="right"?(c={x:n+s,y:r},p={x:c.x,y:o}):(c={x:n,y:r+s},p={x:i,y:c.y}),{separatorStart:c,separatorEnd:p}}function K8(t,e){let{width:n,height:r,options:i}=t,o=i.callout.margin+i.borderWidth/2;return e==="right"?n+o:e==="bottom"?r+o:-o}function X8(t,e,n){let{y:r,width:i,height:o,options:s}=t,c=s.callout.start,p=Z8(e,s.callout),h,v;return e==="left"||e==="right"?(h={x:n.x,y:r+Cl(o,c)},v={x:h.x+p,y:h.y}):(h={x:n.x+Cl(i,c),y:n.y},v={x:h.x,y:h.y+p}),{sideStart:h,sideEnd:v}}function Z8(t,e){let n=e.side;return t==="left"||t==="top"?-n:n}function J8(t,e){let n=e.position;return QI.includes(n)?n:t7(t,e)}function t7(t,e){let{x:n,y:r,x2:i,y2:o,width:s,height:c,pointX:p,pointY:h,centerX:v,centerY:P,rotation:x}=t,T={x:v,y:P},I=e.start,R=Cl(s,I),A=Cl(c,I),O=[n,n+R,n+R,i],N=[r+A,o,r,o],V=[];for(let G=0;G<4;G++){let X=Bc({x:O[G],y:N[G]},T,Qn(x));V.push({position:QI[G],distance:ns(X,{x:p,y:h})});}return V.sort((G,X)=>G.distance-X.distance)[0].position}function e7({x:t,y:e,width:n,height:r,options:i}){let o=i.borderWidth/2,s=$n(i.padding);return {x:t+s.left+o,y:e+s.top+o,width:n-s.left-s.right-i.borderWidth,height:r-s.top-s.bottom-i.borderWidth}}function n7(t,e,n){let{pointX:r,pointY:i}=t,o=e.margin,s=r,c=i;return n==="left"?s+=o:n==="right"?s-=o:n==="top"?c+=o:n==="bottom"&&(c-=o),t.inRange(s,c)}var E1=(t,e,n)=>({x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}),d1=(t,e,n)=>E1(e,n,Math.abs((t-e.y)/(n.y-e.y))).x,EI=(t,e,n)=>E1(e,n,Math.abs((t-e.x)/(n.x-e.x))).y,Nf=t=>t*t,r7=(t,e,{x:n,y:r,x2:i,y2:o},s)=>s==="y"?{start:Math.min(r,o),end:Math.max(r,o),value:e}:{start:Math.min(n,i),end:Math.max(n,i),value:t},_I=(t,e,n,r)=>(1-r)*(1-r)*t+2*(1-r)*r*e+r*r*n,p1=(t,e,n,r)=>({x:_I(t.x,e.x,n.x,r),y:_I(t.y,e.y,n.y,r)}),TI=(t,e,n,r)=>2*(1-r)*(e-t)+2*r*(n-e),wI=(t,e,n,r)=>-Math.atan2(TI(t.x,e.x,n.x,r),TI(t.y,e.y,n.y,r))+.5*Be,Nc=class extends br{inRange(e,n,r,i){let o=this.options.borderWidth/2;if(r!=="x"&&r!=="y"){let s={mouseX:e,mouseY:n},{path:c,ctx:p}=this;if(c){Sl(p,this.options);let{chart:v}=this.$context,P=e*v.currentDevicePixelRatio,x=n*v.currentDevicePixelRatio,T=p.isPointInStroke(c,P,x)||f1(this,s,i);return p.restore(),T}let h=Nf(o);return s7(this,s,h,i)||f1(this,s,i)}return i7(this,{mouseX:e,mouseY:n},r,{hBorderWidth:o,useFinalPosition:i})}getCenterPoint(e){return hd(this,e)}draw(e){let{x:n,y:r,x2:i,y2:o,cp:s,options:c}=this;if(e.save(),!Sl(e,c))return e.restore();md(e,c);let p=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2));if(c.curve&&s)return m7(e,this,s,p),e.restore();let{startOpts:h,endOpts:v,startAdjust:P,endAdjust:x}=KI(this),T=Math.atan2(o-r,i-n);e.translate(n,r),e.rotate(T),e.beginPath(),e.moveTo(0+P,0),e.lineTo(p-x,0),e.shadowColor=c.borderShadowColor,e.stroke(),h1(e,0,P,h),h1(e,p,-x,v),e.restore();}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,n){let r=k8(e,n),{x:i,y:o,x2:s,y2:c}=r,p=o7(r,e.chartArea),h=p?a7({x:i,y:o},{x:s,y:c},e.chartArea):{x:i,y:o,x2:s,y2:c,width:Math.abs(s-i),height:Math.abs(c-o)};if(h.centerX=(s+i)/2,h.centerY=(c+o)/2,h.initProperties=Lf(e,h,n),n.curve){let P={x:h.x,y:h.y},x={x:h.x2,y:h.y2};h.cp=h7(h,n,ns(P,x));}let v=l7(e,h,n.label);return v._visible=p,h.elements=[{type:"label",optionScope:"label",properties:v,initProperties:h.initProperties}],h}};Nc.id="lineAnnotation";var II={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};Nc.defaults={adjustScaleRange:true,arrowHeads:{display:false,end:Object.assign({},II),fill:false,length:12,start:Object.assign({},II),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:false,controlPoint:{y:"-50%"},display:true,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},Mc.defaults.callout),color:"#fff",content:null,display:false,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Nc.descriptors={arrowHeads:{start:{_fallback:true},end:{_fallback:true},_fallback:true}};Nc.defaultRoutes={borderColor:"color"};function i7(t,{mouseX:e,mouseY:n},r,{hBorderWidth:i,useFinalPosition:o}){let s=r7(e,n,t.getProps(["x","y","x2","y2"],o),r);return s.value>=s.start-i&&s.value<=s.end+i||f1(t,{mouseX:e,mouseY:n},o,r)}function o7({x:t,y:e,x2:n,y2:r},{top:i,right:o,bottom:s,left:c}){return !(t<c&&n<c||t>o&&n>o||e<i&&r<i||e>s&&r>s)}function kI({x:t,y:e},n,{top:r,right:i,bottom:o,left:s}){return t<s&&(e=EI(s,{x:t,y:e},n),t=s),t>i&&(e=EI(i,{x:t,y:e},n),t=i),e<r&&(t=d1(r,{x:t,y:e},n),e=r),e>o&&(t=d1(o,{x:t,y:e},n),e=o),{x:t,y:e}}function a7(t,e,n){let{x:r,y:i}=kI(t,e,n),{x:o,y:s}=kI(e,t,n);return {x:r,y:i,x2:o,y2:s,width:Math.abs(o-r),height:Math.abs(s-i)}}function s7(t,{mouseX:e,mouseY:n},r=Rc,i){let{x:o,y:s,x2:c,y2:p}=t.getProps(["x","y","x2","y2"],i),h=c-o,v=p-s,P=Nf(h)+Nf(v),x=P===0?-1:((e-o)*h+(n-s)*v)/P,T,I;return x<0?(T=o,I=s):x>1?(T=c,I=p):(T=o+x*h,I=s+x*v),Nf(e-T)+Nf(n-I)<=r}function f1(t,{mouseX:e,mouseY:n},r,i){let o=t.label;return o.options.display&&o.inRange(e,n,i,r)}function l7(t,e,n){let r=n.borderWidth,i=$n(n.padding),o=S1(t.ctx,n),s=o.width+i.width+r,c=o.height+i.height+r;return u7(e,n,{width:s,height:c,padding:i},t.chartArea)}function c7(t){let{x:e,y:n,x2:r,y2:i}=t,o=Math.atan2(i-n,r-e);return o>Be/2?o-Be:o<Be/-2?o+Be:o}function u7(t,e,n,r){let{width:i,height:o,padding:s}=n,{xAdjust:c,yAdjust:p}=e,h={x:t.x,y:t.y},v={x:t.x2,y:t.y2},P=e.rotation==="auto"?c7(t):Qn(e.rotation),x=d7(i,o,P),T=p7(t,e,{labelSize:x,padding:s},r),I=t.cp?p1(h,t.cp,v,T):E1(h,v,T),R={size:x.w,min:r.left,max:r.right,padding:s.left},A={size:x.h,min:r.top,max:r.bottom,padding:s.top},O=AI(I.x,R)+c,N=AI(I.y,A)+p;return {x:O-i/2,y:N-o/2,x2:O+i/2,y2:N+o/2,centerX:O,centerY:N,pointX:I.x,pointY:I.y,width:i,height:o,rotation:_c(P)}}function d7(t,e,n){let r=Math.cos(n),i=Math.sin(n);return {w:Math.abs(t*r)+Math.abs(e*i),h:Math.abs(t*i)+Math.abs(e*r)}}function p7(t,e,n,r){let i,o=f7(t,r);return e.position==="start"?i=DI({w:t.x2-t.x,h:t.y2-t.y},n,e,o):e.position==="end"?i=1-DI({w:t.x-t.x2,h:t.y-t.y2},n,e,o):i=b1(1,e.position),i}function DI(t,e,n,r){let{labelSize:i,padding:o}=e,s=t.w*r.dx,c=t.h*r.dy,p=s>0&&(i.w/2+o.left-r.x)/s,h=c>0&&(i.h/2+o.top-r.y)/c;return Iy(Math.max(p,h),0,.25)}function f7(t,e){let{x:n,x2:r,y:i,y2:o}=t,s=Math.min(i,o)-e.top,c=Math.min(n,r)-e.left,p=e.bottom-Math.max(i,o),h=e.right-Math.max(n,r);return {x:Math.min(c,h),y:Math.min(s,p),dx:c<=h?1:-1,dy:s<=p?1:-1}}function AI(t,e){let{size:n,min:r,max:i,padding:o}=e,s=n/2;return n>i-r?(i+r)/2:(r>=t-o-s&&(t=r+o+s),i<=t+o+s&&(t=i-o-s),t)}function KI(t){let e=t.options,n=e.arrowHeads&&e.arrowHeads.start,r=e.arrowHeads&&e.arrowHeads.end;return {startOpts:n,endOpts:r,startAdjust:OI(t,n),endAdjust:OI(t,r)}}function OI(t,e){if(!e||!e.display)return 0;let{length:n,width:r}=e,i=t.options.borderWidth/2,o={x:n,y:r+i};return Math.abs(d1(0,o,{x:0,y:i}))}function h1(t,e,n,r){if(!r||!r.display)return;let{length:i,width:o,fill:s,backgroundColor:c,borderColor:p}=r,h=Math.abs(e-i)+n;t.beginPath(),md(t,r),Sl(t,r),t.moveTo(h,-o),t.lineTo(e+n,0),t.lineTo(h,o),s===true?(t.fillStyle=c||p,t.closePath(),t.fill(),t.shadowColor="transparent"):t.shadowColor=r.borderShadowColor,t.stroke();}function h7(t,e,n){let{x:r,y:i,x2:o,y2:s,centerX:c,centerY:p}=t,h=Math.atan2(s-i,o-r),v=v1(e.controlPoint,0),P={x:c+Cl(n,v.x,false),y:p+Cl(n,v.y,false)};return Bc(P,{x:c,y:p},h)}function RI(t,{x:e,y:n},{angle:r,adjust:i},o){!o||!o.display||(t.save(),t.translate(e,n),t.rotate(r),h1(t,0,-i,o),t.restore());}function m7(t,e,n,r){let{x:i,y:o,x2:s,y2:c,options:p}=e,{startOpts:h,endOpts:v,startAdjust:P,endAdjust:x}=KI(e),T={x:i,y:o},I={x:s,y:c},R=wI(T,n,I,0),A=wI(T,n,I,1)-Be,O=p1(T,n,I,P/r),N=p1(T,n,I,1-x/r),V=new Path2D;t.beginPath(),V.moveTo(O.x,O.y),V.quadraticCurveTo(n.x,n.y,N.x,N.y),t.shadowColor=p.borderShadowColor,t.stroke(V),e.path=V,e.ctx=t,RI(t,O,{angle:R,adjust:P},h),RI(t,N,{angle:A,adjust:x},v);}var Lc=class extends br{inRange(e,n,r,i){let o=this.options.rotation,s=this.options.borderWidth;if(r!=="x"&&r!=="y")return g7({x:e,y:n},this.getProps(["width","height","centerX","centerY"],i),o,s);let{x:c,y:p,x2:h,y2:v}=this.getProps(["x","y","x2","y2"],i),P=s/2,x=r==="y"?{start:p,end:v}:{start:c,end:h},T=Bc({x:e,y:n},this.getCenterPoint(i),Qn(-o));return T[r]>=x.start-P-Rc&&T[r]<=x.end+P+Rc}getCenterPoint(e){return hd(this,e)}draw(e){let{width:n,height:r,centerX:i,centerY:o,options:s}=this;e.save(),C1(e,this.getCenterPoint(),s.rotation),md(e,this.options),e.beginPath(),e.fillStyle=s.backgroundColor;let c=Sl(e,s);e.ellipse(i,o,r/2,n/2,Be/2,0,2*Be),e.fill(),c&&(e.shadowColor=s.borderShadowColor,e.stroke()),e.restore();}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,n){return WI(e,n,true)}};Lc.id="ellipseAnnotation";Lc.defaults={adjustScaleRange:true,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:true,init:void 0,label:Object.assign({},Pl.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Lc.defaultRoutes={borderColor:"color",backgroundColor:"color"};Lc.descriptors={label:{_fallback:true}};function g7(t,e,n,r){let{width:i,height:o,centerX:s,centerY:c}=e,p=i/2,h=o/2;if(p<=0||h<=0)return false;let v=Qn(n||0),P=r/2||0,x=Math.cos(v),T=Math.sin(v),I=Math.pow(x*(t.x-s)+T*(t.y-c),2),R=Math.pow(T*(t.x-s)-x*(t.y-c),2);return I/Math.pow(p+P,2)+R/Math.pow(h+P,2)<=1.0001}var pd=class extends br{inRange(e,n,r,i){let{x:o,y:s,x2:c,y2:p,width:h}=this.getProps(["x","y","x2","y2","width"],i),v=this.options.borderWidth;if(r!=="x"&&r!=="y")return m8({x:e,y:n},this.getCenterPoint(i),h/2,v);let P=v/2,x=r==="y"?{start:s,end:p,value:n}:{start:o,end:c,value:e};return x.value>=x.start-P&&x.value<=x.end+P}getCenterPoint(e){return hd(this,e)}draw(e){let n=this.options,r=n.borderWidth;if(n.radius<.1)return;e.save(),e.fillStyle=n.backgroundColor,md(e,n);let i=Sl(e,n);x8(e,this,this.centerX,this.centerY),i&&!ky(n.pointStyle)&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore(),n.borderWidth=r;}resolveElementProperties(e,n){let r=HI(e,n);return r.initProperties=Lf(e,r,n,true),r}};pd.id="pointAnnotation";pd.defaults={adjustScaleRange:true,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:true,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};pd.defaultRoutes={borderColor:"color",backgroundColor:"color"};var fd=class extends br{inRange(e,n,r,i){if(r!=="x"&&r!=="y")return this.options.radius>=.1&&this.elements.length>1&&b7(this.elements,e,n,i);let o=Bc({x:e,y:n},this.getCenterPoint(i),Qn(-this.options.rotation)),s=this.elements.map(h=>r==="y"?h.bY:h.bX),c=Math.min(...s),p=Math.max(...s);return o[r]>=c&&o[r]<=p}getCenterPoint(e){return hd(this,e)}draw(e){let{elements:n,options:r}=this;e.save(),e.beginPath(),e.fillStyle=r.backgroundColor,md(e,r);let i=Sl(e,r),o=true;for(let s of n)o?(e.moveTo(s.x,s.y),o=false):e.lineTo(s.x,s.y);e.closePath(),e.fill(),i&&(e.shadowColor=r.borderShadowColor,e.stroke()),e.restore();}resolveElementProperties(e,n){let r=HI(e,n),{sides:i,rotation:o}=n,s=[],c=2*Be/i,p=o*lf;for(let h=0;h<i;h++,p+=c){let v=y7(r,n,p);v.initProperties=Lf(e,r,n),s.push(v);}return r.elements=s,r}};fd.id="polygonAnnotation";fd.defaults={adjustScaleRange:true,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:true,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};fd.defaultRoutes={borderColor:"color",backgroundColor:"color"};function y7({centerX:t,centerY:e},{radius:n,borderWidth:r},i){let o=r/2,s=Math.sin(i),c=Math.cos(i),p={x:t+s*n,y:e-c*n};return {type:"point",optionScope:"point",properties:{x:p.x,y:p.y,centerX:p.x,centerY:p.y,bX:t+s*(n+o),bY:e-c*(n+o)}}}function b7(t,e,n,r){let i=false,o=t[t.length-1].getProps(["bX","bY"],r);for(let s of t){let c=s.getProps(["bX","bY"],r);c.bY>n!=o.bY>n&&e<(o.bX-c.bX)*(n-c.bY)/(o.bY-c.bY)+c.bX&&(i=!i),o=c;}return i}var vl={box:Pl,ellipse:Lc,label:Mc,line:Nc,point:pd,polygon:fd};Object.keys(vl).forEach(t=>{ke.describe(`elements.${vl[t].id}`,{_fallback:"plugins.annotation.common"});});var v7={update:Object.assign},C7=x1.concat(wy),FI=(t,e)=>Te(e)?g1(t,e):t,m1=t=>t==="color"||t==="font";function _1(t="line"){return vl[t]?t:(console.warn(`Unknown annotation type: '${t}', defaulting to 'line'`),"line")}function S7(t,e,n,r){let i=x7(t,n.animations,r),o=e.annotations,s=T7(e.elements,o);for(let c=0;c<o.length;c++){let p=o[c],h=XI(s,c,p.type),v=p.setContext(_7(t,h,p)),P=h.resolveElementProperties(t,v);P.skip=P7(P),"elements"in P&&(E7(h,P.elements,v,i),delete P.elements),Fn(h.x)||Object.assign(h,P),Object.assign(h,P.initProperties),P.options=ZI(v),i.update(h,P);}}function P7(t){return isNaN(t.x)||isNaN(t.y)}function x7(t,e,n){return n==="reset"||n==="none"||n==="resize"?v7:new ad(t,e)}function E7(t,e,n,r){let i=t.elements||(t.elements=[]);i.length=e.length;for(let o=0;o<e.length;o++){let s=e[o],c=s.properties,p=XI(i,o,s.type,s.initProperties),h=n[s.optionScope].override(s);c.options=ZI(h),r.update(p,c);}}function XI(t,e,n,r){let i=vl[_1(n)],o=t[e];return (!o||!(o instanceof i))&&(o=t[e]=new i,Object.assign(o,r)),o}function ZI(t){let e=vl[_1(t.type)],n={};n.id=t.id,n.type=t.type,n.drawTime=t.drawTime,Object.assign(n,g1(t,e.defaults),g1(t,e.defaultRoutes));for(let r of C7)n[r]=t[r];return n}function g1(t,e){let n={};for(let r of Object.keys(e)){let i=e[r],o=t[r];m1(r)&&He(o)?n[r]=o.map(s=>FI(s,i)):n[r]=FI(o,i);}return n}function _7(t,e,n){return e.$context||(e.$context=Object.assign(Object.create(t.getContext()),{element:e,id:n.id,type:"annotation"}))}function T7(t,e){let n=e.length,r=t.length;if(r<n){let i=n-r;t.splice(r,0,...new Array(i));}else r>n&&t.splice(n,r-n);return t}var w7="2.2.1",bl=new Map,I7=x1.concat(wy),JI={id:"annotation",version:w7,beforeRegister(){g8("chart.js","3.7",bo.version);},afterRegister(){bo.register(vl);},afterUnregister(){bo.unregister(vl);},beforeInit(t){bl.set(t,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:false,moveListened:false,hooks:{},hooked:false,hovered:[]});},beforeUpdate(t,e,n){let r=bl.get(t),i=r.annotations=[],o=n.annotations;Te(o)?Object.keys(o).forEach(s=>{let c=o[s];Te(c)&&(c.id=s,i.push(c));}):He(o)&&i.push(...o),j8(i,t.scales);},afterDataLimits(t,e){let n=bl.get(t);G8(t,e.scale,n.annotations.filter(r=>r.display&&r.adjustScaleRange));},afterUpdate(t,e,n){let r=bl.get(t);N8(t,r,n),S7(t,r,n,e.mode),r.visibleElements=r.elements.filter(i=>!i.skip&&i.options.display),$8(t,r,n);},beforeDatasetsDraw(t,e,n){_y(t,"beforeDatasetsDraw",n.clip);},afterDatasetsDraw(t,e,n){_y(t,"afterDatasetsDraw",n.clip);},beforeDraw(t,e,n){_y(t,"beforeDraw",n.clip);},afterDraw(t,e,n){_y(t,"afterDraw",n.clip);},beforeEvent(t,e,n){let r=bl.get(t);L8(r,e.event,n)&&(e.changed=true);},afterDestroy(t){bl.delete(t);},_getState(t){return bl.get(t)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:true,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:false,label:{}}},descriptors:{_indexable:false,_scriptable:t=>!I7.includes(t)&&t!=="init",annotations:{_allKeys:false,_fallback:(t,e)=>`elements.${vl[_1(e.type)].id}`},interaction:{_fallback:true},common:{label:{_indexable:m1,_fallback:true},_indexable:m1}},additionalOptionScopes:[""]};function _y(t,e,n){let{ctx:r,chartArea:i}=t,o=bl.get(t);n&&fl(r,i);let s=k7(o.visibleElements,e).sort((c,p)=>c.element.options.z-p.element.options.z);for(let c of s)D7(r,i,o,c);n&&hl(r);}function k7(t,e){let n=[];for(let r of t)if(r.options.drawTime===e&&n.push({element:r,main:true}),r.elements&&r.elements.length)for(let i of r.elements)i.options.display&&i.options.drawTime===e&&n.push({element:i});return n}function D7(t,e,n,r){let i=r.element;r.main?(CI(n,i,"beforeDraw"),i.draw(t,e),CI(n,i,"afterDraw")):i.draw(t,e);}var w1=bo.version,A7=w1?(t,e)=>t.parse(e):(t,e)=>e;function O7(t,e){let n=Vi(e)?parseFloat(e):A7(t,e);return t.getPixelForValue(n)}var tk=t=>t&&t.right>t.left&&t.bottom>t.top;function ek(t,e,n){return e==="r"?t.createRadialGradient(n.xCenter,n.yCenter,0,n.xCenter,n.yCenter,n.drawingArea):e==="y"?t.createLinearGradient(0,n.bottom,0,n.top):t.createLinearGradient(n.left,0,n.right,0)}function nk(t,e){e.forEach(function(n){t.addColorStop(n.stop,n.color.rgbString());});}function rk(t,e,n){if(t.options.has(e.key)){let i=t.options.get(e.key).filter(o=>o.datasetIndex===n);if(i.length)return i[0]}}function ik(t,e){if(t.type==="radialLinear"){let o=t.getDistanceFromCenterForValue(e);return {pixel:o,stop:o/t.drawingArea}}let n=t.options.reverse,r=O7(t,e),i=t.getDecimalForPixel(r);return {pixel:r,stop:n?1-i:i}}var T1=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,gd=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function R7(t,e,n){let r=e.color.rgb,i=gd(r.r/255),o=gd(r.g/255),s=gd(r.b/255),c=n.color.rgb,p=gd(c.r/255),h=gd(c.g/255),v=gd(c.b/255);return wc({r:Math.round(T1(i+t*(p-i))*255),g:Math.round(T1(o+t*(h-o))*255),b:Math.round(T1(s+t*(v-s))*255),a:r.a+t*Math.abs(c.a-r.a)})}function F7(t,e,n,r){let i=rk(t,e,n);if(!i||!i.stopColors.length)return;let{stop:o}=ik(i.scale,r),s,c;for(let p of i.stopColors){if(p.stop===o)return p.color;p.stop<o?s=p:p.stop>o&&!c&&(c=p);}return c?R7(o,s,c):s}var ok=[{key:"backgroundColor",legendItemKey:"fillStyle"},{key:"borderColor",legendItemKey:"strokeStyle"}],M7=(t,e)=>e.labels&&e.labels.font&&Fn(e.labels.font.size)?e.labels.font.size:t.options.font.size;function N7(t,e,n,r,i){let o=rk(t,n,r.datasetIndex);if(!o||!o.stopColors.length)return;let s=ek(e,o.axis,i);nk(s,o.stopColors),r[n.legendItemKey]=s;}function L7(t,{boxWidth:e,boxHeight:n}){return {top:t.top,left:t.left,bottom:t.top+n,right:t.left+e,xCenter:t.left+e/2,yCenter:t.top+n/2,drawingArea:Math.max(e,n)/2}}function B7(t,e,n,r){let i=t.legend.legendHitBoxes[n.datasetIndex],o=L7(i,r);tk(o)&&ok.forEach(function(s){N7(e,t.ctx,s,n,o);});}function U7(t,e,n,r){for(let i of t.legend.legendItems)ok.forEach(function(o){let s=n.data[i.index],c=F7(e,o,r,s);c&&c.valid&&(i[o.legendItemKey]=c.rgbString());});}function $7(t,e){let n=t.legend,r=n.options,i=r.labels.boxHeight?r.labels.boxHeight:M7(t,r),o=r.labels.boxWidth,s=t.data.datasets;for(let c=0;c<s.length;c++){let p=n.legendItems[c];p.datasetIndex===c?B7(t,e,p,{boxWidth:o,boxHeight:i}):U7(t,e,s[c],c);}}var Dy=new Map,G7=w1?(t,e)=>t[e+"Scale"]:(t,e)=>t.controller["_"+e+"Scale"];function j7(t,e,n){for(let r of Object.keys(e)){let{pixel:i,stop:o}=ik(t,r);if(isFinite(i)&&isFinite(o)){let s=wc(e[r]);s&&s.valid&&n.push({stop:Math.max(0,Math.min(1,o)),color:s});}}n.sort((r,i)=>r.stop-i.stop);}function V7(t,e,n,r){e[n]=r,t.dataset&&(t.dataset.options?t.dataset.options[n]=r:t.dataset[n]=r);}function z7(t,e,n,r){let i=t.options.get(n);return i?e.hidden||(i=i.filter(o=>o.datasetIndex!==r),t.options.set(n,i)):(i=[],t.options.set(n,i)),i}function H7(t,e,n,r,i){let o=t.ctx,s=t.getDatasetMeta(i);if(!s.hidden)for(let[c,p]of Object.entries(n)){let{axis:h,colors:v}=p;if(!v)continue;let P=G7(s,h);if(!P){console.warn(`Scale not found for '${h}'-axis in datasets[${i}] of chart id ${t.id}, skipping.`);continue}let x=z7(e,s,c,i),T={datasetIndex:i,axis:h,scale:P,stopColors:[]};x.push(T);let I=ek(o,h,P);j7(P,v,T.stopColors),T.stopColors.length&&(nk(I,T.stopColors),V7(s,r,c,I));}}var ak={id:"gradient",beforeInit(t){let e={};e.options=new Map,Dy.set(t,e);},beforeDatasetsUpdate(t){let e=t.chartArea;if(!tk(e))return;let n=Dy.get(t),r=t.data.datasets;for(let i=0;i<r.length;i++){let o=r[i],s=o.gradient;s&&H7(t,n,s,o,i);}},afterUpdate(t){let e=Dy.get(t);t.legend&&t.legend.options.display!==false&&w1&&$7(t,e);},destroy(t){Dy.delete(t);}};var W7=[Oc,ld,ds,nI,rI,eI,mI,us,Go,tI,cs,JI,ak];bo.register(...W7);function Ay(t){let e=ve(),n=e==null?void 0:e.stigg,r=e==null?void 0:e.updatedAt,i=Bv.useCallback(()=>ce(null,null,function*(){if(!n||!n.isCustomerLoaded)return null;try{let p={currencyId:t.currencyId,timeRange:t.timeRange};return yield n.getCreditUsage(p)}catch(p){throw console.error(p),p}}),[n,t.currencyId,t.timeRange,r]),{data:o,error:s,isLoading:c}=co({func:i});return Bv.useMemo(()=>({creditUsage:o,isLoading:c,error:s}),[o,s,c])}var sk={id:"redrawBeforeFirstDrawPlugin",beforeDraw(t){t.$rendered||(t.$rendered=true,t.update("none"));}};var I1=(t,e=1)=>{let n=Math.round(e*255).toString(16).padStart(2,"0");return `${t}${n}`};var k1=t=>t.palette.text.secondary,D1=t=>t.palette.outlinedBorder,A1=t=>({family:t.typography.fontFamily,size:parseInt(t.typography.body.fontSize)});function O1(t){let e=["#4caf50","#2196f3","#ff5722","#ff9800","#e91e63","#3f51b5","#00bcd4","#81c784","#64b5f6","#ff8a65","#ffb74d","#f06292","#7986cb","#4dd0e1","#a5d6a7","#90caf9","#ffab91","#ffcc80","#f48fb1","#9fa8da","#80deea"];return e[t%e.length]}function Q7(t){let e=[],n=new Date;switch(t){case yi.LastDay:{let r=new Date(n);r.setHours(r.getHours()-23),r.setMinutes(0,0,0);for(let i=0;i<24;i++){let o=new Date(r);o.setHours(o.getHours()+i),e.push(o.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}));}break}case yi.LastWeek:{for(let r=6;r>=0;r--){let i=new Date(n);i.setDate(i.getDate()-r),e.push(i.toLocaleDateString("en-US",{month:"short",day:"2-digit"}));}break}case yi.LastYear:{for(let r=11;r>=0;r--){let i=new Date(n);i.setMonth(i.getMonth()-r),e.push(i.toLocaleDateString("en-US",{month:"short",year:"2-digit"}));}break}case yi.LastMonth:default:{for(let r=29;r>=0;r--){let i=new Date(n);i.setDate(i.getDate()-r),e.push(i.toLocaleDateString("en-US",{month:"short",day:"2-digit"}));}break}}return e}function K7(t,e){let n=new Date(t);switch(n.setMinutes(0,0,0),e){case yi.LastDay:return n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});case yi.LastYear:return t.toLocaleDateString("en-US",{month:"short",year:"2-digit"});case yi.LastWeek:case yi.LastMonth:default:return t.toLocaleDateString("en-US",{month:"short",day:"2-digit"})}}function X7(t,e){return {responsive:true,maintainAspectRatio:false,interaction:{mode:"point",intersect:true},elements:{bar:{borderRadius:4,borderSkipped:"bottom"}},plugins:{legend:{display:false},tooltip:{enabled:false,external:e},datalabels:{display:false}},scales:{x:{type:"category",stacked:true,ticks:{color:k1(t),font:A1(t),maxRotation:45,maxTicksLimit:15},grid:{color:D1(t),drawOnChartArea:false,drawTicks:false}},y:{type:"linear",stacked:true,beginAtZero:true,ticks:{color:k1(t),font:A1(t),callback:n=>gr(Number(n))},grid:{color:I1(D1(t),.5),drawOnChartArea:true,drawTicks:false,borderDash:[5,5]}}}}}function lk(t,e,n,r){let i=Q7(r);if(!t||!t.series||t.series.length===0)return {data:null,options:null};let o=t.series.map((p,h)=>{let v=p.featureName,P=new Map;p.points.forEach(I=>{let R=K7(new Date(I.timestamp),r),A=P.get(R)||0;P.set(R,A+I.value);});let x=i.map(I=>P.get(I)||0),T=O1(h);return {label:v,data:x,backgroundColor:I1(T,.8),borderColor:T,borderWidth:1}}).reverse(),s={labels:i,datasets:o},c=X7(e,n);return {data:s,options:c}}var r9=300;function uk(t,e){let n=e.dataPoints[0],r=n.parsed.y,i=t.scales.y,o=r/i.max*(i.bottom-i.top),s=e.caretY+o/2,c=t.getDatasetMeta(n.datasetIndex).data[n.dataIndex],p=c.x-c.width/2,h=t.canvas.offsetTop+s,v=t.canvas.offsetLeft+p;return {top:h,left:v}}function i9(t,e){let n=t.canvas.offsetTop+e.caretY,r=t.canvas.offsetLeft+e.caretX;return {top:n,left:r}}function dk(t,e=i9){let[n,r]=Bv.useState(0),[i,o]=Bv.useState(0),[s,c]=Bv.useState(false),[p,h]=Bv.useState(),v=Bv.useCallback(x=>{let{chart:T,tooltip:I}=x;if(I.opacity===0){c(false);return}let{top:R,left:A}=e(T,I);o(A),r(R),h(t(I)),c(true);},[t,e]);return {tooltipInfo:{positionTop:n,positionLeft:i,isOpen:s,payload:p},tooltipHandler:v}}var o9=Q(material.Box)`
|
|
5648
|
+
`):t}function bU(t,e){let{element:n,datasetIndex:r,index:i}=e,o=t.getDatasetMeta(r).controller,{label:s,value:c}=o.getLabelAndValue(i);return {chart:t,label:s,parsed:o.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:c,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Tw(t,e){let n=t.chart.ctx,{body:r,footer:i,title:o}=t,{boxWidth:s,boxHeight:c}=e,p=Sn(e.bodyFont),h=Sn(e.titleFont),v=Sn(e.footerFont),P=o.length,x=i.length,T=r.length,I=$n(e.padding),R=I.height,A=0,O=r.reduce((G,X)=>G+X.before.length+X.lines.length+X.after.length,0);if(O+=t.beforeBody.length+t.afterBody.length,P&&(R+=P*h.lineHeight+(P-1)*e.titleSpacing+e.titleMarginBottom),O){let G=e.displayColors?Math.max(c,p.lineHeight):p.lineHeight;R+=T*G+(O-T)*p.lineHeight+(O-1)*e.bodySpacing;}x&&(R+=e.footerMarginTop+x*v.lineHeight+(x-1)*e.footerSpacing);let N=0,V=function(G){A=Math.max(A,n.measureText(G).width+N);};return n.save(),n.font=h.string,tn(t.title,V),n.font=p.string,tn(t.beforeBody.concat(t.afterBody),V),N=e.displayColors?s+2+e.boxPadding:0,tn(r,G=>{tn(G.before,V),tn(G.lines,V),tn(G.after,V);}),N=0,n.font=v.string,tn(t.footer,V),n.restore(),A+=I.width,{width:A,height:R}}function vU(t,e){let{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function CU(t,e,n,r){let{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(t==="left"&&i+o+s>e.width||t==="right"&&i-o-s<0)return true}function SU(t,e,n,r){let{x:i,width:o}=n,{width:s,chartArea:{left:c,right:p}}=t,h="center";return r==="center"?h=i<=(c+p)/2?"left":"right":i<=o/2?h="left":i>=s-o/2&&(h="right"),CU(h,t,e,n)&&(h="center"),h}function ww(t,e,n){let r=n.yAlign||e.yAlign||vU(t,n);return {xAlign:n.xAlign||e.xAlign||SU(t,e,n,r),yAlign:r}}function PU(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function xU(t,e,n){let{y:r,height:i}=t;return e==="top"?r+=n:e==="bottom"?r-=i+n:r-=i/2,r}function Iw(t,e,n,r){let{caretSize:i,caretPadding:o,cornerRadius:s}=t,{xAlign:c,yAlign:p}=n,h=i+o,{topLeft:v,topRight:P,bottomLeft:x,bottomRight:T}=$o(s),I=PU(e,c),R=xU(e,p,h);return p==="center"?c==="left"?I+=h:c==="right"&&(I-=h):c==="left"?I-=Math.max(v,x)+i:c==="right"&&(I+=Math.max(P,T)+i),{x:Nr(I,0,r.width-e.width),y:Nr(R,0,r.height-e.height)}}function sy(t,e,n){let r=$n(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function kw(t){return va([],ls(t))}function EU(t,e,n){return ba(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Dw(t,e){let n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}var Af=class extends br{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0;}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0;}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new ad(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=EU(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){let{callbacks:r}=n,i=r.beforeTitle.apply(this,[e]),o=r.title.apply(this,[e]),s=r.afterTitle.apply(this,[e]),c=[];return c=va(c,ls(i)),c=va(c,ls(o)),c=va(c,ls(s)),c}getBeforeBody(e,n){return kw(n.callbacks.beforeBody.apply(this,[e]))}getBody(e,n){let{callbacks:r}=n,i=[];return tn(e,o=>{let s={before:[],lines:[],after:[]},c=Dw(r,o);va(s.before,ls(c.beforeLabel.call(this,o))),va(s.lines,c.label.call(this,o)),va(s.after,ls(c.afterLabel.call(this,o))),i.push(s);}),i}getAfterBody(e,n){return kw(n.callbacks.afterBody.apply(this,[e]))}getFooter(e,n){let{callbacks:r}=n,i=r.beforeFooter.apply(this,[e]),o=r.footer.apply(this,[e]),s=r.afterFooter.apply(this,[e]),c=[];return c=va(c,ls(i)),c=va(c,ls(o)),c=va(c,ls(s)),c}_createItems(e){let n=this._active,r=this.chart.data,i=[],o=[],s=[],c=[],p,h;for(p=0,h=n.length;p<h;++p)c.push(bU(this.chart,n[p]));return e.filter&&(c=c.filter((v,P,x)=>e.filter(v,P,x,r))),e.itemSort&&(c=c.sort((v,P)=>e.itemSort(v,P,r))),tn(c,v=>{let P=Dw(e.callbacks,v);i.push(P.labelColor.call(this,v)),o.push(P.labelPointStyle.call(this,v)),s.push(P.labelTextColor.call(this,v));}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=c,c}update(e,n){let r=this.options.setContext(this.getContext()),i=this._active,o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else {let c=Pf[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);let p=this._size=Tw(this,r),h=Object.assign({},c,p),v=ww(this.chart,r,h),P=Iw(r,h,v,this.chart);this.xAlign=v.xAlign,this.yAlign=v.yAlign,o={opacity:1,x:P.x,y:P.y,width:p.width,height:p.height,caretX:c.x,caretY:c.y};}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n});}drawCaret(e,n,r,i){let o=this.getCaretPosition(e,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3);}getCaretPosition(e,n,r){let{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:c}=r,{topLeft:p,topRight:h,bottomLeft:v,bottomRight:P}=$o(c),{x,y:T}=e,{width:I,height:R}=n,A,O,N,V,G,X;return o==="center"?(G=T+R/2,i==="left"?(A=x,O=A-s,V=G+s,X=G-s):(A=x+I,O=A+s,V=G-s,X=G+s),N=A):(i==="left"?O=x+Math.max(p,v)+s:i==="right"?O=x+I-Math.max(h,P)-s:O=this.caretX,o==="top"?(V=T,G=V-s,A=O-s,N=O+s):(V=T+R,G=V+s,A=O+s,N=O-s),X=V),{x1:A,x2:O,x3:N,y1:V,y2:G,y3:X}}drawTitle(e,n,r){let i=this.title,o=i.length,s,c,p;if(o){let h=ml(r.rtl,this.x,this.width);for(e.x=sy(this,r.titleAlign,r),n.textAlign=h.textAlign(r.titleAlign),n.textBaseline="middle",s=Sn(r.titleFont),c=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,p=0;p<o;++p)n.fillText(i[p],h.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+c,p+1===o&&(e.y+=r.titleMarginBottom-c);}}_drawColorBox(e,n,r,i,o){let s=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:p,boxWidth:h,boxPadding:v}=o,P=Sn(o.bodyFont),x=sy(this,"left",o),T=i.x(x),I=p<P.lineHeight?(P.lineHeight-p)/2:0,R=n.y+I;if(o.usePointStyle){let A={radius:Math.min(h,p)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},O=i.leftForLtr(T,h)+h/2,N=R+p/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,pf(e,A,O,N),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,pf(e,A,O,N);}else {e.lineWidth=Te(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;let A=i.leftForLtr(T,h-v),O=i.leftForLtr(i.xPlus(T,1),h-v-2),N=$o(s.borderRadius);Object.values(N).some(V=>V!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,os(e,{x:A,y:R,w:h,h:p,radius:N}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),os(e,{x:O,y:R+1,w:h-2,h:p-2,radius:N}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(A,R,h,p),e.strokeRect(A,R,h,p),e.fillStyle=s.backgroundColor,e.fillRect(O,R+1,h-2,p-2));}e.fillStyle=this.labelTextColors[r];}drawBody(e,n,r){let{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:c,boxHeight:p,boxWidth:h,boxPadding:v}=r,P=Sn(r.bodyFont),x=P.lineHeight,T=0,I=ml(r.rtl,this.x,this.width),R=function(U){n.fillText(U,I.x(e.x+T),e.y+x/2),e.y+=x+o;},A=I.textAlign(s),O,N,V,G,X,nt,st;for(n.textAlign=s,n.textBaseline="middle",n.font=P.string,e.x=sy(this,A,r),n.fillStyle=r.bodyColor,tn(this.beforeBody,R),T=c&&A!=="right"?s==="center"?h/2+v:h+2+v:0,G=0,nt=i.length;G<nt;++G){for(O=i[G],N=this.labelTextColors[G],n.fillStyle=N,tn(O.before,R),V=O.lines,c&&V.length&&(this._drawColorBox(n,e,G,I,r),x=Math.max(P.lineHeight,p)),X=0,st=V.length;X<st;++X)R(V[X]),x=P.lineHeight;tn(O.after,R);}T=0,x=P.lineHeight,tn(this.afterBody,R),e.y-=o;}drawFooter(e,n,r){let i=this.footer,o=i.length,s,c;if(o){let p=ml(r.rtl,this.x,this.width);for(e.x=sy(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=p.textAlign(r.footerAlign),n.textBaseline="middle",s=Sn(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,c=0;c<o;++c)n.fillText(i[c],p.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+r.footerSpacing;}}drawBackground(e,n,r,i){let{xAlign:o,yAlign:s}=this,{x:c,y:p}=e,{width:h,height:v}=r,{topLeft:P,topRight:x,bottomLeft:T,bottomRight:I}=$o(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(c+P,p),s==="top"&&this.drawCaret(e,n,r,i),n.lineTo(c+h-x,p),n.quadraticCurveTo(c+h,p,c+h,p+x),s==="center"&&o==="right"&&this.drawCaret(e,n,r,i),n.lineTo(c+h,p+v-I),n.quadraticCurveTo(c+h,p+v,c+h-I,p+v),s==="bottom"&&this.drawCaret(e,n,r,i),n.lineTo(c+T,p+v),n.quadraticCurveTo(c,p+v,c,p+v-T),s==="center"&&o==="left"&&this.drawCaret(e,n,r,i),n.lineTo(c,p+P),n.quadraticCurveTo(c,p,c+P,p),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke();}_updateAnimationTarget(e){let n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){let s=Pf[e.position].call(this,this._active,this._eventPosition);if(!s)return;let c=this._size=Tw(this,e),p=Object.assign({},s,this._size),h=ww(n,e,p),v=Iw(e,p,h,n);(i._to!==v.x||o._to!==v.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=c.width,this.height=c.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,v));}}_willRender(){return !!this.opacity}draw(e){let n=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(n);let i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let s=$n(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=r,this.drawBackground(o,e,i,n),ty(e,n.textDirection),o.y+=s.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),ey(e,n.textDirection),e.restore());}getActiveElements(){return this._active||[]}setActiveElements(e,n){let r=this._active,i=e.map(({datasetIndex:c,index:p})=>{let h=this.chart.getDatasetMeta(c);if(!h)throw new Error("Cannot find a dataset at index "+c);return {datasetIndex:c,element:h.data[p],index:p}}),o=!rd(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=true,this.update(true));}handleEvent(e,n,r=true){if(n&&this._ignoreReplayEvents)return false;this._ignoreReplayEvents=false;let i=this.options,o=this._active||[],s=this._getActiveElements(e,o,n,r),c=this._positionChanged(s,e),p=n||!rd(s,o)||c;return p&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(true,n))),p}_getActiveElements(e,n,r,i){let o=this.options;if(e.type==="mouseout")return [];if(!i)return n;let s=this.chart.getElementsAtEventForMode(e,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(e,n){let{caretX:r,caretY:i,options:o}=this,s=Pf[o.position].call(this,e,n);return s!==false&&(r!==s.x||i!==s.y)}};Af.positioners=Pf;var iI={id:"tooltip",_element:Af,positioners:Pf,afterInit(t,e,n){n&&(t.tooltip=new Af({chart:t,options:n}));},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n);},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n);},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",n)===false)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n);}},afterEvent(t,e){if(t.tooltip){let n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=true);}},defaults:{enabled:true,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:true,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Bo,title(t){if(t.length>0){let e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return ""},afterTitle:Bo,beforeBody:Bo,beforeLabel:Bo,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");let n=t.formattedValue;return Le(n)||(e+=n),e},labelColor(t){let n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return {borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){let n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return {pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Bo,afterBody:Bo,beforeFooter:Bo,footer:Bo,afterFooter:Bo}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:false,callbacks:{_scriptable:false,_indexable:false},animation:{_fallback:false},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};var _U=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function TU(t,e,n,r){let i=t.indexOf(e);if(i===-1)return _U(t,e,n,r);let o=t.lastIndexOf(e);return i!==o?n:i}var wU=(t,e)=>t===null?null:Nr(Math.round(t),0,e),Oc=class extends Ac{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[];}init(e){let n=this._addedLabels;if(n.length){let r=this.getLabels();for(let{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[];}super.init(e);}parse(e,n){if(Le(e))return null;let r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:TU(r,e,me(n,e),this._addedLabels),wU(n,r.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:r,max:i}=this.getMinMax(true);this.options.bounds==="ticks"&&(e||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i;}buildTicks(){let e=this.min,n=this.max,r=this.options.offset,i=[],o=this.getLabels();o=e===0&&n===o.length-1?o:o.slice(e,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=e;s<=n;s++)i.push({value:s});return i}getLabelForValue(e){let n=this.getLabels();return e>=0&&e<n.length?n[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels);}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};Oc.id="category";Oc.defaults={ticks:{callback:Oc.prototype.getLabelForValue}};function IU(t,e){let n=[],{bounds:i,step:o,min:s,max:c,precision:p,count:h,maxTicks:v,maxDigits:P,includeBounds:x}=t,T=o||1,I=v-1,{min:R,max:A}=e,O=!Le(s),N=!Le(c),V=!Le(h),G=(A-R)/(P+1),X=Fg((A-R)/I/T)*T,nt,st,U,j;if(X<1e-14&&!O&&!N)return [{value:R},{value:A}];j=Math.ceil(A/X)-Math.floor(R/X),j>I&&(X=Fg(j*X/I/T)*T),Le(p)||(nt=Math.pow(10,p),X=Math.ceil(X*nt)/nt),i==="ticks"?(st=Math.floor(R/X)*X,U=Math.ceil(A/X)*X):(st=R,U=A),O&&N&&o&&m0((c-s)/o,X/1e3)?(j=Math.round(Math.min((c-s)/X,v)),X=(c-s)/j,st=s,U=c):V?(st=O?s:st,U=N?c:U,j=h-1,X=(U-st)/j):(j=(U-st)/X,Ec(j,Math.round(j),X/1e3)?j=Math.round(j):j=Math.ceil(j));let ut=Math.max(Ng(X),Ng(st));nt=Math.pow(10,Le(p)?ut:p),st=Math.round(st*nt)/nt,U=Math.round(U*nt)/nt;let Y=0;for(O&&(x&&st!==s?(n.push({value:s}),st<s&&Y++,Ec(Math.round((st+Y*X)*nt)/nt,s,Aw(s,G,t))&&Y++):st<s&&Y++);Y<j;++Y)n.push({value:Math.round((st+Y*X)*nt)/nt});return N&&x&&U!==c?n.length&&Ec(n[n.length-1].value,c,Aw(c,G,t))?n[n.length-1].value=c:n.push({value:c}):(!N||U===c)&&n.push({value:U}),n}function Aw(t,e,{horizontal:n,minRotation:r}){let i=Qn(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/o,s)}var sd=class extends Ac{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0;}parse(e,n){return Le(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds(),{min:i,max:o}=this,s=p=>i=n?i:p,c=p=>o=r?o:p;if(e){let p=go(i),h=go(o);p<0&&h<0?c(0):p>0&&h>0&&s(0);}if(i===o){let p=1;(o>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(p=Math.abs(o*.05)),c(o+p),e||s(i-p);}this.min=i,this.max=o;}getTickLimit(){let e=this.options.ticks,{maxTicksLimit:n,stepSize:r}=e,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,n=e.ticks,r=this.getTickLimit();r=Math.max(2,r);let i={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==false},o=this._range||this,s=IU(i,o);return e.bounds==="ticks"&&Mg(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let e=this.ticks,n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){let i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i;}this._startValue=n,this._endValue=r,this._valueRange=r-n;}getLabelForValue(e){return Ic(e,this.chart.options.locale,this.options.ticks.format)}},ld=class extends sd{determineDataLimits(){let{min:e,max:n}=this.getMinMax(true);this.min=Mn(e)?e:0,this.max=Mn(n)?n:1,this.handleTickRangeOptions();}computeTickLimit(){let e=this.isHorizontal(),n=e?this.width:this.height,r=Qn(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}};ld.id="linear";ld.defaults={ticks:{callback:vy.formatters.numeric}};function Ow(t){return t/Math.pow(10,Math.floor(Ei(t)))===1}function kU(t,e){let n=Math.floor(Ei(e.max)),r=Math.ceil(e.max/Math.pow(10,n)),i=[],o=xi(t.min,Math.pow(10,Math.floor(Ei(e.min)))),s=Math.floor(Ei(o)),c=Math.floor(o/Math.pow(10,s)),p=s<0?Math.pow(10,Math.abs(s)):1;do i.push({value:o,major:Ow(o)}),++c,c===10&&(c=1,++s,p=s>=0?1:p),o=Math.round(c*Math.pow(10,s)*p)/p;while(s<n||s===n&&c<r);let h=xi(t.max,o);return i.push({value:h,major:Ow(o)}),i}var yy=class extends Ac{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0;}parse(e,n){let r=sd.prototype.parse.apply(this,[e,n]);if(r===0){this._zero=true;return}return Mn(r)&&r>0?r:null}determineDataLimits(){let{min:e,max:n}=this.getMinMax(true);this.min=Mn(e)?Math.max(0,e):null,this.max=Mn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=true),this.handleTickRangeOptions();}handleTickRangeOptions(){let{minDefined:e,maxDefined:n}=this.getUserBounds(),r=this.min,i=this.max,o=p=>r=e?r:p,s=p=>i=n?i:p,c=(p,h)=>Math.pow(10,Math.floor(Ei(p))+h);r===i&&(r<=0?(o(1),s(10)):(o(c(r,-1)),s(c(i,1)))),r<=0&&o(c(i,-1)),i<=0&&s(c(r,1)),this._zero&&this.min!==this._suggestedMin&&r===c(this.min,0)&&o(c(r,-1)),this.min=r,this.max=i;}buildTicks(){let e=this.options,n={min:this._userMin,max:this._userMax},r=kU(n,this);return e.bounds==="ticks"&&Mg(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(e){return e===void 0?"0":Ic(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=Ei(e),this._valueRange=Ei(this.max)-Ei(e);}getPixelForValue(e){return (e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Ei(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}};yy.id="logarithmic";yy.defaults={ticks:{callback:vy.formatters.logarithmic,major:{enabled:true}}};function o1(t){let e=t.ticks;if(e.display&&t.display){let n=$n(e.backdropPadding);return me(e.font&&e.font.size,ke.font.size)+n.height}return 0}function DU(t,e,n){return n=He(n)?n:[n],{w:T0(t,e.string,n),h:n.length*e.lineHeight}}function Rw(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:t<r||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function AU(t){let e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],i=[],o=t._pointLabels.length,s=t.options.pointLabels,c=s.centerPointLabels?Be/o:0;for(let p=0;p<o;p++){let h=s.setContext(t.getPointLabelContext(p));i[p]=h.padding;let v=t.getPointPosition(p,t.drawingArea+i[p],c),P=Sn(h.font),x=DU(t.ctx,P,t._pointLabels[p]);r[p]=x;let T=ai(t.getIndexAngle(p)+c),I=Math.round(_c(T)),R=Rw(I,v.x,x.w,0,180),A=Rw(I,v.y,x.h,90,270);OU(n,e,T,R,A);}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=RU(t,r,i);}function OU(t,e,n,r,i){let o=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n)),c=0,p=0;r.start<e.l?(c=(e.l-r.start)/o,t.l=Math.min(t.l,e.l-c)):r.end>e.r&&(c=(r.end-e.r)/o,t.r=Math.max(t.r,e.r+c)),i.start<e.t?(p=(e.t-i.start)/s,t.t=Math.min(t.t,e.t-p)):i.end>e.b&&(p=(i.end-e.b)/s,t.b=Math.max(t.b,e.b+p));}function RU(t,e,n){let r=[],i=t._pointLabels.length,o=t.options,s=o1(o)/2,c=t.drawingArea,p=o.pointLabels.centerPointLabels?Be/i:0;for(let h=0;h<i;h++){let v=t.getPointPosition(h,c+s+n[h],p),P=Math.round(_c(ai(v.angle+bn))),x=e[h],T=NU(v.y,x.h,P),I=FU(P),R=MU(v.x,x.w,I);r.push({x:v.x,y:T,textAlign:I,left:R,top:T,right:R+x.w,bottom:T+x.h});}return r}function FU(t){return t===0||t===180?"center":t<180?"left":"right"}function MU(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function NU(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function LU(t,e){let{ctx:n,options:{pointLabels:r}}=t;for(let i=e-1;i>=0;i--){let o=r.setContext(t.getPointLabelContext(i)),s=Sn(o.font),{x:c,y:p,textAlign:h,left:v,top:P,right:x,bottom:T}=t._pointLabelItems[i],{backdropColor:I}=o;if(!Le(I)){let R=$o(o.borderRadius),A=$n(o.backdropPadding);n.fillStyle=I;let O=v-A.left,N=P-A.top,V=x-v+A.width,G=T-P+A.height;Object.values(R).some(X=>X!==0)?(n.beginPath(),os(n,{x:O,y:N,w:V,h:G,radius:R}),n.fill()):n.fillRect(O,N,V,G);}is(n,t._pointLabels[i],c,p+s.lineHeight/2,s,{color:o.color,textAlign:h,textBaseline:"middle"});}}function oI(t,e,n,r){let{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,rn);else {let o=t.getPointPosition(0,e);i.moveTo(o.x,o.y);for(let s=1;s<r;s++)o=t.getPointPosition(s,e),i.lineTo(o.x,o.y);}}function BU(t,e,n,r){let i=t.ctx,o=e.circular,{color:s,lineWidth:c}=e;!o&&!r||!s||!c||n<0||(i.save(),i.strokeStyle=s,i.lineWidth=c,i.setLineDash(e.borderDash),i.lineDashOffset=e.borderDashOffset,i.beginPath(),oI(t,n,o,r),i.closePath(),i.stroke(),i.restore());}function UU(t,e,n){return ba(t,{label:n,index:e,type:"pointLabel"})}var cd=class extends sd{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[];}setDimensions(){let e=this._padding=$n(o1(this.options)/2),n=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(n,r)/2);}determineDataLimits(){let{min:e,max:n}=this.getMinMax(false);this.min=Mn(e)&&!isNaN(e)?e:0,this.max=Mn(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions();}computeTickLimit(){return Math.ceil(this.drawingArea/o1(this.options))}generateTickLabels(e){sd.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,r)=>{let i=Qe(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r));}fit(){let e=this.options;e.display&&e.pointLabels.display?AU(this):this.setCenterPoint(0,0,0,0);}setCenterPoint(e,n,r,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,i));}getIndexAngle(e){let n=rn/(this._pointLabels.length||1),r=this.options.startAngle||0;return ai(e*n+Qn(r))}getDistanceFromCenterForValue(e){if(Le(e))return NaN;let n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(Le(e))return NaN;let n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){let n=this._pointLabels||[];if(e>=0&&e<n.length){let r=n[e];return UU(this.getContext(),e,r)}}getPointPosition(e,n,r=0){let i=this.getIndexAngle(e)-bn+r;return {x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:n,top:r,right:i,bottom:o}=this._pointLabelItems[e];return {left:n,top:r,right:i,bottom:o}}drawBackground(){let{backgroundColor:e,grid:{circular:n}}=this.options;if(e){let r=this.ctx;r.save(),r.beginPath(),oI(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore();}}drawGrid(){let e=this.ctx,n=this.options,{angleLines:r,grid:i}=n,o=this._pointLabels.length,s,c,p;if(n.pointLabels.display&&LU(this,o),i.display&&this.ticks.forEach((h,v)=>{if(v!==0){c=this.getDistanceFromCenterForValue(h.value);let P=i.setContext(this.getContext(v-1));BU(this,P,c,o);}}),r.display){for(e.save(),s=o-1;s>=0;s--){let h=r.setContext(this.getPointLabelContext(s)),{color:v,lineWidth:P}=h;!P||!v||(e.lineWidth=P,e.strokeStyle=v,e.setLineDash(h.borderDash),e.lineDashOffset=h.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),p=this.getPointPosition(s,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(p.x,p.y),e.stroke());}e.restore();}}drawBorder(){}drawLabels(){let e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;let i=this.getIndexAngle(0),o,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,p)=>{if(p===0&&!n.reverse)return;let h=r.setContext(this.getContext(p)),v=Sn(h.font);if(o=this.getDistanceFromCenterForValue(this.ticks[p].value),h.showLabelBackdrop){e.font=v.string,s=e.measureText(c.label).width,e.fillStyle=h.backdropColor;let P=$n(h.backdropPadding);e.fillRect(-s/2-P.left,-o-v.size/2-P.top,s+P.width,v.size+P.height);}is(e,c.label,0,-o,v,{color:h.color});}),e.restore();}drawTitle(){}};cd.id="radialLinear";cd.defaults={display:true,animate:true,position:"chartArea",angleLines:{display:true,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:false},startAngle:0,ticks:{showLabelBackdrop:true,callback:vy.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:true,font:{size:10},callback(t){return t},padding:5,centerPointLabels:false}};cd.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};cd.descriptors={angleLines:{_fallback:"grid"}};var Cy={millisecond:{common:true,size:1,steps:1e3},second:{common:true,size:1e3,steps:60},minute:{common:true,size:6e4,steps:60},hour:{common:true,size:36e5,steps:24},day:{common:true,size:864e5,steps:30},week:{common:false,size:6048e5,steps:4},month:{common:true,size:2628e6,steps:12},quarter:{common:false,size:7884e6,steps:4},year:{common:true,size:3154e7}},_i=Object.keys(Cy);function $U(t,e){return t-e}function Fw(t,e){if(Le(e))return null;let n=t._adapter,{parser:r,round:i,isoWeekday:o}=t._parseOpts,s=e;return typeof r=="function"&&(s=r(s)),Mn(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Vi(o)||o===true)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function Mw(t,e,n,r){let i=_i.length;for(let o=_i.indexOf(t);o<i-1;++o){let s=Cy[_i[o]],c=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(c*s.size))<=r)return _i[o]}return _i[i-1]}function GU(t,e,n,r,i){for(let o=_i.length-1;o>=_i.indexOf(n);o--){let s=_i[o];if(Cy[s].common&&t._adapter.diff(i,r,s)>=e-1)return s}return _i[n?_i.indexOf(n):0]}function jU(t){for(let e=_i.indexOf(t)+1,n=_i.length;e<n;++e)if(Cy[_i[e]].common)return _i[e]}function Nw(t,e,n){if(!n)t[e]=true;else if(n.length){let{lo:r,hi:i}=cf(n,e),o=n[r]>=e?n[r]:n[i];t[o]=true;}}function VU(t,e,n,r){let i=t._adapter,o=+i.startOf(e[0].value,r),s=e[e.length-1].value,c,p;for(c=o;c<=s;c=+i.add(c,1,r))p=n[c],p>=0&&(e[p].major=true);return e}function Lw(t,e,n){let r=[],i={},o=e.length,s,c;for(s=0;s<o;++s)c=e[s],i[c]=s,r.push({value:c,major:false});return o===0||!n?r:VU(t,r,i,n)}var ud=class extends Ac{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=false,this._parseOpts=void 0;}init(e,n){let r=e.time||(e.time={}),i=this._adapter=new z6._date(e.adapters.date);i.init(n),xc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized;}parse(e,n){return e===void 0?null:Fw(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]};}determineDataLimits(){let e=this.options,n=this._adapter,r=e.time.unit||"day",{min:i,max:o,minDefined:s,maxDefined:c}=this.getUserBounds();function p(h){!s&&!isNaN(h.min)&&(i=Math.min(i,h.min)),!c&&!isNaN(h.max)&&(o=Math.max(o,h.max));}(!s||!c)&&(p(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&p(this.getMinMax(false))),i=Mn(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Mn(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o);}_getLabelBounds(){let e=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){let e=this.options,n=e.time,r=e.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);let o=this.min,s=this.max,c=b0(i,o,s);return this._unit=n.unit||(r.autoSkip?Mw(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):GU(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:jU(this._unit),this.initOffsets(i),e.reverse&&c.reverse(),Lw(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value));}initOffsets(e){let n=0,r=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?r=o:r=(o-this.getDecimalForValue(e[e.length-2]))/2);let s=e.length<3?.5:.25;n=Nr(n,0,s),r=Nr(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)};}_generate(){let e=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||Mw(o.minUnit,n,r,this._getLabelCapacity(n)),c=me(o.stepSize,1),p=s==="week"?o.isoWeekday:false,h=Vi(p)||p===true,v={},P=n,x,T;if(h&&(P=+e.startOf(P,"isoWeek",p)),P=+e.startOf(P,h?"day":s),e.diff(r,n,s)>1e5*c)throw new Error(n+" and "+r+" are too far apart with stepSize of "+c+" "+s);let I=i.ticks.source==="data"&&this.getDataTimestamps();for(x=P,T=0;x<r;x=+e.add(x,c,s),T++)Nw(v,x,I);return (x===r||i.bounds==="ticks"||T===1)&&Nw(v,x,I),Object.keys(v).sort((R,A)=>R-A).map(R=>+R)}getLabelForValue(e){let n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}_tickFormatFunction(e,n,r,i){let o=this.options,s=o.time.displayFormats,c=this._unit,p=this._majorUnit,h=c&&s[c],v=p&&s[p],P=r[n],x=p&&v&&P&&P.major,T=this._adapter.format(e,i||(x?v:h)),I=o.ticks.callback;return I?Qe(I,[T,n,r],this):T}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e);}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){let n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){let n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){let n=this.options.ticks,r=this.ctx.measureText(e).width,i=Qn(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),s=Math.sin(i),c=this._resolveTickFontOptions(0).size;return {w:r*o+c*s,h:r*s+c*o}}_getLabelCapacity(e){let n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(e,0,Lw(this,[e],this._majorUnit),i),s=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;let i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){let e=this._cache.labels||[],n,r;if(e.length)return e;let i=this.getLabels();for(n=0,r=i.length;n<r;++n)e.push(Fw(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Ug(e.sort($U))}};ud.id="time";ud.defaults={bounds:"data",adapters:{},time:{parser:false,unit:false,round:false,isoWeekday:false,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:false}}};function ly(t,e,n){let r=0,i=t.length-1,o,s,c,p;n?(e>=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=es(t,"pos",e)),{pos:o,time:c}=t[r],{pos:s,time:p}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=es(t,"time",e)),{time:o,pos:c}=t[r],{time:s,pos:p}=t[i]);let h=s-o;return h?c+(p-c)*(e-o)/h:c}var by=class extends ud{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0;}initOffsets(){let e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ly(n,this.min),this._tableRange=ly(n,this.max)-this._minPos,super.initOffsets(e);}buildLookupTable(e){let{min:n,max:r}=this,i=[],o=[],s,c,p,h,v;for(s=0,c=e.length;s<c;++s)h=e[s],h>=n&&h<=r&&i.push(h);if(i.length<2)return [{time:n,pos:0},{time:r,pos:1}];for(s=0,c=i.length;s<c;++s)v=i[s+1],p=i[s-1],h=i[s],Math.round((v+p)/2)!==h&&o.push({time:h,pos:s/(c-1)});return o}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return (ly(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return ly(this._table,r*this._tableRange+this._minPos,true)}};by.id="timeseries";by.defaults=ud.defaults;var aI=(function(){if(typeof window!="undefined"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return (t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1})(),Ff={toTextLines:function(t){var e=[],n;for(t=[].concat(t);t.length;)n=t.pop(),typeof n=="string"?e.unshift.apply(e,n.split(`
|
|
5649
|
+
`)):Array.isArray(n)?t.push.apply(t,n):Le(t)||e.unshift(""+n);return e},textSize:function(t,e,n){var r=[].concat(e),i=r.length,o=t.font,s=0,c;for(t.font=n.string,c=0;c<i;++c)s=Math.max(t.measureText(r[c]).width,s);return t.font=o,{height:i*n.lineHeight,width:s}},bound:function(t,e,n){return Math.max(t,Math.min(e,n))},arrayDiff:function(t,e){var n=t.slice(),r=[],i,o,s,c;for(i=0,s=e.length;i<s;++i)c=e[i],o=n.indexOf(c),o===-1?r.push([c,1]):n.splice(o,1);for(i=0,s=n.length;i<s;++i)r.push([n[i],-1]);return r},rasterize:function(t){return Math.round(t*aI)/aI}};function s1(t,e){var n=e.x,r=e.y;if(n===null)return {x:0,y:-1};if(r===null)return {x:1,y:0};var i=t.x-n,o=t.y-r,s=Math.sqrt(i*i+o*o);return {x:s?i/s:0,y:s?o/s:-1}}function zU(t,e,n,r,i){switch(i){case "center":n=r=0;break;case "bottom":n=0,r=1;break;case "right":n=1,r=0;break;case "left":n=-1,r=0;break;case "top":n=0,r=-1;break;case "start":n=-n,r=-r;break;case "end":break;default:i*=Math.PI/180,n=Math.cos(i),r=Math.sin(i);break}return {x:t,y:e,vx:n,vy:r}}var HU=0,lI=1,cI=2,uI=4,dI=8;function Sy(t,e,n){var r=HU;return t<n.left?r|=lI:t>n.right&&(r|=cI),e<n.top?r|=dI:e>n.bottom&&(r|=uI),r}function WU(t,e){for(var n=t.x0,r=t.y0,i=t.x1,o=t.y1,s=Sy(n,r,e),c=Sy(i,o,e),p,h,v;!(!(s|c)||s&c);)p=s||c,p&dI?(h=n+(i-n)*(e.top-r)/(o-r),v=e.top):p&uI?(h=n+(i-n)*(e.bottom-r)/(o-r),v=e.bottom):p&cI?(v=r+(o-r)*(e.right-n)/(i-n),h=e.right):p&lI&&(v=r+(o-r)*(e.left-n)/(i-n),h=e.left),p===s?(n=h,r=v,s=Sy(n,r,e)):(i=h,o=v,c=Sy(i,o,e));return {x0:n,x1:i,y0:r,y1:o}}function Py(t,e){var n=e.anchor,r=t,i,o;return e.clamp&&(r=WU(r,e.area)),n==="start"?(i=r.x0,o=r.y0):n==="end"?(i=r.x1,o=r.y1):(i=(r.x0+r.x1)/2,o=(r.y0+r.y1)/2),zU(i,o,t.vx,t.vy,e.align)}var xy={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,r=Math.cos(n),i=Math.sin(n),o=t.innerRadius,s=t.outerRadius;return Py({x0:t.x+r*o,y0:t.y+i*o,x1:t.x+r*s,y1:t.y+i*s,vx:r,vy:i},e)},point:function(t,e){var n=s1(t,e.origin),r=n.x*t.options.radius,i=n.y*t.options.radius;return Py({x0:t.x-r,y0:t.y-i,x1:t.x+r,y1:t.y+i,vx:n.x,vy:n.y},e)},bar:function(t,e){var n=s1(t,e.origin),r=t.x,i=t.y,o=0,s=0;return t.horizontal?(r=Math.min(t.x,t.base),o=Math.abs(t.base-t.x)):(i=Math.min(t.y,t.base),s=Math.abs(t.base-t.y)),Py({x0:r,y0:i+s,x1:r+o,y1:i,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=s1(t,e.origin);return Py({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:n.x,vy:n.y},e)}},ps=Ff.rasterize;function qU(t){var e=t.borderWidth||0,n=t.padding,r=t.size.height,i=t.size.width,o=-i/2,s=-r/2;return {frame:{x:o-n.left-e,y:s-n.top-e,w:i+n.width+e*2,h:r+n.height+e*2},text:{x:o,y:s,w:i,h:r}}}function YU(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return {x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return t.horizontal?{x:r,y:null}:{x:null,y:r}}function QU(t){return t instanceof cs?xy.arc:t instanceof us?xy.point:t instanceof ds?xy.bar:xy.fallback}function KU(t,e,n,r,i,o){var s=Math.PI/2;if(o){var c=Math.min(o,i/2,r/2),p=e+c,h=n+c,v=e+r-c,P=n+i-c;t.moveTo(e,h),p<v&&h<P?(t.arc(p,h,c,-Math.PI,-s),t.arc(v,h,c,-s,0),t.arc(v,P,c,0,s),t.arc(p,P,c,s,Math.PI)):p<v?(t.moveTo(p,n),t.arc(v,h,c,-s,s),t.arc(p,h,c,s,Math.PI+s)):h<P?(t.arc(p,h,c,-Math.PI,0),t.arc(p,P,c,0,Math.PI)):t.arc(p,h,c,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,n);}else t.rect(e,n,r,i);}function XU(t,e,n){var r=n.backgroundColor,i=n.borderColor,o=n.borderWidth;!r&&(!i||!o)||(t.beginPath(),KU(t,ps(e.x)+o/2,ps(e.y)+o/2,ps(e.w)-o,ps(e.h)-o,n.borderRadius),t.closePath(),r&&(t.fillStyle=r,t.fill()),i&&o&&(t.strokeStyle=i,t.lineWidth=o,t.lineJoin="miter",t.stroke()));}function ZU(t,e,n){var r=n.lineHeight,i=t.w,o=t.x,s=t.y+r/2;return e==="center"?o+=i/2:(e==="end"||e==="right")&&(o+=i),{h:r,w:i,x:o,y:s}}function JU(t,e,n){var r=t.shadowBlur,i=n.stroked,o=ps(n.x),s=ps(n.y),c=ps(n.w);i&&t.strokeText(e,o,s,c),n.filled&&(r&&i&&(t.shadowBlur=0),t.fillText(e,o,s,c),r&&i&&(t.shadowBlur=r));}function t8(t,e,n,r){var i=r.textAlign,o=r.color,s=!!o,c=r.font,p=e.length,h=r.textStrokeColor,v=r.textStrokeWidth,P=h&&v,x;if(!(!p||!s&&!P))for(n=ZU(n,i,c),t.font=c.string,t.textAlign=i,t.textBaseline="middle",t.shadowBlur=r.textShadowBlur,t.shadowColor=r.textShadowColor,s&&(t.fillStyle=o),P&&(t.lineJoin="round",t.lineWidth=v,t.strokeStyle=h),x=0,p=e.length;x<p;++x)JU(t,e[x],{stroked:P,filled:s,w:n.w,x:n.x,y:n.y+n.h*x});}var pI=function(t,e,n,r){var i=this;i._config=t,i._index=r,i._model=null,i._rects=null,i._ctx=e,i._el=n;};ji(pI.prototype,{_modelize:function(t,e,n,r){var i=this,o=i._index,s=Sn(In([n.font,{}],r,o)),c=In([n.color,ke.color],r,o);return {align:In([n.align,"center"],r,o),anchor:In([n.anchor,"center"],r,o),area:r.chart.chartArea,backgroundColor:In([n.backgroundColor,null],r,o),borderColor:In([n.borderColor,null],r,o),borderRadius:In([n.borderRadius,0],r,o),borderWidth:In([n.borderWidth,0],r,o),clamp:In([n.clamp,false],r,o),clip:In([n.clip,false],r,o),color:c,display:t,font:s,lines:e,offset:In([n.offset,4],r,o),opacity:In([n.opacity,1],r,o),origin:YU(i._el,r),padding:$n(In([n.padding,4],r,o)),positioner:QU(i._el),rotation:In([n.rotation,0],r,o)*(Math.PI/180),size:Ff.textSize(i._ctx,e,s),textAlign:In([n.textAlign,"start"],r,o),textShadowBlur:In([n.textShadowBlur,0],r,o),textShadowColor:In([n.textShadowColor,c],r,o),textStrokeColor:In([n.textStrokeColor,c],r,o),textStrokeWidth:In([n.textStrokeWidth,0],r,o)}},update:function(t){var e=this,n=null,r=null,i=e._index,o=e._config,s,c,p,h=In([o.display,true],t,i);h&&(s=t.dataset.data[i],c=me(Qe(o.formatter,[s,t]),s),p=Le(c)?[]:Ff.toTextLines(c),p.length&&(n=e._modelize(h,p,o,t),r=qU(n))),e._model=n,e._rects=r;},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var n=this,r=t.ctx,i=n._model,o=n._rects,s;this.visible()&&(r.save(),i.clip&&(s=i.area,r.beginPath(),r.rect(s.left,s.top,s.right-s.left,s.bottom-s.top),r.clip()),r.globalAlpha=Ff.bound(0,i.opacity,1),r.translate(ps(e.x),ps(e.y)),r.rotate(i.rotation),XU(r,o.frame,i),t8(r,i.lines,o.text,i),r.restore());}});var e8=Number.MIN_SAFE_INTEGER||-9007199254740991,n8=Number.MAX_SAFE_INTEGER||9007199254740991;function Rf(t,e,n){var r=Math.cos(n),i=Math.sin(n),o=e.x,s=e.y;return {x:o+r*(t.x-o)-i*(t.y-s),y:s+i*(t.x-o)+r*(t.y-s)}}function sI(t,e){var n=n8,r=e8,i=e.origin,o,s,c,p,h;for(o=0;o<t.length;++o)s=t[o],c=s.x-i.x,p=s.y-i.y,h=e.vx*c+e.vy*p,n=Math.min(n,h),r=Math.max(r,h);return {min:n,max:r}}function Ey(t,e){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);return {vx:(e.x-t.x)/i,vy:(e.y-t.y)/i,origin:t,ln:i}}var fI=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0};};ji(fI.prototype,{center:function(){var t=this._rect;return {x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,n){this._rotation=n,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h};},contains:function(t){var e=this,n=1,r=e._rect;return t=Rf(t,e.center(),-e._rotation),!(t.x<r.x-n||t.y<r.y-n||t.x>r.x+r.w+n*2||t.y>r.y+r.h+n*2)},intersects:function(t){var e=this._points(),n=t._points(),r=[Ey(e[0],e[1]),Ey(e[0],e[3])],i,o,s;for(this._rotation!==t._rotation&&r.push(Ey(n[0],n[1]),Ey(n[0],n[3])),i=0;i<r.length;++i)if(o=sI(e,r[i]),s=sI(n,r[i]),o.max<s.min||s.max<o.min)return false;return true},_points:function(){var t=this,e=t._rect,n=t._rotation,r=t.center();return [Rf({x:e.x,y:e.y},r,n),Rf({x:e.x+e.w,y:e.y},r,n),Rf({x:e.x+e.w,y:e.y+e.h},r,n),Rf({x:e.x,y:e.y+e.h},r,n)]}});function hI(t,e,n){var r=e.positioner(t,e),i=r.vx,o=r.vy;if(!i&&!o)return {x:r.x,y:r.y};var s=n.w,c=n.h,p=e.rotation,h=Math.abs(s/2*Math.cos(p))+Math.abs(c/2*Math.sin(p)),v=Math.abs(s/2*Math.sin(p))+Math.abs(c/2*Math.cos(p)),P=1/Math.max(Math.abs(i),Math.abs(o));return h*=i*P,v*=o*P,h+=e.offset*i,v+=e.offset*o,{x:r.x+h,y:r.y+v}}function r8(t,e){var n,r,i,o;for(n=t.length-1;n>=0;--n)for(i=t[n].$layout,r=n-1;r>=0&&i._visible;--r)o=t[r].$layout,o._visible&&i._box.intersects(o._box)&&e(i,o);return t}function i8(t){var e,n,r,i,o,s,c;for(e=0,n=t.length;e<n;++e)r=t[e],i=r.$layout,i._visible&&(c=new Proxy(r._el,{get:(p,h)=>p.getProps([h],true)[h]}),o=r.geometry(),s=hI(c,r.model(),o),i._box.update(s,o,r.rotation()));return r8(t,function(p,h){var v=p._hidable,P=h._hidable;v&&P||P?h._visible=false:v&&(p._visible=false);})}var Mf={prepare:function(t){var e=[],n,r,i,o,s;for(n=0,i=t.length;n<i;++n)for(r=0,o=t[n].length;r<o;++r)s=t[n][r],e.push(s),s.$layout={_box:new fI,_hidable:false,_visible:true,_set:n,_idx:s._index};return e.sort(function(c,p){var h=c.$layout,v=p.$layout;return h._idx===v._idx?v._set-h._set:v._idx-h._idx}),this.update(e),e},update:function(t){var e=false,n,r,i,o,s;for(n=0,r=t.length;n<r;++n)i=t[n],o=i.model(),s=i.$layout,s._hidable=o&&o.display==="auto",s._visible=i.visible(),e|=s._hidable;e&&i8(t);},lookup:function(t,e){var n,r;for(n=t.length-1;n>=0;--n)if(r=t[n].$layout,r&&r._visible&&r._box.contains(e))return t[n];return null},draw:function(t,e){var n,r,i,o,s,c;for(n=0,r=e.length;n<r;++n)i=e[n],o=i.$layout,o._visible&&(s=i.geometry(),c=hI(i._el,i.model(),s),o._box.update(c,s,i.rotation()),i.draw(t,c));}},o8=function(t){if(Le(t))return null;var e=t,n,r,i;if(Te(t))if(!Le(t.label))e=t.label;else if(!Le(t.r))e=t.r;else for(e="",n=Object.keys(t),i=0,r=n.length;i<r;++i)e+=(i!==0?", ":"")+n[i]+": "+t[n[i]];return ""+e},a8={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:false,clip:false,color:void 0,display:true,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:o8,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Ti="$datalabels",mI="$default";function s8(t,e){var n=t.datalabels,r={},i=[],o,s;return n===false?null:(n===true&&(n={}),e=ji({},[e,n]),o=e.labels||{},s=Object.keys(o),delete e.labels,s.length?s.forEach(function(c){o[c]&&i.push(ji({},[e,o[c],{_key:c}]));}):i.push(e),r=i.reduce(function(c,p){return tn(p.listeners||{},function(h,v){c[v]=c[v]||{},c[v][p._key||mI]=h;}),delete p.listeners,c},{}),{labels:i,listeners:r})}function l1(t,e,n,r){if(e){var i=n.$context,o=n.$groups,s;e[o._set]&&(s=e[o._set][o._key],s&&Qe(s,[i,r])===true&&(t[Ti]._dirty=true,n.update(i)));}}function l8(t,e,n,r,i){var o,s;!n&&!r||(n?r?n!==r&&(s=o=true):s=true:o=true,s&&l1(t,e.leave,n,i),o&&l1(t,e.enter,r,i));}function c8(t,e){var n=t[Ti],r=n._listeners,i,o;if(!(!r.enter&&!r.leave)){if(e.type==="mousemove")o=Mf.lookup(n._labels,e);else if(e.type!=="mouseout")return;i=n._hovered,n._hovered=o,l8(t,r,i,o,e);}}function u8(t,e){var n=t[Ti],r=n._listeners.click,i=r&&Mf.lookup(n._labels,e);i&&l1(t,r,i,e);}var gI={id:"datalabels",defaults:a8,beforeInit:function(t){t[Ti]={_actives:[]};},beforeUpdate:function(t){var e=t[Ti];e._listened=false,e._listeners={},e._datasets=[],e._labels=[];},afterDatasetUpdate:function(t,e,n){var r=e.index,i=t[Ti],o=i._datasets[r]=[],s=t.isDatasetVisible(r),c=t.data.datasets[r],p=s8(c,n),h=e.meta.data||[],v=t.ctx,P,x,T,I,R,A,O,N;for(v.save(),P=0,T=h.length;P<T;++P)if(O=h[P],O[Ti]=[],s&&O&&t.getDataVisibility(P)&&!O.skip)for(x=0,I=p.labels.length;x<I;++x)R=p.labels[x],A=R._key,N=new pI(R,v,O,P),N.$groups={_set:r,_key:A||mI},N.$context={active:false,chart:t,dataIndex:P,dataset:c,datasetIndex:r},N.update(N.$context),O[Ti].push(N),o.push(N);v.restore(),ji(i._listeners,p.listeners,{merger:function(V,G,X){G[V]=G[V]||{},G[V][e.index]=X[V],i._listened=true;}});},afterUpdate:function(t){t[Ti]._labels=Mf.prepare(t[Ti]._datasets);},afterDatasetsDraw:function(t){Mf.draw(t,t[Ti]._labels);},beforeEvent:function(t,e){if(t[Ti]._listened){var n=e.event;switch(n.type){case "mousemove":case "mouseout":c8(t,n);break;case "click":u8(t,n);break}}},afterEvent:function(t){var e=t[Ti],n=e._actives,r=e._actives=t.getActiveElements(),i=Ff.arrayDiff(n,r),o,s,c,p,h,v,P;for(o=0,s=i.length;o<s;++o)if(h=i[o],h[1])for(P=h[0].element[Ti]||[],c=0,p=P.length;c<p;++c)v=P[c],v.$context.active=h[1]===1,v.update(v.$context);(e._dirty||i.length)&&(Mf.update(e._labels),t.render()),delete e._dirty;}};var yI={modes:{point(t,e){return Ty(t,e,{intersect:true})},nearest(t,e,n){return f8(t,e,n)},x(t,e,n){return Ty(t,e,{intersect:n.intersect,axis:"x"})},y(t,e,n){return Ty(t,e,{intersect:n.intersect,axis:"y"})}}};function y1(t,e,n){return (yI.modes[n.mode]||yI.modes.nearest)(t,e,n)}function d8(t,e,n){return n!=="x"&&n!=="y"?t.inRange(e.x,e.y,"x",true)||t.inRange(e.x,e.y,"y",true):t.inRange(e.x,e.y,n,true)}function p8(t,e,n){return n==="x"?{x:t.x,y:e.y}:n==="y"?{x:e.x,y:t.y}:e}function Ty(t,e,n){return t.visibleElements.filter(r=>n.intersect?r.inRange(e.x,e.y):d8(r,e,n.axis))}function f8(t,e,n){let r=Number.POSITIVE_INFINITY;return Ty(t,e,n).reduce((i,o)=>{let s=o.getCenterPoint(),c=p8(e,s,n.axis),p=ns(e,c);return p<r?(i=[o],r=p):p===r&&i.push(o),i},[]).sort((i,o)=>i._index-o._index).slice(0,1)}var h8=(t,e)=>e>t||t.length>e.length&&t.slice(0,e.length)===e,Rc=.001,Iy=(t,e,n)=>Math.min(n,Math.max(e,t));function m8(t,e,n){for(let r of Object.keys(t))t[r]=Iy(t[r],e,n);return t}function g8(t,e,n,r){if(!t||!e||n<=0)return false;let i=r/2;return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(n+i,2)}function NI(t,{x:e,y:n,x2:r,y2:i},o,s){let c=s/2,p=t.x>=e-c-Rc&&t.x<=r+c+Rc,h=t.y>=n-c-Rc&&t.y<=i+c+Rc;return o==="x"?p:(o==="y"||p)&&h}function hd(t,e){let{centerX:n,centerY:r}=t.getProps(["centerX","centerY"],e);return {x:n,y:r}}function y8(t,e,n,r=true){let i=n.split("."),o=0;for(let s of e.split(".")){let c=i[o++];if(parseInt(s,10)<parseInt(c,10))break;if(h8(c,s)){if(r)throw new Error(`${t} v${n} is not supported. v${e} or newer is required.`);return false}}return true}var LI=t=>typeof t=="string"&&t.endsWith("%"),BI=t=>parseFloat(t)/100,UI=t=>Iy(BI(t),0,1);function b1(t,e){return e==="start"?0:e==="end"?t:LI(e)?UI(e)*t:t/2}function Cl(t,e,n=true){return typeof e=="number"?e:LI(e)?(n?UI(e):BI(e))*t:t}function b8(t,e){let{x:n,width:r}=t,i=e.textAlign;return i==="center"?n+r/2:i==="end"||i==="right"?n+r:n}function v1(t,e="center"){return Te(t)?{x:me(t.x,e),y:me(t.y,e)}:(t=me(t,e),{x:t,y:t})}function $I(t){return t&&(Fn(t.xValue)||Fn(t.yValue))}function Lf(t,e,n,r=false){let i=n.init;if(i){if(i===true)return jI(e,r)}else return;return v8(e,r,Qe(i,[{chart:t,properties:e,options:n}]))}function GI(t,e,n){let r=false;return e.forEach(i=>{Gr(t[i])?(r=true,n[i]=t[i]):Fn(n[i])&&delete n[i];}),r}function jI({centerX:t,centerY:e},n){return n?{centerX:t,centerY:e,radius:0,width:0,height:0}:{x:t,y:e,x2:t,y2:e,width:0,height:0}}function v8(t,e,n){if(n===true)return jI(t,e);if(Te(n))return n}var c1=new Map,C8=t=>isNaN(t)||t<=0,S8=t=>t.reduce(function(e,n){return e+=n.string,e},"");function ky(t){if(t&&typeof t=="object"){let e=t.toString();return e==="[object HTMLImageElement]"||e==="[object HTMLCanvasElement]"}}function C1(t,{x:e,y:n},r){r&&(t.translate(e,n),t.rotate(Qn(r)),t.translate(-e,-n));}function Sl(t,e){if(e&&e.borderWidth)return t.lineCap=e.borderCapStyle,t.setLineDash(e.borderDash),t.lineDashOffset=e.borderDashOffset,t.lineJoin=e.borderJoinStyle,t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,true}function md(t,e){t.shadowColor=e.backgroundShadowColor,t.shadowBlur=e.shadowBlur,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY;}function S1(t,e){let n=e.content;if(ky(n))return {width:Cl(n.width,e.width),height:Cl(n.height,e.height)};let r=e.font,i=He(r)?r.map(p=>Sn(p)):[Sn(r)],o=e.textStrokeWidth,s=He(n)?n:[n],c=s.join()+S8(i)+o+(t._measureText?"-spriting":"");return c1.has(c)||c1.set(c,T8(t,s,i,o)),c1.get(c)}function VI(t,e,n){let{x:r,y:i,width:o,height:s}=e;t.save(),md(t,n);let c=Sl(t,n);t.fillStyle=n.backgroundColor,t.beginPath(),os(t,{x:r,y:i,w:o,h:s,radius:m8($o(n.borderRadius),0,Math.min(o,s)/2)}),t.closePath(),t.fill(),c&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore();}function P8(t,e,n){let r=n.content;if(ky(r)){t.save(),t.globalAlpha=k8(n.opacity,r.style.opacity),t.drawImage(r,e.x,e.y,e.width,e.height),t.restore();return}let i=He(r)?r:[r],o=n.font,s=He(o)?o.map(P=>Sn(P)):[Sn(o)],c=n.color,p=He(c)?c:[c],h=b8(e,n),v=e.y+n.textStrokeWidth/2;t.save(),t.textBaseline="middle",t.textAlign=n.textAlign,x8(t,n)&&w8(t,{x:h,y:v},i,s),I8(t,{x:h,y:v},i,{fonts:s,colors:p}),t.restore();}function x8(t,e){if(e.textStrokeWidth>0)return t.lineJoin="round",t.miterLimit=2,t.lineWidth=e.textStrokeWidth,t.strokeStyle=e.textStrokeColor,true}function E8(t,e,n,r){let{radius:i,options:o}=e,s=o.pointStyle,c=o.rotation,p=(c||0)*lf;if(ky(s)){t.save(),t.translate(n,r),t.rotate(p),t.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),t.restore();return}C8(i)||_8(t,{x:n,y:r,radius:i,rotation:c,style:s,rad:p});}function _8(t,{x:e,y:n,radius:r,rotation:i,style:o,rad:s}){let c,p,h,v;switch(t.beginPath(),o){default:t.arc(e,n,r,0,rn),t.closePath();break;case "triangle":t.moveTo(e+Math.sin(s)*r,n-Math.cos(s)*r),s+=td,t.lineTo(e+Math.sin(s)*r,n-Math.cos(s)*r),s+=td,t.lineTo(e+Math.sin(s)*r,n-Math.cos(s)*r),t.closePath();break;case "rectRounded":v=r*.516,h=r-v,c=Math.cos(s+mo)*h,p=Math.sin(s+mo)*h,t.arc(e-c,n-p,v,s-Be,s-bn),t.arc(e+p,n-c,v,s-bn,s),t.arc(e+c,n+p,v,s,s+bn),t.arc(e-p,n+c,v,s+bn,s+Be),t.closePath();break;case "rect":if(!i){h=Math.SQRT1_2*r,t.rect(e-h,n-h,2*h,2*h);break}s+=mo;case "rectRot":c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+p,n-c),t.lineTo(e+c,n+p),t.lineTo(e-p,n+c),t.closePath();break;case "crossRot":s+=mo;case "cross":c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+c,n+p),t.moveTo(e+p,n-c),t.lineTo(e-p,n+c);break;case "star":c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+c,n+p),t.moveTo(e+p,n-c),t.lineTo(e-p,n+c),s+=mo,c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+c,n+p),t.moveTo(e+p,n-c),t.lineTo(e-p,n+c);break;case "line":c=Math.cos(s)*r,p=Math.sin(s)*r,t.moveTo(e-c,n-p),t.lineTo(e+c,n+p);break;case "dash":t.moveTo(e,n),t.lineTo(e+Math.cos(s)*r,n+Math.sin(s)*r);break}t.fill();}function T8(t,e,n,r){t.save();let i=e.length,o=0,s=r;for(let c=0;c<i;c++){let p=n[Math.min(c,n.length-1)];t.font=p.string;let h=e[c];o=Math.max(o,t.measureText(h).width+r),s+=p.lineHeight;}return t.restore(),{width:o,height:s}}function w8(t,{x:e,y:n},r,i){t.beginPath();let o=0;r.forEach(function(s,c){let p=i[Math.min(c,i.length-1)],h=p.lineHeight;t.font=p.string,t.strokeText(s,e,n+h/2+o),o+=h;}),t.stroke();}function I8(t,{x:e,y:n},r,{fonts:i,colors:o}){let s=0;r.forEach(function(c,p){let h=o[Math.min(p,o.length-1)],v=i[Math.min(p,i.length-1)],P=v.lineHeight;t.beginPath(),t.font=v.string,t.fillStyle=h,t.fillText(c,e,n+P/2+s),s+=P,t.fill();});}function k8(t,e){let n=Vi(t)?t:e;return Vi(n)?Iy(n,0,1):1}var bI={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function dd(t,e,n){return e=typeof e=="number"?e:t.parse(e),Mn(e)?t.getPixelForValue(e):n}function Fc(t,e,n){let r=e[n];if(r||n==="scaleID")return r;let i=n.charAt(0),o=Object.values(t).filter(s=>s.axis&&s.axis===i);return o.length?o[0].id:i}function zI(t,e){if(t){let n=t.options.reverse,r=dd(t,e.min,n?e.end:e.start),i=dd(t,e.max,n?e.start:e.end);return {start:r,end:i}}}function HI(t,e){let{chartArea:n,scales:r}=t,i=r[Fc(r,e,"xScaleID")],o=r[Fc(r,e,"yScaleID")],s=n.width/2,c=n.height/2;return i&&(s=dd(i,e.xValue,i.left+i.width/2)),o&&(c=dd(o,e.yValue,o.top+o.height/2)),{x:s,y:c}}function P1(t,e){let n=t.scales,r=n[Fc(n,e,"xScaleID")],i=n[Fc(n,e,"yScaleID")];if(!r&&!i)return {};let{left:o,right:s}=r||t.chartArea,{top:c,bottom:p}=i||t.chartArea,h=vI(r,{min:e.xMin,max:e.xMax,start:o,end:s});o=h.start,s=h.end;let v=vI(i,{min:e.yMin,max:e.yMax,start:p,end:c});return c=v.start,p=v.end,{x:o,y:c,x2:s,y2:p,width:s-o,height:p-c,centerX:o+(s-o)/2,centerY:c+(p-c)/2}}function WI(t,e){if(!$I(e)){let n=P1(t,e),r=e.radius;(!r||isNaN(r))&&(r=Math.min(n.width,n.height)/2,e.radius=r);let i=r*2,o=n.centerX+e.xAdjust,s=n.centerY+e.yAdjust;return {x:o-r,y:s-r,x2:o+r,y2:s+r,centerX:o,centerY:s,width:i,height:i,radius:r}}return A8(t,e)}function D8(t,e){let{scales:n,chartArea:r}=t,i=n[e.scaleID],o={x:r.left,y:r.top,x2:r.right,y2:r.bottom};return i?O8(i,o,e):R8(n,o,e),o}function qI(t,e,n){let r=P1(t,e);return r.initProperties=Lf(t,r,e,n),r.elements=[{type:"label",optionScope:"label",properties:N8(t,r,e),initProperties:r.initProperties}],r}function A8(t,e){let n=HI(t,e),r=e.radius*2;return {x:n.x-e.radius+e.xAdjust,y:n.y-e.radius+e.yAdjust,x2:n.x+e.radius+e.xAdjust,y2:n.y+e.radius+e.yAdjust,centerX:n.x+e.xAdjust,centerY:n.y+e.yAdjust,radius:e.radius,width:r,height:r}}function vI(t,e){let n=zI(t,e)||e;return {start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function O8(t,e,n){let r=dd(t,n.value,NaN),i=dd(t,n.endValue,r);t.isHorizontal()?(e.x=r,e.x2=i):(e.y=r,e.y2=i);}function R8(t,e,n){for(let r of Object.keys(bI)){let i=t[Fc(t,n,r)];if(i){let{min:o,max:s,start:c,end:p,startProp:h,endProp:v}=bI[r],P=zI(i,{min:n[o],max:n[s],start:i[c],end:i[p]});e[h]=P.start,e[v]=P.end;}}}function F8({properties:t,options:e},n,r,i){let{x:o,x2:s,width:c}=t;return YI({start:o,end:s,borderWidth:e.borderWidth},{position:r.x,padding:{start:i.left,end:i.right},adjust:e.label.xAdjust,size:n.width})}function M8({properties:t,options:e},n,r,i){let{y:o,y2:s,height:c}=t;return YI({start:o,end:s,borderWidth:e.borderWidth},{position:r.y,padding:{start:i.top,end:i.bottom},adjust:e.label.yAdjust,size:n.height})}function YI(t,e){let{start:n,end:r,borderWidth:i}=t,{position:o,padding:{start:s,end:c},adjust:p}=e,h=r-i-n-s-c-e.size;return n+i/2+p+b1(h,o)}function N8(t,e,n){let r=n.label;r.backgroundColor="transparent",r.callout.display=false;let i=v1(r.position),o=$n(r.padding),s=S1(t.ctx,r),c=F8({properties:e,options:n},s,i,o),p=M8({properties:e,options:n},s,i,o),h=s.width+o.width,v=s.height+o.height;return {x:c,y:p,x2:c+h,y2:p+v,width:h,height:v,centerX:c+h/2,centerY:p+v/2,rotation:r.rotation}}function Bc(t,e,n){let r=Math.cos(n),i=Math.sin(n),o=e.x,s=e.y;return {x:o+r*(t.x-o)-i*(t.y-s),y:s+i*(t.x-o)+r*(t.y-s)}}var u1=["enter","leave"],x1=u1.concat("click");function L8(t,e,n){e.listened=GI(n,x1,e.listeners),e.moveListened=false,e._getElements=y1,u1.forEach(r=>{Gr(n[r])&&(e.moveListened=true);}),(!e.listened||!e.moveListened)&&e.annotations.forEach(r=>{!e.listened&&Gr(r.click)&&(e.listened=true),e.moveListened||u1.forEach(i=>{Gr(r[i])&&(e.listened=true,e.moveListened=true);});});}function B8(t,e,n){if(t.listened)switch(e.type){case "mousemove":case "mouseout":return U8(t,e,n);case "click":return $8(t,e,n)}}function U8(t,e,n){if(!t.moveListened)return;let r;e.type==="mousemove"?r=y1(t,e,n.interaction):r=[];let i=t.hovered;t.hovered=r;let o={state:t,event:e},s=CI(o,"leave",i,r);return CI(o,"enter",r,i)||s}function CI({state:t,event:e},n,r,i){let o;for(let s of r)i.indexOf(s)<0&&(o=QI(s.options[n]||t.listeners[n],s,e)||o);return o}function $8(t,e,n){let r=t.listeners,i=y1(t,e,n.interaction),o;for(let s of i)o=QI(s.options.click||r.click,s,e)||o;return o}function QI(t,e,n){return Qe(t,[e.$context,n])===true}var wy=["afterDraw","beforeDraw"];function G8(t,e,n){let r=e.visibleElements;e.hooked=GI(n,wy,e.hooks),e.hooked||r.forEach(i=>{e.hooked||wy.forEach(o=>{Gr(i.options[o])&&(e.hooked=true);});});}function SI(t,e,n){if(t.hooked){let r=e.options[n]||t.hooks[n];return Qe(r,[e.$context])}}function j8(t,e,n){let r=q8(t.scales,e,n),i=PI(e,r,"min","suggestedMin");i=PI(e,r,"max","suggestedMax")||i,i&&Gr(e.handleTickRangeOptions)&&e.handleTickRangeOptions();}function V8(t,e){for(let n of t)H8(n,e);}function PI(t,e,n,r){if(Mn(e[n])&&!z8(t.options,n,r)){let i=t[n]!==e[n];return t[n]=e[n],i}}function z8(t,e,n){return Fn(t[e])||Fn(t[n])}function H8(t,e){for(let n of ["scaleID","xScaleID","yScaleID"]){let r=Fc(e,t,n);r&&!e[r]&&W8(t,n)&&console.warn(`No scale found with id '${r}' for annotation '${t.id}'`);}}function W8(t,e){if(e==="scaleID")return true;let n=e.charAt(0);for(let r of ["Min","Max","Value"])if(Fn(t[n+r]))return true;return false}function q8(t,e,n){let r=e.axis,i=e.id,o=r+"ScaleID",s={min:me(e.min,Number.NEGATIVE_INFINITY),max:me(e.max,Number.POSITIVE_INFINITY)};for(let c of n)c.scaleID===i?xI(c,e,["value","endValue"],s):Fc(t,c,o)===i&&xI(c,e,[r+"Min",r+"Max",r+"Value"],s);return s}function xI(t,e,n,r){for(let i of n){let o=t[i];if(Fn(o)){let s=e.parse(o);r.min=Math.min(r.min,s),r.max=Math.max(r.max,s);}}}var Pl=class extends br{inRange(e,n,r,i){let{x:o,y:s}=Bc({x:e,y:n},this.getCenterPoint(i),Qn(-this.options.rotation));return NI({x:o,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(e){return hd(this,e)}draw(e){e.save(),C1(e,this.getCenterPoint(),this.options.rotation),VI(e,this,this.options),e.restore();}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,n){return qI(e,n)}};Pl.id="boxAnnotation";Pl.defaults={adjustScaleRange:true,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:true,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:false},color:"black",content:null,display:false,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Pl.defaultRoutes={borderColor:"color",backgroundColor:"color"};Pl.descriptors={label:{_fallback:true}};var KI=["left","bottom","top","right"],Mc=class extends br{inRange(e,n,r,i){let{x:o,y:s}=Bc({x:e,y:n},this.getCenterPoint(i),Qn(-this.rotation));return NI({x:o,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(e){return hd(this,e)}draw(e){let n=this.options,r=!Fn(this._visible)||this._visible;!n.display||!n.content||!r||(e.save(),C1(e,this.getCenterPoint(),this.rotation),Q8(e,this),VI(e,this,n),P8(e,n7(this),n),e.restore());}resolveElementProperties(e,n){let r;if($I(n))r=HI(e,n);else {let{centerX:c,centerY:p}=P1(e,n);r={x:c,y:p};}let i=$n(n.padding),o=S1(e.ctx,n),s=Y8(r,o,n,i);return St(W({initProperties:Lf(e,s,n),pointX:r.x,pointY:r.y},s),{rotation:n.rotation})}};Mc.id="labelAnnotation";Mc.defaults={adjustScaleRange:true,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:false,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:true,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};Mc.defaultRoutes={borderColor:"color"};function Y8(t,e,n,r){let i=e.width+r.width+n.borderWidth,o=e.height+r.height+n.borderWidth,s=v1(n.position,"center"),c=EI(t.x,i,n.xAdjust,s.x),p=EI(t.y,o,n.yAdjust,s.y);return {x:c,y:p,x2:c+i,y2:p+o,width:i,height:o,centerX:c+i/2,centerY:p+o/2}}function EI(t,e,n=0,r){return t-b1(e,r)+n}function Q8(t,e){let{pointX:n,pointY:r,options:i}=e,o=i.callout,s=o&&o.display&&t7(e,o);if(!s||r7(e,o,s))return;if(t.save(),t.beginPath(),!Sl(t,o))return t.restore();let{separatorStart:p,separatorEnd:h}=K8(e,s),{sideStart:v,sideEnd:P}=Z8(e,s,p);(o.margin>0||i.borderWidth===0)&&(t.moveTo(p.x,p.y),t.lineTo(h.x,h.y)),t.moveTo(v.x,v.y),t.lineTo(P.x,P.y);let x=Bc({x:n,y:r},e.getCenterPoint(),Qn(-e.rotation));t.lineTo(x.x,x.y),t.stroke(),t.restore();}function K8(t,e){let{x:n,y:r,x2:i,y2:o}=t,s=X8(t,e),c,p;return e==="left"||e==="right"?(c={x:n+s,y:r},p={x:c.x,y:o}):(c={x:n,y:r+s},p={x:i,y:c.y}),{separatorStart:c,separatorEnd:p}}function X8(t,e){let{width:n,height:r,options:i}=t,o=i.callout.margin+i.borderWidth/2;return e==="right"?n+o:e==="bottom"?r+o:-o}function Z8(t,e,n){let{y:r,width:i,height:o,options:s}=t,c=s.callout.start,p=J8(e,s.callout),h,v;return e==="left"||e==="right"?(h={x:n.x,y:r+Cl(o,c)},v={x:h.x+p,y:h.y}):(h={x:n.x+Cl(i,c),y:n.y},v={x:h.x,y:h.y+p}),{sideStart:h,sideEnd:v}}function J8(t,e){let n=e.side;return t==="left"||t==="top"?-n:n}function t7(t,e){let n=e.position;return KI.includes(n)?n:e7(t,e)}function e7(t,e){let{x:n,y:r,x2:i,y2:o,width:s,height:c,pointX:p,pointY:h,centerX:v,centerY:P,rotation:x}=t,T={x:v,y:P},I=e.start,R=Cl(s,I),A=Cl(c,I),O=[n,n+R,n+R,i],N=[r+A,o,r,o],V=[];for(let G=0;G<4;G++){let X=Bc({x:O[G],y:N[G]},T,Qn(x));V.push({position:KI[G],distance:ns(X,{x:p,y:h})});}return V.sort((G,X)=>G.distance-X.distance)[0].position}function n7({x:t,y:e,width:n,height:r,options:i}){let o=i.borderWidth/2,s=$n(i.padding);return {x:t+s.left+o,y:e+s.top+o,width:n-s.left-s.right-i.borderWidth,height:r-s.top-s.bottom-i.borderWidth}}function r7(t,e,n){let{pointX:r,pointY:i}=t,o=e.margin,s=r,c=i;return n==="left"?s+=o:n==="right"?s-=o:n==="top"?c+=o:n==="bottom"&&(c-=o),t.inRange(s,c)}var E1=(t,e,n)=>({x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}),d1=(t,e,n)=>E1(e,n,Math.abs((t-e.y)/(n.y-e.y))).x,_I=(t,e,n)=>E1(e,n,Math.abs((t-e.x)/(n.x-e.x))).y,Nf=t=>t*t,i7=(t,e,{x:n,y:r,x2:i,y2:o},s)=>s==="y"?{start:Math.min(r,o),end:Math.max(r,o),value:e}:{start:Math.min(n,i),end:Math.max(n,i),value:t},TI=(t,e,n,r)=>(1-r)*(1-r)*t+2*(1-r)*r*e+r*r*n,p1=(t,e,n,r)=>({x:TI(t.x,e.x,n.x,r),y:TI(t.y,e.y,n.y,r)}),wI=(t,e,n,r)=>2*(1-r)*(e-t)+2*r*(n-e),II=(t,e,n,r)=>-Math.atan2(wI(t.x,e.x,n.x,r),wI(t.y,e.y,n.y,r))+.5*Be,Nc=class extends br{inRange(e,n,r,i){let o=this.options.borderWidth/2;if(r!=="x"&&r!=="y"){let s={mouseX:e,mouseY:n},{path:c,ctx:p}=this;if(c){Sl(p,this.options);let{chart:v}=this.$context,P=e*v.currentDevicePixelRatio,x=n*v.currentDevicePixelRatio,T=p.isPointInStroke(c,P,x)||f1(this,s,i);return p.restore(),T}let h=Nf(o);return l7(this,s,h,i)||f1(this,s,i)}return o7(this,{mouseX:e,mouseY:n},r,{hBorderWidth:o,useFinalPosition:i})}getCenterPoint(e){return hd(this,e)}draw(e){let{x:n,y:r,x2:i,y2:o,cp:s,options:c}=this;if(e.save(),!Sl(e,c))return e.restore();md(e,c);let p=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2));if(c.curve&&s)return g7(e,this,s,p),e.restore();let{startOpts:h,endOpts:v,startAdjust:P,endAdjust:x}=XI(this),T=Math.atan2(o-r,i-n);e.translate(n,r),e.rotate(T),e.beginPath(),e.moveTo(0+P,0),e.lineTo(p-x,0),e.shadowColor=c.borderShadowColor,e.stroke(),h1(e,0,P,h),h1(e,p,-x,v),e.restore();}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,n){let r=D8(e,n),{x:i,y:o,x2:s,y2:c}=r,p=a7(r,e.chartArea),h=p?s7({x:i,y:o},{x:s,y:c},e.chartArea):{x:i,y:o,x2:s,y2:c,width:Math.abs(s-i),height:Math.abs(c-o)};if(h.centerX=(s+i)/2,h.centerY=(c+o)/2,h.initProperties=Lf(e,h,n),n.curve){let P={x:h.x,y:h.y},x={x:h.x2,y:h.y2};h.cp=m7(h,n,ns(P,x));}let v=c7(e,h,n.label);return v._visible=p,h.elements=[{type:"label",optionScope:"label",properties:v,initProperties:h.initProperties}],h}};Nc.id="lineAnnotation";var kI={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};Nc.defaults={adjustScaleRange:true,arrowHeads:{display:false,end:Object.assign({},kI),fill:false,length:12,start:Object.assign({},kI),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:false,controlPoint:{y:"-50%"},display:true,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},Mc.defaults.callout),color:"#fff",content:null,display:false,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Nc.descriptors={arrowHeads:{start:{_fallback:true},end:{_fallback:true},_fallback:true}};Nc.defaultRoutes={borderColor:"color"};function o7(t,{mouseX:e,mouseY:n},r,{hBorderWidth:i,useFinalPosition:o}){let s=i7(e,n,t.getProps(["x","y","x2","y2"],o),r);return s.value>=s.start-i&&s.value<=s.end+i||f1(t,{mouseX:e,mouseY:n},o,r)}function a7({x:t,y:e,x2:n,y2:r},{top:i,right:o,bottom:s,left:c}){return !(t<c&&n<c||t>o&&n>o||e<i&&r<i||e>s&&r>s)}function DI({x:t,y:e},n,{top:r,right:i,bottom:o,left:s}){return t<s&&(e=_I(s,{x:t,y:e},n),t=s),t>i&&(e=_I(i,{x:t,y:e},n),t=i),e<r&&(t=d1(r,{x:t,y:e},n),e=r),e>o&&(t=d1(o,{x:t,y:e},n),e=o),{x:t,y:e}}function s7(t,e,n){let{x:r,y:i}=DI(t,e,n),{x:o,y:s}=DI(e,t,n);return {x:r,y:i,x2:o,y2:s,width:Math.abs(o-r),height:Math.abs(s-i)}}function l7(t,{mouseX:e,mouseY:n},r=Rc,i){let{x:o,y:s,x2:c,y2:p}=t.getProps(["x","y","x2","y2"],i),h=c-o,v=p-s,P=Nf(h)+Nf(v),x=P===0?-1:((e-o)*h+(n-s)*v)/P,T,I;return x<0?(T=o,I=s):x>1?(T=c,I=p):(T=o+x*h,I=s+x*v),Nf(e-T)+Nf(n-I)<=r}function f1(t,{mouseX:e,mouseY:n},r,i){let o=t.label;return o.options.display&&o.inRange(e,n,i,r)}function c7(t,e,n){let r=n.borderWidth,i=$n(n.padding),o=S1(t.ctx,n),s=o.width+i.width+r,c=o.height+i.height+r;return d7(e,n,{width:s,height:c,padding:i},t.chartArea)}function u7(t){let{x:e,y:n,x2:r,y2:i}=t,o=Math.atan2(i-n,r-e);return o>Be/2?o-Be:o<Be/-2?o+Be:o}function d7(t,e,n,r){let{width:i,height:o,padding:s}=n,{xAdjust:c,yAdjust:p}=e,h={x:t.x,y:t.y},v={x:t.x2,y:t.y2},P=e.rotation==="auto"?u7(t):Qn(e.rotation),x=p7(i,o,P),T=f7(t,e,{labelSize:x,padding:s},r),I=t.cp?p1(h,t.cp,v,T):E1(h,v,T),R={size:x.w,min:r.left,max:r.right,padding:s.left},A={size:x.h,min:r.top,max:r.bottom,padding:s.top},O=OI(I.x,R)+c,N=OI(I.y,A)+p;return {x:O-i/2,y:N-o/2,x2:O+i/2,y2:N+o/2,centerX:O,centerY:N,pointX:I.x,pointY:I.y,width:i,height:o,rotation:_c(P)}}function p7(t,e,n){let r=Math.cos(n),i=Math.sin(n);return {w:Math.abs(t*r)+Math.abs(e*i),h:Math.abs(t*i)+Math.abs(e*r)}}function f7(t,e,n,r){let i,o=h7(t,r);return e.position==="start"?i=AI({w:t.x2-t.x,h:t.y2-t.y},n,e,o):e.position==="end"?i=1-AI({w:t.x-t.x2,h:t.y-t.y2},n,e,o):i=b1(1,e.position),i}function AI(t,e,n,r){let{labelSize:i,padding:o}=e,s=t.w*r.dx,c=t.h*r.dy,p=s>0&&(i.w/2+o.left-r.x)/s,h=c>0&&(i.h/2+o.top-r.y)/c;return Iy(Math.max(p,h),0,.25)}function h7(t,e){let{x:n,x2:r,y:i,y2:o}=t,s=Math.min(i,o)-e.top,c=Math.min(n,r)-e.left,p=e.bottom-Math.max(i,o),h=e.right-Math.max(n,r);return {x:Math.min(c,h),y:Math.min(s,p),dx:c<=h?1:-1,dy:s<=p?1:-1}}function OI(t,e){let{size:n,min:r,max:i,padding:o}=e,s=n/2;return n>i-r?(i+r)/2:(r>=t-o-s&&(t=r+o+s),i<=t+o+s&&(t=i-o-s),t)}function XI(t){let e=t.options,n=e.arrowHeads&&e.arrowHeads.start,r=e.arrowHeads&&e.arrowHeads.end;return {startOpts:n,endOpts:r,startAdjust:RI(t,n),endAdjust:RI(t,r)}}function RI(t,e){if(!e||!e.display)return 0;let{length:n,width:r}=e,i=t.options.borderWidth/2,o={x:n,y:r+i};return Math.abs(d1(0,o,{x:0,y:i}))}function h1(t,e,n,r){if(!r||!r.display)return;let{length:i,width:o,fill:s,backgroundColor:c,borderColor:p}=r,h=Math.abs(e-i)+n;t.beginPath(),md(t,r),Sl(t,r),t.moveTo(h,-o),t.lineTo(e+n,0),t.lineTo(h,o),s===true?(t.fillStyle=c||p,t.closePath(),t.fill(),t.shadowColor="transparent"):t.shadowColor=r.borderShadowColor,t.stroke();}function m7(t,e,n){let{x:r,y:i,x2:o,y2:s,centerX:c,centerY:p}=t,h=Math.atan2(s-i,o-r),v=v1(e.controlPoint,0),P={x:c+Cl(n,v.x,false),y:p+Cl(n,v.y,false)};return Bc(P,{x:c,y:p},h)}function FI(t,{x:e,y:n},{angle:r,adjust:i},o){!o||!o.display||(t.save(),t.translate(e,n),t.rotate(r),h1(t,0,-i,o),t.restore());}function g7(t,e,n,r){let{x:i,y:o,x2:s,y2:c,options:p}=e,{startOpts:h,endOpts:v,startAdjust:P,endAdjust:x}=XI(e),T={x:i,y:o},I={x:s,y:c},R=II(T,n,I,0),A=II(T,n,I,1)-Be,O=p1(T,n,I,P/r),N=p1(T,n,I,1-x/r),V=new Path2D;t.beginPath(),V.moveTo(O.x,O.y),V.quadraticCurveTo(n.x,n.y,N.x,N.y),t.shadowColor=p.borderShadowColor,t.stroke(V),e.path=V,e.ctx=t,FI(t,O,{angle:R,adjust:P},h),FI(t,N,{angle:A,adjust:x},v);}var Lc=class extends br{inRange(e,n,r,i){let o=this.options.rotation,s=this.options.borderWidth;if(r!=="x"&&r!=="y")return y7({x:e,y:n},this.getProps(["width","height","centerX","centerY"],i),o,s);let{x:c,y:p,x2:h,y2:v}=this.getProps(["x","y","x2","y2"],i),P=s/2,x=r==="y"?{start:p,end:v}:{start:c,end:h},T=Bc({x:e,y:n},this.getCenterPoint(i),Qn(-o));return T[r]>=x.start-P-Rc&&T[r]<=x.end+P+Rc}getCenterPoint(e){return hd(this,e)}draw(e){let{width:n,height:r,centerX:i,centerY:o,options:s}=this;e.save(),C1(e,this.getCenterPoint(),s.rotation),md(e,this.options),e.beginPath(),e.fillStyle=s.backgroundColor;let c=Sl(e,s);e.ellipse(i,o,r/2,n/2,Be/2,0,2*Be),e.fill(),c&&(e.shadowColor=s.borderShadowColor,e.stroke()),e.restore();}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,n){return qI(e,n,true)}};Lc.id="ellipseAnnotation";Lc.defaults={adjustScaleRange:true,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:true,init:void 0,label:Object.assign({},Pl.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Lc.defaultRoutes={borderColor:"color",backgroundColor:"color"};Lc.descriptors={label:{_fallback:true}};function y7(t,e,n,r){let{width:i,height:o,centerX:s,centerY:c}=e,p=i/2,h=o/2;if(p<=0||h<=0)return false;let v=Qn(n||0),P=r/2||0,x=Math.cos(v),T=Math.sin(v),I=Math.pow(x*(t.x-s)+T*(t.y-c),2),R=Math.pow(T*(t.x-s)-x*(t.y-c),2);return I/Math.pow(p+P,2)+R/Math.pow(h+P,2)<=1.0001}var pd=class extends br{inRange(e,n,r,i){let{x:o,y:s,x2:c,y2:p,width:h}=this.getProps(["x","y","x2","y2","width"],i),v=this.options.borderWidth;if(r!=="x"&&r!=="y")return g8({x:e,y:n},this.getCenterPoint(i),h/2,v);let P=v/2,x=r==="y"?{start:s,end:p,value:n}:{start:o,end:c,value:e};return x.value>=x.start-P&&x.value<=x.end+P}getCenterPoint(e){return hd(this,e)}draw(e){let n=this.options,r=n.borderWidth;if(n.radius<.1)return;e.save(),e.fillStyle=n.backgroundColor,md(e,n);let i=Sl(e,n);E8(e,this,this.centerX,this.centerY),i&&!ky(n.pointStyle)&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore(),n.borderWidth=r;}resolveElementProperties(e,n){let r=WI(e,n);return r.initProperties=Lf(e,r,n,true),r}};pd.id="pointAnnotation";pd.defaults={adjustScaleRange:true,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:true,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};pd.defaultRoutes={borderColor:"color",backgroundColor:"color"};var fd=class extends br{inRange(e,n,r,i){if(r!=="x"&&r!=="y")return this.options.radius>=.1&&this.elements.length>1&&v7(this.elements,e,n,i);let o=Bc({x:e,y:n},this.getCenterPoint(i),Qn(-this.options.rotation)),s=this.elements.map(h=>r==="y"?h.bY:h.bX),c=Math.min(...s),p=Math.max(...s);return o[r]>=c&&o[r]<=p}getCenterPoint(e){return hd(this,e)}draw(e){let{elements:n,options:r}=this;e.save(),e.beginPath(),e.fillStyle=r.backgroundColor,md(e,r);let i=Sl(e,r),o=true;for(let s of n)o?(e.moveTo(s.x,s.y),o=false):e.lineTo(s.x,s.y);e.closePath(),e.fill(),i&&(e.shadowColor=r.borderShadowColor,e.stroke()),e.restore();}resolveElementProperties(e,n){let r=WI(e,n),{sides:i,rotation:o}=n,s=[],c=2*Be/i,p=o*lf;for(let h=0;h<i;h++,p+=c){let v=b7(r,n,p);v.initProperties=Lf(e,r,n),s.push(v);}return r.elements=s,r}};fd.id="polygonAnnotation";fd.defaults={adjustScaleRange:true,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:true,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};fd.defaultRoutes={borderColor:"color",backgroundColor:"color"};function b7({centerX:t,centerY:e},{radius:n,borderWidth:r},i){let o=r/2,s=Math.sin(i),c=Math.cos(i),p={x:t+s*n,y:e-c*n};return {type:"point",optionScope:"point",properties:{x:p.x,y:p.y,centerX:p.x,centerY:p.y,bX:t+s*(n+o),bY:e-c*(n+o)}}}function v7(t,e,n,r){let i=false,o=t[t.length-1].getProps(["bX","bY"],r);for(let s of t){let c=s.getProps(["bX","bY"],r);c.bY>n!=o.bY>n&&e<(o.bX-c.bX)*(n-c.bY)/(o.bY-c.bY)+c.bX&&(i=!i),o=c;}return i}var vl={box:Pl,ellipse:Lc,label:Mc,line:Nc,point:pd,polygon:fd};Object.keys(vl).forEach(t=>{ke.describe(`elements.${vl[t].id}`,{_fallback:"plugins.annotation.common"});});var C7={update:Object.assign},S7=x1.concat(wy),MI=(t,e)=>Te(e)?g1(t,e):t,m1=t=>t==="color"||t==="font";function _1(t="line"){return vl[t]?t:(console.warn(`Unknown annotation type: '${t}', defaulting to 'line'`),"line")}function P7(t,e,n,r){let i=E7(t,n.animations,r),o=e.annotations,s=w7(e.elements,o);for(let c=0;c<o.length;c++){let p=o[c],h=ZI(s,c,p.type),v=p.setContext(T7(t,h,p)),P=h.resolveElementProperties(t,v);P.skip=x7(P),"elements"in P&&(_7(h,P.elements,v,i),delete P.elements),Fn(h.x)||Object.assign(h,P),Object.assign(h,P.initProperties),P.options=JI(v),i.update(h,P);}}function x7(t){return isNaN(t.x)||isNaN(t.y)}function E7(t,e,n){return n==="reset"||n==="none"||n==="resize"?C7:new ad(t,e)}function _7(t,e,n,r){let i=t.elements||(t.elements=[]);i.length=e.length;for(let o=0;o<e.length;o++){let s=e[o],c=s.properties,p=ZI(i,o,s.type,s.initProperties),h=n[s.optionScope].override(s);c.options=JI(h),r.update(p,c);}}function ZI(t,e,n,r){let i=vl[_1(n)],o=t[e];return (!o||!(o instanceof i))&&(o=t[e]=new i,Object.assign(o,r)),o}function JI(t){let e=vl[_1(t.type)],n={};n.id=t.id,n.type=t.type,n.drawTime=t.drawTime,Object.assign(n,g1(t,e.defaults),g1(t,e.defaultRoutes));for(let r of S7)n[r]=t[r];return n}function g1(t,e){let n={};for(let r of Object.keys(e)){let i=e[r],o=t[r];m1(r)&&He(o)?n[r]=o.map(s=>MI(s,i)):n[r]=MI(o,i);}return n}function T7(t,e,n){return e.$context||(e.$context=Object.assign(Object.create(t.getContext()),{element:e,id:n.id,type:"annotation"}))}function w7(t,e){let n=e.length,r=t.length;if(r<n){let i=n-r;t.splice(r,0,...new Array(i));}else r>n&&t.splice(n,r-n);return t}var I7="2.2.1",bl=new Map,k7=x1.concat(wy),tk={id:"annotation",version:I7,beforeRegister(){y8("chart.js","3.7",bo.version);},afterRegister(){bo.register(vl);},afterUnregister(){bo.unregister(vl);},beforeInit(t){bl.set(t,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:false,moveListened:false,hooks:{},hooked:false,hovered:[]});},beforeUpdate(t,e,n){let r=bl.get(t),i=r.annotations=[],o=n.annotations;Te(o)?Object.keys(o).forEach(s=>{let c=o[s];Te(c)&&(c.id=s,i.push(c));}):He(o)&&i.push(...o),V8(i,t.scales);},afterDataLimits(t,e){let n=bl.get(t);j8(t,e.scale,n.annotations.filter(r=>r.display&&r.adjustScaleRange));},afterUpdate(t,e,n){let r=bl.get(t);L8(t,r,n),P7(t,r,n,e.mode),r.visibleElements=r.elements.filter(i=>!i.skip&&i.options.display),G8(t,r,n);},beforeDatasetsDraw(t,e,n){_y(t,"beforeDatasetsDraw",n.clip);},afterDatasetsDraw(t,e,n){_y(t,"afterDatasetsDraw",n.clip);},beforeDraw(t,e,n){_y(t,"beforeDraw",n.clip);},afterDraw(t,e,n){_y(t,"afterDraw",n.clip);},beforeEvent(t,e,n){let r=bl.get(t);B8(r,e.event,n)&&(e.changed=true);},afterDestroy(t){bl.delete(t);},_getState(t){return bl.get(t)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:true,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:false,label:{}}},descriptors:{_indexable:false,_scriptable:t=>!k7.includes(t)&&t!=="init",annotations:{_allKeys:false,_fallback:(t,e)=>`elements.${vl[_1(e.type)].id}`},interaction:{_fallback:true},common:{label:{_indexable:m1,_fallback:true},_indexable:m1}},additionalOptionScopes:[""]};function _y(t,e,n){let{ctx:r,chartArea:i}=t,o=bl.get(t);n&&fl(r,i);let s=D7(o.visibleElements,e).sort((c,p)=>c.element.options.z-p.element.options.z);for(let c of s)A7(r,i,o,c);n&&hl(r);}function D7(t,e){let n=[];for(let r of t)if(r.options.drawTime===e&&n.push({element:r,main:true}),r.elements&&r.elements.length)for(let i of r.elements)i.options.display&&i.options.drawTime===e&&n.push({element:i});return n}function A7(t,e,n,r){let i=r.element;r.main?(SI(n,i,"beforeDraw"),i.draw(t,e),SI(n,i,"afterDraw")):i.draw(t,e);}var w1=bo.version,O7=w1?(t,e)=>t.parse(e):(t,e)=>e;function R7(t,e){let n=Vi(e)?parseFloat(e):O7(t,e);return t.getPixelForValue(n)}var ek=t=>t&&t.right>t.left&&t.bottom>t.top;function nk(t,e,n){return e==="r"?t.createRadialGradient(n.xCenter,n.yCenter,0,n.xCenter,n.yCenter,n.drawingArea):e==="y"?t.createLinearGradient(0,n.bottom,0,n.top):t.createLinearGradient(n.left,0,n.right,0)}function rk(t,e){e.forEach(function(n){t.addColorStop(n.stop,n.color.rgbString());});}function ik(t,e,n){if(t.options.has(e.key)){let i=t.options.get(e.key).filter(o=>o.datasetIndex===n);if(i.length)return i[0]}}function ok(t,e){if(t.type==="radialLinear"){let o=t.getDistanceFromCenterForValue(e);return {pixel:o,stop:o/t.drawingArea}}let n=t.options.reverse,r=R7(t,e),i=t.getDecimalForPixel(r);return {pixel:r,stop:n?1-i:i}}var T1=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,gd=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function F7(t,e,n){let r=e.color.rgb,i=gd(r.r/255),o=gd(r.g/255),s=gd(r.b/255),c=n.color.rgb,p=gd(c.r/255),h=gd(c.g/255),v=gd(c.b/255);return wc({r:Math.round(T1(i+t*(p-i))*255),g:Math.round(T1(o+t*(h-o))*255),b:Math.round(T1(s+t*(v-s))*255),a:r.a+t*Math.abs(c.a-r.a)})}function M7(t,e,n,r){let i=ik(t,e,n);if(!i||!i.stopColors.length)return;let{stop:o}=ok(i.scale,r),s,c;for(let p of i.stopColors){if(p.stop===o)return p.color;p.stop<o?s=p:p.stop>o&&!c&&(c=p);}return c?F7(o,s,c):s}var ak=[{key:"backgroundColor",legendItemKey:"fillStyle"},{key:"borderColor",legendItemKey:"strokeStyle"}],N7=(t,e)=>e.labels&&e.labels.font&&Fn(e.labels.font.size)?e.labels.font.size:t.options.font.size;function L7(t,e,n,r,i){let o=ik(t,n,r.datasetIndex);if(!o||!o.stopColors.length)return;let s=nk(e,o.axis,i);rk(s,o.stopColors),r[n.legendItemKey]=s;}function B7(t,{boxWidth:e,boxHeight:n}){return {top:t.top,left:t.left,bottom:t.top+n,right:t.left+e,xCenter:t.left+e/2,yCenter:t.top+n/2,drawingArea:Math.max(e,n)/2}}function U7(t,e,n,r){let i=t.legend.legendHitBoxes[n.datasetIndex],o=B7(i,r);ek(o)&&ak.forEach(function(s){L7(e,t.ctx,s,n,o);});}function $7(t,e,n,r){for(let i of t.legend.legendItems)ak.forEach(function(o){let s=n.data[i.index],c=M7(e,o,r,s);c&&c.valid&&(i[o.legendItemKey]=c.rgbString());});}function G7(t,e){let n=t.legend,r=n.options,i=r.labels.boxHeight?r.labels.boxHeight:N7(t,r),o=r.labels.boxWidth,s=t.data.datasets;for(let c=0;c<s.length;c++){let p=n.legendItems[c];p.datasetIndex===c?U7(t,e,p,{boxWidth:o,boxHeight:i}):$7(t,e,s[c],c);}}var Dy=new Map,j7=w1?(t,e)=>t[e+"Scale"]:(t,e)=>t.controller["_"+e+"Scale"];function V7(t,e,n){for(let r of Object.keys(e)){let{pixel:i,stop:o}=ok(t,r);if(isFinite(i)&&isFinite(o)){let s=wc(e[r]);s&&s.valid&&n.push({stop:Math.max(0,Math.min(1,o)),color:s});}}n.sort((r,i)=>r.stop-i.stop);}function z7(t,e,n,r){e[n]=r,t.dataset&&(t.dataset.options?t.dataset.options[n]=r:t.dataset[n]=r);}function H7(t,e,n,r){let i=t.options.get(n);return i?e.hidden||(i=i.filter(o=>o.datasetIndex!==r),t.options.set(n,i)):(i=[],t.options.set(n,i)),i}function W7(t,e,n,r,i){let o=t.ctx,s=t.getDatasetMeta(i);if(!s.hidden)for(let[c,p]of Object.entries(n)){let{axis:h,colors:v}=p;if(!v)continue;let P=j7(s,h);if(!P){console.warn(`Scale not found for '${h}'-axis in datasets[${i}] of chart id ${t.id}, skipping.`);continue}let x=H7(e,s,c,i),T={datasetIndex:i,axis:h,scale:P,stopColors:[]};x.push(T);let I=nk(o,h,P);V7(P,v,T.stopColors),T.stopColors.length&&(rk(I,T.stopColors),z7(s,r,c,I));}}var sk={id:"gradient",beforeInit(t){let e={};e.options=new Map,Dy.set(t,e);},beforeDatasetsUpdate(t){let e=t.chartArea;if(!ek(e))return;let n=Dy.get(t),r=t.data.datasets;for(let i=0;i<r.length;i++){let o=r[i],s=o.gradient;s&&W7(t,n,s,o,i);}},afterUpdate(t){let e=Dy.get(t);t.legend&&t.legend.options.display!==false&&w1&&G7(t,e);},destroy(t){Dy.delete(t);}};var q7=[Oc,ld,ds,rI,iI,nI,gI,us,Go,eI,cs,tk,sk];bo.register(...q7);function Ay(t){let e=ve(),n=e==null?void 0:e.stigg,r=e==null?void 0:e.updatedAt,i=Bv.useCallback(()=>ce(null,null,function*(){if(!n||!n.isCustomerLoaded)return null;try{let p={currencyId:t.currencyId,timeRange:t.timeRange};return yield n.getCreditUsage(p)}catch(p){throw console.error(p),p}}),[n,t.currencyId,t.timeRange,r]),{data:o,error:s,isLoading:c}=co({func:i});return Bv.useMemo(()=>({creditUsage:o,isLoading:c,error:s}),[o,s,c])}var lk={id:"redrawBeforeFirstDrawPlugin",beforeDraw(t){t.$rendered||(t.$rendered=true,t.update("none"));}};var I1=(t,e=1)=>{let n=Math.round(e*255).toString(16).padStart(2,"0");return `${t}${n}`};var k1=t=>t.palette.text.secondary,D1=t=>t.palette.outlinedBorder,A1=t=>({family:t.typography.fontFamily,size:parseInt(t.typography.body.fontSize)});function O1(t){let e=["#4caf50","#2196f3","#ff5722","#ff9800","#e91e63","#3f51b5","#00bcd4","#81c784","#64b5f6","#ff8a65","#ffb74d","#f06292","#7986cb","#4dd0e1","#a5d6a7","#90caf9","#ffab91","#ffcc80","#f48fb1","#9fa8da","#80deea"];return e[t%e.length]}function K7(t){let e=[],n=new Date;switch(t){case yi.LastDay:{let r=new Date(n);r.setHours(r.getHours()-23),r.setMinutes(0,0,0);for(let i=0;i<24;i++){let o=new Date(r);o.setHours(o.getHours()+i),e.push(o.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}));}break}case yi.LastWeek:{for(let r=6;r>=0;r--){let i=new Date(n);i.setDate(i.getDate()-r),e.push(i.toLocaleDateString("en-US",{month:"short",day:"2-digit"}));}break}case yi.LastYear:{for(let r=11;r>=0;r--){let i=new Date(n);i.setMonth(i.getMonth()-r),e.push(i.toLocaleDateString("en-US",{month:"short",year:"2-digit"}));}break}case yi.LastMonth:default:{for(let r=29;r>=0;r--){let i=new Date(n);i.setDate(i.getDate()-r),e.push(i.toLocaleDateString("en-US",{month:"short",day:"2-digit"}));}break}}return e}function X7(t,e){let n=new Date(t);switch(n.setMinutes(0,0,0),e){case yi.LastDay:return n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});case yi.LastYear:return t.toLocaleDateString("en-US",{month:"short",year:"2-digit"});case yi.LastWeek:case yi.LastMonth:default:return t.toLocaleDateString("en-US",{month:"short",day:"2-digit"})}}function Z7(t,e){return {responsive:true,maintainAspectRatio:false,interaction:{mode:"point",intersect:true},elements:{bar:{borderRadius:4,borderSkipped:"bottom"}},plugins:{legend:{display:false},tooltip:{enabled:false,external:e},datalabels:{display:false}},scales:{x:{type:"category",stacked:true,ticks:{color:k1(t),font:A1(t),maxRotation:45,maxTicksLimit:15},grid:{color:D1(t),drawOnChartArea:false,drawTicks:false}},y:{type:"linear",stacked:true,beginAtZero:true,ticks:{color:k1(t),font:A1(t),callback:n=>gr(Number(n))},grid:{color:I1(D1(t),.5),drawOnChartArea:true,drawTicks:false,borderDash:[5,5]}}}}}function ck(t,e,n,r){let i=K7(r);if(!t||!t.series||t.series.length===0)return {data:null,options:null};let o=t.series.map((p,h)=>{let v=p.featureName,P=new Map;p.points.forEach(I=>{let R=X7(new Date(I.timestamp),r),A=P.get(R)||0;P.set(R,A+I.value);});let x=i.map(I=>P.get(I)||0),T=O1(h);return {label:v,data:x,backgroundColor:I1(T,.8),borderColor:T,borderWidth:1}}).reverse(),s={labels:i,datasets:o},c=Z7(e,n);return {data:s,options:c}}var i9=300;function dk(t,e){let n=e.dataPoints[0],r=n.parsed.y,i=t.scales.y,o=r/i.max*(i.bottom-i.top),s=e.caretY+o/2,c=t.getDatasetMeta(n.datasetIndex).data[n.dataIndex],p=c.x-c.width/2,h=t.canvas.offsetTop+s,v=t.canvas.offsetLeft+p;return {top:h,left:v}}function o9(t,e){let n=t.canvas.offsetTop+e.caretY,r=t.canvas.offsetLeft+e.caretX;return {top:n,left:r}}function pk(t,e=o9){let[n,r]=Bv.useState(0),[i,o]=Bv.useState(0),[s,c]=Bv.useState(false),[p,h]=Bv.useState(),v=Bv.useCallback(x=>{let{chart:T,tooltip:I}=x;if(I.opacity===0){c(false);return}let{top:R,left:A}=e(T,I);o(A),r(R),h(t(I)),c(true);},[t,e]);return {tooltipInfo:{positionTop:n,positionLeft:i,isOpen:s,payload:p},tooltipHandler:v}}var a9=Q(material.Box)`
|
|
5650
5650
|
position: absolute;
|
|
5651
|
-
`,
|
|
5651
|
+
`,s9=Q.div`
|
|
5652
5652
|
position: absolute;
|
|
5653
5653
|
background-color: white;
|
|
5654
5654
|
border-radius: 8px;
|
|
@@ -5673,21 +5673,21 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5673
5673
|
transform: translateY(-50%);
|
|
5674
5674
|
filter: drop-shadow(2px 0 2px rgba(0, 0, 0, 0.1));
|
|
5675
5675
|
}
|
|
5676
|
-
`,
|
|
5676
|
+
`,fk=({children:t,tooltipInfo:{positionTop:e,positionLeft:n,payload:r,isOpen:i},$padding:o})=>{let[s,c]=Bv.useState(false),[p,h]=Bv.useState(false),v=Bv.useRef(r9__default.default(()=>h(false),i9));return Bv.useEffect(()=>{r&&(s||i)?(v.current.cancel(),h(true)):v.current();},[r,s,i]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(a9,{style:{top:e,left:n}}),jsxRuntime.jsx(s9,{$isOpen:p,$padding:o,style:{top:e,left:n-140},onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),children:t})]})};var d9=Q.div`
|
|
5677
5677
|
width: 3px;
|
|
5678
5678
|
margin-right: 15px;
|
|
5679
|
-
`;function
|
|
5679
|
+
`;function mk({tooltipInfo:t}){if(!t.payload)return jsxRuntime.jsx(jsxRuntime.Fragment,{});let{featureName:e,usage:n,date:r,color:i}=t.payload;return jsxRuntime.jsx(fk,{tooltipInfo:t,placement:"top",$padding:16,children:jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:8},className:"stigg-credit-usage-chart-tooltip",children:[jsxRuntime.jsx(d9,{style:{backgroundColor:i,marginTop:2}}),jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",children:r}),jsxRuntime.jsx(rt,{variant:"body1",color:"primary",children:e}),jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"},children:[jsxRuntime.jsx(rt,{variant:"body1",color:"primary",children:gr(n)}),jsxRuntime.jsx(rt,{variant:"body1",color:"primary",children:"Credits"})]})]})]})})}function gk(){let t=Bv.useCallback(e=>{if(lodash.isEmpty(e.dataPoints)||lodash.isEmpty(e.labelColors))return;let n=e.dataPoints[0],r=e.labelColors[0];if(!n||!r)return;let i=n.dataset.label||"Unknown Feature",o=n.parsed.y||0,s=n.label||"",c=r.backgroundColor;return {featureName:i,usage:o,date:s,color:c}},[]);return pk(t,dk)}var f9=Q.div`
|
|
5680
5680
|
padding: 8px;
|
|
5681
5681
|
margin: 0 12px;
|
|
5682
|
-
`,
|
|
5682
|
+
`,h9=Q.div`
|
|
5683
5683
|
display: flex;
|
|
5684
5684
|
align-items: center;
|
|
5685
|
-
`,
|
|
5685
|
+
`,m9=Q.div`
|
|
5686
5686
|
flex: 1;
|
|
5687
5687
|
position: relative;
|
|
5688
5688
|
align-items: center;
|
|
5689
5689
|
display: flex;
|
|
5690
|
-
`,
|
|
5690
|
+
`,g9=Q.div`
|
|
5691
5691
|
height: 24px;
|
|
5692
5692
|
width: ${({$width:t,$minContentWidth:e})=>{let n=Math.min(t,100),r=Math.max(e,80);return `max(${n}%, ${r}px)`}};
|
|
5693
5693
|
background-color: #f5f6f9;
|
|
@@ -5697,36 +5697,36 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5697
5697
|
align-items: center;
|
|
5698
5698
|
justify-content: space-between;
|
|
5699
5699
|
padding: 0 8px;
|
|
5700
|
-
`,
|
|
5700
|
+
`,y9=Q.div`
|
|
5701
5701
|
width: 12px;
|
|
5702
5702
|
height: 12px;
|
|
5703
5703
|
border-radius: 2px;
|
|
5704
5704
|
background-color: ${({$color:t})=>t};
|
|
5705
5705
|
margin-right: 8px;
|
|
5706
5706
|
flex-shrink: 0;
|
|
5707
|
-
`,
|
|
5707
|
+
`,b9=Q.div`
|
|
5708
5708
|
margin-right: 24px;
|
|
5709
5709
|
flex-shrink: 0;
|
|
5710
5710
|
overflow: hidden;
|
|
5711
5711
|
text-overflow: ellipsis;
|
|
5712
5712
|
white-space: nowrap;
|
|
5713
|
-
`;function
|
|
5713
|
+
`;function yk({creditUsageData:t}){var i,o;if(!t||!t.series||t.series.length===0)return null;let e=t.series.map((s,c)=>{let p=s.featureId,h=s.featureName,v=s.totalCredits,P=O1(c);return {featureId:p,featureName:h,totalCredits:v,color:P}}).sort((s,c)=>c.totalCredits-s.totalCredits),n=Math.max(...e.map(s=>s.totalCredits)),r=(s,c)=>{let p=Math.min(s.length*7,200),h=gr(c).length*8;return 20+p+16+h+16};return jsxRuntime.jsxs(f9,{className:"stigg-credit-usage-chart-legend",children:[jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntime.jsx(rt,{style:{marginBottom:12},variant:"body1",color:"secondary",className:"stigg-credit-usage-chart-legend-title",children:"Top sources"}),jsxRuntime.jsx(rt,{variant:"caption",color:"disabled",className:"stigg-credit-usage-chart-legend-title-currency-units",children:(o=(i=t.currency)==null?void 0:i.units)==null?void 0:o.plural})]}),jsxRuntime.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:e.map(s=>{let c=n>0?s.totalCredits/n*100:0,p=r(s.featureName,s.totalCredits);return jsxRuntime.jsx(h9,{className:`stigg-credit-usage-chart-legend-item stigg-credit-usage-chart-legend-item-${s.featureId}`,children:jsxRuntime.jsx(m9,{className:"stigg-credit-usage-chart-legend-bar-container",children:jsxRuntime.jsxs(g9,{$width:c,$minContentWidth:p,children:[jsxRuntime.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[jsxRuntime.jsx(y9,{$color:s.color}),jsxRuntime.jsx(b9,{className:"stigg-credit-usage-chart-legend-feature-name",children:jsxRuntime.jsx(rt,{variant:"body1",color:"primary",className:"stigg-credit-usage-chart-legend-feature-name-text",children:s.featureName})})]}),jsxRuntime.jsx(rt,{variant:"caption",color:"primary",bold:true,className:"stigg-credit-usage-chart-legend-value",children:gr(s.totalCredits)})]})})},s.featureId)})})]})}var v9=Q.div`
|
|
5714
5714
|
display: flex;
|
|
5715
5715
|
flex-direction: column;
|
|
5716
5716
|
justify-content: center;
|
|
5717
5717
|
align-items: center;
|
|
5718
5718
|
height: 100%;
|
|
5719
|
-
`,
|
|
5719
|
+
`,C9=Q(qn)`
|
|
5720
5720
|
svg {
|
|
5721
5721
|
width: 32px;
|
|
5722
5722
|
height: 32px;
|
|
5723
5723
|
}
|
|
5724
|
-
`;function
|
|
5724
|
+
`;function vk(){return jsxRuntime.jsxs(v9,{className:"stigg-credit-usage-chart-empty-state",children:[jsxRuntime.jsx(C9,{icon:"PayAsYouGoCharge",style:{display:"flex"}}),jsxRuntime.jsx(rt,{variant:"body1",color:"primary",bold:true,children:"No Usage Recorded"})]})}var P9=Q.div`
|
|
5725
5725
|
display: flex;
|
|
5726
5726
|
justify-content: center;
|
|
5727
5727
|
align-items: center;
|
|
5728
5728
|
height: 100%;
|
|
5729
|
-
`;function
|
|
5729
|
+
`;function Sk(){return jsxRuntime.jsx(P9,{className:"stigg-credit-usage-chart-error-state",children:jsxRuntime.jsx(rt,{variant:"body1",color:"error",children:"Failed to load credit usage"})})}var Pk=[{value:yi.LastDay,label:"Last 24 Hours"},{value:yi.LastWeek,label:"Last 7 Days"},{value:yi.LastMonth,label:"Last 30 Days"},{value:yi.LastYear,label:"Last 12 Months"}],T9=Q(material.Select)`
|
|
5730
5730
|
border-radius: 10px;
|
|
5731
5731
|
height: 38px;
|
|
5732
5732
|
min-width: 150px;
|
|
@@ -5734,7 +5734,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5734
5734
|
&:hover .MuiOutlinedInput-notchedOutline {
|
|
5735
5735
|
border-color: ${({theme:t})=>t.stigg.palette.outlinedBorder};
|
|
5736
5736
|
}
|
|
5737
|
-
`,
|
|
5737
|
+
`,w9=Q(material.OutlinedInput)`
|
|
5738
5738
|
& .MuiInputBase-input {
|
|
5739
5739
|
padding: 10px 12px;
|
|
5740
5740
|
}
|
|
@@ -5742,11 +5742,11 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5742
5742
|
&.Mui-focused .MuiOutlinedInput-notchedOutline {
|
|
5743
5743
|
border-color: ${({theme:t})=>t.stigg.palette.primary} !important;
|
|
5744
5744
|
}
|
|
5745
|
-
`;function
|
|
5745
|
+
`;function xk({isLoading:t,totalCredits:e,selectedTimeRange:n,setSelectedTimeRange:r,error:i,localization:o,currencyUnit:s}){return jsxRuntime.jsxs("div",{className:"stigg-credit-usage-chart-header",style:{display:"flex",flexDirection:"row",marginBottom:16,justifyContent:"space-between"},children:[jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:8,alignItems:"center"},children:[jsxRuntime.jsx(rt,{variant:"h3",color:"primary",className:"stigg-credit-usage-chart-title",children:o.title}),t?jsxRuntime.jsx(Un,{width:100,height:24}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(rt,{variant:"h6",color:"secondary",className:"stigg-credit-usage-chart-total",children:"|"}),jsxRuntime.jsxs(rt,{variant:"h6",color:"secondary",className:"stigg-credit-usage-chart-total",children:[o.totalSpend,": ",gr(e||0)," ",s||""]})]})]}),!t&&!i&&jsxRuntime.jsx(T9,{className:"stigg-credit-usage-chart-time-range-select",value:n,input:jsxRuntime.jsx(w9,{}),onChange:c=>r(c.target.value),renderValue:c=>{var p;return jsxRuntime.jsxs(rt,{variant:"body1",color:"primary",children:[((p=Pk.find(h=>h.value===c))==null?void 0:p.label)||""," "]})},children:Pk.map(c=>jsxRuntime.jsx(material.MenuItem,{value:c.value,children:jsxRuntime.jsx(rt,{variant:"body1",color:"primary",children:c.label})},c.value))})]})}var O9=Q.div`
|
|
5746
5746
|
display: flex;
|
|
5747
5747
|
flex-direction: column;
|
|
5748
5748
|
gap: 8px;
|
|
5749
|
-
`,
|
|
5749
|
+
`,R9=Q.div`
|
|
5750
5750
|
align-items: center;
|
|
5751
5751
|
justify-content: center;
|
|
5752
5752
|
min-height: 480px;
|
|
@@ -5757,44 +5757,44 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5757
5757
|
border-radius: 8px;
|
|
5758
5758
|
border: 1px solid ${({theme:t})=>{var e,n;return ((n=(e=t==null?void 0:t.stigg)==null?void 0:e.palette)==null?void 0:n.outlinedBorder)||"#e0e0e0"}};
|
|
5759
5759
|
background-color: ${({theme:t})=>{var e,n;return ((n=(e=t==null?void 0:t.stigg)==null?void 0:e.palette)==null?void 0:n.backgroundPaper)||"#ffffff"}};
|
|
5760
|
-
`,
|
|
5760
|
+
`,F9=Q(nl__default.default)`
|
|
5761
5761
|
border-radius: 4px;
|
|
5762
5762
|
height: 400px;
|
|
5763
5763
|
width: 100%;
|
|
5764
|
-
`;function
|
|
5764
|
+
`;function _k({currencyId:t,timeRange:e,localization:n}){var N,V;let r=pc(),i=ve({optional:true}),o=i==null?void 0:i.stigg,s=W(W({},pT),n),[c,p]=Bv.useState(e),{creditUsage:h,isLoading:v,error:P}=Ay({currencyId:t,timeRange:c}),{tooltipInfo:x,tooltipHandler:T}=gk(),{data:I,options:R}=Bv.useMemo(()=>ck(h||null,r,T,c),[h,r,T,c]),A=Bv.useMemo(()=>(h==null?void 0:h.series.reduce((G,X)=>G+X.totalCredits,0))||0,[h]),O=(V=(N=h==null?void 0:h.currency)==null?void 0:N.units)==null?void 0:V.plural;return jsxRuntime.jsx(vi,{componentTheme:r,children:jsxRuntime.jsxs(O9,{className:"stigg-credit-usage-chart-container",children:[jsxRuntime.jsx(R9,{className:"stigg-credit-usage-chart-card",children:jsxRuntime.jsxs("div",{style:{width:"100%"},children:[jsxRuntime.jsx(xk,{isLoading:v,totalCredits:A,selectedTimeRange:c,setSelectedTimeRange:p,error:P,localization:s,currencyUnit:O}),jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[jsxRuntime.jsx("div",{style:{height:"400px",position:"relative"},children:v?jsxRuntime.jsx(F9,{className:"stigg-credit-usage-chart-skeleton"}):P?jsxRuntime.jsx(Sk,{}):(h==null?void 0:h.series.length)===0?jsxRuntime.jsx(vk,{}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(mk,{tooltipInfo:x}),jsxRuntime.jsx(reactChartjs2.Bar,{className:"stigg-credit-usage-chart-bar",data:I!=null?I:{labels:[],datasets:[]},options:R!=null?R:{},plugins:[lk]})]})}),!v&&jsxRuntime.jsx(yk,{creditUsageData:h})]})]})}),jsxRuntime.jsx(so,{source:"credit_usage_chart",align:"end",smallScreenAlign:"end",style:{marginTop:0},showWatermark:o==null?void 0:o.getShowWatermark()})]})})}var N9=(t,e)=>t>=100?e.palette.progress.high:t>=75?e.palette.progress.medium:e.palette.progress.low,L9=Q.div`
|
|
5765
5765
|
width: 100%;
|
|
5766
5766
|
height: 8px;
|
|
5767
5767
|
background-color: ${({theme:t})=>t.stigg.palette.progress.background};
|
|
5768
5768
|
border-radius: 4px;
|
|
5769
5769
|
overflow: hidden;
|
|
5770
|
-
`,
|
|
5770
|
+
`,B9=Q.div`
|
|
5771
5771
|
height: 100%;
|
|
5772
5772
|
width: ${({percentage:t})=>Math.max(0,Math.min(100,t))}%;
|
|
5773
|
-
background-color: ${({theme:t,percentage:e})=>
|
|
5773
|
+
background-color: ${({theme:t,percentage:e})=>N9(e,t.stigg)};
|
|
5774
5774
|
border-radius: 4px;
|
|
5775
5775
|
transition: width 0.3s ease-in-out;
|
|
5776
|
-
`;function
|
|
5776
|
+
`;function wk({percentage:t,className:e}){return jsxRuntime.jsx(L9,{className:e,children:jsxRuntime.jsx(B9,{percentage:t})})}var $9=Q.div`
|
|
5777
5777
|
display: flex;
|
|
5778
5778
|
flex-direction: row;
|
|
5779
5779
|
justify-content: space-between;
|
|
5780
5780
|
align-items: baseline;
|
|
5781
5781
|
width: 100%;
|
|
5782
|
-
|
|
5782
|
+
`,G9=Q.div`
|
|
5783
5783
|
display: flex;
|
|
5784
5784
|
flex-direction: row;
|
|
5785
5785
|
gap: 4px;
|
|
5786
5786
|
align-items: baseline;
|
|
5787
|
-
`,
|
|
5787
|
+
`,j9=Q.div`
|
|
5788
5788
|
display: flex;
|
|
5789
5789
|
flex-direction: row;
|
|
5790
5790
|
gap: 4px;
|
|
5791
5791
|
align-items: baseline;
|
|
5792
|
-
`,
|
|
5792
|
+
`,V9=({totalConsumed:t,totalGranted:e})=>{let n=lT(t!=null?t:0,e!=null?e:0);return jsxRuntime.jsx(wk,{percentage:n,className:"stigg-credit-utilization-progress"})};function Ik({currencyId:t,decimalPlaces:e=null,showUnits:n=true,showSymbol:r=false,remainingLabel:i=xg.remaining}){let{balance:o,isLoading:s,error:c}=Zu({currencyId:t});if(c)return jsxRuntime.jsx(rt,{variant:"body1",color:"error",className:"stigg-credit-utilization-value-error",children:c.message||"Failed to load balance"});if(s)return jsxRuntime.jsx(nl__default.default,{width:280,height:24,className:"stigg-credit-utilization-value-loading"});if(o){let{currentBalance:p,totalConsumed:h,totalGranted:v}=o,P=Pg(o,n,r);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs($9,{children:[jsxRuntime.jsxs(G9,{children:[jsxRuntime.jsx(rt,{variant:"h3",color:"primary",bold:true,className:"stigg-credit-utilization-usage",children:ll(h,e)}),jsxRuntime.jsx(rt,{variant:"h3",color:"primary",className:"stigg-credit-utilization-separator",children:"/"}),jsxRuntime.jsx(rt,{variant:"h3",color:"primary",className:"stigg-credit-utilization-total",children:ll(v,e)}),jsxRuntime.jsx(rt,{variant:"caption",color:"secondary",className:"stigg-credit-utilization-suffix",children:P})]}),jsxRuntime.jsxs(j9,{children:[jsxRuntime.jsx(rt,{variant:"caption",color:"secondary",className:"stigg-credit-utilization-remaining-label",children:i}),jsxRuntime.jsx(rt,{variant:"caption",color:"primary",bold:true,className:"stigg-credit-utilization-remaining-value",children:ll(p,e)})]})]}),jsxRuntime.jsx(V9,{totalConsumed:o.totalConsumed,totalGranted:o.totalGranted})]})}return jsxRuntime.jsx(rt,{variant:"body1",color:"disabled",className:"stigg-credit-utilization-value-no-balance",children:"No balance data available"})}var H9=Q.div`
|
|
5793
5793
|
display: flex;
|
|
5794
5794
|
flex-direction: column;
|
|
5795
5795
|
gap: 8px;
|
|
5796
5796
|
width: 100%;
|
|
5797
|
-
`,
|
|
5797
|
+
`,W9=Q.div`
|
|
5798
5798
|
display: flex;
|
|
5799
5799
|
flex-direction: column;
|
|
5800
5800
|
gap: 16px;
|
|
@@ -5803,7 +5803,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5803
5803
|
border: 1px solid ${({theme:t})=>{var e,n;return (n=(e=t.stigg)==null?void 0:e.palette)==null?void 0:n.outlinedBorder}};
|
|
5804
5804
|
background-color: ${({theme:t})=>{var e,n;return (n=(e=t==null?void 0:t.stigg)==null?void 0:e.palette)==null?void 0:n.backgroundPaper}};
|
|
5805
5805
|
min-height: 90px;
|
|
5806
|
-
`;function
|
|
5806
|
+
`;function kk({currencyId:t,localization:e,decimalPlaces:n,showUnits:r=true,showSymbol:i=false}){let o=fc(Mo),s=ve({optional:true}),c=s==null?void 0:s.theme,{title:p,remaining:h}=W(W({},xg),e),v=jsxRuntime.jsx(H9,{className:"stigg-credit-utilization-container",children:jsxRuntime.jsxs(W9,{className:"stigg-credit-utilization-card",children:[jsxRuntime.jsx(rt,{variant:"h6",color:"primary",className:"stigg-credit-utilization-title",children:p}),jsxRuntime.jsx(Ik,{currencyId:t,decimalPlaces:n,showUnits:r,showSymbol:i,remainingLabel:h})]})});return o?v:jsxRuntime.jsx(vi,{componentTheme:c,children:v})}function Ny(t){let e=ve(),n=e==null?void 0:e.stigg,r=e==null?void 0:e.updatedAt,i=Bv.useCallback(()=>ce(null,null,function*(){if(!n||!n.isCustomerLoaded)return null;try{return n.getCreditGrants({currencyId:t.currencyId,paging:t.paging})}catch(p){throw console.error("Error fetching credit grants:",p),p}}),[n,t.currencyId,t.paging,r]),{data:o,error:s,isLoading:c}=co({func:i});return Bv.useMemo(()=>({creditGrants:(o==null?void 0:o.data)||[],paging:o==null?void 0:o.pageInfo,totalCount:o==null?void 0:o.totalCount,isLoading:c,error:s}),[o,s,c])}function F1({skeletonRows:t,visibleHeadCells:e,hideLastRowBorder:n}){return jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:t}).map((r,i)=>jsxRuntime.jsx(material.TableRow,{children:e.map(o=>jsxRuntime.jsx(bd,{$alignment:o.alignment,$width:o.width,$maxWidth:o.maxWidth,$minWidth:o.minWidth,$isLastRow:i===t-1,$hideLastRowBorder:n,children:jsxRuntime.jsx(nl__default.default,{width:o.width?parseInt(o.width.replace("px",""))-40:100,height:20})},String(o.id)))},i))})}function M1({data:t,visibleHeadCells:e,onRowClick:n,hideLastRowBorder:r}){return jsxRuntime.jsx(jsxRuntime.Fragment,{children:t.map((i,o)=>jsxRuntime.jsx(N1,{$clickable:!!n,onClick:()=>n&&n(i),children:e.map(s=>jsxRuntime.jsx(bd,{$alignment:s.alignment,$width:s.width,$maxWidth:s.maxWidth,$minWidth:s.minWidth,$isLastRow:o===t.length-1,$hideLastRowBorder:r,onClick:s.disableClick?c=>c.stopPropagation():void 0,children:jsxRuntime.jsx(L1,{$alignment:s.alignment,children:s.render(i)})},String(s.id)))},o))})}function Uy({errorMessage:t,className:e}){return t===void 0||typeof t=="string"?jsxRuntime.jsx(rt,{variant:"body1",color:"error",className:e,children:t||"An error occurred"}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:t})}function $y({message:t,className:e}){return t===void 0||typeof t=="string"?jsxRuntime.jsx(rt,{variant:"body1",color:"secondary",className:e,children:t||"No data available"}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:t})}var c$=Q(material.TableContainer)`
|
|
5807
5807
|
border-radius: 8px;
|
|
5808
5808
|
border: 1px solid ${({theme:t})=>t.stigg.palette.outlinedBorder};
|
|
5809
5809
|
background-color: ${({theme:t})=>t.stigg.palette.backgroundPaper};
|
|
@@ -5816,11 +5816,11 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5816
5816
|
align-items: center;
|
|
5817
5817
|
justify-content: center;
|
|
5818
5818
|
`}
|
|
5819
|
-
`,
|
|
5819
|
+
`,u$=Q(material.Table)`
|
|
5820
5820
|
min-width: 600px;
|
|
5821
5821
|
table-layout: auto;
|
|
5822
5822
|
width: 100%;
|
|
5823
|
-
`,
|
|
5823
|
+
`,d$=Q(material.Divider)`
|
|
5824
5824
|
border-color: ${({theme:t})=>t.stigg.palette.outlinedBorder};
|
|
5825
5825
|
`,bd=Q(material.TableCell)`
|
|
5826
5826
|
padding: 8px 12px;
|
|
@@ -5835,7 +5835,7 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5835
5835
|
${({$minWidth:t})=>t&&`min-width: ${t};`}
|
|
5836
5836
|
|
|
5837
5837
|
${({$isLastRow:t,$hideLastRowBorder:e})=>t&&e&&"border-bottom: none;"}
|
|
5838
|
-
`,
|
|
5838
|
+
`,p$=Q(bd)`
|
|
5839
5839
|
background-color: transparent;
|
|
5840
5840
|
`,N1=Q(material.TableRow)`
|
|
5841
5841
|
${({$clickable:t,theme:e})=>t&&`
|
|
@@ -5849,24 +5849,24 @@ ${e.o5f}`,e.zBW=r.default`
|
|
|
5849
5849
|
align-items: center;
|
|
5850
5850
|
justify-content: ${({$alignment:t})=>{switch(t){case "center":return "center";case "right":return "flex-end";default:return "flex-start"}}};
|
|
5851
5851
|
width: 100%;
|
|
5852
|
-
`,
|
|
5852
|
+
`,f$=Q(material.TablePagination)`
|
|
5853
5853
|
color: ${({theme:t})=>t.stigg.palette.text.secondary};
|
|
5854
|
-
`;function
|
|
5854
|
+
`;function h$({visibleHeadCells:t}){return jsxRuntime.jsx(material.TableHead,{children:jsxRuntime.jsx(material.TableRow,{children:t.map(e=>jsxRuntime.jsx(p$,{$alignment:e.alignment,$width:e.width,$maxWidth:e.maxWidth,$minWidth:e.minWidth,children:jsxRuntime.jsx(rt,{variant:"caption",children:e.label})},String(e.id)))})})}function Gy({data:t,headCells:e,isLoading:n=false,error:r=null,emptyMessage:i,errorMessage:o,onRowClick:s,className:c,skeletonRows:p=3,hideLastRowBorder:h=true,pageSize:v,pageNum:P,totalCount:x,onPageChange:T}){let I=e.filter(A=>A.visible!==false),R=!!r||!n&&t.length===0;return jsxRuntime.jsx(c$,{className:c,$hasMinHeight:R,children:r?jsxRuntime.jsx(Uy,{errorMessage:o,className:`${c}-error`}):!n&&t.length===0?jsxRuntime.jsx($y,{message:i,className:`${c}-empty`}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(u$,{children:[jsxRuntime.jsx(h$,{visibleHeadCells:I}),jsxRuntime.jsx(material.TableBody,{children:n?jsxRuntime.jsx(F1,{skeletonRows:p,visibleHeadCells:I,hideLastRowBorder:h}):jsxRuntime.jsx(M1,{data:t,visibleHeadCells:I,onRowClick:s,hideLastRowBorder:h})})]}),!!(t!=null&&t.length)&&T&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(d$,{}),jsxRuntime.jsx(f$,{component:"div",rowsPerPage:v!=null?v:t.length,rowsPerPageOptions:[v!=null?v:t.length],count:x!=null?x:t.length,page:P!=null?P:1,onPageChange:T,labelDisplayedRows:({from:A,to:O,count:N})=>`${Ya(A)}-${Ya(O)} of ${N!==-1?Ya(N):`more than ${Ya(O)}`}`})]})]})})}var g$=Q(material.Chip)`
|
|
5855
5855
|
font-size: 0.75rem;
|
|
5856
5856
|
height: 24px;
|
|
5857
5857
|
border-radius: 4px;
|
|
5858
5858
|
border: none;
|
|
5859
5859
|
background-color: ${({theme:t,$variant:e})=>{var n,r,i,o;return (o=(i=(r=(n=t==null?void 0:t.stigg)==null?void 0:n.palette)==null?void 0:r.statusChips)==null?void 0:i[e])==null?void 0:o.background}};
|
|
5860
5860
|
color: ${({theme:t,$variant:e})=>{var n,r,i,o;return (o=(i=(r=(n=t==null?void 0:t.stigg)==null?void 0:n.palette)==null?void 0:r.statusChips)==null?void 0:i[e])==null?void 0:o.text}};
|
|
5861
|
-
`;function U1(o){var s=o,{variant:t,label:e,className:n,size:r="small"}=s,i=On(s,["variant","label","className","size"]);return jsxRuntime.jsx(
|
|
5861
|
+
`;function U1(o){var s=o,{variant:t,label:e,className:n,size:r="small"}=s,i=On(s,["variant","label","className","size"]);return jsxRuntime.jsx(g$,W({label:e,size:r,$variant:t,className:n},i))}function Fk(t){let e=$1__default.default(),n=$1__default.default(t.effectiveAt),r=t.expireAt?$1__default.default(t.expireAt):null;return n.isAfter(e)?"SCHEDULED":r&&r.isBefore(e)?"EXPIRED":"AVAILABLE"}function Mk(t,e){return console.log("decimalPlaces",e),`${ll(t.consumedAmount,e)} / ${t.amount}`}function G1(t){return $1__default.default(t).format("MMM D, YYYY h:mmA")}function j1(t){return $1__default.default(t).format("MMM D, YYYY")}var V1=t=>{switch(t){case "AVAILABLE":return "success";case "SCHEDULED":return "warning";case "EXPIRED":return "error";default:return "neutral"}},Lk=t=>{switch(t){case hb.Promotional:return "Promotional";case hb.Paid:return "Top-up"}};function Bk({creditGrants:t,isLoading:e,error:n,localization:r,decimalPlaces:i,pageSize:o,pageNum:s,totalCount:c,onPageChange:p}){let h=t.map(P=>St(W({},P),{status:Fk(P)})),v=[{id:"effectiveAt",label:r.receivedAt,width:"205px",render:({effectiveAt:P})=>jsxRuntime.jsx(rt,{variant:"body1",className:"stigg-credit-grants-effective-date",children:G1(P)})},{id:"grantType",label:r.grantType,width:"205px",render:({grantType:P})=>jsxRuntime.jsx(rt,{variant:"body1",className:"stigg-credit-grants-grant-type",children:Lk(P)})},{id:"status",label:r.status,width:"205px",render:({status:P})=>{let x=lodash.capitalize(P),T=V1(P);return jsxRuntime.jsx(U1,{label:x,variant:T,className:"stigg-credit-grants-status-chip"})}},{id:"amount",label:r.balance,width:"205px",render:P=>jsxRuntime.jsx(rt,{variant:"body1",className:"stigg-credit-grants-balance",children:Mk(P,i)})},{id:"expireAt",label:r.expiryDate,width:"205px",render:({expireAt:P})=>jsxRuntime.jsx(rt,{variant:"body1",className:"stigg-credit-grants-expiry-date",children:P?j1(P):"-"})}];return jsxRuntime.jsx(Gy,{data:h,headCells:v,isLoading:e,error:n,emptyMessage:r.emptyState,loadingMessage:r.loadingState,errorMessage:r.errorState,className:"stigg-credit-grants-table",skeletonRows:(h==null?void 0:h.length)||3,pageNum:s,pageSize:o,totalCount:c,onPageChange:p})}var $k=(t,e,n)=>{let[r,i]=Bv.useState(0),[o,s]=Bv.useState(0);return {pageNumber:o,lastVisitedPage:r,pageChangeFunc:(p,h)=>{let v=h>o?{after:t==null?void 0:t.endCursor,first:n}:{before:t==null?void 0:t.startCursor,last:n};e(v),i(o),s(h);}}};var S$=10,P$=Q.div`
|
|
5862
5862
|
display: flex;
|
|
5863
5863
|
flex-direction: column;
|
|
5864
5864
|
gap: 8px;
|
|
5865
|
-
`,
|
|
5865
|
+
`,x$=Q.div`
|
|
5866
5866
|
display: flex;
|
|
5867
5867
|
flex-direction: column;
|
|
5868
5868
|
gap: 16px;
|
|
5869
|
-
`;function
|
|
5869
|
+
`;function Gk({currencyId:t,localization:e,decimalPlaces:n,pageSize:r=S$}){let i=ve({optional:true}),o=i==null?void 0:i.stigg,s=i==null?void 0:i.theme,c=W(W({},dT),e),[p,h]=Bv.useState({first:r}),{creditGrants:v,isLoading:P,error:x,paging:T,totalCount:I}=Ny({currencyId:t,pageSize:r,paging:p}),{pageNumber:R,pageChangeFunc:A}=$k(T,h,r);return jsxRuntime.jsx(vi,{componentTheme:s,children:jsxRuntime.jsxs(P$,{className:"stigg-credit-grants-container",children:[jsxRuntime.jsx(x$,{className:"stigg-credit-grants-card",children:jsxRuntime.jsx(Bk,{creditGrants:v,isLoading:P,error:x,localization:c,decimalPlaces:n,pageSize:r,pageNum:R,totalCount:I,onPageChange:A})}),jsxRuntime.jsx(so,{source:"grant_list",align:"end",smallScreenAlign:"end",style:{marginTop:0},showWatermark:o==null?void 0:o.getShowWatermark()})]})})}/*! Bundled license information:
|
|
5870
5870
|
|
|
5871
5871
|
@stigg/js-client-sdk/dist/index.esm.js:
|
|
5872
5872
|
(*! For license information please see index.esm.js.LICENSE.txt *)
|
|
@@ -5912,4 +5912,4 @@ chartjs-plugin-gradient/dist/chartjs-plugin-gradient.esm.js:
|
|
|
5912
5912
|
* (c) 2022 Jukka Kurkela
|
|
5913
5913
|
* Released under the MIT License
|
|
5914
5914
|
*)
|
|
5915
|
-
*/exports.AccessDeniedReason=w$;exports.AccountAccessMethod=I$;exports.AccountAccessRole=k$;exports.AccountStatus=D$;exports.AddonDependencyFragmentDoc=A$;exports.AddonFragmentDoc=O$;exports.AddonSortFields=R$;exports.AddonsList=ym;exports.AggregationFunction=F$;exports.Alignment=Jh;exports.ApiKeySortFields=M$;exports.ApiKeyType=N$;exports.ApplySubscriptionDocument=L$;exports.ApplySubscriptionFragmentDoc=B$;exports.ArchiveCustomerDocument=U$;exports.Auth0ApplicationType=$$;exports.BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT=J1;exports.BillingAnchor=G$;exports.BillingCadence=j$;exports.BillingModel=nn;exports.BillingPeriod=be;exports.BillingVendorIdentifier=kp;exports.BooleanEntitlementGuard=M5;exports.CancelSubscriptionDocument=V$;exports.CancelSubscriptionUpdatesDocument=z$;exports.ChangeType=H$;exports.Checkout=iT;exports.CheckoutConfigurationFragmentDoc=W$;exports.CheckoutStateFragmentDoc=q$;exports.ConditionOperation=Y$;exports.CouponFragmentDoc=Q$;exports.CouponSortFields=K$;exports.CouponSource=X$;exports.CouponStatus=Z$;exports.CouponType=J$;exports.CreatePaymentSessionDocument=tG;exports.CreateSubscriptionDocument=eG;exports.CreditBalance=pT;exports.CreditBalanceFragmentDoc=nG;exports.CreditBalanceUpdatedPayloadFragmentDoc=rG;exports.CreditGrantFragmentDoc=iG;exports.CreditGrantType=hb;exports.CreditGrants=$k;exports.CreditLedgerEventType=oG;exports.CreditLedgerFragmentDoc=aG;exports.CreditUsageChart=Ek;exports.CreditUsageFragmentDoc=sG;exports.CreditUsageTimeRange=yi;exports.CreditUtilization=Ik;exports.CreditsBalanceSummaryFragmentDoc=lG;exports.Currency=Ru;exports.CustomerFragmentDoc=cG;exports.CustomerModel=uG;exports.CustomerPortal=dx;exports.CustomerPortalBillingInformationFragmentDoc=dG;exports.CustomerPortalConfigurationFragmentDoc=pG;exports.CustomerPortalEntitlementFragmentDoc=fG;exports.CustomerPortalFragmentDoc=hG;exports.CustomerPortalPromotionalEntitlementFragmentDoc=mG;exports.CustomerPortalProvider=gm;exports.CustomerPortalSubscriptionAddonFragmentDoc=gG;exports.CustomerPortalSubscriptionFragmentDoc=yG;exports.CustomerPortalSubscriptionPriceFragmentDoc=bG;exports.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc=vG;exports.CustomerResourceFragmentDoc=CG;exports.CustomerResourceSortFields=SG;exports.CustomerSortFields=PG;exports.CustomerStatisticsFragmentDoc=xG;exports.CustomerSubscriptionSortFields=EG;exports.CustomerUsageData=Nm;exports.CustomerWithSubscriptionsFragmentDoc=_G;exports.DelegateSubscriptionToCustomerDocument=TG;exports.Department=wG;exports.DetachCustomerPaymentMethodDocument=IG;exports.DiscountDurationType=tm;exports.DiscountType=mb;exports.ENUM_DEFAULT_FALLBACK_ENTITLEMENT=tC;exports.EmptyState=$y;exports.EntitlementBehavior=kG;exports.EntitlementFragmentDoc=DG;exports.EntitlementResetPeriod=Ro;exports.EntitlementUsageUpdatedFragmentDoc=AG;exports.EntitlementsStateAccessDeniedReason=OG;exports.EntitlementsUpdatedPayloadFragmentDoc=RG;exports.EntitySelectionMode=FG;exports.EnumEntitlementGuard=z5;exports.EnvironmentAccessRole=MG;exports.EnvironmentProvisionStatus=NG;exports.EnvironmentSortFields=LG;exports.EnvironmentType=BG;exports.ErrorCode=UG;exports.ErrorState=Uy;exports.EstimateSubscriptionDocument=$G;exports.EstimateSubscriptionUpdateDocument=GG;exports.EventActor=jG;exports.EventEntityType=VG;exports.EventLogSortFields=zG;exports.EventLogType=HG;exports.ExperimentGroupType=WG;exports.ExperimentSortFields=qG;exports.ExperimentStatus=YG;exports.FeatureFragmentDoc=QG;exports.FeatureGroupSortFields=KG;exports.FeatureGroupStatus=XG;exports.FeatureSortFields=ZG;exports.FeatureStatus=JG;exports.FeatureType=tj;exports.FontVariantFragmentDoc=ej;exports.FontWeight=gb;exports.GenericTable=Gy;exports.GetActiveSubscriptionsDocument=nj;exports.GetActiveSubscriptionsListDocument=rj;exports.GetCheckoutStateDocument=ij;exports.GetCouponsDocument=oj;exports.GetCreditBalanceDocument=aj;exports.GetCreditGrantsDocument=sj;exports.GetCreditLedgerDocument=lj;exports.GetCreditUsageDocument=cj;exports.GetCustomerByIdDocument=uj;exports.GetCustomerPortalByRefIdDocument=dj;exports.GetCustomerStatisticsDocument=pj;exports.GetEntitlementDocument=fj;exports.GetEntitlementsDocument=hj;exports.GetEntitlementsStateDocument=mj;exports.GetMockPaywallDocument=gj;exports.GetPaywallDocument=yj;exports.GetProductsDocument=bj;exports.GetSdkConfigurationDocument=vj;exports.GetSubscriptionDocument=Cj;exports.GetSubscriptionsDocument=Sj;exports.GetUsageHistoryDocument=Pj;exports.GetUsageHistoryV2Document=xj;exports.GrantCreditsDocument=Ej;exports.GrantPromotionalEntitlementsDocument=_j;exports.GrantPromotionalEntitlementsGroupDocument=Tj;exports.HookSortFields=wj;exports.HookStatus=Ij;exports.ImmediateSubscriptionPreviewInvoiceFragmentDoc=kj;exports.ImportCustomerBulkDocument=Dj;exports.ImportCustomerDocument=Aj;exports.ImportIntegrationTaskSortFields=Oj;exports.ImportSubscriptionsBulkDocument=Rj;exports.IntegrationSortFields=Fj;exports.InvoiceLineItemType=Mj;exports.InvoicesSection=Lm;exports.LayoutConfigurationFragmentDoc=Nj;exports.LogLevel=Lj;exports.METERED_DEFAULT_FALLBACK_ENTITLEMENT=eC;exports.MemberSortFields=Bj;exports.MemberStatus=Uj;exports.MeterType=yb;exports.MeteredEntitlementGuard=G5;exports.MigrateSubscriptionToLatestDocument=$j;exports.MockPaywallAddonDependencyFragmentDoc=Gj;exports.MockPaywallAddonFragmentDoc=jj;exports.MockPaywallPackageEntitlementFragmentDoc=Vj;exports.MockPaywallPlanCompatiblePackageGroupsFragmentDoc=zj;exports.MockPaywallPlanFragmentDoc=Hj;exports.MockPaywallPriceFragmentDoc=Wj;exports.MonthlyAccordingTo=qj;exports.NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT=nC;exports.NumericEntitlementGuard=B5;exports.OfferSortFields=Yj;exports.OfferStatus=Qj;exports.OfflineStigg=Kj;exports.OnCreditBalanceUpdatedDocument=Xj;exports.OnEntitlementsUpdatedDocument=Zj;exports.OnPackagePublishedDocument=Jj;exports.OnUsageUpdatedDocument=tV;exports.OverageBillingPeriod=eV;exports.OveragePriceFragmentDoc=nV;exports.PackageDtoSortFields=rV;exports.PackageEntitlementFragmentDoc=iV;exports.PackageEntitlementSortFields=oV;exports.PackageGroupSortFields=aV;exports.PackageGroupStatus=sV;exports.PackagePublishedPayloadFragmentDoc=lV;exports.PackageStatus=cV;exports.PageInfoFragmentDoc=uV;exports.PaymentCollection=em;exports.PaymentCollectionMethod=dV;exports.PaymentDetailsSection=Fm;exports.PaymentMethodType=pV;exports.PaymentSessionFragmentDoc=fV;exports.Paywall=HS;exports.PaywallCalculatedPricePointsFragmentDoc=hV;exports.PaywallConfigurationFragmentDoc=mV;exports.PaywallCurrencyFragmentDoc=gV;exports.PaywallFragmentDoc=yV;exports.PlanChangeType=bV;exports.PlanCompatiblePackageGroupsFragmentDoc=vV;exports.PlanFragmentDoc=CV;exports.PlanSortFields=SV;exports.PreviewNextInvoiceDocument=PV;exports.PreviewSubscriptionDocument=xV;exports.PriceFragmentDoc=EV;exports.PriceSortFields=_V;exports.PriceTierFragmentDoc=TV;exports.PricingType=Rn;exports.ProductFragmentDoc=wV;exports.ProductSortFields=IV;exports.PromotionalEntitlementFragmentDoc=kV;exports.PromotionalEntitlementPeriod=DV;exports.PromotionalEntitlementSortFields=AV;exports.PromotionalEntitlementStatus=OV;exports.Promotions=vm;exports.ProrationBehavior=RV;exports.ProvisionCustomerDocument=FV;exports.ProvisionCustomerFragmentDoc=MV;exports.ProvisionStatus=i0;exports.ProvisionSubscriptionDocument=NV;exports.ProvisionSubscriptionFragmentDoc=LV;exports.ProvisionSubscriptionStatus=BV;exports.PublishMigrationType=UV;exports.ReportEntitlementCheckRequestedDocument=$V;exports.ReportEventDocument=GV;exports.ReportUsageBulkDocument=jV;exports.ReportUsageDocument=VV;exports.ReportUsageFragmentDoc=zV;exports.ResetPeriodConfigurationFragmentDoc=HV;exports.RevokePromotionalEntitlementDocument=WV;exports.RevokePromotionalEntitlementsGroupDocument=qV;exports.ScheduleStrategy=YV;exports.ScheduleVariablesFragmentDoc=QV;exports.SlimCustomCurrencyFragmentDoc=KV;exports.SlimCustomerFragmentDoc=XV;exports.SlimSubscriptionFragmentDoc=ZV;exports.SlimSubscriptionFragmentV2FragmentDoc=JV;exports.SortDirection=tz;exports.SortNulls=ez;exports.SourceType=nz;exports.StatusChip=U1;exports.StiggContext=Gp;exports.StiggProvider=TA;exports.StripeCheckoutCredentialsFragmentDoc=rz;exports.SubscribeIntentionType=kb;exports.SubscriptionAddonSortFields=iz;exports.SubscriptionCancelReason=oz;exports.SubscriptionCancellationAction=az;exports.SubscriptionCancellationTime=sz;exports.SubscriptionCouponStatus=lz;exports.SubscriptionDecisionStrategy=cz;exports.SubscriptionEndSetup=uz;exports.SubscriptionEntitlementSortFields=dz;exports.SubscriptionFragmentDoc=pz;exports.SubscriptionFutureUpdateDataFragmentDoc=fz;exports.SubscriptionInvoiceBillingReason=hz;exports.SubscriptionInvoiceFragmentDoc=mz;exports.SubscriptionInvoicePreviewFragmentDoc=gz;exports.SubscriptionInvoiceStatus=yz;exports.SubscriptionMigrationTaskSortFields=bz;exports.SubscriptionMigrationTime=vz;exports.SubscriptionPreviewFragmentDoc=Cz;exports.SubscriptionPreviewInvoiceFragmentDoc=Sz;exports.SubscriptionPreviewV2FragmentDoc=Pz;exports.SubscriptionPriceSortFields=xz;exports.SubscriptionProrationBehavior=Ez;exports.SubscriptionQueryFragmentDoc=_z;exports.SubscriptionQuerySortFields=Tz;exports.SubscriptionScheduleStatus=wz;exports.SubscriptionScheduleType=Ui;exports.SubscriptionScheduledUpdateDataFragmentDoc=Iz;exports.SubscriptionStartSetup=kz;exports.SubscriptionStatus=bi;exports.SubscriptionTrialConfigurationFragmentDoc=Dz;exports.SubscriptionUpdateUsageCutoffBehavior=Az;exports.SubscriptionsOverview=km;exports.SyncStatus=Oz;exports.TaskStatus=Rz;exports.TaskType=Fz;exports.TiersMode=ic;exports.TotalPriceFragmentDoc=Mz;exports.TransferSubscriptionDocument=Nz;exports.TransferSubscriptionToResourceDocument=Lz;exports.TrialEndBehavior=Bz;exports.TrialPeriodUnits=Uz;exports.TypographyConfigurationFragmentDoc=$z;exports.UnarchiveCustomerDocument=Gz;exports.UnitTransformationRound=jz;exports.UnlinkPromotionalEntitlementsGroupDocument=Vz;exports.UpdateCustomerDocument=zz;exports.UpdateSubscriptionDocument=Hz;exports.UsageHistoryFragmentDoc=Wz;exports.UsageHistoryV2FragmentDoc=qz;exports.UsageMarkerType=Yz;exports.UsageMeasurementSortFields=Qz;exports.UsageUpdateBehavior=Kz;exports.UsageUpdatedFragmentDoc=Xz;exports.VendorIdentifier=Zz;exports.VendorType=Jz;exports.VoidCreditGrantDocument=tH;exports.WeeklyAccordingTo=eH;exports.WidgetType=Fu;exports.YearlyAccordingTo=nH;exports.ZuoraCheckoutCredentialsFragmentDoc=rH;exports.__esModule=iH;exports.formatDateOnly=j1;exports.formatDateTime=G1;exports.getSdk=oH;exports.mapCreditGrantStatusToVariant=V1;exports.useActiveSubscriptions=VE;exports.useBooleanEntitlement=ig;exports.useCreditBalance=Zu;exports.useCreditGrants=Ny;exports.useCreditUsage=Ay;exports.useCustomerPortal=HE;exports.useEnumEntitlement=sg;exports.useMeteredEntitlement=ag;exports.useNumericEntitlement=og;exports.usePaywall=zE;exports.useStiggContext=ve;exports.useWaitForCheckoutCompleted=aT;
|
|
5915
|
+
*/exports.AccessDeniedReason=I$;exports.AccountAccessMethod=k$;exports.AccountAccessRole=D$;exports.AccountStatus=A$;exports.AddonDependencyFragmentDoc=O$;exports.AddonFragmentDoc=R$;exports.AddonSortFields=F$;exports.AddonsList=ym;exports.AggregationFunction=M$;exports.Alignment=Jh;exports.ApiKeySortFields=N$;exports.ApiKeyType=L$;exports.ApplySubscriptionDocument=B$;exports.ApplySubscriptionFragmentDoc=U$;exports.ArchiveCustomerDocument=$$;exports.Auth0ApplicationType=G$;exports.BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT=J1;exports.BillingAnchor=j$;exports.BillingCadence=V$;exports.BillingModel=nn;exports.BillingPeriod=be;exports.BillingVendorIdentifier=kp;exports.BooleanEntitlementGuard=N5;exports.CancelSubscriptionDocument=z$;exports.CancelSubscriptionUpdatesDocument=H$;exports.ChangeType=W$;exports.Checkout=oT;exports.CheckoutConfigurationFragmentDoc=q$;exports.CheckoutStateFragmentDoc=Y$;exports.ConditionOperation=Q$;exports.CouponFragmentDoc=K$;exports.CouponSortFields=X$;exports.CouponSource=Z$;exports.CouponStatus=J$;exports.CouponType=tG;exports.CreatePaymentSessionDocument=eG;exports.CreateSubscriptionDocument=nG;exports.CreditBalance=fT;exports.CreditBalanceFragmentDoc=rG;exports.CreditBalanceUpdatedPayloadFragmentDoc=iG;exports.CreditGrantFragmentDoc=oG;exports.CreditGrantType=hb;exports.CreditGrants=Gk;exports.CreditLedgerEventType=aG;exports.CreditLedgerFragmentDoc=sG;exports.CreditUsageChart=_k;exports.CreditUsageFragmentDoc=lG;exports.CreditUsageTimeRange=yi;exports.CreditUtilization=kk;exports.CreditsBalanceSummaryFragmentDoc=cG;exports.Currency=Ru;exports.CustomerFragmentDoc=uG;exports.CustomerModel=dG;exports.CustomerPortal=dx;exports.CustomerPortalBillingInformationFragmentDoc=pG;exports.CustomerPortalConfigurationFragmentDoc=fG;exports.CustomerPortalEntitlementFragmentDoc=hG;exports.CustomerPortalFragmentDoc=mG;exports.CustomerPortalPromotionalEntitlementFragmentDoc=gG;exports.CustomerPortalProvider=gm;exports.CustomerPortalSubscriptionAddonFragmentDoc=yG;exports.CustomerPortalSubscriptionFragmentDoc=bG;exports.CustomerPortalSubscriptionPriceFragmentDoc=vG;exports.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc=CG;exports.CustomerResourceFragmentDoc=SG;exports.CustomerResourceSortFields=PG;exports.CustomerSortFields=xG;exports.CustomerStatisticsFragmentDoc=EG;exports.CustomerSubscriptionSortFields=_G;exports.CustomerUsageData=Nm;exports.CustomerWithSubscriptionsFragmentDoc=TG;exports.DelegateSubscriptionToCustomerDocument=wG;exports.Department=IG;exports.DetachCustomerPaymentMethodDocument=kG;exports.DiscountDurationType=tm;exports.DiscountType=mb;exports.ENUM_DEFAULT_FALLBACK_ENTITLEMENT=tC;exports.EmptyState=$y;exports.EntitlementBehavior=DG;exports.EntitlementFragmentDoc=AG;exports.EntitlementResetPeriod=Ro;exports.EntitlementUsageUpdatedFragmentDoc=OG;exports.EntitlementsStateAccessDeniedReason=RG;exports.EntitlementsUpdatedPayloadFragmentDoc=FG;exports.EntitySelectionMode=MG;exports.EnumEntitlementGuard=H5;exports.EnvironmentAccessRole=NG;exports.EnvironmentProvisionStatus=LG;exports.EnvironmentSortFields=BG;exports.EnvironmentType=UG;exports.ErrorCode=$G;exports.ErrorState=Uy;exports.EstimateSubscriptionDocument=GG;exports.EstimateSubscriptionUpdateDocument=jG;exports.EventActor=VG;exports.EventEntityType=zG;exports.EventLogSortFields=HG;exports.EventLogType=WG;exports.ExperimentGroupType=qG;exports.ExperimentSortFields=YG;exports.ExperimentStatus=QG;exports.FeatureFragmentDoc=KG;exports.FeatureGroupSortFields=XG;exports.FeatureGroupStatus=ZG;exports.FeatureSortFields=JG;exports.FeatureStatus=tj;exports.FeatureType=ej;exports.FontVariantFragmentDoc=nj;exports.FontWeight=gb;exports.GenericTable=Gy;exports.GetActiveSubscriptionsDocument=rj;exports.GetActiveSubscriptionsListDocument=ij;exports.GetCheckoutStateDocument=oj;exports.GetCouponsDocument=aj;exports.GetCreditBalanceDocument=sj;exports.GetCreditGrantsDocument=lj;exports.GetCreditLedgerDocument=cj;exports.GetCreditUsageDocument=uj;exports.GetCustomerByIdDocument=dj;exports.GetCustomerPortalByRefIdDocument=pj;exports.GetCustomerStatisticsDocument=fj;exports.GetEntitlementDocument=hj;exports.GetEntitlementsDocument=mj;exports.GetEntitlementsStateDocument=gj;exports.GetMockPaywallDocument=yj;exports.GetPaywallDocument=bj;exports.GetProductsDocument=vj;exports.GetSdkConfigurationDocument=Cj;exports.GetSubscriptionDocument=Sj;exports.GetSubscriptionsDocument=Pj;exports.GetUsageHistoryDocument=xj;exports.GetUsageHistoryV2Document=Ej;exports.GrantCreditsDocument=_j;exports.GrantPromotionalEntitlementsDocument=Tj;exports.GrantPromotionalEntitlementsGroupDocument=wj;exports.HookSortFields=Ij;exports.HookStatus=kj;exports.ImmediateSubscriptionPreviewInvoiceFragmentDoc=Dj;exports.ImportCustomerBulkDocument=Aj;exports.ImportCustomerDocument=Oj;exports.ImportIntegrationTaskSortFields=Rj;exports.ImportSubscriptionsBulkDocument=Fj;exports.IntegrationSortFields=Mj;exports.InvoiceLineItemType=Nj;exports.InvoicesSection=Lm;exports.LayoutConfigurationFragmentDoc=Lj;exports.LogLevel=Bj;exports.METERED_DEFAULT_FALLBACK_ENTITLEMENT=eC;exports.MemberSortFields=Uj;exports.MemberStatus=$j;exports.MeterType=yb;exports.MeteredEntitlementGuard=j5;exports.MigrateSubscriptionToLatestDocument=Gj;exports.MockPaywallAddonDependencyFragmentDoc=jj;exports.MockPaywallAddonFragmentDoc=Vj;exports.MockPaywallPackageEntitlementFragmentDoc=zj;exports.MockPaywallPlanCompatiblePackageGroupsFragmentDoc=Hj;exports.MockPaywallPlanFragmentDoc=Wj;exports.MockPaywallPriceFragmentDoc=qj;exports.MonthlyAccordingTo=Yj;exports.NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT=nC;exports.NumericEntitlementGuard=U5;exports.OfferSortFields=Qj;exports.OfferStatus=Kj;exports.OfflineStigg=Xj;exports.OnCreditBalanceUpdatedDocument=Zj;exports.OnEntitlementsUpdatedDocument=Jj;exports.OnPackagePublishedDocument=tV;exports.OnUsageUpdatedDocument=eV;exports.OverageBillingPeriod=nV;exports.OveragePriceFragmentDoc=rV;exports.PackageDtoSortFields=iV;exports.PackageEntitlementFragmentDoc=oV;exports.PackageEntitlementSortFields=aV;exports.PackageGroupSortFields=sV;exports.PackageGroupStatus=lV;exports.PackagePublishedPayloadFragmentDoc=cV;exports.PackageStatus=uV;exports.PageInfoFragmentDoc=dV;exports.PaymentCollection=em;exports.PaymentCollectionMethod=pV;exports.PaymentDetailsSection=Fm;exports.PaymentMethodType=fV;exports.PaymentSessionFragmentDoc=hV;exports.Paywall=HS;exports.PaywallCalculatedPricePointsFragmentDoc=mV;exports.PaywallConfigurationFragmentDoc=gV;exports.PaywallCurrencyFragmentDoc=yV;exports.PaywallFragmentDoc=bV;exports.PlanChangeType=vV;exports.PlanCompatiblePackageGroupsFragmentDoc=CV;exports.PlanFragmentDoc=SV;exports.PlanSortFields=PV;exports.PreviewNextInvoiceDocument=xV;exports.PreviewSubscriptionDocument=EV;exports.PriceFragmentDoc=_V;exports.PriceSortFields=TV;exports.PriceTierFragmentDoc=wV;exports.PricingType=Rn;exports.ProductFragmentDoc=IV;exports.ProductSortFields=kV;exports.PromotionalEntitlementFragmentDoc=DV;exports.PromotionalEntitlementPeriod=AV;exports.PromotionalEntitlementSortFields=OV;exports.PromotionalEntitlementStatus=RV;exports.Promotions=vm;exports.ProrationBehavior=FV;exports.ProvisionCustomerDocument=MV;exports.ProvisionCustomerFragmentDoc=NV;exports.ProvisionStatus=i0;exports.ProvisionSubscriptionDocument=LV;exports.ProvisionSubscriptionFragmentDoc=BV;exports.ProvisionSubscriptionStatus=UV;exports.PublishMigrationType=$V;exports.ReportEntitlementCheckRequestedDocument=GV;exports.ReportEventDocument=jV;exports.ReportUsageBulkDocument=VV;exports.ReportUsageDocument=zV;exports.ReportUsageFragmentDoc=HV;exports.ResetPeriodConfigurationFragmentDoc=WV;exports.RevokePromotionalEntitlementDocument=qV;exports.RevokePromotionalEntitlementsGroupDocument=YV;exports.ScheduleStrategy=QV;exports.ScheduleVariablesFragmentDoc=KV;exports.SlimCustomCurrencyFragmentDoc=XV;exports.SlimCustomerFragmentDoc=ZV;exports.SlimSubscriptionFragmentDoc=JV;exports.SlimSubscriptionFragmentV2FragmentDoc=tz;exports.SortDirection=ez;exports.SortNulls=nz;exports.SourceType=rz;exports.StatusChip=U1;exports.StiggContext=Gp;exports.StiggProvider=wA;exports.StripeCheckoutCredentialsFragmentDoc=iz;exports.SubscribeIntentionType=kb;exports.SubscriptionAddonSortFields=oz;exports.SubscriptionCancelReason=az;exports.SubscriptionCancellationAction=sz;exports.SubscriptionCancellationTime=lz;exports.SubscriptionCouponStatus=cz;exports.SubscriptionDecisionStrategy=uz;exports.SubscriptionEndSetup=dz;exports.SubscriptionEntitlementSortFields=pz;exports.SubscriptionFragmentDoc=fz;exports.SubscriptionFutureUpdateDataFragmentDoc=hz;exports.SubscriptionInvoiceBillingReason=mz;exports.SubscriptionInvoiceFragmentDoc=gz;exports.SubscriptionInvoicePreviewFragmentDoc=yz;exports.SubscriptionInvoiceStatus=bz;exports.SubscriptionMigrationTaskSortFields=vz;exports.SubscriptionMigrationTime=Cz;exports.SubscriptionPreviewFragmentDoc=Sz;exports.SubscriptionPreviewInvoiceFragmentDoc=Pz;exports.SubscriptionPreviewV2FragmentDoc=xz;exports.SubscriptionPriceSortFields=Ez;exports.SubscriptionProrationBehavior=_z;exports.SubscriptionQueryFragmentDoc=Tz;exports.SubscriptionQuerySortFields=wz;exports.SubscriptionScheduleStatus=Iz;exports.SubscriptionScheduleType=Ui;exports.SubscriptionScheduledUpdateDataFragmentDoc=kz;exports.SubscriptionStartSetup=Dz;exports.SubscriptionStatus=bi;exports.SubscriptionTrialConfigurationFragmentDoc=Az;exports.SubscriptionUpdateUsageCutoffBehavior=Oz;exports.SubscriptionsOverview=km;exports.SyncStatus=Rz;exports.TaskStatus=Fz;exports.TaskType=Mz;exports.TiersMode=ic;exports.TotalPriceFragmentDoc=Nz;exports.TransferSubscriptionDocument=Lz;exports.TransferSubscriptionToResourceDocument=Bz;exports.TrialEndBehavior=Uz;exports.TrialPeriodUnits=$z;exports.TypographyConfigurationFragmentDoc=Gz;exports.UnarchiveCustomerDocument=jz;exports.UnitTransformationRound=Vz;exports.UnlinkPromotionalEntitlementsGroupDocument=zz;exports.UpdateCustomerDocument=Hz;exports.UpdateSubscriptionDocument=Wz;exports.UsageHistoryFragmentDoc=qz;exports.UsageHistoryV2FragmentDoc=Yz;exports.UsageMarkerType=Qz;exports.UsageMeasurementSortFields=Kz;exports.UsageUpdateBehavior=Xz;exports.UsageUpdatedFragmentDoc=Zz;exports.VendorIdentifier=Jz;exports.VendorType=tH;exports.VoidCreditGrantDocument=eH;exports.WeeklyAccordingTo=nH;exports.WidgetType=Fu;exports.YearlyAccordingTo=rH;exports.ZuoraCheckoutCredentialsFragmentDoc=iH;exports.__esModule=oH;exports.formatDateOnly=j1;exports.formatDateTime=G1;exports.getSdk=aH;exports.mapCreditGrantStatusToVariant=V1;exports.useActiveSubscriptions=zE;exports.useBooleanEntitlement=ig;exports.useCreditBalance=Zu;exports.useCreditGrants=Ny;exports.useCreditUsage=Ay;exports.useCustomerPortal=WE;exports.useEnumEntitlement=sg;exports.useMeteredEntitlement=ag;exports.useNumericEntitlement=og;exports.usePaywall=HE;exports.useStiggContext=ve;exports.useWaitForCheckoutCompleted=sT;
|