PageSourceSearch

https://www.usg.com/_next/static/chunks/4270-6b231dfd6deb7dff.js

js usg.com collected 2026-10-01 11:24:40 UTC 55,452 bytes, 4 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4270],{27137:function(t,e,r){!function(t,e,r){"use strict";let n=r.createContext(null),o={bootstrap:[],disableRefresh:!0,disableMetrics:!0,url:"http://localhost",appName:"offline",clientKey:"not-used"},i=r.startTransition||(t=>t()),s=({config:t,children:s,unleashClient:a,startClient:u=!0,stopClient:f=!0,startTransition:l=i})=>{var c,h,p;let d=t||o,g=r.useRef(a||new e.UnleashClient(d)),[v,y]=r.useState(!!(a?null!=t&&t.bootstrap&&(null==t?void 0:t.bootstrapOverride)!==!1||null!=(c=a.isReady)&&c.call(a):d.bootstrap&&!1!==d.bootstrapOverride)),[m,b]=r.useState((null==(p=(h=g.current).getError)?void 0:p.call(h))||null);r.useEffect(()=>{d||a||console.error(`You must provide either a config or an unleash client to the flag provider.
2        If you are initializing the client in useEffect, you can avoid this warning
3        by checking if the client exists before rendering.`);let t=t=>{l(()=>{b(e=>e||t)})},e=t=>{l(()=>{b(null)})},r=null,n=()=>{r=setTimeout(()=>{l(()=>{y(!0)})},0)};return g.current.on("ready",n),g.current.on("error",t),g.current.on("recovered",e),u&&(g.current.stop(),g.current.start()),function(){g.current&&(g.current.off("error",t),g.current.off("ready",n),g.current.off("recovered",e),f&&g.current.stop()),r&&clearTimeout(r)}},[]);let E=r.useMemo(()=>({on:(t,e,r)=>g.current.on(t,e,r),off:(t,e)=>g.current.off(t,e),updateContext:async t=>await g.current.updateContext(t),isEnabled:t=>g.current.isEnabled(t),getVariant:t=>g.current.getVariant(t),client:g.current,flagsReady:v,flagsError:m,setFlagsReady:y,setFlagsError:b}),[v,m]);return r.createElement(n.Provider,{value:E},s)},a={on:(t,e,r)=>(console.error("on() must be used within a FlagProvider"),u),off:(t,e)=>(console.error("off() must be used within a FlagProvider"),u),updateContext:async()=>{console.error("updateContext() must be used within a FlagProvider")},isEnabled:()=>(console.error("isEnabled() must be used within a FlagProvider"),!1),getVariant:()=>(console.error("getVariant() must be used within a FlagProvider"),{name:"disabled",enabled:!1})},u={...a,toggles:[],impressionDataAll:{},context:{},storage:{},start:()=>{},stop:()=>{},isReady:()=>!1,getError:()=>null,getAllToggles:()=>[]},f={...a,client:u,flagsReady:!1,setFlagsReady:()=>{console.error("setFlagsReady() must be used within a FlagProvider")},flagsError:null,setFlagsError:()=>{console.error("setFlagsError() must be used within a FlagProvider")}};function l(){return r.useContext(n)||(console.error("useFlagContext() must be used within a FlagProvider"),f)}Object.defineProperty(t,"InMemoryStorageProvider",{enumerable:!0,get:()=>e.InMemoryStorageProvider}),Object.defineProperty(t,"LocalStorageProvider",{enumerable:!0,get:()=>e.LocalStorageProvider}),Object.defineProperty(t,"UnleashClient",{enumerable:!0,get:()=>e.UnleashClient}),t.FlagContext=n,t.FlagProvider=s,t.default=s,t.useFlag=t=>{let{isEnabled:e,client:n}=l(),[o,i]=r.useState(!!e(t)),s=r.useRef();return s.current=o,r.useEffect(()=>{if(!n)return;let r=()=>{let r=e(t);r!==s.current&&(s.current=r,i(!!r))},o=()=>{let r=e(t);s.current=r,i(r)};return n.on("update",r),n.on("ready",o),()=>{n.off("update",r),n.off("ready",o)}},[n]),o},t.useFlags=()=>{let{client:t}=l(),[e,n]=r.useState(t.getAllToggles());return r.useEffect(()=>{let e=()=>{n(t.getAllToggles())};return t.on("update",e),()=>{t.off("update",e)}},[]),e},t.useFlagsStatus=()=>{let{flagsReady:t,flagsError:e}=l();return{flagsReady:t,flagsError:e}},t.useUnleashClient=()=>{let{client:t}=l();return t},t.useUnleashContext=()=>{let{updateContext:t}=l();return t},t.useVariant=t=>{let{getVariant:e,client:n}=l(),[o,i]=r.useState(e(t)),s=r.useRef({name:o.name,enabled:o.enabled});return s.current=o,r.useEffect(()=>{if(!n)return;let r=()=>{var r,n,o,a,u;let f=e(t);r=s.current,(r.name!==(null==f?void 0:f.name)||r.enabled!==(null==f?void 0:f.enabled)||r.feature_enabled!==(null==f?void 0:f.feature_enabled)||(null==(n=r.payload)?void 0:n.type)!==(null==(o=null==f?void 0:f.payload)?void 0:o.type)||(null==(a=r.payload)?void 0:a.value)!==(null==(u=null==f?void 0:f.payload)?void 0:u.value))&&(i(f),s.current=f)},o=()=>{let r=e(t);s.current.name=null==r?void 0:r.name,s.current.enabled=null==r?void 0:r.enabled,i(r)};return n.on("update",r),n.on("ready",o),()=>{n.off("update",r),n.off("ready",o)}},[n]),o||{}},Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}(e,r(88424),r(36925))},36505:(t,e,r)=>{"use strict";
3Object.defineProperty(e,"__esModule",{value:!0}),e.useUnleashClient=e.useUnleashContext=e.useFlagsStatus=e.useFlags=e.useVariant=e.useFlag=void 0;let n=r(27137);e.useFlag=t=>(0,n.useFlag)(t),e.useVariant=t=>(0,n.useVariant)(t),e.useFlags=()=>(0,n.useFlags)(),e.useFlagsStatus=n.useFlagsStatus,e.useUnleashContext=n.useUnleashContext,e.useUnleashClient=n.useUnleashClient},47072:(t,e,r)=>{"use strict";var n=r(1433);Object.defineProperty(e,"__esModule",{value:!0}),e.removeTrailingSlash=e.getDefaultServerConfig=e.getDefaultClientConfig=e.getServerBaseUrl=e.randomSessionId=e.safeCompare=void 0,e.safeCompare=(t,e)=>{let r=String(t),n=String(e),o=r.length,i=0;o!==n.length&&(n=r,i=1);for(let t=0;t<o;t++)i|=r.charCodeAt(t)^n.charCodeAt(t);return 0===i},e.randomSessionId=()=>`${Math.floor(1e9*Math.random())}`;let o=()=>{n.env.NEXT_PUBLIC_UNLEASH_SERVER_API_TOKEN&&console.warn("You are trying to set `NEXT_PUBLIC_UNLEASH_SERVER_API_TOKEN`. Server keys shouldn't be public. Use frontend keys or skip `NEXT_PUBLIC_ prefix.")};e.getServerBaseUrl=()=>n.env.UNLEASH_SERVER_API_URL||n.env.NEXT_PUBLIC_UNLEASH_SERVER_API_URL,e.getDefaultClientConfig=()=>(o(),{url:n.env.UNLEASH_FRONTEND_API_URL||n.env.NEXT_PUBLIC_UNLEASH_FRONTEND_API_URL||`${(0,e.getServerBaseUrl)()||"http://localhost:4242/api"}/frontend`,appName:n.env.UNLEASH_APP_NAME||n.env.NEXT_PUBLIC_UNLEASH_APP_NAME||"nextjs",clientKey:n.env.UNLEASH_FRONTEND_API_TOKEN||n.env.NEXT_PUBLIC_UNLEASH_FRONTEND_API_TOKEN||"default:development.unleash-insecure-frontend-api-token"}),e.getDefaultServerConfig=()=>(o(),{url:(0,e.getServerBaseUrl)()||"http://localhost:4242/api",appName:n.env.UNLEASH_APP_NAME||n.env.NEXT_PUBLIC_UNLEASH_APP_NAME||"nextjs",clientKey:n.env.UNLEASH_SERVER_API_TOKEN||"default:development.unleash-insecure-server-api-token"}),e.removeTrailingSlash=t=>t?.replace(/\/$/,"")},84280:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FlagProvider=void 0;let n=r(5833),o=r(27137),i=r(47072);e.FlagProvider=({children:t,...e})=>(0,n.jsx)(o.FlagProvider,{...e,startClient:void 0!==e.startClient?e.startClient:"u">typeof window,config:{...(0,i.getDefaultClientConfig)(),...e.config},children:t})},88424:(t,e)=>{"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function n(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function i(t,e,r,n){return new(r||(r=Promise))(function(o,i){function s(t){try{u(n.next(t))}catch(t){i(t)}}function a(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})}function s(t,e){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var f=[a,u];if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,f[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&f[0]?n.return:f[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,f[1])).done)return o;switch(n=0,o&&(f=[2&f[0],o.value]),f[0]){case 0:case 1:o=f;break;case 4:return i.label++,{value:f[1],done:!1};case 5:i.label++,n=f[1],f=[0];continue;case 7:f=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===f[0]||2===f[0])){i=0;continue}if(3===f[0]&&(!o||f[1]>o[0]&&f[1]<o[3])){i.label=f[1];break}if(6===f[0]&&i.label<o[1]){i.label=o[1],o=f;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(f);break}o[2]&&i.ops.pop(),i.trys.pop();continue}f=e.call(t,i)}catch(t){f=[6,t],n=0}
3finally{r=o=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}}function a(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var u,f={exports:{}},l=function(){if(u)return f.exports;function t(){}return u=1,t.prototype={on:function(t,e,r){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:r}),this},once:function(t,e,r){var n=this;function o(){n.off(t,o),e.apply(r,arguments)}return o._=e,this.on(t,o,r)},emit:function(t){for(var e=[].slice.call(arguments,1),r=((this.e||(this.e={}))[t]||[]).slice(),n=0,o=r.length;n<o;n++)r[n].fn.apply(r[n].ctx,e);return this},off:function(t,e){var r=this.e||(this.e={}),n=r[t],o=[];if(n&&e)for(var i=0,s=n.length;i<s;i++)n[i].fn!==e&&n[i].fn._!==e&&o.push(n[i]);return o.length?r[t]=o:delete r[t],this}},f.exports=t,f.exports.TinyEmitter=t,f.exports}(),c=function(t){return null!=t[1]},h=function(t){var e=t.properties,r=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)0>e.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["properties"]),n=function(t){return Object.entries(t).sort(function(t,e){var r=t[0],n=e[0];return r.localeCompare(n,void 0)})};return JSON.stringify([n(r),n(void 0===e?{}:e)])},p=function(t){return i(void 0,void 0,void 0,function(){var e;return s(this,function(r){var n;switch(r.label){case 0:e=h(t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(n=e,i(void 0,void 0,void 0,function(){var t,e,r,o;return s(this,function(i){switch(i.label){case 0:if(t="u">typeof globalThis&&(null==(r=globalThis.crypto)?void 0:r.subtle)?null==(o=globalThis.crypto)?void 0:o.subtle:void 0,"u"<typeof TextEncoder||!(null==t?void 0:t.digest)||"u"<typeof Uint8Array)throw Error("Hashing function not available");return e=(new TextEncoder).encode(n),[4,t.digest("SHA-256",e)];case 1:return[2,Array.from(new Uint8Array(i.sent())).map(function(t){return t.toString(16).padStart(2,"0")}).join("")]}})}))];case 2:return[2,r.sent()];case 3:return r.sent(),[2,e];case 4:return[2]}})})},d=function(t){var e,r=t.clientKey,n=t.appName,o=t.connectionId,i=t.customHeaders,s=t.headerName,a=t.etag,u=t.isPost,f=((e={accept:"application/json"})[(void 0===s?"authorization":s).toLocaleLowerCase()]=r,e["unleash-sdk"]="unleash-js-sdk:3.8.2",e["unleash-appname"]=n,e);return u&&(f["content-type"]="application/json"),a&&(f["if-none-match"]=a),Object.entries(i||{}).filter(c).forEach(function(t){var e=t[0],r=t[1];return f[e.toLocaleLowerCase()]=r}),f["unleash-connection-id"]=o,f},g=function(){},v=function(){function t(t){var e=t.onError,r=t.onSent,n=t.appName,o=t.metricsInterval,i=t.disableMetrics,s=t.url,a=t.clientKey,u=t.fetch,f=t.headerName,l=t.customHeaders,c=t.metricsIntervalInitial,h=t.connectionId,p=t.metricRegistry;this.onError=e,this.onSent=r||g,this.disabled=void 0!==i&&i,this.metricsInterval=1e3*o,this.metricsIntervalInitial=1e3*c,this.appName=n,this.url=s instanceof URL?s:new URL(s),this.clientKey=a,this.bucket=this.createEmptyBucket(),this.fetch=u,this.headerName=f,this.customHeaders=void 0===l?{}:l,this.connectionId=h,this.metricRegistry=p}return t.prototype.start=function(){var t=this;if(this.disabled)return!1;this.setupMetricsFlushOnPageUnload(),"number"==typeof this.metricsInterval&&this.metricsInterval>0&&(this.metricsIntervalInitial>0?setTimeout(function(){t.startTimer(),t.sendMetrics()},this.metricsIntervalInitial):this.startTimer())},t.prototype.stop=function(){this.timer&&(clearInterval(this.timer),delete this.timer),this.removeMetricsFlushOnPageUnload()},t.prototype.createEmptyBucket=function(){return{start:new Date,stop:null,toggles:{}}},t.prototype.getHeaders=function(){return d({clientKey:this.clientKey,appName:this.appName,connectionId:this.connectionId,customHeaders:this.customHeaders,headerName:this.headerName,isPost:!0})},t.prototype.sendMetrics=function(){return i(this,arguments,void 0,function(t){var e,r,n,o=(void 0===t?{}:t).fireAndForget,i=void 0!==o&&o;return s(this,function(t){switch(t.label){case 0:if(e="".concat(this.url.toString().replace(/\/$/,""),"/client/metrics"),r=this.getPayload(),this.bucketIsEmpty(r)&&(!r.impactMetrics||0===r.impactMetrics.length))return[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.fetch(e,{cache:"no-cache",method:"POST",headers:this.getHeaders(),body:JSON.stringify(r),keepalive:i})];case 2:return t.sent(),this.onSent(r),[3,4];case 3:return console.error("Unleash: unable to send feature metrics",n=t.sent()),this.onError(n),[3,4];case 4:return[2]}})})},t.prototype.count=function(t,e){return!(this.disabled||!this.bucket)&&(this.assertBucket(t),this.bucket.toggles[t][e?"yes":"no"]++,!0)},t.prototype.countVariant=function(t,e){return!(this.disabled||!this.bucket)&&(this.assertBucket(t),this.bucket.toggles[t].variants[e]?this.bucket.toggles[t].variants[e]+=1:this.bucket.toggles[t].variants[e]=1,!0)},t.prototype.assertBucket=function(t){if(this.disabled||!this.bucket)return!1;this.bucket.toggles[t]||(this.bucket.toggles[t]={yes:0,no:0,variants:{}})},t.prototype.startTimer=function(){var t=this;this.timer=setInterval(function(){t.sendMetrics()},this.metricsInterval)},t.prototype.bucketIsEmpty=function(t){return 0===Object.keys(t.bucket.toggles).length},t.prototype.getPayload=function(){var t,e=o(o({},this.bucket),{stop:new Date});this.bucket=this.createEmptyBucket();var r={bucket:e,appName:this.appName,instanceId:"browser"};return r.impactMetrics=(null==(t=this.metricRegistry)?void 0:t.collect())||[],r},t.prototype.setupMetricsFlushOnPageUnload=function(){var t=this;"u"<typeof document||"u"<typeof window||"function"!=typeof document.addEventListener||document.addEventListener("visibilitychange",this.flushMetricsOnPageUnload=function(){"hidden"===document.visibilityState&&t.sendMetrics({fireAndForget:!0})})},t.prototype.removeMetricsFlushOnPageUnload=function(){this.flushMetricsOnPageUnload&&(document.removeEventListener("visibilitychange",this.flushMetricsOnPageUnload),this.flushMetricsOnPageUnload=void 0)},t}(),y=function(){function t(){this.store=new Map}return t.prototype.save=function(t,e){return i(this,void 0,void 0,function(){return s(this,function(r){return this.store.set(t,e),[2]})})},t.prototype.get=function(t){return i(this,void 0,void 0,function(){return s(this,function(e){return[2,this.store.get(t)]})})},t}(),m=function(){function t(t){void 0===t&&(t="unleash:repository"),this.prefix=t}return t.prototype.save=function(t,e){return i(this,void 0,void 0,function(){var r,n;return s(this,function(o){r=JSON.stringify(e),n="".concat(this.prefix,":").concat(t);try{window.localStorage.setItem(n,r)}catch(t){console.error(t)}return[2]})})},t.prototype.get=function(t){try{var e="".concat(this.prefix,":").concat(t),r=window.localStorage.getItem(e);return r?JSON.parse(r):void 0}catch(t){console.error(t)}},t}(),b=function(){var t;return"u">typeof globalThis&&(null==(t=globalThis.crypto)?void 0:t.randomUUID)?globalThis.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},E=function(){function t(){}return t.prototype.generateEventId=function(){return b()},t.prototype.createImpressionEvent=function(t,e,r,n,i,s){var a=this.createBaseEvent(t,e,r,n,i);return s?o(o({},a),{variant:s}):a},t.prototype.createBaseEvent=function(t,e,r,n,o){return{eventType:n,eventId:this.generateEventId(),context:t,enabled:e,featureName:r,impressionData:o}},t}();function w(t){return void 0!==t&&!Number.isFinite(t)}
3function T(t){return t?Object.keys(t).sort().map(function(e){return"".concat(e,"=").concat(t[e])}).join(","):""}function x(t){var e={};if(!t)return e;for(var r=0,n=t.split(",");r<n.length;r++){var o=n[r].split("="),i=o[0],s=o[1];e[i]=s}return e}var S=function(t){return"buckets"in t},A=function(){function t(t){this.opts=t,this.values=new Map}return t.prototype.inc=function(t,e){var r;if(!w(t)){var n=null!=t?t:1;if(!(n<=0)){var o=T(e),i=null!=(r=this.values.get(o))?r:0;this.values.set(o,i+n)}}},t.prototype.collect=function(){var t=Array.from(this.values.entries()).map(function(t){var e=t[0],r=t[1];return{labels:x(e),value:r}});return this.values.clear(),0===t.length&&t.push({labels:{},value:0}),{name:this.opts.name,help:this.opts.help,type:"counter",samples:t}},t}(),I=function(){function t(t){this.opts=t,this.values=new Map;var e=Array.from(new Set((t.buckets&&t.buckets.length>0?t.buckets:[.005,.01,.025,.05,.1,.25,.5,1,2.5,5,10]).filter(function(t){return t!==1/0}))).sort(function(t,e){return t-e});this.buckets=a(a([],e,!0),[1/0],!1)}return t.prototype.restore=function(t){var e=T(t.labels),r={count:t.count,sum:t.sum,buckets:new Map(t.buckets.map(function(t){return["+Inf"===t.le?1/0:t.le,t.count]}))};this.values.set(e,r)},t.prototype.observe=function(t,e){var r;if(!w(t)){var n=T(e),o=this.values.get(n);if(!o){for(var i=new Map,s=0,a=this.buckets;s<a.length;s++){var u=a[s];i.set(u,0)}o={count:0,sum:0,buckets:i},this.values.set(n,o)}o.count++,o.sum+=t;for(var f=0,l=this.buckets;f<l.length;f++)if(t<=(u=l[f])){var c=null!=(r=o.buckets.get(u))?r:0;o.buckets.set(u,c+1)}}},t.prototype.collect=function(){var t=Array.from(this.values.entries()).map(function(t){var e=t[0],r=t[1];return{labels:x(e),count:r.count,sum:r.sum,buckets:Array.from(r.buckets.entries()).map(function(t){var e=t[0];return{le:e===1/0?"+Inf":e,count:t[1]}})}});return this.values.clear(),0===t.length&&t.push({labels:{},count:0,sum:0,buckets:this.buckets.map(function(t){return{le:t===1/0?"+Inf":t,count:0}})}),{name:this.opts.name,help:this.opts.help,type:"histogram",samples:t}},t}(),R=function(){function t(){this.counters=new Map,this.histograms=new Map}return t.prototype.getCounter=function(t){return this.counters.get(t)},t.prototype.getHistogram=function(t){return this.histograms.get(t)},t.prototype.counter=function(t){var e=t.name,r=this.counters.get(e);return r||(r=new A(t),this.counters.set(e,r)),r},t.prototype.histogram=function(t){var e=t.name,r=this.histograms.get(e);return r||(r=new I(t),this.histograms.set(e,r)),r},t.prototype.collect=function(){var t=Array.from(this.counters.values()).map(function(t){return t.collect()}),e=Array.from(this.histograms.values()).map(function(t){return t.collect()}),r=a(a([],t,!0),e,!0).filter(function(t){return t.samples.length>0});return r.length>0?r:[]},t.prototype.restore=function(t){for(var e=this,r=0;r<t.length;r++)!function(t){switch(t.type){case"counter":for(var r=e.counter({name:t.name,help:t.help}),n=0,o=t.samples;n<o.length;n++){var i=o[n];"value"in i&&r.inc(i.value,i.labels)}break;case"histogram":var s=t.samples.find(S);if(s){var a=s.buckets.map(function(t){return"+Inf"===t.le?1/0:t.le}),u=e.histogram({name:t.name,help:t.help,buckets:a});t.samples.filter(S).forEach(function(t){u.restore(t)})}}}(t[r])},t}(),U={INIT:"initialized",ERROR:"error",READY:"ready",UPDATE:"update",IMPRESSION:"impression",SENT:"sent",RECOVERED:"recovered",WARN:"warn"},N=function(t){function e(e,r,n){var o=t.call(this)||this;return o.metricRegistry=e,o.appName=r,o.environment=n,o}return n(e,t),e.prototype.defineCounter=function(t,e){t&&e?this.metricRegistry.counter({name:t,help:e,labelNames:["featureName","appName","environment"]}):this.emit(U.WARN,"Counter name or help cannot be empty: ".concat(t,", ").concat(e,"."))},e.prototype.defineHistogram=function(t,e,r){t&&e?this.metricRegistry.histogram({name:t,help:e,labelNames:["featureName","appName","environment"],buckets:r}):this.emit(U.WARN,"Histogram name or help cannot be empty: ".concat(t,", ").concat(e,"."))},e.prototype.incrementCounter=function(t,e){var r=this.metricRegistry.getCounter(t);if(r){var n={appName:this.appName,environment:this.environment};r.inc(e,n)}
3else this.emit(U.WARN,"Counter ".concat(t," not defined, this counter will not be incremented."))},e.prototype.observeHistogram=function(t,e){var r=this.metricRegistry.getHistogram(t);if(r){var n={appName:this.appName,environment:this.environment};r.observe(e,n)}else this.emit(U.WARN,"Histogram ".concat(t," not defined, this histogram will not be updated."))},e}(l.TinyEmitter),C=["userId","sessionId","remoteAddress","currentTime"],O=function(t){return C.includes(t)},P={name:"disabled",enabled:!1,feature_enabled:!1},k="repo",L="repoLastUpdateTimestamp",B=function(){try{if("u">typeof window&&"fetch"in window)return fetch.bind(window);if("fetch"in globalThis)return fetch.bind(globalThis)}catch(t){console.error('Unleash failed to resolve "fetch"',t)}},_=function(t){function e(e){var r,n=e.storageProvider,i=e.url,s=e.clientKey,a=e.disableRefresh,u=e.refreshInterval,f=e.metricsInterval,l=e.metricsIntervalInitial,c=e.disableMetrics,h=e.appName,p=e.environment,d=void 0===p?"default":p,g=e.context,w=e.fetch,T=void 0===w?B():w,x=e.createAbortController,S=void 0===x?function(){try{if("u">typeof window&&"AbortController"in window)return function(){return new window.AbortController};if("fetch"in globalThis)return function(){return new globalThis.AbortController}}catch(t){console.error('Unleash failed to resolve "AbortController" factory',t)}}():x,A=e.bootstrap,I=e.bootstrapOverride,C=e.headerName,O=void 0===C?"Authorization":C,P=e.customHeaders,k=void 0===P?{}:P,L=e.impressionDataAll,_=e.usePOSTrequests,M=e.experimental,F=t.call(this)||this;if(F.toggles=[],F.etag="",F.readyEventEmitted=!1,F.fetchedFromServer=!1,F.usePOSTrequests=!1,F.started=!1,!i)throw Error("url is required");if(!s)throw Error("clientKey is required");if(!h)throw Error("appName is required.");F.eventsHandler=new E,F.impressionDataAll=void 0!==L&&L,F.toggles=A&&A.length>0?A:[],F.url=i instanceof URL?i:new URL(i),F.clientKey=s,F.headerName=O,F.customHeaders=k,F.storage=n||("u">typeof window?new m:new y),F.refreshInterval=void 0!==a&&a?0:1e3*(void 0===u?30:u),F.context=o({appName:h,environment:d},g),F.usePOSTrequests=void 0!==_&&_,F.sdkState="initializing";var j=null==M?void 0:M.metricsUrl;!j||j instanceof URL||(j=new URL(j)),F.experimental=o(o({},M),{metricsUrl:j}),(null==M?void 0:M.togglesStorageTTL)&&(null==M?void 0:M.togglesStorageTTL)>0&&(F.experimental.togglesStorageTTL=1e3*M.togglesStorageTTL),F.lastRefreshTimestamp=0,F.ready=new Promise(function(t){F.init().then(t).catch(function(e){console.error(e),F.sdkState="error",F.emit(U.ERROR,e),F.lastError=e,t()})}),T||console.error('Unleash: You must either provide your own "fetch" implementation or run in an environment where "fetch" is available.'),S||console.error('Unleash: You must either provide your own "AbortController" implementation or run in an environment where "AbortController" is available.'),F.fetch=T,F.createAbortController=S,F.bootstrap=A&&A.length>0?A:void 0,F.bootstrapOverride=void 0===I||I,F.connectionId=b(),F.metricRegistry=new R;var D=F.resolveEnvironment(s,d);return F.impactMetrics=new N(F.metricRegistry,h,D),F.metrics=new v({onError:function(t){return F.emit(U.ERROR,{type:"metrics",error:t})},onSent:F.emit.bind(F,U.SENT),appName:h,metricsInterval:void 0===f?30:f,disableMetrics:void 0!==c&&c,url:(null==(r=F.experimental)?void 0:r.metricsUrl)||F.url,clientKey:s,fetch:T,headerName:O,customHeaders:k,metricsIntervalInitial:void 0===l?2:l,connectionId:F.connectionId,metricRegistry:F.metricRegistry}),F}return n(e,t),e.prototype.getAllToggles=function(){return a([],this.toggles,!0)},e.prototype.isEnabled=function(t){var e,r=this.toggles.find(function(e){return e.name===t}),n=!!r&&r.enabled;if(this.metrics.count(t,n),(null==r?void 0:r.impressionData)||this.impressionDataAll){var o=this.eventsHandler.createImpressionEvent(this.context,n,t,"isEnabled",null!=(e=null==r?void 0:r.impressionData)?e:void 0);this.emit(U.IMPRESSION,o)}return n},e.prototype.getVariant=function(t){var e,r=this.toggles.find(function(e){return e.name===t}),n=(null==r?void 0:r.enabled)||!1,i=r?r.variant:P;if(i.name&&this.metrics.countVariant(t,i.name),this.metrics.count(t,n),(null==r?void 0:r.impressionData)||this.impressionDataAll){var s=this.eventsHandler.createImpressionEvent(this.context,n,t,"getVariant",null!=(e=null==r?void 0:r.impressionData)?e:void 0,i.name);
3this.emit(U.IMPRESSION,s)}return o(o({},i),{feature_enabled:n})},e.prototype.updateToggles=function(){return i(this,void 0,void 0,function(){var t=this;return s(this,function(e){switch(e.label){case 0:return this.timerRef||this.fetchedFromServer?[4,this.fetchToggles()]:[3,2];case 1:return e.sent(),[3,4];case 2:return this.started?[4,new Promise(function(e){var r=function(){t.fetchToggles().then(function(){t.off(U.READY,r),e()})};t.once(U.READY,r)})]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},e.prototype.updateContext=function(t){return i(this,void 0,void 0,function(){var e;return s(this,function(r){switch(r.label){case 0:return(t.appName||t.environment)&&this.emit(U.WARN,"appName and environment are static. They can't be updated with updateContext."),e={environment:this.context.environment,appName:this.context.appName,sessionId:this.context.sessionId},this.context=o(o({},e),t),[4,this.updateToggles()];case 1:return r.sent(),[2]}})})},e.prototype.getContext=function(){return o({},this.context)},e.prototype.setContextField=function(t,e){return i(this,void 0,void 0,function(){var r,n,i;return s(this,function(s){switch(s.label){case 0:return O(t)?this.context=o(o({},this.context),((n={})[t]=e,n)):(r=o(o({},this.context.properties),((i={})[t]=e,i)),this.context=o(o({},this.context),{properties:r})),[4,this.updateToggles()];case 1:return s.sent(),[2]}})})},e.prototype.removeContextField=function(t){return i(this,void 0,void 0,function(){var e;return s(this,function(r){switch(r.label){case 0:return O(t)?this.context=o(o({},this.context),((e={})[t]=void 0,e)):"object"==typeof this.context.properties&&delete this.context.properties[t],[4,this.updateToggles()];case 1:return r.sent(),[2]}})})},e.prototype.setReady=function(){this.readyEventEmitted=!0,this.emit(U.READY)},e.prototype.init=function(){return i(this,void 0,void 0,function(){var t,e,r;return s(this,function(n){switch(n.label){case 0:return[4,this.resolveSessionId()];case 1:return t=n.sent(),this.context=o({sessionId:t},this.context),[4,this.storage.get(k)];case 2:return e=n.sent()||[],r=this,[4,this.getLastRefreshTimestamp()];case 3:return r.lastRefreshTimestamp=n.sent(),this.bootstrap&&(this.bootstrapOverride||0===e.length)?[4,this.storage.save(k,this.bootstrap)]:[3,6];case 4:return n.sent(),this.toggles=this.bootstrap,this.sdkState="healthy",[4,this.storeLastRefreshTimestamp()];case 5:return n.sent(),this.setReady(),[3,7];case 6:this.toggles=e,n.label=7;case 7:return this.sdkState="healthy",this.emit(U.INIT),[2]}})})},e.prototype.start=function(){return i(this,void 0,void 0,function(){var t,e=this;return s(this,function(r){switch(r.label){case 0:return this.started=!0,this.timerRef?(console.error("Unleash SDK has already started, if you want to restart the SDK you should call client.stop() before starting again."),[2]):[4,this.ready];case 1:return r.sent(),this.metrics.start(),t=this.refreshInterval,[4,this.initialFetchToggles()];case 2:return r.sent(),t>0&&(this.timerRef=setInterval(function(){return e.fetchToggles()},t)),[2]}})})},e.prototype.stop=function(){this.timerRef&&(clearInterval(this.timerRef),this.timerRef=void 0),this.metrics.stop()},e.prototype.isReady=function(){return this.readyEventEmitted},e.prototype.getError=function(){return"error"===this.sdkState?this.lastError:void 0},e.prototype.sendMetrics=function(){return this.metrics.sendMetrics()},e.prototype.resolveSessionId=function(){return i(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return this.context.sessionId?[2,this.context.sessionId]:[4,this.storage.get("sessionId")];case 1:return(t=e.sent())?[3,3]:(t=Math.floor(1e9*Math.random()),[4,this.storage.save("sessionId",t.toString(10))]);case 2:e.sent(),e.label=3;case 3:return[2,t.toString(10)]}})})},e.prototype.getHeaders=function(){return d({clientKey:this.clientKey,connectionId:this.connectionId,appName:this.context.appName,customHeaders:this.customHeaders,headerName:this.headerName,etag:this.etag,isPost:this.usePOSTrequests})},e.prototype.storeToggles=function(t){return i(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.toggles=t,this.emit
3(U.UPDATE),[4,this.storage.save(k,t)];case 1:return e.sent(),[2]}})})},e.prototype.isTogglesStorageTTLEnabled=function(){var t;return!!((null==(t=this.experimental)?void 0:t.togglesStorageTTL)&&this.experimental.togglesStorageTTL>0)},e.prototype.isUpToDate=function(){if(!this.isTogglesStorageTTLEnabled())return!1;var t,e=Date.now(),r=(null==(t=this.experimental)?void 0:t.togglesStorageTTL)||0;return this.lastRefreshTimestamp>0&&this.lastRefreshTimestamp<=e&&e-this.lastRefreshTimestamp<=r},e.prototype.getLastRefreshTimestamp=function(){return i(this,void 0,void 0,function(){var t,e;return s(this,function(r){switch(r.label){case 0:return this.isTogglesStorageTTLEnabled()?[4,this.storage.get(L)]:[3,3];case 1:return t=r.sent(),[4,p(this.context)];case 2:return e=r.sent(),[2,(null==t?void 0:t.key)===e?t.timestamp:0];case 3:return[2,0]}})})},e.prototype.storeLastRefreshTimestamp=function(){return i(this,void 0,void 0,function(){var t,e;return s(this,function(r){switch(r.label){case 0:return this.isTogglesStorageTTLEnabled()?(this.lastRefreshTimestamp=Date.now(),e={},[4,p(this.context)]):[3,3];case 1:return e.key=r.sent(),e.timestamp=this.lastRefreshTimestamp,t=e,[4,this.storage.save(L,t)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.initialFetchToggles=function(){if(!this.isUpToDate())return this.fetchToggles();this.fetchedFromServer||(this.fetchedFromServer=!0,this.setReady())},e.prototype.fetchToggles=function(){return i(this,void 0,void 0,function(){var t,e,r,n,o,i,a,u,f;return s(this,function(s){switch(s.label){case 0:if(!this.fetch)return[3,9];this.abortController&&!this.abortController.signal.aborted&&this.abortController.abort(),this.abortController=null==(f=this.createAbortController)?void 0:f.call(this),t=this.abortController?this.abortController.signal:void 0,s.label=1;case 1:var l,h,p;return s.trys.push([1,7,8,9]),r=(e=this.usePOSTrequests)?this.url:(l=this.url,h=this.context,p=new URL(l.toString()),Object.entries(h).filter(c).forEach(function(t){var e=t[0],r=t[1];"properties"===e&&r?Object.entries(r).filter(c).forEach(function(t){var e=t[0],r=t[1];return p.searchParams.append("properties[".concat(e,"]"),r)}):p.searchParams.append(e,r)}),p),n=e?"POST":"GET",o=e?JSON.stringify({context:this.context}):void 0,[4,this.fetch(r.toString(),{method:n,cache:"no-cache",headers:this.getHeaders(),body:o,signal:t})];case 2:return i=s.sent(),"error"===this.sdkState&&i.status<400&&(this.sdkState="healthy",this.emit(U.RECOVERED)),i.ok?(this.etag=i.headers.get("ETag")||"",[4,i.json()]):[3,5];case 3:return a=s.sent(),[4,this.storeToggles(a.toggles)];case 4:return s.sent(),"healthy"!==this.sdkState&&(this.sdkState="healthy"),this.fetchedFromServer||(this.fetchedFromServer=!0,this.setReady()),this.storeLastRefreshTimestamp(),[3,6];case 5:304===i.status?this.storeLastRefreshTimestamp():(console.error("Unleash: Fetching feature toggles did not have an ok response"),this.sdkState="error",this.emit(U.ERROR,{type:"HttpError",code:i.status}),this.lastError={type:"HttpError",code:i.status}),s.label=6;case 6:return[3,9];case 7:return"object"==typeof(u=s.sent())&&null!==u&&"name"in u&&"AbortError"===u.name||(console.error("Unleash: unable to fetch feature toggles",u),this.sdkState="error",this.emit(U.ERROR,{type:"fetch-toggles",error:u}),this.lastError=u),[3,9];case 8:return this.abortController=null,[7];case 9:return[2]}})})},e.prototype.resolveEnvironment=function(t,e){return function(t){var e=t.indexOf(":");if(-1!==e){var r=t.slice(e+1),n=r.lastIndexOf(".");if(-1!==n)return r.slice(0,n)}}(t)||e},e}(l.TinyEmitter);e.EVENTS=U,e.InMemoryStorageProvider=y,e.LocalStorageProvider=m,e.UnleashClient=_,e.lastUpdateKey=L,e.resolveFetch=B},93309:t=>{var e={872:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,i=u(t),s=i[0],a=i[1],f=new o((s+a)*3/4-a),l=0,c=a>0?s-4:s;for(r=0;r<c;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],f[l++]=e>>16&255,f[l++]=e>>8&255,f[l++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,f[l++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,f[l++]=e>>8&255,f[l++]=255&e),f},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(function(t,e,n){for(var o,i=[],s=e;s<n;s+=3)o=(t[s]<<16&0xff0000)+(t[s+1]<<8&65280)+(255&t[s+2]),i.push(r[o>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(t,s,s+16383>a?a:s+16383));return 1===o?i.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===o&&i.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),i.join("")};for(var r=[],n=[],o="u">typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
3+/",s=0,a=i.length;s<a;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},230:function(t,e,r){"use strict";var n=r(872),o=r(321),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t){var n=t,o=e;if(("string"!=typeof o||""===o)&&(o="utf8"),!a.isEncoding(o))throw TypeError("Unknown encoding: "+o);var i=0|p(n,o),u=s(i),f=u.write(n,o);return f!==i&&(u=u.slice(0,f)),u}if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(N(t,SharedArrayBuffer)||t&&N(t.buffer,SharedArrayBuffer)))return function(t,e,r){var n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),a.prototype),n}(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var l=t.valueOf&&t.valueOf();if(null!=l&&l!==t)return a.from(l,e,r);var d=function(t){if(a.isBuffer(t)){var e=0|h(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||function(t){return t!=t}(t.length)?s(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(d)return d;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),s(t<0?0:0|h(t))}function c(t){for(var e=t.length<0?0:0|h(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}e.Buffer=a,e.SlowBuffer=function(t){return+t!=t&&(t=0),a.alloc(+t)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return(f(t),t<=0)?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)},a.allocUnsafe=function(t){return l(t)},a.allocUnsafeSlow=function(t){return l(t)};function h(t){if(t>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function p(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return A(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(t).length;default:if(o)return n?-1:A(t).length;e=(""+e).toLowerCase(),o=!0}}function d(t,e,r){var o,i,s,a=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=C[t[i]];return o}(this,e,r);case"utf8":case"utf-8":return m(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}(this,e,r);case"base64":return o=this,i=e,s=r,0===i&&s===o.length?n.fromByteArray(o):n.fromByteArray(o.slice(i,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}(this,e,r);default:if(a)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),a=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,o){var i;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length)if(o)return -1;else r=t.length-1;else if(r<0)if(!o)return -1;else r=0;if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,o);if("number"==typeof e){if(e&=255,"function"==typeof Uint8Array.prototype.indexOf)if(
vendor: 12,881 bytes, line 3
3o)return Uint8Array.prototype.indexOf.call(t,e,r);else return Uint8Array.prototype.lastIndexOf.call(t,e,r);return y(t,[e],r,n,o)}throw TypeError("val must be string, number or Buffer")}function y(t,e,r,n,o){var i,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=r;i<a;i++)if(f(t,i)===f(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else -1!==l&&(i-=i-l),l=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var c=!0,h=0;h<u;h++)if(f(t,i+h)!==f(e,h)){c=!1;break}if(c)return i}return -1}a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(N(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),N(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:+(n<r)},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;var r,n=a.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(N(i,Uint8Array)&&(i=a.from(i)),!a.isBuffer(i))throw TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?m(this,0,t):d.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,o){if(N(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var i=o-n,s=r-e,u=Math.min(i,s),f=this.slice(n,o),l=t.slice(e,r),c=0;c<u;++c)if(f[c]!==l[c]){i=f[c],s=l[c];break}return i<s?-1:+(s<i)},a.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)};function m(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,a,u,f=t[o],l=null,c=f>239?4:f>223?3:f>191?2:1;if(o+c<=r)switch(c){case 1:f<128&&(l=f);break;case 2:(192&(i=t[o+1]))==128&&(u=(31&f)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],s=t[o+2],(192&i)==128&&(192&s)==128&&(u=(15&f)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],(192&i)==128&&(192&s)==128&&(192&a)==128&&(u=(15&f)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=c}var h=n,p=h.length;if(p<=4096)return String.fromCharCode.apply(String,h);for(var d="",g=0;g<p;)d+=String.fromCharCode.apply(String,h.slice(g,g+=4096));return d}function b(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function E(t,e,r,n,o,i){if(!a.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function w(t,e,r,n,o,i){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function T(t,e,r,n,i){return e*=1,r>>>=0,i||w(t,e,r,4,34028234663852886e22,-34028234663852886e22),o.write(t,e,r,n,23,4),r+4}function x(t,e,r,n,i){return e*=1,r>>>=0,i||w(t,e,r,8,17976931348623157e292,-17976931348623157e292),o.write(t,e,r,n,52,8),r+8}a.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o,i,s,a,u,f,l,c,h=this.length-e;if((void 0===r||r>h)&&(r=h),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a,u=parseInt(e.substr(2*s,2),16);if((a=u)!=a)break;t[r+s]=u}return s}(this,t,e,r);case"utf8":case"utf-8":return o=e,i=r,U(A(t,this.length-o),this,o,i);case"ascii":return s=e,a=r,U(I(t),this,s,a);case"latin1":case"binary":return function(t,e,r,n){return U(I(e),t,r,n)}(this,t,e,r);case"base64":return u=e,f=r,U(R(t),this,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,c=r,U(function(t,e){for(var r,n,o=[],i=0;i<t.length&&!((e-=2)<0);++i)n=(r=t.charCodeAt(i))>>8,o.push(r%256),o.push(n);return o}(t,this.length-l),this,l,c);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||b(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||b(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||b(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||b(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||b(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readInt8=function(t,e){return(t>>>=0,e||b(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||b(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||b(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||b(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||b(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||b(t,4,this.length),o.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||b(t,4,this.length),o.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||b(t,8,this.length),o.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||b(t,8,this.length),o.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;E(this,t,e,r,o,0)}var i=1,s=0;for(this[e]=255&t;++s<r&&(i*=256);)this[e+s]=t/i&255;return e+r},a.prototype.writeUIntBE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;E(this,t,e,r,o,0)}var i=r-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var o=Math.pow(2,8*r-1);E(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<r&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var o=Math.pow(2,8*r-1);E(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t*=1,e>>>=0,r||E(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return T(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return T(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return x(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return x(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var i=o-1;i>=0;--i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return o},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var o,i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=a.isBuffer(t)?t:a.from(t,n),u=s.length;
3if(0===u)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var S=/[^+/0-9A-Za-z-_]/g;function A(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319||s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function I(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function R(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(S,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length)&&!(o>=t.length);++o)e[o+r]=t[o];return o}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var C=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)e[n+o]=t[r]+t[o];return e}()},321:function(t,e){e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,f=u>>1,l=-7,c=r?o-1:0,h=r?-1:1,p=t[e+c];for(c+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+t[e+c],c+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+t[e+c],c+=h,l-=8);if(0===i)i=1-f;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=f}return(p?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,u,f=8*i-o-1,l=(1<<f)-1,c=l>>1,h=5960464477539062e-23*(23===o),p=n?0:i-1,d=n?1:-1,g=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(a=+!!isNaN(e),s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+c>=1?e+=h/u:e+=h*Math.pow(2,1-c),e*u>=2&&(s++,u/=2),s+c>=l?(a=0,s=l):s+c>=1?(a=(e*u-1)*Math.pow(2,o),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,f+=o;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*g}}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}},s=!0;try{e[t](i,i.exports,n),s=!1}finally{s&&delete r[t]}return i.exports}n.ab="//",t.exports=n(230)}}]);
4//# sourceMappingURL=4270-6b231dfd6deb7dff.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.